idzebra-2.0.44/0000755000175000017500000000000011412336551010223 500000000000000idzebra-2.0.44/m4/0000755000175000017500000000000011412336534010544 500000000000000idzebra-2.0.44/m4/ltoptions.m40000644000175000017500000002724211321061701012756 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [0], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) idzebra-2.0.44/m4/yaz.m40000644000175000017500000000777711326307215011551 00000000000000# Use this m4 function for autoconf if you use YAZ in your own # configure script. dnl ----- Setup Docbook documentation for YAZ AC_DEFUN([YAZ_DOC], [ dnl autoconf < 2.60 does not define docdir if test -n "$docdir"; then docdir="${datadir}/doc/${PACKAGE}" AC_SUBST([docdir]) fi AC_SUBST(XSLTPROC_COMPILE) XSLTPROC_COMPILE='xsltproc -path ".:$(srcdir)"' AC_SUBST(MAN_COMPILE) MAN_COMPILE='$(XSLTPROC_COMPILE) $(srcdir)/common/id.man.xsl' AC_SUBST(HTML_COMPILE) HTML_COMPILE='$(XSLTPROC_COMPILE) $(srcdir)/common/id.htmlhelp.xsl' AC_SUBST(TKL_COMPILE) TKL_COMPILE='$(XSLTPROC_COMPILE) $(srcdir)/common/id.tkl.xsl' AC_SUBST(PDF_COMPILE) PDF_COMPILE='dblatex -P latex.class.options=a4paper,12pt,twoside,openright' AC_SUBST(DTD_DIR) AC_ARG_WITH(docbook-dtd,[[ --with-docbook-dtd=DIR use docbookx.dtd in DIR]], [ if test -f "$withval/docbookx.dtd"; then DTD_DIR=$withval fi ],[ AC_MSG_CHECKING(for docbookx.dtd) DTD_DIR="" for d in /usr/lib/sgml/dtd/docbook-xml \ /usr/share/sgml/docbook/dtd/4.2 \ /usr/share/sgml/docbook/dtd/xml/4.* \ /usr/share/sgml/docbook/xml-dtd-4.* \ /usr/local/share/xml/docbook/4.* do if test -f $d/docbookx.dtd; then DTD_DIR=$d fi done if test -z "$DTD_DIR"; then AC_MSG_RESULT(Not found) else AC_MSG_RESULT($d) fi ]) AC_SUBST(DSSSL_DIR) AC_ARG_WITH(docbook-dsssl,[[ --with-docbook-dsssl=DIR use Docbook DSSSL in DIR/{html,print}/docbook.dsl]], [ if test -f "$withval/html/docbook.dsl"; then DSSSL_DIR=$withval fi ],[ AC_MSG_CHECKING(for docbook.dsl) DSSSL_DIR="" for d in /usr/share/sgml/docbook/stylesheet/dsssl/modular \ /usr/share/sgml/docbook/dsssl-stylesheets-1.* \ /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh \ /usr/local/share/sgml/docbook/dsssl/modular do if test -f $d/html/docbook.dsl; then AC_MSG_RESULT($d) DSSSL_DIR=$d break fi done if test -z "$DSSSL_DIR"; then AC_MSG_RESULT(Not found) fi ]) AC_SUBST(XSL_DIR) AC_ARG_WITH(docbook-xsl,[[ --with-docbook-xsl=DIR use Docbook XSL in DIR/{htmlhelp,xhtml}]], [ if test -f "$withval/htmlhelp/htmlhelp.xsl"; then XSL_DIR=$withval fi ],[ AC_MSG_CHECKING(for htmlhelp.xsl) for d in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh \ /usr/local/share/xsl/docbook \ /usr/share/sgml/docbook/xsl-stylesheets-1.* do if test -f $d/htmlhelp/htmlhelp.xsl; then AC_MSG_RESULT($d) XSL_DIR=$d break fi done if test -z "$XSL_DIR"; then AC_MSG_RESULT(Not found) fi ]) ]) AC_DEFUN([YAZ_INIT], [ AC_SUBST(YAZLIB) AC_SUBST(YAZLALIB) AC_SUBST(YAZINC) AC_SUBST(YAZVERSION) yazconfig=NONE yazpath=NONE AC_ARG_WITH(yaz, [ --with-yaz=DIR use yaz-config in DIR (example /home/yaz-1.7)], [yazpath=$withval]) if test "x$yazpath" != "xNONE"; then yazconfig=$yazpath/yaz-config else if test "x$srcdir" = "x"; then yazsrcdir=. else yazsrcdir=$srcdir fi for i in ${yazsrcdir}/../../yaz ${yazsrcdir}/../yaz-* ${yazsrcdir}/../yaz; do if test -d $i; then if test -r $i/yaz-config; then yazconfig=$i/yaz-config fi fi done if test "x$yazconfig" = "xNONE"; then AC_PATH_PROG(yazconfig, yaz-config, NONE) fi fi AC_MSG_CHECKING(for YAZ) if $yazconfig --version >/dev/null 2>&1; then YAZLIB=`$yazconfig --libs $1` # if this is empty, it's a simple version YAZ 1.6 script # so we have to source it instead... if test "X$YAZLIB" = "X"; then . $yazconfig else YAZLALIB=`$yazconfig --lalibs $1` YAZINC=`$yazconfig --cflags $1` YAZVERSION=`$yazconfig --version` fi AC_MSG_RESULT([$yazconfig]) else AC_MSG_RESULT(Not found) YAZVERSION=NONE fi if test "X$YAZVERSION" != "XNONE"; then AC_MSG_CHECKING([for YAZ version]) AC_MSG_RESULT([$YAZVERSION]) if test "$2"; then have_yaz_version=`echo "$YAZVERSION" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'` req_yaz_version=`echo "$2" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'` if test "$have_yaz_version" -lt "$req_yaz_version"; then AC_MSG_ERROR([$YAZVERSION. Requires YAZ $2 or later]) fi fi fi ]) idzebra-2.0.44/m4/ltsugar.m40000644000175000017500000001042411321061701012376 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) idzebra-2.0.44/m4/ltversion.m40000644000175000017500000000127711321061701012750 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # Generated from ltversion.in. # serial 3017 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.2.6b]) m4_define([LT_PACKAGE_REVISION], [1.3017]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.2.6b' macro_revision='1.3017' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) idzebra-2.0.44/m4/idzebra-2.0.m40000644000175000017500000000341111060232402012626 00000000000000# Use this m4 function for autoconf if you use ID Zebra in your own # configure script. AC_DEFUN([IDZEBRA_2_0_INIT], [ AC_SUBST(IDZEBRA_LIBS) AC_SUBST(IDZEBRA_LALIBS) AC_SUBST(IDZEBRA_CFLAGS) AC_SUBST(IDZEBRA_VERSION) idzebraconfig=NONE idzebrapath=NONE AC_ARG_WITH(idzebra, [ --with-idzebra=DIR use idzebra-config in DIR (example /home/idzebra-2.0.0)], [idzebrapath=$withval]) if test "x$idzebrapath" != "xNONE"; then idzebraconfig=$idzebrapath/idzebra-config-2.0 else if test "x$srcdir" = "x"; then idzebrasrcdir=. else idzebrasrcdir=$srcdir fi for dir in ${idzebrasrcdir}/../idzebra* ${idzebrasrcdir}/../idzebra ../idzebra* ../zebra; do if test -d $dir; then conf=$dir/idzebra-config-2.0 if test -r $conf; then idzebraconfig=$conf fi fi done if test "x$idzebraconfig" = "xNONE"; then AC_PATH_PROG(idzebraconfig, idzebra-config-2.0, NONE) fi fi AC_MSG_CHECKING(for idzebra) if $idzebraconfig --version >/dev/null 2>&1; then IDZEBRA_LIBS=`$idzebraconfig --libs` IDZEBRA_LALIBS=`$idzebraconfig --lalibs` IDZEBRA_CFLAGS=`$idzebraconfig --cflags` IDZEBRA_VERSION=`$idzebraconfig --version` AC_MSG_RESULT([$idzebraconfig]) else AC_MSG_RESULT(Not found) IDZEBRA_VERSION=NONE fi if test "X$IDZEBRA_VERSION" != "XNONE"; then AC_MSG_CHECKING([for idzebra version]) AC_MSG_RESULT([$IDZEBRA_VERSION]) if test "$1"; then have_idzebra_version=`echo "$IDZEBRA_VERSION" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'` req_idzebra_version=`echo "$1" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'` if test "$have_idzebra_version" -lt "$req_idzebra_version"; then AC_MSG_ERROR([$IDZEBRA_VERSION. Requires idzebra $1 or later]) fi fi fi ]) idzebra-2.0.44/m4/libtool.m40000644000175000017500000077464711321061701012411 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 56 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl _LT_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\[$]0 --fallback-echo"')dnl " lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` ;; esac _LT_OUTPUT_LIBTOOL_INIT ]) # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) cat >"$CONFIG_LT" <<_LTEOF #! $SHELL # Generated by $as_me. # Run this file to recreate a libtool stub with the current configuration. lt_cl_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2008 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. if test "$no_create" != yes; then lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) fi ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_XSI_SHELLFNS sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(whole_archive_flag_spec, $1)='' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX # ----------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. m4_defun([_LT_PROG_ECHO_BACKSLASH], [_LT_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac ECHO=${lt_ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF [$]* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(lt_ECHO) ]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that does not interpret backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [AC_CHECK_TOOL(AR, ar, false) test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1]) AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line __oline__ "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method == "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE(int foo(void) {}, _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ) LDFLAGS="$save_LDFLAGS" else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then _LT_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [fix_srcfile_path], [1], [Fix the shell variable $srcfile for the compiler]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_PROG_CXX # ------------ # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ # compiler, we have our own version here. m4_defun([_LT_PROG_CXX], [ pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) AC_PROG_CXX if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_CXX dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_CXX], []) # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [AC_REQUIRE([_LT_PROG_CXX])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_PROG_F77 # ------------ # Since AC_PROG_F77 is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_F77], [ pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) AC_PROG_F77 if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_F77 dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_F77], []) # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_REQUIRE([_LT_PROG_F77])dnl AC_LANG_PUSH(Fortran 77) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${F77-"f77"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_PROG_FC # ----------- # Since AC_PROG_FC is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_FC], [ pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) AC_PROG_FC if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_FC dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_FC], []) # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_REQUIRE([_LT_PROG_FC])dnl AC_LANG_PUSH(Fortran) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${FC-"f95"} compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC="$lt_save_CC" ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC= CC=${RC-"windres"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC="$lt_save_CC" ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_XSI_SHELLFNS # --------------------- # Bourne and XSI compatible variants of some useful shell functions. m4_defun([_LT_PROG_XSI_SHELLFNS], [case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $[*] )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } dnl func_dirname_and_basename dnl A portable version of this function is already defined in general.m4sh dnl so there is no need for it here. # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[[^=]]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$[@]"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]+=\$[2]" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]=\$$[1]\$[2]" } _LT_EOF ;; esac ]) idzebra-2.0.44/m4/lt~obsolete.m40000644000175000017500000001311311321061701013265 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 4 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) idzebra-2.0.44/TODO0000644000175000017500000000030411412332551010624 00000000000000Version numbers are manually maintained in configure.ac include/idzebra/version.h NEWS win/zebra.nsi debian/changelog debian/rules (dh_makeshlibs line if API has been extended) idzebra-2.0.44/examples/0000755000175000017500000000000011412336535012043 500000000000000idzebra-2.0.44/examples/oai-pmh/0000755000175000017500000000000011412336535013375 500000000000000idzebra-2.0.44/examples/oai-pmh/Makefile.am0000644000175000017500000000154311412332551015346 00000000000000 oaidatadir = $(datadir)/$(PACKAGE)$(PACKAGE_SUFFIX)-examples/oai-pmh oaiconfdatadir = $(datadir)/$(PACKAGE)$(PACKAGE_SUFFIX)-examples/oai-pmh/conf oaidatadatadir = $(datadir)/$(PACKAGE)$(PACKAGE_SUFFIX)-examples/oai-pmh/data oaidata_DATA = README oaiconfdata_DATA = \ conf/cql2pqf.txt \ conf/dom-conf.xml \ conf/explain2cqlpqftxt.xsl \ conf/explain.xml \ conf/oai2dc.xsl \ conf/oai2index.xsl \ conf/oai2zebra.xsl \ conf/yazserver.xml \ conf/zebra.cfg oaidatadata_DATA = data/debug-record.xml \ data/debug-utf8-record.xml \ data/fetch_OAI_data.sh \ data/oai-caltech.xml EXTRA_DIST = $(oaidata_DATA) $(oaiconfdata_DATA) $(oaidatadata_DATA) conf/cql2pqf.txt: conf/explain2cqlpqftxt.xsl conf/explain.xml xsltproc conf/explain2cqlpqftxt.xsl conf/explain.xml > conf/cql2pqf.txt clean: rm -f tmp/*.mf tmp/*..LCK zebrasrv.pid idzebra-2.0.44/examples/oai-pmh/conf/0000755000175000017500000000000011412336535014322 500000000000000idzebra-2.0.44/examples/oai-pmh/conf/explain.xml0000644000175000017500000002566011412332551016427 00000000000000 localhost 9999 Default OAI record SRU/SRW/Z39.50 server OAI harvested article and preprint metadata records Marc Cromme, © Index Data Aps, http://www.indexdata.dk Marc Cromme, marc(at)indexdata(dot)com Part of the open source Zebra information retrieval database example configurations, see http://www.indexdata.com/zebra Index Data YAZ/ZEBRA http://www.indexdata.dk/zebra http://localhost:9999 http://localhost:9999 http://localhost:9999 CQL Standard Set Record Standard Set Open Archive Metadata Set Dublin Core Set CQL Server Choice serverChoice any CQL All all any Record ID id oai_identifier 3 OAI Identifier identifier oai_identifier 3 OAI Datestamp date oai_datestamp 3 OAI Set Specification set oai_setspec 3 DC Title title dc_title DC Creator creator dc_creator DC Subject subject dc_subject DC Description description dc_description DC Publisher publisher dc_publisher DC Contributor contributor dc_contributor DC Date date dc_date 3 DC Format format 3 DC Identifier identifier dc_identifier 3 DC Source source dc_source 3 DC Language language dc_language DC Relation relation dc_relation 3 DC Source source dc_source 3 DC Rights rights dc_rights Dublin Core Open Archives Initiative Zebra Meta cql all = < <= = >= > relevant phrase * ? 0 oai xml 20 0 idzebra-2.0.44/examples/oai-pmh/conf/oai2index.xsl0000644000175000017500000001111111412332551016641 00000000000000 idzebra-2.0.44/examples/oai-pmh/conf/explain2cqlpqftxt.xsl0000644000175000017500000001627711412332551020472 00000000000000 # Propeties file to drive org.z3950.zing.cql.CQLNode's toPQF() # back-end and the YAZ CQL-to-PQF converter. This specifies the # interpretation of various CQL indexes, relations, etc. in terms # of Type-1 query attributes. # # This file is created from a valid ZeeRex Explain XML record using the # XSLT transformation 'explain2cqlpqftxt.xsl' # # xsltproc explain2cqlpqf.xsl explain.xml # Title: # Set info # Default set set = set. = # Index info index. . = = # Relation info relation.< = 2=1 relation.le = 2=2 relation.eq = 2=3 relation.eq = 2=3 relation.exact = 2=3 relation.ge = 2=4 relation.> = 2=5 relation.<> = 2=6 relation.all = 2=3 relation.any = 2=3 # Default Relation relation.scr = 2=3 # RelationModifier info relationModifier.relevant = 2=102 relationModifier.fuzzy = 2=100 relationModifier.stem = 2=101 relationModifier.phonetic = 2=100 relationModifier.phrase = 6=3 # Position attributes position.first = 3=1 6=1 position.any = 3=3 6=1 position.last = 3=4 6=1 position.firstAndLast = 3=3 6=3 # Structure attributes may be specified for individual relations; a # default structure attribute my be specified by the pseudo-relation # "*", to be used whenever a relation not listed here occurs. # structure.exact = 4=108 structure.all = 4=2 structure.any = 4=2 structure.* = 4=1 structure.eq = 4=3 # Truncation attributes used to implement CQL wildcard patterns. The # simpler forms, left, right- and both-truncation will be used for the # simplest patterns, so that we produce PQF queries that conform more # closely to the Bath Profile. However, when a more complex pattern # such as "foo*bar" is used, we fall back on Z39.58-style masking. # truncation.right = 5=1 truncation.left = 5=2 truncation.both = 5=3 truncation.none = 5=100 truncation.z3958 = 5=104 # Finally, any additional attributes that should always be included # with each term can be specified in the "always" property. # # always = 6=1 # 6=1: completeness = incomplete subfield idzebra-2.0.44/examples/oai-pmh/conf/oai2zebra.xsl0000644000175000017500000000211411412332551016640 00000000000000 idzebra-2.0.44/examples/oai-pmh/conf/dom-conf.xml0000644000175000017500000000102611412332551016457 00000000000000 idzebra-2.0.44/examples/oai-pmh/conf/oai2dc.xsl0000644000175000017500000000474211412332551016134 00000000000000 idzebra-2.0.44/examples/oai-pmh/conf/zebra.cfg0000644000175000017500000000162611412332551016025 00000000000000# Zebra configuration file for Alvis XSLT filter setup including # SRU/SRW Webservice setup and CQL-to-PQF configuration # # # profilePath - where to look for config files profilePath: .:../../tab:/usr/share/idzebra-2.0/tab # modulePath - where to look for loadable zebra modules modulePath: ../../index/.libs:/usr/lib/idzebra-2.0/modules # store records and record keys internally storeData: 1 storeKeys: 1 # use the DOM XML filter with config file dom-conf.xml recordtype: dom.conf/dom-conf.xml # where to put registers, and other var content, and how large they may be register: tmp:10G shadow: tmp:10G lockdir: tmp keytmpdir: tmp # enable pre-sorting of hit lists according to static rank #staticrank: 1 # use rank sorting filter #rank: rank1 # add extended services - global access #perm.anonymous: rw # add extended services - login/password #perm.anonymous: r #perm.admin: rw #passwd: passwordfile idzebra-2.0.44/examples/oai-pmh/conf/cql2pqf.txt0000644000175000017500000000600611412333551016350 00000000000000 # Propeties file to drive org.z3950.zing.cql.CQLNode's toPQF() # back-end and the YAZ CQL-to-PQF converter. This specifies the # interpretation of various CQL indexes, relations, etc. in terms # of Type-1 query attributes. # # This file is created from a valid ZeeRex Explain XML record using the # XSLT transformation 'explain2cqlpqftxt.xsl' # # xsltproc explain2cqlpqf.xsl explain.xml # Title: OAI record SRU/SRW/Z39.50 server # Set info # Default set set = info:srw/cql-context-set/1/cql-v1.1 set.cql = info:srw/cql-context-set/1/cql-v1.1 set.rec = info:srw/cql-context-set/2/rec-1.0 set.oai = info:srw/cql-context-set/1/oai-v1.1 set.dc = info:srw/cql-context-set/1/dc-v1.1 # Index info index.cql.serverChoice = 1=any index.cql.all = 1=any index.rec.id = 1=oai_identifier 4=3 index.oai.identifier = 1=oai_identifier 4=3 index.oai.date = 1=oai_datestamp 4=3 index.oai.set = 1=oai_setspec 4=3 index.dc.title = 1=dc_title index.dc.creator = 1=dc_creator index.dc.subject = 1=dc_subject index.dc.description = 1=dc_description index.dc.publisher = 1=dc_publisher index.dc.contributor = 1=dc_contributor index.dc.date = 1=dc_date 4=3 index.dc.format = 1= 4=3 index.dc.identifier = 1=dc_identifier 4=3 index.dc.source = 1=dc_source 4=3 index.dc.language = 1=dc_language index.dc.relation = 1=dc_relation 4=3 index.dc.source = 1=dc_source 4=3 index.dc.rights = 1=dc_rights # Relation info relation.< = 2=1 relation.eq = 2=3 relation.> = 2=5 # Default Relation relation.scr = 2=3 # RelationModifier info relationModifier.relevant = 2=102 relationModifier.phrase = 6=3 # Position attributes position.first = 3=1 6=1 position.any = 3=3 6=1 position.last = 3=4 6=1 position.firstAndLast = 3=3 6=3 # Structure attributes may be specified for individual relations; a # default structure attribute my be specified by the pseudo-relation # "*", to be used whenever a relation not listed here occurs. # structure.exact = 4=108 structure.all = 4=2 structure.any = 4=2 structure.* = 4=1 structure.eq = 4=3 # Truncation attributes used to implement CQL wildcard patterns. The # simpler forms, left, right- and both-truncation will be used for the # simplest patterns, so that we produce PQF queries that conform more # closely to the Bath Profile. However, when a more complex pattern # such as "foo*bar" is used, we fall back on Z39.58-style masking. # truncation.right = 5=1 truncation.left = 5=2 truncation.both = 5=3 truncation.none = 5=100 truncation.z3958 = 5=104 # Finally, any additional attributes that should always be included # with each term can be specified in the "always" property. # # always = 6=1 # 6=1: completeness = incomplete subfield idzebra-2.0.44/examples/oai-pmh/conf/yazserver.xml0000644000175000017500000000234011412332551017007 00000000000000 tcp:@:9999 ./ conf/zebra.cfg conf/cql2pqf.txt localhost 9999 Default idzebra-2.0.44/examples/oai-pmh/data/0000755000175000017500000000000011412336535014306 500000000000000idzebra-2.0.44/examples/oai-pmh/data/fetch_OAI_data.sh0000755000175000017500000004464711412332551017350 00000000000000 #!/bin/bash OAI_LIST_RECORDS='?verb=ListRecords&metadataPrefix=oai_dc' BASE_OAI_URLS="\ http://cs1.ist.psu.edu/cgi-bin/oai.cgi \ http://dspace.udc.es/dspace-oai/request \ http://eprints.upc.es:8080/revistes-oai/request \ http://dalea.du.se/oai/ \ http://dspace.stir.ac.uk/dspace-oai/request \ http://oai.lib.msu.edu/OAIHandler \ http://deneb.hacer.ula.ve/cgi-win/be_oai.exe \ http://sdeir.uqac.ca/metadata/oai.asp \ http://oai.ethz.ch/oai.asp \ http://eprints.c3sl.ufpr.br/perl/oai2 \ http://earth.cs.utk.edu/OAI/test/oai.pl \ http://www.tdx.cesca.es/TDX_UIB/NDLTD-OAI/oai.pl \ http://www.mundus.ac.uk/cgi-bin/oai/OAI2.0 \ http://wo.uio.no/as/WebObjects/theses.woa/wa/oai \ http://fred.ccsu.edu:8000/perl/oai2 \ http://opus.ub.uni-bayreuth.de/oai/oai2.php \ http://kpbc.umk.pl/dlibra/oai-pmh-repository.xml \ http://www.6journal.org/perl/oai2 \ http://magpie.lboro.ac.uk:8080/dspace-oai/request \ http://srb2.bib.iteso.mx/coneicc/oai.aspx \ http://www.opus-bayern.de/uni-passau/oai/oai2.php \ http://oai-dp.bdaweb.net:8080/bda/OpenArchives/oai_servlet \ http://oai.persee.fr/oai.do \ http://caltechlib.library.caltech.edu/perl/oai2 \ http://www.bsz-bw.de/cgi-bin/oai20_send.pl \ http://etheses.nottingham.ac.uk/perl/oai2 \ http://elib.suub.uni-bremen.de/cgi-bin/oai2 \ http://alcme.oclc.org/xtcat/servlet/OAIHandler \ http://nainfo.nbs.bg.ac.yu/doiserboai/oai2.aspx \ http://www.physik-multimedial.de/OAI/phpoai2-1.5/oai2.php \ http://vts.uni-ulm.de/oai/oai.asp \ http://bnarchives.yorku.ca/perl/oai2 \ http://digitalcommons.stevens.edu/cgi/oai2.cgi \ http://www.dipp.nrw.de/repository/oai \ http://www.fontyspublicaties.nl/oai/pub.fontys.nl.cgi \ http://edoc.ub.uni-muenchen.de/perl/oai2 \ http://edoc.hu-berlin.de/OAI-2.0 \ http://diglib.lib.auburn.edu/cgi-bin/OAI-XMLFile/XMLFile/auburn/oai.pl \ http://infomine.ucr.edu/cgi-bin/OAI-PMH-server \ http://laica.science.unitn.it:8080/netbib/oai2/oai2.php \ http://www.genlit.org/agr/oai/ \ http://eprints.lib.hokudai.ac.jp/dspace-oai/request \ http://eprints.upc.es/oai_sbd/oai2_pfcs.php \ http://www.ucm.es/eprints/perl/oai2 \ http://www.opus-bayern.de/bib-info/oai/oai2.php \ http://gutenberg.dcs.fi.uva.es:8080/OAI_UVA/Oai_incunables \ http://www.diva-portal.org/oai/OAI \ http://dialnet.unirioja.es/oai/OAIHandler \ http://www.refer.nhs.uk/oai-pmh/oai-pmh.asp \ http://ict.udlap.mx:9090/Tales/Oai_tesis \ http://jeanNicod.ccsd.cnrs.fr/perl/oai20 \ http://www.theses.ulaval.ca:8080/oaicat/servlet/OAIHandler \ http://www.perseus.tufts.edu/cgi-bin/pdataprov \ http://researchspace.auckland.ac.nz/cgi/oai2.cgi \ http://dlibra.psnc.pl/biblioteka/oai-pmh-repository.xml \ http://dare.uva.nl/cgi/arno/oai/uvapub \ http://www.ifeanet.org/phpoai2-1.5/php_oai/oai2.php \ http://diobma.udg.es:8080/dspace-oai/request \ http://www.zas.gwz-berlin.de/cgi-bin/XMLFile/XMLFile/ZASPIL/oai.pl \ http://cache.libr.tue.nl:1972/csp/dare/DARE.Repository.cls \ http://epublish.utdallas.edu/cgi/oai2.cgi \ http://www.entomotropica.org/ojs/oai/ \ http://kb.osu.edu/dspace-oai/request \ http://kups.ub.uni-koeln.de/phpoai/oai2.php \ http://eprints.soas.ac.uk/perl/oai2 \ http://ws.pangaea.de/oai/ \ http://biblioteca.unisabana.edu.co/tesis/oai.php \ http://oai.english-heritage.org.uk/oai.asp \ http://www.infomotions.com/gallery/oai/index.pl \ http://uther.dlib.vt.edu:8080/oaicat/servlet/OAIHandler \ http://nsdl.sdsc.edu/oai-server/oai.cgi \ http://oai.repec.openlib.org \ http://dspace.ubib.eur.nl/oai/ \ http://www.wbc.poznan.pl/dlibra/oai-pmh-repository.xml \ http://sunsite2.berkeley.edu:8088/oaicat/OAIHandler \ http://publica.fraunhofer.de/oai.har \ http://vle.bromley.ac.uk/dspace-oai/request \ http://darchive.mblwhoilibrary.org/dspace-oai/request \ http://deepblue.lib.umich.edu/dspace-oai/request \ http://joypub.joensuu.fi/OAI/ \ http://dl.comp.nus.edu.sg/dspace-oai/request \ http://content.lib.utah.edu/cgi-bin/oai.exe \ http://eprints.erpanet.org/perl/oai2 \ http://epubs.cclrc.ac.uk/oai \ http://caltechkhr.library.caltech.edu/perl/oai2 \ http://espace.lis.curtin.edu.au/perl/oai2 \ http://rib.cs.utk.edu/OAI/test/oai.pl \ http://sammelpunkt.philo.at:8080/perl/oai2 \ http://services.nsdl.org:8080/nsdloai/OAI \ http://docu.gdl.iteso.mx/ccdoc/oai.aspx \ http://bfp.sp.unipi.it/hj/oaiServer.php \ http://miless.uni-duisburg-essen.de/servlets/OAIDataProvider \ http://eprints.stoa.it/perl/oai2 \ http://dspace.c3sl.ufpr.br/dspace-oai/request \ http://eprints.fri.uni-lj.si/perl/oai2 \ http://dspace.msh-alpes.prd.fr/oai/ \ http://eiop.or.at/cgi-bin/oaiserv.pl \ http://memsic.ccsd.cnrs.fr/perl/oai2 \ http://eprints.anu.edu.au/perl/oai2 \ http://oai.sunsite.utk.edu/cgi-bin/oai2.cgi \ http://eprints.dcu.ie/perl/oai2 \ http://ju.nii.ac.jp/cgi-bin/oai/oai2.0 \ http://etd.library.pitt.edu/ETD-db/NDLTD-OAI2/oai.pl \ http://mssa.library.yale.edu/madid/oai/oai2.php \ http://boundless.uoregon.edu/cgi-bin/oai.exe \ http://mdz1.bib-bvb.de/~db/OAI/oai2.php \ http://dspace.hsl.washington.edu/dspace-oai/request \ http://iesr.ac.uk/service/iesroai \ http://purl.oclc.org/NET/ugent/lib/srepod/oai.ask23.de/static/ask23-oai.xml \ http://digitalcommons.uconn.edu/cgi/oai2.cgi \ http://eprints.rhul.ac.uk/perl/oai2 \ http://libeprints.open.ac.uk/perl/oai2 \ http://txspace.tamu.edu/dspace-oai/request \ http://caltechgalcitfm.library.caltech.edu/perl/oai2 \ http://www.mpi.nl/IMDI/OAI-IMDI/2.0/imdi_oai2.pl \ http://eprint.monash.edu.au/perl/oai2 \ http://ndad.ulcc.ac.uk/cgi-bin/oai/OAI2.0 \ http://miami.uni-muenster.de/servlets/OAIDataProvider \ http://archiveSIC.ccsd.cnrs.fr/perl/oai20 \ http://www.dlese.org/oai/provider \ http://dlc.dlib.indiana.edu/perl/oai2 \ http://vifaphys.tib.uni-hannover.de/oai/oai2.php \ http://eprints.rclis.org/perl/oai2 \ http://digitalcommons.lib.ttu.edu/cgi/oai2.cgi \ http://oai.usc.edu:8085/oaidp \ http://w3.avignon.inra.fr/dspace-oai/request \ http://dspace.wesleyan.edu/dspace-oai/request \ http://oai.revues.org/20/ \ http://oai.co.allenpress.com/oai/biooneonline \ http://caltecheerl.library.caltech.edu/perl/oai2 \ http://oralhistories.library.caltech.edu/perl/oai2 \ http://www.tucs.fi/publications/oai/oai.php \ http://cogprints.ecs.soton.ac.uk/perl/oai2 \ http://iris.sid.inpe.br:1905/col/iconet.com.br/banon/2003/11.21.21.08/doc/oai.cgi \ http://etext.library.adelaide.edu.au/cgi-bin/OAI-lite.pl \ http://bibmed.ucla.edu.ve/cgi-win/be_oai.exe \ http://www.cs.dal.ca:8088/perl/oai2 \ http://www.bopcris.ac.uk/cgi-bin/OAI-XMLFile-2.1/XMLFile/eppi/oai.pl \ http://www.hsdvl.org/oai/oai2.php \ http://www.lis.upatras.gr/ebge/oai2/oai2.php \ http://mitizane.ll.chiba-u.jp/cgi-bin/oai/oai2.0 \ http://epubs.scu.edu.au/cgi/oai2.cgi \ http://dspace.mclibrary.duke.edu/dspace-oai/request \ http://mdz1.bib-bvb.de/~db/OAI-DigitaleSammlungen/oai2.php \ http://purl.oclc.org/NET/ugent/lib/srepod/www.progettocaere.rm.cnr.it/databasegestione/A_C_oai_Archive.xml \ http://lsr.nellco.org/cgi/oai2.cgi \ http://www.jelit.org/perl/oai2 \ http://caltechcdstr.library.caltech.edu/perl/oai2 \ http://opus.kobv.de/ubp/phpoai/oai2.php \ http://web.awi-bremerhaven.de/fedora/oai \ http://dc-app2.gfz-potsdam.de/oai.php \ http://eprints.vu.edu.au/perl/oai2 \ http://ritdml.rit.edu/dspace-oai/request \ http://arno.uvt.nl/oai/wo.uvt.nl.cgi \ http://eprints.iisc.ernet.in/perl/oai2 \ http://drum.umd.edu/oai \ http://eprints.ime.usp.br/perl/oai2 \ http://caltechbook.library.caltech.edu/perl/oai2 \ http://psydok.sulb.uni-saarland.de/phpoai/oai2.php \ http://nal-ir.nal.res.in/perl/oai2 \ http://eaces.liuc.it/oai/default.asp \ http://dspace.dsto.defence.gov.au/dspace-oai/request \ http://www.meind.de/oai2d.py/ \ http://repository.upenn.edu/cgi/oai2.cgi \ http://authors.library.caltech.edu/perl/oai2 \ http://sunzi.lib.hku.hk/cgi-bin/OAI/hkuto.pl \ http://jsnc.library.caltech.edu/perl/oai2 \ http://caltechcstr.library.caltech.edu/perl/oai2 \ http://eprints.ucl.ac.uk/perl/oai2 \ http://repositories.cdlib.org/cgi/oai2.cgi \ http://www.infomotions.com/musings/oai/index.pl \ http://resgenchem15.chem.wisc.edu/spt/SPT--OAI.php \ http://www.aedhe.org/oai/oai2.asp \ http://dare.uva.nl/cgi/arno/oai/aup \ http://animaldiversity.ummz.umich.edu/local/oai/do \ http://www.lbd.dcc.ufmg.br/cgi-bin/bdbcomp/oai2/oai.pl \ http://www.jiia.it/Library/oai/ \ http://archiv.ub.uni-marburg.de/oai/oai2.php \ http://www.ajol.info/oai/ \ http://oaidp.library.wisc.edu/oaicat/OAIHandler \ http://sherpa.leeds.ac.uk/perl/oai2 \ http://diglib.lib.utk.edu/oai/oai20.php \ http://iubio.bio.indiana.edu:7780/perl/oai2 \ http://www.forex.uni-bremen.de/cgi-bin/oai2 \ http://memory.loc.gov/cgi-bin/oai2_0 \ http://www.complexityscience.net/perl/oai2 \ http://orgprints.org/perl/oai2 \ http://pcpgw.ensta.fr/perl/oai2 \ http://tel.ccsd.cnrs.fr/perl/oai20 \ http://ub-www2.uni-duisburg.de:8080/cgi-oai2/2/OAI-XMLFile-2.1/XMLFile/DuetT/oai.pl \ http://hbllmedia.lib.byu.edu/test/PhpOai2/oai/oai2.php \ http://dare.uva.nl/cgi/arno/oai/imiscoe \ http://www.tdr.cesca.es/TDR_UM/NDLTD-OAI/oai.pl \ http://eprints.ru.ac.za/perl/oai2 \ http://jenghung.twbbs.org/ETD-db/etddb/oai.pl \ http://oai.enc.sorbonne.fr/oai2.php \ http://www6.nau.edu/library/oai/OAI.cfm \ http://www.ifremer.fr/docelec/oai/OAIHandler \ http://digitalcommons.simmons.edu/cgi/oai2.cgi \ http://openmed.nic.in/perl/oai2 \ http://geb.uni-giessen.de/geb/oai/oai2.php \ http://www.opus-bayern.de/uni-regensburg/oai/oai2.php \ http://papadocs-oai.dsi.uminho.pt:8080/request \ http://cgi.vtt.fi/progs/inf/balticOAI \ http://www.bopcris.ac.uk/cgi-bin/OAI-XMLFile-2.1/XMLFile/parl18c/oai.pl \ http://kmoddl.library.cornell.edu/oai/oai2.php \ http://ethesis.inp-toulouse.fr/perl/oai2 \ http://www.kup.at/cgi-bin/OAI/XMLFile/kup/oai.pl \ http://eprints.ouls.ox.ac.uk/perl/oai2 \ http://www.language-archives.org/cgi-bin/olaca3.pl \ http://physnet.uni-oldenburg.de/oai/oai2.php \ http://bieson.ub.uni-bielefeld.de/phpoai/oai2.php \ http://cdsweb.cern.ch/oai \ http://www.tdx.cesca.es/TDX_UJI/NDLTD-OAI/oai.pl \ http://submit.library.lt/ETD-db/NDLTD-OAI/oai.pl \ http://www.tdx.cesca.es/TDX_UdG/NDLTD-OAI/oai.pl \ http://phy043.tours.inra.fr:8080/perl/oai2 \ http://eprints.univ-lyon2.fr:8050/perl/oai2 \ http://dspace.cityu.edu.hk/dspace-oai/request \ http://digibib.ub.uni-giessen.de/cgi-bin/populo/oai-pap.cgi \ http://nsdl.lon-capa.org/cgi-bin/OAI-XMLFile/XMLFile/nsdlexport/oai.pl \ http://tampub.uta.fi/oaister/oai2.php \ http://www.bibliovault.org/perl/oai2 \ http://etd.ncsi.iisc.ernet.in/dspace-oai/request \ http://oai.alejandria.biz/cgi-win/be_oai.exe \ http://doks.khk.be/eindwerk/oai \ http://biblio-eprints.bo.cnr.it/perl/oai2 \ http://eprints.comp.utas.edu.au:81/perl/oai2 \ http://www.conoze.com/interfaz/oai/20/ \ http://servdoc.jp.cnrs.fr/perl/oai2 \ http://etd-submit.etsu.edu/ETD-db/OAI/oai.pl \ http://oai.ibict.br/oai/mypoai/oai2.php \ http://pastel.paristech.org/perl/oai2 \ http://bolder.grainger.uiuc.edu/uiLibOAIProvider/2.0/oai.asp \ http://www.tdx.cesca.es/TDX_UB/NDLTD-OAI/oai.pl \ http://repository.wrclib.noaa.gov/cgi/oai2.cgi \ http://escholar.humboldt.edu:8080/dspace-oai/request \ http://www.tdr.cesca.es/TDR_UC/NDLTD-OAI/oai.pl \ http://www.epress.ac.uk/phpoai2/oai2.php \ http://digitalcommons.carleton.edu/cgi/oai2.cgi \ http://content.test.denison.edu/cgi-bin/oai.exe \ http://www.epa.gov/cgi-bin/oai_ntsd \ http://theses.lub.lu.se/oai-service/xerxes/ \ http://www.ibiblio.org/collection/oai/ \ http://thesis.haverford.edu/perl/oai2 \ http://eprints.ecs.soton.ac.uk/perl/oai2 \ http://www.hti.umich.edu/cgi/b/broker20/broker20 \ http://eprints.presidentekennedy.br:9000/perl/oai2 \ http://www.ubka.uni-karlsruhe.de/oai/eva/oai2.php \ http://vphill.com/photodatabase/oai/oai2.php \ http://scholarsbank.uoregon.edu/dspace-oai/ \ http://www.zas.gwz-berlin.de//cgi-bin/XMLFile/XMLFile/ZASPIL/oai.pl \ http://libtextcenter.unl.edu:2000/cgi-bin/oai.exe \ http://infoscience.epfl.ch/oai2d.py/ \ http://digitalcommons.pace.edu/cgi/oai2.cgi \ http://jdc.jefferson.edu/cgi/oai2.cgi \ http://cav2001.library.caltech.edu/perl/oai2 \ http://theses.lub.lu.se/oai-service/scripta/ \ http://epub.wu-wien.ac.at/dyn/OAI/oaicgi.pl \ http://diglib.cib.unibo.it/oai/oai2.php \ http://docinsa.insa-lyon.fr/oai/oai2.php \ http://cgsc.cdmhost.com/cgi-bin/oai.exe \ http://www.gsi.de/home/harvest/oai2.php \ http://etd.adm.unipi.it/ETD-db/NDLTD-OAI/oai.pl \ http://eprints.kcl.ac.uk/perl/oai2 \ http://www.opus-bayern.de/fh-regensburg/oai/oai2.php \ http://hsss.slub-dresden.de/oai/OAI-2.0 \ http://cds.lib.auth.gr/cgi-bin/cds/oai2d \ http://archiv.tu-chemnitz.de/cgi-bin/interfaces/oai/oai2.pl \ http://www.biomedcentral.com/oai/2.0/ \ http://www.aim25.ac.uk/cgi-bin/oai/OAI2.0 \ http://www.infomotions.com/alex/oai/index.pl \ http://archiveseiah.univ-lemans.fr/perl/oai2 \ http://ProjectEuclid.org/Dienst \ http://www.ubka.uni-karlsruhe.de/oai/gap-c/oai2.php \ http://ir.library.oregonstate.edu/dspace-oai/request \ http://www.idrc.ca/OAI/ \ http://www.lib.utexas.edu/oai/oai2.php \ http://rose.bris.ac.uk/dspace-oai/request \ http://www.asdlib.org/oai/oai.php \ http://eot2003.ncsa.uiuc.edu/oai2.php \ http://caltechparadise.library.caltech.edu/perl/oai2 \ http://cacr.library.caltech.edu/perl/oai2 \ http://cgi.vtt.fi/progs/inf/OAI \ http://www.tdx.cesca.es/TDX_UV/NDLTD-OAI/oai.pl \ http://infsearch.cs.cmu.edu/cgi-bin/oai.pl \ http://www.tdx.cesca.es/TDX_URV/NDLTD-OAI/oai.pl \ http://digital.library.pitt.edu/cgi-bin/b/broker20/broker20 \ http://dlib.bg.pwr.wroc.pl/dlibra/oai-pmh-repository.xml \ http://www.opus-bayern.de/ku-eichstaett/oai/oai2.php \ http://kramerius.nkp.cz/kramerius/oai \ http://kuscholarworks.ku.edu/dspace-oai/request \ http://dare.uva.nl/cgi/arno/oai/uvadis \ http://publica.fraunhofer.de/eprints.har \ http://www.tdx.cesca.es/TDX_URL/NDLTD-OAI/oai.pl \ http://doks.kdg.be/oai \ http://caltechlessgs.library.caltech.edu/perl/oai2 \ http://www.tdx.cesca.es/TDX_UPF/NDLTD-OAI/oai.pl \ http://oai.dlib.indiana.edu/phpoai/oai2.php \ http://eprints.nottingham.ac.uk/perl/oai2 \ http://digital.library.upenn.edu/webbin/OAI-celebration \ http://digitalcommons.massey.ac.nz/cgi/oai2.cgi \ http://www.invenia.es/oai/oai2.asp \ http://dspace.ncl.res.in/dspace-oai/request \ http://gutenberg.dcs.fi.uva.es:8080/uvaoai/proveedor \ http://digitalcommons.utep.edu/cgi/oai2.cgi \ http://www.bioline.org.br/oai \ http://oai.uni-tuebingen.de/OAIServer/oai2.aspx \ http://www.tdx.cesca.es/TDX_UPC/NDLTD-OAI/oai.pl \ http://www.nla.gov.au/apps/oaicat/servlet/OAIHandler \ http://eprints.gla.ac.uk/perl/oai2 \ http://eprints.unimelb.edu.au/perl/oai2 \ http://eprints.ens-lsh.fr/perl/oai2 \ http://digitalcommons.providence.edu/cgi/oai2.cgi \ http://archives.univ-lyon2.fr/perl/oai2 \ http://rogue.ncl.ac.uk/xml/index.php \ http://eprints.bbk.ac.uk/perl/oai2 \ http://bibcyt.ucla.edu.ve/cgi-win/be_oai.exe \ http://padis.uniroma1.it/oai2d.py/ \ http://edoc.tkk.fi/oai/oai2.php \ http://lu-research.lub.lu.se/php/oai.php \ http://www.tdx.cesca.es/TDX_UdL/NDLTD-OAI/oai.pl \ http://eldorado.uni-dortmund.de:8080/rootcollection/cgi/oai2 \ http://tech-team-help.cwru.edu/oai/ \ http://helindigitalcommons.org/cgi/oai2.cgi \ http://digitalcommons.uncfsu.edu/cgi/oai2.cgi \ http://petroleumjournalsonline.com/journals/index.php/index/oai/ \ http://papyrus.bib.umontreal.ca/dspace-oai/request \ http://www.opus-bayern.de/uni-augsburg/oai/oai2.php \ http://digitalcommons.dickinson.edu/cgi/oai2.cgi \ http://oai-dienst.uni-oldenburg.de/oai2/oai2.php \ http://broker10.fcla.edu/cgi/b/broker20/broker20 \ http://publications.u-paris10.fr/perl/oai2 \ http://www.tdx.cesca.es/TDX_UAB/NDLTD-OAI/oai.pl \ http://hw.oeaw.ac.at/oai \ http://docs.lib.purdue.edu/cgi/oai2.cgi \ http://biblioteca.fagro.edu.uy/cgi-bin/gateway/gateway.cgi/biblioteca.fagro.edu.uy/gateway/agro110.xml \ http://nainfo.nbs.bg.ac.yu/sfoa/oa/oai2.php \ http://magpie.lboro.ac.uk/dspace-oai/request \ http://zitmac05.gkss.de/fmi/xsl/oai/oai.xsl \ http://oai.ub.rub.de/oai/oai2.php \ http://arno.uvt.nl/oai/scr.uvt.nl.cgi \ http://dspace.c3sl.ufpr.br/dspace-oai/ \ http://hal.ccsd.cnrs.fr/oai/oai.php \ http://www.open-video.org/oai2.0/ \ http://ecommons.txstate.edu/cgi/oai2.cgi \ http://ro.uow.edu.au/cgi/oai2.cgi \ http://acta.uta.fi/harvest/oai.phtml \ http://www.opus-bayern.de/fh-wue-sw/oai/oai2.php \ http://demeter.univ-lyon2.fr:8080/sdx/sdx/oai/theses/documents \ http://www.ecologyandsociety.org/oai/ \ http://www.crcstudio.arts.ualberta.ca/streetprint/XML/oai/ \ http://www.lis.upatras.gr/kosmopolis/oai2/oai2.php \ http://pkp.ubc.ca/harvester/oai/ \ http://dspace.lib.rochester.edu/oai/request \ http://www.bopcris.ac.uk/cgi-bin/OAI-XMLFile-2.1/XMLFile/bopcris/oai.pl \ http://dspace.nitrkl.ac.in:8080/dspace-oai/request \ http://vitrina.bibliotecachiapas.gob.mx/cgi/oai2.cgi \ http://dspace.nitrkl.ac.in/dspace-oai/request \ http://digitalcommons.library.tmc.edu/cgi/oai2.cgi \ http://dspace.wul.waseda.ac.jp/dspace-oai/request \ http://digitalcommons.middlebury.edu/cgi/oai2.cgi \ http://www.lib.drake.edu:8080/dspace-oai/request \ http://dspace.mit.edu/oai/request \ http://www.enc.org/oai/2.0/default.pl \ http://philsci-archive.pitt.edu/perl/oai2 \ http://aei.pitt.edu/perl/oai2 \ http://lacito.archivage.vjf.cnrs.fr/servlet/metadata \ http://images.indianahistory.org/cgi-bin/oai.exe \ http://epub.ub.uni-muenchen.de/perl/oai2 \ http://diss-epsilon.slu.se/perl/oai2 \ http://srb2.bib.iteso.mx/oai/fxc/default.aspx \ http://www.hb.fh-muenster.de/opus/fhms/phpoai/oai2.php \ http://doc.rero.ch/oai2d.py/ \ http://digitalcommons.ilr.cornell.edu/cgi/oai2.cgi \ http://escholarship.bc.edu/cgi/oai2.cgi \ http://www.cybertesis.cl:8080/sdx/sdx/oai/uchile/documents \ http://eprints.biblio.unitn.it/perl/oai2 \ http://dispute.library.uu.nl/cgi-bin/oai.pl \ http://docu.gdl.iteso.mx/oai/default.aspx \ http://techreports.larc.nasa.gov/ltrs/oai2.0/ \ http://diglib.lib.utk.edu/cgi/b/broker20/broker20 \ http://naca.larc.nasa.gov/oai2.0/ \ http://hpds1.mit.edu/oai/ \ http://eprints.cf.ac.uk/perl/oai2 \ http://ubopenac.ub.uni-bielefeld.de/diglib/phpoai/oai2.php \ http://zbc.uz.zgora.pl/dlibra/oai-pmh-repository.xml \ http://dspace.lib.iup.edu:8080/dspace-oai/request \ http://epubs.surrey.ac.uk/cgi/oai2.cgi \ http://edoc.bibliothek.uni-halle.de/servlets/MCROAIDataProvider \ http://dspace.hrz.uni-dortmund.de:8080/dspace-oai/request \ http://bibciv.ucla.edu.ve/cgi-win/be_oai.exe \ http://repository.libis.kuleuven.be/dspace-oai/request \ http://digitalcommons.trinity.edu/cgi/oai2.cgi \ http://smartech.gatech.edu:8282/dspace-oai/request \ http://libserv12.Princeton.EDU/oai/oai.pl \ http://www.tdx.cesca.es/TDX_UOC/NDLTD-OAI/oai.pl \ http://arXiv.org/oai2 \ http://www.pubmedcentral.gov/oai/oai.cgi \ http://dataprovider.ibict.br/mypoai/oai2.php \ http://quod.lib.umich.edu/cgi/o/oai/oai" for BASE_OAI_URL in $BASE_OAI_URLS ; do echo $BASE_OAI_URL wget --tries=2 --dns-timeout=10 --connect-timeout=10 --read-timeout=120 $BASE_OAI_URL$OAI_LIST_RECORDS ; done idzebra-2.0.44/examples/oai-pmh/data/oai-caltech.xml0000644000175000017500000066315411412332551017132 00000000000000 2005-12-20T08:40:20Z http://caltechcstr.library.caltech.edu/perl/oai2
oai:caltechcstr.library.caltech.edu:4 2003-12-12 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
A Language Processor and a Sample Language Ayres, Ronald All Records This thesis explores shared data in list structures and ambiguity in language processing. Tolerance of ambiguity is necessary to support clear and modular expression. Data sharing is necessary to support ambiguity efficiently. Data sharing is useful also in compiled programs to save memory and time. Let us define some terms. A rewrite grammar is a set of replacement rules each of which specifies that a given phrase may be replaced by another given phrase. Each replacement rule expresses a local translation. A parser finds those sequences of replacements that bring a given text to a machine handleable form. Each such sequence represents a meaning or interpretation for the given text. Tolerance of ambiguity or multiple interpretations for a given text is necessary so that subsequent processing can place further constraints upon the input text. This thesis presents a parser which efficiently, handles general-rewrite grammars. To conserve computer time and memory, only essential differences among multiple interpretations are represented and processed. If several interpretations for a given text are valid, the parser yields a meaning which represents the ambiguity as, locally as possible. Even an exponential number of distinct meanings may be represented in a polynomial amount of memory. This thesis also presents a language processing system which supports semantic processing via independent rewrite grammars. Each grammar represents a distinct aspect of the language. A given sequence of grammars becomes a sequence of passes, or process steps. Each pass derives a meaning with respect to one grammar and uses that meaning to generate phrases which will be interpreted by the next pass. Although linguistic specification is usually done with context-free grammars, features of this parser which support general-rewrite grammars are essential for the integration of passes. Not only ambiguity, but also the locality of ambiguity is preserved from one pass to the next. It is necessary to preserve locality of ambiguity in order to avoid explosive computation arising from useless action among independent sets of interpretations. I have implemented a general-purpose programming language called ICL with this system. The fact that ICL's datatypes are processed by a rewrite grammar makes it simple to implement both user-defined datatype coercions and functions known as polymorphic operators whose definitions depend on parameter datatypes. Datatype coercions and Polymorphic operators reduce the amount,of specification required in algorithms to such an extent that a user can often modify declarations and achieve optimizations and changes in concept without modifying his algorithmic specification. ICL includes a simple and safe policy about pointers so that the user can ignore their existence completely if he wishes. ICL automatically maximizes data sharing and minimizes copying by adopting a "copy on write" policy. This policy supports the illusion that each and every reference to a data structure generates a complete copy of that data structure. This same technique is used in the language processor itself to facilitate data sharing among multiple interpretations in ambiguous cases. California Institute of Technology 1978-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1978.2276-tr-78 application/postscript http://caltechcstr.library.caltech.edu/4/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/4/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1978.2276-tr-78
oai:caltechcstr.library.caltech.edu:5 2001-04-20 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Compiling Communicating Processes into Delay-Insensitive VLSI Circuits Martin, Alain J. All Records No abstract available. California Institute of Technology 1986-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1986.5210-tr-86 application/postscript http://caltechcstr.library.caltech.edu/5/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/5/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1986.5210-tr-86
oai:caltechcstr.library.caltech.edu:6 2001-04-20 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Submicron Systems Architecture: Semiannual Technical Report Seitz, Charles L. Kajiya, James T. Martin, Alain J. McEliece, Robert J. Rem, Martin All Records No abstract available. California Institute of Technology 1986-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1986.5220-tr-86 application/postscript http://caltechcstr.library.caltech.edu/6/00/5220.ps http://resolver.caltech.edu/CaltechCSTR:1986.5220-tr-86
oai:caltechcstr.library.caltech.edu:7 2001-04-20 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
A Parallel Execution Model for Logic Programming Li, Peyyun Peggy All Records The Sync Model, a parallel execution method for logic programming, is proposed. The Sync Model is a multiple-solution data driven model that realizes AND-parallelism and OR-parallelism in a logic program assuming a message-passing multiprocessor system. AND parallelism is implemented by constructing a dynamic data flow graph of the literals in the clause body with an ordering algorithm. OR parallelism is achieved by adding special Synchronization signals to the stream of partial solutions and synchronizing the multiple streams with a merge algorithm. The Sync Model is proved to be sound and complete. Soundness means it only generates correct solutions and completeness means it generates all the correct solutions. The soundness and completeness of the Sync Model are implied by the correctness of the merge algorithm. A new class of interconnection networks, the Sneptree, is also presented. The Sneptree is an augmented complete binary tree which can simulate an unbounded complete binary tree optimally. Amongst different connection patterns of the Sneptree, some are regular and extensible so as to be well suited for VLSI implementation. A recursive method is presented to generate the H-structure layout of one type of the Sneptree, called the Cyclic Sneptree. A message routing algorithm between any two leaf nodes of the Cyclic Sneptree is also presented. The routing algorithm, which is of O(n) complexity, gives a good approximation to the shortest path. The Sneptree is an ideal architecture for the Sync model, in which a dynamic process tree is constructed. With a simple mapping algorithm, the Sync Model can be mapped onto the Sneptree with highly-balanced load and low overhead. California Institute of Technology 1986-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1986.5227-tr-86 application/postscript http://caltechcstr.library.caltech.edu/7/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/7/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1986.5227-tr-86
oai:caltechcstr.library.caltech.edu:8 2001-04-20 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
On the Performance of k-ary n-cube Interconnection Networks Dally, William J. All Records The performance of k-ary n-cube interconnection networks is analyzed under the assumption of constant wire bisection. It is shown that low-dimensional k-ary n-cube networks (e.g., tori) have lower latency and higher hot-spot throughput than high-dimensional networks (e.g., binary n-cubes) with the same bisection width. California Institute of Technology 1986-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1986.5228-tr-86 application/postscript http://caltechcstr.library.caltech.edu/8/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/8/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1986.5228-tr-86
oai:caltechcstr.library.caltech.edu:9 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Switch-Level Model and Simulator for MOS Digital Systems Bryant, Randal E. All Records The switch-level model describes the logical behavior of digital systems implemented in metal oxide semiconductor (MOS) technology. In this model a network consists of a set of nodes connected by transistor "switches" with each node having a state 0, 1, or X (for invalid or uninitialized), and each transistor having a state "open", "closed", or "indeterminate". Many characteristics of 140S circuits can be modeled accurately, including: ratioed, complementary, and precharged logic-, dynamic and static storage; (bidirectional) pass transistors; busses; charge sharing; and sneak pa ths. In this paper we present a formal development of the switch-level model starting from a description of circuit behavior in terms of switch graphs. Then we describe an algorithm for a logic simulator based on the switch-level model which computes the new state of the network by solving a set of equations in a simple, discrete algebra. This algorithm has been implemented in the simulator MOSSIM II and has been used to simulate circuits containing over 10,000 transistors. By developing a formal theory of MOS logic circuits, we have achieved a greater degree of generality and accuracy than is found in other logic simulators for MOS. California Institute of Technology 1983-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1983.5065-tr-83 application/postscript http://caltechcstr.library.caltech.edu/9/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/9/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1983.5065-tr-83
oai:caltechcstr.library.caltech.edu:10 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Submicron Systems Architecture: Semiannual Technical Report Seitz, Charles L. Kajiya, James T. Martin, Alain J. McEliece, Robert J. Rem, Martin Van Tilborg, Henk All Records No abstract available. California Institute of Technology 1985-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1985.5178-tr-85 application/postscript http://caltechcstr.library.caltech.edu/10/00/5178.ps http://resolver.caltech.edu/CaltechCSTR:1985.5178-tr-85
oai:caltechcstr.library.caltech.edu:11 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Combining Computation with Geometry Lien, Sheue-Ling-Chang All Records This thesis seeks to establish mathematical principles and to provide efficient solutions to various time consuming operations in computer-aided geometric design. It contains a discussion of three major topics: (1) design validation by means of object interference detection, (2) object reconstruction through the union, intersection, and subtraction of two polyhedra, and (3) calculation of basic engineering properties such as volume, center of mass, or moments of inertia. Two criteria are presented for solving the problems of point-polygon enclosure and point polyhedron enclosure in object interference detection. An algorithm for efficient point-polyhedron-enclosure detection is presented. Singularities encountered in point-polyhedron-enclosure detection are categorized and simple methods for for resolving them are also included. A new scheme for representing solid objects, called skeletal polyhedron representation, is proposed. Also included are algorithms for performing set operations on polyhedra (or polygons) represented in skeletal polyhedron representation, algorithms for performing edge-edge intersection and face-face intersection in a set operation, and a perturbation method which can be used to resolve singularities for an easy execution of edge--edge intersection and face-face interaction. A symbolic method for calculating basic engineering properties (such as volume, center of mass, moments of inertia, and similar integral properties of geometrically complex solids) is proposed. The same method is generalized for computing the integral properties of a set combined polyhedron and for computing the integral properties of an arbitrary polyhedron inc m-dimensional (Rm) space. California Institute of Technology 1984-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1985.5185-tr-85 application/postscript http://caltechcstr.library.caltech.edu/11/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/11/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1985.5185-tr-85
oai:caltechcstr.library.caltech.edu:12 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Submicron Systems Architecture: Semiannual Technical Report Seitz, Charles L. Kajiya, James T. Martin, Alain J. McEliece, Robert J. Rem, Martin All Records No abstract available. California Institute of Technology 1985-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1985.5202-tr-85 application/postscript http://caltechcstr.library.caltech.edu/12/00/postscript.ps http://resolver.caltech.edu/CaltechCSTR:1985.5202-tr-85
oai:caltechcstr.library.caltech.edu:13 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
anaLOG: A functional Simulator for VLSI Neural Systems Lazzaro, John Paul All Records No abstract available. California Institute of Technology 1986-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1986.5229-tr-86 application/postscript http://caltechcstr.library.caltech.edu/13/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/13/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1986.5229-tr-86
oai:caltechcstr.library.caltech.edu:14 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Monte Carlo Methods for 2-D Compaction Mosteller, R. C. All Records A new method of compaction for VLSI circuits is presented. Compaction is done simultaneously in two dimensions and uses a Monte Carlo simulation method often referred to as simulated annealing for optimization. A new curvilinear representation for VLSI circuits, specifically chosen to make the compaction efficient, is developed. Experiments with numerous cells are presented that demonstrate this method to be as good as, or better than the hand compaction previously applied to these cells. Hand compaction was the best previously known method of compaction. An experimental evaluation is presented of how the run time complexity grows as the number, N, of objects in the circuit increases. The results of this evaluation indicates that the run time growth is order O(N log(A))f(d) where f(d) is a function of the density, d, and A is the initial cell area. The function f(d) appears to have negligible or no dependence on N. A hierarchical composition approach is developed which takes advantage of the capability of the curvilinear representation and the 2- dimensional compaction technique. California Institute of Technology 1986-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1986.5230-tr-86 application/postscript http://caltechcstr.library.caltech.edu/14/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/14/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1986.5230-tr-86
oai:caltechcstr.library.caltech.edu:15 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Some Results on Kolmogorov-Chaitin Complexity Schweizer, David Lawrence All Records No abstract available. California Institute of Technology 1986-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1986.5233-tr-86 application/postscript http://caltechcstr.library.caltech.edu/15/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/15/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1986.5233-tr-86
oai:caltechcstr.library.caltech.edu:16 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Submicron Systems Architecture: Semiannual Technical Report Seitz, Charles L. Kajiya, James T. Martin, Alain J. McEliece, Robert J. Rem, Martin All Records No abstract available. California Institute of Technology 1986-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1986.5235-tr-86 application/postscript http://caltechcstr.library.caltech.edu/16/00/5235.ps http://resolver.caltech.edu/CaltechCSTR:1986.5235-tr-86
oai:caltechcstr.library.caltech.edu:17 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
An Approach to Concurrent Semantics Using Complete Traces Van Horn, Kevin S. All Records No abstract available. California Institute of Technology 1986-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1986.5236-tr-86 application/postscript http://caltechcstr.library.caltech.edu/17/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/17/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1986.5236-tr-86
oai:caltechcstr.library.caltech.edu:18 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Incorporating Time in the New World of Computing Systems Poh, Hean Lee All Records The New World of Computing System, referred to as the New World system, is a total system for the structuring, manipulation and communication of information. Time is a ubiquitous aspect of most databases. The aim of this thesis is to study the problems associated with the implementation of time in the New World system. Time information is not only stored in New World, they can be retrieved and processed to answer various types of user queries. This is an additional feature as compared to most models of time implementation in databases where the relationships between time intervals are not dealt with. To start with, ways of representing time in the form of floating point number are devised and discussed. Then the conversion of time information from its various user accustomed forms to New World system internal form and back are explored. Finally, the ambiguities and complexities involved in finding the intersection, subtraction, union and extension of two different sequences of time intervals associated with an object in a database are studied and algorithms for resolving these are presented . An explanation on how the crunchers work with the addition of time information is also given. This includes discussing about how quantifiers such as at least 2, how many etc. are handled in the New World system. Case studies are also conducted to test out these routines. As conclusion, the remaining problems associated with time implementation not covered in this thesis work are discussed. California Institute of Technology 1986-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1986.5238-tr-87 application/postscript http://caltechcstr.library.caltech.edu/18/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/18/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1986.5238-tr-87
oai:caltechcstr.library.caltech.edu:19 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Cantor User Report: Version 2.0 Athas, William C. Seitz, Charles L. All Records No abstract available. California Institute of Technology 1987-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1987.5232-tr-86 application/postscript http://caltechcstr.library.caltech.edu/19/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/19/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1987.5232-tr-86
oai:caltechcstr.library.caltech.edu:20 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
A High Performance Implementation of Prolog Newton, Michael O. All Records We discuss an efficient implementation of the Warren Abstract Machine (WAM) [12] in detail. Special attention is given to data formats, memory layout, WAM optimizations and code generation techniques. A final section describes some hardware considerations for even higher performance execution. Currently the compiler produces code that runs at approximately 900,000 logical inferences per second (LIPS) on a single processor of an IBM 3090 using the naive reverse benchmark. Using several of the yet unimplemented optimizations, we expect this figure to top one million LIPS. California Institute of Technology 1987-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1987.5234-tr-86 application/postscript http://caltechcstr.library.caltech.edu/20/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/20/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1987.5234-tr-86
oai:caltechcstr.library.caltech.edu:21 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Submicron Systems Architecture: Semiannual Technical Report Seitz, Charles L. Martin, Alain J. McEliece, Robert J. Rem, Martin All Records No abstract available. California Institute of Technology 1987-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1987.5240-tr-87 application/postscript http://caltechcstr.library.caltech.edu/21/00/5240.ps http://resolver.caltech.edu/CaltechCSTR:1987.5240-tr-87
oai:caltechcstr.library.caltech.edu:22 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
VLSI Mesh Routing Systems Flaig, Charles M. All Records No abstact available. California Institute of Technology 1987-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1987.5241-tr-87 application/postscript http://caltechcstr.library.caltech.edu/22/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/22/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1987.5241-tr-87
oai:caltechcstr.library.caltech.edu:23 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Fine Grain Concurrent Computations Athas, William C. All Records This thesis develops a computational model, a programming notation, and a set of programming principles to further and to demonstrate the practicality of programming fine grain concurrent computers. Programs are expressed in the computational model as a collection of definitions of autonomous computing agents called objects. In the execution of a program, the objects communicate data and synchronize their actions exclusively by message-passing. An object executes its definition only in response to receiving a message, and its actions may include sending messages, creating new objects, and modifying its own internal state. The number of actions that occur in response to a message is finite; Turing computability is achieved not within a single object, but through the interaction of objects. A new concurrent programming notation Cantor is used to demonstrate the cognitive process of writing programs using the object model. Programs for numerical sieves, sorting, the eight queens problem, and Gaussian elimination are fully described. Each of these programs involve up to thousands of objects in their execution. The general programming strategy is to first partition objects by their overall behavior and then to program the behaviors to be self-organizing. The semantics of Cantor are made precise through the definition of a formal semantics for Cantor and the object model. Objects are modelled as finite automata. The formal semantics is useful for proving program properties and for building frameworks to capture specific properties of object programs. The mathematical frameworks are constructed for building object graphs independently of program execution and for systematically removing objects that are irrelevant to program execution (garbage collection). The formal semantics are complemented by experiments that allow one to study the dynamics of the execution of Cantor programs on fine grain concurrent computers. The clean semantics of Cantor suggests simple metrics for evaluating the execution of concurrent programs for an ideal, abstract implementation. Program performance is also evaluated for environments where computing resources are limited. Prom the results of these experiments, hardware and software architectures for organizing fine grain message-passing computations is proposed, including support for fault tolerance and for garbage collection. California Institute of Technology 1987-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1987.5242-tr-87 application/postscript http://caltechcstr.library.caltech.edu/23/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/23/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1987.5242-tr-87
oai:caltechcstr.library.caltech.edu:24 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Multicomputers Athas, William C. Seitz, Charles L. All Records This report outlines the history, current status, current developments, and plans for the message-passing concurrent computers, or multicomputers, developed in the Submicron Systems Architecture Project at Caltech. These systems include the Cosmic Cube and its commercial descendants, two second-generation cosmic cubes currently in development, and the Mosaic C, a fine grain multicomputer whose nodes are single VLSI chips. Section 1 introduces the physical architectures, with particular attention to the characteristics of the message-passing networks. Section 2 describes the programming environments for the first and second generation medium grain size "cubes." Section 3 describes a fine grain concurrent object-oriented programming notation called Cantor, which currently runs on cubes and sequential systems, and which will be used for application programming of the Mosaic C. California Institute of Technology 1987-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1987.5244-tr-87 application/postscript http://caltechcstr.library.caltech.edu/24/00/5244.ps http://resolver.caltech.edu/CaltechCSTR:1987.5244-tr-87
oai:caltechcstr.library.caltech.edu:25 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
A Framework for Adaptive Routing Ngai, John Y. Seitz, Charles L. All Records No abstract available. California Institute of Technology 1987-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1987.5246-tr-87 application/postscript http://caltechcstr.library.caltech.edu/25/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/25/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1987.5246-tr-87
oai:caltechcstr.library.caltech.edu:26 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
VLSI Concurrent Computation for Music Synthesis Wawrzynek, John All Records This thesis presents a very large-scale integrated circuit (VLSI) approach to the generation of musical sounds. The approach allows the generation of rich musical sounds using models that are easy to control and have parameters corresponding to many of the physical attributes of musical instruments. The generality of the approach for music synthesis is demonstrated by presenting several primitive sound generation mechanisms. Utilizing these primitives, several musical instruments are assembled to produce struck, plucked, and blown sounds. Refinements of the instruments are easily accomplished by adjusting or rearranging different functional components. A concurrent computing engine supporting the sound generation mechanisms is presented along with details of its VLSI implementation. Involved in the implementation is a new CMOS design methodology. Several alternative architectures for the computing engine are also presented and studied. California Institute of Technology 1987-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1987.5247-tr-87 application/postscript http://caltechcstr.library.caltech.edu/26/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/26/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1987.5247-tr-87
oai:caltechcstr.library.caltech.edu:27 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Logic from Programming Language Semantics Choo, Young-il All Records Logic for reasoning about programs must proceed from the programming language semantics. It is our thesis that programs be considered as mathematical objects that can be reasoned about directly, rather than as linguistic expressions whose meanings are embedded in an intermediate formalism.Since the semantics of many programming language features (including recursion, type-free application, infinite structures, self-reference, and reflection) require models that are constructed as limits of partial objects, a logic for dealing with partial objects is required. Using the D infinity, model of the lambda-calculus, a logic (called continuous logic) for reasoning about partial objects is presented. In continuous logic, the logical operations (negation, implication, and quantification) are defined for each of the finite levels and then extended to the limit, giving us a model of type-free logic. The triples of Hoare Logic are interpreted as partial assertions over the domain of partial states, and contradictions arising from rules for function definitions are analyzed. Recursive procedures and recursive functions are both proved using mathematical induction. A domain of infinite lists is constructed as a model for languages with lazy evaluation and it is compared to an ordinal-heirarchic construction. A model of objects and multiple inheritance is constructed where objects are self-referential states and multiple inheritance is defined using the notion of product of classes. The reflective processor for a language with environment and continuation reflection is constructed as the projective limit of partial reflective processors of finite height. California Institute of Technology 1987-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1987.5249-tr-87 application/octet-stream http://caltechcstr.library.caltech.edu/27/00/1987.5249-tr-97.pdf http://resolver.caltech.edu/CaltechCSTR:1987.5249-tr-87
oai:caltechcstr.library.caltech.edu:28 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Images, Numerical Analysis of Singularities and Shock Filters Rudin, Leonid Iakov All Records This work is concerned primarily with establishing a natural mathematical framework for the Numerical Analysis of Singularities, a term which we coined for this new evolving branch of numerical analysis. The problem of analyzing singular behavior of nonsmooth functions is implicitly or explicitly ingrained in any successful attempt to extract information from images. The abundance of papers on the so called Edge Detection testifies to this statement. We attempt to make a fresh start by reformulating this old problem in the rigorous context of the Theory of Generalized Functions of several variables with stress put on the computational aspects of essential singularities. We state and prove a variant of the Divergence Theorem for discontinuous functions which we call Fundamental Theorem of Edge Detection, for it is the backbone of the advocated here numerical analysis based on the estimates of contribution5 furnished by the essential singularities of functions. We further extend this analysis to arbitrary order singularities by utilization of the Miranda's calculus of tangential derivatives. With this machinery we are able to explore computationally the internal geometry of singularities including singular, i.e., nonsmooth, singularity boundaries. This theory give5 rise to singularity detection scheme called "rotating thin masks" which is applicable to arbitrary order n-dimensional essential singularities. In the particular implementation we combined first-order detector with derived here various curvature detectors. Preliminary experimental results are presented. We also derive a new class of nonlinear singularity detection schemes based on tensor products of distributions. Finally, a novel computational approach to the problem of image enhancement is presented. We call this construction the Shock Filters, since it is founded on the nonlinear PDE's whose solutions exhibit formation of discontinuous profiles, corresponding to shock waves in gas dynamics. An algorithm for experimental Shock Filter, based on the upwind finite difference scheme is presented and tested on the one and two dimensional data. California Institute of Technology 1987-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1987.5250-tr-87 application/pdf http://caltechcstr.library.caltech.edu/28/01/00000028.pdf http://resolver.caltech.edu/CaltechCSTR:1987.5250-tr-87
oai:caltechcstr.library.caltech.edu:29 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Conditional Knowledge as a Basis for Distributed Simulation Chandy, K. Mani Misra, Jay All Records A goal of this paper is to explore different ways of implementing distributed simulations. Distributed simulation grew out of sequential simulation, and it is possible that the way we think about distributed simulation is unduly influenced by its sequential origins. To free ourselves from unnecessary restrictions on the way we design distributed simulations, in this paper we define the distributed simulation problem somewhat differently than in the literature. We propose the concepts of "knowledge" and "conditional knowledge", to help us obtain a general framework to reason about distributed simulations without too close a coupling with any specific implementation method. The framework appears helpful in designing new ways of distributed simulations. Empirical studies of distributed simulations report widely varying results: some studies report improvements in speed that are almost linearly proportional to the number of computers in the system, while other studies report that distributed simulation is even slower than sequential simulation. The framework proposed in this paper seems to help in explaining the wide differences observed in empirical studies. Using our framework, we attempt to suggest properties that efficient "general-purpose" distributed discrete-event simulations must have. The paper assumes little prior knowledge of the literature on simuIation or distributed systems. We hope that the paper will serve as a tutorial in addition to providing additional insight. California Institute of Technology 1987-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1987.5251-tr-87 application/postscript http://caltechcstr.library.caltech.edu/29/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/29/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1987.5251-tr-87
oai:caltechcstr.library.caltech.edu:30 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Synthesis of Self-Timed Circuits by Program Transformation Burns, Steven M. Martin, Alain J. All Records No abstract available. California Institute of Technology 1987-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1987.5253-tr-87 application/postscript http://caltechcstr.library.caltech.edu/30/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/30/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1987.5253-tr-87
oai:caltechcstr.library.caltech.edu:31 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
A Synthesis Method for Self-Timed VLSI Circuits Martin, Alain J. All Records No abstract available. California Institute of Technology 1987-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1987.5256-tr-87 application/postscript http://caltechcstr.library.caltech.edu/31/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/31/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1987.5256-tr-87
oai:caltechcstr.library.caltech.edu:32 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Submicron Systems Architecture Project:Semiannual Technical Report Seitz, Charles L. All Records No abstract available. California Institute of Technology 1987-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1987.5258-tr-87 application/postscript http://caltechcstr.library.caltech.edu/32/00/5258.ps http://resolver.caltech.edu/CaltechCSTR:1987.5258-tr-87
oai:caltechcstr.library.caltech.edu:33 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
PS: Polygon Streams: A Distributed Architecture for Incremental Computation Applied to Graphics Gupta, Rajiv All Records Polygon Streams is a distributed system with multiple processors and strictly local communication. A unique custom VLSI chip that constitutes an independent processing module forms a stage of the PS pipeline. The number of these modules in PS is a variable that is determined by the application. PS features a modular architecture, multi-ported on-chip memory, bit-serial arithmetic, and a pipeline whose computation can be dynamically configured. The PS design closely subscribes to the system characteristics favored by VLSI. The task of scan conversion is very intensive in computation and pixel information access for rendering computer graphics images on raster scan displays. It is very coherent and suitable, however, for forward difference algorithms. The discrete and regular layout of the raster display in conjunction with the largely local effect of a pixel on an image, make rendering amenable to parallel architectures with localized memory and communication. These are precisely the attributes favored by VLSI and typical of PS. A modification of the Digital Differential Analyzer is implemented to Gouraud Shade and depth buffer convex polygons at high speeds. The scan conversion task is distributed over the processors to efficiently subdivide the image space and maximize concurrency of processor operation. A study of the tradeoffs and architectural choices of the PS reveal the merits and deficits of the PS approach in comparison with Pixel-Planes, Super-Buffers, and SLAMS. California Institute of Technology 1987-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1987.cs-tr-88-03 application/postscript http://caltechcstr.library.caltech.edu/33/00/88-03a.ps http://resolver.caltech.edu/CaltechCSTR:1987.cs-tr-88-03
oai:caltechcstr.library.caltech.edu:35 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Automated Compilation of Concurrent Programs into Self-Timed Circuits Burns, Steven M. All Records No abstract available. California Institute of Technology 1988-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-02 application/postscript http://caltechcstr.library.caltech.edu/35/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/35/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-02
oai:caltechcstr.library.caltech.edu:36 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Cochlear Hydrodynamics Demystified Lyon, Richard F. Mead, Carver A. All Records Wave propagation in the mammalian cochlea (inner ear) is modeled as a unidirectional cascade of simple filters. The transfer functions of the low-order filter stages are completely determined by the wave-number vs. frequency solutions to the dispersion relations that describe the cochlea, which are in turn derived from twodimensional approximations to the fluid mechanics. Active undamping effects of the outer hair cells are easily included in the analysis and modeling, so that the results can be directly applied in the design of active adaptive cochlear models. California Institute of Technology 1988-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-04 application/postscript http://caltechcstr.library.caltech.edu/36/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/36/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-04
oai:caltechcstr.library.caltech.edu:37 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Submicron Systems Architecture Project: Semiannual Technical Report Seitz, Charles L. All Records No abstract available. California Institute of Technology 1988-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-05 application/postscript http://caltechcstr.library.caltech.edu/37/00/88-05.ps http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-05
oai:caltechcstr.library.caltech.edu:38 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Theorems on Computations of Distributed Systems Chandy, K. Mani All Records This paper presents theorems that are helpful in developing algorithms for the detection of stable properties, recording global snapshots and tracing the execution of distributed systems. The theorems are based on a property of channels. California Institute of Technology 1988-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-06 application/postscript http://caltechcstr.library.caltech.edu/38/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/38/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-06
oai:caltechcstr.library.caltech.edu:39 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
The Hexagonal Resistive Network and the Circular Approximation Feinstein, David I. All Records No abstract available. California Institute of Technology 1988-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-07 application/postscript http://caltechcstr.library.caltech.edu/39/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/39/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-07
oai:caltechcstr.library.caltech.edu:40 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Pronouns Roach, Kelly All Records No abstract available. This technical report was submitted in 1980 in partial fulfillment of the requirements for the degree of Master of Science. California Institute of Technology 1988-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-09 application/postscript http://caltechcstr.library.caltech.edu/40/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/40/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-09
oai:caltechcstr.library.caltech.edu:41 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
The Reactive Kernel Seizovic, Jakov N. All Records No abstract available. California Institute of Technology 1988-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-10 application/postscript http://caltechcstr.library.caltech.edu/41/00/postscript.ps http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-10
oai:caltechcstr.library.caltech.edu:42 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
A Study of Fine-Grain Programming Using Cantor Boden, Nanette J. All Records No abstract available. California Institute of Technology 1988-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-11 application/postscript http://caltechcstr.library.caltech.edu/42/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/42/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-11
oai:caltechcstr.library.caltech.edu:43 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
A Comparison of Strict and Non-Strict Semantics for Lists Burch, Jerry R. All Records No abstract available. California Institute of Technology 1988-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-12 application/postscript http://caltechcstr.library.caltech.edu/43/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/43/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-12
oai:caltechcstr.library.caltech.edu:44 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
A Message-Passing Model for Highly Concurrent Computation Martin, Alain J. All Records No abstract available. California Institute of Technology 1988-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-13 application/postscript http://caltechcstr.library.caltech.edu/44/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/44/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-13
oai:caltechcstr.library.caltech.edu:45 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Syntax-Directed Translation of Concurrent Programs into Self-Timed Circuits Burns, Steven M. Martin, Alain J. All Records No abstract available. California Institute of Technology 1988-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-14 application/postscript http://caltechcstr.library.caltech.edu/45/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/45/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-14
oai:caltechcstr.library.caltech.edu:46 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Applications of Surface Networks to Sampling Problems in Computer Graphics Von Herzen, Brian All Records This thesis develops the theory, algorithms and data structures for adaptive sampling of parametric functions, which can represent the shapes and motions of physical objects. For the first time, ensured methods are derived for determining collisions and other interactions for a broad class of parametric functions. A new data structure, called a surface network, is developed for the collision algorithm and for other sampling problems in computer graphics. A surface network organizes a set of parametric samples into a hierarchy. Surface networks are shown to be good for rendering images, for approximating surfaces, and for modeling physical environments. The basic notion of a surface network is generalized to higher-dimensional problems such as collision detection. We may think of a two-dimensional network covering a three-dimensional solid, or an n-dimensional network embedded in a higher-dimensional space. Surface networks are applied to the problems of adaptive sampling of static parametric surfaces, to adaptive sampling of time-dependent parametric surfaces, and to a variety of applications in computer graphics, robotics, and aviation. First we develop the theory for adaptive sampling of static surfaces. We explore bounding volumes that enclose static surfaces, subdivision mechanisms that adjust the sampling density, and subdivision criteria that determine where samples should be placed. A new method is developed for creating bounding ellipsoids of parametric surfaces using a Lipschitz condition to place bounds on the derivatives of parametric functions. The bounding volumes are arranged in a hierarchy based on the hierarchy of the surface network. The method ensures that the bounding volume hierarchy contains the parametric surface completely. The bounding volumes are useful for computing surface intersections. They are potentially useful for ray tracing of parametric surfaces. We develop and examine a variety of subdivision mechanisms to control the sampling process for parametric functions. Some of the methods are shown to improve the robustness of adaptive sampling. Algorithms for one mechanism, using bintrees of right parametric triangles, are particularly simple and robust. A set of empirical subdivision criteria determine where to sample a surface, when we have no additional information about the surface. Parametric samples are concentrated in regions of high curvature, and along intersection boundaries. Once the foundations of adaptive sampling for static surfaces are described, we examine time-dependent surfaces. Based on results with the empirical subdivision criteria for static surfaces, we derive ensured criteria for collision determination. We develop a new set of rectangular bounding volumes, apply a standard L-dimensional subdivision mechanism called k-d trees, and develop criteria for ensuring that we detect collisions between parametric surfaces. We produce rectangular bounding boxes using a "Jacobian''-style matrix of Lipschitz conditions on the parametric function. The rectangular method produces even tighter bounds on the surface than the ellipsoidal method, and is effective for computing collisions between parametric surfaces. A new collision determination technique is developed that can detect collisions of parametric functions, based on surface network hierarchies. The technique guarantees that the first collision is found, to within the temporal accuracy of the computation, for surfaces with bounded parametric derivatives. Alternatively, it is possible to guarantee that no collisions occur for the same class of surfaces. When a collision is found, the technique reports the location and parameters of the collision as well as the time of first collision. Finally, we examine several applications of the sampling methods. Surface networks are applied to the problem of converting a two-dimensional image, or texture map, into a set of triangles that tile the plane. Many polygon-rendering systems do not provide the capability of rendering surfaces with textures. The technique converts textures to triangles that can be rendered directly by a polygon system. In addition, potential applications of the collision determination techniques are discussed, including robotics and air-traffic control problems. California Institute of Technology 1988-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-15 application/postscript http://caltechcstr.library.caltech.edu/46/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/46/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-15
oai:caltechcstr.library.caltech.edu:47 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Programming Parallel Computers Chandy, K. Mani All Records This paper is from a keynote address to the IEEE International Conference on Computer Languages, October 9, 1988. Keynote addresses are expected to be provocative (and perhaps even entertaining), but not necessarily scholarly. The reader should be warned that this talk was prepared with these expectations in mind.Parallel computers offer the potential of great speed at low cost. The promise of parallelism is limited by the ability to program parallel machines effectively. This paper explores the opportunities and the problems of parallel computing. Technological and economic trends are studied with a view towards determining where the field of parallel computing is going. An approach to parallel programming, called UNITY, is described. UNITY was developed by Jay Misra and myself, and is described in [Chandy]. Extensions to UNITY are discussed; these extensions were motivated by discussions with Chuck Seitz California Institute of Technology 1988-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-16 application/postscript http://caltechcstr.library.caltech.edu/47/00/88-16.ps http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-16
oai:caltechcstr.library.caltech.edu:48 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Constrained Differential Optimization for Neural Networks Platt, John C. Barr, Alan H. All Records Many optimization models of neural networks need constraints to restrict the space of outputs to subspace which satisfies external criteria. Optimizations using energy methods yield "forces" which act upon the state of the neural network. The penalty method, in which quadratic energy constraints are added to an existing optimization energy, has become popular recently, but is not guaranteed to satisfy the constraint conditions when there are other forces on the neural model or when there are multiple constraints. In this paper, we present the basic differential multiplier method (BDMM), which satisfies constraints exactly; we create forces which gradually apply the constraints over time, using "neurons" that estimate Lagrange multipliers. The basic differential multiplier method is a system of differential equations first proposed by [ARROW] as an economic model. These differential equations locally converge to a constrained minimum. Examples of applications of the differential method of multipliers include enforcing permutation codewords in the analog decoding problem and enforcing valid tours in the traveling salesman problem. California Institute of Technology 1988-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-17 application/postscript http://caltechcstr.library.caltech.edu/48/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/48/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-17
oai:caltechcstr.library.caltech.edu:49 2001-04-24 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Controlling Rigid Bodies with Dynamic Constraints Barzel, Ronen All Records We present a technique, "Dynamic Constraints," for controlling the positions and orientations of rigid bodies n computer graphics models. The technique addresses the issue of providing control over a physically-based model, in which the bodies' behavior is determined by simulation of Newton's Laws of Motion. The "Dynamic Constraints" technique allows the modeler to control the configuration of bodies in a model by specifying constraints which must be met and maintained, as the simulation unfolds. To meet the constraints, we introduce forces into the model; these "constraint forces" forces are applied to the bodies that are constrained. We use an inverse dynamics method to derive a linear "constraint-force equation," whose solution yields the values of the constraint forces. We continually solve the constraint-force equation during the simulation of a model, so that the bodies' behavior will be consistent with the constraints. This thesis is accompanied by a narrated 10 -minuted videotape, "Caltech Modeling Demos, 1987" that contains several animations demonstrating the "Dynamic Constraints" technique. This thesis additionally includes a glossary of terms relating to physically-based modeling and dynamic constraints. California Institute of Technology 1988-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-19 application/postscript http://caltechcstr.library.caltech.edu/49/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/49/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-19
oai:caltechcstr.library.caltech.edu:50 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Neural Network Design and the Complexity of Learning Judd, Stephen J. All Records We formalize a notion of learning that characterizes the training of feed-forward networks. In the field of learning theory, it stands as a new model specialized for the type of learning problems that arise in connectionist networks. The formulation is similar to Valiant's [Va184] in that we ask what can be feasibly learned from examples and stored in a particular data structure. One can view the data structure resulting from Valiant-type learning as a 'sentence' in a language described by grammatical syntax rules. Neither the words nor their interrelationships are known a priori. Our learned data structure is more particular than Valiant's in that it must be a particular 'sentence'. The position and relationships of each 'word' are fully specified in advance and the learning system need only discover what the missing words are. This corresponds to the problem of finding retrieval functions for each node in a given network. We prove this problem NP-complete and thus demonstrate that learning in networks has no efficient general solution. Corollaries to the main theorem demonstrate the NP-completeness of several sub-cases. While the intractability of the problem precludes its solution in all these cases, we sketch some alternative definitions of the problem in a search for tractable sub-cases. One broad class of subcases is formed by placing constraints on the network architecture; we study one type in particular. The focus of these constraints is on families of 'shallow' architectures which are defined to have bounded depth and unbounded width. We introduce a perspective on shallow networks, called the Support Cone Interaction (SCI) graph, which is helpful in distinguishing tractable from intractable subcases: When the SC1 graph has tree-width O (log n), learning can be accomplished in polynomial time; when its tree-width is n omega (1) we find the problem NP-complete even if the SC1 graph is a simple 2-dimensional planar grid. California Institute of Technology 1988-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-20 application/pdf http://caltechcstr.library.caltech.edu/50/01/88-20.pdf http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-20
oai:caltechcstr.library.caltech.edu:51 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Winner-Take-All Networks of O(N) Complexity Lazzaro, J. Ryckebusch, S. Mahowald, M. A. Mead, C. A. All Records No abstract available. California Institute of Technology 1988-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-21 application/postscript http://caltechcstr.library.caltech.edu/51/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/51/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-21
oai:caltechcstr.library.caltech.edu:52 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Variants of the Chandy-Misra-Bryant Distributed Discrete-Event Simulation Algorithm Su, Wen-King Seitz, Charles L. All Records No abstract available. California Institute of Technology 1988-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-22 application/postscript http://caltechcstr.library.caltech.edu/52/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/52/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-88-22
oai:caltechcstr.library.caltech.edu:53 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Communication Behavior of Linear Arrays of Processes Lee, Tak K. All Records This paper investigates the communication behavior of a linear array of processes, each process implementing the same program. For programs with cyclic communication patterns, simple criteria for determining whether they induce constant response time on the array are established. Also, an algorithm is developed for characterizing programs with more general communication patterns. California Institute of Technology 1988-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-89-13 application/postscript http://caltechcstr.library.caltech.edu/53/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/53/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1988.cs-tr-89-13
oai:caltechcstr.library.caltech.edu:54 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
The Design of an Asynchronous Microprocessor Martin, Alain J. All Records No abstract available. California Institute of Technology 1989-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-02 application/postscript http://caltechcstr.library.caltech.edu/54/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/54/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-02
oai:caltechcstr.library.caltech.edu:55 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Feature-Oriented Image Enhancement with Shock Filters, 1 Rudin, Leonid I. Osher, Stanley All Records No abstract available. California Institute of Technology 1989-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-03 application/postscript http://caltechcstr.library.caltech.edu/55/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/55/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-03
oai:caltechcstr.library.caltech.edu:56 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Submicron Systems Architecture Project: Semiannual Technical Report Seitz, Charles L. All Records No abstract available. California Institute of Technology 1989-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-04 application/postscript http://caltechcstr.library.caltech.edu/56/00/89.04.ps application/octet-stream http://caltechcstr.library.caltech.edu/56/01/89.04.pdf http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-04
oai:caltechcstr.library.caltech.edu:57 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
The Essence of Distributed Snapshots Chandy, K. Mani All Records No abstract available. California Institute of Technology 1989-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-05 application/postscript http://caltechcstr.library.caltech.edu/57/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/57/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-05
oai:caltechcstr.library.caltech.edu:58 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
The First Aysnchronous Microprocessor: The Test Results Martin, Alain J. Burns, Steven M. Lee, T. K. Borkovic, Drazen Hazewindus, Pieter J. All Records No abstract available. California Institute of Technology 1989-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-06 application/postscript http://caltechcstr.library.caltech.edu/58/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/58/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-06
oai:caltechcstr.library.caltech.edu:59 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Constrained methods for Neural Networks and Computer Graphics Platt, John All Records Both computer graphics and neural networks are related, in that they model natural phenomena. Physically-based models are used by computer graphics researchers to create realistic, natural animation, and neural models are used by neural network researchers to create new algorithms or new circuits. To exploit successfully these graphical and neural models, engineers want models that fulfill designer-specified goals. These goals are converted into mathematical constraints. This thesis presents constraint methods for computer graphics and neural networks. The mathematical constraint methods modify the differential equations that govern the neural or physically-based models. The constraints methods gradually enforce the constraints exactly. This thesis also describes applications of constrained models to real problems. The first half of this thesis discusses constrained neural networks. The desired models and goals are often converted into constrained optimization problems. These optimization problems are solved using first-orderdifferential equations. There are a series of constraint methods which are applicable to optimization using differential equations: the Penalty Method adds extra terms to the optimization function which penalize violations of constraints, the Differential Multiplier Method adds subsidiary differential equations which estimate Lagrange multipliers to fulfill the constraints gradually and exactly, Rate-Controlled Constraints compute extra terms for the differential equation that force the system to fulfill the constraints exponentially. The applications of constrained neural networks include the creation of constrained circuits, error-correcting codes, symmetric edge detection for computer vision, and heuristics for the traveling salesman problem. The second half of this thesis discusses constrained computer graphics models. In computer graphics, the desired models and goals become constrained mechanical systems, which are typically simulated with second-order differential equations. The Penalty Method adds springs to the mechanical system to penalize violations of the constraints. Rate-Controlled Constraints add forces and impulses to the mechanical system to fulfill the constraints with critically damped motion. Constrained computer graphics models can be used to make deformable physically-based models follow the directives of a animator. California Institute of Technology 1989-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-07 application/postscript http://caltechcstr.library.caltech.edu/59/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/59/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-07
oai:caltechcstr.library.caltech.edu:60 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
A Framework for Adaptive Routing in Multicomputer Networks Ngai, John Y. All Records Message-passing concurrent computers, also known as multicomputers, such as the Caltech Cosmic Cube [47] and its commercial descendents, consist of many computing nodes that interact with each other by sending and receiving messages over communication channels between the nodes. The communication networks of the second-generation machines, such as the Symult Series 2010 and the Intel iPSC2 [2], employ an oblivious wormhole-routing technique that guarantees deadlock freedom. The network performance of this highly evolved oblivious technique has reached a limit of being capable of delivering, under random traffic, a stable maximum sustained throughput of ~~45 to 50% of the limit set by the network bisection bandwidth, while maintaining acceptable network latency. This thesis examines the possibility of performing adaptive routing as an approach to further improving upon the performance and reliability of these networks. In an adaptive multipath routing scheme, message trajectories are no longer deterministic, but are continuously perturbed by local message loading. Message packets will tend to follow their shortest-distance routes to destinations in normal traffic loading, but can be detoured to longer but less-loaded routes as local congestion occurs. A simple adaptive cut-through packet-switching framework is described, and a number of fundamental issues concerning the theoretical feasibility of the adaptive approach are studied. Freedom of communication deadlock is achieved by following a coherent channel protocol and by applying voluntary misrouting as needed. Packet deliveries are assured by resolving channel-access conflicts according to a priority assignment. Fairness of network access is assured either by sending round-trip packets or by having each node follow a local injection-synchronization protocol. The performance behavior of the proposed adaptive cut-through framework is studied with stochastic modeling and analysis, as well as through extensive simulation experiments for the 2D and 3D rectilinear networks. Theoretical bounds on various average network-performance metrics are derived for these rectilinear networks. These bounds provide a standard frame of reference for interpreting the performance results. In addition to the potential gain in network performance, the adaptive approach offers the potential for exploiting the inherent path redundancy found in richly connected networks in order to perform fault-tolerant routing. Two convexity-related notions are introduced to characterize the conditions under which our adaptive routing formulation is adequate to provide fault-tolerant routing, with minimal change in routing hardware, The effectiveness of these notions is studied through extensive simulations, The 2D octagonal-mesh network is suggested; this displays excellent fault-tolerant potential under the adaptive routing framework. Both performance and reliability behaviors of the octagonal mesh are studied in detail. A number of implementation issues are examined. Encoding schemes for packet headers that admit simple incremental updates while providing all necessary routing information in the first flit of a relatively narrow flit width are developed. A pipelined control structure that allows a packet to cut through an intermediate node with a minimum delay of two cycles is described. A distributed clocking scheme is developed that eliminates the problem of global clock-signal distribution. Under this clocking scheme, the adaptive routers can be tessellated to form a network of arbitrary size. California Institute of Technology 1989-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-09 application/postscript http://caltechcstr.library.caltech.edu/60/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/60/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-09
oai:caltechcstr.library.caltech.edu:61 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Silicon Models of Early Audition Lazzaro, John All Records This dissertation describes silicon integrated circuits that model known and proposed physiological structures in the early auditory system. Specifically, it describes silicon models of auditory-nerve response, of auditory localization in the barn owl, and of pitch perception. The integrated circuits model the structure as well as the function of the physiology; all subcircuits in the chips have anatomical correlates. The chips, two of which contain over 100,000 transistors, compute all outputs in real time, using analog, continuous-time processing. In most respects, chip responses approximate physiological or psychophysical response of the modeled biological systems. The dissertation also describes a novel nonlinear-inhibition circuit, which is a key component of two of the silicon models. California Institute of Technology 1990-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-10 application/postscript http://caltechcstr.library.caltech.edu/61/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/61/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-10
oai:caltechcstr.library.caltech.edu:62 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Reactive-Process Programming and Distributed Discrete-Event Simulation Su, Wen-King All Records The same forces that spurred the development of multicomputers - the demand for better performance and economy - are driving the evolution of multicomputers in the direction of more abundant and less expensive computing nodes - the direction of fine-grain multicomputers. This evolution in multicomputer architecture derives from advances in integrated circuit, packaging, and message-routing technologies, and carries far-reaching implications in programming and applications. This thesis pursues that trend with a balanced treatment of multicomputer programming and applications. First, a reactive- process programming system - Reactive-C - is investigated; then, a model application - discreteevent simulation - is developed; finally, a number of logic-circuit simulators written in the Reactive-C notation are evaluated. One difficulty in multicomputer applications is the inefficiency of many distributed algorithms compared to their sequential counterparts. When better formulations are developed, they often scale poorly with increasing numbers of nodes, and their beneficial effects eventually vanish when many nodes are used. However, rules for programming are quite different when nodes are plentiful and cheap: The primary concern is to utilize all of the concurrency available in an application, rather than to utilize all of the computing cycles available in a machine. We have shown in our research that it is possible to extract the maximum concurrency of a simulation subject, even one as difficult as a logic circuit, when one simulation element is assigned to each node. Despite the initial inefficiency of a straightforward algorithm, as the the number of nodes increases, the computation time decreases linearly until there are only a few elements in each node. We conclude by suggesting a, technique to further increase the available concurrency when there are many more nodes than simulation elements. California Institute of Technology 1989-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-11 application/postscript http://caltechcstr.library.caltech.edu/62/00/postscript.ps http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-11
oai:caltechcstr.library.caltech.edu:63 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Submicron Systems Architecture Project: Semiannual Technial Report Seitz, Charles L. All Records No abstract available. California Institute of Technology 1989-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-12 application/postscript http://caltechcstr.library.caltech.edu/63/00/89.12.ps application/octet-stream http://caltechcstr.library.caltech.edu/63/01/89.12.pdf http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-89-12
oai:caltechcstr.library.caltech.edu:64 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Distributed Sorting Hofstee, H. Peter Martin, Alain J. Van de Snepscheutt, Jan L. A. All Records No abstract available. California Institute of Technology 1989-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-90-06 application/postscript http://caltechcstr.library.caltech.edu/64/00/postscript.ps http://resolver.caltech.edu/CaltechCSTR:1989.cs-tr-90-06
oai:caltechcstr.library.caltech.edu:65 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Properties of the V-C Dimension Fyfe, Andrew All Records No abstract available. California Institute of Technology 1989-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-01 application/postscript http://caltechcstr.library.caltech.edu/65/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/65/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-01
oai:caltechcstr.library.caltech.edu:66 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Limitations to Delay-Insensitivity in Asynchronous Circuits Martin, Alain J. All Records No abstract available. California Institute of Technology 1990-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-02 application/postscript http://caltechcstr.library.caltech.edu/66/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/66/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-02
oai:caltechcstr.library.caltech.edu:67 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
The Program Composition Project Chandy, K. Mani Taylor, Stephen Kesselman, Carl Foster, Ian All Records No abstract available. California Institute of Technology 1990-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-03 application/postscript http://caltechcstr.library.caltech.edu/67/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/67/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-03
oai:caltechcstr.library.caltech.edu:68 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Submicron Systems Architecture: Semiannual Technical Report Seitz, Charles L. All Records No abstract available. California Institute of Technology 1990-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-05 application/postscript http://caltechcstr.library.caltech.edu/68/00/90-05.ps http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-05
oai:caltechcstr.library.caltech.edu:69 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Compiler Optimization of Array Data Storage Gupta, Rajiv Kajiya, James All Records The literature has witnessed much work aimed at improving the efficiency of mernory systems. The motivation is obvious: the high cost of page faults in hierarchical stores. Most architectures, including vector processors, shared - and distributed - memory multiprocessors, and interleaved memories, similarly reward data locality and predictable patterns of access. Most current endeavors, however, prefix the storage organization of data operands and either manipulate loops in the code, tailor algorithms, or tune prefetching strategies and replacement policies. A methodology and an algorithm for automatically organizing the storage of array data for efficient access by the executing code are described. The simple techniques presented may be incorporated in a compiler and are complementary to the other optimizations in the literature. Furthermore, examples in Fortran 8X and Fortran 77 pseudo-code support the general applicability of the work to programming languages, both scalar as well as array. Notwithstanding the column-major storage constraints, a technique for optiimizing storage in Fortran 77 is outlined. The prudence of of a compiler-optimized approach over a user-optimized approach to data storage organization is discussed. California Institute of Technology 1990-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-07 application/postscript http://caltechcstr.library.caltech.edu/69/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/69/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-07
oai:caltechcstr.library.caltech.edu:70 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Asynchronous Circuits for Token-Ring Mutual Exclusion Martin, Alain J. All Records No abstract available. California Institute of Technology 1990-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-09 application/postscript http://caltechcstr.library.caltech.edu/70/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/70/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-09
oai:caltechcstr.library.caltech.edu:71 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
A Primer for Program Composition Notation Chandy, K. Mani Taylor, Stephen All Records This primer describes a notation for program composition. Program composition is putting programs together to get larger ones. PCN (Program Composition Notation) is a programming language that allows programmers to compose programs so that composed programs execute efficiently on uniprocessors, distributed-memory multicomputers or shared-memory multiprocessors. (Revised December 12, 1990) California Institute of Technology 1990-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-10 application/pdf http://caltechcstr.library.caltech.edu/71/00/1990.cs.tr-90-10a.pdf http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-10
oai:caltechcstr.library.caltech.edu:72 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Characterizing NP and Measuring Instance Complexity Judd, Stephen All Records A generic NP-complete graph problem is described. The calculation of certain predicate on the graph is shown to be both necessary and sufficient to solve the problem and hence the calculation must be embedded in every algorithm solving NP problems. This observation gives rise to a metric on the difficulty of solving an instance of the problem. There appears to be an interesting phase transition in this metric when the graphs are generated at random in a "2-dimensional" extension. The metric is sensitive to 2 parameters governing the way graphs are generated: p, the density of edges in the graph, and K, related to the number of points in the graph. The metric seems to be finite in part of the (p,K)-space and infinite in the rest. If true, this phenomenon would demonstrate that NP-complete problems are truly monolithic and can easily exhibit strong intrinsic coupling of their variables throughout the entire instance. California Institute of Technology 1990-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-11 application/postscript http://caltechcstr.library.caltech.edu/72/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/72/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-11
oai:caltechcstr.library.caltech.edu:73 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Performance Analysis and Optimization of Asynchronous Circuits Produced by Martin Synthesis Burns, Steven M. All Records We present a method for analyzing the timing performance of asynchronous circuits, in particular, those derived by program transformation from concurrent programs using the synthesis approach developed by Martin. The analysis method produces a performance metric (related to the time needed to perform an operation) in terms of the primitive gate delays of the circuit. Because the gate delays are functions of transistor sizes, the performance metric can be optimized with respect to these sizes. For a large class of asynchronous circuits -- including those produced by the Martin synthesis -- these techniques produce the global optimum of the performance metric. A CAD tool has been implemented to perform this optimization. California Institute of Technology 1990-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-12 application/postscript http://caltechcstr.library.caltech.edu/73/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/73/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-12
oai:caltechcstr.library.caltech.edu:74 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Submicron Systems Architecture: Semiannual Technical Report Seitz, Charles L. All Records No abstract available. California Institute of Technology 1990-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-14 application/postscript http://caltechcstr.library.caltech.edu/74/00/90-14.ps application/octet-stream http://caltechcstr.library.caltech.edu/74/01/90-14.pdf http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-14
oai:caltechcstr.library.caltech.edu:75 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
A Unified Framework for Constraint-Based Modeling Kalra, Devendra All Records Constraint-based modeling techniques are emerging as an effective computer graphics approach for modeling and designing objects and their behaviors. In this thesis, computer graphics constraint techniques are unified into a single conceptual framework. The central themes of the thesis are methods to partition an arbitrary constraint problem in different domains and at different levels, and to provide a language and computational environment for modeling with constraints. Using partitioning and composition schemes, complex simulations can be built hierarchically from simpler simulations by "plugging" together separate modules. Fundamental and basic structures are designed and implemented to provide an "Assembly Language" for simulation systems. These structures are put together through a collection of interfaces, much like multiple languages that use the same assembler on a computer. We use strategies called refinement and partitioning to integrate seemingly disparate constraint techniques. We present Temporal Sequencing as an approach to design complex time behaviors of simulation systems. Refinement is a top-down approach of transforming high level representations of a constraint modeling problem into representations that are closer to the basic solution mechanisms available in the constraint environment, such as numerical solution methods. Partitioning is the decomposition of one constraint problem into multiple simpler constraint problems that are then studied separately. Temporal Sequencing is a methodology to design the time behavior of a simulation system by composing time behaviors of the system over subintervals of time. Using the above partitioning schemes for the solution and specification of a general constraint problem, we create a unified constraint environment with the capability to both solve constraint problem instances and to create specialized constraint systems. New methods of constraint specification and solution can be added into the same constraint framework as new methods are developed. Based on the above approach, a modeling system called "Our Constraint Environment" (OCE) has been implemented. A programming language as an extension to C++ has been designed to provide an interface to OCE. The language provides the constructs for the partitioning schemes discussed above. Simulations created using OCE have shown the efficacy of our design approach. Constraint-based modeling techniques are emerging as an effective computer graphics approach for modeling and designing objects and their behaviors. In this thesis, computer graphics constraint techniques are unified into a single conceptual framework. The central themes of the thesis are methods to partition an arbitrary constraint problem in different domains and at different levels, and to provide a language and computational environment for modeling with constraints. Using partitioning and composition schemes, complex simulations can be built hierarchically from simpler simulations by "plugging" together separate modules. Fundamental and basic structures are designed and implemented to provide an "Assembly Language" for simulation systems. These structures are put together through a collection of interfaces, much like multiple languages that use the same assembler on a computer. We use strategies called refinement and partitioning to integrate seemingly disparate constraint techniques. We present Temporal Sequencing as an approach to design complex time behaviors of simulation systems. Refinement is a top-down approach of transforming high level representations of a constraint modeling problem into representations that are closer to the basic solution mechanisms available in the constraint environment, such as numerical solution methods. Partitioning is the decomposition of one constraint problem into multiple simpler constraint problems that are then studied separately. Temporal Sequencing is a methodology to design the time behavior of a simulation system by composing time behaviors of the system over subintervals of time. Using the above partitioning schemes for the solution and specification of a general constraint problem, we create a unified constraint environment with the capability to both solve constraint problem instances and to create specialized constraint systems. New methods of constraint specification and solution can be added into the same constraint framework as new methods are developed. Based on the above approach, a modeling system called "Our Constraint Environment" (OCE) has been implemented. A programming language as an extension to C++ has been designed to provide an interface to OCE. The language provides the constructs for the partitioning schemes discussed above. Simulations created using OCE have shown the efficacy of our design approach. California Institute of Technology 1990-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-15 application/postscript http://caltechcstr.library.caltech.edu/75/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/75/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-15
oai:caltechcstr.library.caltech.edu:76 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Parallel Program Design and Generalized Weakest Preconditions Lukkien, Johan J. All Records No abstract available. California Institute of Technology 1990-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-16 application/postscript http://caltechcstr.library.caltech.edu/76/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/76/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-16
oai:caltechcstr.library.caltech.edu:77 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Testing Delay-Insensitive Circuits Martin, Alain J. Hazewindus, Pieter J. All Records We show that a single stuck-at fault in a non-redundant delay-insensitive circuit results in a transition either not taking place or firing prematurely, or both, during an execution of the circuit. A transition not taking place can be tested easily, as this always prevents a transition on a primary output from taking place. A premature firing can also be tested but the addition of testing points may be required to enforce the premature firing and to propagate the transition to a primary output. Hence all single stuck-at faults are testable. All test sequences can be generated from the high-level specification of the circuit. The circuits are hazard-free in normal operation and during the tests. California Institute of Technology 1990-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-17 application/postscript http://caltechcstr.library.caltech.edu/77/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/77/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-17
oai:caltechcstr.library.caltech.edu:78 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Performance Analysis and Optimization of Asynchronous Circuits Burns, Steven M. Martin, Alain J. All Records We present a method for analyzing the time performance of asynchronous circuits, in paxticulax, those derived by program transformation from concurrent programs using the synthesis approach developed by the second author. The analysis method produces a performance metric (related to the time needed to perform an operation) in terms of the primitive gate delays of the circuit. Such a metric provides a quantitative means by which to compare competing designs. Because the gate delays are functions of transistor sizes, the performance metric can be optimized with respect to these sizes. For a large class of asynchronous circuits-including those produced by using our synthesis method-these techniques produce the global optimum of the performance metric. A CAD tool has been implemented to perform this optimization. California Institute of Technology 1990-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-18 application/postscript http://caltechcstr.library.caltech.edu/78/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/78/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1990.cs-tr-90-18
oai:caltechcstr.library.caltech.edu:80 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Weakest Preconditions for Progress Lukkien, Johan J. Van de Snepscheut, Jan L. A. All Records Predicate transformers that map the postcondition and all intermediate conditions of a command to a precondition are introduced. They can be used to specify certain progress properties of sequential programs. California Institute of Technology 1991-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-90-13 application/postscript http://caltechcstr.library.caltech.edu/80/00/postscript.ps http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-90-13
oai:caltechcstr.library.caltech.edu:81 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Performance Analysis and Optimization of Asynchronous Circuits Burns, Steven M. All Records Analytical techniques are developed to determine the performance of asynchronous digital circuits. These techniques can be used to guide the designer during the synthesis of such a circuit, leading to a high-performance, efficient implementation. Optimization techniques are also developed that further improve this implementation by determining the optimal sizes of the low-level devices (CMOS transistors) that compose the circuit. California Institute of Technology 1991-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-01 application/postscript http://caltechcstr.library.caltech.edu/81/00/postscript.ps http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-01
oai:caltechcstr.library.caltech.edu:82 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Submicron Systems Architecture: Semiannual Technical Report Seitz, Charles L. All Records No abstract available. California Institute of Technology 1991-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-03 application/postscript http://caltechcstr.library.caltech.edu/82/00/96-012.ps application/octet-stream http://caltechcstr.library.caltech.edu/82/01/96-012.pdf http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-03
oai:caltechcstr.library.caltech.edu:83 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
A Distributed Implementation of a Task Pool Hofstee, Peter H. Lukkien, Johan J. Van de Snepscheut, Jan L. A. All Records No abstract available. California Institute of Technology 1991-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-05 application/postscript http://caltechcstr.library.caltech.edu/83/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/83/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-05
oai:caltechcstr.library.caltech.edu:84 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
The Sliding Window Protocol Revisited Van de Snepscheut, Jan L. A. All Records We give a correctness proof of the sliding window protocol. Both safety and liveness properties are addressed. We show how faulty channels can be represented as nondeterministic programs. The correctness proof is given as a sequence of correctness-preserving transformations of a sequential program that satisfies the original specification, with the exception that it does not have any faulty channels. We work as long as possible with a sequential program, although the transformation steps are guided by the aim of going to a distributed program. The final transformation steps consist in distributing the actions of the sequential program over a number of processes. California Institute of Technology 1991-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-06 application/postscript http://caltechcstr.library.caltech.edu/84/00/postscript.ps http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-06
oai:caltechcstr.library.caltech.edu:85 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Inversion of a Recursive Tree Traversal Van de Snepscheut, Jan L. A. All Records A recursive algorithm for generating the prefix and infix traversaCls of a binary tree is inverted to obtain an algorithm for constructing the tree from its traversals. California Institute of Technology 1991-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-07 application/postscript http://caltechcstr.library.caltech.edu/85/00/postscript.ps http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-07
oai:caltechcstr.library.caltech.edu:86 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Asynchronous Datapaths and the Design of an Asynchronous Adder Martin, Alain J. All Records This paper presents a general method for designing delay insensitive datapath circuits. Its emphasis is on the formal derivation of a circuit from its specification. We discuss the properties required in a code that is used to transmit data asynchronously, and we introduce such a code. We introduce a general method (in the form of a theorem) for distributing the evaluation of a function over a number of concurrent cells. This method requires that the code be "distributive." We apply the method to the familiar example of a ripple-carry adder, and we give a CMOS implementation of the adder. California Institute of Technology 1991-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-08 application/postscript http://caltechcstr.library.caltech.edu/86/00/postscript.ps http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-08
oai:caltechcstr.library.caltech.edu:87 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Invariance Hints and the VC Dimension Fyfe, William John Andrew All Records We are interested in having a neural network learn an unknown function f. If the function satisfies an invariant of some sort, such as f is an odd function, then we want to be able to take advantage of this information and not have the network deduce the invariant based on an example of f. The invariant might be defined in terms of an explicit transformation of the input space under which f is constant. In this case it is possible to build a network thatnecessarily satisfies the invariant. In general, we define the invariant in terms of a partition of the input space such that if x, x' are in the same partition element then f (x) = f (x'). An example of the invariant would be a pair (x, x') taken from a single partition element. We can combine examples of the invariant with examples of the function in the learning process. The goal is to substitute examples of the invariant for examples of the function; the extent to which we can actually do this depends on the appropriate VC dimensions. Simulations verify, at least in simple cases, that examples of the invariant do aid the learning process. California Institute of Technology 1992-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-20 application/postscript http://caltechcstr.library.caltech.edu/87/00/92-20.ps application/octet-stream http://caltechcstr.library.caltech.edu/87/01/92-20.pdf http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-20
oai:caltechcstr.library.caltech.edu:88 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Combinatorial Design of Tolerant Communicaiton Structures, with Applications to Non-Blocking Switches Schweizer, David Lawrence All Records This thesis is an investigation into structures and strategies for fault-tolerant communication. We assume the existence of some set of nodes -- people, telephones, processors -- with a need to pass messages -- telephone calls, signals on a wire, data packet-- amongstthemselves. In Part I, our goal is to create a structure, that is, a pattern of interconnection, in which a designated source node can broadcast a message to (and through) a group of recipient nodes. We seek a structure in which every node has tightly limited fanout, but which is nonetheless able to function reliably even when challenged with significant numbers of node failures. The structures are described only in terms of their connectivity, and we therefore use the language of graph theory. Part 11 is based on the observation that certain transformations of the graphs in Part I produce graphs that look like previously studied structures called nonblocking switches. We show that these transformations, when applied to other graphs, yield new, easier approaches to, and proofs of, some known theorems. Part III is an independent body of work describing some investigations into possible extensions of the theory of Kolmogorov-Chaitin complexity into the foundations of pattern recognition. We prove the existence of an information theoretic metric on strings in which the distance between two strings is a measure of the amount of specification required for a universal computer to interconvert the strings. We also prove two topological theorems about this metric. California Institute of Technology 1991-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-09 application/postscript http://caltechcstr.library.caltech.edu/88/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/88/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-09
oai:caltechcstr.library.caltech.edu:89 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Submicron Systems Architecture Project :Semiannual Technical Report Seitz, Charles L. All Records No abstract available. California Institute of Technology 1991-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-10 application/postscript http://caltechcstr.library.caltech.edu/89/00/CS-TR-91-10.ps application/octet-stream http://caltechcstr.library.caltech.edu/89/01/CS-TR-91-10.pdf http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-10
oai:caltechcstr.library.caltech.edu:90 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
An Object-Oriented Real-Time Simulation of Music Performance Using Interactive Control Dyer, Lounette M. All Records This thesis addresses the problem of interactive control of real-time music performance by sound synthesizers. The approach to the problem is based on an analysis of a real world orchestra performance. The problem is decomposed into components that are one-to-one with the real world entities: a conductor, performers, instruments, a score, and parts. A detailed object-oriented design of each of the components is presented and the objects and their real world counterparts are compared. An abstract digital music representation is defined to represent the musical composition that is to be performed by the system. A realtime control mechanism is described that allows a human user to control various aspects of the performance in musically expressive ways. The model is implemented in a system called ZED, which has been shown to simulate some of the dynamic behavior of the live orchestra. Issues concerning the trade-off between runtime efficiency and runtime flexibility are addressed in detail, as well as how these issues affect real-time scheduling, Optimization techniques are presented that help insure timeliness. The object-oriented features of inheritance and encapsulation are shown to provide the system with extensibility and flexibility. Several other approaches to the problem are briefly outlined and ZED is compared with these approaches. California Institute of Technology 1991-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-11 application/postscript http://caltechcstr.library.caltech.edu/90/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/90/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-11
oai:caltechcstr.library.caltech.edu:91 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Analog VLSI Circuits for Sensorimotor Feedback DeWeerth, Stephen P. All Records This thesis presents a design framework and circuit implementations for integrating sensory and motor processing onto very large-scale integrated (VLSI) chips. The designs consist of analog circuits that are composed of bipolar and subthreshold MOS transistors. The primary emphasis in this work is the transformation from the spatially-encoded representation found in sensory images to a scalar representation that is useful for controlling motor systems. The thesis begins with a discussion of the aggregation of sensory signals and the resulting extraction of high-level features from sensory images. An integrated circuit that computes the centroid of a visual image is presented. A theoretical analysis of the function of this circuit in stimulus localization and a detailed error analysis are also presented. Next, the control of motors using pulse trains is discussed. Pulse-generating circuits for use in bidirectional motor control and the implementation of traditional control schemes are presented. A method for analyzing the operation of these controllers is also discussed. Finally, a framework for the combination of sensory aggregation and pulse-encoded outputs is presented. The need for signal normalization and circuits to perform this task are discussed. Two complete sensorimotor feedback systems are presented. California Institute of Technology 1991-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-13 application/postscript http://caltechcstr.library.caltech.edu/91/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/91/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-91-13
oai:caltechcstr.library.caltech.edu:92 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Synthesis of Asynchronous VLSI Circuits Martin, Alain J. All Records No abstract available. California Institute of Technology 1991-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-93-28 application/postscript http://caltechcstr.library.caltech.edu/92/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/92/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1991.cs-tr-93-28
oai:caltechcstr.library.caltech.edu:93 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
A Tutorial Introduction to Mosaic Pascal Lukkien, Johan J. Van de Snepscheut, Johan L. A. All Records No abstract available. California Institute of Technology 1992-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-91-02 application/postscript http://caltechcstr.library.caltech.edu/93/00/postscript.ps http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-91-02
oai:caltechcstr.library.caltech.edu:95 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
A LISP Programming Exercise Van de Snepscheut, Jan L. A. All Records We present the derivation of a solution to a LISP programming exercise. The derivation is in three steps. First, an inefficient solution is given. Second, the quintessence of a more efficient solution is captured in a number of equalities. Third, an efficient solution is derived from the inefficient one by a number of transformation steps, each of which is justified by the equalities. California Institute of Technology 1992-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-91-04 application/postscript http://caltechcstr.library.caltech.edu/95/00/postscript.ps http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-91-04
oai:caltechcstr.library.caltech.edu:96 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Delay-Insensitive Multiply-Accumulate Unit Nielsen, Christian D. Martin, Alain J. All Records No abstract available. California Institute of Technology 1992-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-03 application/postscript http://caltechcstr.library.caltech.edu/96/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/96/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-03
oai:caltechcstr.library.caltech.edu:98 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
A Simple Simulator for Multicomputer Routing Networks Pertel, Michael J. All Records This report describes a concise program for simulating multicomputer routing networks [1]. The simulator is written in less than 200 lines of C code, and a complete listing is provided. Despite being terse, the simulator is exact, fast, and requires little memory. California Institute of Technology 1992-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-04 application/postscript http://caltechcstr.library.caltech.edu/98/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/98/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-04
oai:caltechcstr.library.caltech.edu:99 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Mesh Distance Formulae Pertel, Michael J. All Records A table of useful summation formulae are derived, together with a Mathematica package for producing them. The distance distribution in mesh routing networks is derived. The mean and variance of the distance distribution are computed. A program for computing the distance distribution of any mesh is presented. California Institute of Technology 1992-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-05 application/postscript http://caltechcstr.library.caltech.edu/99/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/99/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-05
oai:caltechcstr.library.caltech.edu:100 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Material Classification of Magnetic Resonance Volume Data Laidlaw, David H. All Records A major unsolved problem in computer graphics is that of making high-quality models. Traditionally, models have consisted of interactively or algorithmically described collections of graphics primitives such as polygons. The process of constructing these models is painstaking and often misses features and behavior that we wish to model. Models extracted from volume data collected from real, physical objects have the potential to show features and behavior that are difficult to capture using these traditional modeling methods. We use vector-valued magnetic resonance volume data in this thesis. The process of extracting models from such data involves four main steps: collecting the sampled volume data; preprocessing it to reduce artifacts from the collection process; classifying materials within the data; and creating either a rigid geometric model that is static, or a flexible, dynamic model that can be simulated. In this thesis we focus on the the first three steps. We present guidelines and techniques for collecting and processing magnetic resonance data to meet the needs of the later steps. Our material classification and model extraction techniques work better when the data values for a given material are constant throughout the dataset, when data values for different materials are different, and when the dataset is free of aliasing artifacts and noise. We present a new material-classification method that operates on vector-valued volume data. The method produces a continuous probability function for each material over the volume of the dataset, and requires no expert interaction to teach it different material classes. It operates by fitting peaks in the histogram of a collected dataset using parameterized gaussian bumps, and by using Bayes' law to calculate material probabilities, with each gaussian bump representing one material. To illustrate the classification method, we apply it to real magnetic resonance data of a human head, a human hand, a banana, and a jade plant. From the classified data, we produce "computationally stained" slices that discriminate among materials better than do the original grey-scale versions. We also generate volume-rendered images of classified datasets clearly showing different anatomical features of various materials. Finally, we extract preliminary static and dynamic geometric models of different tissues. California Institute of Technology 1992-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-21 application/postscript http://caltechcstr.library.caltech.edu/100/00/92-21.ps application/octet-stream http://caltechcstr.library.caltech.edu/100/01/92-21.pdf http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-21
oai:caltechcstr.library.caltech.edu:102 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
A Critique of Adaptive Routing Pertel, Michael J. All Records This report refutes claims that adaptive routing performs better than dimension-order routing. Simulation results are presented that show dimension-order routing achieves both higher throughput and lower latency than adaptive routing. Specious claims for the advantages of adaptive routing are critiqued. California Institute of Technology 1992-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-06 application/postscript http://caltechcstr.library.caltech.edu/102/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/102/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-06
oai:caltechcstr.library.caltech.edu:103 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Affinity: A Concurrent Programming System for Multicomputers Steele, Craig S. All Records Affinity is an experiment to explore a simple, convenient, and expressive programming model that provides adequate power for complex programming tasks while setting few constraints on potential concurrency. Although the programmer is required to formulate a computational problem explicitly into medium-sized pieces of data and code, most of the additional functions necessary for concurrent execution are implicit. The execution of the light-weight, reactive processes, called actions, implicitly induces atomicity and consistency of data modifications. The programmer accesses shared data structures in a shared-memory fashion, but without the need for explicit locking to manage the problems of concurrent access and mutual exclusion. Program control flow is distributed and implicit. The name given to the programming model, Affinity, has a definition, "causal connection or relationship," that is fitting to the way programs are structured and scheduled. Affinity consistency and coherence properties provide a tractable discipline for the dangerous power of a concurrent, shared-memory programming style. Existing programming complexity-management techniques such as object-oriented languages can be used in this multicomputer environment. Affinity programs can compute consistent and correct results despite staleness of data, and asynchrony and nondeterminism in execution of code. Program correctness is invariant under replication, or cloning, of actions. This aspect of the model yields a simple and robust mechanism for fault- tolerance. The practicality of the Affinity programming model has been demonstrated by an implementation on a second-generation multicomputer, the Ametek S/2010. The implementation is distributed, scalable, and relatively insensitive to network latency. Affinity has demonstrated reasonable efficiency and performance for computations with tens of processing nodes, hundreds of actions, and thousands of shared data structures. California Institute of Technology 1992-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-08 application/postscript http://caltechcstr.library.caltech.edu/103/00/92-08a.ps application/octet-stream http://caltechcstr.library.caltech.edu/103/01/92-08a.pdf http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-08
oai:caltechcstr.library.caltech.edu:104 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Mutual Exclusion in a Token Ring in CC++ Binau, Ulla All Records This report describes a first attempt at using UNITY to verify reactive Compositional C++ (CC++) programs. We propose a distributed solution to the mutual exclusion problem using partially synchronous communication channels. The solution is described as a CC++ program, from which a small set of "basic" properties is derived. Using UNITY, we proof mutual exclusion and progress of the solution based on the set of properties derived from the code. California Institute of Technology 1992-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-11 application/postscript http://caltechcstr.library.caltech.edu/104/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/104/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-11
oai:caltechcstr.library.caltech.edu:105 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Compositional C++: Compositional Parallel Programming Chandy, K. Mani Kesselman, Carl All Records A compositional parallel program is a program constructed by composing component programs in parallel, where the composed program inherits properties of its components. In this paper, we describe a small extension of C++ called Compositional C++ or CC++ which is an object-oriented notation that supports compositional parallel programming. CC++ integrates different paradigms of parallel programming: data-parallel, task-parallel and object-parallel paradigms; imperative and declarative programming; shared memory and messagebased programs. CC++ is designed to be transportable across a range of MIMD architectures. California Institute of Technology 1992-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-13 application/postscript http://caltechcstr.library.caltech.edu/105/00/postscript.ps http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-13
oai:caltechcstr.library.caltech.edu:106 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Testing Delay-Insensitive Circuits Hazewindus, Pieter Johannes All Records A method is developed to test delay-insensitive circuits, using the single stuck-at fault model. These circuits are synthesized from a high-level specification. Since the circuits are hazard-free by construction, there is no test for hazards in the circuit. Most faults cause the circuit to halt during test, since they cause an acknowledgement not to occur when it should. There are stuck-at faults that do not cause the circuit to halt under any condition. These are stimulating faults; they cause a premature firing of a production rule. For such a stimulating fault to be testable, the premature firing has to be propagated to a primary output. If this is not guaranteed to occur, then one or more test points have to be added to the circuit. Any stuck-at fault is testable, with the possible addition of test points. For combinational delay-insensitive circuits, finding test vectors is reduced to the same problem as for synchronous combinational logic. For sequential circuits, the synthesis method is used to find a test for each fault efficiently, to find the location of the test points, and to find a test that detects all faults in a circuit. The number of test points needed to fully test the circuit is very low, and the size of the additional testing circuitry is small. A test derived with a simple transformation of the handshaking expansion yields high fault coverage. Adding tests for the remaining faults results in a small complete test for the circuit. California Institute of Technology 1992-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-14 application/postscript http://caltechcstr.library.caltech.edu/106/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/106/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-14
oai:caltechcstr.library.caltech.edu:107 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Constructing some Distributed Programs Hofstee, H. Peter All Records No abstract available. California Institute of Technology 1992-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-16 application/postscript http://caltechcstr.library.caltech.edu/107/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/107/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-16
oai:caltechcstr.library.caltech.edu:108 2001-04-25 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
Submicron Systems Architecture Project : Semiannual Technical Report Seitz, Charles L. Martin, Alain Van de Snepscheut, Jan L. A. All Records No abstract. California Institute of Technology 1992-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-17 application/octet-stream http://caltechcstr.library.caltech.edu/108/01/cs-92-17fin.pdf http://resolver.caltech.edu/CaltechCSTR:1992.cs-tr-92-17
archive/100/1704605/oai_dc
idzebra-2.0.44/examples/oai-pmh/data/debug-record.xml0000644000175000017500000001136211412332551017307 00000000000000
oai:caltechcstr.library.caltech.edu:4 2003-12-12 7374617475733D756E707562 7375626A656374733D656E676E2D636D7074
A Language Processor and a Sample Language Ayres, Ronald All Records This thesis explores shared data in list structures and ambiguity in language processing. Tolerance of ambiguity is necessary to support clear and modular expression. Data sharing is necessary to support ambiguity efficiently. Data sharing is useful also in compiled programs to save memory and time. Let us define some terms. A rewrite grammar is a set of replacement rules each of which specifies that a given phrase may be replaced by another given phrase. Each replacement rule expresses a local translation. A parser finds those sequences of replacements that bring a given text to a machine handleable form. Each such sequence represents a meaning or interpretation for the given text. Tolerance of ambiguity or multiple interpretations for a given text is necessary so that subsequent processing can place further constraints upon the input text. This thesis presents a parser which efficiently, handles general-rewrite grammars. To conserve computer time and memory, only essential differences among multiple interpretations are represented and processed. If several interpretations for a given text are valid, the parser yields a meaning which represents the ambiguity as, locally as possible. Even an exponential number of distinct meanings may be represented in a polynomial amount of memory. This thesis also presents a language processing system which supports semantic processing via independent rewrite grammars. Each grammar represents a distinct aspect of the language. A given sequence of grammars becomes a sequence of passes, or process steps. Each pass derives a meaning with respect to one grammar and uses that meaning to generate phrases which will be interpreted by the next pass. Although linguistic specification is usually done with context-free grammars, features of this parser which support general-rewrite grammars are essential for the integration of passes. Not only ambiguity, but also the locality of ambiguity is preserved from one pass to the next. It is necessary to preserve locality of ambiguity in order to avoid explosive computation arising from useless action among independent sets of interpretations. I have implemented a general-purpose programming language called ICL with this system. The fact that ICL's datatypes are processed by a rewrite grammar makes it simple to implement both user-defined datatype coercions and functions known as polymorphic operators whose definitions depend on parameter datatypes. Datatype coercions and Polymorphic operators reduce the amount,of specification required in algorithms to such an extent that a user can often modify declarations and achieve optimizations and changes in concept without modifying his algorithmic specification. ICL includes a simple and safe policy about pointers so that the user can ignore their existence completely if he wishes. ICL automatically maximizes data sharing and minimizes copying by adopting a "copy on write" policy. This policy supports the illusion that each and every reference to a data structure generates a complete copy of that data structure. This same technique is used in the language processor itself to facilitate data sharing among multiple interpretations in ambiguous cases. California Institute of Technology 1978-01-01 Monograph NonPeerReviewed http://resolver.caltech.edu/CaltechCSTR:1978.2276-tr-78 application/postscript http://caltechcstr.library.caltech.edu/4/00/postscript.ps application/octet-stream http://caltechcstr.library.caltech.edu/4/01/postscript.pdf http://resolver.caltech.edu/CaltechCSTR:1978.2276-tr-78
idzebra-2.0.44/examples/oai-pmh/data/debug-utf8-record.xml0000644000175000017500000000400311412332551020165 00000000000000 2005-12-20T08:40:20Z http://caltechcstr.library.caltech.edu/perl/oai2
oai:zebra.debug:blåbærgrød<&!/> 2006-11-12 xx7374617475733D756E707562 xx7375626A656374733D656E676E2D636D7074
Danske processeringsfejl med blåbærgrød Index Data blåbærgrød og <&!/> blåbærkage Ingredienser: 3 æg 3 dl sukker 3 dl mel 1 tsk bagepulver ½ tsk stødt kardemomme ½ tsk stødt ingefær 100 g smør 250 g blåbær ½ dl sukker Pisk æg og sukker luftigt og rør mel, bagepulver og krydderier i. Smelt smørret og rør det i dejen, som fyldes i en smurt form. Drys med bær og sukker og bag kagen ved 180 grader i ca 30 minutter. Fremstillingstid - 40 minutter Index data ApS 2006-11-12 Test NonPeerReviewed http://www.indexdata.com/zebra/doc
idzebra-2.0.44/examples/oai-pmh/README0000644000175000017500000001473611412332551014202 00000000000000Example DOM XML filter configuration using XSLT stylesheets Get some more data to play with: cd data fetch_OAI_data.sh (stop the script when you get tired waiting ..) cd ../ Checking manually the retrieval stylesheets: cat data/debug-record.xml xsltproc conf/oai2dc.xsl data/debug-record.xml xsltproc conf/oai2zebra.xsl data/debug-record.xml Checking manually the indexing stylesheet: xsltproc conf/oai2index.xsl data/debug-record.xml Indexing: zebraidx -c conf/zebra.cfg init zebraidx -c conf/zebra.cfg update data zebraidx -c conf/zebra.cfg commit (in case you have not installed zebra yet, use the following command: ../../index/zebraidx -c conf/zebra.cfg this and that .. ) Starting the SRU/SRW/Z39.50 server in PQF mode only: zebrasrv -c conf/zebra.cfg Or, alternatively, starting the SRU/SRW/Z39.50 server including PQF and CQL query configuration: zebrasrv -f yazserver.xml Z39.50 search: yaz-client localhost:9999 Z> format xml Z> querytype prefix Z> elements oai Z> find the Z> show 1+1 Z39.50 presents using presentation stylesheets: Z> elements dc Z> show 2+1 Z> elements zebra Z> show 3+1 Z39.50 buildin Zebra presents (in this configuration only if started without yaz-frontendserver): Z> elements zebra::meta Z> show 4+1 Z> elements zebra::meta::sysno Z> show 5+1 Z> format sutrs Z> show 5+1 Z> format xml Z> elements zebra::index Z> show 6+1 Z> elements zebra::snippet Z> show 7+1 Z> elements zebra::facet::any:w Z> show 8+1 Z> elements zebra::facet::any:w,dc_title:w Z> show 9+1 Z39.50 searches targeted at specific indexes Z> elements zebra Z> find @attr 1=oai_identifier @attr 4=3 oai:caltechcstr.library.caltech.edu:4 Z> show 1+1 Z> find @attr 1=oai_datestamp @attr 4=3 2001-04-20 Z> show 1+1 Z> find @attr 1=oai_setspec @attr 4=3 7374617475733D756E707562 Z> show 1+1 Z> find @attr 1=dc_title communication Z> show 1+1 Z> find @attr 1=dc_identifier @attr 4=3 http://resolver.caltech.edu/CaltechCSTR:1986.5228-tr-86 Z> show 1+1 etc, etc. Notice that all indexes defined by 'type="0"' in the indexing style sheet must be searched using the '@attr 4=3' structure attribute instruction. Notice also that searching and scan on indexes 'dc_contributor', 'dc_language', 'dc_rights', and 'dc_source' fails, simply because none of the records in this example set have these fields set, and consequently, these indexes are _not_ created. XXXXXXXX Z39.50 scan: yaz-client localhost:9999 Z> format xml Z> querytype prefix Z> scan @attr 1=oai_identifier @attr 4=3 oai Z> scan @attr 1=oai_datestamp @attr 4=3 1 Z> scan @attr 1=oai_setspec @attr 4=3 2000 Z> Z> scan @attr 1=dc_title communication Z> scan @attr 1=dc_identifier @attr 4=3 a etc, etc, Z39.50 search using server-side CQL conversion: Z> format xml Z> querytype cql Z> elements dc Z> Z> find harry Z> Z> find creator = the Z> find dc.creator = the Z> find title = the Z> Z> find description < the Z> find title le some Z> find title ge some Z> find title > some Z> Z> find identifier eq "http://resolver.caltech.edu/CaltechCSTR:1978.2276-tr-78" Z> find relation eq something etc, etc. Notice that all indexes defined by 'type="0"' in the indexing style sheet must be searched using the 'eq' relation. Z> find title <> and fails as well. ??? Z39.50 scan using server side CQL conversion: Unfortunately, this will _never_ work as it is not supported by the Z39.50 standard. If you want to use scan using server side CQL conversion, you need to make an SRW connection using yaz-client, or a SRU connection using REST Web Services - any browser will do. SRU Explain ZeeRex response: http://localhost:9999/ http://localhost:9999/?version=1.1&operation=explain SRU Search Retrieve records: http://localhost:9999/?version=1.1&operation=searchRetrieve &query=creator=adam http://localhost:9999/?version=1.1&operation=searchRetrieve &query=date=1978-01-01 &startRecord=1&maximumRecords=1&recordSchema=dc http://localhost:9999/?version=1.1&operation=searchRetrieve &query=dc.title=the http://localhost:9999/?version=1.1&operation=searchRetrieve &query=description=the relation tests: http://localhost:9999/?version=1.1&operation=searchRetrieve &query=title%3Cthe SRU scan: http://localhost:9999/?version=1.1&operation=scan&scanClause=title=a http://localhost:9999/?version=1.1&operation=scan &scanClause=identifier%20eq%20a Notice: you need to use the 'eq' relation for all @attr 4=3 indexes SRW explain with CQL index points: Z> open http://localhost:9999 Z> explain Notice: when opening a connection using the 'http.//' prefix, yaz-client uses SRW SOAP connections, and 'form xml' and 'querytype cql' are implicitely set. SRW search using implicit server side CQL: Z> open http://localhost:9999 Z> find identifier eq "http://resolver.caltech.edu/CaltechCSTR:1978.2276-tr-78" Z> find description < the In SRW connection mode, the follwing fails due to problem in yaz-client: Z> elements dc Z> s 1+1 SRW scan using implicit server side CQL: yaz-client http://localhost:9999 Z> scan title = communication Z> scan identifier eq a Notice: you need to use the 'eq' relation for all @attr 4=3 indexes SRW search using X-PQF query http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=dc http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::data http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::meta http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::index::dc_description http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::snippet http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::facet::dc_description:w idzebra-2.0.44/examples/oai-pmh/Makefile.in0000644000175000017500000003564311412336424015372 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = examples/oai-pmh DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(oaiconfdatadir)" \ "$(DESTDIR)$(oaidatadir)" "$(DESTDIR)$(oaidatadatadir)" DATA = $(oaiconfdata_DATA) $(oaidata_DATA) $(oaidatadata_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ oaidatadir = $(datadir)/$(PACKAGE)$(PACKAGE_SUFFIX)-examples/oai-pmh oaiconfdatadir = $(datadir)/$(PACKAGE)$(PACKAGE_SUFFIX)-examples/oai-pmh/conf oaidatadatadir = $(datadir)/$(PACKAGE)$(PACKAGE_SUFFIX)-examples/oai-pmh/data oaidata_DATA = README oaiconfdata_DATA = \ conf/cql2pqf.txt \ conf/dom-conf.xml \ conf/explain2cqlpqftxt.xsl \ conf/explain.xml \ conf/oai2dc.xsl \ conf/oai2index.xsl \ conf/oai2zebra.xsl \ conf/yazserver.xml \ conf/zebra.cfg oaidatadata_DATA = data/debug-record.xml \ data/debug-utf8-record.xml \ data/fetch_OAI_data.sh \ data/oai-caltech.xml EXTRA_DIST = $(oaidata_DATA) $(oaiconfdata_DATA) $(oaidatadata_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/oai-pmh/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/oai-pmh/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-oaiconfdataDATA: $(oaiconfdata_DATA) @$(NORMAL_INSTALL) test -z "$(oaiconfdatadir)" || $(MKDIR_P) "$(DESTDIR)$(oaiconfdatadir)" @list='$(oaiconfdata_DATA)'; test -n "$(oaiconfdatadir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(oaiconfdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(oaiconfdatadir)" || exit $$?; \ done uninstall-oaiconfdataDATA: @$(NORMAL_UNINSTALL) @list='$(oaiconfdata_DATA)'; test -n "$(oaiconfdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(oaiconfdatadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(oaiconfdatadir)" && rm -f $$files install-oaidataDATA: $(oaidata_DATA) @$(NORMAL_INSTALL) test -z "$(oaidatadir)" || $(MKDIR_P) "$(DESTDIR)$(oaidatadir)" @list='$(oaidata_DATA)'; test -n "$(oaidatadir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(oaidatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(oaidatadir)" || exit $$?; \ done uninstall-oaidataDATA: @$(NORMAL_UNINSTALL) @list='$(oaidata_DATA)'; test -n "$(oaidatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(oaidatadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(oaidatadir)" && rm -f $$files install-oaidatadataDATA: $(oaidatadata_DATA) @$(NORMAL_INSTALL) test -z "$(oaidatadatadir)" || $(MKDIR_P) "$(DESTDIR)$(oaidatadatadir)" @list='$(oaidatadata_DATA)'; test -n "$(oaidatadatadir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(oaidatadatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(oaidatadatadir)" || exit $$?; \ done uninstall-oaidatadataDATA: @$(NORMAL_UNINSTALL) @list='$(oaidatadata_DATA)'; test -n "$(oaidatadatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(oaidatadatadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(oaidatadatadir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(oaiconfdatadir)" "$(DESTDIR)$(oaidatadir)" "$(DESTDIR)$(oaidatadatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-oaiconfdataDATA install-oaidataDATA \ install-oaidatadataDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-oaiconfdataDATA uninstall-oaidataDATA \ uninstall-oaidatadataDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-oaiconfdataDATA install-oaidataDATA \ install-oaidatadataDATA install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-oaiconfdataDATA \ uninstall-oaidataDATA uninstall-oaidatadataDATA conf/cql2pqf.txt: conf/explain2cqlpqftxt.xsl conf/explain.xml xsltproc conf/explain2cqlpqftxt.xsl conf/explain.xml > conf/cql2pqf.txt clean: rm -f tmp/*.mf tmp/*..LCK zebrasrv.pid # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/examples/zthes/0000755000175000017500000000000011412336535013200 500000000000000idzebra-2.0.44/examples/zthes/Zthes.abs0000644000175000017500000000072011057500746014705 00000000000000attset zthes.att attset bib1.att xpath enable systag sysno none xelm /Zthes/termId termId:w xelm /Zthes/termName termName:w,title:w xelm /Zthes/termQualifier termQualifier:w xelm /Zthes/termType termType:w xelm /Zthes/termLanguage termLanguage:w xelm /Zthes/termNote termNote:w xelm /Zthes/termCreatedDate termCreatedDate:w xelm /Zthes/termCreatedBy termCreatedBy:w xelm /Zthes/termModifiedDate termModifiedDate:w xelm /Zthes/termModifiedBy termModifiedBy:w idzebra-2.0.44/examples/zthes/dino.tree0000644000175000017500000001001111057500746014725 00000000000000Dinosauria The MRCA of Saurischia and Ornithischia, and its descendants *** Eoraptor The most basal known dinosaur Saurischia Everything closer to Megalosaurus than to Iguanodon Sauropodomorpha Sauropods and their ancestors and close relatives Brontosauria Plateosauria Massospondylidae Yunnanosaurinae *** Yunnanosaurus Sauropoda Huge, long-necked herbivores Eusauropoda *** Jobaria A surprisingly primitive Early Cretaceous form Neosauropoda Diplodocimorpha Diplodocus, Apatosaurus, Seismosaurus and kin Rebbachisauridae Rebbachisaurinae *** Rebbachisaurus Had a sail on its back Macronaria Camarasauromorpha Titanosauriformes Brachiosauridae *** Sauroposeidon The tallest known dinosaur (18m) Titanosauria Eutitanosauria *** Argentinosaurus The heaviest known dinosaur (100 tonnes) Theropoda Bipedal carnivores Neotheropoda Ceratosauria May be polyphyletic if neoceratosaurs are tenanuran Coelophysoidea Coelophysidae Coelophysinae *** Dilophosaurus Had a pair of long crests on its nose Neoceratosauria *** Xenotarsosaurus Tetanurae Spinosauria Large carnivores with sails on their backs Spinosauridae Spinosaurinae Irritatorini *** Irritator Avetheropoda aka. Neotetanurae Carnosauria Previously used just to mean "large theropods" *** Fukuiraptor Allosauroidea Allosauridae Carcharodontosaurinae Some consider these animals derived abelisaurs *** Giganotosaurus Probably the heaviest known theropod Coelurosauria Previously used just to mean "small theropods" Maniraptoriformes [unnamed] Unnamed clade {Ornithomimosauria+Tyrannosauria} Arctometatarsalia Ornithomimosauria *** Harpymimus Tyrannosauroidea Includes early form Eotyrannus Tyrannosauridae Tyrannosaurinae Tyrannosaurini Could be defined as {Tyrannosaurs+Tarbosaurus} *** Tyrannosaurus Maniraptora Oviraptorosauria Includes Caenagnathidae Oviraptoridae *** Oviraptor Some specimens found brooding their nests Therizinosauria Truly freaky long-necked, huge-clawed fatsos Therizinosauroidea Therizinosauridae *** Nanshiungosaurus Paraves Eumaniraptora Deinonychosauria Troodontidae Highest encephalisation quotient on known dinos *** Byronosaurus Dromaeosauridae Velociraptorinae *** Velociraptor Much smaller in real life than in Jurassic Park Avialae Aves Birds, including modern birds Metornithes Alvarezsauria Short, stong args; long, gracile legs. Weird Alvarezsauridae Mononykinae Hands had only a single, spike-like finger *** Parvicursor Ornithischia Everything closer to Iguanodon than to Megalosaurus Genasauria Thyreophora The armoured dinosaurs, ankylosaurs and stegosaurs Thyreophoroidea Eurypoda Stegosauria Single or double row of plates down the back Stegosauridae *** Kentrosaurus Had spikes on its back instead of plates Ankylosauria Heavily armoured, above and below *** Minmi Cerapoda Defined as {Triceratops+Iguanodon} Marginocephalia Defined as {Triceratops+Pachycephalosaurus} Ceratopsia Neoceratopsia Everything closer to Triceratops than to Psittacosaurus *** Udanoceratops Coronosauria Ceratopsoidea Ceratopsomorpha Ceratopsidae {Chasmosaurinae+Centrosaurinae} *** Zuniceratops Pachycephalosauria Thick-headed, wide-bodied herbivorous bipeds *** Wannanosaurus Ornithopoda The least interesting of all the dinosaur groups *** Qantassaurus A profoundly dull basal ornithopod Euornithopoda Iguanodontia Euiguanodontia Dryomorpha Ankylopollexia Styracosterna *** Lurdosaurus Looks a lot like a fat Iguanodon Iguanodontoidea Hadrosauroidea Hadrosauridae Euhadrosauria Lambeosaurs (crested) + Hadrosaurs (not) Lambeosaurinae The least dull of all the ornithopods Lambeosaurini *** Corythosaurus idzebra-2.0.44/examples/zthes/Makefile.am0000644000175000017500000000077711057500746015171 00000000000000EXTRA_DIST = zebra.cfg Zthes.abs zthes.att tree2xml.pl dino.tree # optional: tagsetg-zthes.tag tagsetm-zthes.tag zthes.tag dino: reci-0.mf reci-0.mf: records/dino.xml ../../index/zebraidx init ../../index/zebraidx update records $(srcdir)/records/dino.xml: tree2xml.pl dino.tree ./tree2xml.pl $(srcdir)/dino.tree > $(srcdir)/records/dino.xml clean: rm -f records/dino.xml *.mf *.LCK zebrasrv.pid dist-hook: records/dino.xml -mkdir $(distdir)/records cp $(srcdir)/records/dino.xml $(distdir)/records idzebra-2.0.44/examples/zthes/zebra.cfg0000644000175000017500000000012111412332551014670 00000000000000profilePath: .:../../tab recordType: grs.sgml attset: zthes.att attset: bib1.att idzebra-2.0.44/examples/zthes/zthes.att0000644000175000017500000000141211412332551014757 00000000000000# Zthes-1 Attribute Set name zthes reference Zthes att 1 termQualifier att 2 termType att 3 thesAdmin att 4 relatedTermID # ### The remainder of these "access points" are not really in the # Zthes attribute set: see the definition in the profile at # http://zthes.z3950.org/profile/current.html#3.5 # They're just here (for now) to shut Zebra up with all the # Couldn't find att 'termId' in attset # messages that it emits, until such time as we add the tab # files for the Utility and Cross Domain attribute sets (which, # by the way, I can't believe are not yet part of the Zebra # distribution.) att 1001 termId att 1002 termName att 1003 termLanguage att 1004 termNote att 1005 termCreatedDate att 1006 termCreatedBy att 1007 termModifiedDate att 1008 termModifiedBy idzebra-2.0.44/examples/zthes/Makefile.in0000644000175000017500000002527211412336424015172 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = examples/zthes DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ EXTRA_DIST = zebra.cfg Zthes.abs zthes.att tree2xml.pl dino.tree all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/zthes/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/zthes/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ dist-hook distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # optional: tagsetg-zthes.tag tagsetm-zthes.tag zthes.tag dino: reci-0.mf reci-0.mf: records/dino.xml ../../index/zebraidx init ../../index/zebraidx update records $(srcdir)/records/dino.xml: tree2xml.pl dino.tree ./tree2xml.pl $(srcdir)/dino.tree > $(srcdir)/records/dino.xml clean: rm -f records/dino.xml *.mf *.LCK zebrasrv.pid dist-hook: records/dino.xml -mkdir $(distdir)/records cp $(srcdir)/records/dino.xml $(distdir)/records # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/examples/zthes/tree2xml.pl0000755000175000017500000000332411057500746015226 00000000000000#!/usr/bin/perl -w use strict; package Node; sub new { my $class = shift(); my($name, $id, $parent, $note) = @_; my $this = bless { name => $name, id => $id, parent => $parent, children => [], note => $note }, $class; push @{ $parent->{children} }, $this if defined $parent; return $this; } sub walk { my $this = shift(); my($coderef) = @_; &$coderef($this); foreach my $child (@{ $this->{children} }) { $child->walk($coderef) } } sub write_zthes { my $this = shift(); print "\n"; $this->write_term(1); my $note = $this->{note}; print " $note\n" if defined $note; my $parent = $this->{parent}; if (defined $parent) { $parent->write_relation('BT'); } foreach my $child (@{ $this->{children} }) { $child->write_relation('NT'); } print "\n"; } sub write_relation { my $this = shift(); my($type) = @_; print " \n"; print " $type\n"; $this->write_term(2); print " \n"; } sub write_term { my $this = shift(); my($level) = @_; print ' ' x $level, "", $this->{id}, "\n"; print ' ' x $level, "", $this->{name}, "\n"; print ' ' x $level, "PT\n"; } package main; my @stack; my $id = 1; while (<>) { chomp(); s/\t/ /g; s/^( *)//; my $level = length($1); s/^\*+ //; my $note = undef; if (s/[ \t]+(.*)//) { $note = $1; } my $parent = undef; $parent = $stack[$level-1] if $level > 0; $stack[$level] = new Node($_, $id++, $parent, $note); } $stack[0]->walk(\&Node::write_zthes); idzebra-2.0.44/examples/zthes/records/0000755000175000017500000000000011412336535014641 500000000000000idzebra-2.0.44/examples/zthes/records/dino.xml0000644000175000017500000013665511412336535016254 00000000000000 1 Dinosauria PT The MRCA of Saurischia and Ornithischia, and its descendants NT 2 Eoraptor PT NT 3 Saurischia PT NT 82 Ornithischia PT 2 Eoraptor PT The most basal known dinosaur BT 1 Dinosauria PT 3 Saurischia PT Everything closer to Megalosaurus than to Iguanodon BT 1 Dinosauria PT NT 4 Sauropodomorpha PT NT 26 Theropoda PT 4 Sauropodomorpha PT Sauropods and their ancestors and close relatives BT 3 Saurischia PT NT 5 Brontosauria PT 5 Brontosauria PT BT 4 Sauropodomorpha PT NT 6 Plateosauria PT NT 10 Sauropoda PT 6 Plateosauria PT BT 5 Brontosauria PT NT 7 Massospondylidae PT 7 Massospondylidae PT BT 6 Plateosauria PT NT 8 Yunnanosaurinae PT 8 Yunnanosaurinae PT BT 7 Massospondylidae PT NT 9 Yunnanosaurus PT 9 Yunnanosaurus PT BT 8 Yunnanosaurinae PT 10 Sauropoda PT Huge, long-necked herbivores BT 5 Brontosauria PT NT 11 Eusauropoda PT 11 Eusauropoda PT BT 10 Sauropoda PT NT 12 Jobaria PT NT 13 Neosauropoda PT 12 Jobaria PT A surprisingly primitive Early Cretaceous form BT 11 Eusauropoda PT 13 Neosauropoda PT BT 11 Eusauropoda PT NT 14 Diplodocimorpha PT NT 18 Macronaria PT 14 Diplodocimorpha PT Diplodocus, Apatosaurus, Seismosaurus and kin BT 13 Neosauropoda PT NT 15 Rebbachisauridae PT 15 Rebbachisauridae PT BT 14 Diplodocimorpha PT NT 16 Rebbachisaurinae PT 16 Rebbachisaurinae PT BT 15 Rebbachisauridae PT NT 17 Rebbachisaurus PT 17 Rebbachisaurus PT Had a sail on its back BT 16 Rebbachisaurinae PT 18 Macronaria PT BT 13 Neosauropoda PT NT 19 Camarasauromorpha PT 19 Camarasauromorpha PT BT 18 Macronaria PT NT 20 Titanosauriformes PT 20 Titanosauriformes PT BT 19 Camarasauromorpha PT NT 21 Brachiosauridae PT NT 23 Titanosauria PT 21 Brachiosauridae PT BT 20 Titanosauriformes PT NT 22 Sauroposeidon PT 22 Sauroposeidon PT The tallest known dinosaur (18m) BT 21 Brachiosauridae PT 23 Titanosauria PT BT 20 Titanosauriformes PT NT 24 Eutitanosauria PT 24 Eutitanosauria PT BT 23 Titanosauria PT NT 25 Argentinosaurus PT 25 Argentinosaurus PT The heaviest known dinosaur (100 tonnes) BT 24 Eutitanosauria PT 26 Theropoda PT Bipedal carnivores BT 3 Saurischia PT NT 27 Neotheropoda PT 27 Neotheropoda PT BT 26 Theropoda PT NT 28 Ceratosauria PT NT 35 Tetanurae PT 28 Ceratosauria PT May be polyphyletic if neoceratosaurs are tenanuran BT 27 Neotheropoda PT NT 29 Coelophysoidea PT NT 33 Neoceratosauria PT 29 Coelophysoidea PT BT 28 Ceratosauria PT NT 30 Coelophysidae PT 30 Coelophysidae PT BT 29 Coelophysoidea PT NT 31 Coelophysinae PT 31 Coelophysinae PT BT 30 Coelophysidae PT NT 32 Dilophosaurus PT 32 Dilophosaurus PT Had a pair of long crests on its nose BT 31 Coelophysinae PT 33 Neoceratosauria PT BT 28 Ceratosauria PT NT 34 Xenotarsosaurus PT 34 Xenotarsosaurus PT BT 33 Neoceratosauria PT 35 Tetanurae PT BT 27 Neotheropoda PT NT 36 Spinosauria PT NT 41 Avetheropoda PT 36 Spinosauria PT Large carnivores with sails on their backs BT 35 Tetanurae PT NT 37 Spinosauridae PT 37 Spinosauridae PT BT 36 Spinosauria PT NT 38 Spinosaurinae PT 38 Spinosaurinae PT BT 37 Spinosauridae PT NT 39 Irritatorini PT 39 Irritatorini PT BT 38 Spinosaurinae PT NT 40 Irritator PT 40 Irritator PT BT 39 Irritatorini PT 41 Avetheropoda PT aka. Neotetanurae BT 35 Tetanurae PT NT 42 Carnosauria PT NT 48 Coelurosauria PT 42 Carnosauria PT Previously used just to mean "large theropods" BT 41 Avetheropoda PT NT 43 Fukuiraptor PT NT 44 Allosauroidea PT 43 Fukuiraptor PT BT 42 Carnosauria PT 44 Allosauroidea PT BT 42 Carnosauria PT NT 45 Allosauridae PT 45 Allosauridae PT BT 44 Allosauroidea PT NT 46 Carcharodontosaurinae PT 46 Carcharodontosaurinae PT Some consider these animals derived abelisaurs BT 45 Allosauridae PT NT 47 Giganotosaurus PT 47 Giganotosaurus PT Probably the heaviest known theropod BT 46 Carcharodontosaurinae PT 48 Coelurosauria PT Previously used just to mean "small theropods" BT 41 Avetheropoda PT NT 49 Maniraptoriformes PT 49 Maniraptoriformes PT BT 48 Coelurosauria PT NT 50 [unnamed] PT NT 59 Maniraptora PT 50 [unnamed] PT Unnamed clade {Ornithomimosauria+Tyrannosauria} BT 49 Maniraptoriformes PT NT 51 Arctometatarsalia PT NT 54 Tyrannosauroidea PT 51 Arctometatarsalia PT BT 50 [unnamed] PT NT 52 Ornithomimosauria PT 52 Ornithomimosauria PT BT 51 Arctometatarsalia PT NT 53 Harpymimus PT 53 Harpymimus PT BT 52 Ornithomimosauria PT 54 Tyrannosauroidea PT Includes early form Eotyrannus BT 50 [unnamed] PT NT 55 Tyrannosauridae PT 55 Tyrannosauridae PT BT 54 Tyrannosauroidea PT NT 56 Tyrannosaurinae PT 56 Tyrannosaurinae PT BT 55 Tyrannosauridae PT NT 57 Tyrannosaurini PT 57 Tyrannosaurini PT Could be defined as {Tyrannosaurs+Tarbosaurus} BT 56 Tyrannosaurinae PT NT 58 Tyrannosaurus PT 58 Tyrannosaurus PT BT 57 Tyrannosaurini PT 59 Maniraptora PT BT 49 Maniraptoriformes PT NT 60 Oviraptorosauria PT NT 63 Therizinosauria PT NT 67 Paraves PT 60 Oviraptorosauria PT Includes Caenagnathidae BT 59 Maniraptora PT NT 61 Oviraptoridae PT 61 Oviraptoridae PT BT 60 Oviraptorosauria PT NT 62 Oviraptor PT 62 Oviraptor PT Some specimens found brooding their nests BT 61 Oviraptoridae PT 63 Therizinosauria PT Truly freaky long-necked, huge-clawed fatsos BT 59 Maniraptora PT NT 64 Therizinosauroidea PT 64 Therizinosauroidea PT BT 63 Therizinosauria PT NT 65 Therizinosauridae PT 65 Therizinosauridae PT BT 64 Therizinosauroidea PT NT 66 Nanshiungosaurus PT 66 Nanshiungosaurus PT BT 65 Therizinosauridae PT 67 Paraves PT BT 59 Maniraptora PT NT 68 Eumaniraptora PT 68 Eumaniraptora PT BT 67 Paraves PT NT 69 Deinonychosauria PT NT 75 Avialae PT 69 Deinonychosauria PT BT 68 Eumaniraptora PT NT 70 Troodontidae PT NT 72 Dromaeosauridae PT 70 Troodontidae PT Highest encephalisation quotient on known dinos BT 69 Deinonychosauria PT NT 71 Byronosaurus PT 71 Byronosaurus PT BT 70 Troodontidae PT 72 Dromaeosauridae PT BT 69 Deinonychosauria PT NT 73 Velociraptorinae PT 73 Velociraptorinae PT BT 72 Dromaeosauridae PT NT 74 Velociraptor PT 74 Velociraptor PT Much smaller in real life than in Jurassic Park BT 73 Velociraptorinae PT 75 Avialae PT BT 68 Eumaniraptora PT NT 76 Aves PT 76 Aves PT Birds, including modern birds BT 75 Avialae PT NT 77 Metornithes PT 77 Metornithes PT BT 76 Aves PT NT 78 Alvarezsauria PT 78 Alvarezsauria PT Short, stong args; long, gracile legs. Weird BT 77 Metornithes PT NT 79 Alvarezsauridae PT 79 Alvarezsauridae PT BT 78 Alvarezsauria PT NT 80 Mononykinae PT 80 Mononykinae PT Hands had only a single, spike-like finger BT 79 Alvarezsauridae PT NT 81 Parvicursor PT 81 Parvicursor PT BT 80 Mononykinae PT 82 Ornithischia PT Everything closer to Iguanodon than to Megalosaurus BT 1 Dinosauria PT NT 83 Genasauria PT 83 Genasauria PT BT 82 Ornithischia PT NT 84 Thyreophora PT NT 92 Cerapoda PT 84 Thyreophora PT The armoured dinosaurs, ankylosaurs and stegosaurs BT 83 Genasauria PT NT 85 Thyreophoroidea PT 85 Thyreophoroidea PT BT 84 Thyreophora PT NT 86 Eurypoda PT 86 Eurypoda PT BT 85 Thyreophoroidea PT NT 87 Stegosauria PT NT 90 Ankylosauria PT 87 Stegosauria PT Single or double row of plates down the back BT 86 Eurypoda PT NT 88 Stegosauridae PT 88 Stegosauridae PT BT 87 Stegosauria PT NT 89 Kentrosaurus PT 89 Kentrosaurus PT Had spikes on its back instead of plates BT 88 Stegosauridae PT 90 Ankylosauria PT Heavily armoured, above and below BT 86 Eurypoda PT NT 91 Minmi PT 91 Minmi PT BT 90 Ankylosauria PT 92 Cerapoda PT Defined as {Triceratops+Iguanodon} BT 83 Genasauria PT NT 93 Marginocephalia PT NT 104 Ornithopoda PT 93 Marginocephalia PT Defined as {Triceratops+Pachycephalosaurus} BT 92 Cerapoda PT NT 94 Ceratopsia PT NT 102 Pachycephalosauria PT 94 Ceratopsia PT BT 93 Marginocephalia PT NT 95 Neoceratopsia PT 95 Neoceratopsia PT Everything closer to Triceratops than to Psittacosaurus BT 94 Ceratopsia PT NT 96 Udanoceratops PT NT 97 Coronosauria PT 96 Udanoceratops PT BT 95 Neoceratopsia PT 97 Coronosauria PT BT 95 Neoceratopsia PT NT 98 Ceratopsoidea PT 98 Ceratopsoidea PT BT 97 Coronosauria PT NT 99 Ceratopsomorpha PT 99 Ceratopsomorpha PT BT 98 Ceratopsoidea PT NT 100 Ceratopsidae PT 100 Ceratopsidae PT {Chasmosaurinae+Centrosaurinae} BT 99 Ceratopsomorpha PT NT 101 Zuniceratops PT 101 Zuniceratops PT BT 100 Ceratopsidae PT 102 Pachycephalosauria PT Thick-headed, wide-bodied herbivorous bipeds BT 93 Marginocephalia PT NT 103 Wannanosaurus PT 103 Wannanosaurus PT BT 102 Pachycephalosauria PT 104 Ornithopoda PT The least interesting of all the dinosaur groups BT 92 Cerapoda PT NT 105 Qantassaurus PT NT 106 Euornithopoda PT 105 Qantassaurus PT A profoundly dull basal ornithopod BT 104 Ornithopoda PT 106 Euornithopoda PT BT 104 Ornithopoda PT NT 107 Iguanodontia PT 107 Iguanodontia PT BT 106 Euornithopoda PT NT 108 Euiguanodontia PT 108 Euiguanodontia PT BT 107 Iguanodontia PT NT 109 Dryomorpha PT 109 Dryomorpha PT BT 108 Euiguanodontia PT NT 110 Ankylopollexia PT 110 Ankylopollexia PT BT 109 Dryomorpha PT NT 111 Styracosterna PT 111 Styracosterna PT BT 110 Ankylopollexia PT NT 112 Lurdosaurus PT NT 113 Iguanodontoidea PT 112 Lurdosaurus PT Looks a lot like a fat Iguanodon BT 111 Styracosterna PT 113 Iguanodontoidea PT BT 111 Styracosterna PT NT 114 Hadrosauroidea PT 114 Hadrosauroidea PT BT 113 Iguanodontoidea PT NT 115 Hadrosauridae PT 115 Hadrosauridae PT BT 114 Hadrosauroidea PT NT 116 Euhadrosauria PT 116 Euhadrosauria PT Lambeosaurs (crested) + Hadrosaurs (not) BT 115 Hadrosauridae PT NT 117 Lambeosaurinae PT 117 Lambeosaurinae PT The least dull of all the ornithopods BT 116 Euhadrosauria PT NT 118 Lambeosaurini PT 118 Lambeosaurini PT BT 117 Lambeosaurinae PT NT 119 Corythosaurus PT 119 Corythosaurus PT BT 118 Lambeosaurini PT idzebra-2.0.44/examples/marc21/0000755000175000017500000000000011412336535013130 500000000000000idzebra-2.0.44/examples/marc21/Makefile.am0000644000175000017500000000027711412332551015104 00000000000000marc21datadir=$(datadir)/$(PACKAGE)$(PACKAGE_SUFFIX)-examples/marc21 marc21data_DATA = zebra.cfg sample-marc EXTRA_DIST = $(marc21data_DATA) clean: rm -f *.mf *.LCK zebrasrv.pid idzebra-2.0.44/examples/marc21/sample-marc0000644000175000017500000005623411057500746015210 0000000000000000366nam 22001698a 4500001001300000003000400013005001700017008004100034010001700179040001300075050001200088100001700100245003000117260001200147263000900159300001100168 11224466 DLC00000000000000.0910710c19910701nju 00010 eng  aDLCcDLC00a123-xyz10aJack Collins10aHow to program a computer1 aPenguin a8710 ap. cm. a 11224466 00366nam 22001698a 4500001001300000003000400013005001700017008004100034010001700179040001300075050001200088100001700100245003000117260001200147263000900159300001100168 11224467 DLC00000000000000.0910710c19910701nju 00010 eng  aDLCcDLC00a123-xyz10aJack Collins10aHow to program a computer1 aPenguin a8710 ap. cm. a 11224467 01369cam 2200265 i 4500001001800000003000400018005001700022008004100039010002201081040001800080050002200098082002100120111012100141245034700262260005400609300003000663504005100693650005600744650003900800650006200839700002300901700002000924710007100944710006601015 73090924 //r82DLC19820524000000.0760609s1974 nyua b 10110 eng  aDLCcDLCdDLC00aRC71.3b.W67 197100a616.07/575/0285420aWorkshop on Computer Processing of Dynamic Images from an Anger Scintillation Camera,cWashington University,d1971.10aComputer processing of dynamic images from an Anger scintillation camera :bthe proceedings of a workshop /ccosponsored by the Biomedical Computer Laboratory and the Nuclear Medicine Division, Department of Radiology, School of Medicine, Washington University, St. Louis, January 18-22, 1971 ; edited by Kenneth B. Larson, Jerome R. Cox, Jr.0 aNew York :bSociety of Nuclear Medicine,c[c1974] axiv, p. :bill. ;c24 cm. aIncludes bibliographical references and index. 0aRadioisotope scanningxData processingxCongresses. 0aScintillation camerasxCongresses. 0aImaging systems in medicinexData processingxCongresses.10aLarson, Kenneth B.10aCox, Jerome R. 20aWashington University, St. Louis.bBiomedical Computer Laboratory.20aWashington University, St. Louis.bNuclear Medicine Division. a 73090924 //r8200942cam 22002531a 4500001001900000003000400019005001700023008004100040010002300665040001800081041001400099050001600113082001600129245007300145260007000218300005000288500004800338500009600386630003900482630003900521700003800560700003300598710003400631 73209622 //r823DLC19820325000000.0780306m19009999ohu 00000 grc  aDLCcDLCdDLC0 agrchebeng00aBS421b.C6400a220.4/421904aThe Computer Bible /cJ. Arthur Baird, David Noel Freedman, editors.0 a[Wooster, Ohio] :bBiblical Research Associates,c<1973-c1980 > av. <2-4, 7-10, 13, 15-18, 20-24 > ;c28 cm. aHebrew and Greek; introductions in English. aVols. 2, 8: Missoula, Mont. : Published by Scholars Press for Biblical Research Associates. 0aBible. O.T.xConcordances, Hebrew.00aBible.pN.T.xConcordances, Greek.10aBaird, J. Arthurq(Joseph Arthur)10aFreedman, David Noel,d1922-20aBiblical Research Associates. a 73209622 //r82301033cam 2200253 i 4500001002100000003000400021005001700025008004100042010002500754040001800083043001200101050002200113100001900135245010500154260007300259300003800332490006800370500003500438504002400473650003400497651004600531700003900577810013800616 76357895 /MAP/r82DLC19820806000000.0760407s1974 waua b 00010 eng  aDLCcDLCdDLC an-us-wa00aG1467.P8bM3 197410aMairs, John W.14aThe Puget Sound Region :ba portfolio of thematic computer maps /cJohn W. Mairs, Eugene A. Hoerauf.0 a[Bellingham, Wash.] :bCenter for Pacific Northwest Studies,cc1974. aiii, 41 p. :bill. ;c25 x 36 cm.1 aOccasional paper - Center for Pacific Northwest Studies ; no. 3 aScale of maps ca. 1:1,000,000. aBibliography: p. 4. 0aCartographyxData processing. 0aPuget Sound region (Wash.)xCensusxMaps.10aHoerauf, Eugene A.,ejoint author.1 aWashington (State).bWestern Washington State College, Bellingham.bCenter for Pacific Northwest Studies.tOccasional paper ;vno. 3. a 76357895 /MAP/r8201000pam 2200229 i 4500001001300000003000400013005001700017008004100034010001700753020001500075040001800090050001800108082001500126245030400141260004800445300003300493504005100526650002800577700002900605710004800634710007100682 77000348 DLC19770707000000.0770112s1977 mdua b 10110 eng  a0839108826 aDLCcDLCdDLC00aRC78.7.T6bR400a616.07/57200aReconstruction tomography in diagnostic radiology and nuclear medicine :bproceedings of the workshop ... /cedited by Michel M. Ter-Pogossian ... [et al.] ; co-sponsors, the Edward Mallinckrodt Institute of Radiology and Biomedical Computer Laboratory, Washington University School of Medicine ....0 aBaltimore :bUniversity Park Press,cc1977. axv, 573 p. :bill. ;c24 cm. aIncludes bibliographical references and index. 0aTomographyxCongresses.20aTer-Pogossian, Michel M.20aEdward Mallinckrodt Institute of Radiology.20aWashington University, St. Louis.bBiomedical Computer Laboratory. a 77000348 01493pam 2200277 i 4500001001300000003000400013005001700017008004100034010001701198040001800075043001200093050003400105082002800139086001800167111009500185245044800280260013800728300003400866490003600900650005900936700003100995700002101026700002001047710005001067810008101117 77004773 DLC19770822000000.0770321s1977 dcua 10000 eng  aDLCcDLCdDLC an-us---00aQC100b.U57 no. 500-8aTA165000a602/.1 sa621.381.9/598 aC13.10:500-8.20aWorkshop on Standards for Image Pattern Recognition,cNational Bureau of Standards,d1976.10aComputer science & technology :bproceedings of a workshop held at the National Bureau of Standards, Gaithersburg, MD, June 3-4, 1976 /cWorkshop on Standards for Image Pattern Recognition ; John M. Evans, Jr., Russell Kirsch, and Roger N. Nagel, editor[s] ; sponsored by National Bureau of Standards, Electronic Industries Association, Institute of Electrical and Electronic Engineers, in cooperation with Association for Computing Machinery.0 a[Washington] :bU.S. Dept. of Commerce, National Bureau of Standards : for sale by the Supt. of Docs., U.S. Govt. Print. Off.,c1977. avii, 112 p. :bill. ;c26 cm.1 aNBS special publication ; 500-8 0aOptical pattern recognitionxStandardszUnited States.10aEvans, John Martin,d1942-10aKirsch, Russell.10aNagel, Roger N.10aUnited States.bNational Bureau of Standards.1 aUnited States.bNational Bureau of Standards.tSpecial publication ;v500-8. a 77004773 00878cam 2200229 i 4500001001300000003000400013005001700017008004100034010001700631040001800075050003800093082002200131086001700153100001900170245008700189260013800276300002400414440003400438490003600472650004200508810008100550 77005558 DLC19770713000000.0770401s1977 dcu 00010 eng  aDLCcDLCdDLC00aQC100b.U57 no. 500-9aQA76.9.A2500a602/.1 sa001.6/40 aC13.10:500-910aWood, Helen M.14aThe use of passwords for controlled access to computer resources /cHelen M. Wood.0 a[Washington] :bU.S. Dept. of Commerce, National Bureau of Standards : for sale by the Supt. of Docs., U.S. Govt. Print. Off.,c1977. aiv, 53 p. ;c26 cm. 0aComputer science & technology1 aNBS special publication ; 500-9 0aComputersxAccess controlxPasswords.1 aUnited States.bNational Bureau of Standards.tSpecial publication ;v500-9. a 77005558 00791cam 2200217 4500001001800000003000400018005001700022008004100039010002200551040001800080043003000098050001800128082001800146100002100164245016200185260002300347300002600370500002900396650006400425710006200489 77616367 //r84DLC19841213000000.0720329s1971 dcua 00010 eng  aDLCcDLCdDLC an-us-dcan-us-mdan-us-va00aHE2781.W3bE500a385/.22/0975310aEnglund, Carl R.10aWashington metropolitan area rail computer feasibility study;bfinal reportc[by] Carl R. Englund, Jr. Prepared for Urban Mass Transportation Administration.0 aWashington,c1971. a92 l.billus.c28 cm. a"Contract DOT-UT-10003." 0aRailroadszWashington Metropolitan AreaxCommuting traffic.10aUnited States.bUrban Mass Transportation Administration. a 77616367 //r8400686cam 2200229 4500001001800000003000400018005001700022008004100039010002200434040001800080043001200098050002400110082001900134110007000153245005500223250000900278260002100287300001800308500001700326650004800343650004300391 77637075 //r82DLC19820817000000.0720320s1971 wau s 00000 eng  aDLCcDLCdDLC an-us-wa00aLB1028.5b.W37 197100a378/.052/0979710aWashington (State).bState Board for Community College Education.12aA plan for community college computer development. aRev.1 a[Olympia]c1971. a47 l.c28 cm. aCover title. 0aUniversities and collegesxData processing. 0aCommunity collegeszWashington (State) a 77637075 //r8200668nam 22002171 4500001001300000003000400013005001700017008004100034010001700433040001800075050001800093082001600111100001900127245007600146260004000222300004000262350000900302490003200311504003000343630006000373 70001070 DLC19700427000000.0700302s1968 mouab b 00000 eng  aDLCcDLCdDLC00aBS1275.5b.O200a222/.15/00710aOberst, Bruce.00aDeuteronomy.cThought questions, by Don DeWelt. Summary by Adam Clarke.0 aJoplin, Mo.,bCollege Pressc[1968] aviii, 452 p.billus., maps.c22 cm. a5.950 aBible study textbook series aBibliography: p. 449-452. 0aBible. O.T. DeuteronomyxStudyxOutlines, syllabi, etc. a 70001070 00888pam 2200265 4500001001300000003000400013005001700017008004100034010001700605020001500075040001800090043001200108050002000120082001200140100002900152245009300181260005500274300002800329500008100357504004100438650004500479650002500524651002200549830003400571 72002565 DLC19730409000000.0720418r19721909nyu b 00000 eng  a0836968433 aDLCcDLCdDLC ae-gr---00aBL785b.A3 197200a292/.0810aAdam, James,d1860-1907.14aThe religious teachers of Greece.cEdited with a memoir, by his wife, Adela Marion Adam.0 aFreeport, N.Y.,bBooks for Libraries Pressc[1972] axix, lv, 467 p.c22 cm. aReprint of the 1909 ed., which was issued as the 1904-1906 Gifford lectures. aIncludes bibliographical references. 0aGreek literaturexHistory and criticism. 0aPhilosophy, Ancient. 0aGreecexReligion. 0aGifford lectures,v1904-1906. a 72002565 01126nam 2200265 a 4500001001300000003000400013005001700017008004100034010001700843020003100075040001800106050002100124082001800145100004200163245015800205250003700363260004500400300005000445440003500495630006400530630006400594630006200658630006300720730006000783 80082329 DLC19810528000000.0810526s1980 ctuaf 00010 eng  a0879832355 (pbk.) :c$4.95 aDLCcDLCdDLC00aBS1433b.S5 198000a223/.207721910aSmith, George Adam,cSir,d1856-1942.10aFour psalms :bXXIII, XXXVI, LII, CXXI /cinterpreted for practical use by George Adam Smith ; introduction by F.F. Bruce ; illustrations by Ron McCarty. aShepherd illustrated classic ed.0 aNew Canaan, Conn. :bKeats Pub.,cc1980. a81 p., [5] leaves of plates :bill. ;c21 cm. 2aA Shepherd illustrated classic00aBible.pO.T.pPsalms XXIIIxCriticism, interpretation, etc.00aBible.pO.T.pPsalms XXXVIxCriticism, interpretation, etc.00aBible.pO.T.pPsalms LIIxCriticism, interpretation, etc.00aBible.pO.T.pPsalms CXXIxCriticism, interpretation, etc.01aBible.pO.T.pPsalms XXIII, XXXVI, LII, CXXI.lEnglish. a 80082329 01433nas 2200421 a 4500001000900000003000400009005001700013008004100030010003100071022001400102030001100116032001700127035002000144035002700164040009600191042001300287050002000300070001800320072000900338082001400347210001900361222001900380245002000399260004300419265005800462300001700520310006200537350001100599362003200610500002400642650004600666650003600712650003900748650003500787650003300822780008200855850007400937ACD-3837DLC19940614065614.0920728c19929999ctumn1p 0 a0eng d a 92646062 zsn 92004430 0 a1064-3923 aIERNE8 a008187bUSPS a(OCoLC)2627327500ilcmarc/AQP-6285/JEANNE aNSDPcNSDPdWaUdNICdDNALdOUCAdNSTdDLCdNSTdNSDPdNSTdDLCdInUdMHdNSDPdNdDLCdMiU ansdpalc00aTK5105.5b.R4480 aTK5105.5.R448 0aX20000a384.32200 aInternet world 0aInternet world00aInternet world. aWestport, CT :bMeckler Corp.,cc1992- aMeckler Corp., 11 Ferry Lane West, Westport, CT 06880 av. ;c28 cm. aMonthly (except Jan./Feb., July/Aug., Nov./Dec. combined) a$97.000 aVol. 3, no. 7 (Sept. 1992)- aTitle from caption. 0aInternet (Computer network)xPeriodicals. 0aComputer networksxPeriodicals. 0aInformation networksxPeriodicals. 2aComputer Systemsxperiodicals. 2aOnline Systemsxperiodicals.00tResearch & education networkingx1051-4791w(DLC) 90646613w(OCoLC)21974448 aDLCaDNALaDNGAaInUaMBCoaMH-EdaMdBJaMiUaMoKLaNaNICaTxHRaWaU01330nas 22003735a 4500001000900000003000400009005001700013008004100030010001700071022002500088035002000113035002700133040002900160042001600189043001200205055001200217082001200229130003500241210002700276222002900303245001700332260005400349265006900403300002500472310001200497350002100509362003300530500002400563580005800587780008300645780005100728785008300779787009400862ACD-3799DLC19940614090514.0920723c19919999oncmr4p 0 a0eng d acn 92031641 0 a1187-7081y0025-9535 a(OCoLC)2624484400ilcmarc/AQF-2896/JEANNE aCaOOCMbengcCaOONLdInU anlcaisds/c an-cn--- 2aHD9696*1 a0042120 aInfo Canada (Downsview, Ont.).0 aInfo Can.b(Downsview) 0aInfo Canadab(Downsview)00aInfo Canada. aDownsview, Ont. :bLaurentian Technomedia,c1991- aLaurentian Technomedia, 501 Oakdale Rd., Downsview, Ont. M3N 1W7 av. :bill. ;c40 cm. aMonthly a$50.00 per year.0 aVol. 16, no. 9 (Sept. 1991)- aTitle from caption. aIncludes: Network world Canada, Sept. 1991-Jan. 1992.00tComputer datax0383-7319w(CaOONL)770308317w(OCoLC)11416479w(DLC)cn 7703083105tI.T. magazine (Toronto, Ont.)w(OCoLC)2769906601tNetwork world CanadagFeb. 1992x1187-2985w(OCoLC)25314012w(CaOONL)9203057251 tNetwork world CanadagSept. 1991-Jan. 1992x1187-2985w(OCoLC)25314012w(CaOONL)92030572500803nam 22002898a 4500001000900000003000400009005001700013008004100030010001700071020001500088035002700103040001300130043001200143050002800155082001800183100002500201245009500226250001200321260003400333263000900367300001100376500002000387630003800407600002200445600001500467650003100482ACD-3792DLC19931215084605.7931206s1993 nyu 001 0 eng  a 93047992  a156282754500ilcmarc/ARU-2364/STEVES aDLCcDLC an-us---00aPN1992.77.T63bC37 199300a791.45/722201 aCarter, Bill,d1949-14aThe late shift :bLetterman, Leno, and the network battle for the night /cby Bill Carter. a1st ed. aNew York :bHyperion,cc1993. a9402 ap. cm. aIncludes index.00aTonight show (Television program)10aLetterman, David.10aLeno, Jay. 0aTalk showszUnited States.00766nam 22002658a 4500001000900000005001700009008004100026010001700067020001500084035002900099040001300128050002900141082001600170245007600186250001600262260005600278263000900334300001100343440003200354500002000386650003200406650001900438700002500457700001800482ACD-366519930730092004.1930721s1993 nju 001 0 eng  a 93030775  a013289661300ilcmarc/ARI-3804/JULIANNE aDLCcDLC00aTK5105.875.I57bI56 199300a384.3/422000aInternet :bmailing lists /cedited by Edward T.L. Hardie, Vivian Neou. aUpdated ed. aEnglewood Cliffs, N.J. :bPTR Prentice Hall,c1993. a9308 ap. cm. 0aInternet information series aIncludes index. 0aInternet (Computer network) 0aMailing lists.10aHardie, Edward T. L.10aNeou, Vivian.01324nam 2200289Ia 4500001000900000008004100009005001700050010001300067037002300080043001200103074001900115086002200134049000900156245006200165260014500227300002500372500008000397500022100477500005500698500002100753500002200774610006100796650004300857650004500900700002100945710006800966ACD-2728910514s1984 nyu r f00100 eng d19910519144551.0 o23740002 aED ED 289459bERIC an-us--- a0466-A-03 (MF)0 aED 1.310/2:289459 aDRUG00aTechnology programs that work /cMichael B. Webb, editor.0 aNew York, N.Y. :bTechnology for the NDN Project, Institute for Urban and Minority Education, Teachers College, Columbia University,c[1984] a72, [1] p. ;c28 cm. a"Spons agency Office of Educational Research and Improvement"--Doc. resume. a"This directory was developed by the Technology for the National Diffusion Network Project, Teachers College, Columbia University pursuant to contract number OE-300-83-0253, U.S. Department of Education"--T.p. verso. aDistributed to depository libraries in microfiche. a"December 1984." aIncludes indexes.10aUnited States.bNational Diffusion NetworkxDirectories. 0aEducational technologyzUnited States. 0aFederal aid to educationzUnited States.10aWebb, Michael B.10aUnited States.bOffice of Educational Research and Improvement.01559nam 2200373Ia 4500001000900000008004100009005001700050010001300067037002000080043001200100074001900112086002200131088001600153049000900169100002200178245025900200260010500459300003300564500005500597500001700652504004100669500001800710650004400728650004400772650003700816650005200853650003700905700004400942700002500986710004801011710003001059710006801089740002801157ACD-2476910425s1987 dcua b f00010 eng d19910519144551.0 o23602389 aED 288529bERIC an-us--- a0466-A-03 (MF)0 aED 1.310/2:288529 aLP 87-403 c aDRUG10aSeager, Andrew J.10aCheck this out :blibrary program models /cprepared by Andrew J. Seager, Sarah J. Roberts, Carol Z. Lincoln ; prepared for National Diffusion Network under contract to RMC Corporation, contract 300-84-0251 with the United States Department of Education.0 aWashington, D.C. :bOffice of Educational Research and Improvement, U.S. Dept. of Education,c[1987] aix, 319 p. :bill. ;c28 cm. aDistributed to depository libraries in microfiche. a"July 1987." aIncludes bibliographical references. a"LP 87-403c." 0aLibraries and communityzUnited States. 0aLibraries and educationzUnited States. 0aSchool librarieszUnited States. 0aInstructional materials centerszUnited States. 0aPublic librarieszUnited States.10aRoberts, Sarah J.q(Sarah Jane),d1946-10aLincoln, Carol Zall.10aUnited States.bNational Diffusion Network.20aRMC Research Corporation.10aUnited States.bOffice of Educational Research and Improvement.01aLibrary program models.01155nas 22003135a 4500001000900000008004100009005001700050010002700067040000800094012001200102042000700114050001500121074001100136086002000147049000900167212008300176245006900259260011500328265007100443300001700514310001100531500003200542610003600574650006200610650006400672710002200736710007000758936001300828ACD-2376910225c19uu9999dcuar f0uuu 0eng 19910519144551.0 a 91656060 o23150847 dGPO a2i9103 alc00aIN PROCESS a0785-H0 aLC 1.40/2:F 31/ aDRUG0 aFederal Library and Information Network services directory for fiscal year ...00aFEDLINK services directory for fiscal year ... /cFLICC/FEDLINK.00aWashington, D.C. :bFederal Library and Information Network, Federal Library and Information Center Committee, aFEDLINK, Room LA 1026C, Library of Congress, Washington D.C. 20540 av. ;c28 cm. aAnnual aDescription based on: 1990.20aFEDLINK (Network)xDirectories. 0aLibrary information networkszUnited StatesxDirectories. 0aLibraries, Governmental, administrative, etc.xPeriodicals.20aFEDLINK (Network)20aUnited States.bFederal Library and Information Center Committee. a1991 LIC00915nam 2200229Ka 4500001000900000008004100009005001700050010001300067040001300080037002000093074001900113086002200132049000900154100001800163245015700181260012400338300000900462533009300471500005500564650001400619710005200633ACD-1949910415r19901087dcu b f00010 eng d19910421122541.0 o23469261 aGPOcGPO aED 286992bERIC a0466-A-03 (MF)0 aED 1.310/2:286992 aDRUG10aPaulu, Nancy.10aDealing with dropoutshmicroform :bthe urban superintendents' call to action /cby the OERI Urban Superintendents Network ; Nancy Paulu, writer-editor.0 a[Washington, D.C]. :bOffice of Educational Research and Improvement, Educational Resources Information Center,c[1987] a1 v. aMicrofiche.b[Washington, D.C.?] :cSupt. of Docs., U.S. G.P.O.,d[1990].e1 microfiche. aDistributed to depository libraries in microfiche. 0aDropouts.20aEducational Resources Information Center (U.S.)01053nam 2200217Ka 4500001000900000008004100009005001700050010001300067037002000080074001900100086002200119049000900141245016300150260025100313300000900564533009400573500005500667650002400722650003700746710005200783ACD-1947910415r19901986dcu b f00010 eng d19910421122541.0 o23469098 aED 286333bERIC a0466-A-03 (MF)0 aED 1.310/2:286333 aDRUG00aNational dissemination model for the I'M SPECIAL Program of Physical Education for the Handicapped, 1983-1986hmicroform :bfinal report, I'M SPECIAL network.0 aTampa, Fla. :bDepartment of Physical Education, College of Education, University of South Florida ;a[Washington, D.C.] :bU.S. Dept. of Education, Office of Educational Research and Improvement, Educational Resources Information Center,c[1986] a1 v. aMicrofiche.b[Washington, D.C.?] :cSupt. of Docs., U.S. G.P.O.,d[1990].e2 microfiches. aDistributed to depository libraries in microfiche. 0aPhysical education. 0aHandicapped childrenxEducation.20aEducational Resources Information Center (U.S.)01036nam 2200289Ia 4500001000900000008004100009005001700050010001300067040001300080043001200093074001400105086001800119088001500137049000900152245004500161260010500206300004100311500005500352500003300407500002800440500002600468610004800494650005500542650004400597710006800641740003700709ACD-1938910415s1991 dcu f00000 eng d19910421122541.0 o23468272 aGPOcGPO an-us--- a0461-D-050 aED 1.302:Sh 2 aPIP 91-836 aDRUG00aNDN, sharing success to improve schools.0 a[Washington, DC] :bU.S. Dept. of Education, Office of Educational Research and Improvement,c[1991] a1 folded sheet (6 p.) ;c22 x 10 cm. aAt head of title: National Diffusion Network, NDN. aShipping list no.: 91-198-P. a"January 1991"--P. [5]. a"PIP 91-836"--P. [5].10aUnited States.bNational Diffusion Network. 0aDemonstration centers in educationzUnited States. 0aEducational innovationszUnited States.10aUnited States.bOffice of Educational Research and Improvement.01aNational Diffusion Network, NDN.00725nam0 2200253 45 00100150000000400150001500800230003002100340005304100130008710000180010024100150011824501230013325000240025626000320028030000270031252000310033965200110037001000210038109600110040225100240041326100090043797000130044697000120045900aD00001593700satmrnu000ar19881981bdkldan00a87-11-04010-6chf.dkr. 92,0000adanceng00aAndersonhBob00aStretching00aStrækøvelserdBob Andersonfillustreret af Jean Andersonfdansk udgave ved Lis Engelf[oversættelse ved Jesper Langer]00a1. udgave, 4. oplag00a[Kbh.]bClausen bøgerc198800a192 siderbill.c26 cm00aTidligere: 1. udgave. 198100a79.60100a870970b0567503000z87097000a1. udgave, 4. oplag00c198800b0567503000cDBF8842idzebra-2.0.44/examples/marc21/zebra.cfg0000644000175000017500000000045211412332551014627 00000000000000# Simple Zebra configuration file # # Where the schema files, attribute files, etc are located. profilePath: ${srcdir:-.}:${srcdir:-.}/../../tab # Files that describe the attribute sets supported. attset: bib1.att attset: explain.att recordType: grs.marcxml.marc21 modulePath: ../../index/.libs idzebra-2.0.44/examples/marc21/Makefile.in0000644000175000017500000003043311412336424015115 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = examples/marc21 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(marc21datadir)" DATA = $(marc21data_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ marc21datadir = $(datadir)/$(PACKAGE)$(PACKAGE_SUFFIX)-examples/marc21 marc21data_DATA = zebra.cfg sample-marc EXTRA_DIST = $(marc21data_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/marc21/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/marc21/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-marc21dataDATA: $(marc21data_DATA) @$(NORMAL_INSTALL) test -z "$(marc21datadir)" || $(MKDIR_P) "$(DESTDIR)$(marc21datadir)" @list='$(marc21data_DATA)'; test -n "$(marc21datadir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(marc21datadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(marc21datadir)" || exit $$?; \ done uninstall-marc21dataDATA: @$(NORMAL_UNINSTALL) @list='$(marc21data_DATA)'; test -n "$(marc21datadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(marc21datadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(marc21datadir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(marc21datadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-marc21dataDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-marc21dataDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-marc21dataDATA install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-marc21dataDATA clean: rm -f *.mf *.LCK zebrasrv.pid # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/examples/marcxml/0000755000175000017500000000000011412336535013506 500000000000000idzebra-2.0.44/examples/marcxml/zebra.xsl0000644000175000017500000000301711412332551015254 00000000000000 idzebra-2.0.44/examples/marcxml/yazgfs.xml0000644000175000017500000000115111412332551015443 00000000000000 tcp:@:9999 idzebra-2.0.44/examples/marcxml/collection-2.xml0000644000175000017500000002006711057500746016451 00000000000000 00925njm 22002777a 4500 5637241 DLC 19920826084036.0 sdubumennmplu 910926s1957 nyuuun eng 91758335 1259 Atlantic DLC DLC Atlantic 1259 The Great Ray Charles [sound recording]. New York, N.Y. : Atlantic, [1957?] 1 sound disc : analog, 33 1/3 rpm ; 12 in. Ray Charles, piano & celeste. The Ray -- My melancholy baby -- Black coffee -- There's no you -- Doodlin' -- Sweet sixteen bars -- I surrender dear -- Undecided. Brief record. Jazz 1951-1960. Piano with jazz ensemble. Charles, Ray, 1930- prf 01832cmma 2200349 a 4500 12149120 20001005175443.0 cr ||| 000407m19949999dcu g m eng d 0 ibc copycat 1 ncip 20 y-gencompf undetermined web preservation project (wpp) vb07 (stars done) 08-19-00 to HLCD lk00; AA3s lk29 received for subject Aug 25, 2000; to DEWEY 08-25-00; aa11 08-28-00 00530046 (OCoLC)ocm44279786 IEU IEU N@F DLC lccopycat n-us-dc n-us--- F204.W5 975.3 13 The White House [computer file]. Computer data. Washington, D.C. : White House Web Team, 1994- Mode of access: Internet. Title from home page as viewed on Aug. 19, 2000. Features the White House. Highlights the Executive Office of the President, which includes senior policy advisors and offices responsible for the President's correspondence and communications, the Office of the Vice President, and the Office of the First Lady. Posts contact information via mailing address, telephone and fax numbers, and e-mail. Contains the Interactive Citizens' Handbook with information on health, travel and tourism, education and training, and housing. Provides a tour and the history of the White House. Links to White House for Kids. White House (Washington, D.C.) United States. Executive Office of the President. United States. Office of the Vice President. United States. Office of the First Lady. White House Web Team. http://www.whitehouse.gov http://lcweb.loc.gov/staff/wpp/whitehouse.html Web site archive idzebra-2.0.44/examples/marcxml/collection-namemrc.xml0000644000175000017500000012335611057500746017737 00000000000000 00549cz 2200169n 4500 n 00015403 DLC 20010915063228.0 000906n| acannaabn |n aba n 00015403 DLC eng DLC Uk Watson, George [Author of Dogs have souls too] Dogs have souls too, c2001: t.p. (George Watson) LC database, Sept. 6, 2000 (hdg.: Watson, George) [Author of Customer service triggers] Customer service triggers, 1994: t.p. (George Watson) 01374cz 2200253n 4500 n 00093008 DLC 20010921071258.0 000327n| acannaabn |a ana n 00093008 (OCoLC)oca05185075 DLC eng DLC OrU Nuclear Free and Independent Pacific Conference NFIPC N.F.I.P. Conference NFIP Conference Nuclear Free & Independent Pacific Conference Nuclear Free and Independent Pacific Movement. Conference a Nuclear Free Pacific Conference Report of the 7th Nuclear Free and Independent Pacific Conference 9-13 December 1996 Suva, Fiji, c1997: cover (Nuclear Free & Independent Pacific Conference) p. 1 (7th Conference of the Nuclear Free and Independent Pacific Movement) Nuclear Free and Independent Pacific Conference, 1983: p. 7 (NFIPC) p. 8 (4th, July 10-20, 1983, Port Vila, Vanuatu) For a nuclear free and independent Pacific, 1991: cover (6th N.F.I.P. Conference, Aotearoa, 1990) NFIP Conference--1987 report, 1987: p. 1 (5th NFIP Conference, held in Manila, Nov. 1987) p. 6 (5th Nuclear Free and Independent Pacific Conference) Nuclear-Free Pacific Conference--1983, 1983: foreword (3rd, held May 10-18, 1980, in Honolulu, Hawaii) 00423cz 2200145n 4500 n 00907108 DLC 20010915071247.0 001027n| acannaabn |a aaa n 00907108 (OCoLC)oca05391408 DLC eng DLC DLC WaU Ä€rmÄ«n, Muħsin Armin, Mohsen BÄ«mhÄ va umÄ«dʹhÄ, 1999: t.p. (Muħsin Ä€rmÄ«n) p. 4 of cover (Mohsen Armin [in rom.]) 00433cz 2200145n 4500 n 00907109 DLC 20010915071247.0 001027n| acannaabn |a aaa n 00907109 (OCoLC)oca05391409 DLC eng DLC DLC WaU RazzÄqÄ«, Ħujjat Razzaghi, Hojjat BÄ«mhÄ va umÄ«dʹhÄ, 1999: t.p. (Ħujjat RazzÄqÄ«) p. 4 of cover (Hojjat Razzaghi [in rom.]) 00561nz 2200205n 4500 n 42002886 DLC 19840322000000.0 830112n| acaaaaaa| |a ana ||| n 42002886 DLC DLC Atomic energy review. Special issue. International Atomic Energy Agency. Atomic energy review. Special issue no. 7 DLC Vienna International Atomic Energy Agency f DLC t DLC s DLC Document Molybdenum, 1980. 00671cz 2200217n 4500 n 42004507 DLC 19930319143544.6 830202n| acaaaaaa| |a ana ||| n 42004507 DLC DLC DLC Bibliotheca Athena. Athena, Biblioteca nuova ser., 4 1983-< > DLC 12 <1973 >-1983 DLC Roma Edizioni dell'Ateneo f DLC t DLC s DLC Grillo, A. Tra filologia e narratologia, c1988: ser. t.p. Dionysius, P. Dionysii Bassaricon et Gigantiadis fragmenta, 1973: ser. t.p. (Bibliotheca Athena, 12) 00807nz 2200205n 4500 n 42005879 DLC 19840322000000.0 830216n| acaabaaa| |a ana ||| n 42005879 DLC DLC CCAS studies in Arab-American relations. Georgetown University. Center for Contemporary Arab Studies. CCAS studies in Arab-American relations nnaa Georgetown University, Washington, D.C. Center for Contemporary Arab Studies. CCAS studies in Arab-American relations C.C.A.S. studies in Arab-American relations Washington, D.C. Center for Contemporary Arab Studies, Georgetown University f DLC t DLC s DLC The United States, Arabia, and the Gulf, 1980. 00827nz 2200217n 4500 n 42009212 DLC 19840322000000.0 830218n| acaaaaaa| |a ana ||| n 42009212 DLC DLC QL401 .H3 Occasional papers on mollusks. nna Harvard University. Museum of Comparative Zoology. Dept. of Mollusks. Occasional papers on mollusks v. 4, no. 60 DLC Cambridge, Mass. Dept. of Mollusks, Museum of Comparative Zoölogy, Harvard Univ. n items processed after Sept. 30, 1983 DLC f items processed before Oct. 1, 1983 DLC t DLC c DLC Johnson, R.I. Recent and fossil Unionacea and Mutelacea (freshwater bivalves) of the Caribbean Islands. 1981. 00642cz 2200181n 4500 n 42018914 DLC 19870306091853.0 830416n| acaabaaa| |a ana ||| n 42018914 DLC DLC DLC Perspectives on the American Revolution. United States Capitol Historical Society. Perspectives on the American Revolution Charlottesville Published for the United States Capitol Historical Society by the University Press of Virginia f DLC t DLC s DLC Slavery and freedom in the age of the American Revolution. 1983. 01233cz 2200277n 4500 n 42022651 DLC 19961025115532.3 830328n| acaaaaaa| |a ana ||| n 42022651 DLC DLC DLC Skrifter utgivna av Svenska barnboksinstitutet nnaa Svenska barnboksinstitutet. Skrifter Svenska barnboksinstitutet. Skrifter utgivna av Svenska barnboksinstitutet Studies published by the Swedish Institute for Children's Books Skriter utgivna av Svenska barnboksinstitutet Svenska barnboksinstitutets skriftserie nr 12 DLC Lund LiberLäromedel some issues f DLC t DLC s DLC KÃ¥reland, L. Möte med barnlitteraturen, c1980. Nikolajeva, M. The magic code, c1988: p. 4 of cover (Studies published by the Swedish Institute for Children's Books) Löfgren, E. Schoolmates of the long-ago, 1993: ser. t.p. (Skriter [sic] utgivna av Svenska barnboksinstitutet) Läsebok, 1993: p. 1 (Svenska barnboksinstitutets skriftserie) p. 309 (Skrifter utgivna av Svenska barnboksinstitutet) 00768nz 2200205n 4500 n 42023909 DLC 19840322000000.0 830401n| acaaaaaa| |a ana ||| n 42023909 DLC DLC Studies in Irish language and literature. Queen's University of Belfast. Dept. of Celtic. Studies in Irish language and literature Queen's University of Belfast. Institute of Irish Studies. Studies in Irish language and literature v. 4 DLC Belfast Institute of Irish Studies, Queen's Univ. of Belfast f DLC t DLC s DLC Ó Baóill, C. Contributions to a comparative study of Ulster Irish & Scottish Gaelic, 1978. 00687nz 2200193n 4500 n 42031684 DLC 19840322000000.0 830425n| acaaaaaa| |a ana ||| n 42031684 DLC DLC Harvard library of computer graphics ... mapping collection. Harvard University. Laboratory for Computer Graphics and Spatial Analysis. Harvard library of computer graphics ... mapping collection v. 9 DLC Cambridge, Mass. Harvard University, Laboratory for Computer Graphics and Spatial Analysis f DLC t DLC s DLC Computer graphics hardware, c1980. 00553cz 2200193n 4500 n 42034650 DLC 20000916204253.0 830429nc acaabaaan |a ana ||| n 42034650 (OCoLC)oca00032329 DLC eng DLC OCoLC Nong tian ji ben jian she cong shu. nne Nung tÊ¿ien chi pen chien she tsÊ¿ung shu Xi'an Shanxi ke xue ji shu chu ban she f DLC t DLC s DLC Li, H. T. Shan-hsi yen chien ti kai liang, 1981. 01068cz 2200241n 4500 n 42037249 DLC 19850502074119.0 830517n| acabbaaa| |a aaa ||| n 42037249 DLC DLC DLC Bach, Johann Sebastian, 1685-1750. Keyboard music. Selections (Bach Guild) Bach, Johann Sebastian, 1685-1750. Historical anthology of music. V, Baroque (late). F, Johann Sebastian Bach. 1, Works for keyboard Historical anthology of music. V, Baroque (late). F, Johann Sebastian Bach. 1, Works for keyboard nnaa Historical anthology of music, period V, category F, sub-category 1 Johann Sebastian Bach. 1, Works for keyboard Bach, Johann Sebastian, 1685-1750. Johann Sebastian Bach. 1, Works for keyboard Bach, Johann Sebastian, 1685-1750. Works for keyboard New York, NY Bach Guild f DLC t DLC s DLC Bach, J.S. Organ works [SR] c1981. 00656cz 2200157n 4500 n 50000657 DLC 19910605055735.1 800208n| acannaab| |a ana ||| n 50000657 DLC DLC DLC-S Folger Shakespeare Library nnaa Folger Shakespeare Library, Washington, D.C. Washington (D.C.). Folger Shakespeare Library Shakespeare Theatre at the Folger Phone call to Shakespeare Theatre at the Folger administrative offices, 5/16/91 (Shakespeare Theatre at the Folger is an independent organization working in cooperation with the Folger Shakespeare Library) 00811cz 2200181n 4500 n 50001478 DLC 19880219082238.9 800310n| acannaab| |a aaa ||| n 50001478 DLC DLC DLC PS3569.H3324 Shange, Ntozake. Williams, Paulette L. Her For colored girls who have considered suicide, c1975. Her From okra to greens, a different love story, 1984: CIP t.p. (Ntozake Shange) data sheet (b. 1948) Page, J.A. Selected black Amer., African and Caribbean authors, 1985 (Shangé, Ntozake [Paulette L. Williams]; dancer, teacher, playwright; b. Trenton, N.J., 10-18-1948) Contemp. authors, v. 85-88 (Shange, Ntozake, 1948- ; original name Paulette Williams; name changed, 1971) 01385cz 2200301n 4500 n 50007677 DLC 20010111070244.0 800331n| acannaabn |a aaa n 50007677 (OCoLC)oca00043216 DLC eng DLC DLC OCoLC Ben-Gurion, David, 1886-1973. Green, David, 1886-1973 Yariv, S. S., 1886-1973 Bin JÅ«riyÅ«n, 1886-1973 Ben-Guryon, Daṿid, 1886-1973 Grin, Daṿid, 1886-1973 Gurion, David Ben-, 1886-1973 Guryon, Daṿid Ben-, 1886-1973 Gruen, David Joseph, 1886-1973 Gryn, David, 1886-1973 Ben Gourion, 1886-1973 Ben Gourion, David, 1886-1973 Grün, David, 1886-1973 Teveth, S. Ben-Gurion, 1987: pub. info. (David Joseph Gruen) Ben Gourion, 1998: cover (David Gryn) Encyclopedia.com Website, Jan. 10, 2001 : Ben-Gurion, David (1886-1973, Israeli statesman and 1st prime minister (1949-53, 1955-63); b. Poland as David Grün; settled in Palestine 1906, devoted his life to ZIONISM, and was a founder of the Mapai (later Labor) party; during the struggle (1947-48) for independence he headed Israel's defense efforts, and once independence was achieved he became prime minister) 00337nz 2200133n 4500 n 50020441 DLC 19840322000000.0 800501n| acannaab| |b ana ||| n 50020441 DLC DLC Polished Apple (Firm) Wilhite Productions. Polished Apple Break the fast. [FS] 1976. 00506cz 2200145n 4500 n 50025113 DLC 20010915071351.0 800718n| acannaabn |n aaa n 50025113 (OCoLC)oca00060513 DLC eng DLC PPi-MA Hawkins, John, Sir, 1719-1789 Author's General list ... of music ... 1776. New Grove, 2nd ed. (Hawkins, Sir John; b. Mar. 29, 1719, London, d. May 21, 1789, London; English music historian and antiquary) 01446cz 2200277n 4500 n 50025199 DLC 19930107083508.0 800718n| acannaab| |a aaa ||| n 50025199 DLC DLC DLC MnHi DLC Sitting Bull, 1834?-1890 nnaa Sitting Bull, Dakota chief, 1831-1890 Tatanka Yotanka, 1834?-1890 Tatanka Iyotake, 1834?-1890 Four Horn, 1834?-1890 Sitting Buffalo Bull, 1834?-1890 Tah-ton-ka-he-yo-ta-kah, 1834?-1890 Tatanka Iyotanka, 1834?-1890 Garst, D. S. Sitting Bull, 1946. Ency. Amer., 1982: v. 24, p. 852 (Sitting Bull; 1834?-1890; Tatanka Yotanka) Ency. Brit. Microp., 1975: v. 9, p. 243 (Sitting Bull; Tatanka Iyotake; b. ca. 1831) Hodge, F.W. Handbook of American Indians, 1910: v. 2, p. 583 (Sitting Bull; Tatanka Yotanka; Sitting Buffalo Bull; name was Four Horn and was chg. to Sitting Bull when he "made medicine" in 1857; b. 1834) WWWAm, hist. vol., p. 485 (Sitting Bull; b. ca. 1834) MnHi files (hdg: Sitting Bull, Dakota chief, 1837-1890; Sitting Bull, Dakota chief, 1837?-1890) U.S. Dept. of the Interior. Lib. Biog. and hist. index of Am. Indians ... 1966: v. 7, p. 372-375 (Sitting Bull; Tah-ton-ka-he-yo-ta-kah; Tatanka Iyotanka; Tatanka Yotanka) idzebra-2.0.44/examples/marcxml/collection-opera-43.xml0000644000175000017500000053730711057500746017654 00000000000000 01387cam a22002771 4500 4055693 19871118000000.0 790321s1952 nyuag b 000 0 eng (DLC) 52014163 7 cbc orignew u ocip 19 y-gencatlg 52014163 DLC DLC DLC MT95 .T36 782.08 10 operatic masterpieces; designed by Merle Armitage. Text by Olin Downes, with piano arrangements by Leonard Marker. [With more than eighty decorative drawings by Alberta Sordini. Produced and edited under the direction of L. William Hansen; Robert Sour, editorial advisor] New York, Scribner [1952] 569 p. illus., music. 32 cm. Includes critical commentary, story of each opera, and excerpts arr. for piano, with words of arias in original languages. "Listing of LP recordings, with calibrations": p. 563-569. "BMI LP music selecter [sic]": inserted. Marriage of Figaro.--Master-singers of Nuremberg.--Aida.--Carmen.--Tales of Hoffmann.--Bohême.-- Tosca.--Rosenkavalier.--Love of three oranges.--Wozzeck. Operas Stories, plots, etc. Operas Discography. Downes, Olin, 1886-1955. Marker, Leonard. Ten operatic masterpieces. c-Music MT95 .T36 Copy 1 BOOKS 00779cam a22002417a 4500 104831 20020724161346.0 960806s1995 it b 000 0 ita (DLC) 96177029 7 cbc orignew 3 ncip 19 y-gencatlg Acquire 1 shelf copy policy default rb05 8/6/96 to cat ; sh47 2002-07-24 to shelf 96177029 (ItFiC)it 96071036 DLC DLC MLCS 2002/06831 (B) Tosca, Pino. Il cammino della tradizione : il tradizionalismo italiano, 1920-1990 / Pino Tosca. Rimini : Il Cerchio, c1995. 114 p. ; 21 cm. La bottega di Eraclito Includes bibliographical references. ap 00886cam a2200253 a 4500 209897 20050308081736.0 990106s1998 no b 000 0 nor (DLC) 99159298 7 cbc orignew 3 ncip 19 y-gencatlg of10 01-06-99 to Cat.; ld04 2004-03-12 telework; to subj. ld09 2005-03-08 to BCCD 99159298 8203180566 DLC DLC PT8876 .P65 1998 Pollan, Brita, 1939- Peer Gynt og Carl Gustav Jung : med sjelen som følgesvenn / Brita Pollan. Oslo : Aschehoug, c1998. 332 p. ; 21 cm. Includes bibliographical references (p. [325]-332). Ibsen, Henrik, 1828-1906. Peer Gynt. Gynt, Peer (Fictitious character) Jung, C. G. (Carl Gustav), 1875-1961. ap 01204nim a22003257a 4500 5695469 19930903120245.0 stupsndmbnnnd 930601q19701991iluuun d eng (DLC) 93842034 7 cbc orignew 4 ncip 19 y-genmusic 93842034 DLC DLC eng ger RWD 5185-RWD 5188 Danton's death [sound recording]. between 1973 and 1991. 4 sound tape reels : analog, 15 ips, 2 track, stereo., dbx encoded ; 10 in. Radio adaptation of Georg Büchner's drama. Composite broadcast master. Recorded for National Radio Theatre at Streeterville Studios Inc., Chicago, Ill. From the National Radio Theatre of Chicago Collection. Production level cataloging. Danton, Georges Jacques, 1759-1794 Drama. Radio adaptations. Büchner, Georg, 1813-1837. Dantons Tod. National Radio Theatre of Chicago Collection (Library of Congress) New - Copy Command TA28 c-RecSound RWD 5185-RWD 5188 MUSIC 00999cam a2200277 a 4500 1058619 19920416121229.0 900328s1988 au a 000 0 ger (DLC) 90136825 7 cbc orignew 4 ncip 19 y-gencatlg ep78 05-15-90; ec23/ec11 to SCD 10-10-90; fd08 03-23-92; fl27 04-15-92 90136825 3854490194 DLC DLC DLC PN1998.3.G453 A614 1988 791.43/0233/092 20 3 Filme / Lisa Buchmann ... [et al.] ; Penelope Georgiou (Hrsg.). Wien : Sonderzahl, c1988. 65 p. : ill. ; 21 cm. Title on back cover flap: 3 Filme von Penelope Georgiou, "Petunia", "Tonis und Eleni", "Apostolos." Georgiou, Penelope Criticism and interpretation. Buchmann, Lisa. Georgiou, Penelope. Drei Filme. ap c-GenColl PN1998.3.G453 A614 1988 Copy 1 BOOKS 01266njm a22002537a 4500 5671061 19930209134547.6 sduzsnznnmlne 930203s1992 enkuun dz (DLC) 93702845 0 cbu orignew 5 ncip 19 y-genmusic ACCESSION RECORD qu42 02-03-93 93702845 CHAN 9075 Chandos Records DLC DLC Chandos Records CHAN 9075 Niels W. Gage--Elverskud op. 30 ; Overture, Efterklange af Ossian, op. 1 ; Fünf Gesänge, op. 13 [sound recording] / Eva Johansson ; Anne Gjevang ; Poul Elming ; Danish National Radio Choir ; Danish National Radio Symphony Orchestra ; Dmitri Kitajenko. Colchester, England : Chandos Records, p1992. 1 sound disc : digital, stereo. ; 4 3/4 in. + 1 booklet (39 p.) Location: Chandos Records: CHAN 9075. Eva Johansson, soprano ; Anne Gjevang, contralto ; Poul Elming, tenor ; Danish National Radio Choir ; Danish National Radio Symphony Orchestra ; Dmitri Kitajenko, conductor. Danish Radio Concert Hall, Copenhagen, Dec. 16, 1991 and Jan. 14-16, 1992. TA28 c-RecSound Chandos Records CHAN 9075 MUSIC 05366cjm a2200757 a 4500 13578524 20060523152600.0 st|omndmbbnu|e 040430p19741953dcuopn 7 cbc orignew 3 ncip 20 y-soundrec acquire 2 shelf copies policy default qu63 2004-04-30 2004652171 19530130 1254 N42 DLC DLC DLC LWO 7657, r28A1-29A2 (preservation master) 8th annual Roosevelt memorial concert, Waldorf Astoria Hotel, Grand Ballroom, January 30, 1953 [sound recording]. [1974] 2 sound tape reels : analog, 7 1/2 ips, 2 track, mono. ; 10 in. Cataloged from recording engineer's notes and audition. West Point Glee Club (1st-3rd; 21st-24th works); Joseph Fuchs, violin (4th, 13th-15th works) ; Brooks Smith, piano (4th-8th, 13th-15th works) ; Mack Harrell, baritone (5th-8th works); Harpsichord Quartet (Sylvia Marlowe, harpsichord; Claude Monteaux, flute; Bernard Greenhouse, violoncello; Harry Schulman, oboe) (9th-12th works) ; Eleanor Steber, soprano, James Quillan, piano (16th-20th works) ; Deems Taylor, master of ceremonies. Preservation tape produced from original Voice of America acetate tape (VOA 149) in the Recording Laboratory of the Library of Congress. Commemorating the 71st anniversary of the birth of F.D. Roosevelt, this concert benefits the National Foundation for Infantile Paralysis. Hosted by Deems Taylor. The Corps / W. Franke Harling -- Blue-tail fly -- Medley: Down among the sheltering palms; Give me one dozen roses -- Concerto in E minor for violin and piano. Allegro moderato ; Allegro giocoso / Pietro Nardini -- Where're you walk / Handel -- Wahn! Wahn! Überall Wahn! / Wagner -- Shenandoah / arr. Celius Dougherty -- I am a roving gambler / John Jacob Niles -- Interviews with Deems Taylor and Mack Harrell -- Sonata in B minor, flute, violoncello, harpsichord / Jean-Baptiste Loeillet -- Sonata no. 3, G minor, violoncello and harpsichord / J.S. Bach -- Sonata in A major for harpsichord, K. 113 / Domenico Scarlatti -- Sonata in D minor, op. 4, no. 3. Allegro ; Aria ; Allegro / Leclair -- Tarantelle caprice / Wieniewski ; rev. Kreisler -- Caprice no. 17 / Paganini -- Vissi d'arte : from Tosca / Puccini -- Hello, hello : from The telephone / Menotti -- Csárdás from Fledermaus / J. Strauss -- O, whistle and I'll come to ye : Scottish folksong -- Summertime : from Porgy and Bess / Gershwin -- Border ballad : March, march over the border -- A-round the corner -- Give me your tired, your poor / Irvin Berlin -- Old man Noah. Choruses (Men's voices) with piano. Choruses (Men's voices), Unaccompanied. Concertos (Violin) Excerpts, Arranged. Oratorios Excerpts. Operas Excerpts. Songs (Medium voice) with piano. Violin and piano music. Trios (Harpsichord, flute, violoncello) Sonatas (Violoncello and harpsichord) Sonatas (Harpsichord) Trio sonatas (Flute, oboe, continuo) Songs (High voice) with piano. Western art music Radio. radfg Fuchs, Joseph. prf Smith, Brooks. prf Harrell, Mack. prf ive Steber, Eleanor. prf Quillan, James. prf Taylor, Deems, 1885-1966. ive Harling, W. Franke (William Franke), 1887-1958. Corps. Nardini, Pietro, 1722-1793. Concertos, violin, orchestra, E minor. Allegro moderato. Nardini, Pietro, 1722-1793. Concertos, violin, orchestra, E minor. Allegro giocoso. Handel, George Frideric, 1685-1759. Semele. Where'er you walk. Wagner, Richard, 1813-1883. Meistersinger von Nürnberg. Wahn! Wahn! Überall Wahn!. Niles, John Jacob, 1892-1980. Gambling songs. Rovin' gambler. Bach, Johann Sebastian, 1685-1750. Sonatas, viola da gamba, harpsichord, BWV 1029, G minor. Scarlatti, Domenico, 1685-1757. Sonatas, harpsichord, K. 113, A major. Leclair, Jean Marie, 1697-1764. Trio sonatas, violins, continuo, op. 4. No. 3. Selections. Ravel, Maurice, 1875-1937. Vocalise en forme d'habanera; arr. Wieniawski, Henri, 1835-1880. Études-caprices, op. 18. No 4; arr. Paganini, Nicolò, 1782-1840. Caprices, violin, M.S. 25. No. 17. Puccini, Giacomo, 1858-1924. Tosca. Vissi d'arte. Menotti, Gian Carlo, 1911- Telephone. Hello! Hello? Oh, Margaret, it's you. Strauss, Johann, 1825-1899. Fledermaus. Csárdás. Gershwin, George, 1898-1937. Porgy and Bess. Summertime. Berlin, Irving, 1888-1989. Give me your tired. West Point Cadet Glee Club. prf Harpsichord Quartet. prf Voice of America Music Library Collection (Library of Congress) DLC Jim crack corn. Shenandoah (Song) Several works not adequately identified to analyze. 01007cam a2200277 i 4500 1801466 20000214140732.0 780601s1977 fr f b 000 0 fre (DLC) 78364789 7 cbc orignew 3 ncip 19 y-gencatlg 78364789 F77-16332 2718600810 : 33.00F DLC DLC DLC PQ1837 .A75 842/.4 Alceste et l'absolutisme / Jean-Pierre Vincent, Peter Szondi, Daniel Lindenberg, Bernard Chartreux ... [etc.]. Paris (9, rue Linné, 75005) : Éditions Galilée, 1977. 130 p., [10] p. of plates, [1] leaf of plates ; 22 cm. Politique et société 0397-3956 On cover: Essais de dramaturgie sur le Misanthrope. Includes bibliographical references. Molière, 1622-1673. Misanthrope. Comedy. Vincent, Jean-Pierre. c-GenColl PQ1837 .A75 Copy 1 BOOKS 00543nam a2200181u 4500 7688237 00000000000000.0 841105n gw 000 0 ger (DLC)unk84086999 0 cbc premunv u ncip 19 y-gencatlg unk84086999 DLC CarP DLC M1503.G621 K6 Goldmark, Carl, 1832- [from old catalog] Die Königin von Saba. Op. 27. Hamburg, Hugo Pohle [n.d.] 276 p. cm. c-Music M1503.G621 K6 Copy 1 PREM 00714nam a2200205u 4500 9109955 00000000000000.0 860403s1886 nyu 000 0 eng (DLC)unk85057456 0 cbc premunv u ncip 19 y-gencatlg unk85057456 DLC CarP DLC ML50.G621 K62 1886 Copy 2. Season of 1885-86. Goldmark, Karl, 1830-1915. [from old catalog] Die königin von Saba. Libretto. English & German. [from old catalog] Die königin von Saba---The queen of Sheba; opera in four acts. [New York? 1886?] [39] p. 24 cm. c-Music ML50.G621 K62 1886 Copy 1 PREM 01543cjm a22004094a 4500 12294722 20060608012331.0 sd|fsngnnmmned 010131m20009999enkuun| |z | (DLC)12294722 (DLC)2001335722 7 cbc orignew 3 ncip 20 y-genmusic acquire 2 shelf copies policy default nh06 2001-31-01 to MBRS vk07 2006-06-06 vk07 2006-06-07 v. 1-2 to MBRS 2001335722 2002401254 034571171944 (v. 1) 034571171951 (v. 2) CDA67194 Hyperion CDA67195 Hyperion VCD19080 Victoria DLC DLC SDB 41494, etc. Eben, Petr. Organ music The organ music of Petr Eben [sound recording]. London : Hyperion, p2000-<p2001> <2> sound discs : digital, stereo ; 4 3/4 in. Hyperion: CDA67194--<CDA67195>. Halgeir Schiager playing the organ of Hedvig Eleonora Kyrkan, Stockholm. Vol. 1 recorded in June 1992; v. 2 on June 6-8, 2000. Vol. 1 originally issued: Victoria VCD19080. Compact discs. Program notes in English, French, and German in containers. 1. Laudes ; Job ; Hommage à Buxtehude -- 2. Faust ; Four biblical dances Organ music. Schiager, Halgeir, 1955- prf Complete in 5 v. as of June 2006--Hyperion website. 01006cam a2200289 a 4500 251663 20010511105431.0 990714s1997 fr b 000 0 fre d (DLC) 99226396 7 cbc copycat 3 ncip 19 y-gencatlg oe05 07-14-99 to cat.; lf11/dsc. 01-06-00; lf07 02-14-00; lf29 02-17-00 to Dewey; aa11 02-29-00 99226396 2252031751 (OCoLC)38289273 FBF FBF EMU TZT DLC lccopycat PQ2613.I74 E533 1997 842/.912 21 Electre de Jean Giraudoux : regards croisés / sous la direction de Jacques Body et Pierre Brunel. Paris : Klincksieck, 1997. 202 p. ; 21 cm. Includes bibliographical references (p. 195-199). Giraudoux, Jean, 1882-1944. Electre. Electra (Greek mythology) in literature. Body, Jacques. Brunel, Pierre. ap 01006cam a2200289 a 4500 251663 20010511105431.0 990714s1997 fr b 000 0 fre d (DLC) 99226396 7 cbc copycat 3 ncip 19 y-gencatlg oe05 07-14-99 to cat.; lf11/dsc. 01-06-00; lf07 02-14-00; lf29 02-17-00 to Dewey; aa11 02-29-00 99226396 2252031751 (OCoLC)38289273 FBF FBF EMU TZT DLC lccopycat PQ2613.I74 E533 1997 842/.912 21 Electre de Jean Giraudoux : regards croisés / sous la direction de Jacques Body et Pierre Brunel. Paris : Klincksieck, 1997. 202 p. ; 21 cm. Includes bibliographical references (p. 195-199). Giraudoux, Jean, 1882-1944. Electre. Electra (Greek mythology) in literature. Body, Jacques. Brunel, Pierre. ap 01324cam a22002891 4500 8997357 20010511105205.0 750612s1971 xx 000 0 fre (DLC) 73317196 7 cbc oclcrpl u ncip 19 y-gencatlg 73317196 (OCoLC)1387995 DLC NIC DLC PA4415.F8 E5 1971 Sophocles. Electra. French Électre [par] Sophocle. Parenthèses, de Yannis Ritsos. Traduction du grec et montage par Antoine Vitez ... [Nanterre, Théâtre des Amandiers, 16 octobre 1971.] Paris, les Éditeurs français réunis, 1971. 119 p. 14 cm. "Le texte ... est la traduction entière de l'Électre de Sophocle; des fragments de l'oeuvre poétique de Yannis Ritsos - des parenthèses - y sont ajoutés selon un montage qui est celui du spectacle donné ... par le Théâtre des Amandiers." "Les Parenthèses de Yanis Ritsos sont traduites en collaboration avec Chrysa Prokopaki." Electra (Greek mythology) Drama. Ritsos, Giannēs, 1909- Vitez, Antoine, tr. Prokopaki, Chrysa, tr. OCLC REPLACEMENT c-GenColl PA4415.F8 E5 1971 0003051855A Copy 1 OCLCREP 03684cjm a22005651a 4500 12325513 20031125113255.0 sdrbmmennmplue 820526s1954 nyuuun dhis eng (OCoLC)ocm08464618 0 cbc copycat 3 ncip 20 y-soundrec 00718611 LM 6029-2 RCA Red Seal DLC CoGrU OCoLC DLC lcderive RCA Red Seal LM 6029-2 History of music in sound. Vol. 4: The age of humanism [sound recording] New York : RCA Victor, [1954] 1 sound disc : 33 1/3 rpm, mono. ; 12 in. "The history of music in sound, vol. 4: The age of humanism (1540-1630) edited by J.A. Westrup. New York, Oxford University Press, 1954" (71 p. front., music, 25 cm.), program notes by J.A. Westrup and others, intended originally for use with 78 rpm. version laid in container; corrected contents (p. 7-8) applicable to 33 1/3 rpm. version inserted. Various performers. Wie schön leuchet der Morgenstern / Praetorius -- In ecclesiis / Giovanni Gabrieli -- Vivray-je tousjours en soucy? / Claudin de Sermisy -- Toda mi vida os amé / Luis Milan -- Thyrsis and Milla / Morley -- Sleep, wayward thoughts / Dowland -- Ricercar no. 7 / Willaert -- Padouan and Intrada from Suite no. 3 / Peuerl -- 3-part fantasia, no. 3 / Gibbons -- 4-part fantasia / Coperario -- My lady Carey's dompe / Anon. -- My selfe / Bull -- His humour / Farnaby -- The king's juell / Gibbons -- Capriccio sopra un soggetto / Frescobaldi -- Ricercar arioso, no. 1 / Andrea Gabrieli -- Chorale variations: Ach Gott, von Himmel sieh' darein / Sweelinck -- Scene from Orfeo, Act IV / Monteverdi -- Bevi, bevi, from La morte d'Orfeo / Landi. Choruses, Sacred (Mixed voices) with instrumental ensemble. Songs with lute. Viol music. Harpsichord music. Organ music. Operas Excerpts. Westrup, J. A. (Jack Allan), 1904-1975. Praetorius, Michael, 1571-1621. Polyhymnia caduceatrix et panegyrica. Wie schön leuchtet der Morgenstern. Gabrieli, Giovanni, 1557-1612. Symphoniae sacrae. In ecclesiis. Sermisy, Claudin de, ca. 1490-1562. Vivray-je tousjours en soucy. Milán, Luis, 16th cent. Maestro. Toda mi vida os amé. Morley, Thomas, 1557-1603? Ayres. Thirsis and Milla. Dowland, John, 1563?-1626. Songs or ayres, 1st book Sleep wayward thoughts. Willaert, Adrian, 1490?-1562. Ricercari a tre voci. No. 7. Peuerl, Paul, 1575 (ca.)-1625. Suites, strings (1611). No. 3. Gibbons, Orlando, 1583-1625. Fantasies, voices (3), H. 7-15. No. 3. Coperario, John, 1570 (ca.)-1626. Fantasias, viols (4) Bull, John, d. 1628. My self. Farnaby, Giles, ca. 1565-1640. His humour. Gibbons, Orlando, 1583-1625. King's jewel. Frescobaldi, Girolamo, 1583-1643. Capriccios, keyboard instrument No. 11. Gabrieli, Andrea, ca. 1533-1585. Canzoni alla francese et ricercari ariosi. Ricercar arioso, no. 1. Sweelinck, Jan Pieterszoon, 1562-1621. Ach Gott, vom Himmel sieh' darein 14. Monteverdi, Claudio, 1567-1643. Orfeo. Selections. Landi, Stefano, 1586 or 7-1639. Morte d'Orfeo Bevi, bevi, securo l'ondo. My Lady Carey's dompe. Age of humanism. OCLC Claimed Recordings 00610nam a2200193u 4500 8253987 00000000000000.0 840120s1920 it 000 0 ita (DLC) 21003267 0 cbc premunv u ncip 19 y-gencatlg 21003267 DLC CarP DLC PQ4851.U3 M7 1920 Zùccoli, Luciano, 1868-1929. [from old catalog] La morte d'Orfeo. Nuova ed., riv. e corr. Milano, Casa editrice Vitagliano [c1920] 239, [1] p. 19 cm. c-GenColl PQ4851.U3 M7 1920 Copy 1 PREM 02914cjm a2200493 a 4500 13760751 20060316152457.0 sd fsngnnmmned 041025p20042003enkopn| defhi | fre d 2004400546 034571174471 CDA67447 Hyperion (OCoLC)ocm56340415 CIN CIN DLC fre fre eng fre eng fre ger lccopycat SDB 33644 Rameau, Jean Philippe, 1683-1764. Operas. Selections Règne Amour [sound recording] : love songs from the operas / Jean-Philippe Rameau. London, England : Hyperion, p2004. 1 sound disc : digital, stereo. ; 4 3/4 in. Sung in French. Carolyn Sampson, soprano ; Ex Cathedra ; Jeffrey Skidmore, conductor. Recorded Nov. 14-16, 2003, St. Paul's Church, New Southgate, London. Compact disc. Program notes in English, French, and German, and texts with English translations in container. Les Indes galantes. Fra le pupille ; Rigaudon I ; Rigaudon II ; Fuyez, vents orageux! ; Tambourin I ; Tambourin II ; Partez! ; Régnez, amour ; Tempête: La nuit couvre lex cieux! -- Les Paladins. C'est trop soupirer -- Platée. Soleil, fuis de ces lieux! -- Zoroastre. Règne Amour -- Dardanus. Marche pour les différentes nations ; Par tes bienfaits ; Air gracieux ; L'amour, le seul amour ; Menuet en rondeau ; Si l'amour coûte des soupirs ; Tambourin I ; Tambourin II -- Pygmalion. Du pouvoir de l'amour -- Hippolyte et Aricie. Rossignols amoureuex -- Les Indes galantes. Musettes, résonnez ; Menuet en rondeau -- Platée. Formons les plus brillants concerts ; Aux langueurs d'Apollon ; Honneur à la folie ; Aimables jeux ; Honneur à la folie ; Je veux finir ; Hymen. Operas Excerpts. Love Songs and music. Sampson, Carolyn. prf Skidmore, Jeffrey, 1951- cnd Rameau, Jean Philippe, 1683-1764. Indes galantes. Selections. Rameau, Jean Philippe, 1683-1764. Paladins. C'est trop soupirer. Rameau, Jean Philippe, 1683-1764. Zoroastre. Règne Amour. Rameau, Jean Philippe, 1683-1764. Dardanus. Selections. Rameau, Jean Philippe, 1683-1764. Pygmalion. Du pouvoir de l'Amour. Rameau, Jean Philippe, 1683-1764. Hippolyte et Aricie. Rossignols amoureux. Rameau, Jean Philippe, 1683-1764. Platée. Selections. Ex Cathedra Chamber Choir. prf Ex Cathedra Baroque Orchestra. prf 7 cbc copycat 2 ncip 20 y-genmusic acquire 2 shelf copies policy default nh07 10-25-04; to MBRS vl28 2006-03-07 z-client vl28 2006-03-07 vl09 2006-03-16 to M/B/RS 00511nam a2200181u 4500 8166437 00000000000000.0 841204s1743 fr 000 0 fre (DLC)unk84191431 0 cbc premunv u ncip 19 y-gencatlg unk84191431 DLC CarP DLC ML52.2.I4 R2 Les Indes galantes. [Paris] Jean Baptiste Christophe Ballard, 1743. p. cm. Rameau. c-Music ML52.2.I4 R2 Copy 1 PREM 02470cjm a2200397 a 4500 12363786 20040322124129.0 ss|usnzlzznned 010329s1996 dcusun 7 cbc orignew 3 ncip 20 y-genmusic acquire 2 shelf copies policy default vk03 03-29-01; qu27 05-14-01 2001572988 19961203 3850 DLC DLC DLC RGA 5216 (playback copy) RGA 5217 (digital master) Rousset, Christophe. prf [Library of Congress Music Division concert, 1996-12-03] [sound recording]. 1996. 1 sound cassette : digital, stereo. Christophe Rousset, harpsichord. Recorded in the Terrace Theater in the John F. Kennedy Center for the Performing Arts, Washington, D.C., Dec. 3, 1996. Concert given under the auspices of the Mae and Irving Jurow Fund in the Library of Congress. Produced by the Music Division and the Recording Laboratory of the Library of Congress. Suite in D minor. Prelude ; Allemande ; Courante ; Sarabande ; Canarie ; Chaconne / Louis Couperin -- Suite no. XII in C major. Lamento-- sopra la dolorosa perdita della Real Maesta di Ferdinando IV ; Gigue ; Courante ; Sarabande / Johann Jakob Froberger -- Suite no. IV in G minor. La marella ; La clément ; Sarabande de la d'eaubonne ; La bournonville / Antoine Forqueray -- Suite : from "Les indes galantes." Ouverture ; Air polonais ; Musette en rondeau ; Air gratieux pour les amours ; Air pour les amants et les amantes ; Air pour les esclaves africains ; Rigaudon I/II ; Tambourin I/II ; Gavotte I/II ; Les sauvages ; Chaconne / Jean-Phillippe Rameau. Cataloged from printed program; actual tape contents may vary. Suites (Harpsichord) Harpsichord music, Arranged. Couperin, Louis, 1626 (ca.)-1661. Harpsichord music. Selections. Froberger, Johann Jacob, 1616-1667. Suites, keyboard instrument, no. 12, C major. Forqueray, Antoine, 1671-1745. Pièces de viole. No 4; arr. Rameau, Jean Philippe, 1683-1764. Indes galantes. Selections; arr. Library of Congress. Mae and Irving Jurow Fund. fnd Library of Congress. Music Division. Library of Congress. Recording Laboratory. 00972cjm a22002653a 4500 14359288 20060531151650.0 sd fsngnnmmned 060501s2005 nyuppn| | eng 7 cbc orignew 3 ncip 20 y-genmusic acquire 2 copies policy default vn00 2006-05-01 vn07 2006-05-01 to MBRS/RS SMCD cdpop 2006569591 828766888324 82876 68883-2 RCA Victor DLC DLC SDB 30248 Defined [sound recording]. New York, N.Y. : RCA Victor, p2005. 1 sound disc : digital ; 4 3/4 in. Amici Forever. Compact disc. La fiamma sacra -- Nella fantasia --The prayer -- Aranjuez ma pensée -- So far away -- Nostalgia -- Core 'ngrato -- Land & freedom -- Mon coeur s'ouvre á́ ta voix -- Recondita armonia -- Adagio -- Ocean heart. Brief record. 01566cjm a2200349 a 4500 14061857 20050902074440.0 sd fsngnnmmned 050802s2004 enkppn| | eng d 2005589227 028947562948 475 629-4 Decca Records (OCoLC)ocm57678336 NVC NVC OCLCQ DLC lccopycat SDB 24727 Watson, Russell, 1973- Amore musica [sound recording] / Russell Watson. London : Decca Records, p2004. 1 sound disc : digital, stereo. ; 4 3/4 in. Compact disc. Program notes on insert in container. Sung in Italian and English. Russell Watson, vocals ; with instrumental accompaniment. Produced by Simon Frangien. Amore e musica -- Magia sarà -- You raise me up -- Il gladiatore (based on the film Gladiator) -- I te vurria vasa -- I believe -- La fiamma sacra -- You'll still be there for me (based on the film Rob Roy) -- The alchemist (feat. Lara Fabian) -- Pray for the love -- C'è sempre musica -- I'll walk with God (from the Student Prince) -- We will stand together (based on Elgar's Nimrod). Popular music 2001-2010. Songs (High voice) with orchestra. 7 cbc copycat 2 ncip 20 y-genmusic acquire 2 shelf copies policy default vn09 2005-08-02 z-client vn09 2005-08-02 vl27 2005-08-31 to MBRS smcd cdpop 00625cam a22001937a 4500 3345119 19861105000000.0 851010s1985 dr 000 0 spa (DLC) 85595486 7 cbc orignew u ncip 19 y-gencatlg 85595486 DLC DLC DLC MLCS 85/13231 (P) Pérez, Mario Emilio. Traicionero aguardiente! / Mario Emilio Pérez. [Santo Domingo? Dominican Republic] : Biblioteca Nacional, [1985?] 112 p. ; 22 cm. Colección Orfeo c-GenColl MLCS 85/13231 (P) Copy 1 BOOKS 01786cjm a2200397 a 4500 5685001 20010208090029.0 sdudmsdnnmslu 930720s1940 ru opn ruso (DLC) 93719030 7 cbc orignew 3 ncip 19 y-genmusic 93719030 9162V Aprelevskiĭ zavod pami͡ati 1905 g. 9163V Aprelevskiĭ zavod pami͡ati 1905 g. G-2665 Aprelevskiĭ zavod pami͡ati 1905 g. G-2666 Aprelevskiĭ zavod pami͡ati 1905 g. DLC DLC DLC rus ita Aprelevskiĭ zavod pami͡ati 1905 g. 9162V--9163V Gluck, Christoph Willibald, Ritter von, 1714-1787. Orfeo ed Euridice. Che farò senza Euridice. Russian Arii͡a Orfei͡a [sound recording] : iz 3 akta op. Orfeĭ : muz. Kh. Gli͡uka. [Moscow] : Aprelevskiĭ zavod pami͡ati 1905 g., [ca. 1940] 1 sound disc : analog, 78 rpm, mono. ; 10 in. Aprelevskiĭ zavod pami͡ati 1905 g.: 9162V (matrix G-2665) (1st side), 9163V (matrix G-2666) (2nd side). Opera aria. I.S. Kozlovskiĭ, [tenor] ; Ork[estr] Mosk. Gosfilarmonii ; A.I. Orlov, conductor. "NKOM SSSR." From the Library of Congress Berger Collection. Operas Excerpts. Kozlovsʹkyĭ, Ivan Semenovych, 1900-1993. prf Orlov, A. I. (Aleksandr Ivanovich), 1873-1948 cnd Moskovskai͡a gosudarstvennai͡a filarmonii͡a. Simfonicheskiĭ orkestr. prf Berger Collection (Library of Congress) DLC TA28 c-RecSound Aprelevskiĭ zavod pami͡ati 1905 g. 9162V--9163V MUSIC 01100cam a22002891 4500 7730987 20001124181018.0 770804s1903 gw 000 0 ger (DLC) 04004851 7 cbc oclcrpl u ncip 19 y-gencatlg 04004851 (OCoLC)3161262 DLC MBU MBU DLC ML1733.2 .H59 Heuss, Alfred, 1877-1934. Die Instrumental-Stücke des "Orfeo" und die venetianischen Opern-Sinfonien. Leipzig, Druck von Breitkopf & Härtel, 1903. 4 p. l., 125 p. 23 cm. Inaug.-diss.--Leipzig. "Literatur": verso of 3d p. l. Lebenslauf. "Beide Teile der Arbeit sind als selbständige Abhandlungen in den Sammelbänden der Internationalen Musikgesellschaft (IV. 2, 3) erschienen."--Pref. Monteverdi, Claudio, 1567-1643. Orfeo. Opera Italy Venice. Instrumental music Italy Venice. OCLC REPLACEMENT c-Music ML1733.2 .H59 Copy 1 OCLCREP 01131cam a2200277u 4500 10439017 20050706181204.0 860610n xx 000 0 eng (DLC) 76750452 0 cbc premunv u ncip 19 y-gencatlg 76750452 DLC CarP DLC Gluck, Christoph Willibald, Ritter von, 1714-1787. [from old catalog] Orfeo ed Euridice. Selections. [from old catalog] Orfeo ed Euridice [Sound recording] (complete orchestral music). [n.p.] RCA Victrola VICS 1435. [1969] p. 2 s. 12 in. 33 1/3 rpm. microgroove. stereophonic. Rome Opera House Orchestra; Pierre Monteux, conductor. Recorded June 1957. Playable also on monaural equipment. Program notes on slipcase. Operas To 1800 Excerpts. Orchestral music To 1800. [from old catalog] Orpheus (Greek mythology) Songs and music. Monteux, Pierre, 1875-1964. [from old catalog] Teatro dell'opera (Rome, Italy). Orchestra 01464cjm a22003612a 4500 13309275 20040123151544.0 sd fsngnnmmned 030812s1994 nmujzn d KOKO 1299 Kokopelli Records (DLC) 2003610636 JQJ JQJ OCLCQ DLC KOKO 1299 Kokopelli Records (OCoLC)ocm35297382 794044129925 2003610636 lcderive SDA 73658 Trio da Paz. prf Black Orpheus [sound recording] / Trio da Paz Santa Fe, N.M. : Kokopelli Records, p1994. 1 sound disc (ca. 55 min.) : digital, stereo. ; 4 3/4 in. Compact disc. A felicidade -- Frevo -- A felicidade -- Manha de Carnaval -- O nosso amor -- Chao de estrelas -- Samba de Orfeo -- Dona Maria -- A felicidade -- Manha de Carnaval -- Namacumba -- Hugs & kisses -- Samba de Orfeo. Produced by Herbie Mann. Trio da Paz (Romero Lubambo, guitars ; Nilson Matta, bass ; Duduka Da Fonseca, percussion) ; with accompaniying musicians. Recorded at Studio 900, New York City, June 15-22, 1994. Jazz Brazil 1991-2000. 7 cbc copycat 3 ncip 20 y-genmusic acquire 2 copies policy default muzerec vn17 2003-08-12 to MBRS/RS OCLC srreplace 2003-09 01834cam a22004214a 4500 13894739 20050722092729.0 050107s2003 bl a bc 000 0 por d (DLCov) 2005343038 7 cbc copycat 2 ncip 20 y-gencatlg acquire 1 shelf copy policy default wr08 01/07/2005 z-processor; desc jh34 2005-04-13 to SL jh34 2005-04-13 to BCCD 2005343038 8589719014 (OCoLC)ocm53464564 SMI SMI DLC por eng lccopycat s-bl--- N6655 .C6555 2003 Coleção Nemirovsky / coordenação editorial, Maria Alice Milliet ; textos de Maria Alice Milliet ... [et al.] ; pesquisa, Aida Cordeiro = Nemirovsky collection / edit by Maria Alice Milliet ; texts by Maria Alice Milliet ... [et al.] ; research, Aida Cordeiro. Nemirovsky collection [São Paulo, Brazil] : Museu de Arte Moderna de São Paulo : Fundação José e Paulina Nemirovsky, [2003?] 323 p. : ill. (chiefly col.) ; 30 cm. Portuguese and English. Exhibition catalog. "List of works and selected bibliography": p. [301]-321. Art, Brazilian 20th century Exhibitions. Nemirovsky, José Art collections Exhibitions. Nemirovsky, Paulina Art collections Exhibitions. Fundação José e Paulina Nemirovsky Exhibitions. Art Private collections Brazil São Paulo Exhibitions. Milliet, Maria Alice. Cordeiro, Aida. Museu de Arte Moderna de São Paulo. Fundação José e Paulina Nemirovsky. ODE-rj c-GenColl am 00107692083 02558cam a22003618a 4500 14256438 20060314121815.0 060207s2006 nyu b 001 0 eng 7 rix orignew 1 ecip 20 y-gencatlg acquire 2 shelf copies policy default sf09 2006-02-07 sf09 2006-02-07 aa20 2006-02-09 2006004307 9780814727355 (cloth) 0814727352 (cloth) 9780814727362 (pbk.) 0814727360 (pbk.) DLC DLC DLC pcc HQ1111 .G56 2006 305.42 22 Global feminism : transnational women's activism, organizing, and human rights / edited by Myra Marx Ferree and Aili Mari Tripp. New York : New York University Press, c2006. 0607 p. cm. Includes bibliographical references and index. Globalization and feminism : opportunities and obstacles for activism in the global arena / Myra Marx Ferree -- Unlikely godmother : the UN and the global women's movement / Margaret Snyder -- The evolution of transnational feminisms : consensus, conflict, and new dynamics / Aili Mari Tripp -- Turkey's modern paradoxes : identity politics, women's agency, and universal rights / Yakin Ertürk -- Working women of the world unite : labor organizing and transnational gender solidarity among domestic workers in Hong Kong / Sarah Swider -- Women's organizing in post-Yugoslav countries : talking about "donors" / Aida Bagi -- Women as agents for development : learning from the experiences of women in Finland / Hilkka Pietilä -- Regional women's activism : African women's networks and the African Union / Melinda Adams -- Measuring feminist mobilization : cross-national convergences and transnational networks in Western Europe / Dorothy E. McBride and Amy G. Mazur -- Transnational feminist NGOs on the Web : networks and identities in the global North and South / Myra Marx Ferree and Tetyana Pudrovska -- Human/women's rights and feminist transversal politics / Nira Yuval-Davis -- Challenges in transnational feminist mobilization / Aili Mari Tripp. Feminism. Feminism International cooperation. Transnationalism. Ferree, Myra Marx. Tripp, Aili Mari. Table of contents http://www.loc.gov/catdir/toc/ecip068/2006004307.html Nicholas Taylor; phone: 212-992 9998; email: npt203@nyu.edu; bc: despina.gimbel@nyu.edu 01558cam a2200373 a 4500 2426846 19920903135933.0 870403s1986 bl 100 0 por (DLC) 87128701 7 cbc orignew 2 ncip 19 y-gencatlg 87128701 Cz$30.00 DLC DLC DLC s-bl--- LC5163.B7 M42 1986 370.19/4/0981 19 MEB, uma história de muitos / organização, NOVA ; [organizadoras, Maria Aída B. Costa, Vera Jaccoud, Beatriz Costa]. Petrópolis : Editora Vozes ; Rio de Janeiro, RJ, Brasil : NOVA--Pesquisa, Assessoramento e Avaliação em Educação, 1986. 125 p. ; 23 cm. Cadernos de educação popular ; 10 Debates by representatives of Movimento de Educação de Base, 1961-1966, sponsored by NOVA in Aug. 1985. Fundamental education Brazil Congresses. Popular education Brazil Congresses. Radio in education Brazil Congresses. Movimento de Educação de Base (Brazil) Congresses. Costa, Maria Aída B. (Maria Aída Bezerra) Jaccoud, Vera. Costa, Beatriz B. Movimento de Educação de Base (Brazil) NOVA (Organization) SOURCE:ap unbound bv31/bv04 to SCD 06-03-87;fh02 06-05-87/fh01 06-05-87; fl35 06-15-87; aa04 07-17-87 c-GenColl LC5163.B7 M42 1986 Copy 1 BOOKS 01102nam a2200301 a 4500 3083920 19980909110330.8 971217s1997 ag b 010 0 spa (DLC) 97225857 7 cbc orignew 2 ncip 19 y-gencatlg rs16 to cat 12-17-97; sg18 06-04-98; sj11 08-20-98; sg12 08-26-98 97225857 9502010523 DLC DLC s-ag--- KHA965.Z9 R474 1997 346.8203 21 Responsabilidad por daños en el tercer milenio : homenaje al profesor doctor Atilio Aníbal Alterini / Alberto José [i.e. Jesús] Bueres, Aída Kemelmajer de Carlucci, directores. Buenos Aires, Argentina : Abeledo-Perrot, [1997] 1110 p. ; 23 cm. Includes bibliographical references. Torts Argentina. Alterini, Atilio Aníbal. Alterini, Atilio Aníbal. Bueres, Alberto J. Kemelmajer de Carlucci, Aída. ap c-LL KHA965.Z9 R474 1997 Copy 1 BOOKS 02131njm a22003857a 4500 5616248 19890523000000.0 sdubmmennmplu 890421q19811986it opn ita (DLC) 89751890 7 cbc orignew 5 ncip 19 y-genmusic 89751890 GB 1032 Bongiovanni DLC DLC DLC e-it--- Bongiovanni GB 1032 Le Voci modenesi [sound recording]. Bolgna, Italia : Bongiovanni ; N[ew] Y[ork] : Distributed by Qualiton Imports, [between 1981 and 1986] 1 sound disc : analog, 33 1/3 rpm ; 12 in. Il Mito dell'opera Teresina Chelotti, soprano (1st-3rd works) ; Aristide Anceschi, baritone (4th work) ; Valentina Bartolomasi, soprano (5th-7th works) ; Bruno Garbi, tenor (8th-10th works) ; Teresina Burchi, soprano (11th-12th works) ; Pietro Medici, tenor (13th-14th works) ; Fernando Pavarotti, tenor (15th work) ; others ; with piano or (principally) orchestra. Recorded 1907-1981. Il trovatore. Tacea la notte / Verdi -- Il trovatore. D'amor sill'ali / Verdi -- Aida. Ciel! Mio padre / Verdi -- La Wally. Ebben, ne andrò lontana / Catalani -- Tosca. Vissi d'arte / Puccini -- Isabeau. Venne una vecchierella / Mascagni -- Chi è più felice di me? / C.A. Bixio -- Io e la luna / Cherubini-Bixio -- Passione argentina / Martelli-Neri-Vasin -- Norma. Casta diva / Bellini -- La Gioconda. Suicidio / Ponchielli -- Rosariolita / Sergio Brugnoli -- Desiderio / Sergio Brugnoli -- Caro mio ben / Giordani. Minimal level cataloging. Operas Excerpts. Popular music Italy. Chelotti, Teresina, 1861-1927. prf Anceschi, Aristide, 1866-1938. prf Bartolomasi, Valentina. prf Garbi, Bruno, 1904- prf Burchi, Teresina, 1877-1963. prf Medici, Pietro, 1914- prf Pavarotti, Fernando. prf TA28 c-RecSound Bongiovanni GB 1032 MUSIC 01264cam a22003494a 4500 12665524 20060606011526.0 020128s2001 it b 000 0 ita (DLC)12665524 (DLC)2002420046 0 ibc origres 2 ncip 20 y-gencatlg acquire 1 shelf copy policy default oe04 4-3-02 to SSCD sg08 2006-06-05 (subject first) 2002420046 8814090742 (ItFiC)it01688073 DLC DLC pcc e------ KJC6242 .A+ Arabia, Aida Giulia. Autonomie territoriali e tutela dell'ambiente / Aida Giulia Arabia, Georg Mühlbacher, Paolo Zuddas ; a cura di Carlo Desideri. Milano : A. Giuffrè, 2001. vii, 156 p. ; 23 cm. Quaderni per la ricerca / Istituto di studisulle regioni Massimo Severo Giannini, Consiglio nazionale delle ricerche ricerche ; 11 Includes bibliographical references. Environmental law Europe. Mühlbacher, Georg. Zuddas, Paolo. Quaderni per la ricerca (Milan, Italy) ; 11. 20020125 2479 ItFiC VENDOR LOAD 00879cam a2200253 a 4500 4738584 19850826000000.0 840328s1982 it af 000 0 ita (DLC) 84141052 7 cbc orignew 4 ncip 19 y-gencatlg 84141052 L8000 DLC DLC DLC ML410.V4 D23 1982 782.1/092/4 19 De Bosio, Gianfranco. Aida 1913, 1982 : diario per una regia all'Arena / Gianfranco de Bosio ; collaborazione di Boris Stetka ; introduzione di Mario Messinis. 1a ed. Milano : Il Saggiatore, 1982. x, 213 p., [32] p. of plates : ill. (some col.) ; 20 cm. Politeama ; 6 Verdi, Giuseppe, 1813-1901. Aida. Stetka, Boris. c-Music ML410.V4 D23 1982 Copy 1 BOOKS 01168cam a22002894a 4500 12015664 20001121074747.0 000522s1999 pe a b 000 0 spa 7 cbc orignew 2 ncip 20 y-gencatlg acquire 1 shelf copy policy default oc05 05-22-00 to SSCD; sb00 09-26-00; sb16 11-6-00; to Dewey sb01 11-14-00; aa20 11-21-00 00317000 DLC DLC DLC pcc s-pe--- HQ1574.J86 G37 1999 305.42/0985 21 García Naranjo, Aída. Mujeres peruanas : las protagonistas de Junín, Pasco y Huánuco de la sobrevivencia al desarrollo / [Aída García Naranjo Morales]. Protagonistas de Junín, Pasco y Huánuco 1. ed. Lima, Perú : Centro de Asesoría Laboral del Perú, 1999. 225 p. : ill. ; 22 cm. Includes bibliographical references (p. 221-222). Women Peru Junín (Dept.) Social conditions. Women Peru Pasco (Dept.) Social conditions. Women Peru Huánuco (Dept.) Social conditions. 00594nam a2200205u 4500 8521441 00000000000000.0 860403s1969 xx 000 0 jap (DLC) 72788147 0 cbc premunv u ncip 19 y-gencatlg 72788147 DLC CarP DLC AC146 .I55 Inoue, Kichijirō, 1889- [from old catalog] Tsūshin to taiwa to dokugo to. 44(1969) 494 p. 22 cm. Romanized. Kisha to gakusha no aida. c-GenColl AC146 .I55 Copy 1 PREM 00576cam a2200193u 4500 9510886 20031024202006.0 840817s1970 xx 000 0 jpn (DLC) 77789620 0 cbc premunv u ncip 19 y-gencatlg 77789620 DLC CarP DLC B5244.K6 A3 Kōsaka, Masaaki, 1900-1969. [from old catalog] Tsuioku to gambō no aida ni ikite. 45(1970) 276 p. 20 cm. Romanized. c-GenColl B5244.K6 A3 (Orien Japan) Copy 1 PREM 01327njm a2200301 a 4500 5652990 19930622092442.3 sdubumennmplu 920709q19701979xx sgn fre (DLC) 92763487 7 cbc orignew 3 ncip 19 y-genmusic vf97; vk07 06-18-93 92763487 GV 905 Rubini DLC DLC fre ita engfre Rubini GV 905 Martinelli, Germaine, 1887-1964. prf Germaine Martinelli [sound recording]. [S.l.] : Rubini, [197-?] 1 sound disc : analog, 33 1/3 rpm ; 12 in. Germaine Martinelli, soprano, with orchestra. Program notes in English on container, and in French (1 p.) inserted. Marie-Magdeleine. C'est ici même ; Marie-Magdeleine. O bien-aimé ; Werther. Les larmes / Massenet -- Nocturne / Franck -- Ottone. Viens, ô fils aimé / Handel -- La damnation de Faust. Autrefois un roi de Thulé. La damnation de Faust. D'amour l'ardente / Berlioz -- Salammbo. Oh! qui me donnera -- Otello. Ave Maria ; Aida. Vers nous reviens vainqueur / Verdi. Songs (High voice) with orchestra. Operas Excerpts. TA28 c-RecSound Rubini GV 905 MUSIC 00583nam a22001937a 4500 4829664 19890227145224.4 890204s1963 nyu 000 0 lav (DLC) 89868422 7 cbc orignew u ncip 19 y-gencatlg 89868422 DLC DLC DLC MLCS 89/00423 (P) Niedra, Aīda. Holivudas klauns : romāns / Aīda Niedra. [Brooklyn, N.Y.] : Grāmatu draugs, 1963. 239 p. ; 21cm. eb07 2-4-89 c-GenColl MLCS 89/00423 (P) Copy 1 BOOKS 01533njm a22003131a 4500 12057898 20000618155623.0 sdubmmenn----- 910222q19701979oncopn f ita (OCoLC)ocm23138661 0 cbc copycat 3 ncip 19 y-soundrec 99580308 RR-5378 Rococo 5378 Rococo DLC InU DLC lcderive Rococo RR-5378 Poli-Randaccio, Tina, 1887-1956. prf Tina Poli-Randaccio sound recording Toronto : Rococo, [197-?] 1 sound disc : analog, 33 1/3 rpm, mono. ; 12 in. Famous voices of the past Rococo: RR-5378 (on container: 5378). Opera excerpts; sung in Italian. Tina Poli-Randaccio, soprano. Biographical notes on singer in English by Luciano di Cave ([4] p.) inserted in container. Norma. Deh non voloerli vittime / Bellini (with Pinza and Boscacci) -- Trovatore. Terzetto atto 1 (with Inghilleri and Montelauri) ; Ballo in maschera. Mezzanotte ; Otello. Ave Maria / Verdi -- Gioconda. Suicidio / Ponchielli -- Madama Butterfly. Un bel di ; Suor Angelica. Senza Mamma / Puccini -- Wally. Ebben ne andrò / Catalani -- Cavalleria rusticana. Voi lo sapete / Mascagni -- Andrea Chenier. La mamma morta / Giordano -- Aïda. Ritorna vincitor ; Fu la sorte (with Maartje Offers) / Verdi. Operas Excerpts. OCLC Claimed Recordings 00597cam a2200193u 4500 9018413 20031008181354.0 840814q xx c 000 0 jpn (DLC) 74806916 0 cbc premunv u ncip 19 y-gencatlg 74806916 DLC CarP DLC PL861.E8 A6 1973, vol. 6 Setouchi, Harumi, 1922- [from old catalog] Tsuma to onna no aida. [49 i.e. 1974] 431 p. port. 19 cm. Romanized. c-GenColl PL861.E8 A6 1973, vol. 6 (Orien Japan) Copy 1 PREM 02032cjm a22003491a 4500 12057134 20000618133849.0 sdubumenn----- 900720q19601969gw mun fi ger (OCoLC)ocm22105804 0 cbc copycat 3 ncip 19 y-soundrec 99579544 O 73 391 Odeon DLC MoU InU DLC lcderive Odeon O 73 391 Tauber, Richard, 1891-1948. prf Richard Tauber sound recording Köln : Odeon, [196-?] 1 sound disc : analog, 33 1/3 rpm ; 12 in. Die goldene Stimme Richard Tauber, tenor, with other vocalists and orchestra ; last song with piano, Tauber, voice and piano ; narrated by Max Tauber. Program notes in German and English by Ekkehardt Kroher on container. Don Giovanni. Folget der Heissgeliebten / Mozart -- Die verkaufte Braut. Es muss gelingen / Smetana -- La traviata. Ach, ihres Auges Zauberblick / Verdi -- Carmen. Ich seh' die Mutter dort (with Elisabeth Rethberg) / Bizet -- Der Rosenkavalier. Di rigori armato / R. Strauss -- Aida. Was hab' ich leiden müssen (with Sabine Kalter) / Verdi -- Der Zigeunerbaron. Als flotter Geist / J. Strauss -- Das Land des Lächelns. Bei einem Tee en deux (with Vera Schwarz) / Lehár -- Eine Nacht in Venedig. Treu sein, das liegt mir nicht / J. Strauss -- Paganini. Niemand liebt dich so wie ich (with Carlotta Vanconti) / Lehár -- Die Zirkusprinzessin. Zwei Märchenaugen / Kálmán -- Ich glaub' nie mehr an eine Frau / Tauber -- Sprich zu mir vom Glück / J. Lenoir -- Das alte Lied / H. Love. Operas Excerpts. Songs (High voice) with orchestra. Songs (High voice) with piano. Rethberg, Elisabeth, 1894- prf Kalter, Sabine, 1889-1957. prf Schwarz, Vera, 1888-1964. prf Vanconti, Carlotta. prf OCLC Claimed Recordings 01686cjm a22004097a 4500 5783341 19970828172605.8 sd|dmsennmslub st|pmndmaunnue 970808s19uu nyuopn ita (DLC) 97704647 7 cbc orignew 4 ncip 19 y-genmusic vl25 08-08-97 97704647 8910-M Columbia 49557-58M163 Columbia 49558-6AAD16 Columbia DLC DLC DLC Columbia 8910-M (RDI 0007/0262) LWO 4072 reel 220, track 3 (preservation master) Verdi, Giuseppe, 1813-1901. Aïda. O patria mia Aïda. O patria mia [sound recording] ; La forza del destino. La Vergine degli angeli / Verdi. New York : Columbia, [19--] 1 sound disc : analog, 78 rpm, mono. ; 12 in. Columbia: 49557-58M163 (matrix)--49558-6AAD16 (matrix). Rosa Ponselle, soprano; with orchestra. Preservation master. Washington, D.C. : Library of Congress Magnetic Recording Laboratory, 1963. 1 sound tape reel : analog, 15 ips, 1 track, mono. ; 10 in. From the Library of Congress Secrist Collection. Production level cataloging. Operas Excerpts. Ponselle, Rosa, 1897-1981. prf Verdi, Giuseppe, 1813-1901. Forza del destino. Alzatevi, e partite. Vergine degli angeli. TA28 c-RecSound Columbia 8910-M (RDI 0007/0262) MUSIC c-RecSound LWO 4072 reel 220, track 3 (preservation master) MUSIC 02110cjm a22004332a 4500 12321940 20010225100622.0 sd fsngnn---ed 980602r19971972nyu n ita d (OCoLC)ocm39210917 0 cbc copycat 3 ncip 20 y-soundrec 00715038 2435664622 7243 5 66462 2 3 EMI Classics CDM 7243 5 66462 2 3 EMI Classics 66462 EMI Classics OWL OWL TXA DLC ita engita lcderive EMI Classics 7243 5 66462 2 3 Verdi, Giuseppe, 1813-1901. Operas. Selections Verdi arias III [sound recording] / Maria Callas. Arias III New York : EMI Classics, p1997. 1 sound disc : digital ; 4 3/4 in. Maria Callas ; Orchestre de la Société des concerts du Conservatoire ; Orchestre du Théâtre National de l'Opéra de Paris (tracks 3 & 4) ; Nicola Rescigno, conductor. Sung in Italian. Recorded in France. Tracks 1,2,6,7 & 9 released in 1972 ; tracks 3,4,5, & 8 released in 1978. Compact disc. Program notes by Michel Roubinet and texts, with English translations inserted in container. I lombardi alla prima crociata. O Madre, dal cielo soccorri -- Attila. Liberamente or piangi, Oh! nel fuggente nuvolo -- Il corsaro. Egli non riede ancor, Non so le tetre immagini ; Né sulla terra, Vola talor dal carcere, Verrò, Ah conforto è sol la speme -- Il trovatore. Tacea la notte placida, Di tale amor -- I vespri siciliani. Arrigo! ah, parli a un core -- Un ballo in maschera. Ecco l'orrido campo, Ma dall'arido telo divulsa ; Morrò, ma prima in grazia -- Aida. Ritorna vincitor! Operas Excerpts. Callas, Maria, 1923-1977. Rescigno, Nicola. Société des concerts du Conservatoire. Orchestre. Opéra de Paris. Orchestre. OCLC Claimed Recordings idzebra-2.0.44/examples/marcxml/collection-subjmrc.xml0000644000175000017500000007654511057500746017771 00000000000000 00669cz 2200169n 4500 sh 00005894 DLC 20010905102058.0 000411i| dnannbaba |a ana sh 00005894 IEN eng DLC H 1095 H 1105 H 1153 H 1159 lcsh Inventory control Control, Inventory Further subdivide geographically only under types of industries, organizations, and facilities. Use as a topical subdivision under names of individual corporate bodies, military services, and types of industries, organizations, and facilities. Reference under the heading Inventory control 01059cz 2200229n 4500 sh 85014644 DLC 20010904152614.0 010724i| anannbabn |a ana sh 85014644 DLC DLC DLC WaU QL696.F32 Zoology Black-shouldered kite Black-shouldered hawk nne Black-winged kite Elanus caeruleus Kite, Black-shouldered g Elanus Faanes, C.A. Habitat suitability index models. Black-shouldered kite, 1987: p. 1 (Elanus caeruleus) ITIS, July 24, 2001 (Elanus caeruleus. Vernacular name: black-shouldered kite) Banks, R.C. Obsolete English names of North American birds and their modern equivalents, via WWW, July 24, 2001 (old names: hawk, black-shouldered; kite, white-tailed; current name: kite, black-shouldered; sci. name: Elanus caeruleus) The Sibley-Monroe classification of the world's birds, via WWW, July 24, 2001 (Elanus caeruleus, Black-winged Kite) 00292cz 2200121n 4500 sh 85017490 DLC 20010905120454.0 010820i| anannbabn |n ana sh 85017490 DLC DLC DLC BQ1126 BQ1129 Buddhism Sacred books Preservation 00627cz 2200169n 4500 sh 85024268 DLC 20010904173144.0 010813i| anannbabn |a ana sh 85024268 DLC DLC DLC Malaysian drama (Chinese) nne Chinese drama Malaysia nne Chinese drama Malaysian authors g Malaysian literature (Chinese) Work cat.: Seng, Y.C. Modern Chinese drama in Malaysia (1919-1969) : its development and representative playwrights, thesis, 1993. Ding, C.M. Perempuan yang memecahkan cermin : drama Mahua, 1977. 00277cz 2200121n 4500 sh 85024427 DLC 20010904084521.0 860211|| anannbabn |a ana sh 85024427 DLC DLC DLC Ojibwa Indians Treaties g Treaties 00301cz 2200121n 4500 sh 85024828 DLC 20010904153651.0 010717|| anannbabn |n ana sh 85024828 DLC DLC DLC M2101.5 Choruses, Sacred (Unison) with instrumental ensemble 01167cz 2200229n 4500 sh 85028571 DLC 20010904160402.0 010723 | anannbabn |a ana sh 85028571 DLC DLC DLC Colonization subdivision Colonization under names of countries, etc., and under classes of persons and ethnic groups, e.g. Africa--Colonization; African Americans--Colonization; Indians of North America--Colonization; Mennonites--Colonization Colonisation g Imperialism g Land settlement Colonies Decolonization Emigration and immigration LC database, July 23, 2001 (titles: colonisation) Here are entered works on the policy of settling immigrants or nationals in colonial areas. Works on migration from one country to another are entered under Emigration and immigration. Works on migration within a country are entered under Migration, Internal. Works on general colonial policy, including land settlement, are entered under Colonies. Note under Agricultural colonies 01138cz 2200253n 4500 sh 85029492 DLC 20010904160459.0 010723i| anannbabn |b ana sh 85029492 DLC DLC DLC NNU HV6773 Computer crimes Computer fraud Computers Law and legislation Criminal provisions Computers and crime Cyber crimes Cybercrimes Electronic crimes (Computer crimes) g Crime Privacy, Right of 00351496: Adamski, A. Prawo kame komputerowe, c2000. Excite WWW directory of subjects, July 10, 2001 (cybercrimes; subcategory under Criminal, Branches of law, Law, Education) Electronic crime needs assessment for state and local law enforcement, 2001: glossary, p. 41 (electronic crime includes but is not limited to fraud, theft, forgery, child pornography or exploitation, stalking, traditional white-collar crimes, privacy violations, illegal drug transactions, espionage, computer intrusions; no synonyms given) 00376cz 2200145n 4500 sh 85030618 DLC 20010905122154.0 010726ic anannbabn |a ana sh 85030618 DLC DLC DLC M1039.4.Y35 Concertos (Yang qin) nne Concertos (Yang chÊ¿in) nne Concertos (Yang chÊ¿in with orchestra) 00330cz 2200145n 4500 sh 85030622 DLC 20010905124622.0 860211i| anannbabn |a ana sh 85030622 DLC DLC DLC ML42 Concert programs nne Concerts Programs g Programs 00655cz 2200193n 4500 sh 85030804 DLC 20010904160553.0 010709i| anannbabn |a ana sh 85030804 DLC DLC DLC ML458 History MT85 Instruction Conducting nne Conducting (Music) g Music Performance Massin. De la variation, c2000. Here are entered works on orchestral conducting or a combination of orchestral and choral conducting. Works on choral conducting are entered under Choral conducting. Note under Choral conducting 00423cz 2200157n 4500 sh 85035207 DLC 20010904163338.0 010724i| anannbabn |a ana sh 85035207 DLC DLC DLC RC136.7 Cysticercosis Cysticercus disease g Cestode diseases Intl. dict. med. biol. (cysticercosis, also called cysticercus disease) 00270cz 2200109n 4500 sh 85035327 DLC 20010905094850.0 860211|| anannbabn |n ana sh 85035327 DLC DLC Czechoslovakia Politics and government 1938-1945 00644cz 2200229n 4500 sh 85042675 DLC 20010904162409.0 010709i| anannbabn |a ana sh 85042675 DLC DLC DLC MT80 Embellishment (Music) Diminution (Music) Ornamentation (Music) Ornaments (Music) g Music Performance g Performance practice (Music) Musical notation Variation (Music) Heim, N.M. Ornamentation for the clarinetist, c1993. Massin. De la variation, c2000. 00469cz 2200181n 4500 sh 85042676 DLC 20010904162503.0 010709|| anannbabn |a ana sh 85042676 DLC DLC DLC MT80 Embellishment (Vocal music) Colorature Fioriture g Embellishment (Music) g Vocal music History and criticism Massin. De la variation, c2000. 00627cz 2200193n 4500 sh 85044605 DLC 20010904170102.0 010726ic anannbabn |a ana sh 85044605 DLC DLC DLC MT335.E7 Instruction Er hu nne Erh hu Erhu g Musical instruments China g Stringed instruments, Bowed Chiang, C. Jiang Jian-hua plays compositions for er-hu and symphony orchestra [SR] p1988 (erhu) New Grove dict. musicl instruments: (erhu (erh-hu) 2 strong fiddle of the Han Chinese) 00339cz 2200133n 4500 sh 85044606 DLC 20010904170152.0 010724ic anannbabn |a ana sh 85044606 DLC DLC DLC Er hu and yang qin music nne Erh hu and yang chÊ¿in music Yang qin and er hu music 00610cz 2200157n 4500 sh 85044607 DLC 20010904170250.0 010726ic anannbabn |a ana sh 85044607 DLC DLC DLC M59.E7 Er hu music headings for forms and types of music that include "er hu" and headings with medium of performance that include "er hu" nne Erh hu music Here are entered compositions not in a specific form or of a specific type for solo er hu, and collections of compositions in several forms or types for solo er hu. 00705cz 2200181n 4500 sh 85049599 DLC 20010904172700.0 010719i| anannbabn |b ana sh 85049599 DLC DLC DLC WaU QL737.R68 Zoology Flying squirrels Petauristinae g Sciuridae g Squirrels Am. heritage dict. of the Eng. lang., c2000 (flying squirrel: any of various nocturnal squirrels of the genera Pteromys, Petaurista, Glaucomys, and related genera, having membranes along each side of the body between the forelegs and hind legs that enable it to glide between trees) ITIS, July 19, 2001 00842cz 2200205n 4500 sh 85055232 DLC 20010904172753.0 010719i| anannbabn |b ana sh 85055232 DLC DLC DLC WaU QL737.R68 Zoology Glaucomys American flying squirrels New World flying squirrels g Flying squirrels g Sciuridae ITIS, July 19, 2001 (Glaucomys. Vernacular names: New World flying squirrels; American flying squirrels. Subfamily: Pteromyinae. Family: Sciuridae) Mammal species of the world, via WWW, July 19, 2001 (Glaucomys. Common name: American flying squirrels) Walker's mammals of the world, via WWW, July 19, 2001 (Rodentia; Sciuridae; Glaucomys: New World Flying Squirrels) idzebra-2.0.44/examples/marcxml/identity.xsl0000644000175000017500000000054511412332551016005 00000000000000 idzebra-2.0.44/examples/marcxml/collection-sandburg-1.xml0000644000175000017500000000670311412332551020244 00000000000000 01142cam 2200301 a 4500 92005291 DLC 19930521155141.9 920219s1993 caua j 000 0 eng 92005291 0152038655 : $15.95 DLC DLC DLC lcac PS3537.A618 A88 1993 811/.52 20 Sandburg, Carl, 1878-1967. Arithmetic / Carl Sandburg ; illustrated as an anamorphic adventure by Ted Rand. 1st ed. San Diego : Harcourt Brace Jovanovich, c1993. 1 v. (unpaged) : ill. (some col.) ; 26 cm. One Mylar sheet included in pocket. A poem about numbers and their characteristics. Features anamorphic, or distorted, drawings which can be restored to normal by viewing from a particular angle or by viewing the image's reflection in the provided Mylar cone. Arithmetic Juvenile poetry. Children's poetry, American. Arithmetic Poetry. American poetry. Visual perception. Rand, Ted, ill. idzebra-2.0.44/examples/marcxml/MARC21slimUtils.xsl0000644000175000017500000000570211057500746016757 00000000000000 abcdefghijklmnopqrstuvwxyz .:,;/ idzebra-2.0.44/examples/marcxml/dom-config.xml0000644000175000017500000000126211412332551016165 00000000000000 idzebra-2.0.44/examples/marcxml/Makefile.am0000644000175000017500000000103111412332551015447 00000000000000marcxmldatadir=$(datadir)/$(PACKAGE)$(PACKAGE_SUFFIX)-examples/marcxml marcxmldata_DATA = zebra.cfg\ README\ MARC21slim2INDEX.xsl\ MARC21slim2MADS.xsl\ MARC21slim2MODS3-1.xsl\ MARC21slim2SRWDC.xsl\ MARC21slimUtils.xsl\ collection-2.xml\ collection-clasmrc.xml\ collection-namemrc.xml\ collection-opera-43.xml\ collection-sandburg-1.xml\ collection-subjmrc.xml\ dom-config.xml\ identity.xsl\ zebra.xsl \ yazgfs.xml EXTRA_DIST = $(marcxmldata_DATA) clean: rm -f *.mf *.LCK zebrasrv.pid idzebra-2.0.44/examples/marcxml/MARC21slim2SRWDC.xsl0000644000175000017500000002473411412332551016621 00000000000000 <xsl:call-template name="subfieldSelect"> <xsl:with-param name="codes">abfghk</xsl:with-param> </xsl:call-template> collection manuscript text cartographic notated music sound recording still image moving image three dimensional object software, multimedia mixed material ab abcdefghjklmnopqrstu4 -- vxyz -- abcdefghklmnoprstu4 -- vxyz -- acdefghklnpqstu4 -- vxyz -- adfghklmnoprst -- vxyz -- ae -- vxyz -- a a -- vxyz -- abcd abcdu ot URN:ISBN: idzebra-2.0.44/examples/marcxml/MARC21slim2MODS3-1.xsl0000644000175000017500000027300611412332551016720 00000000000000 BK SE BK MM CF MP VM MU b afgk abfgk <xsl:value-of select="substring($titleChop,@ind2+1)"/> <xsl:value-of select="$titleChop"/> b b afgk <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:call-template name="subfieldSelect"> <xsl:with-param name="codes">a</xsl:with-param> </xsl:call-template> </xsl:with-param> </xsl:call-template> <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:call-template name="subfieldSelect"> <!-- 1/04 removed $h, b --> <xsl:with-param name="codes">a</xsl:with-param> </xsl:call-template> </xsl:with-param> </xsl:call-template> <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:call-template name="subfieldSelect"> <!-- 1/04 removed $h, $b --> <xsl:with-param name="codes">af</xsl:with-param> </xsl:call-template> </xsl:with-param> </xsl:call-template> <xsl:variable name="str"> <xsl:for-each select="marc:subfield"> <xsl:if test="(contains('adfklmor',@code) and (not(../marc:subfield[@code='n' or @code='p']) or (following-sibling::marc:subfield[@code='n' or @code='p'])))"> <xsl:value-of select="text()"/> <xsl:text> </xsl:text> </xsl:if> </xsl:for-each> </xsl:variable> <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:value-of select="substring($str,1,string-length($str)-1)"/> </xsl:with-param> </xsl:call-template> <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:call-template name="subfieldSelect"> <xsl:with-param name="codes">ah</xsl:with-param> </xsl:call-template> </xsl:with-param> </xsl:call-template> creator creator creator personal yes yes text cartographic notated music sound recording-nonmusical sound recording-musical still image moving image three dimensional object software, multimedia mixed material globe remote sensing image map atlas database loose-leaf series newspaper periodical web site abstract or summary bibliography catalog dictionary encyclopedia handbook legal article index discography legislation theses survey of literature review programmed text filmography directory statistics technical report legal case and case notes law report or digest treaty conference publication numeric data database font game patent festschrift biography essay drama comic strip fiction humor, satire letter novel short story speech biography conference publication drama essay fiction folktale history humor, satire memoir poetry rehearsal reporting sound speech art original kit art reproduction diorama filmstrip legal article picture graphic technical drawing motion picture chart flash card microscope slide model realia slide transparency videorecording toy abvxyz - code marccountry code iso3166 text :,;/ monographic continuing ab reformatted digital
braille
print
electronic
microfiche
microfilm
access preservation replacement abce
ab agrt ab adolescent adult general juvenile preschool specialized defg marcgaciso3166 ab abx ab ab <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:call-template name="subfieldSelect"> <xsl:with-param name="codes">av</xsl:with-param> </xsl:call-template> </xsl:with-param> </xsl:call-template> <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:call-template name="subfieldSelect"> <xsl:with-param name="codes">av</xsl:with-param> </xsl:call-template> </xsl:with-param> </xsl:call-template> abcx3 <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:call-template name="specialSubfieldSelect"> <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param> <xsl:with-param name="axis">t</xsl:with-param> <xsl:with-param name="afterCodes">g</xsl:with-param> </xsl:call-template> </xsl:with-param> </xsl:call-template> aq t g <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:call-template name="specialSubfieldSelect"> <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param> <xsl:with-param name="axis">t</xsl:with-param> <xsl:with-param name="afterCodes">dg</xsl:with-param> </xsl:call-template> </xsl:with-param> </xsl:call-template> c t dgn <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:call-template name="specialSubfieldSelect"> <xsl:with-param name="anyCodes">tfklsv</xsl:with-param> <xsl:with-param name="axis">t</xsl:with-param> <xsl:with-param name="afterCodes">g</xsl:with-param> </xsl:call-template> </xsl:with-param> </xsl:call-template> aqdc t gn <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:call-template name="subfieldSelect"> <xsl:with-param name="codes">adfgklmorsv</xsl:with-param> </xsl:call-template> </xsl:with-param> </xsl:call-template> <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:value-of select="marc:subfield[@code='a']"/> </xsl:with-param> </xsl:call-template> <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:call-template name="specialSubfieldSelect"> <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param> <xsl:with-param name="axis">t</xsl:with-param> <xsl:with-param name="afterCodes">g</xsl:with-param> </xsl:call-template> </xsl:with-param> </xsl:call-template> aq t g <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:call-template name="specialSubfieldSelect"> <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param> <xsl:with-param name="axis">t</xsl:with-param> <xsl:with-param name="afterCodes">dg</xsl:with-param> </xsl:call-template> </xsl:with-param> </xsl:call-template> c t dgn <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:call-template name="specialSubfieldSelect"> <xsl:with-param name="anyCodes">tfklsv</xsl:with-param> <xsl:with-param name="axis">t</xsl:with-param> <xsl:with-param name="afterCodes">g</xsl:with-param> </xsl:call-template> </xsl:with-param> </xsl:call-template> aqdc t gn <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:call-template name="subfieldSelect"> <xsl:with-param name="codes">adfgklmorsv</xsl:with-param> </xsl:call-template> </xsl:with-param> </xsl:call-template> issue numbermatrix numbermusic platemusic publishervideorecording identifier ba ab ab ab doihdluri y3z y3 abje abcd35 abcde35
n n fgkdlmor p p fgkdlmor g g pst p p fgkdlmor
cdn aq :,;/ acdeq constituent <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:value-of select="."/> </xsl:with-param> </xsl:call-template> <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:value-of select="."/> </xsl:with-param> </xsl:call-template> <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:value-of select="."/> </xsl:with-param> </xsl:call-template> <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:value-of select="."/> </xsl:with-param> </xsl:call-template> code marcgac lcshlcshacmeshnalcshrvm aq cdnp abcdeqnp <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:call-template name="subfieldSelect"> <xsl:with-param name="codes">adfhklor</xsl:with-param> </xsl:call-template> </xsl:with-param> </xsl:call-template> <xsl:call-template name="part"/> abcd bc yes ArabicLatinChinese, Japanese, KoreanCyrillicHebrewGreek summary or subtitlesung or spoken textlibrettotable of contentsaccompanying materialtranslation summary or subtitlesung or spoken textlibrettotable of contentsaccompanying materialtranslation
idzebra-2.0.44/examples/marcxml/MARC21slim2MADS.xsl0000644000175000017500000012550511412332551016461 00000000000000 naf n n fghkdlmor p p fghkdlmor cdn aq acdenq bc yes <xsl:variable name="str"> <xsl:for-each select="marc:subfield"> <xsl:if test="(contains('tfghklmors',@code) )"> <xsl:value-of select="text()"/> <xsl:text> </xsl:text> </xsl:if> </xsl:for-each> </xsl:variable> <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:value-of select="substring($str,1,string-length($str)-1)"/> </xsl:with-param> </xsl:call-template> <xsl:variable name="str"> <xsl:for-each select="marc:subfield"> <xsl:if test="(contains('adfghklmors',@code) )"> <xsl:value-of select="text()"/> <xsl:text> </xsl:text> </xsl:if> </xsl:for-each> </xsl:variable> <xsl:call-template name="chopPunctuation"> <xsl:with-param name="chopString"> <xsl:value-of select="substring($str,1,string-length($str)-1)"/> </xsl:with-param> </xsl:call-template> ab ab nonpublic source notFound history subject example deleted heading information application history ab ai z3 earlier later parentOrg broader narrower other other equivalent acronym other other naf lcsh lacnaf lcsh cash naf lcsh lacnaf cash lcshcl nlmnaf nalnaf aat sears rvm naf lcsh lacnaf lcsh lcsh mesh nal cash naf lcsh lacnaf cash lcsh naf lacnaf lcsh cash lcshcl nlmnaf nalnaf rvm lacnaf naf lcsh mesh nal cash idzebra-2.0.44/examples/marcxml/zebra.cfg0000644000175000017500000000025611412332551015207 00000000000000profilePath: .:./../../tab modulePath: ../../index/.libs recordtype: dom.dom-config.xml attset: bib1.att attset: explain.att # Enables indexing using ICU.. index: icu.idx idzebra-2.0.44/examples/marcxml/MARC21slim2INDEX.xsl0000644000175000017500000013002311412332551016573 00000000000000 BK SE BK MM CF MP VM MU idzebra-2.0.44/examples/marcxml/README0000644000175000017500000000206511412332551014303 00000000000000Example data and configuration for MARC21 XML data using the 'dom' XSLT input filter. MARC21 XML example data and transforming XSLT stylesheets are borrowed from The Library of Congress' Network Development and MARC Standards Office, which is developing a framework for working with MARC data in a XML environment. http://www.loc.gov/standards/marcxml/ To run these examples, try this: ../../index/zebraidx init ../../index/zebraidx update collection-*.xml ../../index/zebrasrv then start yaz-client and search Z> open localhost:9999 Z> scan @attr 1=4 "" Z> find @attr 1=4 aida Z> form xml Z> elem dc Z> s 1+1 Z> elem marc Z> s 1+1 Z> elem mads Z> s 1+1 Z> elem mods Z> s 1+1 To see the zebra system internal info on this record, issue Z> elem zebra Z> s 1+1 To see how this record has been indexed, try Z> elem index Z> s 1+1 The indexes can also be acessed using the string names: Scan 'Author-name-personal' as words Z> scan @attr 1=Author-name-personal de Scan 'Author-name-personal' as phrase Z> scan @attr 1=Author-name-personal @attr 4=1 @attr 6=2 de idzebra-2.0.44/examples/marcxml/collection-clasmrc.xml0000644000175000017500000015723111412332551017730 00000000000000 00834nw 2200193n 4500 CF 91000008 DLC 19960528091722.0 910215acaaaaaa CF 91000008 DLC DLC lcc HF1 HF6182 Commerce j HT684.22 Communities. Classes. Races Classes Classes arising from occupation Middle class Commercial j HE380.8 HE560 Transportation and communications Water transportation Waterways commerce l HE1 HE9900 Transportation and communications Commerce l HE561 HE971 Transportation and communications Water transportation Shipping Commerce l GT6010 GT6060 Manners and customs (General) Customs relative to special classes. By occupation Commercial occupations Commerce Commerce 00877nw 2200181n 4500 CF 91000424 DLC 19960528091739.0 910605acaaaaaa CF 91000424 DLC DLC lcc HF2999 HF4055 Commerce By region or country j HF1379.2 Commerce International economic relations International trade By region or country j HF1417.32 Commerce International economic relations Exports By region or country j HF1420.2 Commerce International economic relations Imports By region or country j HF71 HF73 Commerce Trade ministries. Departments of commerce. Bureaus of trade serial publications issued by local agencies j HF351 HF355 Commerce History General commercial history works on a the commercial history of a particular region or country 00345nw 2200133n 4500 CF 91000425 DLC 19960528091740.0 910605acaaaaaa CF 91000425 DLC DLC lcc HF3000 HF3163 Commerce By region or country United States j HF1 HF6182 Commerce commerce of the United States 00346nw 2200133n 4500 CF 91000474 DLC 19960528091742.0 910605acaaaaaa CF 91000474 DLC DLC lcc HF3211 HF3212.2 Commerce By region or country America (General) j HF2999 Commerce By region or country America 05859nw 2201273n 4500 CF 91000477 DLC 19960608112800.0 910605abaaaaaa CF 91000477 DLC DLC lcc HF3221 HF4040.7 Commerce By region or country Other regions or countries j HF405.2 Commerce History By period Middle Ages By region or country j HF1 HF52 Commerce Periodicals. Serials periodicals on the commerce of other regions or countries j HF1 HF6182 Commerce commerce of other regions or countries H7 modified Add number in table to HF3210 For Great Britain use: HF3505 HF3505.6 Through 1800 HF3505 General works HF3505.15 Medieval HF3505.2 Modern HF3505.4 17th century HF3505.6 18th century HF3505.8 HF3505.9 Early 19th century to 1870 HF3505.8 General works HF3505.9 Orders in council HF3506 HF3506.2 Recent, 1870- HF3506 General works HF3506.2 World War I For Ireland use: HF3539 Local HF3539.A2A HF3539.A2Z Counties HF3539.A3 HF3539.Z Cities, etc. For British Commonwealth use: HF3540 General works For Germany use: HF3566 HF3566.2 Recent HF3566 General works HF3566.2 World War I 1.1 Under each country: 1.2 10 nos. 1.3 1 Periodicals. Societies. Serials 153 1.4 1.5 Statistics (Monographs) 153 1.5 2 Congresses 153 1.6 3 Directories 153 1.7 Class here foreign trade directories 680 1.8 For directories of domestic commerce or industry, see HF5071-HF5330 253 1.9 4 7 General works. History 153 1.10 Including works on export trade 680 1.11 4 General works. History General 153 1.12 4.5 4.6.Z General works. History Biography 153 1.13 4.5 General works. History Biography Collective 153 1.14 4.6.A 4.6.Z General works. History Biography Individual 153 1.15 5 General works. History Early 153 1.16 6 General works. History Recent 153 1.17 6.5 General works. History Recent 1945- 153 1.18 7 Handbooks, manuals, etc. 153 1.19 8.A 8.Z Foreign commerce. By region or country, A-Z 153 1.20 Class here descriptive works 680 1.21 For works on policy, see HF1451-HF1647 253 1.22 9 10 Local commerce 153 1.23 Including foreign trade and foreign trade directories of individual areas 680 1.24 Under each: 763 1.24.1 .A1 .A3 Periodicals. Societies. Serials 763 1.24.2 For domestic trade directories, see HF5071-HF5330 763 1.25 9.A 9.Z Local commerce By state, etc. 153 1.26 10.A 10.Z Local commerce By city 153 1.26 5 nos. 1.27 1 Periodicals. Societies. Serials 153 1.28 1.5 Statistics (Monographs) 153 1.29 1.7 Congresses 153 1.30 1.8 Directories 153 1.31 Class here foreign trade directories 680 1.32 For directories of domestic commerce or industry, see HF5071-HF5330 253 1.33 2 General works. History 153 1.34 Including works on export trade 680 1.35 2.3 General works. History 1945- 153 1.36 2.5 Handbooks, manuals, etc. 153 1.37 3.A 3.Z Foreign commerce. By region or country 153 1.38 Class here descriptive works 680 1.39 For works on policy, see HF1451-HF1647 253 1.40 4 5 Local commerce 153 1.41 Including foreign trade and foreign trade directories of individual areas 680 1.41.1 Under each: 763 1.41.2 .A1 .A3 Periodicals. Societies. Serials 763 1.41.3 For domestic trade directories, see HF5071-HF5330 763 453 1.42 4.A 4.Z Local commerce By state, etc. 153 1.43 5.A 5.Z Local commerce By city 153 1.44 For Poland, use 4.5 1.45 1 no. 1.46 .A1 .A4 Periodicals. Societies. Serials 153 1.47 .A45 Statistics (Monographs) 153 1.48 .A46 Congresses 153 1.49 .A48 Directories 153 1.50 Class here foreign trade directories 680 1.51 For directories of domestic commerce of industry, see HF5071-HF5330 253 1.52 .A5 .Z4 General works. History 153 1.53 Including works on export trade 680 1.54 .Z5 General works. History 1945- 153 1.55 .Z6 Handbooks, manuals, etc. 153 1.56 .Z7A .Z7Z Foreign commerce. By region or country 153 1.57 Class here descriptive works 680 1.58 For works on policy, see HF1451-HF1647 253 1.59 .Z8 .Z9 Local commerce 153 1.60 Including foreign trade and foreign trade directories of individual areas 680 1.61 .Z8A .Z8Z Local commerce By state, etc. 153 1.62 .Z9A .Z9Z Local commerce By city 153 00972nw 2200193n 4500 CF 94024867 DLC 19960528095450.0 930129acaaaaaa CF 94024867 DLC DLC lcc P1 P1091 Philology. Linguistics j P120.52 Philology. Linguistics Language. Linguistic theory. Comparative grammar Science of language (Linguistics) Periodicals, societies, collections, etc. l P120.52 P149 Philology. Linguistics Language. Linguistic theory. Comparative grammar Science of language (Linguistics) Philology. Linguistics l GN452 GN452.5 Anthropology Ethnology. Social and cultural anthropology Cultural traits, customs, and institutions Intellectual life Communication Linguistics l Z40.A3 Z40.Z Books (General). Writing. Paleography Writing General works. History Philology and linguistics Philology Linguistics 00757nw 2200169n 4500 CF 94030130 DLC 19960528100048.0 930525acaaaaaa CF 94030130 DLC DLC lcc TR824 TR835 Photography Applied photography Photographic reproduction. Photocopying processes l Z48 Books (General). Writing. Paleography Writing Processes of duplicating (manifolding) Photographic reproduction j Z265 Z265.5 Book industries and trade Printing Representation of reproduction of books, documents, etc., by photography, microphotography, and other means technical aspects of photographic reproduction Photographic reproduction Photocopying processes 00491nw 2200145n 4500 CF 94030241 DLC 19960528100056.0 930529aaaaaaaa CF 94030241 DLC DLC lcc TR1045 Photography Photomechanical processes Electrophotography Electrostatic printing Xerography l Z48 Books (General). Writing. Pleography Writing Duplicating processes. Copying services Xerography Xerography Electrostatic printing 00480nw 2200169n 4500 CF 94041099 DLC 19960528101339.0 930914accaaaaa CF 94041099 DLC DLC lcc Z4 Z115.72 Books (General). Writing. Paleography j ZA4149.2 Information resources (General) Information in specific formats or media Books and other print media Books (General) Paleography Writing 01127nw 2200193n 4500 CF 94041108 DLC 19960528101339.0 930914acaaaaaa CF 94041108 DLC DLC lcc Z40 Z104.5 Books (General). Writing. Paleography Writing l Z6081 Subject bibliography Graphology Writing j P211 P211.5 Philology. Linguistics Language. Linguistic theory. Comparative grammar Comparative grammar General special Written communication. History of writing and alphabet general works on writing l BF889 BF905 Psychology Graphology. Study of handwriting Writing, autographs, penmanship l Z7004.W69 Subject bibliography Philology and linguistics Special topics, A-Z Writing systems. Written communication Writing Class here works on the physical appearance or production of writing. For works on the typology and the history of writing systems and the alphabet, or on the relation between a writing system and the sounds or language that it represents, see P211-P214 Writing 00300nw 2200121n 4500 CF 94041110 DLC 19960528101340.0 930914abaaaaaa CF 94041110 DLC DLC lcc Z40.A3 Z40.Z Books (General). Writing. Paleography Writing General works. History 00779nw 2200217n 4500 CF 94041111 DLC 19960528101340.0 930914acaaaaaa CF 94041111 DLC DLC lcc Z41.A2 Z42.5 Books (General). Writing. Paleography Writing Autographs. Signatures j CT205.2 Biography General collective biography Autographs l Z105 Z115.72 Books (General). Writing. Paleography Manuscripts. Paleography Autographs l Z5615 Subject bibliography Collectors and collecting Autographs Including forgery, collecting of autographs, etc. Autographs Signatures Forgery Books Autographs, Collecting of Books 00397nw 2200133n 4500 CF 94041115 DLC 19960528101340.0 930914aaaaaaaa CF 94041115 DLC DLC lcc Z42.3.A7 Books (General). Writing. Paleography Writing Autographs. Signatures Autographs of classes of persons and ethnic groups, A-Z Artists Artists Autographs 00360nw 2200121n 4500 CF 94041116 DLC 19960528101340.0 930914abaaaaaa CF 94041116 DLC DLC lcc Z42.3.A Z42.3.Z Books (General). Writing. Paleography Writing Autographs. Signatures Autographs of classes of persons and ethnic groups, A-Z 00397nw 2200133n 4500 CF 94041117 DLC 19960528101340.0 930915aaaaaaaa CF 94041117 DLC DLC lcc Z42.3.A9 Books (General). Writing. Paleography Writing Autographs. Signatures Autographs of classes of persons and ethnic groups, A-Z Authors Authors Autographs 00667nw 2200169n 4500 CF 94041118 DLC 19960528101340.0 930915aaaaaaaa CF 94041118 DLC DLC lcc Z42.3.K5 Books (General). Writing. Paleography Writing Autographs. Signatures Autographs of classes of persons and ethnic groups, A-Z Kings and rulers. Royalty j Z42.3.R682 Books (General). Writing. Paleography Writing Autographs. Signatures Autographs of classes of persons and ethnic groups, A-Z Royalty Kings and rulers Autographs Rulers Autographs Royalty Autographs 00403nw 2200133n 4500 CF 94041119 DLC 19960528101340.0 930915aaaaaaaa CF 94041119 DLC DLC lcc Z42.3.P7 Books (General). Writing. Paleography Writing Autographs. Signatures Autographs of classes of persons and ethnic groups, A-Z Presidents Presidents Autographs 01025nw 2200217n 4500 CF 94041138 DLC 19960528101342.0 930915aaaaaaaa CF 94041138 DLC DLC lcc Z48 Books (General). Writing. Paleography Writing Duplicating processes. Copying services j HD9999.C748 Economic history and conditions Special industries and trades Miscellaneous industries and trades, A-Z Copying process l Z265 Z265.5 Book industries and trade Printing Representation or reproduction of books, documents, etc., by photography, microphotography, and other means Processes of duplicating l HF5541.C8 Commerce Business Equipment Other appliances Copying machines Process of duplicating Including processes other than printing directly from type, e. g. mimeographing, multilithing Copying services Duplicating processes Mimeographing Multilithing 00453nw 2200169n 4500 CF 94041139 DLC 19960528101342.0 930915acaaaaaa CF 94041139 DLC DLC lcc Z49 Z51.5 Books (General). Writing. Paleography Writing Typewriters. Typewriting. Keyboards. Keyboarding Keyboards Writing Keyboarding Writing Typewriters Typewriting 00391nw 2200157n 4500 CF 94041283 DLC 19960528101351.0 930916acaaaaaa CF 94041283 DLC DLC lcc Z53 Z99 Books (General). Writing. Paleography Writing Shorthand. Stenography. Phonography Shorthand Stenography Phonography idzebra-2.0.44/examples/marcxml/Makefile.in0000644000175000017500000003123411412336424015473 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = examples/marcxml DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(marcxmldatadir)" DATA = $(marcxmldata_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ marcxmldatadir = $(datadir)/$(PACKAGE)$(PACKAGE_SUFFIX)-examples/marcxml marcxmldata_DATA = zebra.cfg\ README\ MARC21slim2INDEX.xsl\ MARC21slim2MADS.xsl\ MARC21slim2MODS3-1.xsl\ MARC21slim2SRWDC.xsl\ MARC21slimUtils.xsl\ collection-2.xml\ collection-clasmrc.xml\ collection-namemrc.xml\ collection-opera-43.xml\ collection-sandburg-1.xml\ collection-subjmrc.xml\ dom-config.xml\ identity.xsl\ zebra.xsl \ yazgfs.xml EXTRA_DIST = $(marcxmldata_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/marcxml/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/marcxml/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-marcxmldataDATA: $(marcxmldata_DATA) @$(NORMAL_INSTALL) test -z "$(marcxmldatadir)" || $(MKDIR_P) "$(DESTDIR)$(marcxmldatadir)" @list='$(marcxmldata_DATA)'; test -n "$(marcxmldatadir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(marcxmldatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(marcxmldatadir)" || exit $$?; \ done uninstall-marcxmldataDATA: @$(NORMAL_UNINSTALL) @list='$(marcxmldata_DATA)'; test -n "$(marcxmldatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(marcxmldatadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(marcxmldatadir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(marcxmldatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-marcxmldataDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-marcxmldataDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-marcxmldataDATA install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-marcxmldataDATA clean: rm -f *.mf *.LCK zebrasrv.pid # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/examples/Makefile.am0000644000175000017500000000010411412332551014004 00000000000000 SUBDIRS = gils marc21 marcxml oai-pmh zthes EXTRA_DIST = README idzebra-2.0.44/examples/gils/0000755000175000017500000000000011412336535013001 500000000000000idzebra-2.0.44/examples/gils/Makefile.am0000644000175000017500000000104111412332551014743 00000000000000 gilsdatadir=$(datadir)/$(PACKAGE)$(PACKAGE_SUFFIX)-examples/gils gilsdata_DATA = zebra.cfg EXTRA_DIST = $(gilsdata_DATA) clean: rm -f *.mf *.LCK zebrasrv.pid install-data-hook: test -z "$(DESTDIR)$(gilsdatadir)/records" || $(MKDIR_P) "$(DESTDIR)$(gilsdatadir)/records" for p in $(srcdir)/records/*.grs; do \ $(INSTALL_DATA) $$p $(DESTDIR)$(gilsdatadir)/records; \ done uninstall-hook: rm -r $(DESTDIR)$(gilsdatadir)/records dist-hook: -mkdir $(distdir)/records cp $(srcdir)/records/*.grs $(distdir)/records idzebra-2.0.44/examples/gils/zebra.cfg0000644000175000017500000000105711412332551014502 00000000000000# Simple Zebra configuration file # # Where the schema files, attribute files, etc are located. profilePath: .:../../tab # Files that describe the attribute sets supported. attset: bib1.att attset: gils.att attset: explain.att recordtype: grs.sgml isam: b # Flags for the non-authenticated user. w=write (allows ES Updates) perm.anonymous: rw # Record compression (none, bzip2 or zlib) recordcompression: none #rank: zvrank recordId: (bib-1,title) storedata: 1 sortindex: i modulePath: ../../index/.libs #shadow: shadow:100M # register: register:100M idzebra-2.0.44/examples/gils/Makefile.in0000644000175000017500000003157111412336424014772 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = examples/gils DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(gilsdatadir)" DATA = $(gilsdata_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ gilsdatadir = $(datadir)/$(PACKAGE)$(PACKAGE_SUFFIX)-examples/gils gilsdata_DATA = zebra.cfg EXTRA_DIST = $(gilsdata_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/gils/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/gils/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-gilsdataDATA: $(gilsdata_DATA) @$(NORMAL_INSTALL) test -z "$(gilsdatadir)" || $(MKDIR_P) "$(DESTDIR)$(gilsdatadir)" @list='$(gilsdata_DATA)'; test -n "$(gilsdatadir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gilsdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(gilsdatadir)" || exit $$?; \ done uninstall-gilsdataDATA: @$(NORMAL_UNINSTALL) @list='$(gilsdata_DATA)'; test -n "$(gilsdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(gilsdatadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(gilsdatadir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(gilsdatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-gilsdataDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-gilsdataDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: install-am install-data-am install-strip uninstall-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ dist-hook distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-data-hook \ install-dvi install-dvi-am install-exec install-exec-am \ install-gilsdataDATA install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-gilsdataDATA uninstall-hook clean: rm -f *.mf *.LCK zebrasrv.pid install-data-hook: test -z "$(DESTDIR)$(gilsdatadir)/records" || $(MKDIR_P) "$(DESTDIR)$(gilsdatadir)/records" for p in $(srcdir)/records/*.grs; do \ $(INSTALL_DATA) $$p $(DESTDIR)$(gilsdatadir)/records; \ done uninstall-hook: rm -r $(DESTDIR)$(gilsdatadir)/records dist-hook: -mkdir $(distdir)/records cp $(srcdir)/records/*.grs $(distdir)/records # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/examples/gils/records/0000755000175000017500000000000011412336535014442 500000000000000idzebra-2.0.44/examples/gils/records/esdd0036.grs0000644000175000017500000000460211412336535016331 00000000000000 MEASURED GEOLOGIC SECTIONS UTAH GEOLOGICAL AND MINERAL SURVEY FOSSIL; GEOLOGY; LITHOLOGY; PALEONTOLOGY; STRATIGRAPHY; UTAH Selected geologic sections and references to geologic sections concerning Utah geology comprise this data set. Formation, lithologic description, fossils, thickness, location of section, and Utah type sections are included in this data set. FILE FOLDERS US STATE LATITUDE/LONGITUDE; UTM NORTHINGS AND EASTINGS; PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) UTAH -114 -109 42 37 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 MEASURED GEOLOGIC SECTIONS NONAUTOMATED MANUAL NONE UNDER DEVELOPMENT HELLMUT DOELLING UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0036 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/examples/gils/records/esdd0050.grs0000644000175000017500000000523611412336535016331 00000000000000 CORE AND CUTTINGS IN NBMG 'LIBRARY' NEVADA BUREAU OF MINES AND GEOLOGY CORE; GEOLOGY; MINE; NEVADA This data set describes the NBMG holdings of core and cuttings for Nevada. It includes driller identification, hole name, location, depth of hole, and log types. FILE FOLDERS; LOGS; CORE/CUTTINGS (SAMPLES) COUNTIES LATITUDE/LONGITUDE; PUBLIC LANE SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA -120 -114 42 35 1960-PRESENT NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 CORE AND CUTTINGS IN NBMG 'LIBRARY' AUTOMATED WORDPERFECT BATCH IBM COMPATIBLE RENO, NV Listed in NBMG Report 30, The Nevada Bureau of Mines and Geology Sample Library - An Index to Drill Core and Cuttings in the Collection and also in Special Publication L3, which updates the list. OPERATIONAL BECKY WEIMER PURKEY NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ESDD0050 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/examples/gils/records/esdd0047.grs0000644000175000017500000000467211412336535016342 00000000000000 ISOTOPIC DATES OF ROCKS AND MINERALS NEVADA BUREAU OF MINES AND GEOLOGY GEOLOGY; ISOTOPIC DATE; MINERAL; NEVADA; ROCK Rock type, collection location, sample description, analytical method, analytical data, lab performing analytical work, age in month-year, isotopic method used, comments on reliability of age determination, and collector's identification are components of this data set. CATALOGS/INDEXES; FILE FOLDERS No easy search method; one must search through all the issues of the journal; articles describe new dates or are a compilation of all dates from a particular area, rock type, etc. US STATE; WESTERN HEMISPHERE LATITUDE/LONGITUDE; PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA; UNITED STATES; WESTERN HEMISPHERE 1970-PRESENT NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ISOTOPIC DATES OF ROCKS AND MINERALS NONAUTOMATED MANUAL Data published in Isochron/West, a scientific journal published three times a year. LARRY GARSIDE NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ESDD0047 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/examples/gils/records/esdd0039.grs0000644000175000017500000000427511412336535016342 00000000000000 UTAH GEOLOGICAL ASSOCIATION PUBLICATIONS <Acronym> UGA </Acronym> UTAH GEOLOGICAL AND MINERAL SURVEY AREAL GEOLOGY; GEOLOGY; UTAH Guidebooks and field logs of selected Utah sites comprise this data set. REPORT SETS; LOGS Complete set of publications is available in UGMS Library. US STATE UTAH -114 -109 42 37 1970-PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 UTAH GEOLOGICAL ASSOCIATION PUBLICATIONS NONAUTOMATED MANUAL NONE OPERATIONAL UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0039 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/examples/gils/records/esdd0078.grs0000644000175000017500000000473111412336535016342 00000000000000 TIDAL (COASTAL) WETLAND OF CONNECTICUT DEPARTMENT OF ENVIRONMENTAL PROTECTION COAST; COASTAL CONNECTICUT; COASTLINE; CONNECTICUT; HYDROLOGY; SOIL; TIDAL WETLAND; WATER; WETLAND Tidal wetlands, as defined by State statute, which are delineated by engineering survey at a scale of 1:24,000 comprise this data set. MAP SETS; REPORT SETS; PHOTOGRAPHS; INDIVIDUAL MAPS; FILE FOLDERS Tidal wetlands are defined by hydrologic characteristics and the presence of particular flora. COASTAL COMMUNITIES CONNECTICUT; COASTAL CONNECTICUT -74 -71 42 41 1972-PRESENT DEPARTMENT OF ENVIRONMENTAL PROTECTION WATER RESOURCES UNIT, 165 CAPITOL AVENUE, ROOM 207 HARTFORD CT 06106 USA (203) 566-7160 TIDAL (COASTAL) WETLAND OF CONNECTICUT NONAUTOMATED MANUAL NONE OPERATIONAL DOUGLAS COOPER DEPARTMENT OF ENVIRONMENTAL PROTECTION WATER RESOURCES UNIT, 165 CAPITOL AVENUE, ROOM 207 HARTFORD CT 06106 USA (203) 566-7160 ESDD0078 DEPARTMENT OF ENVIRONMENTAL PROTECTION 198502 idzebra-2.0.44/examples/gils/records/esdd0062.grs0000644000175000017500000000512611412336535016332 00000000000000 BIBLIOGRAPHY OF MAINE GEOLOGY MAINE GEOLOGICAL SURVEY GEOLOGY; MAINE This data base is a computer based bibliography of marine geology. It allows searching by topic and geographic location, similar to GEOREF. It is currently under development to replace the printed Bibliography of Marine Geology. BIBLIOGRAPHIES Software developed by the Maine Geological Survey; documentation developed by the Maine Geological Survey staff and written in ANSI COBOL. 7 1/2' OR 15' QUADS; CITIES; US STATE; COUNTIES MAINE -71 -67 48 43 1692-PRESENT MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 BIBLIOGRAPHY OF MAINE GEOLOGY AUTOMATED INTERACTIVE 3,500 768 BURROUGHS B20 AUGUSTA, ME. NONE UNDER DEVELOPMENT ROBERT MARVINNEY MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 ESDD0062 MAINE GEOLOGICAL SURVEY 198709 idzebra-2.0.44/examples/gils/records/esdd0035.grs0000644000175000017500000000502511412336535016330 00000000000000 UTAH GEOLOGIC MAP BIBLIOGRAPHY UTAH GEOLOGICAL AND MINERAL SURVEY ARIZONA; COLORADO; GEOLOGY; IDAHO; MAP; NEVADA; UTAH; WYOMING This collection consists of theses, dissertations, and other unpublished maps as well as published maps of the geology of Utah. Some maps of the collection are xeroxed from limited collections. Cross-sections are included in set. Data file consists of map bibliography. MAP SETS; BIBLIOGRAPHIES Approximately 700 maps are in the set. US STATE UTAH AND NEIGHBORING STATES -120 -102 49 31 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 UTAH GEOLOGIC MAP BIBLIOGRAPHY AUTOMATED INTERACTIVE 1,100 PC NETWORK SALT LAKE CITY, UT NONE OPERATIONAL HELLMUT DOELLING UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0035 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/examples/gils/records/esdd0049.grs0000644000175000017500000000516511412336535016342 00000000000000 GEOTHERMAL WELLS DRILLED SINCE 1976 NEVADA BUREAU OF MINES AND GEOLOGY GEOTHERMAL; GEOTHERMAL WELL; NEVADA Well name, operator, location, depth, highest temperature reached are components of these data which describe those geothermal wells that have been drilled since 1976. CATALOGS/INDEXES COUNTIES PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA -120 -114 42 35 1976-PRESENT NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 GEOTHERMAL WELLS DRILLED SINCE 1976 AUTOMATED WORDPERFECT INTERACTIVE 100 IBM COMPATIBLE RENO, NV Nevada Bureau of Mines Open-File Report Special Publication List 4 (updates Appendix 2 of Bulletin 91 Nevada Bureau of Mines and Geology). OPERATIONAL BECKY WEIMER PURKEY NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ESDD0049 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/examples/gils/records/esdd0008.grs0000644000175000017500000000451011412336535016326 00000000000000 UTAH GEOCHROMOMETRY <Acronym> UG </Acronym> UTAH GEOLOGICAL AND MINERAL SURVEY ARIZONA; COLORADO; GEOLOGY; IDAHO; IGNEOUS ROCK; NEVADA; RADIOMETRIC; ROCK; UTAH; WYOMING Utah radiometric dates, formations, investigations, constants, references comprise this data set. Searches by formation, age, location, constants, methodology, and rock type will be possible. CATALOGS/INDEXES TERRESTRIAL US STATE UTAH AND NEIGHBORING STATES. -120 -102 49 31 UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 UTAH GEOCHROMOMETRY AUTOMATED INTERACTIVE PC NETWORK SALT LAKE CITY, UT NONE UNDER DEVELOPMENT GRANT WILLIS UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0008 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/examples/gils/records/esdd0044.grs0000644000175000017500000000477311412336535016341 00000000000000 OIL IMPREGNATED ROCK DEPOSITS UTAH GEOLOGICAL AND MINERAL SURVEY BASALT; CRUDE OIL; GEOLOGY; LIMESTONE; OIL; PETROLEUM; PETROLEUM WELL; TAR; TAR BASALT; TAR LIMESTONE; TAR SAND; UTAH High viscosity, low volatile content, hydrocarbon deposits which are developed using unconventional petroleum methods comprise this data set. Deposits include tar sands, limestones, basalts but not shales or solid hydrocarbons. This file includes outcrop maps, field notes, references, logs, stratigraphy, geologic report, and production from outside or in-house sources. FILE FOLDERS Much unpublished data. 7 1/2' OR 15' QUADS; US STATE UTAH -114 -109 42 37 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY ECONOMIC PROGRAM, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 OIL IMPREGNATED ROCK DEPOSITS NONAUTOMATED MANUAL NONE OPERATIONAL UTAH GEOLOGICAL AND MINERAL SURVEY ECONOMIC PROGRAM, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0044 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/examples/gils/records/esdd0057.grs0000644000175000017500000000443411412336535016337 00000000000000 FRESH WATER WETLANDS MAPS MAINE GEOLOGICAL SURVEY FRESH WATER WETLAND; MAINE; MAP; WETLAND Contained are a series of 1:50,000 scale maps showing regulated and unregulated fresh water wetlands in the organized territories. Included is a table describing each mapped wetland. MAP SETS; TABLES 1:50,000 scale base maps are derived from USGS quadrangle maps; restricted to organized territories. Data from 1980-1981 1:40,000 aerial photography are plotted on 1:50,000 base maps. US STATE MAINE -71 -67 48 43 MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 FRESH WATER WETLANDS MAPS NONAUTOMATED MANUAL NONE OPERATIONAL JOHN WILLIAMS MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 ESDD0057 MAINE GEOLOGICAL SURVEY 198709 idzebra-2.0.44/examples/gils/records/esdd0038.grs0000644000175000017500000000474611412336535016344 00000000000000 INTERMOUNTAIN ASSOCIATION OF PETROLEUM GEOLOGISTS/GEOLOGISTS PUBLICATIONS <Acronym> IAPG/IAG </Acronym> UTAH GEOLOGICAL AND MINERAL SURVEY AREAL GEOLOGY; ARIZONA; COLORADO; GEOLOGY; IDAHO; MONTANA; NEVADA; NEW MEXICO; UTAH; WYOMING Guidebooks and field trip logs covering intermountain states: Utah, New Mexico, Colorado, Wyoming, Montana, Nevada, Idaho, Arizona comprise this data set. REPORT SETS; LOGS Society merged into Utah Geological Association in 1970. Complete set of publications is available in UGMS Library. US STATE UTAH AND NEIGHBORING STATES -120 -102 49 31 1950-1970 UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 INTERMOUNTAIN ASSOCIATION OF PETROLEUM GEOLOGISTS/GEOLOGISTS PUBLICATIONS NONAUTOMATED MANUAL NONE OPERATIONAL UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0038 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/examples/gils/records/esdd0065.grs0000644000175000017500000000445611412336535016342 00000000000000 BULLETINS, REPORTS, MAPS, SPECIAL PUBLICATIONS, AND URBAN MAPS NEVADA BUREAU OF MINES AND GEOLOGY CARTOGRAPHY; GEOLOGY; GEOTHERMAL; GEOTHERMAL WELL; MAP; MINERAL; NEVADA A collection of varied information sources dealing with geology, mines, and geothermal waters in Nevada comprises this data set. REPORT SETS; CATALOGS/INDEXES; INDIVIDUAL MAPS; BIBLIOGRAPHIES; FILE FOLDERS 7 1/2' OR 15' QUADS; CITIES; US STATE; COUNTIES PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA -120 -114 42 35 NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 BULLETINS, REPORTS, MAPS, SPECIAL PUBLICATIONS, AND URBAN MAPS NONAUTOMATED MANUAL NONE ARLENE KRAMER NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ESDD0065 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/examples/gils/records/esdd0031.grs0000644000175000017500000000462711412336535016333 00000000000000 APPLIED GEOLOGY FILE UTAH GEOLOGICAL AND MINERAL SURVEY GEOLOGIC HAZARDS; GEOLOGY; GROUNDWATER; HAZARDOUS WASTE; HEALTH; WASTE Reports and memorandums completed by the Site Investigation Section comprise this data set. Subjects include geotechnical appraisal of public facility sites before and during construction and evaluations of hazardous waste problems. FILE FOLDERS CITIES; US STATE; COUNTIES UTAH -114 -109 42 37 1970-PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 APPLIED GEOLOGY FILE AUTOMATED INTERACTIVE PC NETWORK SALT LAKE CITY, UT Alphabetical and County Listings and 1984 Job Number OPERATIONAL SHARON WAKEFIELD UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0031 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/examples/gils/records/esdd0042.grs0000644000175000017500000000520411412336535016325 00000000000000 BIBLIOGRAPHY OF UTAH GEOLOGY UTAH GEOLOGICAL AND MINERAL SURVEY COAL; EARTHQUAKE; GEOLOGY; GREAT SALT LAKE; LANDSLIDE; SEISMOLOGY; STRATIGRAPHY; UTAH Keyworded compilation of 11,300 bibliographic entries consisting of commodities, applied geology, investigation procedures and stratigraphic units related to Utah comprise this data set. Entries are searchable by state, county, quadrangle, as well as keywords. Entries include theses and dissertations referenced in GEOREF to 1980. BIBLIOGRAPHIES Utah Radioactive Occurrences, Great Salt Lake, Landslide, Earthquakes, and Utah Coal Bibliographies are included. US STATE UTAH AND NEIGHBORING STATES -120 -102 49 31 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 BIBLIOGRAPHY OF UTAH GEOLOGY AUTOMATED INTERACTIVE PC NETWORK SALT LAKE CITY, UT NONE OPERATIONAL UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0042 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/examples/gils/records/esdd0070.grs0000644000175000017500000000614211412336535016330 00000000000000 CENSUS DATA DEPARTMENT OF ENVIRONMENTAL DEVELOPMENT AGRICULTURE; CENSUS; CONNECTICUT; DEMOGRAPHICS; ECONOMY; POPULATION This data set contains: 1990 Census of Population and Housing; 1987 Economic Census; 1987 Agricultural Census; current population survey; population projections; current and historical data for the State of Connecticut and its subdivisions pursuant to the State Data Center program with the U.S. Bureau of the Census. MAP SETS; REPORT SETS; CATALOGS/INDEXES; DIGITAL DATA SETS; INDIVIDUAL MAPS; MICROGRAPHICS In addition to census data, assistance is provided for identification of available State generated demographic data. Alternate contact: James Palma. CITIES; US STATE; COUNTIES; METROPOLITAN AREAS CONNECTICUT; METROPOLITAN AREAS SUCH AS CENSUS; TRACTS, BLOCK GROUPS, AND STREET BLOCKS -74 -71 42 41 1940-PRESENT DEPARTMENT OF ENVIRONMENTAL DEVELOPMENT OFC. OF POLICY & MGMT., STATE DATA CTR., POLICY DEVELOPMENT & PLANNING DIVISION, 80 WASHINGTON STREET HARTFORD CT 06106-4459 USA (203) 566-8285 CENSUS DATA AUTOMATED SAS, CENSPAC INTERACTIVE 80-1,956 IBM 370/168 HARTFORD, CT Utilize Bureau of the Census technical documentation for each tape file. OPERATIONAL THERON SCHNURE DEPARTMENT OF ENVIRONMENTAL DEVELOPMENT OFC. OF POLICY & MGMT., STATE DATA CTR., POLICY DEVELOPMENT & PLANNING DIVISION, 80 WASHINGTON STREET HARTFORD CT 06106-4459 USA (203) 566-8285 ESDD0070 DEPARTMENT OF ENVIRONMENTAL DEVELOPMENT 199104 idzebra-2.0.44/examples/gils/records/esdd0007.grs0000644000175000017500000000511511412336535016327 00000000000000 UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS <Acronym> UGMS </Acronym> UTAH GEOLOGICAL AND MINERAL SURVEY COAL; GAS; GEOLOGY; GREAT SALT LAKE; MINE; MINERAL; OIL; UTAH; WATER Publications of the Utah Geological and Mineral Survey include reports of investigation, special studies, bulletins, open-file reports, geologic map of Utah, publications of geological societies, geologic and oil and mineral maps, coal monographs, circulars, water resource bulletins, and reprints of articles. MAP SETS; REPORT SETS; CATALOGS/INDEXES; INDIVIDUAL MAPS; BIBLIOGRAPHIES TERRESTRIAL Complete collection of publications is available in UGMS Library. US STATE UTAH -114 -109 42 37 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS NONAUTOMATED MANUAL NONE OPERATIONAL UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0007 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/examples/gils/records/esdd0032.grs0000644000175000017500000000551511412336535016331 00000000000000 UTAH CRIB FILE <Acronym> UTAH-CRIB </Acronym> UTAH GEOLOGICAL AND MINERAL SURVEY FUEL; GEOLOGY; LAND USE; MAP; METAL; MINERAL; NON-METAL; TOPOGRAPHY; UTAH CRIB-UTAH is a data base covering mineral occurrences in Utah, including metals, non-metals, and fuels. Each mineral occurrence is plotted on topographic maps and described in a six page report. MAP SETS; REPORT SETS CRIB-UTAH is currently accessible through the BLM, USGS, and Utah Geological and Mineral Survey. Future modes of access to the system are uncertain due to systems changes. Not identical to USGS MRDS/CRIB files; other data available in file folder at UGMS. 7 1/2' OR 15' QUADS; US STATE; COUNTIES UTM NORTHINGS AND EASTINGS; PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) UTAH -114 -109 42 37 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 UTAH CRIB FILE AUTOMATED REVELATION INTERACTIVE AND BATCH 8,000 PC NETWORK SALT LAKE CITY, UT NONE OPERATIONAL BRYCE TRIPP UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0032 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/examples/gils/records/esdd0075.grs0000644000175000017500000000431611412336535016336 00000000000000 STREAM CHANNEL ENCROACHMENT LINE STUDIES DEPARTMENT OF ENVIRONMENTAL PROTECTION CHANNEL; CONNECTICUT; FLOOD; FLOOD ZONE; HYDROLOGY; MAP; STREAM; WATER Detailed engineering studies and large-scale mapping delineating high flow zones for regulation by the State are contained in this data set. MAP SETS; REPORT SETS; INDIVIDUAL MAPS; FILE FOLDERS SPECIFIC STREAMS CONNECTICUT -74 -71 42 41 DEPARTMENT OF ENVIRONMENTAL PROTECTION WATER RESOURCES UNIT, 165 CAPITOL AVENUE, ROOM 207 HARTFORD CT 06106 USA (203) 566-7280 STREAM CHANNEL ENCROACHMENT LINE STUDIES NONAUTOMATED MANUAL NONE OPERATIONAL STEVEN DERBY DEPARTMENT OF ENVIRONMENTAL PROTECTION WATER RESOURCES UNIT, 165 CAPITOL AVENUE, ROOM 207 HARTFORD CT 06106 USA (203) 566-7280 ESDD0075 DEPARTMENT OF ENVIRONMENTAL PROTECTION 198502 idzebra-2.0.44/examples/gils/records/esdd0046.grs0000644000175000017500000000535211412336535016335 00000000000000 OIL AND GAS WELLS DRILLED SINCE 1986, LIST L8 NEVADA BUREAU OF MINES AND GEOLOGY CRUDE OIL; GAS; GAS WELL; NEVADA; OIL; OIL WELL; PETROLEUM; PETROLEUM WELL This database contains information about oil and gas wells drilled since 1986 such as well name, location, depth, permit number, company (owner), and producing or dry hole. CATALOGS/INDEXES TERRESTRIAL US STATE; COUNTIES PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA -120 -114 42 35 1986-PRESENT NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA, M.S. 178 RENO NV 89557-0088 USA (702) 784-6691 OIL AND GAS WELLS DRILLED SINCE 1986, LIST L8 AUTOMATED PC-FILE VERSION 5.0 INTERACTIVE 200 IBM PC/XT/AT/386 RENO, NV Updates Nevada Bureau of Mines and Geology Bulletin 104, Oil and Gas Developments in Nevada, 1907-1986. OPERATIONAL RONALD HESS NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA, M.S. 178 RENO NV 89557-0088 USA (702) 784-6691 ESDD0046 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/examples/gils/records/esdd0077.grs0000644000175000017500000000504111412336535016334 00000000000000 DAM INVENTORY DEPARTMENT OF ENVIRONMENTAL PROTECTION BASIN; CONNECTICUT; DAM; DRAINAGE BASIN; FLOOD; FLOOD ZONE; HYDROLOGY; RIVER; WATER The inventory delineates the following: dam name, drainage basin, water course, inspection record, safety status, ownership, and other information. MAP SETS; REPORT SETS; FILE FOLDERS; LOGS Connecticut's Dam Inventory consists of both mapped dam locations and an automated file of data that describes each dam. Information is updated on an ongoing basis. US STATE LATITUDE/LONGITUDE CONNECTICUT -74 -71 42 41 -PRESENT DEPARTMENT OF ENVIRONMENTAL PROTECTION WATER RESOURCES UNIT, 165 CAPITOL AVENUE, ROOM 207 HARTFORD CT 06106 USA (203) 566-7245 DAM INVENTORY AUTOMATED INTERACTIVE 4,000 NONE OPERATIONAL PHILIP MORESCHI DEPARTMENT OF ENVIRONMENTAL PROTECTION WATER RESOURCES UNIT, 165 CAPITOL AVENUE, ROOM 207 HARTFORD CT 06106 USA (203) 566-7245 ESDD0077 DEPARTMENT OF ENVIRONMENTAL PROTECTION 198502 idzebra-2.0.44/examples/gils/records/esdd0054.grs0000644000175000017500000000521311412336535016330 00000000000000 GROUNDWATER RESOURCE MAPS - COUNTY SERIES <Acronym> GRWM </Acronym> MAINE GEOLOGICAL SURVEY AQUIFER; BEDROCK; BEDROCK AQUIFER; BEDROCK WELL; COAST; COASTAL MAINE; COASTLINE; GROUNDWATER; HYDROLOGY; MAINE; MAP; WATER A series of 1:250,000 scale maps showing well yield, well depth, and depth to bedrock for a large number of bedrock wells inventoried by the Maine Geological Survey in the mid-to late 1970's comprises this data set. Some series also show bedrock topography and potentiometric surface. Geographic coverage is restricted to Southern Maine. MAP SETS This is a compilation of bedrock well inventory information. Bedrock inventory data are available on sequential computer tape. No additional maps in this series are planned. COUNTIES MAINE -71 -67 48 43 1972-1978 MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 GROUNDWATER RESOURCE MAPS - COUNTY SERIES NONAUTOMATED MANUAL NONE OPERATIONAL JOHN WILLIAMS MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 ESDD0054 MAINE GEOLOGICAL SURVEY 198709 idzebra-2.0.44/examples/gils/records/esdd0006.grs0000644000175000017500000000522111412336535016324 00000000000000 UTAH EARTHQUAKE EPICENTERS <Acronym> UUCCSEIS </Acronym> UTAH GEOLOGICAL AND MINERAL SURVEY APPALACHIAN VALLEY; EARTHQUAKE; EPICENTER; SEISMOLOGY; UTAH Five files of epicenter data arranged by date comprise this data set. These files are searchable by magnitude and longitude/latitude. Hardcopy of listing and plot of requested area available. Epicenter location and date, magnitude, and focal depth available. DIGITAL DATA SETS TERRESTRIAL Data are supplied by the University of Utah Seismograph Station. The Utah Geologcial and Mineral Survey (UGMS) is merely a clearinghouse of the data. US STATE UTAH -114 -109 42 37 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 UTAH EARTHQUAKE EPICENTERS AUTOMATED BATCH 8,700 PC NETWORK SALT LAKE CITY, UT NONE OPERATIONAL BILL CASE UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0006 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/examples/gils/records/esdd0034.grs0000644000175000017500000000454111412336535016331 00000000000000 COAL SAMPLE BANK UTAH GEOLOGICAL AND MINERAL SURVEY COAL; MACERAL; METHANE; PETROGRAPHY; UTAH This data set contains methane data, chemical analysis data, and petrographic analysis data on core samples in Utah. DIGITAL DATA SETS; FILE FOLDERS Coal pellets are stored. Future plans are to store coal samples under water. US STATE UTAH -114 -109 42 37 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 COAL SAMPLE BANK AUTOMATED INTERACTIVE 550 COMPACT AT COMPATIBLE SALT LAKE CITY, UT NONE OPERATIONAL ALEX KEITH UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0034 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/examples/gils/records/esdd0051.grs0000644000175000017500000000625711412336535016336 00000000000000 OIL/GAS DRILLING <Acronym> NVOILWEL </Acronym> NEVADA BUREAU OF MINES AND GEOLOGY CORE; CRUDE OIL; GAS; GAS WELL; NEVADA; OIL; OIL WELL; PETROLEUM; PETROLEUM WELL This database contains information on oil and gas drilling such as well name, operator, driller, location, depth, copies of logs run, permits, samples (cuttings, core), completion records. REPORT SETS; DIGITAL DATA SETS; FILE FOLDERS; MICROGRAPHICS; LOGS; COMPUTER DATA BASE RECORDS TERRESTRIAL DOCUMENTATION continued: Special Publication l4; Bulletin 104, Oil and Gas Developments in Nevada, 1907-1986; Special Publication l8. COMMENTS: Not all data in this data set is available on-line. US STATE; COUNTIES UTM NORTHINGS AND EASTINGS; PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA -120 -114 42 35 1907-PRESENT NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA, M.S. 178 RENO NV 89557-0088 USA (702) 784-6691 OIL/GAS DRILLING AUTOMATED PC-FILE, VERSION 5.0 INTERACTIVE 700 400 IBM PC/XT/AT/386 RENO, NV Listed and described in NBMG Bulletin 52, Nevada Oil and Gas Drilling Data, 1906-1953; Report 18, Oil and Gas Developments in Nevada, 1953-1967; Report 29;(continued in COMMENTS section) OPERATIONAL RONALD HESS NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA, M.S. 178 RENO NV 89557-0088 USA (702) 784-6691 ESDD0051 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/examples/gils/records/esdd0045.grs0000644000175000017500000000417711412336535016340 00000000000000 ENGINEERING GEOLOGY (UNPUBLISHED REPORTS AND MAPS) NEVADA BUREAU OF MINES AND GEOLOGY CARTOGRAPHY; ENGINEERING; GEOLOGY; MAP; NEVADA Project name, location, geologic information, engineering information, firm or individual making report or map are components of this database. MAP SETS; REPORT SETS; INDIVIDUAL MAPS; FILE FOLDERS; LOGS 7 1/2' OR 15' QUADS; COUNTIES; 1 DEG. X 2 DEG. QUAD NEVADA -120 -114 42 35 NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ENGINEERING GEOLOGY (UNPUBLISHED REPORTS AND MAPS) NONAUTOMATED NONE BECKY WEIMER PURKEY NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ESDD0045 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/examples/gils/records/esdd0030.grs0000644000175000017500000000441311412336535016323 00000000000000 UTAH OIL FIELD FILE UTAH GEOLOGICAL AND MINERAL SURVEY CRUDE OIL; GEOLOGY; MAP; OIL; OIL WELL; PETROLEUM; PETROLEUM WELL; RESERVOIR; UTAH Complete Utah oil field data including geology, production, recovery methods, structure maps, index map of wells within field, type section logs, operations, field history, bibliography, references, reservoir data, and completion practices comprise this data set. FILE FOLDERS US STATE UTAH -114 -109 42 37 1900-PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 UTAH OIL FIELD FILE NONAUTOMATED MANUAL NONE OPERATIONAL RAY KERNS UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0030 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/examples/gils/records/esdd0059.grs0000644000175000017500000000507211412336535016340 00000000000000 SIGNIFICANT AQUIFERS MAP SERIES MAINE GEOLOGICAL SURVEY AQUIFER; GEOCHEMISTRY; GROUNDWATER; HYDROLOGY; MAINE; MAP; SURFICIAL AQUIFER; SURFICIAL DEPOSIT; WATER; WATER WELL The Significant Aquifers Program is a more detailed study of selected major surficial aquifers. Data reported includes outline of aquifers, seismic cross-sections, well yields, logs of borings, and regional groundwater geochemistry. Many are in extreme SW Maine at this time. Areas in North and Central Maine are not yet covered. MAP SETS; REPORT SETS Detailed study of selected major surficial aquifers; replaced Sand and Gravel Aquifer Mapping Program. US STATE MAINE; SOUTHWEST MAINE; SOUTHWESTERN MAINE -71 -67 48 43 1982-PRESENT MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 SIGNIFICANT AQUIFERS MAP SERIES NONAUTOMATED MANUAL NONE OPERATIONAL JOHN WILLIAMS MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 ESDD0059 MAINE GEOLOGICAL SURVEY 198709 idzebra-2.0.44/examples/gils/records/esdd0052.grs0000644000175000017500000000452411412336535016332 00000000000000 THESES ON NEVADA GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY GEOLOGY; NEVADA This database contains catalogs and indexes of geology theses in Nevada. Some of the information included are author, title, location, degree, and university. CATALOGS/INDEXES US STATE LATITUDE/LONGITUDE NEVADA -120 -114 42 35 1976-PRESENT NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 THESES ON NEVADA GEOLOGY NONAUTOMATED MANUAL Bibliography of Graduate Theses on Nevada Geology to 1976: Nevada Bureau of Mines and Geology, Report 31. OPERATIONAL BECKY WEIMER PURKEY NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ESDD0052 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/examples/gils/records/esdd0053.grs0000644000175000017500000000506411412336535016333 00000000000000 SAMPLES ANALYZED FOR PROSPECTORS IN THE NBMG (NMAL) CHEMICAL LABORATORY NEVADA BUREAU OF MINES AND GEOLOGY GEOLOGY; MINE; NEVADA This database contains reports on samples analyzed in the NBMG (NMAL) Chemical Laboratory. The reports include such information as prospector's name, address, location, sample description, and analytical results. REPORT SETS MINING DISTRICT PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA -120 -114 42 35 1925-PRESENT NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 SAMPLES ANALYZED FOR PROSPECTORS IN THE NBMG (NMAL) CHEMICAL LABORATORY AUTOMATED INTERACTIVE 20,000 PCJR (IBM) RENO, NV NONE OPERATIONAL PAUL LECHLER NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ESDD0053 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/examples/gils/records/esdd0058.grs0000644000175000017500000000533411412336535016340 00000000000000 SAND AND GRAVEL AQUIFER MAPS MAINE GEOLOGICAL SURVEY AQUIFER; GROUNDWATER; HYDROLOGY; MAINE; MAP; SURFICIAL AQUIFER; SURFICIAL DEPOSIT; WATER A series of 1:50,000 scale maps showing the outlines of known deposits of coarse surficial material with well yields greater than 10 gallons per minute (gpm) and 50 gpm comprises this data set. Other information pertaining to wells, test pits, borings, etc., are also shown. Tables describe other geologic information pertaining to the deposits. MAP SETS; LOGS; TABLES This program is superseded by the Significant Aquifers Program. More detailed maps of significant surficial aquifers are published for some areas and planned for others. See Significant Aquifer Map Series. 1:50,000 scale base maps derived from USGS quadrangles; no coverage in Northwest and parts of Eastern Maine. US STATE MAINE -71 -67 48 43 1978-1981 MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 SAND AND GRAVEL AQUIFER MAPS NONAUTOMATED MANUAL NONE OPERATIONAL JOHN WILLIAMS MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 ESDD0058 MAINE GEOLOGICAL SURVEY 198709 idzebra-2.0.44/examples/gils/records/esdd0048.grs0000644000175000017500000000501711412336535016335 00000000000000 MINERAL OCCURRENCES, DEPOSITS, PROSPECTS, AND MINES NEVADA BUREAU OF MINES AND GEOLOGY GEOLOGY; MINE; MINERAL; NEVADA Name, location, workings, geologic description, history of development and mining (if any), analyses of rocks and minerals, and references are components of this database. MAP SETS; REPORT SETS; CATALOGS/INDEXES; PHOTOGRAPHS; BIBLIOGRAPHIES; FILE FOLDERS; ROCK AND MINERAL SAMPLES COUNTIES UTM NORTHINGS AND EASTINGS; PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA -120 -114 42 35 1970-PRESENT NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 MINERAL OCCURRENCES, DEPOSITS, PROSPECTS, AND MINES NONAUTOMATED MANUAL 20,000 As an area is covered, the data is open-filed at the Nevada Bureau of Mines and Geology. JOE TINGLEY NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ESDD0048 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/examples/gils/records/esdd0076.grs0000644000175000017500000000523511412336535016340 00000000000000 AUTOMATED FLOOD WARNING NETWORK <Acronym> ASERT </Acronym> DEPARTMENT OF ENVIRONMENTAL PROTECTION CLIMATE; CONNECTICUT; FLOOD; FLOOD ZONE; HYDROLOGY; METEOROLOGY; PRECIPITATION; RAINFALL; SOIL; STREAM; STREAMFLOW; WIND The new system will collect rainfall, temperature, soil moisture, wind speed and direction, humidity, and streamflow (above certain values). WEATHER AND STREAM DATA Cooperative program with SCS, DEP, COE, and FEMA. Plans call for 19 telemetering precipitation stations and 2 stream gauges. Data will be continuously relayed to a central facility that will predict flood situations. Towns will be encouraged to participate. US STATE CONNECTICUT -74 -71 42 41 1982-PRESENT DEPARTMENT OF ENVIRONMENTAL PROTECTION NATURAL RESOURCES CENTER, 165 CAPITOL AVENUE, ROOM 553 HARTFORD CT 06106 USA (203) 566-3540 AUTOMATED FLOOD WARNING NETWORK AUTOMATED IBM PC HARTFORD, CT NONE OPERATIONAL ALLAN WILLIAMS DEPARTMENT OF ENVIRONMENTAL PROTECTION NATURAL RESOURCES CENTER, 165 CAPITOL AVENUE, ROOM 553 HARTFORD CT 06106 USA (203) 566-3540 ESDD0076 DEPARTMENT OF ENVIRONMENTAL PROTECTION 198502 idzebra-2.0.44/examples/gils/records/esdd0074.grs0000644000175000017500000000501511412336535016332 00000000000000 INLAND WETLANDS OF CONNECTICUT DEPARTMENT OF ENVIRONMENTAL PROTECTION CONNECTICUT; HYDROLOGY; INLAND WETLAND; MAP; SOIL; WATER; WETLAND This data set contains inland wetlands, as defined by State statute, which are delineated at a scale of 1:12,000, based predominantly on location of wet soils. MAP SETS; PHOTOGRAPHS; INDIVIDUAL MAPS; FILE FOLDERS Inland wetlands in Connecticut are defined primarily by soil characteristics. Soils which are very poorly drained, alluvial, or flood plain according to the National Cooperative Soil Survey are inland wetland soils. CITIES CONNECTICUT -74 -71 42 41 1972-PRESENT DEPARTMENT OF ENVIRONMENTAL PROTECTION WATER RESOURCES UNIT, 165 CAPITOL AVENUE, ROOM 207 HARTFORD CT 06106 USA (203) 566-7280 INLAND WETLANDS OF CONNECTICUT NONAUTOMATED MANUAL NONE OPERATIONAL DOUGLAS COOPER DEPARTMENT OF ENVIRONMENTAL PROTECTION WATER RESOURCES UNIT, 165 CAPITOL AVENUE, ROOM 207 HARTFORD CT 06106 USA (203) 566-7280 ESDD0074 DEPARTMENT OF ENVIRONMENTAL PROTECTION 198502 idzebra-2.0.44/examples/gils/records/esdd0040.grs0000644000175000017500000000455411412336535016332 00000000000000 ELECTRIC LOG LIBRARY UTAH GEOLOGICAL AND MINERAL SURVEY AREAL GEOLOGY; CRUDE OIL; ELECTRICITY; GEOLOGY; GEOPHYSICAL; HYDROCARBON; LITHOLOGY; MUD; OIL; PETROLEUM; PETROLEUM WELL; UTAH Logs for selected petroleum wells include electric (all varieties) and lithologic or hydrocarbon logs. Duplicates from OG&M well records file, supplied by private concerns. The areal coverage is Utah and vicinity. LOGS US STATE PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) UTAH -114 -109 42 37 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY ECONOMIC PROGRAM, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ELECTRIC LOG LIBRARY NONAUTOMATED MANUAL NONE UNDER DEVELOPMENT UTAH GEOLOGICAL AND MINERAL SURVEY ECONOMIC PROGRAM, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0040 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/examples/gils/records/esdd0064.grs0000644000175000017500000000471311412336535016335 00000000000000 OPERATING MINES STATE MINE INSPECTOR'S OFFICE INDUSTRY; MINE; NEVADA This database contains information on operating mines in Nevada such as mine name, operator, number of employees, address, manager's name, substance mined or processed. CATALOGS/INDEXES; DIGITAL DATA SETS US STATE; COUNTIES PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA -120 -114 42 35 -PRESENT STATE MINE INSPECTOR'S OFFICE STATE MINE INSPECTOR, NEVADA DEPT. OF INDUSTRIAL RELATIONS, 1380 S. CURRY CARSON CITY NV 89710 USA (702) 687-5243 OPERATING MINES AUTOMATED INTERACTIVE 500 GOLDSTAR CARSON CITY, NV NONE OPERATIONAL KATHY HALL STATE MINE INSPECTOR'S OFFICE STATE MINE INSPECTOR, NEVADA DEPT. OF INDUSTRIAL RELATIONS, 1380 S. CURRY CARSON CITY NV 89710 USA (702) 687-5243 ESDD0064 STATE MINE INSPECTOR'S OFFICE 199101 idzebra-2.0.44/examples/gils/records/esdd0033.grs0000644000175000017500000000462611412336535016334 00000000000000 MINE MAP INDEX UTAH GEOLOGICAL AND MINERAL SURVEY AREAL GEOLOGY; COAL; GEOLOGY; MAP; MINE; UTAH Mine Map Index is an index of mine maps located in the UGMS energy section. All maps are rescaled by hand to 1:24,000. Maps show areal extent of mine and coal seams. Maps are used for production, control, and resource calculations. CATALOGS/INDEXES; INDIVIDUAL MAPS Some drill hole information is confidential. 7 1/2' OR 15' QUADS; US STATE UTAH -114 -109 42 37 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 MINE MAP INDEX AUTOMATED INTERACTIVE 200 SALT LAKE CITY, UT NONE OPERATIONAL KEITH ALEX UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0033 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/examples/gils/records/esdd0071.grs0000644000175000017500000000567411412336535016342 00000000000000 STATEWIDE PLANNING DEPARTMENT OF ENVIRONMENTAL PROTECTION AGRICULTURE; CONNECTICUT; FLOOD; FLOOD ZONE; HYDROLOGY; INSURANCE; LAND USE; RECREATION; WASTE; WASTE TREATMENT; WASTEWATER; WATER; WATER SUPPLY This data set contains: 1970 digitized land use maps, 1970 digitized zoning maps, active agricultural areas maps (1979-1980), maps displaying current National Flood Insurance Program data, locational guide map of the State Policies Plan for Conservation and Development of Connecticut (1987-1992), 1970 land use statistical data and 1970 municipal zoning data, proposed sewer service areas maps (1978) - DEP has update of this information, water conservation handbooks, and various reports and maps of the areawide Waste Treatment Management Planning Program (208). MAP SETS; REPORT SETS; INDIVIDUAL MAPS; FILE FOLDERS Alternate contact: John Radacsi. 7 1/2' OR 15' QUADS; US STATE; 1:125,000 SCALE MAPS CONNECTICUT -74 -71 42 41 1960-PRESENT DEPARTMENT OF ENVIRONMENTAL PROTECTION OFFICE OF POLICY AND MANAGEMENT, POLICY DEVELOPMENT AND PLANNING DIVISION, 80 WASHINGTON STREET HARTFORD CT 06106-4459 USA (203) 566-8341 STATEWIDE PLANNING NONAUTOMATED MANUAL NONE OPERATIONAL THERON SCHNURE DEPARTMENT OF ENVIRONMENTAL PROTECTION OFFICE OF POLICY AND MANAGEMENT, POLICY DEVELOPMENT AND PLANNING DIVISION, 80 WASHINGTON STREET HARTFORD CT 06106-4459 USA (203) 566-8341 ESDD0071 DEPARTMENT OF ENVIRONMENTAL PROTECTION 199104 idzebra-2.0.44/examples/gils/records/esdd0066.grs0000644000175000017500000000456711412336535016346 00000000000000 ORE DEPOSITS (UNPUBLISHED REPORTS AND MAPS) NEVADA BUREAU OF MINES AND GEOLOGY MINE; NEVADA; ORE; ORE DEPOSIT Occurrence, prospect, or mine name, mining district, description of man-made things (workings, buildings, etc.), and a description of geologic setting are descriptive elements of reports and maps on ore deposits in Nevada. MAP SETS; REPORT SETS; PHOTOGRAPHS; INDIVIDUAL MAPS; FILE FOLDERS; LOGS; NEWSPAPER CLIPPINGS US STATE; COUNTIES; MINING DISTRICT NEVADA -120 -114 42 35 1960-PRESENT NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ORE DEPOSITS (UNPUBLISHED REPORTS AND MAPS) NONAUTOMATED MANUAL 25,000 NONE BECKY WEIMER PURKEY NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ESDD0066 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/examples/gils/records/esdd0072.grs0000644000175000017500000000505711412336535016336 00000000000000 PETROLEUM PRODUCT VENDOR REGISTRATION <Acronym> PPVR </Acronym> DEPARTMENT OF ENVIRONMENTAL PROTECTION CONNECTICUT; CRUDE OIL; ELECTRICITY; MAP; NATURAL GAS; OIL; PETROLEUM; VENDOR This data set is comprised of the following: petroleum product storage and sales by vendor and municipality, petroleum product vendor ownership and affiliation and maps of petroleum product storage tanks, electric transmission lines, and natural gas pipelines - mylar overlays. MAP SETS; REPORT SETS; FILE FOLDERS CITIES; US STATE CONNECTICUT -74 -71 42 41 1975-PRESENT DEPARTMENT OF ENVIRONMENTAL PROTECTION OFFICE OF POLICY AND MANAGEMENT, ENERGY DIVISION, 80 WASHINGTON STREET HARTFORD CT 06106 USA (203) 566-2800 PETROLEUM PRODUCT VENDOR REGISTRATION AUTOMATED FOCUS INTERACTIVE 3,329 NONE OPERATIONAL RUSSELL KAPLAN DEPARTMENT OF ENVIRONMENTAL PROTECTION OFFICE OF POLICY AND MANAGEMENT, ENERGY DIVISION, 80 WASHINGTON STREET HARTFORD CT 06106 USA (203) 566-2800 ESDD0072 DEPARTMENT OF ENVIRONMENTAL PROTECTION 198502 idzebra-2.0.44/examples/gils/records/esdd0041.grs0000644000175000017500000000474611412336535016336 00000000000000 WELL SAMPLE LIBRARY UTAH GEOLOGICAL AND MINERAL SURVEY CORE; CORE CHIPS; CRUDE OIL; DRILL CUTTINGS; GEOTHERMAL; GEOTHERMAL WELL; MINE; OIL; PETROLEUM; PETROLEUM WELL; STRATIGRAPHY; UTAH Petroleum, mining, geothermal, and stratigraphic samples, including cores, core chips and drill cuttings comprise this data set. This does not include logs or description. These data are supplied by outside agencies and private organizations. SAMPLE CONTAINERS Samples may be inspected by appointment only. US STATE PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) UTAH AND NEIGHBORING STATES -120 -102 49 31 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 WELL SAMPLE LIBRARY NONAUTOMATED MANUAL NONE OPERATIONAL CAROLYN OLSEN UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0041 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/examples/gils/records/esdd0079.grs0000644000175000017500000000457511412336535016351 00000000000000 COASTAL BOUNDARY DEPARTMENT OF ENVIRONMENTAL PROTECTION COAST; COASTAL CONNECTICUT; COASTLINE; CONNECTICUT; FLOOD; FLOOD ZONE; HYDROLOGY; MAP; WATER This data set contains maps delineating the coastal boundary of Connecticut as defined in the Coastal Area Management Act. MAP SETS This set of maps serves to define that area of Connecticut's coast subject to special regulatory programs. The boundaries are administrative rather than resource based. 7 1/2' OR 15' QUADS LATITUDE/LONGITUDE CONNECTICUT; COASTAL CONNECTICUT -74 -71 42 41 DEPARTMENT OF ENVIRONMENTAL PROTECTION COASTAL MANAGEMENT UNIT, 71 CAPITOL AVENUE HARTFORD CT 06106 USA (203) 566-7404 COASTAL BOUNDARY NONAUTOMATED MANUAL NONE OPERATIONAL RON ROSZA DEPARTMENT OF ENVIRONMENTAL PROTECTION COASTAL MANAGEMENT UNIT, 71 CAPITOL AVENUE HARTFORD CT 06106 USA (203) 566-7404 ESDD0079 DEPARTMENT OF ENVIRONMENTAL PROTECTION 198502 idzebra-2.0.44/examples/gils/records/esdd0067.grs0000644000175000017500000000470611412336535016342 00000000000000 WATER WELL DATA NV DEPT. OF CONS. AND NATURAL RESOURCES HYDROLOGY; LITHOLOGY; NEVADA; WATER; WATER WELL This database contains the following information on water wells in Nevada: driller's name, owner's name, location, formations encountered, lithologic descriptions, water level, and water quality. REPORT SETS; CATALOGS/INDEXES; FILE FOLDERS; LOGS CITIES; COUNTIES UTM NORTHINGS AND EASTINGS; PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA -120 -114 42 35 1930-PRESENT NV DEPT. OF CONS. AND NATURAL RESOURCES DCNR, DIVISION OF WATER RESOURCES, 123 W. NYE LANE CARSON CITY NV 89710 USA (702) 687-4380 WATER WELL DATA NONAUTOMATED MANUAL 20,000 NONE OPERATIONAL MIKE TURNIPSEED NV DEPT. OF CONS. AND NATURAL RESOURCES DCNR, DIVISION OF WATER RESOURCES, 123 W. NYE LANE CARSON CITY NV 89710 USA (702) 687-4380 ESDD0067 NV DEPT. OF CONS. AND NATURAL RESOURCES 199101 idzebra-2.0.44/examples/gils/records/esdd0063.grs0000644000175000017500000000466511412336535016342 00000000000000 MAINE GEOLOGICAL SURVEY BEDROCK WATER WELL INVENTORY MAINE GEOLOGICAL SURVEY BEDROCK; BEDROCK WELL; GROUNDWATER; HYDROLOGY; MAINE; WATER; WATER WELL This data set contains a series of well inventory maps stored on tape. The series has no indexing. INVENTORY Resumed within the next fiscal year (1985-86). CITIES MAINE -71 -67 48 43 1972-PRESENT MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 MAINE GEOLOGICAL SURVEY BEDROCK WATER WELL INVENTORY AUTOMATED 15,000 400 BURROUGHS B20 AUGUSTA, ME. Format and card image available from the Maine Geological Survey. OPERATIONAL JOHN WILLIAMS MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 ESDD0063 MAINE GEOLOGICAL SURVEY 198709 idzebra-2.0.44/examples/gils/records/esdd0055.grs0000644000175000017500000000444011412336535016332 00000000000000 RECONNAISSANCE SURFICIAL GEOLOGIC MAP SERIES MAINE GEOLOGICAL SURVEY GEOLOGY; GLACIAL DEPOSITS; GLACIER; MAINE; MAP; SURFICIAL GEOLOGY This data set contains a series of 1:24,000 and 1:62,500 scale reconnaissance surficial geologic maps prepared with a uniform explanation and format. MAP SETS Sixty percent of the state is at either 1:24,000 or 1:62,500 scale. 7 1/2' OR 15' QUADS MAINE -71 -67 48 43 1978-PRESENT MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 RECONNAISSANCE SURFICIAL GEOLOGIC MAP SERIES NONAUTOMATED MANUAL NONE OPERATIONAL WOODROW THOMPSON MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 ESDD0055 MAINE GEOLOGICAL SURVEY 198709 idzebra-2.0.44/examples/gils/records/esdd0037.grs0000644000175000017500000000447211412336535016337 00000000000000 UTAH GEOLOGICAL SOCIETY PUBLICATIONS <Acronym> UGS </Acronym> UTAH GEOLOGICAL AND MINERAL SURVEY ARIZONA; COLORADO; GEOLOGY; IDAHO; NEVADA; UTAH; WYOMING Guidebooks and field logs of selected areas in Utah and neighboring states comprise this data set. REPORT SETS; LOGS Society merged into Utah Geological Association in 1970. Complete set of publications is available in UGMS Library. US STATE UTAH AND NEIGHBORING STATES -120 -102 49 31 1946-1970 UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 UTAH GEOLOGICAL SOCIETY PUBLICATIONS NONAUTOMATED MANUAL NONE OPERATIONAL UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0037 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/examples/gils/records/esdd0056.grs0000644000175000017500000000455611412336535016343 00000000000000 COASTAL MARINE GEOLOGIC ENVIRONMENTS MAP SERIES MAINE GEOLOGICAL SURVEY COAST; COASTAL MAINE; COASTLINE; GEOLOGY; HYDROLOGY; MAINE; MAP; MARINE; MARINE GEOLOGY; TIDAL WATER; WATER This data set contains a series of 1:24,000 scale maps of coastal marine geologic environments, including the supratidal, intertidal, and subtidal regimes. The information is derived primarily from air photo interpretation with representative field checking. MAP SETS 7 1/2' OR 15' QUADS MAINE; COASTAL MAINE -71 -67 48 43 1977-1978 MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 COASTAL MARINE GEOLOGIC ENVIRONMENTS MAP SERIES NONAUTOMATED MANUAL NONE OPERATIONAL ROBERT TUCKER MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 ESDD0056 MAINE GEOLOGICAL SURVEY 198709 idzebra-2.0.44/examples/gils/records/esdd0073.grs0000644000175000017500000000653111412336535016335 00000000000000 POPULATION PROJECTIONS DEPARTMENT OF ENVIRONMENTAL PROTECTION CENSUS; CONNECTICUT; DEMOGRAPHICS; POPULATION; POPULATION PROJECTIONS This data set contains population projections by age and sex. Records contain identifiers, geographic coding, and population projections for 18 unique 5-year age cohorts for males and females from 0-4 cohort to 85 and over cohort. REPORT SETS; DIGITAL DATA SETS; LOTUS, ASCII This population projections data set is contained on a seven diskettes which contains the June 1989 Projection Series published by this office in the report cited above. Also included are birth rates, survival rates, migration rates, geographic codes and zip codes to municipal conversions. Geographical Coverage: State of Connecticut 8 Counties 16 Planning Regions 5 Health Service Areas 9 Labor Department Service Areas 6 Children and Youth Service Areas 16 Metropolitan/Non Metro Areas 169 Municipalities Alternate contact: James Palma. SEE COMMENTS SECTION. CONNECTICUT -74 -71 42 41 1980-2010 DEPARTMENT OF ENVIRONMENTAL PROTECTION OFFICE OF POLICY AND MANAGEMENT, POLICY DEVELOPMENT AND PLANNING DIVISION, 80 WASHINGTON STREET HARTFORD CT 06106-4459 USA (203) 566-8285 POPULATION PROJECTIONS AUTOMATED INTERACTIVE 2,415 148 IBM COMPATIBLE PC'S HARTFORD, CT State of Connecticut, Office of Policy and Management, Comprehensive Planning Division, 1989: 'Connecticut Population Projections,' Series 89.1. OPERATIONAL THERON SCHNURE DEPARTMENT OF ENVIRONMENTAL PROTECTION OFFICE OF POLICY AND MANAGEMENT, POLICY DEVELOPMENT AND PLANNING DIVISION, 80 WASHINGTON STREET HARTFORD CT 06106-4459 USA (203) 566-8285 ESDD0073 DEPARTMENT OF ENVIRONMENTAL PROTECTION 199104 idzebra-2.0.44/examples/README0000644000175000017500000000037011057500746012645 00000000000000You could argue that these examples all belong in ../test, along with the gils, usmarc, cddb and dmoz examples. You may well be right, but I am keeping them separate at the moment, because they are toys-in-progress rather than working test-cases. idzebra-2.0.44/examples/Makefile.in0000644000175000017500000004234411412336424014034 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = examples DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ SUBDIRS = gils marc21 marcxml oai-pmh zthes EXTRA_DIST = README all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/NEWS0000644000175000017500000002622411412336347010653 00000000000000--- 2.0.44 2010/06/29 grs1: avoid term_len < 0 for .abs operator 'range' ICU: fix use of un-init variable. More reasonable approx hits for truncated searches. Updates WRT Odr_int (YAZ 4). --- 2.0.43 2009/11/05 Fix hits counts for searches when @attr 12=n is in use. This bug was introduced in 2.0.40. --- 2.0.42 2009/10/08 Proximity modifications. The optimized proximity now deals with more cases, ie all prox of the form @prox 0 d 1 1,2,3 k 2 .. That's exlusive==0, any distance, ordered (true), relation (<, =, <=), known unit word. Fix bug WRT inconsistent registers, bug #3062. Fix install doc rule so it's compatible with Automake 1.11. --- 2.0.41 2009/08/24 Fix typos and other errors in the documentation. Thanks to Galen Charlton. Fix DOM filter so that full record ID (z:id) if given is used verbatim rather than truncated until first blank - in other words use memcpy rather than sscanf. For PI fix record attributes parsing which was completely broken. --- 2.0.40 2009/07/13 Fixed problem in result set handling and segment handling. --- 2.0.39 2009/07/09 Improved speed of record fetching by using a different block sizes for recd{A,B}. Added zlib-compression of recd-storage (record data). This is enabled by using recordCompression: zlib in zebra.cfg. Dictionary delete more agressive (dict_del_string). --- 2.0.38 2009/06/19 Improved estimated hits for AND operation (bug #2907) Fixed problem with register area growing after "drop DB". (bug #2913). --- 2.0.37 2009/05/18 Example with marc21 is now installed and part of packages. Fixed XSL for OAI example. Fixed problem with generic proximity handling. Added new ranking handler: rank-2. This is a combination of rank-1 and static rank.. The staticrank is inverse (lowest value comes first, etc..). rank-2 thus substracts that from score. This allows a system to specify a "base" rank (=staticrank). --- 2.0.36 2009/02/17 Added implementation-codes directive for .mar files. Avoid error for missing recordId when zebraidx' option -s is in use. Fixed problem with some disk blocks not beeing freed correctly when 'drop database' is used. --- 2.0.34 2008/11/06 Facets can now be performed on sort registers (:s), not just regular indexes (:w, :p) etc.. The performance appers to be much better than before. Added a facility to embed metadata for records generated by the DOM XML filter. The meta data step is triggered by a 'process-meta' section in the retrieve section of the dom config, e.g. The meta section substitutes metadata for all elements called 'meta' in namespace http://indexdata.com/zebra-2.0 . The meta element must have exactly one attribute, name, which specifies the special element set name which is equivalent to the suffix to zebra:: for non-embedded special retrievals. This allows snippets, facets etc to be included. Fixed bug #2202: incorrect sorting order when searching multiple databases. --- 2.0.32 2008/06/06 Fixed OAI example. --- 2.0.30 2008/05/14 Changed service name for Windows. Bug #978. Fixed the alwaysmatches including _ALLRECORDS for ICU term indexing. Bug #2139. --- 2.0.28 2008/04/03 Handle right-truncation for ICU normalized terms. Updated OAI-PMH example. --- 2.0.26 2008/01/28 Fixes for searches on Chinese text. Fixes for scan using ICU indexing terms. --- 2.0.24 2008/01/18 Fixed some memory violations for ICU enabled indexing that could be triggered by long phrases. Enable ICU on Windows. Thanks to Tumer Garip for makefile patches. Fixed bug #2002: Zebra crashes during merge using ICU indexing. --- 2.0.22 2007/12/20 Handle encoding errors for strings passed to ICU. (assert was thrown earlier). Added zebraidx command, adelete, which attempts to delete records. It's like 'delete', but does not fail if a record does not exist. --- 2.0.20 2007/12/19 Added experimental support for faceted results. This is implemented as a special retrieval on a result set and is triggered using element set name zebra::facet::f1:t1,f2,t2,.. which will return terms and hit counts for field f1, type t1, field f2, type t2, .. The returned data is packed as XML or SUTRS depending on record syntax. Added support for Unicode-based indexing using ICU. This allows locale specific scanning, sorting. The implementation is based on the ICU utility part of YAZ 3.0.16 and later. See the manual as well as the examples/marcxml for an example of the use of ICU. --- 2.0.18 2007/09/19 Fixed bug with scan and staticrank enabled. Bug introduced in 2.0.16. --- 2.0.16 2007/09/12 Scan now returns a displayTerm which closer to the original word/phrase from original record. Added snippet support. Element set name zebra::snippet will make Zebra return an XML record with snippets (terms around matching terms). Fixed bug #1142: Non-indexed but listed attributes issues diagnostic. Fixed bug #1131: Missing value-of data in DOM filter. Fixed bug #1049: zebra.cfg lines with leading space are ignored. Fixed bug #1128: sortmax not honored. Fixed bug #1121: Crash for some searches with customized string.chr. --- 2.0.14 2007/05/09 Zebra uses the YAZ 3 API. Note that this changes the Zebra API as well. The register layout is the same however. Fixed bug #1114: scan within set may use excessive CPU. Fixed memory leak that occurred in scan. Fixed memory leak that occurred for each deleted record. Optimize updates of records where content is almost identical to previous version of record. This makes updating of the internal explain database faster too. For RPN queries the index type (w,p,..) may be specified verbatim as structure attribute with string value, e.g. @attr 4=w . Changed record update API . It is now handled by function zebra_record_update which does insert/replace/delete/update of records . This function replaces zebra_record_{insert,delete} and zebra_admin_exchange_record. The DOM filter uses this feature and the @type attribute in record element specifies the action insert/replace/delete/update. Added support for multi-record updates (Bug #944). Based on patch from Hans-Werner Hilse. --- 2.0.12 2007/03/07 Fixed bug with indexing of attributes for rec.grs-class of filters. If X-Path was enabled xelm a/@b would be ignored. Fixed bug in register system where 'no more space' messages was produced even though there was plenty of space. Fixed bug #884: Entity declarations in input are lost at retrieval time. Implemented new filter 'dom'. See test/xslt/dom-config*xml for examples. This, like alvis, performs indexing and retrieval using XSLT. But Unlike alvis, it allows multiple XSLT steps to be performed and does ISO2709 reading. Bug #843. --- 2.0.10 2007/01/24 Staticrank indexing is now an index register type defined in default.idx via directive 'staticrank'. The 'staticrank' directive for grs is no longer supported (was only implemented for Zebra 2.0.8). For searches, allow truncmax value to be controlled with attribute 13. If given, that overrides the value of 'truncmax'. For truncations being limited (abort at truncmax terms), zebrasrv returns SearchResponse with resultSetStatus=subset. For estimated hit counts, zebrasrv returns SearchResponse with resultSetStatus=estimate. --- 2.0.8 2007/01/15 For searches, do not truncate more than at most 'truncmax' terms in one single term with right-truncation/regular attribute. By default, 'truncmax', is 10000. Bug #781: Easier tracking of result sets. We only do this when mkstemp is available (most moderun Unixes supports this). The PID is included in filename : tempdir/zrs_PID_XXXXXX. Added support for specification of staticrank for grs-class of filters. This is enabled by using 'staticrank indexname' in .abs. Contents of indexname (elm ... indexname:w) is then used as value for staticrank. Implemented sorting via the ISAMB system. To enable, use sortindex:i in zebra.cfg. Added special retrieval support for sort keys. These keys can also be fetched using zebra::index:field:s Added support for specification of approximative limits for whole query. This is specified as attribute type 12. Semantics is the same as estimatehits in zebra.cfg. --- 2.0.6 2006/11/28 Fixed bug #736: Updates gets slower. Fixed bug #735: Delete fails to process rest of file after a record that does not exist, Added RPM package for Zebra 2. Improved indexing speed for large documents. Added support for special utility retrieval zebra:: which offers retrieval of fundamental properties for record, such as indexed terms, raw record, and system record ID. --- 2.0.4 2006/10/16 Fixed bug #47: Commit needs to check for roll-back. Fixed bug #672: Trailing characters in password are ignored Added extra presence check for tcl.h, because some systems have tclConfig.sh installed even though Tcl C headers are missing. Optimized melm performance. Do not use sync(2) during commit (but rely on sync'd individual files). Fixed bug in ISAMB's utility function decode_ptr. With gcc -O3 on some platforms the src argument was not updated. Problem was compiler optimization due to strict aliasing rules. --- 2.0.2 2006/09/22 Bug fixes: #638, #647, #657, #669. Implement skip of 0 hit counts in scan. Useful for scan operations limited by a result set. Honor position attribute, i.e. allow first-in-field search. To enable this, "firstinfield 1" must be given for an index in default.idx. Enabled in tab/default.idx for w. At this stage first-in field is supported for phrase/and-list/or-list searches Common stream reader interface for record filters (struct ZebraRecStream). Debian package fix: packages idzebra-2.0 + libidzebra-2.0-modules did not depend properly on sub packages. --- 2.0.0 2006/08/14 New record filter (record type) 'alvis' which uses XSLT transformations to drive both indexing as well as retrieval. See example configuration in the 'example/alvis-oai' directory. 'isamb' is now the default ISAM system. In Zebra 1.3, the default ISAM was 'isamc'. The type used can still be configured with the 'isam' setting in 'zebra.cfg'. Index structure is now 64-bit based, also on 32 bit systems. There are no more 2GB register file limits. Extended search result tuning. Approximate limit for terms can be enabled and specified with attribute 11. The (approx or exact) hit count is returned as part of the search response as in 1.3 series. The subqueryID of a search term hit count can be specified with attribute 10. Zebra uses string attributes for indexing internally. Using set+numeric use attribute can still be used. This is a search-only conversion which inspects '*.att'-set files as indicated using attset-directives in 'zebra.cfg'. 'attset' references are no longer required, but when used they deserve as "check" for that the index names used are also present in '*.att'. Zebra record filters (record type handlers) may be built as loadable modules (.so's) on Unix. In particular the Zebra 2.0 Debian package uses separate packages for each of them. This also means that zebra programs such as zebraidx is no longer depending on Tcl/other.. Documentation updates, especially on query structure and syntax, SRU, XSLT support, alvis filter module, and many added examples. Improved logging of the 'zebrasrv' and 'zebraidx' binaries. Improved debian package structure. --- 1.3.16 2004/08/16 idzebra-2.0.44/idzebra.spec.in0000644000175000017500000000472111412332551013044 00000000000000Name: idzebra-2.0 Version: @VERSION@ Release: 1 Requires: lib%{name}-modules = %{version} License: GPL Group: Applications/Databases Vendor: Index Data ApS Source: idzebra-%{version}.tar.gz BuildRoot: %{_tmppath}/idzebra-%{version}-root Packager: Adam Dickmeiss URL: http://www.indexdata.dk/zebra/ BuildRequires: libyaz4-devel expat-devel bzip2-devel tcl zlib-devel Summary: High-performance, structured text indexing and retrival engine. %description Zebra is a high-performance, general-purpose structured text indexing and retrieval engine. It reads structured records in a variety of input formats (eg. email, XML, MARC) and allows access to them through exact boolean search expressions and relevance-ranked free-text queries. %package -n lib%{name} Summary: Zebra libraries Group: Libraries Requires: libyaz4 bzip2-libs %description -n lib%{name} Libraries for the Zebra search engine. %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %package -n lib%{name}-modules Summary: Zebra modules Group: Libraries Requires: lib%{name} = %{version} expat tcl %description -n lib%{name}-modules Modules for the Zebra search engine. %package -n lib%{name}-devel Summary: Zebra development libraries Group: Development/Libraries Requires: lib%{name} = %{version} libyaz4-devel bzip2-devel %description -n lib%{name}-devel Development libraries for the Zebra search engine. %prep %setup -n idzebra-%{version} %build CFLAGS="$RPM_OPT_FLAGS" \ ./configure --prefix=/usr --enable-shared --with-yaz=/usr/bin make CFLAGS="$RPM_OPT_FLAGS" %install rm -fr ${RPM_BUILD_ROOT} make prefix=${RPM_BUILD_ROOT}/usr mandir=${RPM_BUILD_ROOT}/usr/share/man install rm ${RPM_BUILD_ROOT}/usr/lib/*.la rm ${RPM_BUILD_ROOT}/usr/bin/zebraidx rm ${RPM_BUILD_ROOT}/usr/share/man/man1/zebraidx.* rm ${RPM_BUILD_ROOT}/usr/bin/zebrasrv rm ${RPM_BUILD_ROOT}/usr/share/man/man8/zebrasrv.* rm ${RPM_BUILD_ROOT}/usr/share/man/man1/idzebra-config.* %clean rm -fr ${RPM_BUILD_ROOT} %files %defattr(-,root,root) %doc README LICENSE.zebra NEWS %config /usr/share/idzebra-2.0/tab /usr/bin/zebrasrv-* /usr/bin/zebraidx-* /usr/share/doc/idzebra-2.0 /usr/share/man/*/zebraidx-* /usr/share/man/*/zebrasrv-* /usr/share/idzebra-2.0-examples %files -n lib%{name} /usr/lib/*.so.* %files -n lib%{name}-modules /usr/lib/idzebra-2.0/modules/* %files -n lib%{name}-devel /usr/bin/idzebra-config-* /usr/include/idzebra-2.0/* /usr/lib/*.so /usr/lib/*.a /usr/share/man/*/idzebra-config-* /usr/share/aclocal/*.m4 idzebra-2.0.44/isamc/0000755000175000017500000000000011412336534011320 500000000000000idzebra-2.0.44/isamc/merge.c0000644000175000017500000004042111412332551012477 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include "isamc-p.h" struct isamc_merge_block { int offset; /* offset in r_buf */ zint block; /* block number of file (0 if none) */ int dirty; /* block is different from that on file */ }; #if 0 static void opt_blocks (ISAMC is, struct isamc_merge_block *mb, int ptr, int last) { int i, no_dirty = 0; for (i = 0; i mb[j].block) j_min = j; } assert (j_min >= 0); tmp = mb[j_min].block; mb[j_min].block = mb[i].block; mb[i].block = tmp; mb[i].dirty = 1; } if (!last) mb[i].dirty = 1; } #endif static void flush_blocks (ISAMC is, struct isamc_merge_block *mb, int ptr, char *r_buf, zint *firstpos, int cat, int last, zint *numkeys) { int i; for (i = 0; imethod->debug > 2) yaz_log (YLOG_LOG, "isc: skip ptr=%d size=%d %d " ZINT_FORMAT, i, ssize, cat, mb[i].block); ++(is->files[cat].no_skip_writes); continue; } /* write block */ if (!*firstpos) { *firstpos = mb[i].block; src = r_buf + mb[i].offset - ISAMC_BLOCK_OFFSET_1; ssize += ISAMC_BLOCK_OFFSET_1; memcpy (src+sizeof(zint)+sizeof(ssize), numkeys, sizeof(*numkeys)); if (is->method->debug > 2) yaz_log (YLOG_LOG, "isc: flush ptr=%d numk=" ZINT_FORMAT " size=%d nextpos=" ZINT_FORMAT, i, *numkeys, (int) ssize, mb[i+1].block); } else { src = r_buf + mb[i].offset - ISAMC_BLOCK_OFFSET_N; ssize += ISAMC_BLOCK_OFFSET_N; if (is->method->debug > 2) yaz_log (YLOG_LOG, "isc: flush ptr=%d size=%d nextpos=" ZINT_FORMAT, i, (int) ssize, mb[i+1].block); } memcpy (src, &mb[i+1].block, sizeof(zint)); memcpy (src+sizeof(zint), &ssize, sizeof(ssize)); isamc_write_block (is, cat, mb[i].block, src); } } static int get_border (ISAMC is, struct isamc_merge_block *mb, zint ptr, int cat, zint firstpos) { /* Border set to initial fill or block size depending on whether we are creating a new one or updating and old one. */ int fill = mb[ptr].block ? is->method->filecat[cat].bsize : is->method->filecat[cat].ifill; int off = (ptr||firstpos) ? ISAMC_BLOCK_OFFSET_N : ISAMC_BLOCK_OFFSET_1; assert (ptr < 199); return mb[ptr].offset + fill - off; } void isamc_merge (ISAMC is, ISAM_P *ipos, ISAMC_I *data) { char i_item[128], *i_item_ptr; int i_more, i_mode, i; ISAMC_PP pp; char f_item[128], *f_item_ptr; int f_more; int last_dirty = 0; int debug = is->method->debug; struct isamc_merge_block mb[200]; zint firstpos = 0; int cat = 0; char r_item_buf[128]; /* temporary result output */ char *r_buf; /* block with resulting data */ int r_offset = 0; /* current offset in r_buf */ int ptr = 0; /* pointer */ void *r_clientData; /* encode client data */ zint border; zint numKeys = 0; r_clientData = (*is->method->codec.start)(); r_buf = is->merge_buf + 128; pp = isamc_pp_open (is, *ipos); /* read first item from file. make sure f_more indicates no boundary */ f_item_ptr = f_item; f_more = isamc_read_item (pp, &f_item_ptr); if (f_more > 0) f_more = 1; cat = pp->cat; if (debug > 1) yaz_log (YLOG_LOG, "isc: isamc_merge begin %d " ZINT_FORMAT, cat, pp->pos); /* read first item from i */ i_item_ptr = i_item; i_more = (*data->read_item)(data->clientData, &i_item_ptr, &i_mode); mb[ptr].block = pp->pos; /* is zero if no block on disk */ mb[ptr].dirty = 0; mb[ptr].offset = 0; border = get_border (is, mb, ptr, cat, firstpos); while (i_more || f_more) { char *r_item = r_item_buf; int cmp; if (f_more > 1) { /* block to block boundary in the original file. */ f_more = 1; if (cat == pp->cat) { /* the resulting output is of the same category as the the original */ if (r_offset <= mb[ptr].offset +is->method->filecat[cat].mfill) { /* the resulting output block is too small/empty. Delete the original (if any) */ if (debug > 3) yaz_log (YLOG_LOG, "isc: release A"); if (mb[ptr].block) isamc_release_block (is, pp->cat, mb[ptr].block); mb[ptr].block = pp->pos; if (!mb[ptr].dirty) mb[ptr].dirty = 1; if (ptr > 0) mb[ptr-1].dirty = 1; } else { /* indicate new boundary based on the original file */ mb[++ptr].block = pp->pos; mb[ptr].dirty = last_dirty; mb[ptr].offset = r_offset; if (debug > 3) yaz_log (YLOG_LOG, "isc: bound ptr=%d,offset=%d", ptr, r_offset); if (cat==is->max_cat && ptr >= is->method->max_blocks_mem) { /* We are dealing with block(s) of max size. Block(s) except 1 will be flushed. */ if (debug > 2) yaz_log (YLOG_LOG, "isc: flush A %d sections", ptr); flush_blocks (is, mb, ptr-1, r_buf, &firstpos, cat, 0, &pp->numKeys); mb[0].block = mb[ptr-1].block; mb[0].dirty = mb[ptr-1].dirty; memcpy (r_buf, r_buf + mb[ptr-1].offset, mb[ptr].offset - mb[ptr-1].offset); mb[0].offset = 0; mb[1].block = mb[ptr].block; mb[1].dirty = mb[ptr].dirty; mb[1].offset = mb[ptr].offset - mb[ptr-1].offset; ptr = 1; r_offset = mb[ptr].offset; } } } border = get_border (is, mb, ptr, cat, firstpos); } last_dirty = 0; if (!f_more) cmp = -1; else if (!i_more) cmp = 1; else cmp = (*is->method->compare_item)(i_item, f_item); if (cmp == 0) /* insert i=f */ { if (!i_mode) /* delete item? */ { /* move i */ i_item_ptr = i_item; i_more = (*data->read_item)(data->clientData, &i_item_ptr, &i_mode); /* is next input item the same as current except for the delete flag? */ cmp = (*is->method->compare_item)(i_item, f_item); if (!cmp && i_mode) /* delete/insert nop? */ { /* yes! insert as if it was an insert only */ memcpy (r_item, i_item, i_item_ptr - i_item); i_item_ptr = i_item; i_more = (*data->read_item)(data->clientData, &i_item_ptr, &i_mode); } else { /* no! delete the item */ r_item = NULL; last_dirty = 1; mb[ptr].dirty = 2; } } else { memcpy (r_item, f_item, f_item_ptr - f_item); /* move i */ i_item_ptr = i_item; i_more = (*data->read_item)(data->clientData, &i_item_ptr, &i_mode); } /* move f */ f_item_ptr = f_item; f_more = isamc_read_item (pp, &f_item_ptr); } else if (cmp > 0) /* insert f */ { memcpy (r_item, f_item, f_item_ptr - f_item); /* move f */ f_item_ptr = f_item; f_more = isamc_read_item (pp, &f_item_ptr); } else /* insert i */ { if (!i_mode) /* delete item which isn't there? */ { yaz_log (YLOG_FATAL, "Inconsistent register at offset %d", r_offset); abort (); } memcpy (r_item, i_item, i_item_ptr - i_item); mb[ptr].dirty = 2; last_dirty = 1; /* move i */ i_item_ptr = i_item; i_more = (*data->read_item)(data->clientData, &i_item_ptr, &i_mode); } if (r_item) /* insert resulting item? */ { char *r_out_ptr = r_buf + r_offset; const char *src = r_item; int new_offset; (*is->method->codec.encode)(r_clientData, &r_out_ptr, &src); new_offset = r_out_ptr - r_buf; numKeys++; if (border < new_offset && border >= r_offset) { if (debug > 2) yaz_log (YLOG_LOG, "isc: border %d " ZINT_FORMAT, ptr, border); /* Max size of current block category reached ... make new virtual block entry */ mb[++ptr].block = 0; mb[ptr].dirty = 1; mb[ptr].offset = r_offset; if (cat == is->max_cat && ptr >= is->method->max_blocks_mem) { /* We are dealing with block(s) of max size. Block(s) except one will be flushed. Note: the block(s) are surely not the last one(s). */ if (debug > 2) yaz_log (YLOG_LOG, "isc: flush B %d sections", ptr-1); flush_blocks (is, mb, ptr-1, r_buf, &firstpos, cat, 0, &pp->numKeys); mb[0].block = mb[ptr-1].block; mb[0].dirty = mb[ptr-1].dirty; memcpy (r_buf, r_buf + mb[ptr-1].offset, mb[ptr].offset - mb[ptr-1].offset); mb[0].offset = 0; mb[1].block = mb[ptr].block; mb[1].dirty = mb[0].dirty; mb[1].offset = mb[ptr].offset - mb[ptr-1].offset; memcpy (r_buf + mb[1].offset, r_buf + r_offset, new_offset - r_offset); new_offset = (new_offset - r_offset) + mb[1].offset; ptr = 1; } border = get_border (is, mb, ptr, cat, firstpos); } r_offset = new_offset; } if (cat < is->max_cat && ptr >= is->method->filecat[cat].mblocks) { /* Max number blocks in current category reached -> must switch to next category (with larger block size) */ int j = 0; (is->files[cat].no_remap)++; /* delete all original block(s) read so far */ for (i = 0; i < ptr; i++) if (mb[i].block) isamc_release_block (is, pp->cat, mb[i].block); /* also delete all block to be read in the future */ pp->deleteFlag = 1; /* remap block offsets */ assert (mb[j].offset == 0); cat++; mb[j].dirty = 1; mb[j].block = 0; mb[ptr].offset = r_offset; for (i = 1; i < ptr; i++) { int border = is->method->filecat[cat].ifill - ISAMC_BLOCK_OFFSET_1 + mb[j].offset; if (debug > 3) yaz_log (YLOG_LOG, "isc: remap %d border=%d", i, border); if (mb[i+1].offset > border && mb[i].offset <= border) { if (debug > 3) yaz_log (YLOG_LOG, "isc: to %d %d", j, mb[i].offset); mb[++j].dirty = 1; mb[j].block = 0; mb[j].offset = mb[i].offset; } } if (debug > 2) yaz_log (YLOG_LOG, "isc: remap from %d to %d sections to cat %d", ptr, j, cat); ptr = j; border = get_border (is, mb, ptr, cat, firstpos); if (debug > 3) yaz_log (YLOG_LOG, "isc: border=" ZINT_FORMAT " r_offset=%d", border, r_offset); } } if (mb[ptr].offset < r_offset) { /* make the final boundary offset */ mb[++ptr].dirty = 1; mb[ptr].block = 0; mb[ptr].offset = r_offset; } else { /* empty output. Release last block if any */ if (cat == pp->cat && mb[ptr].block) { if (debug > 3) yaz_log (YLOG_LOG, "isc: release C"); isamc_release_block (is, pp->cat, mb[ptr].block); mb[ptr].block = 0; if (ptr > 0) mb[ptr-1].dirty = 1; } } if (debug > 2) yaz_log (YLOG_LOG, "isc: flush C, %d sections", ptr); if (firstpos) { /* we have to patch initial block with num keys if that has changed */ if (numKeys != isamc_pp_num (pp)) { if (debug > 2) yaz_log (YLOG_LOG, "isc: patch num keys firstpos=" ZINT_FORMAT " num=" ZINT_FORMAT, firstpos, numKeys); bf_write (is->files[cat].bf, firstpos, ISAMC_BLOCK_OFFSET_N, sizeof(numKeys), &numKeys); } } else if (ptr > 0) { /* we haven't flushed initial block yet and there surely are some blocks to flush. Make first block dirty if numKeys differ */ if (numKeys != isamc_pp_num (pp)) mb[0].dirty = 1; } /* flush rest of block(s) in r_buf */ flush_blocks (is, mb, ptr, r_buf, &firstpos, cat, 1, &numKeys); (*is->method->codec.stop)(r_clientData); if (!firstpos) cat = 0; if (debug > 1) yaz_log (YLOG_LOG, "isc: isamc_merge return %d " ZINT_FORMAT, cat, firstpos); isamc_pp_close (pp); *ipos = cat + firstpos * 8; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/isamc/isamc.c0000644000175000017500000004060711412332551012502 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* * TODO: * Reduction to lower categories in isamc_merge */ #include #include #include #include #include #include #include "isamc-p.h" static void flush_block (ISAMC is, int cat); static void release_fc (ISAMC is, int cat); static void init_fc (ISAMC is, int cat); #define ISAMC_FREELIST_CHUNK 0 #define SMALL_TEST 0 void isamc_getmethod (ISAMC_M *m) { static struct ISAMC_filecat_s def_cat[] = { #if SMALL_TEST { 32, 28, 0, 3 }, { 64, 54, 30, 0 }, #else { 64, 56, 40, 5 }, { 128, 120, 100, 10 }, { 512, 490, 350, 10 }, { 2048, 1900, 1700, 10 }, { 8192, 8000, 7900, 10 }, { 32768, 32000, 31000, 0 }, #endif }; m->filecat = def_cat; m->codec.start = NULL; m->codec.decode = NULL; m->codec.encode = NULL; m->codec.stop = NULL; m->codec.reset = NULL; m->compare_item = NULL; m->log_item = NULL; m->debug = 1; m->max_blocks_mem = 10; } ISAMC isamc_open (BFiles bfs, const char *name, int writeflag, ISAMC_M *method) { ISAMC is; ISAMC_filecat filecat; int i = 0; int max_buf_size = 0; is = (ISAMC) xmalloc (sizeof(*is)); is->method = (ISAMC_M *) xmalloc (sizeof(*is->method)); memcpy (is->method, method, sizeof(*method)); filecat = is->method->filecat; assert (filecat); /* determine number of block categories */ if (is->method->debug) yaz_log (YLOG_LOG, "isc: bsize ifill mfill mblocks"); do { if (is->method->debug) yaz_log (YLOG_LOG, "isc:%6d %6d %6d %6d", filecat[i].bsize, filecat[i].ifill, filecat[i].mfill, filecat[i].mblocks); if (max_buf_size < filecat[i].mblocks * filecat[i].bsize) max_buf_size = filecat[i].mblocks * filecat[i].bsize; } while (filecat[i++].mblocks); is->no_files = i; is->max_cat = --i; /* max_buf_size is the larget buffer to be used during merge */ max_buf_size = (1 + max_buf_size / filecat[i].bsize) * filecat[i].bsize; if (max_buf_size < (1+is->method->max_blocks_mem) * filecat[i].bsize) max_buf_size = (1+is->method->max_blocks_mem) * filecat[i].bsize; if (is->method->debug) yaz_log (YLOG_LOG, "isc: max_buf_size %d", max_buf_size); assert (is->no_files > 0); is->files = (ISAMC_file) xmalloc (sizeof(*is->files)*is->no_files); if (writeflag) { is->merge_buf = (char *) xmalloc (max_buf_size+256); memset (is->merge_buf, 0, max_buf_size+256); } else is->merge_buf = NULL; for (i = 0; ino_files; i++) { is->files[i].bf = 0; is->files[i].head_is_dirty = 0; is->files[i].head.lastblock = 1; is->files[i].head.freelist = 0; is->files[i].alloc_entries_num = 0; is->files[i].alloc_entries_max = is->method->filecat[i].bsize / sizeof(zint) - 1; is->files[i].alloc_buf = (char *) xmalloc (is->method->filecat[i].bsize); is->files[i].no_writes = 0; is->files[i].no_reads = 0; is->files[i].no_skip_writes = 0; is->files[i].no_allocated = 0; is->files[i].no_released = 0; is->files[i].no_remap = 0; is->files[i].no_forward = 0; is->files[i].no_backward = 0; is->files[i].sum_forward = 0; is->files[i].sum_backward = 0; is->files[i].no_next = 0; is->files[i].no_prev = 0; init_fc (is, i); } for (i = 0; ino_files; i++) { char fname[FILENAME_MAX]; int r; sprintf (fname, "%s%c", name, i+'A'); is->files[i].bf = bf_open (bfs, fname, is->method->filecat[i].bsize, writeflag); if (!is->files[i].bf) { isamc_close(is); return 0; } r = bf_read(is->files[i].bf, 0, 0, sizeof(ISAMC_head), &is->files[i].head); if (r == -1) { isamc_close(is); return 0; } } return is; } zint isamc_block_used (ISAMC is, int type) { if (type < 0 || type >= is->no_files) return -1; return is->files[type].head.lastblock-1; } int isamc_block_size (ISAMC is, int type) { ISAMC_filecat filecat = is->method->filecat; if (type < 0 || type >= is->no_files) return -1; return filecat[type].bsize; } int isamc_close (ISAMC is) { int i; if (is->method->debug) { yaz_log (YLOG_LOG, "isc: next forw mid-f prev backw mid-b"); for (i = 0; ino_files; i++) yaz_log (YLOG_LOG, "isc:%8d%8d%8.1f%8d%8d%8.1f", is->files[i].no_next, is->files[i].no_forward, is->files[i].no_forward ? (double) is->files[i].sum_forward/is->files[i].no_forward : 0.0, is->files[i].no_prev, is->files[i].no_backward, is->files[i].no_backward ? (double) is->files[i].sum_backward/is->files[i].no_backward : 0.0); } if (is->method->debug) yaz_log (YLOG_LOG, "isc: writes reads skipped alloc released remap"); for (i = 0; ino_files; i++) { release_fc (is, i); if (is->method->debug) yaz_log (YLOG_LOG, "isc:%8d%8d%8d%8d%8d%8d", is->files[i].no_writes, is->files[i].no_reads, is->files[i].no_skip_writes, is->files[i].no_allocated, is->files[i].no_released, is->files[i].no_remap); if (is->files[i].bf) { if (is->files[i].head_is_dirty) bf_write (is->files[i].bf, 0, 0, sizeof(ISAMC_head), &is->files[i].head); flush_block (is, i); bf_close (is->files[i].bf); } xfree(is->files[i].fc_list); xfree(is->files[i].alloc_buf); } xfree (is->files); xfree (is->merge_buf); xfree (is->method); xfree (is); return 0; } int isamc_read_block (ISAMC is, int cat, zint pos, char *dst) { ++(is->files[cat].no_reads); return bf_read (is->files[cat].bf, pos, 0, 0, dst); } int isamc_write_block (ISAMC is, int cat, zint pos, char *src) { ++(is->files[cat].no_writes); if (is->method->debug > 2) yaz_log (YLOG_LOG, "isc: write_block %d " ZINT_FORMAT, cat, pos); return bf_write (is->files[cat].bf, pos, 0, 0, src); } int isamc_write_dblock (ISAMC is, int cat, zint pos, char *src, zint nextpos, int offset) { ISAMC_BLOCK_SIZE size = offset + ISAMC_BLOCK_OFFSET_N; if (is->method->debug > 2) yaz_log (YLOG_LOG, "isc: write_dblock. size=%d nextpos=" ZINT_FORMAT, (int) size, nextpos); src -= ISAMC_BLOCK_OFFSET_N; memcpy (src, &nextpos, sizeof(nextpos)); memcpy (src + sizeof(nextpos), &size, sizeof(size)); return isamc_write_block (is, cat, pos, src); } #if ISAMC_FREELIST_CHUNK static void flush_block (ISAMC is, int cat) { char *abuf = is->files[cat].alloc_buf; zint block = is->files[cat].head.freelist; if (block && is->files[cat].alloc_entries_num) { memcpy (abuf, &is->files[cat].alloc_entries_num, sizeof(block)); bf_write (is->files[cat].bf, block, 0, 0, abuf); is->files[cat].alloc_entries_num = 0; } } static zint alloc_block (ISAMC is, int cat) { zint block = is->files[cat].head.freelist; char *abuf = is->files[cat].alloc_buf; (is->files[cat].no_allocated)++; if (!block) { block = (is->files[cat].head.lastblock)++; /* no free list */ is->files[cat].head_is_dirty = 1; } else { if (!is->files[cat].alloc_entries_num) /* read first time */ { bf_read (is->files[cat].bf, block, 0, 0, abuf); memcpy (&is->files[cat].alloc_entries_num, abuf, sizeof(is->files[cat].alloc_entries_num)); assert (is->files[cat].alloc_entries_num > 0); } /* have some free blocks now */ assert (is->files[cat].alloc_entries_num > 0); is->files[cat].alloc_entries_num--; if (!is->files[cat].alloc_entries_num) /* last one in block? */ { memcpy (&is->files[cat].head.freelist, abuf + sizeof(int), sizeof(zint)); is->files[cat].head_is_dirty = 1; if (is->files[cat].head.freelist) { bf_read (is->files[cat].bf, is->files[cat].head.freelist, 0, 0, abuf); memcpy (&is->files[cat].alloc_entries_num, abuf, sizeof(is->files[cat].alloc_entries_num)); assert (is->files[cat].alloc_entries_num); } } else memcpy (&block, abuf + sizeof(zint) + sizeof(int) * is->files[cat].alloc_entries_num, sizeof(zint)); } return block; } static void release_block (ISAMC is, int cat, zint pos) { char *abuf = is->files[cat].alloc_buf; zint block = is->files[cat].head.freelist; (is->files[cat].no_released)++; if (block && !is->files[cat].alloc_entries_num) /* must read block */ { bf_read (is->files[cat].bf, block, 0, 0, abuf); memcpy (&is->files[cat].alloc_entries_num, abuf, sizeof(is->files[cat].alloc_entries_num)); assert (is->files[cat].alloc_entries_num > 0); } assert (is->files[cat].alloc_entries_num <= is->files[cat].alloc_entries_max); if (is->files[cat].alloc_entries_num == is->files[cat].alloc_entries_max) { assert (block); memcpy (abuf, &is->files[cat].alloc_entries_num, sizeof(int)); bf_write (is->files[cat].bf, block, 0, 0, abuf); is->files[cat].alloc_entries_num = 0; } if (!is->files[cat].alloc_entries_num) /* make new buffer? */ { memcpy (abuf + sizeof(int), &block, sizeof(zint)); is->files[cat].head.freelist = pos; is->files[cat].head_is_dirty = 1; } else { memcpy (abuf + sizeof(int) + is->files[cat].alloc_entries_num*sizeof(zint), &pos, sizeof(zint)); } is->files[cat].alloc_entries_num++; } #else static void flush_block (ISAMC is, int cat) { } static zint alloc_block (ISAMC is, int cat) { zint block; char buf[sizeof(zint)]; is->files[cat].head_is_dirty = 1; (is->files[cat].no_allocated)++; if ((block = is->files[cat].head.freelist)) { bf_read (is->files[cat].bf, block, 0, sizeof(zint), buf); memcpy (&is->files[cat].head.freelist, buf, sizeof(zint)); } else block = (is->files[cat].head.lastblock)++; return block; } static void release_block (ISAMC is, int cat, zint pos) { char buf[sizeof(zint)]; (is->files[cat].no_released)++; is->files[cat].head_is_dirty = 1; memcpy (buf, &is->files[cat].head.freelist, sizeof(zint)); is->files[cat].head.freelist = pos; bf_write (is->files[cat].bf, pos, 0, sizeof(zint), buf); } #endif zint isamc_alloc_block (ISAMC is, int cat) { zint block = 0; if (is->files[cat].fc_list) { int j; zint nb; for (j = 0; j < is->files[cat].fc_max; j++) if ((nb = is->files[cat].fc_list[j]) && (!block || nb < block)) { is->files[cat].fc_list[j] = 0; block = nb; break; } } if (!block) block = alloc_block (is, cat); if (is->method->debug > 3) yaz_log (YLOG_LOG, "isc: alloc_block in cat %d: " ZINT_FORMAT, cat, block); return block; } void isamc_release_block (ISAMC is, int cat, zint pos) { if (is->method->debug > 3) yaz_log (YLOG_LOG, "isc: release_block in cat %d:" ZINT_FORMAT, cat, pos); if (is->files[cat].fc_list) { int j; for (j = 0; jfiles[cat].fc_max; j++) if (!is->files[cat].fc_list[j]) { is->files[cat].fc_list[j] = pos; return; } } release_block (is, cat, pos); } static void init_fc (ISAMC is, int cat) { int j = 100; is->files[cat].fc_max = j; is->files[cat].fc_list = (zint *) xmalloc (sizeof(*is->files[0].fc_list) * j); while (--j >= 0) is->files[cat].fc_list[j] = 0; } static void release_fc (ISAMC is, int cat) { int j = is->files[cat].fc_max; zint b; while (--j >= 0) if ((b = is->files[cat].fc_list[j])) { release_block (is, cat, b); is->files[cat].fc_list[j] = 0; } } void isamc_pp_close (ISAMC_PP pp) { ISAMC is = pp->is; (*is->method->codec.stop)(pp->decodeClientData); xfree (pp->buf); xfree (pp); } ISAMC_PP isamc_pp_open (ISAMC is, ISAM_P ipos) { ISAMC_PP pp = (ISAMC_PP) xmalloc (sizeof(*pp)); char *src; pp->cat = (int) isamc_type(ipos); pp->pos = isamc_block(ipos); src = pp->buf = (char *) xmalloc (is->method->filecat[pp->cat].bsize); pp->next = 0; pp->size = 0; pp->offset = 0; pp->is = is; pp->decodeClientData = (*is->method->codec.start)(); pp->deleteFlag = 0; pp->numKeys = 0; if (pp->pos) { src = pp->buf; isamc_read_block (is, pp->cat, pp->pos, src); memcpy (&pp->next, src, sizeof(pp->next)); src += sizeof(pp->next); memcpy (&pp->size, src, sizeof(pp->size)); src += sizeof(pp->size); memcpy (&pp->numKeys, src, sizeof(pp->numKeys)); src += sizeof(pp->numKeys); if (pp->next == pp->pos) { yaz_log(YLOG_FATAL|YLOG_LOG, "pp->next = " ZINT_FORMAT, pp->next); yaz_log(YLOG_FATAL|YLOG_LOG, "pp->pos = " ZINT_FORMAT, pp->pos); assert (pp->next != pp->pos); } pp->offset = src - pp->buf; assert (pp->offset == ISAMC_BLOCK_OFFSET_1); if (is->method->debug > 2) yaz_log (YLOG_LOG, "isc: read_block size=%d %d " ZINT_FORMAT " next=" ZINT_FORMAT, pp->size, pp->cat, pp->pos, pp->next); } return pp; } /* returns non-zero if item could be read; 0 otherwise */ int isamc_pp_read (ISAMC_PP pp, void *buf) { char *cp = buf; return isamc_read_item (pp, &cp); } /* read one item from file - decode and store it in *dst. Returns 0 if end-of-file 1 if item could be read ok and NO boundary 2 if item could be read ok and boundary */ int isamc_read_item (ISAMC_PP pp, char **dst) { ISAMC is = pp->is; const char *src = pp->buf + pp->offset; if (pp->offset >= pp->size) { if (!pp->next) { pp->pos = 0; return 0; /* end of file */ } if (pp->next > pp->pos) { if (pp->next == pp->pos + 1) is->files[pp->cat].no_next++; else { is->files[pp->cat].no_forward++; is->files[pp->cat].sum_forward += pp->next - pp->pos; } } else { if (pp->next + 1 == pp->pos) is->files[pp->cat].no_prev++; else { is->files[pp->cat].no_backward++; is->files[pp->cat].sum_backward += pp->pos - pp->next; } } /* out new block position */ pp->pos = pp->next; src = pp->buf; /* read block and save 'next' and 'size' entry */ isamc_read_block (is, pp->cat, pp->pos, pp->buf); memcpy (&pp->next, src, sizeof(pp->next)); src += sizeof(pp->next); memcpy (&pp->size, src, sizeof(pp->size)); src += sizeof(pp->size); /* assume block is non-empty */ assert (src - pp->buf == ISAMC_BLOCK_OFFSET_N); if (pp->next == pp->pos) { yaz_log(YLOG_FATAL|YLOG_LOG, "pp->next = " ZINT_FORMAT, pp->next); yaz_log(YLOG_FATAL|YLOG_LOG, "pp->pos = " ZINT_FORMAT, pp->pos); assert (pp->next != pp->pos); } if (pp->deleteFlag) isamc_release_block (is, pp->cat, pp->pos); (*is->method->codec.decode)(pp->decodeClientData, dst, &src); pp->offset = src - pp->buf; if (is->method->debug > 2) yaz_log (YLOG_LOG, "isc: read_block size=%d %d " ZINT_FORMAT " next=" ZINT_FORMAT, pp->size, pp->cat, pp->pos, pp->next); return 2; } (*is->method->codec.decode)(pp->decodeClientData, dst, &src); pp->offset = src - pp->buf; return 1; } zint isamc_pp_num (ISAMC_PP pp) { return pp->numKeys; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/isamc/isamc-p.h0000644000175000017500000000472411412332551012744 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include YAZ_BEGIN_CDECL typedef struct { zint lastblock; zint freelist; } ISAMC_head; typedef unsigned ISAMC_BLOCK_SIZE; typedef struct ISAMC_file_s { ISAMC_head head; BFile bf; int head_is_dirty; int no_writes; int no_reads; int no_skip_writes; int no_allocated; int no_released; int no_remap; int no_forward; int no_backward; zint sum_forward; zint sum_backward; int no_next; int no_prev; char *alloc_buf; int alloc_entries_num; int alloc_entries_max; int fc_max; zint *fc_list; } *ISAMC_file; struct ISAMC_s { int no_files; int max_cat; char *merge_buf; ISAMC_M *method; ISAMC_file files; }; struct ISAMC_PP_s { char *buf; ISAMC_BLOCK_SIZE offset; ISAMC_BLOCK_SIZE size; int cat; zint pos; zint next; ISAMC is; void *decodeClientData; int deleteFlag; zint numKeys; }; /* first block consists of next pointer : zint size : ISAMC_BLOCK_SIZE (int) numkeys : zint data other blocks consists of next pointer : zint size : ISAMC_BLOCK_SIZE (int) data */ #define ISAMC_BLOCK_OFFSET_1 (sizeof(zint)+sizeof(ISAMC_BLOCK_SIZE)+sizeof(zint)) #define ISAMC_BLOCK_OFFSET_N (sizeof(zint)+sizeof(ISAMC_BLOCK_SIZE)) zint isamc_alloc_block (ISAMC is, int cat); void isamc_release_block (ISAMC is, int cat, zint pos); int isamc_read_block (ISAMC is, int cat, zint pos, char *dst); int isamc_write_block (ISAMC is, int cat, zint pos, char *src); YAZ_END_CDECL /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/isamc/Makefile.am0000644000175000017500000000035611412332551013273 00000000000000 noinst_LTLIBRARIES = libidzebra-isamc.la libidzebra_isamc_la_SOURCES = isamc.c merge.c isamc-p.h AM_CPPFLAGS = -I$(srcdir)/../include -I$(srcdir)/../index $(YAZINC) LDADD = ../util/libutil.a ../bfile/libbfile.a libisamc.a $(YAZLALIB) idzebra-2.0.44/isamc/Makefile.in0000644000175000017500000003556111412336425013316 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = isamc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libidzebra_isamc_la_LIBADD = am_libidzebra_isamc_la_OBJECTS = isamc.lo merge.lo libidzebra_isamc_la_OBJECTS = $(am_libidzebra_isamc_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libidzebra_isamc_la_SOURCES) DIST_SOURCES = $(libidzebra_isamc_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ noinst_LTLIBRARIES = libidzebra-isamc.la libidzebra_isamc_la_SOURCES = isamc.c merge.c isamc-p.h AM_CPPFLAGS = -I$(srcdir)/../include -I$(srcdir)/../index $(YAZINC) LDADD = ../util/libutil.a ../bfile/libbfile.a libisamc.a $(YAZLALIB) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu isamc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu isamc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libidzebra-isamc.la: $(libidzebra_isamc_la_OBJECTS) $(libidzebra_isamc_la_DEPENDENCIES) $(LINK) $(libidzebra_isamc_la_OBJECTS) $(libidzebra_isamc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isamc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/merge.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/config/0000755000175000017500000000000011412336534011471 500000000000000idzebra-2.0.44/config/missing0000755000175000017500000002623311331674343013021 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: idzebra-2.0.44/config/depcomp0000755000175000017500000004426711331674343013006 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: idzebra-2.0.44/config/config.guess0000755000175000017500000013105411274160642013736 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd | genuineintel) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: idzebra-2.0.44/config/config.sub0000755000175000017500000010242511274160642013401 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-06-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: idzebra-2.0.44/config/ltmain.sh0000755000175000017500000073341511321061701013237 00000000000000# Generated from ltmain.m4sh. # ltmain.sh (GNU libtool) 2.2.6b # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print informational messages (default) # --version print version information # -h, --help print short or long help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . PROGRAM=ltmain.sh PACKAGE=libtool VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" TIMESTAMP="" package_revision=1.3017 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # NLS nuisances: We save the old values to restore during execute mode. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done $lt_unset CDPATH : ${CP="cp -f"} : ${ECHO="echo"} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # Generated shell functions inserted here. # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: # In the unlikely event $progname began with a '-', it would play havoc with # func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result case $progname in -*) progname=./$progname ;; esac # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname${mode+: }$mode: $*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` done my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "X$my_tmpdir" | $Xsed } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "X$1" | $Xsed \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_version # Echo version message to standard output and exit. func_version () { $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $SED -n '/^# Usage:/,/# -h/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" $ECHO $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help # Echo long help message to standard output and exit. func_help () { $SED -n '/^# Usage:/,/# Report bugs to/ { s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p }' < "$progpath" exit $? } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { func_error "missing argument for $1" exit_cmd=exit } exit_cmd=: # Check that we have a working $ECHO. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then # Yippee, $ECHO works! : else # Restart under the correct shell, and then maybe $ECHO will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # Parse options once, thoroughly. This comes as soon as possible in # the script to make things like `libtool --version' happen quickly. { # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Parse non-mode specific arguments: while test "$#" -gt 0; do opt="$1" shift case $opt in --config) func_config ;; --debug) preserve_args="$preserve_args $opt" func_echo "enabling shell trace mode" opt_debug='set -x' $opt_debug ;; -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break execute_dlfiles="$execute_dlfiles $1" shift ;; --dry-run | -n) opt_dry_run=: ;; --features) func_features ;; --finish) mode="finish" ;; --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break case $1 in # Valid mode arguments: clean) ;; compile) ;; execute) ;; finish) ;; install) ;; link) ;; relink) ;; uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac mode="$1" shift ;; --preserve-dup-deps) opt_duplicate_deps=: ;; --quiet|--silent) preserve_args="$preserve_args $opt" opt_silent=: ;; --verbose| -v) preserve_args="$preserve_args $opt" opt_silent=false ;; --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break preserve_args="$preserve_args $opt $1" func_enable_tag "$1" # tagname is set here shift ;; # Separate optargs to long options: -dlopen=*|--mode=*|--tag=*) func_opt_split "$opt" set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} shift ;; -\?|-h) func_usage ;; --help) opt_help=: ;; --version) func_version ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) nonopt="$opt" break ;; esac done case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_duplicate_deps ;; esac # Having warned about all mis-specified options, bail out if # anything was wrong. $exit_cmd $EXIT_FAILURE } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } ## ----------- ## ## Main. ## ## ----------- ## $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi test -z "$mode" && func_fatal_error "error: you must specify a MODE." # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$mode' for more information." } # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_ltwrapper_scriptname_result="" if func_ltwrapper_executable_p "$1"; then func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" fi } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case "$@ " in " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T <?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi removelist="$removelist $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist removelist="$removelist $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir command="$command -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$mode'" ;; esac $ECHO $ECHO "Try \`$progname --help' for more information about other modes." exit $? } # Now that we've collected a possible --mode arg, show help if necessary $opt_help && func_mode_help # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $execute_dlfiles; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_quote_for_eval "$file" args="$args $func_quote_for_eval_result" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" $ECHO "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS $ECHO "X----------------------------------------------------------------------" | $Xsed $ECHO "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done $ECHO $ECHO "If you ever happen to want to link against installed libraries" $ECHO "in a given directory, LIBDIR, you must either use libtool, and" $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" $ECHO "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" $ECHO " during execution" fi if test -n "$runpath_var"; then $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" $ECHO " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $ECHO $ECHO "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" $ECHO "pages." ;; *) $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac $ECHO "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS } test "$mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $ECHO "X$nonopt" | $GREP shtool >/dev/null; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" install_prog="$install_prog$func_quote_for_eval_result" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" install_prog="$install_prog $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for progfile in $progfiles; do func_verbose "extracting global C symbols from \`$progfile'" $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" } done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" fi $ECHO >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; " case $host in *cygwin* | *mingw* | *cegcc* ) $ECHO >> "$output_objdir/$my_dlsyms" "\ /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */" lt_dlsym_const= ;; *osf5*) echo >> "$output_objdir/$my_dlsyms" "\ /* This system does not cope well with relocations in const data */" lt_dlsym_const= ;; *) lt_dlsym_const=const ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ extern $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) symtab_cflags="$symtab_cflags $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper_part1 [arg=no] # # Emit the first part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part1 () { func_emit_wrapper_part1_arg1=no if test -n "$1" ; then func_emit_wrapper_part1_arg1=$1 fi $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then ECHO=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then # Yippee, \$ECHO works! : else # Restart under the correct shell, and then maybe \$ECHO will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $ECHO "\ # Find the directory that this script lives in. thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done " } # end: func_emit_wrapper_part1 # func_emit_wrapper_part2 [arg=no] # # Emit the second part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part2 () { func_emit_wrapper_part2_arg1=no if test -n "$1" ; then func_emit_wrapper_part2_arg1=$1 fi $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # end: func_emit_wrapper_part2 # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=no if test -n "$1" ; then func_emit_wrapper_arg1=$1 fi # split this up so that func_emit_cwrapperexe_src # can call each part independently. func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" } # func_to_host_path arg # # Convert paths to host format when used with build tools. # Intended for use with "native" mingw (where libtool itself # is running under the msys shell), or in the following cross- # build environments: # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # where wine is equipped with the `winepath' executable. # In the native mingw case, the (msys) shell automatically # converts paths for any non-msys applications it launches, # but that facility isn't available from inside the cwrapper. # Similar accommodations are necessary for $host mingw and # $build cygwin. Calling this function does no harm for other # $host/$build combinations not listed above. # # ARG is the path (on $build) that should be converted to # the proper representation for $host. The result is stored # in $func_to_host_path_result. func_to_host_path () { func_to_host_path_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' case $build in *mingw* ) # actually, msys # awkward: cmd appends spaces to result lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_path_tmp1=`( cmd //c echo "$1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_path_tmp1=`cygpath -w "$1"` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # Unfortunately, winepath does not exit with a non-zero # error code, so we are forced to check the contents of # stdout. On the other hand, if the command is not # found, the shell will set an exit code of 127 and print # *an error message* to stdout. So we must check for both # error code of zero AND non-empty stdout, which explains # the odd construction: func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` else # Allow warning below. func_to_host_path_result="" fi ;; esac if test -z "$func_to_host_path_result" ; then func_error "Could not determine host path corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_path_result="$1" fi ;; esac fi } # end: func_to_host_path # func_to_host_pathlist arg # # Convert pathlists to host format when used with build tools. # See func_to_host_path(), above. This function supports the # following $build/$host combinations (but does no harm for # combinations not listed here): # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # # Path separators are also converted from $build format to # $host format. If ARG begins or ends with a path separator # character, it is preserved (but converted to $host format) # on output. # # ARG is a pathlist (on $build) that should be converted to # the proper representation on $host. The result is stored # in $func_to_host_pathlist_result. func_to_host_pathlist () { func_to_host_pathlist_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_to_host_pathlist_tmp2="$1" # Once set for this call, this variable should not be # reassigned. It is used in tha fallback case. func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e 's|^:*||' -e 's|:*$||'` case $build in *mingw* ) # Actually, msys. # Awkward: cmd appends spaces to result. lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # unfortunately, winepath doesn't convert pathlists func_to_host_pathlist_result="" func_to_host_pathlist_oldIFS=$IFS IFS=: for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do IFS=$func_to_host_pathlist_oldIFS if test -n "$func_to_host_pathlist_f" ; then func_to_host_path "$func_to_host_pathlist_f" if test -n "$func_to_host_path_result" ; then if test -z "$func_to_host_pathlist_result" ; then func_to_host_pathlist_result="$func_to_host_path_result" else func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" fi fi fi IFS=: done IFS=$func_to_host_pathlist_oldIFS ;; esac if test -z "$func_to_host_pathlist_result" ; then func_error "Could not determine the host path(s) corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This may break if $1 contains DOS-style drive # specifications. The fix is not to complicate the expression # below, but for the user to provide a working wine installation # with winepath so that path translation in the cross-to-mingw # case works properly. lt_replace_pathsep_nix_to_dos="s|:|;|g" func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_replace_pathsep_nix_to_dos"` fi # Now, add the leading and trailing path separators back case "$1" in :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" ;; esac case "$1" in *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" ;; esac ;; esac fi } # end: func_to_host_pathlist # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include # define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include # define HAVE_SETENV # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif # endif #endif #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif #ifdef _MSC_VER # define S_IXUSR _S_IEXEC # define stat _stat # ifndef _INTPTR_T_DEFINED # define intptr_t int # endif #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifdef __CYGWIN__ # define FOPEN_WB "wb" #endif #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #undef LTWRAPPER_DEBUGPRINTF #if defined DEBUGWRAPPER # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args static void ltwrapper_debugprintf (const char *fmt, ...) { va_list args; va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } #else # define LTWRAPPER_DEBUGPRINTF(args) #endif const char *program_name = NULL; void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_fatal (const char *message, ...); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_opt_process_env_set (const char *arg); void lt_opt_process_env_prepend (const char *arg); void lt_opt_process_env_append (const char *arg); int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); static const char *script_text_part1 = EOF func_emit_wrapper_part1 yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ "/' -e 's/$/\\n"/' echo ";" cat <"))); for (i = 0; i < newargc; i++) { LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); } EOF case $host_os in mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); return 127; } return rval; EOF ;; *) cat <<"EOF" execv (lt_argv_zero, newargz); return rval; /* =127, but avoids unused variable warning */ EOF ;; esac cat <<"EOF" } void * xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable (const char *path) { struct stat st; LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", tmp_pathspec)); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { char *errstr = strerror (errno); lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal ("Could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } void lt_setenv (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", (name ? name : ""), (value ? value : ""))); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } int lt_split_name_value (const char *arg, char** name, char** value) { const char *p; int len; if (!arg || !*arg) return 1; p = strchr (arg, (int)'='); if (!p) return 1; *value = xstrdup (++p); len = strlen (arg) - strlen (*value); *name = XMALLOC (char, len); strncpy (*name, arg, len-1); (*name)[len - 1] = '\0'; return 0; } void lt_opt_process_env_set (const char *arg) { char *name = NULL; char *value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); } lt_setenv (name, value); XFREE (name); XFREE (value); } void lt_opt_process_env_prepend (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); } new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_opt_process_env_append (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); } new_value = lt_extend_str (getenv (name), value, 1); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_update_exe_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF } # end: func_emit_cwrapperexe_src # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) deplibs="$deplibs $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) weak_libs="$weak_libs $arg" prev= continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname '-L' '' "$arg" dir=$func_stripname_result if test -z "$dir"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" linker_flags="$linker_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" compiler_flags="$compiler_flags $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_duplicate_deps ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= case $lib in *.la) func_source "$lib" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` case " $weak_libs " in *" $deplib_base "*) ;; *) deplibs="$deplibs $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" dir=$func_stripname_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $ECHO $ECHO "*** Warning: Trying to link with static lib archive $deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because the file extensions .$libext of this argument makes me believe" $ECHO "*** that it is just a static archive that I should not use here." else $ECHO $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) temp_rpath="$temp_rpath$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded notinst_deplibs="$notinst_deplibs $lib" need_relink=no ;; *) if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then $ECHO if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $ECHO $ECHO "*** And there doesn't seem to be a static archive available" $ECHO "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $ECHO $ECHO "*** Warning: This system can not link to static lib archive $lib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $ECHO "*** But as you try to build a module library, libtool will still create " $ECHO "*** a static module, that should work as long as the dlopening application" $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_dirname "$deplib" "" "." dir="$func_dirname_result" # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else $ECHO $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" libobjs="$libobjs $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` done fi if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | $GREP . >/dev/null; then $ECHO if test "X$deplibs_check_method" = "Xnone"; then $ECHO "*** Warning: inter-library dependencies are not supported in this platform." else $ECHO "*** Warning: inter-library dependencies are not known to be supported." fi $ECHO "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $ECHO $ECHO "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" $ECHO "*** a static module, that should work as long as the dlopening" $ECHO "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $ECHO "*** The inter-library dependencies that have been dropped here will be" $ECHO "*** automatically added whenever a program is linked with this library" $ECHO "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $ECHO $ECHO "*** Since this library must not contain undefined symbols," $ECHO "*** because either the platform does not support them or" $ECHO "*** it was explicitly requested with -no-undefined," $ECHO "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" delfiles="$delfiles $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" func_len " $cmd" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then func_show_eval "$cmd" 'exit $?' skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$ECHO "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" $ECHO 'INPUT (' > $output for obj in $save_libobjs do $ECHO "$obj" >> $output done $ECHO ')' >> $output delfiles="$delfiles $output" elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do $ECHO "$obj" >> $output done delfiles="$delfiles $output" output=$firstobj\"$file_list_spec$output\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=$obj func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi delfiles="$delfiles $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *cegcc) # Disable wrappers for cegcc, we are cross compiling anyway. wrappers_required=no ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $ECHO for shipping. if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then oldobjs="$oldobjs $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles oldobjs="$oldobjs $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else $ECHO "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlfiles="$newdlfiles $libdir/$name" ;; *) newdlfiles="$newdlfiles $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlprefiles="$newdlprefiles $libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$mode" = link || test "$mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) RM="$RM $arg"; rmforce=yes ;; -*) RM="$RM $arg" ;; *) files="$files $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi func_basename "$file" name="$func_basename_result" test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result rmfiles="$rmfiles $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$mode" = uninstall || test "$mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 idzebra-2.0.44/config/install-sh0000755000175000017500000003253711331674343013432 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: idzebra-2.0.44/util/0000755000175000017500000000000011412336534011201 500000000000000idzebra-2.0.44/util/tstflock.c0000644000175000017500000001313311412332551013112 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #if HAVE_SYS_TIME_H #include #endif #include #if HAVE_SYS_STAT_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_UNISTD_H #include #endif #if HAVE_SYS_WAIT_H #include #endif #include #ifdef WIN32 #include #endif #if YAZ_POSIX_THREADS #include #endif #ifdef WIN32 #include #include #endif #include #include static char seq[1000]; static char *seqp = 0; #define NUM_THREADS 100 #if YAZ_POSIX_THREADS pthread_cond_t sleep_cond = PTHREAD_COND_INITIALIZER; pthread_mutex_t sleep_mutex = PTHREAD_MUTEX_INITIALIZER; #endif int test_fd = 0; static void small_sleep(void) { #ifdef WIN32 Sleep(2); #else #if YAZ_POSIX_THREADS struct timespec abstime; struct timeval now; gettimeofday(&now, 0); abstime.tv_sec = now.tv_sec; abstime.tv_nsec = 1000000 + now.tv_usec * 1000; if (abstime.tv_nsec > 1000000000) /* 1s = 1e9 ns */ { abstime.tv_nsec -= 1000000000; abstime.tv_sec++; } pthread_mutex_lock(&sleep_mutex); pthread_cond_timedwait(&sleep_cond, &sleep_mutex, &abstime); pthread_mutex_unlock(&sleep_mutex); #endif #endif } void *run_func(void *arg) { int i; int *pdata = (int*) arg; int use_write_lock = *pdata; ZebraLockHandle lh = zebra_lock_create(0, "my.LCK"); for (i = 0; i<2; i++) { int write_lock = use_write_lock; if (use_write_lock == 2) /* random lock */ write_lock = (rand() & 3) == 3 ? 1 : 0; if (write_lock) { zebra_lock_w(lh); write(test_fd, "L", 1); *seqp++ = 'L'; small_sleep(); *seqp++ = 'U'; write(test_fd, "U", 1); zebra_unlock(lh); } else { zebra_lock_r(lh); write(test_fd, "l", 1); *seqp++ = 'l'; small_sleep(); *seqp++ = 'u'; write(test_fd, "u", 1); zebra_unlock(lh); } } zebra_lock_destroy(lh); *pdata = 123; return 0; } #ifdef WIN32 DWORD WINAPI ThreadProc(void *p) { run_func(p); return 0; } #endif static void tst_thread(int num, int write_flag) { #ifdef WIN32 HANDLE handles[NUM_THREADS]; DWORD dwThreadId[NUM_THREADS]; #endif #if YAZ_POSIX_THREADS pthread_t child_thread[NUM_THREADS]; #endif int i, id[NUM_THREADS]; seqp = seq; assert (num <= NUM_THREADS); for (i = 0; i < num; i++) { id[i] = write_flag; #if YAZ_POSIX_THREADS pthread_create(&child_thread[i], 0 /* attr */, run_func, &id[i]); #endif #ifdef WIN32 if (1) { void *pData = &id[i]; handles[i] = CreateThread( NULL, /* default security attributes */ 0, /* use default stack size */ ThreadProc, /* thread function */ pData, /* argument to thread function */ 0, /* use default creation flags */ &dwThreadId[i]); /* returns the thread identifier */ } #endif } #if YAZ_POSIX_THREADS for (i = 0; i #include #include #include #ifdef WIN32 #include #endif #if HAVE_UNISTD_H #include #endif #include #include #include #define YLOG_RES 0 struct res_entry { char *name; char *value; struct res_entry *next; }; struct res_struct { int ref_count; struct res_entry *first, *last; Res def_res; Res over_res; }; static Res res_incref(Res r) { if (r) r->ref_count++; return r; } static struct res_entry *add_entry(Res r) { struct res_entry *resp; if (!r->first) resp = r->last = r->first = (struct res_entry *) xmalloc(sizeof(*resp)); else { resp = (struct res_entry *) xmalloc(sizeof(*resp)); r->last->next = resp; r->last = resp; } resp->next = NULL; return resp; } static char *xstrdup_env(const char *src) { int i = 0; int j = 0; char *dst; int env_strlen = 0; while (src[i]) { if (src[i] == '$' && src[i+1] == '{') { char envname[128]; char *env_val; int k = 0; i = i + 2; while (k < 127 && src[i] && !strchr(":}\n\r\f", src[i])) envname[k++] = src[i++]; envname[k] = '\0'; env_val = getenv(envname); if (env_val) env_strlen += 1 + strlen(env_val); else env_strlen++; while (src[i] && !strchr("}\n\r\f", src[i])) i++; if (src[i] == '}') i++; } else i++; } dst = xmalloc(1 + env_strlen + i); i = 0; while (src[i]) { if (src[i] == '$' && src[i+1] == '{') { char envname[128]; char *env_val; int k = 0; i = i + 2; while(k < 127 && src[i] && !strchr(":}\n\r\f", src[i])) envname[k++] = src[i++]; envname[k] = '\0'; env_val = getenv(envname); if (env_val) { strcpy(dst+j, env_val); j += strlen(env_val); } else if (src[i] == ':' && src[i+1] == '-') { i = i + 2; while (src[i] && !strchr("}\n\r\f", src[i])) dst[j++] = src[i++]; } while (src[i] && !strchr("}\n\r\f", src[i])) i++; if (src[i] == '}') i++; } else dst[j++] = src[i++]; } dst[j] = '\0'; return dst; } ZEBRA_RES res_read_file(Res r, const char *fname) { FILE *fr; int errors = 0; assert(r); fr = fopen(fname, "r"); if (!fr) { yaz_log(YLOG_WARN|YLOG_ERRNO, "Cannot open `%s'", fname); errors++; } else { char fr_buf[1024]; char *line; int lineno = 1; WRBUF wrbuf_val = wrbuf_alloc(); yaz_tok_cfg_t yt = yaz_tok_cfg_create(); while ((line = fgets(fr_buf, sizeof(fr_buf)-1, fr))) { yaz_tok_parse_t tp = yaz_tok_parse_buf(yt, line); int t = yaz_tok_move(tp); if (t == YAZ_TOK_STRING) { size_t sz; struct res_entry *resp; const char *cp = yaz_tok_parse_string(tp); const char *cp1 = strchr(cp, ':'); if (!cp1) { yaz_log(YLOG_FATAL, "%s:%d missing colon after '%s'", fname, lineno, cp); errors++; break; } resp = add_entry(r); sz = cp1 - cp; resp->name = xmalloc(sz + 1); memcpy(resp->name, cp, sz); resp->name[sz] = '\0'; wrbuf_rewind(wrbuf_val); if (cp1[1]) { /* name:value */ wrbuf_puts(wrbuf_val, cp1+1); } else { /* name: value */ t = yaz_tok_move(tp); if (t != YAZ_TOK_STRING) { resp->value = xstrdup(""); yaz_log(YLOG_FATAL, "%s:%d missing value after '%s'", fname, lineno, resp->name); errors++; break; } wrbuf_puts(wrbuf_val, yaz_tok_parse_string(tp)); } while ((t=yaz_tok_move(tp)) == YAZ_TOK_STRING) { wrbuf_putc(wrbuf_val, ' '); wrbuf_puts(wrbuf_val, yaz_tok_parse_string(tp)); } resp->value = xstrdup_env(wrbuf_cstr(wrbuf_val)); /* printf("name=%s value=%s\n", resp->name, resp->value); */ } lineno++; yaz_tok_parse_destroy(tp); } fclose(fr); yaz_tok_cfg_destroy(yt); wrbuf_destroy(wrbuf_val); } if (errors) return ZEBRA_FAIL; return ZEBRA_OK; } Res res_open(Res def_res, Res over_res) { Res r; r = (Res) xmalloc(sizeof(*r)); r->ref_count = 1; r->first = r->last = NULL; r->def_res = res_incref(def_res); r->over_res = res_incref(over_res); return r; } void res_clear(Res r) { struct res_entry *re, *re1; for (re = r->first; re; re=re1) { if (re->name) xfree(re->name); if (re->value) xfree(re->value); re1 = re->next; xfree(re); } r->first = r->last = NULL; } void res_close(Res r) { if (r && --(r->ref_count) == 0) { res_clear(r); res_close(r->def_res); res_close(r->over_res); xfree(r); } } const char *res_get_prefix(Res r, const char *name, const char *prefix, const char *def) { const char *v = 0;; if (prefix) { char rname[128]; if (strlen(name) + strlen(prefix) >= (sizeof(rname)-2)) return 0; strcpy(rname, prefix); strcat(rname, "."); strcat(rname, name); v = res_get(r, rname); } if (!v) v = res_get(r, name); if (!v) v = def; return v; } const char *res_get(Res r, const char *name) { struct res_entry *re; const char *v; if (!r) return 0; v = res_get(r->over_res, name); if (v) return v; for (re = r->first; re; re=re->next) if (re->value && !yaz_matchstr(re->name, name)) return re->value; return res_get(r->def_res, name); } const char *res_get_def(Res r, const char *name, const char *def) { const char *t; if (!(t = res_get(r, name))) { if (def) yaz_log(YLOG_DEBUG, "Using default resource %s:%s", name, def); return def; } else return t; } int res_get_match(Res r, const char *name, const char *value, const char *s) { const char *cn = res_get(r, name); if (!cn) cn = s; if (cn && !yaz_matchstr(cn, value)) return 1; return 0; } void res_set(Res r, const char *name, const char *value) { struct res_entry *re; assert(r); if (!value) return; for (re = r->first; re; re=re->next) if (re->value && !yaz_matchstr(re->name, name)) { xfree(re->value); re->value = xstrdup_env(value); return; } re = add_entry(r); re->name = xstrdup(name); re->value = xstrdup_env(value); } int res_trav(Res r, const char *prefix, void *p, void (*f)(void *p, const char *name, const char *value)) { struct res_entry *re; int l = 0; int no = 0; if (!r) return 0; no = res_trav(r->over_res, prefix, p, f); if (no) return no; if (prefix) l = strlen(prefix); for (re = r->first; re; re=re->next) if (re->value) if (l==0 || !memcmp(re->name, prefix, l)) { (*f)(p, re->name, re->value); no++; } if (!no) return res_trav(r->def_res, prefix, p, f); return no; } ZEBRA_RES res_write_file(Res r, const char *fname) { struct res_entry *re; FILE *fr; assert(r); fr = fopen(fname, "w"); if (!fr) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "Cannot create `%s'", fname); return ZEBRA_FAIL; } for (re = r->first; re; re=re->next) { int no = 0; int lefts = strlen(re->name)+2; if (!re->value) fprintf(fr, "%s\n", re->name); else { fprintf(fr, "%s: ", re->name); while (lefts + strlen(re->value+no) > 78) { int i = 20; int ind = no+ 78-lefts; while (--i >= 0) { if (re->value[ind] == ' ') break; --ind; } if (i<0) ind = no + 78 - lefts; for (i = no; i != ind; i++) putc(re->value[i], fr); fprintf(fr, "\\\n"); no=ind; lefts = 0; } fprintf(fr, "%s\n", re->value+no); } } fclose(fr); return ZEBRA_OK; } ZEBRA_RES res_get_int(Res r, const char *name, int *val) { const char *cp = res_get(r, name); if (cp) { if (sscanf(cp, "%d", val) == 1) return ZEBRA_OK; yaz_log(YLOG_WARN, "Expected integer for resource %s", name); } return ZEBRA_FAIL; } void res_add(Res r, const char *name, const char *value) { struct res_entry *re; assert(r); assert(name); assert(value); yaz_log(YLOG_RES, "res_add res=%p, name=%s, value=%s", r, name, value); re = add_entry(r); re->name = xstrdup(name); re->value = xstrdup_env(value); } void res_dump(Res r, int level) { struct res_entry *re; if (!r) return; for (re = r->first; re; re=re->next) { printf("%*s - %s:='%s'\n",level * 4,"",re->name,re->value); } if (r->def_res) { printf("%*s DEF ",level * 4,""); res_dump(r->def_res, level + 1); } if (r->over_res) { printf("%*s OVER ",level * 4,""); res_dump(r->over_res, level + 1); } } int res_check(Res r_i, Res r_v) { struct res_entry *e_i; int errors = 0; for (e_i = r_i->first; e_i; e_i = e_i->next) { struct res_entry *e_v; for (e_v = r_v->first; e_v; e_v = e_v->next) { int prefix_allowed = 0; int suffix_allowed = 0; const char *name = e_i->name; size_t name_len = strlen(e_i->name); char namez[32]; const char *first_dot = 0; const char *second_dot = 0; if (strchr(e_v->value, 'p')) prefix_allowed = 1; if (strchr(e_v->value, 's')) suffix_allowed = 1; first_dot = strchr(name, '.'); if (prefix_allowed && first_dot) { name = first_dot+1; name_len = strlen(name); } second_dot = strchr(name, '.'); if (suffix_allowed && second_dot) { name_len = second_dot - name; } if (name_len < sizeof(namez)-1) { memcpy(namez, name, name_len); namez[name_len] = '\0'; if (!yaz_matchstr(namez, e_v->name)) break; } /* for case 'a.b' we have to check 'a' as well */ if (prefix_allowed && suffix_allowed && first_dot && !second_dot) { name = e_i->name; name_len = first_dot - name; if (name_len < sizeof(namez)-1) { memcpy(namez, name, name_len); namez[name_len] = '\0'; if (!yaz_matchstr(namez, e_v->name)) break; } } } if (!e_v) { yaz_log(YLOG_WARN, "The following setting is unrecognized: %s", e_i->name); errors++; } } return errors; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/zebramap.c0000644000175000017500000004452011412332551013066 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #if YAZ_HAVE_ICU #include #endif #include #define ZEBRA_MAP_TYPE_SORT 1 #define ZEBRA_MAP_TYPE_INDEX 2 #define ZEBRA_MAP_TYPE_STATICRANK 3 #define ZEBRA_REPLACE_ANY 300 struct zebra_map { const char *id; int completeness; int positioned; int alwaysmatches; int first_in_field; int type; int use_chain; int debug; union { struct { int entry_size; } sort; } u; chrmaptab maptab; const char *maptab_name; zebra_maps_t zebra_maps; #if YAZ_HAVE_XML2 xmlDocPtr doc; #endif #if YAZ_HAVE_ICU struct icu_chain *icu_chain; #endif WRBUF input_str; WRBUF print_str; size_t simple_off; struct zebra_map *next; }; struct zebra_maps_s { char *tabpath; char *tabroot; NMEM nmem; char temp_map_str[2]; const char *temp_map_ptr[2]; WRBUF wrbuf_1; int no_files_read; zebra_map_t map_list; zebra_map_t last_map; }; void zebra_maps_close(zebra_maps_t zms) { struct zebra_map *zm = zms->map_list; while (zm) { if (zm->maptab) chrmaptab_destroy(zm->maptab); #if YAZ_HAVE_ICU if (zm->icu_chain) icu_chain_destroy(zm->icu_chain); #endif #if YAZ_HAVE_XML2 xmlFreeDoc(zm->doc); #endif wrbuf_destroy(zm->input_str); wrbuf_destroy(zm->print_str); zm = zm->next; } wrbuf_destroy(zms->wrbuf_1); nmem_destroy(zms->nmem); xfree(zms); } zebra_map_t zebra_add_map(zebra_maps_t zms, const char *index_type, int map_type) { zebra_map_t zm = (zebra_map_t) nmem_malloc(zms->nmem, sizeof(*zm)); zm->zebra_maps = zms; zm->id = nmem_strdup(zms->nmem, index_type); zm->maptab_name = 0; zm->use_chain = 0; zm->debug = 0; zm->maptab = 0; zm->type = map_type; zm->completeness = 0; zm->positioned = 0; zm->alwaysmatches = 0; zm->first_in_field = 0; if (zms->last_map) zms->last_map->next = zm; else zms->map_list = zm; zms->last_map = zm; zm->next = 0; #if YAZ_HAVE_ICU zm->icu_chain = 0; #endif #if YAZ_HAVE_XML2 zm->doc = 0; #endif zm->input_str = wrbuf_alloc(); zm->print_str = wrbuf_alloc(); return zm; } static int parse_command(zebra_maps_t zms, int argc, char **argv, const char *fname, int lineno) { zebra_map_t zm = zms->last_map; if (argc == 1) { yaz_log(YLOG_WARN, "%s:%d: Missing arguments for '%s'", fname, lineno, argv[0]); return -1; } if (argc > 2) { yaz_log(YLOG_WARN, "%s:%d: Too many arguments for '%s'", fname, lineno, argv[0]); return -1; } if (!yaz_matchstr(argv[0], "index")) { zm = zebra_add_map(zms, argv[1], ZEBRA_MAP_TYPE_INDEX); zm->positioned = 1; } else if (!yaz_matchstr(argv[0], "sort")) { zm = zebra_add_map(zms, argv[1], ZEBRA_MAP_TYPE_SORT); zm->u.sort.entry_size = 80; } else if (!yaz_matchstr(argv[0], "staticrank")) { zm = zebra_add_map(zms, argv[1], ZEBRA_MAP_TYPE_STATICRANK); zm->completeness = 1; } else if (!zm) { yaz_log(YLOG_WARN, "%s:%d: Missing sort/index before '%s'", fname, lineno, argv[0]); return -1; } else if (!yaz_matchstr(argv[0], "charmap") && argc == 2) { if (zm->type != ZEBRA_MAP_TYPE_STATICRANK) zm->maptab_name = nmem_strdup(zms->nmem, argv[1]); else { yaz_log(YLOG_WARN|YLOG_FATAL, "%s:%d: charmap for " "staticrank is invalid", fname, lineno); yaz_log(YLOG_LOG, "Type is %d", zm->type); return -1; } } else if (!yaz_matchstr(argv[0], "completeness") && argc == 2) { zm->completeness = atoi(argv[1]); } else if (!yaz_matchstr(argv[0], "position") && argc == 2) { zm->positioned = atoi(argv[1]); } else if (!yaz_matchstr(argv[0], "alwaysmatches") && argc == 2) { if (zm->type != ZEBRA_MAP_TYPE_STATICRANK) zm->alwaysmatches = atoi(argv[1]); else { yaz_log(YLOG_WARN|YLOG_FATAL, "%s:%d: alwaysmatches for " "staticrank is invalid", fname, lineno); return -1; } } else if (!yaz_matchstr(argv[0], "firstinfield") && argc == 2) { zm->first_in_field = atoi(argv[1]); } else if (!yaz_matchstr(argv[0], "entrysize") && argc == 2) { if (zm->type == ZEBRA_MAP_TYPE_SORT) zm->u.sort.entry_size = atoi(argv[1]); else { yaz_log(YLOG_WARN, "%s:%d: entrysize only valid in sort section", fname, lineno); return -1; } } else if (!yaz_matchstr(argv[0], "simplechain")) { zm->use_chain = 1; #if YAZ_HAVE_ICU zm->icu_chain = 0; #endif } else if (!yaz_matchstr(argv[0], "icuchain")) { char full_path[1024]; if (!yaz_filepath_resolve(argv[1], zms->tabpath, zms->tabroot, full_path)) { yaz_log(YLOG_WARN, "%s:%d: Could not locate icuchain config '%s'", fname, lineno, argv[1]); return -1; } #if YAZ_HAVE_XML2 zm->doc = xmlParseFile(full_path); if (!zm->doc) { yaz_log(YLOG_WARN, "%s:%d: Could not load icuchain config '%s'", fname, lineno, argv[1]); return -1; } else { #if YAZ_HAVE_ICU UErrorCode status; xmlNode *xml_node = xmlDocGetRootElement(zm->doc); zm->icu_chain = icu_chain_xml_config(xml_node, /* not sure about sort for this function yet.. */ #if 1 1, #else zm->type == ZEBRA_MAP_TYPE_SORT, #endif &status); if (!zm->icu_chain) { yaz_log(YLOG_WARN, "%s:%d: Failed to load ICU chain %s", fname, lineno, argv[1]); } zm->use_chain = 1; #else yaz_log(YLOG_WARN, "%s:%d: ICU support unavailable", fname, lineno); return -1; #endif } #else yaz_log(YLOG_WARN, "%s:%d: XML support unavailable", fname, lineno); return -1; #endif } else if (!yaz_matchstr(argv[0], "debug") && argc == 2) { zm->debug = atoi(argv[1]); } else { yaz_log(YLOG_WARN, "%s:%d: Unrecognized directive '%s'", fname, lineno, argv[0]); return -1; } return 0; } ZEBRA_RES zebra_maps_read_file(zebra_maps_t zms, const char *fname) { FILE *f; char line[512]; char *argv[10]; int argc; int lineno = 0; int failures = 0; if (!(f = yaz_fopen(zms->tabpath, fname, "r", zms->tabroot))) { yaz_log(YLOG_ERRNO|YLOG_FATAL, "%s", fname); return ZEBRA_FAIL; } while ((argc = readconf_line(f, &lineno, line, 512, argv, 10))) { int r = parse_command(zms, argc, argv, fname, lineno); if (r) failures++; } yaz_fclose(f); if (failures) return ZEBRA_FAIL; (zms->no_files_read)++; return ZEBRA_OK; } zebra_maps_t zebra_maps_open(Res res, const char *base_path, const char *profile_path) { zebra_maps_t zms = (zebra_maps_t) xmalloc(sizeof(*zms)); zms->nmem = nmem_create(); zms->tabpath = profile_path ? nmem_strdup(zms->nmem, profile_path) : 0; zms->tabroot = 0; if (base_path) zms->tabroot = nmem_strdup(zms->nmem, base_path); zms->map_list = 0; zms->last_map = 0; zms->temp_map_str[0] = '\0'; zms->temp_map_str[1] = '\0'; zms->temp_map_ptr[0] = zms->temp_map_str; zms->temp_map_ptr[1] = NULL; zms->wrbuf_1 = wrbuf_alloc(); zms->no_files_read = 0; return zms; } void zebra_maps_define_default_sort(zebra_maps_t zms) { zebra_map_t zm = zebra_add_map(zms, "s", ZEBRA_MAP_TYPE_SORT); zm->u.sort.entry_size = 80; } zebra_map_t zebra_map_get(zebra_maps_t zms, const char *id) { zebra_map_t zm; for (zm = zms->map_list; zm; zm = zm->next) if (!strcmp(zm->id, id)) break; return zm; } zebra_map_t zebra_map_get_or_add(zebra_maps_t zms, const char *id) { struct zebra_map *zm = zebra_map_get(zms, id); if (!zm) { zm = zebra_add_map(zms, id, ZEBRA_MAP_TYPE_INDEX); /* no reason to warn if no maps are read from file */ if (zms->no_files_read) yaz_log(YLOG_WARN, "Unknown register type: %s", id); zm->maptab_name = nmem_strdup(zms->nmem, "@"); zm->completeness = 0; zm->positioned = 1; } return zm; } chrmaptab zebra_charmap_get(zebra_map_t zm) { if (!zm->maptab) { if (!zm->maptab_name || !yaz_matchstr(zm->maptab_name, "@")) return NULL; if (!(zm->maptab = chrmaptab_create(zm->zebra_maps->tabpath, zm->maptab_name, zm->zebra_maps->tabroot))) yaz_log(YLOG_WARN, "Failed to read character table %s", zm->maptab_name); else yaz_log(YLOG_DEBUG, "Read character table %s", zm->maptab_name); } return zm->maptab; } const char **zebra_maps_input(zebra_map_t zm, const char **from, int len, int first) { chrmaptab maptab = zebra_charmap_get(zm); if (maptab) return chr_map_input(maptab, from, len, first); zm->zebra_maps->temp_map_str[0] = **from; (*from)++; return zm->zebra_maps->temp_map_ptr; } const char **zebra_maps_search(zebra_map_t zm, const char **from, int len, int *q_map_match) { chrmaptab maptab; *q_map_match = 0; maptab = zebra_charmap_get(zm); if (maptab) { const char **map; map = chr_map_q_input(maptab, from, len, 0); if (map && map[0]) { *q_map_match = 1; return map; } map = chr_map_input(maptab, from, len, 0); if (map) return map; } zm->zebra_maps->temp_map_str[0] = **from; (*from)++; return zm->zebra_maps->temp_map_ptr; } const char *zebra_maps_output(zebra_map_t zm, const char **from) { chrmaptab maptab = zebra_charmap_get(zm); if (!maptab) return 0; return chr_map_output(maptab, from, 1); } /* ------------------------------------ */ int zebra_maps_is_complete(zebra_map_t zm) { if (zm) return zm->completeness; return 0; } int zebra_maps_is_positioned(zebra_map_t zm) { if (zm) return zm->positioned; return 0; } int zebra_maps_is_index(zebra_map_t zm) { if (zm) return zm->type == ZEBRA_MAP_TYPE_INDEX; return 0; } int zebra_maps_is_staticrank(zebra_map_t zm) { if (zm) return zm->type == ZEBRA_MAP_TYPE_STATICRANK; return 0; } int zebra_maps_is_sort(zebra_map_t zm) { if (zm) return zm->type == ZEBRA_MAP_TYPE_SORT; return 0; } int zebra_maps_is_alwaysmatches(zebra_map_t zm) { if (zm) return zm->alwaysmatches; return 0; } int zebra_maps_is_first_in_field(zebra_map_t zm) { if (zm) return zm->first_in_field; return 0; } int zebra_maps_sort(zebra_maps_t zms, Z_SortAttributes *sortAttributes, int *numerical) { AttrType use; AttrType structure; int structure_value; attr_init_AttrList(&use, sortAttributes->list, 1); attr_init_AttrList(&structure, sortAttributes->list, 4); *numerical = 0; structure_value = attr_find(&structure, 0); if (structure_value == 109) *numerical = 1; return attr_find(&use, NULL); } int zebra_maps_attr(zebra_maps_t zms, Z_AttributesPlusTerm *zapt, const char **index_type, char **search_type, char *rank_type, int *complete_flag, int *sort_flag) { AttrType completeness; AttrType structure; AttrType relation; AttrType sort_relation; AttrType weight; AttrType use; int completeness_value; int structure_value; const char *structure_str = 0; int relation_value; int sort_relation_value; int weight_value; int use_value; attr_init_APT(&structure, zapt, 4); attr_init_APT(&completeness, zapt, 6); attr_init_APT(&relation, zapt, 2); attr_init_APT(&sort_relation, zapt, 7); attr_init_APT(&weight, zapt, 9); attr_init_APT(&use, zapt, 1); completeness_value = attr_find(&completeness, NULL); structure_value = attr_find_ex(&structure, NULL, &structure_str); relation_value = attr_find(&relation, NULL); sort_relation_value = attr_find(&sort_relation, NULL); weight_value = attr_find(&weight, NULL); use_value = attr_find(&use, NULL); if (completeness_value == 2 || completeness_value == 3) *complete_flag = 1; else *complete_flag = 0; *index_type = 0; *sort_flag =(sort_relation_value > 0) ? 1 : 0; *search_type = "phrase"; strcpy(rank_type, "void"); if (relation_value == 102) { if (weight_value == -1) weight_value = 34; sprintf(rank_type, "rank,w=%d,u=%d", weight_value, use_value); } if (*complete_flag) *index_type = "p"; else *index_type = "w"; switch (structure_value) { case 6: /* word list */ *search_type = "and-list"; break; case 105: /* free-form-text */ *search_type = "or-list"; break; case 106: /* document-text */ *search_type = "or-list"; break; case -1: case 1: /* phrase */ case 2: /* word */ case 108: /* string */ *search_type = "phrase"; break; case 107: /* local-number */ *search_type = "local"; *index_type = 0; break; case 109: /* numeric string */ *index_type = "n"; *search_type = "numeric"; break; case 104: /* urx */ *index_type = "u"; *search_type = "phrase"; break; case 3: /* key */ *index_type = "0"; *search_type = "phrase"; break; case 4: /* year */ *index_type = "y"; *search_type = "phrase"; break; case 5: /* date */ *index_type = "d"; *search_type = "phrase"; break; case -2: if (structure_str && *structure_str) *index_type = structure_str; else return -1; break; default: return -1; } return 0; } WRBUF zebra_replace(zebra_map_t zm, const char *ex_list, const char *input_str, int input_len) { wrbuf_rewind(zm->zebra_maps->wrbuf_1); wrbuf_write(zm->zebra_maps->wrbuf_1, input_str, input_len); return zm->zebra_maps->wrbuf_1; } #define SE_CHARS ";,.()-/?<> \r\n\t" static int tokenize_simple(zebra_map_t zm, const char **result_buf, size_t *result_len) { char *buf = wrbuf_buf(zm->input_str); size_t len = wrbuf_len(zm->input_str); size_t i = zm->simple_off; size_t start; while (i < len && strchr(SE_CHARS, buf[i])) i++; start = i; while (i < len && !strchr(SE_CHARS, buf[i])) { if (buf[i] > 32 && buf[i] < 127) buf[i] = tolower(buf[i]); i++; } zm->simple_off = i; if (start != i) { *result_buf = buf + start; *result_len = i - start; return 1; } return 0; } int zebra_map_tokenize_next(zebra_map_t zm, const char **result_buf, size_t *result_len, const char **display_buf, size_t *display_len) { assert(zm->use_chain); #if YAZ_HAVE_ICU if (!zm->icu_chain) return tokenize_simple(zm, result_buf, result_len); else { UErrorCode status; while (icu_chain_next_token(zm->icu_chain, &status)) { if (!U_SUCCESS(status)) return 0; *result_buf = icu_chain_token_sortkey(zm->icu_chain); assert(*result_buf); *result_len = strlen(*result_buf); if (display_buf) { *display_buf = icu_chain_token_display(zm->icu_chain); if (display_len) *display_len = strlen(*display_buf); } if (zm->debug) { wrbuf_rewind(zm->print_str); wrbuf_write_escaped(zm->print_str, *result_buf, *result_len); yaz_log(YLOG_LOG, "output %s", wrbuf_cstr(zm->print_str)); } if (**result_buf != '\0') return 1; } } return 0; #else return tokenize_simple(zm, result_buf, result_len); #endif } int zebra_map_tokenize_start(zebra_map_t zm, const char *buf, size_t len) { #if YAZ_HAVE_ICU int ret; #endif assert(zm->use_chain); wrbuf_rewind(zm->input_str); wrbuf_write(zm->input_str, buf, len); zm->simple_off = 0; #if YAZ_HAVE_ICU if (zm->icu_chain) { UErrorCode status; if (zm->debug) { wrbuf_rewind(zm->print_str); wrbuf_write_escaped(zm->print_str, wrbuf_buf(zm->input_str), wrbuf_len(zm->input_str)); yaz_log(YLOG_LOG, "input %s", wrbuf_cstr(zm->print_str)); } ret = icu_chain_assign_cstr(zm->icu_chain, wrbuf_cstr(zm->input_str), &status); if (!ret && !U_SUCCESS(status)) { if (zm->debug) { yaz_log(YLOG_WARN, "bad encoding for input"); } return -1; } } #endif return 0; } int zebra_maps_is_icu(zebra_map_t zm) { assert(zm); #if YAZ_HAVE_ICU return zm->use_chain; #else return 0; #endif } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/tstpass.txt0000644000175000017500000000007711057500746013372 00000000000000admin:7UpqGgE7qp7nY adam:$apr1$zkQS9/..$0XJOWp9OnxwefzDdbaTfw/ idzebra-2.0.44/util/dirent.c0000644000175000017500000000360711412332551012553 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #ifdef WIN32 #include #endif #include #include #include #ifdef WIN32 struct DIR { HANDLE handle; WIN32_FIND_DATA find_data; struct dirent entry; }; DIR *opendir (const char *name) { char fullName[MAX_PATH+1]; DIR *dd = malloc (sizeof(*dd)); if (!dd) return NULL; strcpy (fullName, name); strcat (fullName, "\\*.*"); dd->handle = FindFirstFile(fullName, &dd->find_data); return dd; } struct dirent *readdir (DIR *dd) { if (dd->handle == INVALID_HANDLE_VALUE) return NULL; strcpy (dd->entry.d_name, dd->find_data.cFileName); if (!FindNextFile(dd->handle, &dd->find_data)) { FindClose (dd->handle); dd->handle = INVALID_HANDLE_VALUE; } return &dd->entry; } void closedir(DIR *dd) { if (dd->handle != INVALID_HANDLE_VALUE) FindClose (dd->handle); if (dd) free (dd); } #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/strmap.c0000644000175000017500000001065711412332551012577 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include struct strmap_entry { char *name; size_t data_len; void *data_buf; struct strmap_entry *next; }; struct zebra_strmap { NMEM nmem_str; NMEM nmem_ent; int hsize; int size; struct strmap_entry **entries; struct strmap_entry *free_entries; }; zebra_strmap_t zebra_strmap_create(void) { int i; NMEM nmem_ent = nmem_create(); zebra_strmap_t st = nmem_malloc(nmem_ent, sizeof(*st)); st->nmem_ent = nmem_ent; st->nmem_str = nmem_create(); st->hsize = 1001; st->size = 0; st->free_entries = 0; st->entries = nmem_malloc(nmem_ent, st->hsize * sizeof(*st->entries)); for (i = 0; i < st->hsize; i++) st->entries[i] = 0; return st; } void zebra_strmap_destroy(zebra_strmap_t st) { if (st) { nmem_destroy(st->nmem_str); nmem_destroy(st->nmem_ent); } } static struct strmap_entry **hash(zebra_strmap_t st, const char *name) { unsigned hash = 0; int i; for (i = 0; name[i]; i++) hash += hash*65519 + name[i]; hash = hash % st->hsize; return st->entries + hash; } void zebra_strmap_add(zebra_strmap_t st, const char *name, void *data_buf, size_t data_len) { struct strmap_entry **e = hash(st, name); struct strmap_entry *ne = st->free_entries; if (ne) st->free_entries = ne->next; else ne = nmem_malloc(st->nmem_ent, sizeof(*ne)); ne->next = *e; *e = ne; ne->name = nmem_strdup(st->nmem_str, name); ne->data_buf = nmem_malloc(st->nmem_str, data_len); memcpy(ne->data_buf, data_buf, data_len); ne->data_len = data_len; (st->size)++; } void *zebra_strmap_lookup(zebra_strmap_t st, const char *name, int no, size_t *data_len) { struct strmap_entry *e = *hash(st, name); int i = 0; for (; e ; e = e->next) if (!strcmp(name, e->name)) { if (i == no) { if (data_len) *data_len = e->data_len; return e->data_buf; } i++; } return 0; } int zebra_strmap_remove(zebra_strmap_t st, const char *name) { struct strmap_entry **e = hash(st, name); for (; *e ; e = &(*e)->next) if (!strcmp(name, (*e)->name)) { struct strmap_entry *tmp = *e; *e = (*e)->next; tmp->next = st->free_entries; st->free_entries = tmp; --(st->size); return 1; } return 0; } int zebra_strmap_get_size(zebra_strmap_t st) { return st->size; } struct zebra_strmap_it_s { int hno; struct strmap_entry *ent; zebra_strmap_t st; }; zebra_strmap_it zebra_strmap_it_create(zebra_strmap_t st) { zebra_strmap_it it = (zebra_strmap_it) xmalloc(sizeof(*it)); it->hno = 0; it->ent = 0; it->st = st; return it; } void zebra_strmap_it_destroy(zebra_strmap_it it) { xfree(it); } const char *zebra_strmap_it_next(zebra_strmap_it it, void **data_buf, size_t *data_len) { struct strmap_entry *ent = 0; while (!it->ent && it->hno < it->st->hsize) { it->ent = it->st->entries[it->hno]; it->hno++; } if (it->ent) { ent = it->ent; it->ent = ent->next; } if (ent) { if (data_buf) *data_buf = ent->data_buf; if (data_len) *data_len = ent->data_len; return ent->name; } return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/xpath.c0000644000175000017500000001431011412332551012403 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include static char *get_xp_part (char **strs, NMEM mem, int *literal) { char *cp = *strs; char *str = 0; char *res = 0; *literal = 0; while (*cp == ' ') cp++; str = cp; if (strchr("()", *cp)) cp++; else if (strchr("><=", *cp)) { while (strchr("><=", *cp)) cp++; } else if (*cp == '"' || *cp == '\'') { int sep = *cp; str++; cp++; while (*cp && *cp != sep) cp++; res = nmem_malloc(mem, cp - str + 1); if ((cp - str)) memcpy (res, str, (cp-str)); res[cp-str] = '\0'; if (*cp) cp++; *literal = 1; } else { while (*cp && !strchr("><=()]\" ", *cp)) cp++; } if (!res) { res = nmem_malloc(mem, cp - str + 1); if ((cp - str)) memcpy (res, str, (cp-str)); res[cp-str] = '\0'; } *strs = cp; return res; } static struct xpath_predicate *get_xpath_boolean(char **pr, NMEM mem, char **look, int *literal); static struct xpath_predicate *get_xpath_relation(char **pr, NMEM mem, char **look, int *literal) { struct xpath_predicate *res = 0; if (!*literal && !strcmp(*look, "(")) { *look = get_xp_part(pr, mem, literal); res = get_xpath_boolean(pr, mem, look, literal); if (!strcmp(*look, ")")) *look = get_xp_part(pr, mem, literal); else res = 0; /* error */ } else { res=nmem_malloc(mem, sizeof(struct xpath_predicate)); res->which = XPATH_PREDICATE_RELATION; res->u.relation.name = *look; *look = get_xp_part(pr, mem, literal); if (*look && !*literal && strchr("><=", **look)) { res->u.relation.op = *look; *look = get_xp_part(pr, mem, literal); if (!*look) return 0; /* error */ res->u.relation.value = *look; *look = get_xp_part(pr, mem, literal); } else { res->u.relation.op = ""; res->u.relation.value = ""; } } return res; } static struct xpath_predicate *get_xpath_boolean(char **pr, NMEM mem, char **look, int *literal) { struct xpath_predicate *left = 0; left = get_xpath_relation(pr, mem, look, literal); if (!left) return 0; while (*look && !*literal && (!strcmp(*look, "and") || !strcmp(*look, "or") || !strcmp(*look, "not"))) { struct xpath_predicate *res, *right; res = nmem_malloc(mem, sizeof(struct xpath_predicate)); res->which = XPATH_PREDICATE_BOOLEAN; res->u.boolean.op = *look; res->u.boolean.left = left; *look = get_xp_part(pr, mem, literal); /* skip the boolean name */ right = get_xpath_relation(pr, mem, look, literal); res->u.boolean.right = right; left = res; } return left; } static struct xpath_predicate *get_xpath_predicate(char *predicate, NMEM mem) { int literal; char **pr = &predicate; char *look = get_xp_part(pr, mem, &literal); if (!look) return 0; return get_xpath_boolean(pr, mem, &look, &literal); } int zebra_parse_xpath_str(const char *xpath_string, struct xpath_location_step *xpath, int max, NMEM mem) { const char *cp; char *a; int no = 0; if (!xpath_string || *xpath_string != '/') return -1; cp = xpath_string; while (*cp && no < max) { int i = 0; while (*cp && !strchr("/[",*cp)) { i++; cp++; } xpath[no].predicate = 0; xpath[no].part = nmem_malloc (mem, i+1); if (i) memcpy (xpath[no].part, cp - i, i); xpath[no].part[i] = 0; if (*cp == '[') { cp++; while (*cp == ' ') cp++; a = (char *)cp; xpath[no].predicate = get_xpath_predicate(a, mem); while(*cp && *cp != ']') { cp++; } if (*cp == ']') cp++; } /* end of ] predicate */ no++; if (*cp != '/') break; cp++; } /* for debugging .. */ #if 0 dump_xp_steps(xpath, no); #endif return no; } void dump_xp_predicate (struct xpath_predicate *p) { if (p) { if (p->which == XPATH_PREDICATE_RELATION && p->u.relation.name[0]) { fprintf (stderr, "%s,%s,%s", p->u.relation.name, p->u.relation.op, p->u.relation.value); } else { fprintf (stderr, "("); dump_xp_predicate(p->u.boolean.left); fprintf (stderr, ") %s (", p->u.boolean.op); dump_xp_predicate(p->u.boolean.right); fprintf (stderr, ")"); } } } void dump_xp_steps (struct xpath_location_step *xpath, int no) { int i; for (i=0; i #include #include #include #include #include #ifdef WIN32 #include #include #endif #if HAVE_UNISTD_H #include #endif #include #include #include #include /** have this module (mutex) been initialized? */ static int initialized = 0; /** whether fcntl locks are shared for all threads in a process (POSIX) */ static int posix_locks = 1; /** mutex for lock_list below */ Zebra_mutex lock_list_mutex; /** our list of file locked files */ static struct zebra_lock_info *lock_list = 0; /** the internal handle, with a pointer to each lock file info */ struct zebra_lock_handle { #ifndef WIN32 /** so we can call zebra_lock_rdwr_wunlock or zebra_lock_lock_runlock */ int write_flag; #endif struct zebra_lock_info *p; }; struct zebra_lock_info { /** file descriptor */ int fd; /** full path (xmalloc'ed) */ char *fname; /** reference counter: number of zebra_lock_handles pointing to us */ int ref_count; #ifndef WIN32 /** number of file write locks/read locks */ int no_file_write_lock; int no_file_read_lock; Zebra_lock_rdwr rdwr_lock; Zebra_mutex file_mutex; #endif /** next in lock list */ struct zebra_lock_info *next; }; static int log_level = 0; char *zebra_mk_fname(const char *dir, const char *name) { int dlen = dir ? strlen(dir) : 0; char *fname = xmalloc(dlen + strlen(name) + 3); #ifdef WIN32 if (dlen) { int last_one = dir[dlen-1]; if (!strchr("/\\:", last_one)) sprintf(fname, "%s\\%s", dir, name); else sprintf(fname, "%s%s", dir, name); } else sprintf(fname, "%s", name); #else if (dlen) { int last_one = dir[dlen-1]; if (!strchr("/", last_one)) sprintf(fname, "%s/%s", dir, name); else sprintf(fname, "%s%s", dir, name); } else sprintf(fname, "%s", name); #endif return fname; } ZebraLockHandle zebra_lock_create(const char *dir, const char *name) { char *fname = zebra_mk_fname(dir, name); struct zebra_lock_info *p = 0; ZebraLockHandle h = 0; assert(initialized); zebra_mutex_lock(&lock_list_mutex); /* see if we have the same filename in a global list of "lock files" */ #ifndef WIN32 if (posix_locks) { for (p = lock_list; p ; p = p->next) if (!strcmp(p->fname, fname)) break; } #endif if (!p) { /* didn't match (or we didn't want it to match! */ p = (struct zebra_lock_info *) xmalloc(sizeof(*p)); p->ref_count = 0; #ifdef WIN32 p->fd = open(name, O_BINARY|O_RDONLY); if (p->fd == -1) p->fd = open(fname, (O_BINARY|O_CREAT|O_RDWR), 0666); #else p->fd = open(fname, (O_BINARY|O_CREAT|O_RDWR), 0666); #endif if (p->fd == -1) { xfree(p); yaz_log(YLOG_WARN | YLOG_ERRNO, "zebra_lock_create fail fname=%s", fname); p = 0; } else { p->fname = fname; fname = 0; /* fname buffer now owned by p->fname */ #ifndef WIN32 if (posix_locks) zebra_lock_rdwr_init(&p->rdwr_lock); zebra_mutex_init(&p->file_mutex); p->no_file_write_lock = 0; p->no_file_read_lock = 0; #endif p->next = lock_list; lock_list = p; } } if (p) { /* we have lock info so we can make a handle pointing to that */ p->ref_count++; h = (ZebraLockHandle) xmalloc(sizeof(*h)); h->p = p; #ifndef WIN32 h->write_flag = 0; #endif yaz_log(log_level, "zebra_lock_create fd=%d p=%p fname=%s", h->p->fd, h, p->fname); } zebra_mutex_unlock(&lock_list_mutex); xfree(fname); /* free it - if it's still there */ return h; } void zebra_lock_destroy(ZebraLockHandle h) { if (!h) return; yaz_log(log_level, "zebra_lock_destroy fd=%d p=%p fname=%s", h->p->fd, h, h->p->fname); zebra_mutex_lock(&lock_list_mutex); yaz_log(log_level, "zebra_lock_destroy fd=%d p=%p fname=%s refcount=%d", h->p->fd, h, h->p->fname, h->p->ref_count); assert(h->p->ref_count > 0); --(h->p->ref_count); if (h->p->ref_count == 0) { /* must remove shared info from lock_list */ struct zebra_lock_info **hp = &lock_list; while (*hp) { if (*hp == h->p) { *hp = h->p->next; break; } else hp = &(*hp)->next; } yaz_log(log_level, "zebra_lock_destroy fd=%d p=%p fname=%s remove", h->p->fd, h, h->p->fname); #ifndef WIN32 if (posix_locks) zebra_lock_rdwr_destroy(&h->p->rdwr_lock); zebra_mutex_destroy(&h->p->file_mutex); #endif if (h->p->fd != -1) close(h->p->fd); xfree(h->p->fname); xfree(h->p); } xfree(h); zebra_mutex_unlock(&lock_list_mutex); } #ifndef WIN32 static int unixLock(int fd, int type, int cmd) { struct flock area; int r; area.l_type = type; area.l_whence = SEEK_SET; area.l_len = area.l_start = 0L; yaz_log(log_level, "fcntl begin type=%d fd=%d", type, fd); r = fcntl(fd, cmd, &area); if (r == -1) yaz_log(YLOG_WARN|YLOG_ERRNO, "fcntl FAIL type=%d fd=%d", type, fd); else yaz_log(log_level, "fcntl type=%d OK fd=%d", type, fd); return r; } #endif int zebra_lock_w(ZebraLockHandle h) { int r = 0; int do_lock = 0; yaz_log(log_level, "zebra_lock_w fd=%d p=%p fname=%s begin", h->p->fd, h, h->p->fname); #ifdef WIN32 while ((r = _locking(h->p->fd, _LK_LOCK, 1))) ; #else if (posix_locks) zebra_lock_rdwr_wlock(&h->p->rdwr_lock); zebra_mutex_lock(&h->p->file_mutex); if (h->p->no_file_write_lock == 0) do_lock = 1; h->p->no_file_write_lock++; if (do_lock) { /* if there is already a read lock.. upgrade to write lock */ r = unixLock(h->p->fd, F_WRLCK, F_SETLKW); } else { assert(posix_locks); } zebra_mutex_unlock(&h->p->file_mutex); h->write_flag = 1; #endif yaz_log(log_level, "zebra_lock_w fd=%d p=%p fname=%s end", h->p->fd, h, h->p->fname); return r; } int zebra_lock_r(ZebraLockHandle h) { int r = 0; int do_lock = 0; yaz_log(log_level, "zebra_lock_r fd=%d p=%p fname=%s begin", h->p->fd, h, h->p->fname); #ifdef WIN32 while ((r = _locking(h->p->fd, _LK_LOCK, 1))) ; #else if (posix_locks) zebra_lock_rdwr_rlock(&h->p->rdwr_lock); zebra_mutex_lock(&h->p->file_mutex); if (h->p->no_file_read_lock == 0 && h->p->no_file_write_lock == 0) do_lock = 1; h->p->no_file_read_lock++; if (do_lock) { /* only read lock if no write locks already */ r = unixLock(h->p->fd, F_RDLCK, F_SETLKW); } else { assert(posix_locks); } zebra_mutex_unlock(&h->p->file_mutex); h->write_flag = 0; #endif yaz_log(log_level, "zebra_lock_r fd=%d p=%p fname=%s end", h->p->fd, h, h->p->fname); return r; } int zebra_unlock(ZebraLockHandle h) { int r = 0; yaz_log(log_level, "zebra_unlock fd=%d p=%p fname=%s begin", h->p->fd, h, h->p->fname); #ifdef WIN32 r = _locking(h->p->fd, _LK_UNLCK, 1); #else zebra_mutex_lock(&h->p->file_mutex); if (h->write_flag) { if (h->p->no_file_write_lock > 0) h->p->no_file_write_lock--; } else { if (h->p->no_file_read_lock > 0) h->p->no_file_read_lock--; } if (h->p->no_file_read_lock == 0 && h->p->no_file_write_lock == 0) r = unixLock(h->p->fd, F_UNLCK, F_SETLKW); else { r = 0; assert(posix_locks); } zebra_mutex_unlock(&h->p->file_mutex); if (posix_locks) { if (h->write_flag) zebra_lock_rdwr_wunlock(&h->p->rdwr_lock); else zebra_lock_rdwr_runlock(&h->p->rdwr_lock); } #endif yaz_log(log_level, "zebra_unlock fd=%d p=%p fname=%s end", h->p->fd, h, h->p->fname); return r; } /** \brief see if the fcntl locking is not POSIX * * The default posix_locks=1 is assumed.. This function sets posix_locks * to zero if linuxthreads is in use. */ static int check_for_linuxthreads(void) { #if __linux #ifdef _CS_GNU_LIBPTHREAD_VERSION char conf_buf[512]; size_t r = confstr(_CS_GNU_LIBPTHREAD_VERSION, conf_buf, sizeof(conf_buf)); if (r == 0) { yaz_log(YLOG_WARN|YLOG_ERRNO, "confstr failed"); return -1; } if (strncmp(conf_buf, "linuxthreads", 12) == 0) posix_locks = 0; /* Using linuxthreads.. */ #else posix_locks = 0; /* Old GLIBC on Linux. Assume linuxthreads */ #endif #endif return 0; } void zebra_flock_init() { if (!initialized) { initialized = 1; log_level = yaz_log_module_level("flock"); yaz_log(log_level, "zebra_flock_init"); check_for_linuxthreads(); zebra_mutex_init(&lock_list_mutex); yaz_log(log_level, "posix_locks: %d", posix_locks); } } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/version.c0000644000175000017500000000236611412332551012754 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** * \file version.c * \brief Implements Zebra version utilities. */ #if HAVE_CONFIG_H #include #endif #include #include #include void zebra_get_version(char *version_str, char *sha1_str) { if (version_str) strcpy(version_str, ZEBRAVER); if (sha1_str) strcpy(sha1_str, ZEBRA_VERSION_SHA1); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/exit.c0000644000175000017500000000200111412332551012222 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include void zebra_exit(const char *msg) { yaz_log(YLOG_LOG, "%s: exit", msg); exit(1); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/zebrasrv.rh0000755000175000017500000000131511057500746013320 00000000000000#!/bin/bash # # chkconfig: 2345 85 15 # description: Redhat init.d zebrasrv script. # processname: zebrasrv # source function library . /etc/rc.d/init.d/functions zebradir=/home/meta/silkeborg/db srv=/home/meta/silkeborg/zmbol/index/zmbolsrv user=nobody if [ ! -d ${zebradir} ]; then echo "No directory $zebradir" exit 0 fi if [ ! -f ${srv} ]; then echo "No server $srv" exit 0 fi cd $zebradir case "$1" in start) echo -n "Starting zebrasrv " ${srv} -l srv.log -u $user tcp:@:210 & echo ;; stop) echo -n "Shutting zebrasrv " kill `cat $zebradir/zebrasrv.pid` echo "" ;; restart|reload) $0 stop $0 start ;; *) echo "Usage: zebrasrv {start|stop|restart|reload}" exit 1 esac exit 0 idzebra-2.0.44/util/Makefile.am0000644000175000017500000000163311412332551013153 00000000000000 noinst_LTLIBRARIES = libidzebra-util.la check_PROGRAMS = tstcharmap tstflock tstlockscope tstpass tstres test_strmap TESTS = $(check_PROGRAMS) bin_SCRIPTS = idzebra-config-2.0 EXTRA_DIST = zebrasrv.rh tstcharmap.chr emptycharmap.chr tstpass.txt tstres.cfg mk_version.tcl DISTCLEANFILES = idzebra-config-2.0 AM_CPPFLAGS = -I$(srcdir)/../include $(YAZINC) -DDEFAULT_PROFILE_PATH=\"$(pkgdatadir)/tab\" LDADD = libidzebra-util.la $(YAZLALIB) libidzebra_util_la_SOURCES = version.c zint.c res.c charmap.c zebramap.c \ passwddb.c zebra-lock.c dirent.c xpath.c atoi_zn.c snippet.c flock.c \ attrfind.c exit.c it_key.c su_codec.c strmap.c tstpass_SOURCES = tstpass.c tstcharmap_SOURCES = tstcharmap.c tstflock_SOURCES = tstflock.c tstlockscope_SOURCES = tstlockscope.c tstres_SOURCES = tstres.c test_strmap_SOURCES = test_strmap.c clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf -rm -rf tstflock.out idzebra-2.0.44/util/tstres.c0000644000175000017500000000442611412332551012612 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include /* use env srcdir as base directory - or current directory if unset */ const char *get_srcdir(void) { const char *srcdir = getenv("srcdir"); if (!srcdir || ! *srcdir) srcdir="."; return srcdir; } static void tst_res_open(void) { Res res = 0; res_close(res); res = res_open(0, 0); YAZ_CHECK(res); res_close(res); } static void tst_res_read_file(void) { Res res = res_open(0, 0); YAZ_CHECK(res); if (res) { int r = res_read_file(res, "notfound"); YAZ_CHECK_EQ(r, ZEBRA_FAIL); } if (res) { const char *v; char path[1024]; int r; yaz_snprintf(path, sizeof(path), "%s/tstres.cfg", get_srcdir()); r = res_read_file(res, path); YAZ_CHECK_EQ(r, ZEBRA_OK); v = res_get_def(res, "register", "none"); YAZ_CHECK(!strcmp(v, "a:b")); v = res_get_def(res, "name", "none"); YAZ_CHECK(!strcmp(v, "c d")); v = res_get_def(res, "here", "none"); YAZ_CHECK(!strcmp(v, "_")); v = res_get_def(res, "namex", "none"); YAZ_CHECK(!strcmp(v, "none")); } res_close(res); } int main (int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); YAZ_CHECK_LOG(); tst_res_open(); tst_res_read_file(); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/it_key.c0000644000175000017500000001370411412332551012551 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #ifdef __GNUC__ #define CODEC_INLINE inline #else #define CODEC_INLINE #endif void key_logdump_txt(int logmask, const void *p, const char *txt) { struct it_key key; if (!txt) txt = "(none)"; if (p) { char formstr[128]; int i; memcpy (&key, p, sizeof(key)); assert(key.len > 0 && key.len <= IT_KEY_LEVEL_MAX); *formstr = '\0'; for (i = 0; ilen; if (((struct it_key *) p2)->len > l) l = ((struct it_key *) p2)->len; assert (l <= IT_KEY_LEVEL_MAX && l > 0); for (i = 0; i < l; i++) { if (((struct it_key *) p1)->mem[i] != ((struct it_key *) p2)->mem[i]) { if (((struct it_key *) p1)->mem[i] > ((struct it_key *) p2)->mem[i]) return l-i; else return i-l; } } return 0; } char *key_print_it (const void *p, char *buf) { strcpy(buf, ""); return buf; } int key_compare (const void *p1, const void *p2) { struct it_key i1, i2; int i, l; memcpy (&i1, p1, sizeof(i1)); memcpy (&i2, p2, sizeof(i2)); l = i1.len; if (i2.len > l) l = i2.len; assert (l <= IT_KEY_LEVEL_MAX && l > 0); for (i = 0; i < l; i++) { if (i1.mem[i] != i2.mem[i]) { if (i1.mem[i] > i2.mem[i]) return l-i; else return i-l; } } return 0; } zint key_get_seq(const void *p) { struct it_key k; memcpy (&k, p, sizeof(k)); return k.mem[k.len-1]; } zint key_get_segment(const void *p) { struct it_key k; memcpy (&k, p, sizeof(k)); return k.mem[k.len-2]; } int key_qsort_compare (const void *p1, const void *p2) { int r; size_t l; char *cp1 = *(char **) p1; char *cp2 = *(char **) p2; if ((r = strcmp (cp1, cp2))) return r; l = strlen(cp1)+1; if ((r = key_compare (cp1+l+1, cp2+l+1))) return r; return cp1[l] - cp2[l]; } struct iscz1_code_info { struct it_key key; }; void *iscz1_start (void) { struct iscz1_code_info *p = (struct iscz1_code_info *) xmalloc (sizeof(*p)); iscz1_reset(p); return p; } void key_init(struct it_key *key) { int i; key->len = 0; for (i = 0; i < IT_KEY_LEVEL_MAX; i++) key->mem[i] = 0; } void iscz1_reset (void *vp) { struct iscz1_code_info *p = (struct iscz1_code_info *) vp; int i; p->key.len = 0; for (i = 0; i < IT_KEY_LEVEL_MAX; i++) p->key.mem[i] = 0; } void iscz1_stop (void *p) { xfree (p); } /* small encoder that works with unsigneds of any length */ static CODEC_INLINE void iscz1_encode_int (zint d, char **dst) { unsigned char *bp = (unsigned char*) *dst; while (d > 127) { *bp++ = (unsigned) (128 | (d & 127)); d = d >> 7; } *bp++ = (unsigned) d; *dst = (char *) bp; } /* small decoder that works with unsigneds of any length */ static CODEC_INLINE zint iscz1_decode_int (unsigned char **src) { zint d = 0; unsigned char c; unsigned r = 0; while (((c = *(*src)++) & 128)) { d += ((zint) (c&127) << r); r += 7; } d += ((zint) c << r); return d; } void iscz1_encode (void *vp, char **dst, const char **src) { struct iscz1_code_info *p = (struct iscz1_code_info *) vp; struct it_key tkey; zint d; int i; /* 1 3, 2, 9, 12 3, 2, 10, 2 4, 1 if diff is 0, then there is more ... if diff is non-zero, then _may_ be more */ memcpy (&tkey, *src, sizeof(struct it_key)); /* deal with leader + delta encoding .. */ d = 0; assert(tkey.len > 0 && tkey.len <= IT_KEY_LEVEL_MAX); for (i = 0; i < tkey.len; i++) { d = tkey.mem[i] - p->key.mem[i]; if (d || i == tkey.len-1) { /* all have been equal until now, now make delta .. */ p->key.mem[i] = tkey.mem[i]; if (d > 0) { iscz1_encode_int (i + (tkey.len << 3) + 64, dst); i++; iscz1_encode_int (d, dst); } else { iscz1_encode_int (i + (tkey.len << 3), dst); } break; } } /* rest uses absolute encoding ... */ for (; i < tkey.len; i++) { iscz1_encode_int (tkey.mem[i], dst); p->key.mem[i] = tkey.mem[i]; } (*src) += sizeof(struct it_key); } void iscz1_decode (void *vp, char **dst, const char **src) { struct iscz1_code_info *p = (struct iscz1_code_info *) vp; int i; int leader = (int) iscz1_decode_int ((unsigned char **) src); i = leader & 7; if (leader & 64) p->key.mem[i] += iscz1_decode_int ((unsigned char **) src); else p->key.mem[i] = iscz1_decode_int ((unsigned char **) src); p->key.len = (leader >> 3) & 7; while (++i < p->key.len) p->key.mem[i] = iscz1_decode_int ((unsigned char **) src); memcpy (*dst, &p->key, sizeof(struct it_key)); (*dst) += sizeof(struct it_key); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/tstres.cfg0000644000175000017500000000006211057500746013127 00000000000000# comment register:a:b# name: c d here: _ # idzebra-2.0.44/util/charmap.c0000644000175000017500000004430511412332551012701 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** * \file charmap.c * \brief character conversions (.chr) * * Support module to handle character-conversions into and out of the * Zebra dictionary. */ #include #include #include #include typedef unsigned ucs4_t; #include #include #define CHR_MAXSTR 1024 #define CHR_MAXEQUIV 32 const unsigned char CHR_FIELD_BEGIN = '^'; const char *CHR_UNKNOWN = "\001"; const char *CHR_SPACE = "\002"; const char *CHR_CUT = "\003"; const char *CHR_BASE = "\005"; /* CHECK CHR_BASE_CHAR as well */ struct chrmaptab_info { chr_t_entry *input; /* mapping table for input data */ chr_t_entry *q_input; /* mapping table for queries */ unsigned char *output[256]; /* return mapping - for display of registers */ int base_uppercase; /* Start of upper-case ordinals */ NMEM nmem; }; /* * Character map trie node. */ struct chr_t_entry { chr_t_entry **children; /* array of children */ unsigned char **target; /* target for this node, if any */ }; /* * General argument structure for callback functions (internal use only) */ typedef struct chrwork { chrmaptab map; char string[CHR_MAXSTR+1]; } chrwork; /* * Callback for equivalent stuff */ typedef struct { NMEM nmem; int no_eq; char *eq[CHR_MAXEQUIV]; } chr_equiv_work; /* * Add an entry to the character map. */ static chr_t_entry *set_map_string(chr_t_entry *root, NMEM nmem, const char *from, int len, char *to, const char *from_0) { if (!from_0) from_0 = from; if (!root) { root = (chr_t_entry *) nmem_malloc(nmem, sizeof(*root)); root->children = 0; root->target = 0; } if (!len) { if (!root->target || !root->target[0] || strcmp((const char *) root->target[0], to)) { if (from_0 && root->target && root->target[0] && root->target[0][0] && strcmp((const char *) root->target[0], CHR_UNKNOWN)) { yaz_log(YLOG_WARN, "duplicate entry for charmap from '%s'", from_0); } root->target = (unsigned char **) nmem_malloc(nmem, sizeof(*root->target)*2); root->target[0] = (unsigned char *) nmem_strdup(nmem, to); root->target[1] = 0; } } else { if (!root->children) { int i; root->children = (chr_t_entry **) nmem_malloc(nmem, sizeof(chr_t_entry*) * 256); for (i = 0; i < 256; i++) root->children[i] = 0; } if (!(root->children[(unsigned char) *from] = set_map_string(root->children[(unsigned char) *from], nmem, from + 1, len - 1, to, from_0))) return 0; } return root; } static chr_t_entry *find_entry_x(chr_t_entry *t, const char **from, int *len, int first) { chr_t_entry *res; while (*len <= 0) { /* switch to next buffer */ if (*len < 0) break; from++; len++; } if (*len > 0 && t->children) { const char *old_from = *from; int old_len = *len; res = 0; if (first && t->children[CHR_FIELD_BEGIN]) { if ((res = find_entry_x(t->children[CHR_FIELD_BEGIN], from, len, 0)) && res != t->children[CHR_FIELD_BEGIN]) return res; else res = 0; /* otherwhise there was no match on beginning of field, move on */ } if (!res && t->children[(unsigned char) **from]) { (*len)--; (*from)++; if ((res = find_entry_x(t->children[(unsigned char) *old_from], from, len, 0))) return res; /* no match */ *len = old_len; *from = old_from; } } /* no children match. use ourselves, if we have a target */ return t->target ? t : 0; } const char **chr_map_input_x(chrmaptab maptab, const char **from, int *len, int first) { chr_t_entry *t = maptab->input; chr_t_entry *res; if (!(res = find_entry_x(t, from, len, first))) abort(); return (const char **) (res->target); } const char **chr_map_input(chrmaptab maptab, const char **from, int len, int first) { chr_t_entry *t = maptab->input; chr_t_entry *res; int len_tmp[2]; len_tmp[0] = len; len_tmp[1] = -1; if (!(res = find_entry_x(t, from, len_tmp, first))) abort(); return (const char **) (res->target); } const char **chr_map_q_input(chrmaptab maptab, const char **from, int len, int first) { chr_t_entry *t = maptab->q_input; chr_t_entry *res; int len_tmp[2]; len_tmp[0] = len; len_tmp[1] = -1; if (!(res = find_entry_x(t, from, len_tmp, first))) return 0; return (const char **) (res->target); } const char *chr_map_output(chrmaptab maptab, const char **from, int len) { unsigned char c = ** (unsigned char **) from; const char *out = (const char*) maptab->output[c]; if (out) (*from)++; return out; } static int zebra_ucs4_strlen(ucs4_t *s) { int i = 0; while (*s++) i++; return i; } ucs4_t zebra_prim_w(ucs4_t **s) { ucs4_t c; ucs4_t i = 0; char fmtstr[8]; yaz_log(YLOG_DEBUG, "prim_w %.3s", (char *) *s); if (**s == '\\' && 1[*s]) { (*s)++; c = **s; switch (c) { case '\\': c = '\\'; (*s)++; break; case 'r': c = '\r'; (*s)++; break; case 'n': c = '\n'; (*s)++; break; case 't': c = '\t'; (*s)++; break; case 's': c = ' '; (*s)++; break; case 'x': if (zebra_ucs4_strlen(*s) >= 3) { fmtstr[0] = (*s)[1]; fmtstr[1] = (*s)[2]; fmtstr[2] = 0; sscanf(fmtstr, "%x", &i); c = i; *s += 3; } break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (zebra_ucs4_strlen(*s) >= 3) { fmtstr[0] = (*s)[0]; fmtstr[1] = (*s)[1]; fmtstr[2] = (*s)[2]; fmtstr[3] = 0; sscanf(fmtstr, "%o", &i); c = i; *s += 3; } break; case 'L': if (zebra_ucs4_strlen(*s) >= 5) { fmtstr[0] = (*s)[1]; fmtstr[1] = (*s)[2]; fmtstr[2] = (*s)[3]; fmtstr[3] = (*s)[4]; fmtstr[4] = 0; sscanf(fmtstr, "%x", &i); c = i; *s += 5; } break; default: (*s)++; } } else { c = **s; ++(*s); } yaz_log(YLOG_DEBUG, "out %d", c); return c; } /* * Callback function. * Add an entry to the value space. */ static void fun_addentry(const char *s, void *data, int num) { chrmaptab tab = (chrmaptab) data; char tmp[2]; tmp[0] = num; tmp[1] = '\0'; tab->input = set_map_string(tab->input, tab->nmem, s, strlen(s), tmp, 0); tab->output[num + tab->base_uppercase] = (unsigned char *) nmem_strdup(tab->nmem, s); } /* * Callback function. * Add a space-entry to the value space. */ static void fun_addspace(const char *s, void *data, int num) { chrmaptab tab = (chrmaptab) data; tab->input = set_map_string(tab->input, tab->nmem, s, strlen(s), (char*) CHR_SPACE, 0); } /* * Callback function. * Add a space-entry to the value space. */ static void fun_addcut(const char *s, void *data, int num) { chrmaptab tab = (chrmaptab) data; tab->input = set_map_string(tab->input, tab->nmem, s, strlen(s), (char*) CHR_CUT, 0); } /* * Create a string containing the mapped characters provided. */ static void fun_mkstring(const char *s, void *data, int num) { chrwork *arg = (chrwork *) data; const char **res, *p = s; res = chr_map_input(arg->map, &s, strlen(s), 0); if (*res == (char*) CHR_UNKNOWN) yaz_log(YLOG_WARN, "Map: '%s' has no mapping", p); strncat(arg->string, *res, CHR_MAXSTR - strlen(arg->string)); arg->string[CHR_MAXSTR] = '\0'; } /* * Create an unmodified string (scan_string handler). */ static void fun_add_equivalent_string(const char *s, void *data, int num) { chr_equiv_work *arg = (chr_equiv_work *) data; if (arg->no_eq == CHR_MAXEQUIV) return; arg->eq[arg->no_eq++] = nmem_strdup(arg->nmem, s); } /* * Add a map to the string contained in the argument. */ static void fun_add_map(const char *s, void *data, int num) { chrwork *arg = (chrwork *) data; assert(arg->map->input); yaz_log(YLOG_DEBUG, "set map %.*s", (int) strlen(s), s); set_map_string(arg->map->input, arg->map->nmem, s, strlen(s), arg->string, 0); for (s = arg->string; *s; s++) yaz_log(YLOG_DEBUG, " %3d", (unsigned char) *s); } static int scan_to_utf8(yaz_iconv_t t, ucs4_t *from, size_t inlen, char *outbuf, size_t outbytesleft) { size_t inbytesleft = inlen * sizeof(ucs4_t); char *inbuf = (char*) from; size_t ret; if (t == 0) *outbuf++ = *from; /* ISO-8859-1 is OK here */ else { ret = yaz_iconv(t, &inbuf, &inbytesleft, &outbuf, &outbytesleft); if (ret != (size_t) (-1)) ret = yaz_iconv(t, 0, 0, &outbuf, &outbytesleft); if (ret == (size_t) (-1)) { yaz_log(YLOG_LOG, "from: %2X %2X %2X %2X", from[0], from[1], from[2], from[3]); yaz_log(YLOG_WARN|YLOG_ERRNO, "bad unicode sequence"); return -1; } } *outbuf = '\0'; return 0; } static int scan_string(char *s_native, yaz_iconv_t t_unicode, yaz_iconv_t t_utf8, void (*fun)(const char *c, void *data, int num), void *data, int *num) { char str[1024]; ucs4_t arg[512]; ucs4_t arg_prim[512]; ucs4_t *s0, *s = arg; ucs4_t c, begin, end; size_t i; if (t_unicode != 0) { char *outbuf = (char *) arg; char *inbuf = s_native; size_t outbytesleft = sizeof(arg)-4; size_t inbytesleft = strlen(s_native); size_t ret; ret = yaz_iconv(t_unicode, &inbuf, &inbytesleft, &outbuf, &outbytesleft); if (ret != (size_t)(-1)) ret = yaz_iconv(t_unicode, 0, 0, &outbuf, &outbytesleft); if (ret == (size_t)(-1)) return -1; i = (outbuf - (char*) arg)/sizeof(ucs4_t); } else { for (i = 0; s_native[i]; i++) arg[i] = s_native[i] & 255; /* ISO-8859-1 conversion */ } arg[i] = 0; /* terminate */ if (s[0] == 0xfeff || s[0] == 0xfeff) /* skip byte Order Mark */ s++; while (*s) { switch (*s) { case '{': s++; begin = zebra_prim_w(&s); if (*s != '-') { yaz_log(YLOG_FATAL, "Bad range in char-map"); return -1; } s++; end = zebra_prim_w(&s); if (end <= begin) { yaz_log(YLOG_FATAL, "Bad range in char-map"); return -1; } s++; for (c = begin; c <= end; c++) { if (scan_to_utf8(t_utf8, &c, 1, str, sizeof(str)-1)) return -1; (*fun)(str, data, num ? (*num)++ : 0); } break; case '(': ++s; s0 = s; i = 0; while (*s != ')' || s[-1] == '\\') arg_prim[i++] = zebra_prim_w(&s); arg_prim[i] = 0; if (scan_to_utf8(t_utf8, arg_prim, zebra_ucs4_strlen(arg_prim), str, sizeof(str)-1)) return -1; (*fun)(str, data, num ? (*num)++ : 0); s++; break; default: c = zebra_prim_w(&s); if (scan_to_utf8(t_utf8, &c, 1, str, sizeof(str)-1)) return -1; (*fun)(str, data, num ? (*num)++ : 0); } } return 0; } chrmaptab chrmaptab_create(const char *tabpath, const char *name, const char *tabroot) { FILE *f; char line[512], *argv[50]; chrmaptab res; int lineno = 0; int no_directives = 0; int errors = 0; int argc, num = (int) *CHR_BASE, i; NMEM nmem; yaz_iconv_t t_unicode = 0; yaz_iconv_t t_utf8 = 0; unsigned endian = 31; const char *ucs4_native = "UCS-4"; yaz_log(YLOG_DEBUG, "maptab %s open", name); if (!(f = yaz_fopen(tabpath, name, "r", tabroot))) { yaz_log(YLOG_WARN|YLOG_ERRNO, "%s", name); return 0; } if (*(char*) &endian == 31) /* little endian? */ ucs4_native = "UCS-4LE"; t_utf8 = yaz_iconv_open("UTF-8", ucs4_native); nmem = nmem_create(); res = (chrmaptab) nmem_malloc(nmem, sizeof(*res)); res->nmem = nmem; res->input = (chr_t_entry *) nmem_malloc(res->nmem, sizeof(*res->input)); res->input->target = (unsigned char **) nmem_malloc(res->nmem, sizeof(*res->input->target) * 2); res->input->target[0] = (unsigned char*) CHR_UNKNOWN; res->input->target[1] = 0; res->input->children = (chr_t_entry **) nmem_malloc(res->nmem, sizeof(res->input) * 256); for (i = 0; i < 256; i++) { res->input->children[i] = (chr_t_entry *) nmem_malloc(res->nmem, sizeof(*res->input)); res->input->children[i]->children = 0; res->input->children[i]->target = (unsigned char **) nmem_malloc(res->nmem, 2 * sizeof(unsigned char *)); res->input->children[i]->target[1] = 0; res->input->children[i]->target[0] = (unsigned char*) CHR_UNKNOWN; } res->q_input = (chr_t_entry *) nmem_malloc(res->nmem, sizeof(*res->q_input)); res->q_input->target = 0; res->q_input->children = 0; for (i = *CHR_BASE; i < 256; i++) res->output[i] = 0; res->output[(int) *CHR_SPACE] = (unsigned char *) " "; res->output[(int) *CHR_UNKNOWN] = (unsigned char*) "@"; res->base_uppercase = 0; while (!errors && (argc = readconf_line(f, &lineno, line, 512, argv, 50))) { no_directives++; if (!yaz_matchstr(argv[0], "lowercase")) { if (argc != 2) { yaz_log(YLOG_FATAL, "Syntax error in charmap"); ++errors; } if (scan_string(argv[1], t_unicode, t_utf8, fun_addentry, res, &num) < 0) { yaz_log(YLOG_FATAL, "Bad value-set specification"); ++errors; } res->base_uppercase = num; res->output[(int) *CHR_SPACE + num] = (unsigned char *) " "; res->output[(int) *CHR_UNKNOWN + num] = (unsigned char*) "@"; num = (int) *CHR_BASE; } else if (!yaz_matchstr(argv[0], "uppercase")) { if (!res->base_uppercase) { yaz_log(YLOG_FATAL, "Uppercase directive with no lowercase set"); ++errors; } if (argc != 2) { yaz_log(YLOG_FATAL, "Missing arg for uppercase directive"); ++errors; } if (scan_string(argv[1], t_unicode, t_utf8, fun_addentry, res, &num) < 0) { yaz_log(YLOG_FATAL, "Bad value-set specification"); ++errors; } } else if (!yaz_matchstr(argv[0], "space")) { if (argc != 2) { yaz_log(YLOG_FATAL, "Syntax error in charmap for space"); ++errors; } if (scan_string(argv[1], t_unicode, t_utf8, fun_addspace, res, 0) < 0) { yaz_log(YLOG_FATAL, "Bad space specification"); ++errors; } } else if (!yaz_matchstr(argv[0], "cut")) { if (argc != 2) { yaz_log(YLOG_FATAL, "Syntax error in charmap for cut"); ++errors; } if (scan_string(argv[1], t_unicode, t_utf8, fun_addcut, res, 0) < 0) { yaz_log(YLOG_FATAL, "Bad cut specification"); ++errors; } } else if (!yaz_matchstr(argv[0], "map")) { chrwork buf; if (argc != 3) { yaz_log(YLOG_FATAL, "charmap directive map requires 2 args"); ++errors; } buf.map = res; buf.string[0] = '\0'; if (scan_string(argv[2], t_unicode, t_utf8, fun_mkstring, &buf, 0) < 0) { yaz_log(YLOG_FATAL, "Bad map target"); ++errors; } if (scan_string(argv[1], t_unicode, t_utf8, fun_add_map, &buf, 0) < 0) { yaz_log(YLOG_FATAL, "Bad map source"); ++errors; } } else if (!yaz_matchstr(argv[0], "equivalent")) { chr_equiv_work w; if (argc != 2) { yaz_log(YLOG_FATAL, "equivalent requires 1 argument"); ++errors; } w.nmem = res->nmem; w.no_eq = 0; if (scan_string(argv[1], t_unicode, t_utf8, fun_add_equivalent_string, &w, 0) < 0) { yaz_log(YLOG_FATAL, "equivalent: invalid string"); ++errors; } else if (w.no_eq == 0) { yaz_log(YLOG_FATAL, "equivalent: no strings"); ++errors; } else { char *result_str; int i, slen = 5; /* determine length of regular expression */ for (i = 0; inmem, slen + 5); /* build the regular expression */ *result_str = '\0'; slen = 0; for (i = 0; iq_input, res->nmem, w.eq[i], strlen(w.eq[i]), result_str, 0); } } } else if (!yaz_matchstr(argv[0], "encoding")) { if (t_unicode != 0) yaz_iconv_close(t_unicode); t_unicode = yaz_iconv_open(ucs4_native, argv[1]); } else { yaz_log(YLOG_WARN, "Syntax error at '%s' in %s", line, name); errors++; } } yaz_fclose(f); if (no_directives == 0) { yaz_log(YLOG_WARN, "No directives in '%s'", name); errors++; } if (errors) { chrmaptab_destroy(res); res = 0; } yaz_log(YLOG_DEBUG, "maptab %s close %d errors", name, errors); if (t_utf8 != 0) yaz_iconv_close(t_utf8); if (t_unicode != 0) yaz_iconv_close(t_unicode); return res; } void chrmaptab_destroy(chrmaptab tab) { if (tab) nmem_destroy(tab->nmem); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/tstcharmap.chr0000644000175000017500000000132311412332551013757 00000000000000# Generic character map. # # Define the basic value-set. *Beware* of changing this without re-indexing # your databases. lowercase {0-9}{a-y}üzæäøöå uppercase {0-9}{A-Y}ÜZÆÄØÖÅ # Breaking characters space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~ # Characters to be considered equivalent for searching purposes. # equivalent æä(ae) # equivalent øö(oe) # equivalent å(aa) # equivalent uü # Supplemental mappings #map (ä) ä #map (æ) æ #map (ø) ø #map (å) å #map (ö) ö #map (Ä) Ä #map (&Aelig;) Æ #map (Ø) Ø #map (Å) Å #map (Ö) Ö #map éÉ e #map á a #map ó o #map í i #map (Aa) (AA) #map (aa) a idzebra-2.0.44/util/tstcharmap.c0000644000175000017500000000377111412332551013436 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include /* use env srcdir as base directory - or current directory if unset */ const char *get_srcdir(void) { const char *srcdir = getenv("srcdir"); if (!srcdir || ! *srcdir) srcdir="."; return srcdir; } void tst1(void) { /* open existing map chrmaptab.chr */ chrmaptab tab = chrmaptab_create(get_srcdir() /* tabpath */, "tstcharmap.chr" /* file */, 0 /* tabroot */ ); YAZ_CHECK(tab); chrmaptab_destroy(tab); } void tst2(void) { /* open non-existing nonexist.chr */ chrmaptab tab = chrmaptab_create(get_srcdir() /* tabpath */, "nonexist.chr" /* file */, 0 /* tabroot */ ); YAZ_CHECK(!tab); chrmaptab_destroy(tab); } void tst3(void) { /* open empty emptycharmap.chrr */ chrmaptab tab = chrmaptab_create(get_srcdir() /* tabpath */, "emptycharmap.chr" /* file */, 0 /* tabroot */ ); YAZ_CHECK(!tab); chrmaptab_destroy(tab); } int main(int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); YAZ_CHECK_LOG(); tst1(); tst2(); tst3(); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/snippet.c0000644000175000017500000002040511412332551012743 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include struct zebra_snippets { NMEM nmem; zebra_snippet_word *front; zebra_snippet_word *tail; }; zebra_snippets *zebra_snippets_create(void) { NMEM nmem = nmem_create(); zebra_snippets *l = nmem_malloc(nmem, sizeof(*l)); l->nmem = nmem; l->front = l->tail = 0; return l; } void zebra_snippets_destroy(zebra_snippets *l) { if (l) nmem_destroy(l->nmem); } void zebra_snippets_append(zebra_snippets *l, zint seqno, int ws, int ord, const char *term) { zebra_snippets_append_match(l, seqno, ws, ord, term, strlen(term), 0); } void zebra_snippets_appendn(zebra_snippets *l, zint seqno, int ws, int ord, const char *term, size_t term_len) { zebra_snippets_append_match(l, seqno, ws, ord, term, term_len, 0); } void zebra_snippets_append_match(zebra_snippets *l, zint seqno, int ws, int ord, const char *term, size_t term_len, int match) { struct zebra_snippet_word *w = nmem_malloc(l->nmem, sizeof(*w)); w->next = 0; w->prev = l->tail; if (l->tail) { l->tail->next = w; } else { l->front = w; } l->tail = w; w->seqno = seqno; w->ws = ws; w->ord = ord; w->term = nmem_malloc(l->nmem, term_len+1); memcpy(w->term, term, term_len); w->term[term_len] = '\0'; w->match = match; w->mark = 0; } zebra_snippet_word *zebra_snippets_list(zebra_snippets *l) { return l->front; } const zebra_snippet_word *zebra_snippets_constlist(const zebra_snippets *l) { return l->front; } void zebra_snippets_log(const zebra_snippets *l, int log_level, int all) { zebra_snippet_word *w; for (w = l->front; w; w = w->next) { WRBUF wr_term = wrbuf_alloc(); wrbuf_puts_escaped(wr_term, w->term); if (all || w->mark) yaz_log(log_level, "term='%s'%s mark=%d seqno=" ZINT_FORMAT " ord=%d", wrbuf_cstr(wr_term), (w->match && !w->ws ? "*" : ""), w->mark, w->seqno, w->ord); wrbuf_destroy(wr_term); } } zebra_snippets *zebra_snippets_window(const zebra_snippets *doc, const zebra_snippets *hit, int window_size) { int ord = -1; zebra_snippets *result = zebra_snippets_create(); if (window_size == 0) window_size = 1000000; while(1) { zint window_start; zint first_seq_no_best_window = 0; zint last_seq_no_best_window = 0; int number_best_window = 0; const zebra_snippet_word *hit_w, *doc_w; int min_ord = 0; /* not set yet */ for (hit_w = zebra_snippets_constlist(hit); hit_w; hit_w = hit_w->next) if (hit_w->ord > ord && (min_ord == 0 || hit_w->ord < min_ord)) { min_ord = hit_w->ord; } if (min_ord == 0) break; ord = min_ord; for (hit_w = zebra_snippets_constlist(hit); hit_w; hit_w = hit_w->next) { if (hit_w->ord == ord) { const zebra_snippet_word *look_w = hit_w; int number_this = 0; zint seq_no_last = 0; while (look_w && look_w->seqno < hit_w->seqno + window_size) { if (look_w->ord == ord) { seq_no_last = look_w->seqno; number_this++; } look_w = look_w->next; } if (number_this > number_best_window) { number_best_window = number_this; first_seq_no_best_window = hit_w->seqno; last_seq_no_best_window = seq_no_last; } } } yaz_log(YLOG_DEBUG, "ord=%d", ord); yaz_log(YLOG_DEBUG, "first_seq_no_best_window=" ZINT_FORMAT, first_seq_no_best_window); yaz_log(YLOG_DEBUG, "last_seq_no_best_window=" ZINT_FORMAT, last_seq_no_best_window); yaz_log(YLOG_DEBUG, "number_best_window=%d", number_best_window); window_start = (first_seq_no_best_window + last_seq_no_best_window - window_size) / 2; for (doc_w = zebra_snippets_constlist(doc); doc_w; doc_w = doc_w->next) if (doc_w->ord == ord && doc_w->seqno >= window_start && doc_w->seqno < window_start + window_size) { int match = 0; for (hit_w = zebra_snippets_constlist(hit); hit_w; hit_w = hit_w->next) { if (hit_w->ord == ord && hit_w->seqno == doc_w->seqno) { match = 1; break; } } zebra_snippets_append_match(result, doc_w->seqno, doc_w->ws, ord, doc_w->term, strlen(doc_w->term), match); } } return result; } static void zebra_snippets_clear(zebra_snippets *sn) { zebra_snippet_word *w; for (w = zebra_snippets_list(sn); w; w = w->next) { w->mark = 0; w->match = 0; } } const struct zebra_snippet_word *zebra_snippets_lookup( const zebra_snippets *doc, const zebra_snippets *hit) { const zebra_snippet_word *hit_w; for (hit_w = zebra_snippets_constlist(hit); hit_w; hit_w = hit_w->next) { const zebra_snippet_word *doc_w; for (doc_w = zebra_snippets_constlist(doc); doc_w; doc_w = doc_w->next) { if (doc_w->ord == hit_w->ord && doc_w->seqno == hit_w->seqno && !doc_w->ws) { return doc_w; } } } return 0; } void zebra_snippets_ring(zebra_snippets *doc, const zebra_snippets *hit, int before, int after) { int ord = -1; zebra_snippets_clear(doc); while (1) { const zebra_snippet_word *hit_w; zebra_snippet_word *doc_w; int min_ord = 0; /* not set yet */ for (hit_w = zebra_snippets_constlist(hit); hit_w; hit_w = hit_w->next) if (hit_w->ord > ord && (min_ord == 0 || hit_w->ord < min_ord)) { min_ord = hit_w->ord; } if (min_ord == 0) break; ord = min_ord; for (hit_w = zebra_snippets_constlist(hit); hit_w; hit_w = hit_w->next) { if (hit_w->ord == ord) { for (doc_w = zebra_snippets_list(doc); doc_w; doc_w = doc_w->next) { if (doc_w->ord == ord && doc_w->seqno == hit_w->seqno && !doc_w->ws) { doc_w->match = 1; doc_w->mark = 1; break; } } /* mark following terms */ if (doc_w) { zebra_snippet_word *w = doc_w->next; while (w) if (w->ord == ord && hit_w->seqno - before < w->seqno && hit_w->seqno + after > w->seqno) { w->mark = 1; w = w->next; } else break; } /* mark preceding terms */ if (doc_w) { zebra_snippet_word *w = doc_w->prev; while (w) if (w->ord == ord && hit_w->seqno - before < w->seqno && hit_w->seqno + after > w->seqno) { w->mark = 1; w = w->prev; } else break; } } } } } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/mk_version.tcl0000644000175000017500000000244511412332551014001 00000000000000#!/usr/bin/tclsh proc usage {} { puts {mk_version.tcl [-v] configure.ac infile ..} exit 1 } set verbose 0 set l [llength $argv] set i 0 while {$i < $l} { set arg [lindex $argv $i] switch -glob -- $arg { -v { incr verbose } default { if {![info exists conffile]} { set conffile $arg } else { lappend infiles $arg } } } incr i } if {![info exists infiles]} { puts "mk_version.tcl: missing input file(s)" usage } set f [open $conffile r] while {1} { set cnt [gets $f line] if {$cnt < 0} { break } regexp {AC_INIT\([^,]+,\[([0-9.]+)\]} $line s version } close $f set maps(VERSION) $version set c [split $version .] set versionl [expr ([lindex $c 0] * 256 + [lindex $c 1]) * 256 + [lindex $c 2]] set maps(VERSION_HEX) [format %x $versionl] if {[llength $c] == 3} { lappend c 1 } set maps(WIN_FILEVERSION) [join $c ,] set maps(VERSION_SHA1) {} foreach x [array names maps] { puts "$x=$maps($x)" } foreach ifile $infiles { set if [open "${ifile}.in" r] set of [open "${ifile}" w] while {1} { set cnt [gets $if line] if {$cnt < 0} { break } foreach x [array names maps] { regsub -all "@$x@" $line $maps($x) line } puts $of $line } close $if close $of } idzebra-2.0.44/util/su_codec.c0000644000175000017500000000347311412332551013053 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include int key_SU_encode (int ch, char *out) { int i; if (ch == -1) { /* unique value .. which is different from ch >= 0 case */ /* is used to generate queries with "null" hits, bug #1142 */ out[0] = 129; return 1; } for (i = 0; ch; i++) { if (ch >= 64) out[i] = 65 + (ch & 63); else out[i] = 1 + ch; ch = ch >> 6; } return i; /* in out 0 1 1 2 63 64 64 65, 2 65 66, 2 127 128, 2 128 65, 3 191 128, 3 192 65, 4 */ } int key_SU_decode (int *ch, const unsigned char *out) { int len = 1; int fact = 1; *ch = 0; for (len = 1; *out >= 65; len++, out++) { *ch += (*out - 65) * fact; fact <<= 6; } *ch += (*out - 1) * fact; return len; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/test_strmap.c0000644000175000017500000000722511412332551013633 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include static void test1(void) { { zebra_strmap_t sm = zebra_strmap_create(); YAZ_CHECK(sm); zebra_strmap_destroy(sm); } { int v = 1; void *data_buf; size_t data_len; zebra_strmap_t sm = zebra_strmap_create(); YAZ_CHECK(!zebra_strmap_lookup(sm, "a", 0, 0)); zebra_strmap_add(sm, "a", &v, sizeof v); data_buf = zebra_strmap_lookup(sm, "a", 0, &data_len); YAZ_CHECK(data_buf && data_len == sizeof v && v == *((int*) data_buf)); zebra_strmap_remove(sm, "a"); data_buf = zebra_strmap_lookup(sm, "a", 0, &data_len); YAZ_CHECK(data_buf == 0); v = 1; zebra_strmap_add(sm, "a", &v, sizeof v); v = 2; zebra_strmap_add(sm, "b", &v, sizeof v); v = 3; zebra_strmap_add(sm, "c", &v, sizeof v); { zebra_strmap_it it = zebra_strmap_it_create(sm); const char *name; int no = 0; while ((name = zebra_strmap_it_next(it, &data_buf, &data_len))) { YAZ_CHECK(!strcmp(name, "a") || !strcmp(name, "b") || !strcmp(name, "c")); no++; } YAZ_CHECK_EQ(no, 3); zebra_strmap_it_destroy(it); } zebra_strmap_destroy(sm); } } static void test2(int no_iter) { zebra_strmap_t sm = zebra_strmap_create(); { int i; srand(12); for (i = 0; i < no_iter; i++) { char str[8]; int j; int v = i; for (j = 0; j < sizeof(str)-1; j++) str[j] = rand() & 255; str[j] = '\0'; zebra_strmap_add(sm, str, &v, sizeof v); } } { int failed = 0; int i; srand(12); for (i = 0; i < no_iter; i++) { char str[8]; int j; int v = i; void *data_buf; size_t data_len; for (j = 0; j < sizeof(str)-1; j++) str[j] = rand() & 255; str[j] = '\0'; j = 0; while ((data_buf = zebra_strmap_lookup(sm, str, j, &data_len))) { if (data_len == sizeof v && v == *((int*) data_buf)) break; j++; } if (!(data_buf && data_len == sizeof v && v == *((int*) data_buf))) failed++; } if (failed) YAZ_CHECK_EQ(failed, 0); } zebra_strmap_destroy(sm); } int main (int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); YAZ_CHECK_LOG(); test1(); test2(50000); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/zebra-lock.c0000644000175000017500000001123511412332551013313 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include int zebra_mutex_init (Zebra_mutex *p) { p->state = 1; #if YAZ_POSIX_THREADS pthread_mutex_init (&p->mutex, 0); #endif #ifdef WIN32 InitializeCriticalSection (&p->mutex); #endif return 0; } int zebra_mutex_destroy (Zebra_mutex *p) { --(p->state); if (p->state != 0) { fprintf (stderr, "zebra_mutex_destroy. state = %d\n", p->state); } #if YAZ_POSIX_THREADS pthread_mutex_destroy (&p->mutex); #endif #ifdef WIN32 DeleteCriticalSection (&p->mutex); #endif return 0; } int zebra_mutex_lock (Zebra_mutex *p) { if (p->state != 1) { fprintf (stderr, "zebra_mutex_lock. state = %d\n", p->state); } #if YAZ_POSIX_THREADS pthread_mutex_lock (&p->mutex); #endif #ifdef WIN32 EnterCriticalSection (&p->mutex); #endif return 0; } int zebra_mutex_unlock (Zebra_mutex *p) { if (p->state != 1) { fprintf (stderr, "zebra_mutex_unlock. state = %d\n", p->state); } #if YAZ_POSIX_THREADS pthread_mutex_unlock (&p->mutex); #endif #ifdef WIN32 LeaveCriticalSection (&p->mutex); #endif return 0; } int zebra_lock_rdwr_init (Zebra_lock_rdwr *p) { p->readers_reading = 0; p->writers_writing = 0; #if YAZ_POSIX_THREADS pthread_mutex_init (&p->mutex, 0); pthread_cond_init (&p->lock_free, 0); #endif return 0; } int zebra_lock_rdwr_destroy (Zebra_lock_rdwr *p) { assert (p->readers_reading == 0); assert (p->writers_writing == 0); #if YAZ_POSIX_THREADS pthread_mutex_destroy (&p->mutex); pthread_cond_destroy (&p->lock_free); #endif return 0; } int zebra_lock_rdwr_rlock (Zebra_lock_rdwr *p) { #if YAZ_POSIX_THREADS pthread_mutex_lock (& p->mutex); while (p->writers_writing) pthread_cond_wait (&p->lock_free, &p->mutex); p->readers_reading++; pthread_mutex_unlock(&p->mutex); #endif return 0; } int zebra_lock_rdwr_wlock (Zebra_lock_rdwr *p) { #if YAZ_POSIX_THREADS pthread_mutex_lock (&p->mutex); while (p->writers_writing || p->readers_reading) pthread_cond_wait (&p->lock_free, &p->mutex); p->writers_writing++; pthread_mutex_unlock (&p->mutex); #endif return 0; } int zebra_lock_rdwr_runlock (Zebra_lock_rdwr *p) { #if YAZ_POSIX_THREADS pthread_mutex_lock (&p->mutex); if (p->readers_reading == 0) { pthread_mutex_unlock (&p->mutex); return -1; } else { p->readers_reading--; if (p->readers_reading == 0) pthread_cond_signal (&p->lock_free); pthread_mutex_unlock (&p->mutex); } #endif return 0; } int zebra_lock_rdwr_wunlock (Zebra_lock_rdwr *p) { #if YAZ_POSIX_THREADS pthread_mutex_lock (&p->mutex); if (p->writers_writing == 0) { pthread_mutex_unlock (&p->mutex); return -1; } else { p->writers_writing--; pthread_cond_broadcast(&p->lock_free); pthread_mutex_unlock(&p->mutex); } #endif return 0; } int zebra_mutex_cond_init (Zebra_mutex_cond *p) { #if YAZ_POSIX_THREADS pthread_cond_init (&p->cond, 0); pthread_mutex_init (&p->mutex, 0); #endif return 0; } int zebra_mutex_cond_destroy (Zebra_mutex_cond *p) { #if YAZ_POSIX_THREADS pthread_cond_destroy (&p->cond); pthread_mutex_destroy (&p->mutex); #endif return 0; } int zebra_mutex_cond_lock (Zebra_mutex_cond *p) { #if YAZ_POSIX_THREADS return pthread_mutex_lock (&p->mutex); #else return 0; #endif } int zebra_mutex_cond_unlock (Zebra_mutex_cond *p) { #if YAZ_POSIX_THREADS return pthread_mutex_unlock (&p->mutex); #else return 0; #endif } int zebra_mutex_cond_wait (Zebra_mutex_cond *p) { #if YAZ_POSIX_THREADS return pthread_cond_wait (&p->cond, &p->mutex); #else return 0; #endif } int zebra_mutex_cond_signal (Zebra_mutex_cond *p) { #if YAZ_POSIX_THREADS return pthread_cond_signal (&p->cond); #else return 0; #endif } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/passwddb.c0000644000175000017500000000735211412332551013076 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #if HAVE_UNISTD_H #include #endif #include #include #if HAVE_CRYPT_H #include #endif #include #include #include #include struct passwd_entry { int encrypt_flag; char *name; char *des; struct passwd_entry *next; }; struct passwd_db { struct passwd_entry *entries; }; Passwd_db passwd_db_open (void) { struct passwd_db *p = (struct passwd_db *) xmalloc (sizeof(*p)); p->entries = 0; return p; } static int get_entry (const char **p, char *dst, int max) { int i = 0; while ((*p)[i] != ':' && (*p)[i]) i++; if (i >= max) i = max-1; if (i) memcpy (dst, *p, i); dst[i] = '\0'; *p += i; if (*p) (*p)++; return i; } static int passwd_db_file_int(Passwd_db db, const char *fname, int encrypt_flag) { FILE *f; char buf[1024]; f = fopen (fname, "r"); if (!f) return -1; while (fgets (buf, sizeof(buf)-1, f)) { struct passwd_entry *pe; char name[128]; char des[128]; char *p; const char *cp = buf; if ((p = strchr (buf, '\n'))) *p = '\0'; get_entry (&cp, name, 128); get_entry (&cp, des, 128); pe = (struct passwd_entry *) xmalloc (sizeof(*pe)); pe->name = xstrdup (name); pe->des = xstrdup (des); pe->encrypt_flag = encrypt_flag; pe->next = db->entries; db->entries = pe; } fclose (f); return 0; } void passwd_db_close(Passwd_db db) { struct passwd_entry *pe = db->entries; while (pe) { struct passwd_entry *pe_next = pe->next; xfree (pe->name); xfree (pe->des); xfree (pe); pe = pe_next; } xfree (db); } void passwd_db_show(Passwd_db db) { struct passwd_entry *pe; for (pe = db->entries; pe; pe = pe->next) yaz_log (YLOG_LOG,"%s:%s", pe->name, pe->des); } int passwd_db_auth(Passwd_db db, const char *user, const char *pass) { struct passwd_entry *pe; assert(db); for (pe = db->entries; pe; pe = pe->next) if (user && !strcmp (user, pe->name)) break; if (!pe) return -1; if (!pass) return -2; if (pe->encrypt_flag) { #if HAVE_CRYPT_H const char *des_try; assert(pe->des); if (strlen (pe->des) < 3) return -3; if (pe->des[0] != '$') /* Not MD5? (assume DES) */ { if (strlen(pass) > 8) /* maximum key length is 8 */ return -2; } des_try = crypt (pass, pe->des); assert(des_try); if (strcmp (des_try, pe->des)) return -2; #else return -2; #endif } else { assert(pass); assert(pe->des); if (strcmp (pe->des, pass)) return -2; } return 0; } int passwd_db_file_crypt(Passwd_db db, const char *fname) { #if HAVE_CRYPT_H return passwd_db_file_int(db, fname, 1); #else return -1; #endif } int passwd_db_file_plain(Passwd_db db, const char *fname) { return passwd_db_file_int(db, fname, 0); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/zint.c0000644000175000017500000000312411412332551012244 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include void zebra_zint_encode(char **dst, zint pos) { unsigned char *bp = (unsigned char*) *dst; while (pos > 127) { *bp++ = (unsigned char) (128 | (pos & 127)); pos = pos >> 7; } *bp++ = (unsigned char) pos; *dst = (char *) bp; } void zebra_zint_decode(const char **src, zint *pos) { const unsigned char **bp = (const unsigned char **) src; zint d = 0; unsigned char c; unsigned r = 0; while (((c = *(*bp)++) & 128)) { d += ((zint) (c & 127) << r); r += 7; } d += ((zint) c << r); *pos = d; } zint atozint(const char *src) { #if HAVE_ATOLL return atoll(src); #else return atoi(src); #endif } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/Makefile.in0000644000175000017500000006233311412336426013175 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = tstcharmap$(EXEEXT) tstflock$(EXEEXT) \ tstlockscope$(EXEEXT) tstpass$(EXEEXT) tstres$(EXEEXT) \ test_strmap$(EXEEXT) subdir = util DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libidzebra_util_la_LIBADD = am_libidzebra_util_la_OBJECTS = version.lo zint.lo res.lo charmap.lo \ zebramap.lo passwddb.lo zebra-lock.lo dirent.lo xpath.lo \ atoi_zn.lo snippet.lo flock.lo attrfind.lo exit.lo it_key.lo \ su_codec.lo strmap.lo libidzebra_util_la_OBJECTS = $(am_libidzebra_util_la_OBJECTS) am_test_strmap_OBJECTS = test_strmap.$(OBJEXT) test_strmap_OBJECTS = $(am_test_strmap_OBJECTS) test_strmap_LDADD = $(LDADD) am__DEPENDENCIES_1 = test_strmap_DEPENDENCIES = libidzebra-util.la $(am__DEPENDENCIES_1) am_tstcharmap_OBJECTS = tstcharmap.$(OBJEXT) tstcharmap_OBJECTS = $(am_tstcharmap_OBJECTS) tstcharmap_LDADD = $(LDADD) tstcharmap_DEPENDENCIES = libidzebra-util.la $(am__DEPENDENCIES_1) am_tstflock_OBJECTS = tstflock.$(OBJEXT) tstflock_OBJECTS = $(am_tstflock_OBJECTS) tstflock_LDADD = $(LDADD) tstflock_DEPENDENCIES = libidzebra-util.la $(am__DEPENDENCIES_1) am_tstlockscope_OBJECTS = tstlockscope.$(OBJEXT) tstlockscope_OBJECTS = $(am_tstlockscope_OBJECTS) tstlockscope_LDADD = $(LDADD) tstlockscope_DEPENDENCIES = libidzebra-util.la $(am__DEPENDENCIES_1) am_tstpass_OBJECTS = tstpass.$(OBJEXT) tstpass_OBJECTS = $(am_tstpass_OBJECTS) tstpass_LDADD = $(LDADD) tstpass_DEPENDENCIES = libidzebra-util.la $(am__DEPENDENCIES_1) am_tstres_OBJECTS = tstres.$(OBJEXT) tstres_OBJECTS = $(am_tstres_OBJECTS) tstres_LDADD = $(LDADD) tstres_DEPENDENCIES = libidzebra-util.la $(am__DEPENDENCIES_1) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bindir)" SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libidzebra_util_la_SOURCES) $(test_strmap_SOURCES) \ $(tstcharmap_SOURCES) $(tstflock_SOURCES) \ $(tstlockscope_SOURCES) $(tstpass_SOURCES) $(tstres_SOURCES) DIST_SOURCES = $(libidzebra_util_la_SOURCES) $(test_strmap_SOURCES) \ $(tstcharmap_SOURCES) $(tstflock_SOURCES) \ $(tstlockscope_SOURCES) $(tstpass_SOURCES) $(tstres_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ noinst_LTLIBRARIES = libidzebra-util.la TESTS = $(check_PROGRAMS) bin_SCRIPTS = idzebra-config-2.0 EXTRA_DIST = zebrasrv.rh tstcharmap.chr emptycharmap.chr tstpass.txt tstres.cfg mk_version.tcl DISTCLEANFILES = idzebra-config-2.0 AM_CPPFLAGS = -I$(srcdir)/../include $(YAZINC) -DDEFAULT_PROFILE_PATH=\"$(pkgdatadir)/tab\" LDADD = libidzebra-util.la $(YAZLALIB) libidzebra_util_la_SOURCES = version.c zint.c res.c charmap.c zebramap.c \ passwddb.c zebra-lock.c dirent.c xpath.c atoi_zn.c snippet.c flock.c \ attrfind.c exit.c it_key.c su_codec.c strmap.c tstpass_SOURCES = tstpass.c tstcharmap_SOURCES = tstcharmap.c tstflock_SOURCES = tstflock.c tstlockscope_SOURCES = tstlockscope.c tstres_SOURCES = tstres.c test_strmap_SOURCES = test_strmap.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu util/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu util/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libidzebra-util.la: $(libidzebra_util_la_OBJECTS) $(libidzebra_util_la_DEPENDENCIES) $(LINK) $(libidzebra_util_la_OBJECTS) $(libidzebra_util_la_LIBADD) $(LIBS) clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list test_strmap$(EXEEXT): $(test_strmap_OBJECTS) $(test_strmap_DEPENDENCIES) @rm -f test_strmap$(EXEEXT) $(LINK) $(test_strmap_OBJECTS) $(test_strmap_LDADD) $(LIBS) tstcharmap$(EXEEXT): $(tstcharmap_OBJECTS) $(tstcharmap_DEPENDENCIES) @rm -f tstcharmap$(EXEEXT) $(LINK) $(tstcharmap_OBJECTS) $(tstcharmap_LDADD) $(LIBS) tstflock$(EXEEXT): $(tstflock_OBJECTS) $(tstflock_DEPENDENCIES) @rm -f tstflock$(EXEEXT) $(LINK) $(tstflock_OBJECTS) $(tstflock_LDADD) $(LIBS) tstlockscope$(EXEEXT): $(tstlockscope_OBJECTS) $(tstlockscope_DEPENDENCIES) @rm -f tstlockscope$(EXEEXT) $(LINK) $(tstlockscope_OBJECTS) $(tstlockscope_LDADD) $(LIBS) tstpass$(EXEEXT): $(tstpass_OBJECTS) $(tstpass_DEPENDENCIES) @rm -f tstpass$(EXEEXT) $(LINK) $(tstpass_OBJECTS) $(tstpass_LDADD) $(LIBS) tstres$(EXEEXT): $(tstres_OBJECTS) $(tstres_DEPENDENCIES) @rm -f tstres$(EXEEXT) $(LINK) $(tstres_OBJECTS) $(tstres_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atoi_zn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attrfind.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/charmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/it_key.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/passwddb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/res.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snippet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_codec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_strmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstcharmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstflock.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstlockscope.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstpass.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstres.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpath.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zebra-lock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zebramap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zint.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(LTLIBRARIES) $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ clean-noinstLTLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binSCRIPTS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binSCRIPTS clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf -rm -rf tstflock.out # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/util/attrfind.c0000644000175000017500000000645211412332551013102 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include void attr_init_APT(AttrType *src, Z_AttributesPlusTerm *zapt, int type) { src->attributeList = zapt->attributes->attributes; src->num_attributes = zapt->attributes->num_attributes; src->type = type; src->major = 0; src->minor = 0; } void attr_init_AttrList(AttrType *src, Z_AttributeList *list, int type) { src->attributeList = list->attributes; src->num_attributes = list->num_attributes; src->type = type; src->major = 0; src->minor = 0; } int attr_find_ex(AttrType *src, const Odr_oid **attribute_set_oid, const char **string_value) { int num_attributes; num_attributes = src->num_attributes; while (src->major < num_attributes) { Z_AttributeElement *element; element = src->attributeList[src->major]; if (src->type == *element->attributeType) { switch (element->which) { case Z_AttributeValue_numeric: ++(src->major); if (element->attributeSet && attribute_set_oid) *attribute_set_oid = element->attributeSet; return *element->value.numeric; break; case Z_AttributeValue_complex: if (src->minor >= element->value.complex->num_list) break; if (element->attributeSet && attribute_set_oid) *attribute_set_oid = element->attributeSet; if (element->value.complex->list[src->minor]->which == Z_StringOrNumeric_numeric) { ++(src->minor); return *element->value.complex->list[src->minor-1]->u.numeric; } else if (element->value.complex->list[src->minor]->which == Z_StringOrNumeric_string) { if (!string_value) break; ++(src->minor); *string_value = element->value.complex->list[src->minor-1]->u.string; return -2; } else break; default: assert(0); } } ++(src->major); } return -1; } int attr_find(AttrType *src, const Odr_oid **attribute_set_id) { return attr_find_ex(src, attribute_set_id, 0); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/emptycharmap.chr0000644000175000017500000000003511412332551014302 00000000000000# No directives in this file idzebra-2.0.44/util/atoi_zn.c0000644000175000017500000000217211412332551012725 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include zint atoi_zn (const char *buf, zint len) { zint val = 0; while (--len >= 0) { if (isdigit (*buf)) val = val*10 + (*buf - '0'); buf++; } return val; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/tstpass.c0000644000175000017500000000422411412332551012763 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include /* use env srcdir as base directory - or current directory if unset */ const char *get_srcdir(void) { const char *srcdir = getenv("srcdir"); if (!srcdir || ! *srcdir) srcdir="."; return srcdir; } static void tst(void) { char path[1024]; Passwd_db db; db = passwd_db_open(); YAZ_CHECK(db); if (!db) return; yaz_snprintf(path, sizeof(path), "%s/no_such_file.txt", get_srcdir()); YAZ_CHECK_EQ(passwd_db_file_plain(db, path), -1); YAZ_CHECK_EQ(passwd_db_file_crypt(db, path), -1); yaz_snprintf(path, sizeof(path), "%s/tstpass.txt", get_srcdir()); #if HAVE_CRYPT_H YAZ_CHECK_EQ(passwd_db_file_crypt(db, path), 0); YAZ_CHECK_EQ(passwd_db_auth(db, "other", "x1234"), -1); YAZ_CHECK_EQ(passwd_db_auth(db, "admin", "abcd"), -2); YAZ_CHECK_EQ(passwd_db_auth(db, "admin", "fruitbat"), 0); YAZ_CHECK_EQ(passwd_db_auth(db, "admin", "fruitbatx"), -2); YAZ_CHECK_EQ(passwd_db_auth(db, "admin", "fruitba"), -2); #else YAZ_CHECK_EQ(passwd_db_file_plain(db, "passtest.txt"), -1); #endif passwd_db_close(db); } int main (int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); YAZ_CHECK_LOG(); tst(); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/util/tstlockscope.c0000644000175000017500000000435211412332551014001 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** \file tstlockscope.c \brief tests scope of fcntl locks.. Either "process" or "thread" */ #include #include #include #include #include #include #include #if YAZ_POSIX_THREADS #include #endif int fd; const char *scope = "unknown"; static int file_lock(int fd, int type, int cmd) { struct flock area; area.l_type = type; area.l_whence = SEEK_SET; area.l_len = area.l_start = 0L; return fcntl(fd, cmd, &area); } void *run_func(void *arg) { if (file_lock(fd, F_WRLCK, F_SETLK) == -1) scope = "thread"; else scope = "process"; return 0; } void tst(void) { pthread_t child_thread; int r; fd = open("my.LCK", (O_CREAT|O_RDWR), 0666); YAZ_CHECK(fd != -1); if (fd == -1) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "open"); return; } r = file_lock(fd, F_WRLCK, F_SETLKW); YAZ_CHECK(r != -1); if (r == -1) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "fcnt"); return; } #if YAZ_POSIX_THREADS pthread_create(&child_thread, 0 /* attr */, run_func, 0); pthread_join(child_thread, 0); #endif yaz_log(YLOG_LOG, "fcntl lock scope: %s", scope); } int main(int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); YAZ_CHECK_LOG(); tst(); YAZ_CHECK_TERM; return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/config.guess0000755000175000017500000013105411375165520012473 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd | genuineintel) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: idzebra-2.0.44/idzebra.spec0000644000175000017500000000471611412336433012446 00000000000000Name: idzebra-2.0 Version: 2.0.44 Release: 1 Requires: lib%{name}-modules = %{version} License: GPL Group: Applications/Databases Vendor: Index Data ApS Source: idzebra-%{version}.tar.gz BuildRoot: %{_tmppath}/idzebra-%{version}-root Packager: Adam Dickmeiss URL: http://www.indexdata.dk/zebra/ BuildRequires: libyaz4-devel expat-devel bzip2-devel tcl zlib-devel Summary: High-performance, structured text indexing and retrival engine. %description Zebra is a high-performance, general-purpose structured text indexing and retrieval engine. It reads structured records in a variety of input formats (eg. email, XML, MARC) and allows access to them through exact boolean search expressions and relevance-ranked free-text queries. %package -n lib%{name} Summary: Zebra libraries Group: Libraries Requires: libyaz4 bzip2-libs %description -n lib%{name} Libraries for the Zebra search engine. %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %package -n lib%{name}-modules Summary: Zebra modules Group: Libraries Requires: lib%{name} = %{version} expat tcl %description -n lib%{name}-modules Modules for the Zebra search engine. %package -n lib%{name}-devel Summary: Zebra development libraries Group: Development/Libraries Requires: lib%{name} = %{version} libyaz4-devel bzip2-devel %description -n lib%{name}-devel Development libraries for the Zebra search engine. %prep %setup -n idzebra-%{version} %build CFLAGS="$RPM_OPT_FLAGS" \ ./configure --prefix=/usr --enable-shared --with-yaz=/usr/bin make CFLAGS="$RPM_OPT_FLAGS" %install rm -fr ${RPM_BUILD_ROOT} make prefix=${RPM_BUILD_ROOT}/usr mandir=${RPM_BUILD_ROOT}/usr/share/man install rm ${RPM_BUILD_ROOT}/usr/lib/*.la rm ${RPM_BUILD_ROOT}/usr/bin/zebraidx rm ${RPM_BUILD_ROOT}/usr/share/man/man1/zebraidx.* rm ${RPM_BUILD_ROOT}/usr/bin/zebrasrv rm ${RPM_BUILD_ROOT}/usr/share/man/man8/zebrasrv.* rm ${RPM_BUILD_ROOT}/usr/share/man/man1/idzebra-config.* %clean rm -fr ${RPM_BUILD_ROOT} %files %defattr(-,root,root) %doc README LICENSE.zebra NEWS %config /usr/share/idzebra-2.0/tab /usr/bin/zebrasrv-* /usr/bin/zebraidx-* /usr/share/doc/idzebra-2.0 /usr/share/man/*/zebraidx-* /usr/share/man/*/zebrasrv-* /usr/share/idzebra-2.0-examples %files -n lib%{name} /usr/lib/*.so.* %files -n lib%{name}-modules /usr/lib/idzebra-2.0/modules/* %files -n lib%{name}-devel /usr/bin/idzebra-config-* /usr/include/idzebra-2.0/* /usr/lib/*.so /usr/lib/*.a /usr/share/man/*/idzebra-config-* /usr/share/aclocal/*.m4 idzebra-2.0.44/configure0000755000175000017500000151601011412336426012057 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.65 for idzebra 2.0.44. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: zebra-help@indexdata.dk about your system, including $0: any error possibly output before this message. Then $0: install a modern shell, or manually run the script $0: under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac ECHO=${lt_ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF $* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='idzebra' PACKAGE_TARNAME='idzebra' PACKAGE_VERSION='2.0.44' PACKAGE_STRING='idzebra 2.0.44' PACKAGE_BUGREPORT='zebra-help@indexdata.dk' PACKAGE_URL='' ac_unique_file="configure.ac" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS VERSION_SHA1 VERSION_HEX WIN_FILEVERSION IDZEBRA_BUILD_ROOT IDZEBRA_SRC_ROOT STATIC_MODULE_LADD STATIC_MODULE_OBJ SHARED_MODULE_LA EXPAT_LIBS ac_prefix_program XSL_DIR DSSSL_DIR DTD_DIR PDF_COMPILE TKL_COMPILE HTML_COMPILE MAN_COMPILE XSLTPROC_COMPILE yazconfig YAZVERSION YAZINC YAZLALIB YAZLIB OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL lt_ECHO RANLIB AR OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC ZEBRA_CFLAGS READLINE_LIBS TCL_LIB TCL_INCLUDE main_zebralib ZEBRALIBS_VERSION_INFO PACKAGE_SUFFIX am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_gnu_ld enable_libtool_lock with_yaz with_docbook_dtd with_docbook_dsssl with_docbook_xsl with_tclconfig with_iconv with_expat enable_largefile enable_mod_text enable_mod_grs_regx enable_mod_grs_marc enable_mod_grs_xml enable_mod_dom enable_mod_alvis enable_mod_safari ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error "unrecognized option: \`$ac_option' Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures idzebra 2.0.44 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/idzebra] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of idzebra 2.0.44:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-largefile omit support for large files --enable-mod-text Text filter --enable-mod-grs-regx REGX/TCL filter --enable-mod-grs-marc MARC filter --enable-mod-grs-xml XML filter (Expat based) --enable-mod-dom XML/XSLT filter (Requires libxslt) --enable-mod-alvis ALVIS filter (Requires libxslt) --enable-mod-safari Safari filter (DBC) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-yaz=DIR use yaz-config in DIR (example /home/yaz-1.7) --with-docbook-dtd=DIR use docbookx.dtd in DIR --with-docbook-dsssl=DIR use Docbook DSSSL in DIR/{html,print}/docbook.dsl --with-docbook-xsl=DIR use Docbook XSL in DIR/{htmlhelp,xhtml} --with-tclconfig=DIR tclConfig.sh in DIR --with-iconv=DIR iconv library in DIR --with-expat=DIR EXPAT library in DIR Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF idzebra configure 2.0.44 generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( cat <<\_ASBOX ## -------------------------------------- ## ## Report this to zebra-help@indexdata.dk ## ## -------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by idzebra $as_me 2.0.44, which was generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in config "$srcdir"/config; do for ac_t in install-sh install.sh shtool; do if test -f "$ac_dir/$ac_t"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/$ac_t -c" break 2 fi done done if test -z "$ac_aux_dir"; then as_fn_error "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='idzebra' VERSION='2.0.44' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' PACKAGE_SUFFIX="-2.0" ZEBRALIBS_VERSION_INFO=0:1:0 main_zebralib=index/libidzebra${PACKAGE_SUFFIX}.la ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "no acceptable C compiler found in \$PATH See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of object files: cannot compile See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.2.6b' macro_revision='1.3017' ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${ac_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if test "${ac_cv_path_FGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test "${lt_cv_path_NM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$ac_tool_prefix"; then for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if test "${lt_cv_nm_interface+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:4726: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:4729: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:4732: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 5938 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7331: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7335: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7670: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7674: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7775: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:7779: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7830: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:7834: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu) link_all_deplibs=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo(void) {} _ACEOF if ac_fn_c_try_link "$LINENO"; then : archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 10214 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 10310 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: cat >>confdefs.h <<_ACEOF #define HOST_TRIPLET "${host}" _ACEOF for ac_header in sys/resource.h sys/time.h sys/wait.h sys/utsname.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5 $as_echo_n "checking for crypt in -lcrypt... " >&6; } if test "${ac_cv_lib_crypt_crypt+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char crypt (); int main () { return crypt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_crypt_crypt=yes else ac_cv_lib_crypt_crypt=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5 $as_echo "$ac_cv_lib_crypt_crypt" >&6; } if test "x$ac_cv_lib_crypt_crypt" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPT 1 _ACEOF LIBS="-lcrypt $LIBS" fi if test "$ac_cv_lib_crypt_crypt" = "yes"; then for ac_header in crypt.h do : ac_fn_c_check_header_mongrel "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default" if test "x$ac_cv_header_crypt_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CRYPT_H 1 _ACEOF fi done fi yazconfig=NONE yazpath=NONE # Check whether --with-yaz was given. if test "${with_yaz+set}" = set; then : withval=$with_yaz; yazpath=$withval fi if test "x$yazpath" != "xNONE"; then yazconfig=$yazpath/yaz-config else if test "x$srcdir" = "x"; then yazsrcdir=. else yazsrcdir=$srcdir fi for i in ${yazsrcdir}/../../yaz ${yazsrcdir}/../yaz-* ${yazsrcdir}/../yaz; do if test -d $i; then if test -r $i/yaz-config; then yazconfig=$i/yaz-config fi fi done if test "x$yazconfig" = "xNONE"; then # Extract the first word of "yaz-config", so it can be a program name with args. set dummy yaz-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_yazconfig+set}" = set; then : $as_echo_n "(cached) " >&6 else case $yazconfig in [\\/]* | ?:[\\/]*) ac_cv_path_yazconfig="$yazconfig" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_yazconfig="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_yazconfig" && ac_cv_path_yazconfig="NONE" ;; esac fi yazconfig=$ac_cv_path_yazconfig if test -n "$yazconfig"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $yazconfig" >&5 $as_echo "$yazconfig" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAZ" >&5 $as_echo_n "checking for YAZ... " >&6; } if $yazconfig --version >/dev/null 2>&1; then YAZLIB=`$yazconfig --libs server icu` # if this is empty, it's a simple version YAZ 1.6 script # so we have to source it instead... if test "X$YAZLIB" = "X"; then . $yazconfig else YAZLALIB=`$yazconfig --lalibs server icu` YAZINC=`$yazconfig --cflags server icu` YAZVERSION=`$yazconfig --version` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $yazconfig" >&5 $as_echo "$yazconfig" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found" >&5 $as_echo "Not found" >&6; } YAZVERSION=NONE fi if test "X$YAZVERSION" != "XNONE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAZ version" >&5 $as_echo_n "checking for YAZ version... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YAZVERSION" >&5 $as_echo "$YAZVERSION" >&6; } if test "3.0.17"; then have_yaz_version=`echo "$YAZVERSION" | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` req_yaz_version=`echo "3.0.17" | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` if test "$have_yaz_version" -lt "$req_yaz_version"; then as_fn_error "$YAZVERSION. Requires YAZ 3.0.17 or later" "$LINENO" 5 fi fi fi if test "$YAZVERSION" = "NONE"; then as_fn_error "YAZ development libraries required" "$LINENO" 5 fi if test -n "$docdir"; then docdir="${datadir}/doc/${PACKAGE}" fi XSLTPROC_COMPILE='xsltproc -path ".:$(srcdir)"' MAN_COMPILE='$(XSLTPROC_COMPILE) $(srcdir)/common/id.man.xsl' HTML_COMPILE='$(XSLTPROC_COMPILE) $(srcdir)/common/id.htmlhelp.xsl' TKL_COMPILE='$(XSLTPROC_COMPILE) $(srcdir)/common/id.tkl.xsl' PDF_COMPILE='dblatex -P latex.class.options=a4paper,12pt,twoside,openright' # Check whether --with-docbook-dtd was given. if test "${with_docbook_dtd+set}" = set; then : withval=$with_docbook_dtd; if test -f "$withval/docbookx.dtd"; then DTD_DIR=$withval fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for docbookx.dtd" >&5 $as_echo_n "checking for docbookx.dtd... " >&6; } DTD_DIR="" for d in /usr/lib/sgml/dtd/docbook-xml \ /usr/share/sgml/docbook/dtd/4.2 \ /usr/share/sgml/docbook/dtd/xml/4.* \ /usr/share/sgml/docbook/xml-dtd-4.* \ /usr/local/share/xml/docbook/4.* do if test -f $d/docbookx.dtd; then DTD_DIR=$d fi done if test -z "$DTD_DIR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found" >&5 $as_echo "Not found" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5 $as_echo "$d" >&6; } fi fi # Check whether --with-docbook-dsssl was given. if test "${with_docbook_dsssl+set}" = set; then : withval=$with_docbook_dsssl; if test -f "$withval/html/docbook.dsl"; then DSSSL_DIR=$withval fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for docbook.dsl" >&5 $as_echo_n "checking for docbook.dsl... " >&6; } DSSSL_DIR="" for d in /usr/share/sgml/docbook/stylesheet/dsssl/modular \ /usr/share/sgml/docbook/dsssl-stylesheets-1.* \ /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh \ /usr/local/share/sgml/docbook/dsssl/modular do if test -f $d/html/docbook.dsl; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5 $as_echo "$d" >&6; } DSSSL_DIR=$d break fi done if test -z "$DSSSL_DIR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found" >&5 $as_echo "Not found" >&6; } fi fi # Check whether --with-docbook-xsl was given. if test "${with_docbook_xsl+set}" = set; then : withval=$with_docbook_xsl; if test -f "$withval/htmlhelp/htmlhelp.xsl"; then XSL_DIR=$withval fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlhelp.xsl" >&5 $as_echo_n "checking for htmlhelp.xsl... " >&6; } for d in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh \ /usr/local/share/xsl/docbook \ /usr/share/sgml/docbook/xsl-stylesheets-1.* do if test -f $d/htmlhelp/htmlhelp.xsl; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5 $as_echo "$d" >&6; } XSL_DIR=$d break fi done if test -z "$XSL_DIR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found" >&5 $as_echo "Not found" >&6; } fi fi TCL_LIB="" TCL_INCLUDE="" tclconfig=NONE # Check whether --with-tclconfig was given. if test "${with_tclconfig+set}" = set; then : withval=$with_tclconfig; tclconfig=$withval fi if test "x$tclconfig" = xNONE; then saveprefix=${prefix} if test "x$prefix" = xNONE; then $as_echo_n "checking for prefix by " >&6 # Extract the first word of "tclsh", so it can be a program name with args. set dummy tclsh; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_prefix_program+set}" = set; then : $as_echo_n "(cached) " >&6 else case $ac_prefix_program in [\\/]* | ?:[\\/]*) ac_cv_path_ac_prefix_program="$ac_prefix_program" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_prefix_program="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_prefix_program=$ac_cv_path_ac_prefix_program if test -n "$ac_prefix_program"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prefix_program" >&5 $as_echo "$ac_prefix_program" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "$ac_prefix_program"; then prefix=`$as_dirname -- "$ac_prefix_program" || $as_expr X"$ac_prefix_program" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_prefix_program" : 'X\(//\)[^/]' \| \ X"$ac_prefix_program" : 'X\(//\)$' \| \ X"$ac_prefix_program" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_prefix_program" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` prefix=`$as_dirname -- "$prefix" || $as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$prefix" : 'X\(//\)[^/]' \| \ X"$prefix" : 'X\(//\)$' \| \ X"$prefix" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$prefix" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` fi fi tclconfig=${prefix}/lib prefix=${saveprefix} if test ! -r ${tclconfig}/tclConfig.sh; then # Not found, try search for Tcl on Debian systems. for d in /usr/lib/tcl*; do if test -f $d/tclConfig.sh; then tclconfig=$d fi done fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl" >&5 $as_echo_n "checking for Tcl... " >&6; } if test -r ${tclconfig}/tclConfig.sh; then . ${tclconfig}/tclConfig.sh if test -r ${tclconfig}/../generic/tcl.h; then TCL_INCLUDE=-I${tclconfig}/../generic TCL_LIB="$TCL_BUILD_LIB_SPEC $TCL_LIBS" elif test -d ${TCL_PREFIX}/include/tcl${TCL_VERSION}; then TCL_INCLUDE=-I${TCL_PREFIX}/include/tcl${TCL_VERSION} TCL_LIB="$TCL_LIB_SPEC $TCL_LIBS" else TCL_INCLUDE=-I${TCL_PREFIX}/include TCL_LIB="$TCL_LIB_SPEC $TCL_LIBS" fi TCL_LIB=`echo $TCL_LIB|sed 's%-L/usr/lib%%g'` SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS SHLIB_LD=$TCL_SHLIB_LD SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX SHLIB_VERSION=$TCL_SHLIB_VERSION { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_VERSION" >&5 $as_echo "$TCL_VERSION" >&6; } old_CPPFLAGS=$CPPFLAGS CPPFLAGS="${TCL_INCLUDE} $CPPFLAGS" for ac_header in tcl.h do : ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default" if test "x$ac_cv_header_tcl_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TCL_H 1 _ACEOF fi done CPPFLAGS=${old_CPPFLAGS} # The Mac OSX -framework causes problems with Libtool # and dependancy libs.. so apply Tcl libs everywhere bug #461 case $host in *-*-darwin*) LIBS="$LIBS $TCL_LIB"; ;; esac else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found" >&5 $as_echo "Not found" >&6; } $as_echo "#define HAVE_TCL_H 0" >>confdefs.h fi for ac_func in mkstemp atoll do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" eval as_val=\$$as_ac_var if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done READLINE_SHARED_LIBADD="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5 $as_echo_n "checking for tgetent in -lncurses... " >&6; } if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ncurses_tgetent=yes else ac_cv_lib_ncurses_tgetent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5 $as_echo "$ac_cv_lib_ncurses_tgetent" >&6; } if test "x$ac_cv_lib_ncurses_tgetent" = x""yes; then : READLINE_SHARED_LIBADD="-lncurses" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5 $as_echo_n "checking for tgetent in -ltermcap... " >&6; } if test "${ac_cv_lib_termcap_tgetent+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltermcap $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_termcap_tgetent=yes else ac_cv_lib_termcap_tgetent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5 $as_echo "$ac_cv_lib_termcap_tgetent" >&6; } if test "x$ac_cv_lib_termcap_tgetent" = x""yes; then : READLINE_SHARED_LIBADD="-ltermcap" fi fi READLINE_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } if test "${ac_cv_lib_readline_readline+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $READLINE_SHARED_LIBADD $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char readline (); int main () { return readline (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_readline_readline=yes else ac_cv_lib_readline_readline=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } if test "x$ac_cv_lib_readline_readline" = x""yes; then : READLINE_LIBS="$READLINE_LIBS -lreadline $READLINE_SHARED_LIBADD" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for add_history in -lhistory" >&5 $as_echo_n "checking for add_history in -lhistory... " >&6; } if test "${ac_cv_lib_history_add_history+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhistory $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char add_history (); int main () { return add_history (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_history_add_history=yes else ac_cv_lib_history_add_history=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_history_add_history" >&5 $as_echo "$ac_cv_lib_history_add_history" >&6; } if test "x$ac_cv_lib_history_add_history" = x""yes; then : READLINE_LIBS="$READLINE_LIBS -lhistory" fi if test "$ac_cv_lib_readline_readline" = "yes"; then for ac_header in readline/readline.h readline/history.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done xLIBS=$LIBS LIBS="$LIBS $READLINE_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { rl_attempted_completion_over = 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : $as_echo "#define HAVE_READLINE_COMPLETION_OVER 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { rl_completion_matches (0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : $as_echo "#define HAVE_READLINE_RL_COMPLETION_MATCHES 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$xLIBS fi # Check whether --with-iconv was given. if test "${with_iconv+set}" = set; then : withval=$with_iconv; fi if test "$with_iconv" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } oldLIBS="$LIBS" oldCPPFLAGS="${CPPFLAGS}" if test "$with_iconv" != "yes" -a "$with_iconv" != ""; then LIBS="$LIBS -L${with_iconv}/lib" CPPFLAGS="${CPPFLAGS} -I${with_iconv}/include" fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { iconv_t t = iconv_open("", ""); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : $as_echo "#define HAVE_ICONV_H 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else LIBS="$LIBS -liconv" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { iconv_t t = iconv_open("", ""); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : $as_echo "#define HAVE_ICONV_H 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else LIBS="$oldLIBS" CPPFLAGS="$oldCPPFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bzCompressInit in -lbz2" >&5 $as_echo_n "checking for bzCompressInit in -lbz2... " >&6; } if test "${ac_cv_lib_bz2_bzCompressInit+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbz2 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bzCompressInit (); int main () { return bzCompressInit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bz2_bzCompressInit=yes else ac_cv_lib_bz2_bzCompressInit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_bzCompressInit" >&5 $as_echo "$ac_cv_lib_bz2_bzCompressInit" >&6; } if test "x$ac_cv_lib_bz2_bzCompressInit" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBBZ2 1 _ACEOF LIBS="-lbz2 $LIBS" fi if test "$ac_cv_lib_bz2_bzCompressInit" = "yes"; then for ac_header in bzlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default" if test "x$ac_cv_header_bzlib_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BZLIB_H 1 _ACEOF fi done else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzCompressInit in -lbz2" >&5 $as_echo_n "checking for BZ2_bzCompressInit in -lbz2... " >&6; } if test "${ac_cv_lib_bz2_BZ2_bzCompressInit+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbz2 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char BZ2_bzCompressInit (); int main () { return BZ2_bzCompressInit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bz2_BZ2_bzCompressInit=yes else ac_cv_lib_bz2_BZ2_bzCompressInit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzCompressInit" >&5 $as_echo "$ac_cv_lib_bz2_BZ2_bzCompressInit" >&6; } if test "x$ac_cv_lib_bz2_BZ2_bzCompressInit" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBBZ2 1 _ACEOF LIBS="-lbz2 $LIBS" fi if test "$ac_cv_lib_bz2_BZ2_bzCompressInit" = "yes"; then for ac_header in bzlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default" if test "x$ac_cv_header_bzlib_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BZLIB_H 1 _ACEOF fi done fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress2 in -lz" >&5 $as_echo_n "checking for compress2 in -lz... " >&6; } if test "${ac_cv_lib_z_compress2+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char compress2 (); int main () { return compress2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_compress2=yes else ac_cv_lib_z_compress2=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress2" >&5 $as_echo "$ac_cv_lib_z_compress2" >&6; } if test "x$ac_cv_lib_z_compress2" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBZ 1 _ACEOF LIBS="-lz $LIBS" fi if test "$ac_cv_lib_z_compress2" = "yes"; then for ac_header in zlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" if test "x$ac_cv_header_zlib_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ZLIB_H 1 _ACEOF fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 $as_echo_n "checking for sqrt in -lm... " >&6; } if test "${ac_cv_lib_m_sqrt+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sqrt (); int main () { return sqrt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_sqrt=yes else ac_cv_lib_m_sqrt=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 $as_echo "$ac_cv_lib_m_sqrt" >&6; } if test "x$ac_cv_lib_m_sqrt" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF LIBS="-ldl $LIBS" fi expat=yes # Check whether --with-expat was given. if test "${with_expat+set}" = set; then : withval=$with_expat; expat=$withval fi if test "$expat" != "no"; then xLIBS="$LIBS"; xCFLAGS="$CFLAGS"; if test "$expat" != "yes"; then EXPAT_CFLAGS="-I$expat/include" EXPAT_LIBS="-L$expat/lib" CFLAGS="$EXPAT_CFLAGS $CFLAGS" LIBS="$EXPAT_LIBS $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML_ParserCreate in -lexpat" >&5 $as_echo_n "checking for XML_ParserCreate in -lexpat... " >&6; } if test "${ac_cv_lib_expat_XML_ParserCreate+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lexpat $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XML_ParserCreate (); int main () { return XML_ParserCreate (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_expat_XML_ParserCreate=yes else ac_cv_lib_expat_XML_ParserCreate=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_expat_XML_ParserCreate" >&5 $as_echo "$ac_cv_lib_expat_XML_ParserCreate" >&6; } if test "x$ac_cv_lib_expat_XML_ParserCreate" = x""yes; then : EXPAT_LIBS="$EXPAT_LIBS -lexpat" fi if test "$ac_cv_lib_expat_XML_ParserCreate" = "yes"; then for ac_header in expat.h do : ac_fn_c_check_header_mongrel "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default" if test "x$ac_cv_header_expat_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_EXPAT_H 1 _ACEOF fi done fi LIBS="$xLIBS" CFLAGS="$xCFLAGS" fi # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if test "${ac_cv_sys_largefile_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if test "${ac_cv_sys_file_offset_bits+set}" = set; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if test "${ac_cv_sys_large_files+set}" = set; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" if test "x$ac_cv_type_long_long" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LONG_LONG 1 _ACEOF fi if test "${ac_cv_type_long_long}" = "yes"; then ZINT_VALUE=1 else ZINT_VALUE=0 fi ZEBRA_CFLAGS="-DZEBRA_ZINT=${ZINT_VALUE}" cat >>confdefs.h <<_ACEOF #define ZEBRA_ZINT ${ZINT_VALUE} _ACEOF SHARED_MODULE_LA="" STATIC_MODULE_OBJ="" STATIC_MODULE_LADD="" $as_echo "#define IDZEBRA_STATIC_GRS_SGML 1" >>confdefs.h # Check whether --enable-mod-text was given. if test "${enable_mod_text+set}" = set; then : enableval=$enable_mod_text; myen=$enableval else myen=shared fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for module text" >&5 $as_echo_n "checking for module text... " >&6; } if test "$myen" = "yes"; then myen="shared" fi if test "$enable_shared" != "yes"; then if test "$myen" = "shared"; then myen="static" fi fi m=`echo text|tr .- __` if test "$myen" = "no" -o "$myen" = "disabled"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 $as_echo "disabled" >&6; } elif test "shared" = "disabled"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 $as_echo "disabled" >&6; } as_fn_error "Cannot enable mod-text because of missing libs (XML, etc)" "$LINENO" 5 elif test "$myen" = "shared"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5 $as_echo "shared" >&6; } SHARED_MODULE_LA="${SHARED_MODULE_LA} mod-text.la" elif test "$myen" = "static"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 $as_echo "static" >&6; } STATIC_MODULE_OBJ="${STATIC_MODULE_OBJ} \$(mod_${m}_la_OBJECTS)" STATIC_MODULE_LADD="${STATIC_MODULE_LADD} \$(mod_${m}_la_LADD)" modcpp=`echo text|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_` cat >>confdefs.h <<_ACEOF #define IDZEBRA_STATIC_$modcpp 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $myen" >&5 $as_echo "$myen" >&6; } as_fn_error "invalid --enable-mod-text value. Use on,off,static or shared" "$LINENO" 5 fi # Check whether --enable-mod-grs-regx was given. if test "${enable_mod_grs_regx+set}" = set; then : enableval=$enable_mod_grs_regx; myen=$enableval else myen=shared fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for module grs-regx" >&5 $as_echo_n "checking for module grs-regx... " >&6; } if test "$myen" = "yes"; then myen="shared" fi if test "$enable_shared" != "yes"; then if test "$myen" = "shared"; then myen="static" fi fi m=`echo grs-regx|tr .- __` if test "$myen" = "no" -o "$myen" = "disabled"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 $as_echo "disabled" >&6; } elif test "shared" = "disabled"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 $as_echo "disabled" >&6; } as_fn_error "Cannot enable mod-grs-regx because of missing libs (XML, etc)" "$LINENO" 5 elif test "$myen" = "shared"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5 $as_echo "shared" >&6; } SHARED_MODULE_LA="${SHARED_MODULE_LA} mod-grs-regx.la" elif test "$myen" = "static"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 $as_echo "static" >&6; } STATIC_MODULE_OBJ="${STATIC_MODULE_OBJ} \$(mod_${m}_la_OBJECTS)" STATIC_MODULE_LADD="${STATIC_MODULE_LADD} \$(mod_${m}_la_LADD)" modcpp=`echo grs-regx|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_` cat >>confdefs.h <<_ACEOF #define IDZEBRA_STATIC_$modcpp 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $myen" >&5 $as_echo "$myen" >&6; } as_fn_error "invalid --enable-mod-grs-regx value. Use on,off,static or shared" "$LINENO" 5 fi # Check whether --enable-mod-grs-marc was given. if test "${enable_mod_grs_marc+set}" = set; then : enableval=$enable_mod_grs_marc; myen=$enableval else myen=shared fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for module grs-marc" >&5 $as_echo_n "checking for module grs-marc... " >&6; } if test "$myen" = "yes"; then myen="shared" fi if test "$enable_shared" != "yes"; then if test "$myen" = "shared"; then myen="static" fi fi m=`echo grs-marc|tr .- __` if test "$myen" = "no" -o "$myen" = "disabled"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 $as_echo "disabled" >&6; } elif test "shared" = "disabled"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 $as_echo "disabled" >&6; } as_fn_error "Cannot enable mod-grs-marc because of missing libs (XML, etc)" "$LINENO" 5 elif test "$myen" = "shared"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5 $as_echo "shared" >&6; } SHARED_MODULE_LA="${SHARED_MODULE_LA} mod-grs-marc.la" elif test "$myen" = "static"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 $as_echo "static" >&6; } STATIC_MODULE_OBJ="${STATIC_MODULE_OBJ} \$(mod_${m}_la_OBJECTS)" STATIC_MODULE_LADD="${STATIC_MODULE_LADD} \$(mod_${m}_la_LADD)" modcpp=`echo grs-marc|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_` cat >>confdefs.h <<_ACEOF #define IDZEBRA_STATIC_$modcpp 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $myen" >&5 $as_echo "$myen" >&6; } as_fn_error "invalid --enable-mod-grs-marc value. Use on,off,static or shared" "$LINENO" 5 fi if test "$ac_cv_header_expat_h" = "yes"; then def="shared" else def="disabled" fi # Check whether --enable-mod-grs-xml was given. if test "${enable_mod_grs_xml+set}" = set; then : enableval=$enable_mod_grs_xml; myen=$enableval else myen=$def fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for module grs-xml" >&5 $as_echo_n "checking for module grs-xml... " >&6; } if test "$myen" = "yes"; then myen="shared" fi if test "$enable_shared" != "yes"; then if test "$myen" = "shared"; then myen="static" fi fi m=`echo grs-xml|tr .- __` if test "$myen" = "no" -o "$myen" = "disabled"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 $as_echo "disabled" >&6; } elif test "$def" = "disabled"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 $as_echo "disabled" >&6; } as_fn_error "Cannot enable mod-grs-xml because of missing libs (XML, etc)" "$LINENO" 5 elif test "$myen" = "shared"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5 $as_echo "shared" >&6; } SHARED_MODULE_LA="${SHARED_MODULE_LA} mod-grs-xml.la" elif test "$myen" = "static"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 $as_echo "static" >&6; } STATIC_MODULE_OBJ="${STATIC_MODULE_OBJ} \$(mod_${m}_la_OBJECTS)" STATIC_MODULE_LADD="${STATIC_MODULE_LADD} \$(mod_${m}_la_LADD)" modcpp=`echo grs-xml|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_` cat >>confdefs.h <<_ACEOF #define IDZEBRA_STATIC_$modcpp 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $myen" >&5 $as_echo "$myen" >&6; } as_fn_error "invalid --enable-mod-grs-xml value. Use on,off,static or shared" "$LINENO" 5 fi oldCPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $YAZINC" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if YAZ_HAVE_XML2 #include #include #include #include #include #include #else #error Libxml2 not available #endif int main () { #if LIBXML_VERSION < 20615 #error Libxml2 version < 2.6.15. xmlreader not reliable/present #endif ; return 0; } _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : def="shared" else def="disabled" fi rm -f conftest.err conftest.$ac_ext CPPFLAGS=$oldCPPFLAGS # Check whether --enable-mod-dom was given. if test "${enable_mod_dom+set}" = set; then : enableval=$enable_mod_dom; myen=$enableval else myen=$def fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for module dom" >&5 $as_echo_n "checking for module dom... " >&6; } if test "$myen" = "yes"; then myen="shared" fi if test "$enable_shared" != "yes"; then if test "$myen" = "shared"; then myen="static" fi fi m=`echo dom|tr .- __` if test "$myen" = "no" -o "$myen" = "disabled"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 $as_echo "disabled" >&6; } elif test "$def" = "disabled"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 $as_echo "disabled" >&6; } as_fn_error "Cannot enable mod-dom because of missing libs (XML, etc)" "$LINENO" 5 elif test "$myen" = "shared"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5 $as_echo "shared" >&6; } SHARED_MODULE_LA="${SHARED_MODULE_LA} mod-dom.la" elif test "$myen" = "static"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 $as_echo "static" >&6; } STATIC_MODULE_OBJ="${STATIC_MODULE_OBJ} \$(mod_${m}_la_OBJECTS)" STATIC_MODULE_LADD="${STATIC_MODULE_LADD} \$(mod_${m}_la_LADD)" modcpp=`echo dom|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_` cat >>confdefs.h <<_ACEOF #define IDZEBRA_STATIC_$modcpp 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $myen" >&5 $as_echo "$myen" >&6; } as_fn_error "invalid --enable-mod-dom value. Use on,off,static or shared" "$LINENO" 5 fi # Check whether --enable-mod-alvis was given. if test "${enable_mod_alvis+set}" = set; then : enableval=$enable_mod_alvis; myen=$enableval else myen=$def fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for module alvis" >&5 $as_echo_n "checking for module alvis... " >&6; } if test "$myen" = "yes"; then myen="shared" fi if test "$enable_shared" != "yes"; then if test "$myen" = "shared"; then myen="static" fi fi m=`echo alvis|tr .- __` if test "$myen" = "no" -o "$myen" = "disabled"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 $as_echo "disabled" >&6; } elif test "$def" = "disabled"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 $as_echo "disabled" >&6; } as_fn_error "Cannot enable mod-alvis because of missing libs (XML, etc)" "$LINENO" 5 elif test "$myen" = "shared"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5 $as_echo "shared" >&6; } SHARED_MODULE_LA="${SHARED_MODULE_LA} mod-alvis.la" elif test "$myen" = "static"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 $as_echo "static" >&6; } STATIC_MODULE_OBJ="${STATIC_MODULE_OBJ} \$(mod_${m}_la_OBJECTS)" STATIC_MODULE_LADD="${STATIC_MODULE_LADD} \$(mod_${m}_la_LADD)" modcpp=`echo alvis|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_` cat >>confdefs.h <<_ACEOF #define IDZEBRA_STATIC_$modcpp 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $myen" >&5 $as_echo "$myen" >&6; } as_fn_error "invalid --enable-mod-alvis value. Use on,off,static or shared" "$LINENO" 5 fi # Check whether --enable-mod-safari was given. if test "${enable_mod_safari+set}" = set; then : enableval=$enable_mod_safari; myen=$enableval else myen=shared fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for module safari" >&5 $as_echo_n "checking for module safari... " >&6; } if test "$myen" = "yes"; then myen="shared" fi if test "$enable_shared" != "yes"; then if test "$myen" = "shared"; then myen="static" fi fi m=`echo safari|tr .- __` if test "$myen" = "no" -o "$myen" = "disabled"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 $as_echo "disabled" >&6; } elif test "shared" = "disabled"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 $as_echo "disabled" >&6; } as_fn_error "Cannot enable mod-safari because of missing libs (XML, etc)" "$LINENO" 5 elif test "$myen" = "shared"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5 $as_echo "shared" >&6; } SHARED_MODULE_LA="${SHARED_MODULE_LA} mod-safari.la" elif test "$myen" = "static"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 $as_echo "static" >&6; } STATIC_MODULE_OBJ="${STATIC_MODULE_OBJ} \$(mod_${m}_la_OBJECTS)" STATIC_MODULE_LADD="${STATIC_MODULE_LADD} \$(mod_${m}_la_LADD)" modcpp=`echo safari|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_` cat >>confdefs.h <<_ACEOF #define IDZEBRA_STATIC_$modcpp 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $myen" >&5 $as_echo "$myen" >&6; } as_fn_error "invalid --enable-mod-safari value. Use on,off,static or shared" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi if test "$ac_cv_header_stdc" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your system does not seem to support ANSI C" >&5 $as_echo "$as_me: WARNING: Your system does not seem to support ANSI C" >&2;} fi IDZEBRA_SRC_ROOT=`cd ${srcdir}; pwd` IDZEBRA_BUILD_ROOT=`pwd` WIN_FILEVERSION=`echo $PACKAGE_VERSION | $AWK 'BEGIN { FS = "."; } { m = $4; printf("%d,%d,%d,%d", $1, $2, $3 == "" ? "0" : $3, $4 == "" ? "1" : $4);}'` VERSION_HEX=`echo $PACKAGE_VERSION | $AWK 'BEGIN { FS = "."; } { printf("%x", ($1 * 256 + $2) * 256 + $3);}'` if test -d ${srcdir}/.git; then VERSION_SHA1=`git show --pretty=format:%H|head -1` else VERSION_SHA1=`head -1 ${srcdir}/ChangeLog|awk '{print $2}'` fi ac_config_files="$ac_config_files Makefile util/Makefile bfile/Makefile dfa/Makefile dict/Makefile isamb/Makefile isams/Makefile isamc/Makefile rset/Makefile data1/Makefile index/Makefile include/Makefile include/idzebra/Makefile tab/Makefile doc/Makefile doc/local.ent doc/common/Makefile doc/common/print.dsl test/Makefile test/gils/Makefile test/usmarc/Makefile test/api/Makefile test/xslt/Makefile test/xpath/Makefile test/rusmarc/Makefile test/cddb/Makefile test/malxml/Makefile test/mbox/Makefile test/config/Makefile test/xelm/Makefile test/dmoz/Makefile test/zsh/Makefile test/marcxml/Makefile test/charmap/Makefile test/codec/Makefile test/espec/Makefile test/filters/Makefile examples/Makefile examples/gils/Makefile examples/marc21/Makefile examples/marcxml/Makefile examples/oai-pmh/Makefile examples/zthes/Makefile idzebra.spec idzebra-config-2.0 Doxyfile win/version.nsi include/idzebra/version.h" ac_config_commands="$ac_config_commands default" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by idzebra $as_me 2.0.44, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ idzebra config.status 2.0.44 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ AR \ AR_FLAGS \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ SHELL \ ECHO \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` ;; esac ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "util/Makefile") CONFIG_FILES="$CONFIG_FILES util/Makefile" ;; "bfile/Makefile") CONFIG_FILES="$CONFIG_FILES bfile/Makefile" ;; "dfa/Makefile") CONFIG_FILES="$CONFIG_FILES dfa/Makefile" ;; "dict/Makefile") CONFIG_FILES="$CONFIG_FILES dict/Makefile" ;; "isamb/Makefile") CONFIG_FILES="$CONFIG_FILES isamb/Makefile" ;; "isams/Makefile") CONFIG_FILES="$CONFIG_FILES isams/Makefile" ;; "isamc/Makefile") CONFIG_FILES="$CONFIG_FILES isamc/Makefile" ;; "rset/Makefile") CONFIG_FILES="$CONFIG_FILES rset/Makefile" ;; "data1/Makefile") CONFIG_FILES="$CONFIG_FILES data1/Makefile" ;; "index/Makefile") CONFIG_FILES="$CONFIG_FILES index/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "include/idzebra/Makefile") CONFIG_FILES="$CONFIG_FILES include/idzebra/Makefile" ;; "tab/Makefile") CONFIG_FILES="$CONFIG_FILES tab/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/local.ent") CONFIG_FILES="$CONFIG_FILES doc/local.ent" ;; "doc/common/Makefile") CONFIG_FILES="$CONFIG_FILES doc/common/Makefile" ;; "doc/common/print.dsl") CONFIG_FILES="$CONFIG_FILES doc/common/print.dsl" ;; "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "test/gils/Makefile") CONFIG_FILES="$CONFIG_FILES test/gils/Makefile" ;; "test/usmarc/Makefile") CONFIG_FILES="$CONFIG_FILES test/usmarc/Makefile" ;; "test/api/Makefile") CONFIG_FILES="$CONFIG_FILES test/api/Makefile" ;; "test/xslt/Makefile") CONFIG_FILES="$CONFIG_FILES test/xslt/Makefile" ;; "test/xpath/Makefile") CONFIG_FILES="$CONFIG_FILES test/xpath/Makefile" ;; "test/rusmarc/Makefile") CONFIG_FILES="$CONFIG_FILES test/rusmarc/Makefile" ;; "test/cddb/Makefile") CONFIG_FILES="$CONFIG_FILES test/cddb/Makefile" ;; "test/malxml/Makefile") CONFIG_FILES="$CONFIG_FILES test/malxml/Makefile" ;; "test/mbox/Makefile") CONFIG_FILES="$CONFIG_FILES test/mbox/Makefile" ;; "test/config/Makefile") CONFIG_FILES="$CONFIG_FILES test/config/Makefile" ;; "test/xelm/Makefile") CONFIG_FILES="$CONFIG_FILES test/xelm/Makefile" ;; "test/dmoz/Makefile") CONFIG_FILES="$CONFIG_FILES test/dmoz/Makefile" ;; "test/zsh/Makefile") CONFIG_FILES="$CONFIG_FILES test/zsh/Makefile" ;; "test/marcxml/Makefile") CONFIG_FILES="$CONFIG_FILES test/marcxml/Makefile" ;; "test/charmap/Makefile") CONFIG_FILES="$CONFIG_FILES test/charmap/Makefile" ;; "test/codec/Makefile") CONFIG_FILES="$CONFIG_FILES test/codec/Makefile" ;; "test/espec/Makefile") CONFIG_FILES="$CONFIG_FILES test/espec/Makefile" ;; "test/filters/Makefile") CONFIG_FILES="$CONFIG_FILES test/filters/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "examples/gils/Makefile") CONFIG_FILES="$CONFIG_FILES examples/gils/Makefile" ;; "examples/marc21/Makefile") CONFIG_FILES="$CONFIG_FILES examples/marc21/Makefile" ;; "examples/marcxml/Makefile") CONFIG_FILES="$CONFIG_FILES examples/marcxml/Makefile" ;; "examples/oai-pmh/Makefile") CONFIG_FILES="$CONFIG_FILES examples/oai-pmh/Makefile" ;; "examples/zthes/Makefile") CONFIG_FILES="$CONFIG_FILES examples/zthes/Makefile" ;; "idzebra.spec") CONFIG_FILES="$CONFIG_FILES idzebra.spec" ;; "idzebra-config-2.0") CONFIG_FILES="$CONFIG_FILES idzebra-config-2.0" ;; "Doxyfile") CONFIG_FILES="$CONFIG_FILES Doxyfile" ;; "win/version.nsi") CONFIG_FILES="$CONFIG_FILES win/version.nsi" ;; "include/idzebra/version.h") CONFIG_FILES="$CONFIG_FILES include/idzebra/version.h" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == "file_magic". file_magic_cmd=$lt_file_magic_cmd # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name of the directory that contains temporary libtool files. objdir=$objdir # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that does not interpret backslashes. ECHO=$lt_ECHO # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $* )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[^=]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$@"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1+=\$2" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1=\$$1\$2" } _LT_EOF ;; esac sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; "default":C) sed s%echo_source=yes%echo_source=no%g < idzebra-config-2.0 > util/idzebra-config-2.0 && chmod +x idzebra-config-2.0 util/idzebra-config-2.0 ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi echo \ "------------------------------------------------------------------------ ZEBRA Package: ${PACKAGE} ZEBRA Version: ${VERSION} Source code location: ${srcdir} C Preprocessor: ${CPP} C Preprocessor flags: ${CPPFLAGS} C Compiler: ${CC} C Compiler flags: ${CFLAGS} Linker flags: ${LDFLAGS} Linked libs: ${LIBS} Host System Type: ${host} Install path: ${prefix} Automake: ${AUTOMAKE} Archiver: ${AR} Ranlib: ${RANLIB} YAZ Version: ${YAZVERSION} YAZ Include: ${YAZINC} YAZ La Lib: ${YAZLALIB} YAZ Lib: ${YAZLIB} Bugreport: ${PACKAGE_BUGREPORT} ------------------------------------------------------------------------" idzebra-2.0.44/Doxyfile.in0000644000175000017500000015202711412332551012261 00000000000000# Doxyfile 1.5.3 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file that # follow. The default is UTF-8 which is also the encoding used for all text before # the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into # libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of # possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = IDZEBRA # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = @VERSION@ # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = dox # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, # Italian, Japanese, Japanese-en (Japanese with English messages), Korean, # Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, # Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for Java. # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to # include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be extracted # and appear in the documentation as a namespace called 'anonymous_namespace{file}', # where file will be replaced with the base name of the file that contains the anonymous # namespace. By default anonymous namespace are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from the # version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be abled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text " # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = include \ util \ bfile \ dfa \ dict \ isams \ isamb \ isamc \ rset \ data1 \ index # This tag can be used to specify the character encoding of the source files that # doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default # input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. # See http://www.gnu.org/software/libiconv for the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the output. # The symbol name can be a fully qualified name, a word, or if the wildcard * is used, # a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. If you have enabled CALL_GRAPH or CALLER_GRAPH # then you must also enable this option. If you don't then doxygen will produce # a warning and turn it on anyway SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES (the default) # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. Otherwise they will link to the documentstion. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. For this to work a browser that supports # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. GENERATE_TREEVIEW = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = YES # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. This is useful # if you want to understand what is going on. On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = YES # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = "YAZ_BEGIN_CDECL= " \ "YAZ_END_CDECL= " \ "YAZ_EXPORT= " # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = YAZ_BEGIN_CDECL \ YAZ_END_CDECL \ YAZ_EXPORT # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to # produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to # specify the directory where the mscgen tool resides. If left empty the tool is assumed to # be found in the default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will # generate a call dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will # generate a caller dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable caller graphs for selected # functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the number # of direct children of the root node in a graph is already larger than # MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, which results in a white background. # Warning: Depending on the platform used, enabling this option may lead to # badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO idzebra-2.0.44/IDMETA0000644000175000017500000000012211412332551011020 00000000000000DEBIAN_DIST="squeeze etch lenny" UBUNTU_DIST="lucid karmic jaunty intrepid hardy" idzebra-2.0.44/aclocal.m40000644000175000017500000010373711412336423012014 00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, [m4_warning([this file was generated for autoconf 2.65. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/yaz.m4]) idzebra-2.0.44/ChangeLog0000644000175000017500000253302311412336551011725 00000000000000commit 419ad759807269fdfa379799a051ed3a551c6541 Author: Adam Dickmeiss Date: Tue Jun 29 11:30:32 2010 +0200 Version 2.0.44 commit 1895d4f884802edff2e8b594297bffb0ef80b8bd Author: Adam Dickmeiss Date: Tue Jun 29 11:24:42 2010 +0200 Fix bug #3405: Extra data in MARC after conv commit 3cd8c941745fdb3accfa3492982b62d655b9aaed Author: Adam Dickmeiss Date: Tue Jun 29 10:25:54 2010 +0200 Add lucid commit 6519bad4f7add847d4f31fada1a0963244ae55c9 Author: Adam Dickmeiss Date: Mon May 17 13:54:07 2010 +0200 RPM: update to libyaz4 commit a2a579619db0d54d28bc1467530509a6c59b3d41 Author: Adam Dickmeiss Date: Mon May 17 13:53:08 2010 +0200 Debian: update to libyaz4 commit 4f757fb1db37399b5811de140dc486b891db8cee Author: Adam Dickmeiss Date: Mon May 17 13:50:57 2010 +0200 RPM: Remove *.la from install commit eeabcf07936ae787de2eb33f818ffcff68e1d839 Author: Adam Dickmeiss Date: Wed May 12 14:37:18 2010 +0200 Remove *.la files. http://wiki.debian.org/ReleaseGoals/LAFileRemoval commit cf1323a21ab96f6521138bfcda0cd08d065f48f5 Author: Mike Taylor Date: Thu May 6 12:30:21 2010 +0100 New file debian/.gitignore commit 3eb702d472da3f60293cb07b99849994deb46bc9 Author: Mike Taylor Date: Thu May 6 12:29:00 2010 +0100 Ignore generated zebrasrv.pid commit 748be5bcb60797dd7830ca464c7b2f862c34d1e4 Author: Mike Taylor Date: Thu May 6 12:28:37 2010 +0100 Ignore more autogenerated crud. commit ef2dec0df83a2b23319b857cc4739d7a25e0df42 Author: Mike Taylor Date: Thu May 6 12:27:32 2010 +0100 Document the "encoding" directive. commit e42511004faf6c1ae3365c4fbe9944d7cda3ea02 Merge: d50b29c 6adbe86 Author: Mike Taylor Date: Thu May 6 12:27:02 2010 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 6adbe8638dc399467f916e8111c9e1a51c3cc958 Author: Adam Dickmeiss Date: Thu Mar 25 10:55:48 2010 +0100 Debian 2.0.43-2indexdata commit 4a2679696a2d016ae702e2f54c46dce677a05116 Author: Adam Dickmeiss Date: Thu Mar 25 10:53:29 2010 +0100 Add IDMETA A file for packaging details (Debian, Ubuntu distros) commit f74f4db706c372b2c846ef694761da0b356a0526 Author: Adam Dickmeiss Date: Thu Mar 25 10:45:08 2010 +0100 Summarize changes commit 4815bf6068b5a2623c50475e0e5ec598709934e0 Author: Adam Dickmeiss Date: Thu Mar 4 11:25:59 2010 +0100 grs1: avoid term_len < 0 for .abs operator 'range' A negative term_len could happen for Zebra in many releases but it only reveals itself in YAZ 4 where WRBUF uses size_t length. commit 44621b084e8fdf06a45409754116e8810bd89664 Author: Adam Dickmeiss Date: Thu Mar 4 11:24:29 2010 +0100 More verbose data1_path_fopen if fopen fails commit b987787319658f7e372a6c77dee73c02e938bbdf Merge: 8fcb70c e9dc180 Author: Adam Dickmeiss Date: Fri Jan 22 14:39:34 2010 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 8fcb70c581b7f0b1138414b5aaab69205871ccd3 Author: Adam Dickmeiss Date: Fri Jan 22 14:31:45 2010 +0100 ICU: fix use of un-init var commit e9dc180ae79cd3c877a5f6ab52a82b871ecfa5eb Author: Adam Dickmeiss Date: Fri Jan 22 13:48:31 2010 +0100 More reasonable approx hits for truncated searches commit 0a45098ea260f0259e2ccf124c06077488e8dac9 Author: Adam Dickmeiss Date: Fri Jan 22 12:48:56 2010 +0100 Update WRT version update commit 3eb719b48552774a87f0d8fb87e6211491af5f37 Merge: 477d69a 1c924d8 Author: Adam Dickmeiss Date: Fri Jan 22 12:39:48 2010 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 477d69a25bcac01143c26d8842f9d741d638964b Author: Adam Dickmeiss Date: Tue Jan 19 14:58:25 2010 +0100 Fix print of some Odr_int values commit c00021ca63c39b965a6c02c51f56d359b9cba4b3 Author: Adam Dickmeiss Date: Tue Jan 19 14:58:14 2010 +0100 Fix casts (sort) commit 5a54cb4d2b46949fceead27d0edb1a44df2d7da2 Author: Adam Dickmeiss Date: Tue Jan 19 14:57:38 2010 +0100 Explain: using Odr_int commit 1c924d8a85c3e10b62c826c93bc2189d368b91d5 Merge: f05bb1a 591ac4c Author: Adam Dickmeiss Date: Thu Jan 14 16:13:18 2010 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit f05bb1aeb211d267a3b8ae3d9b941d272d90adcd Author: Adam Dickmeiss Date: Thu Jan 14 16:12:35 2010 +0100 Update m4 commit 591ac4cbcd27587be8ba333f64c82f3bbba2b7ea Author: Adam Dickmeiss Date: Thu Jan 14 13:50:53 2010 +0100 Dont assume int for ODR INT commit a66b7d79383ae700f3358731eecfe2aafed0e90d Author: Adam Dickmeiss Date: Thu Jan 14 13:27:00 2010 +0100 Bump copyright year commit d0ffad873fd93474304398c7d1c373ca9accb0c5 Author: Adam Dickmeiss Date: Wed Jan 13 13:51:06 2010 +0100 Do not use old define from proto.h commit abd433d1a315576cf1f4a53f2c70365f9a76477f Author: Adam Dickmeiss Date: Thu Nov 5 16:06:34 2009 +0100 Version 2.0.43 commit d0d4772450cfe6afde24ed8ec4031afd2da56632 Author: Adam Dickmeiss Date: Thu Nov 5 09:55:07 2009 +0100 Fix problem with global term limit (attr 12). We now pass the hits_limit to most evaluation functions. This is the default limit .. Taken from Zebra Handle (approx_limit) or from attribute 12 - if given. commit 7ee4e52c9a814e0ef11f557b804672eeaeb0f3dc Author: Adam Dickmeiss Date: Thu Nov 5 09:37:20 2009 +0100 Delete unused source file (api_swig.c) commit 95f8991b4c687a0d99a1e8751ef5aeeb7f6831bc Author: Adam Dickmeiss Date: Wed Oct 28 12:37:08 2009 +0100 mod_dom: fix error handling for no retrieve elems commit d50b29c14d00e25ad1a85dfb2b7571326324a22e Merge: 7d746ec 4ff9ad2 Author: Mike Taylor Date: Thu Oct 8 21:22:32 2009 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 4ff9ad25e172e7bdcf2d8d94ea6a606ab53bcfe9 Author: Adam Dickmeiss Date: Thu Oct 8 09:37:25 2009 +0200 Version 2.0.42 commit 379800be28dc31b4a50747b9d5e0912d91ba8f87 Author: Adam Dickmeiss Date: Thu Oct 8 09:31:40 2009 +0200 Reformat commit 4e6078e4660869b9d83223c8ce842ed8dda211ab Author: Adam Dickmeiss Date: Thu Oct 8 09:23:01 2009 +0200 Use optimized proximity for more cases. The optimized proximity now deals with more cases, ie all prox of the form @prox 0 d 1 1,2,3 k 2 .. That's exlusive==0, any distance, ordered (true), relation (<, =, <=), known unit word. commit 78ea086524d422fb7a5ce249d89ae5eb60009d65 Author: Adam Dickmeiss Date: Wed Oct 7 12:32:35 2009 +0200 Fix bug WRT inconsistent registers, bug #3062. For a many create+drop of DBs the ordinalSU will increase. This, in turn will lead to a bigger resulting indexing term beyond length IT_MAX_WORD - for the compressed temp files. This patch increases the indexing buffer for the term to INP_NAME_MAX which is a log higher than IT_MAX_WORD. The too-small size resulted in a truncations of long terms (in fact phrases) that would be wrongly matched against the ISAM. commit fb791f9a754adf7b26695fdb1ddd0fdee9bf28f9 Author: Adam Dickmeiss Date: Tue Oct 6 13:06:44 2009 +0200 Fix generic proximity for re-occuring 2nd op. Fix generic proximity. This patch makes it handle this case: "a b a" with a search for @prox 0 1 1 2 k 2 b a . commit 7d746ecdedc82d5656c74900cf8310433183e25c Merge: 95caf6d 5451f06 Author: Mike Taylor Date: Fri Sep 18 17:42:23 2009 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 5451f064623589d16bd36460e1df1692d929c3b2 Author: Adam Dickmeiss Date: Wed Sep 16 14:00:08 2009 +0200 Fix install doc rule for Automake 1.11 commit 5242fd311bad9fc07b7ddf77f4d83410928d968c Author: Adam Dickmeiss Date: Mon Aug 24 14:40:55 2009 +0200 Version 2.0.41. commit 8664d6939b6be2e0de78c81ff99b8e24d304abc3 Author: Adam Dickmeiss Date: Mon Aug 24 14:28:54 2009 +0200 Left-assoc for proximity code and tests for it commit 95caf6dddf09a74a44deca5775544051ea5e293a Merge: 7c63576 6f37c3d Author: Mike Taylor Date: Thu Aug 20 09:15:48 2009 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 6f37c3dd623bae17b02aecdec4357529a0d4627d Author: Adam Dickmeiss Date: Fri Jul 31 14:06:28 2009 +0200 Update m4. commit 3ec73ef21b81b6d2abd9f21c31bf4ae4560df7ca Author: Galen Charlton Date: Thu Jul 30 08:55:18 2009 -0400 fix typos and other minor errors in doc Signed-off-by: Galen Charlton commit f3f5a5b11aedc9117bcddc01bf3f6b5756d3336a Author: Galen Charlton Date: Thu Jul 30 08:17:08 2009 -0400 documented the sortmax configuration setting Signed-off-by: Galen Charlton commit 6ae9de1edb1521c75c574a6e1adec54880468735 Author: Adam Dickmeiss Date: Fri Jul 31 12:11:04 2009 +0200 Remove // comment commit 764616f12808e177bb1d03cb3f5dbe3ddfa7aba2 Author: Adam Dickmeiss Date: Fri Jul 31 11:24:03 2009 +0200 Ignore generated file version.nsi commit f6e9c4d6c5480b68a703b0aeccf9ba27db68cdea Author: Adam Dickmeiss Date: Tue Jul 28 15:54:40 2009 +0200 Fix DOM filter WRT record ID and PI record attr Fix DOM filter so that full record ID (z:id) if given is used verbatim rather than truncated until first blank - in other words use memcpy rather than sscanf. For PI fix record attributes parsing which was completely broken. commit 7c63576809beb33b527e190b2295effd59b229a0 Merge: 38b8c21 4c8c9cd Author: Mike Taylor Date: Tue Jul 14 13:50:49 2009 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 4c8c9cd1d57d8e72818afb85cf6e2d2ca6200804 Author: Adam Dickmeiss Date: Mon Jul 13 14:17:56 2009 +0200 Version 2.0.40 commit 9c100b6f8f06bd61d1f496919d31adc8472ca024 Author: Adam Dickmeiss Date: Mon Jul 13 14:14:40 2009 +0200 Fix rset_default_forward to use scope commit 315e6c68da1ab032b590964fe02a6678e18d370f Author: Adam Dickmeiss Date: Mon Jul 13 14:10:27 2009 +0200 Avoid approx hit count if hits_limit==0 + few log mods commit f63c40ec46dbcbb720a9437d40200501401c9b00 Merge: e4dac9c 687895a Author: Adam Dickmeiss Date: Fri Jul 10 18:03:50 2009 +0200 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit e4dac9c0feb7251e7543f175c373195c8c1170e2 Author: Adam Dickmeiss Date: Fri Jul 10 18:03:32 2009 +0200 Update to new ID URLs commit 687895a748c76f54c709a7433d2126714664163b Author: Adam Dickmeiss Date: Thu Jul 9 10:32:56 2009 +0200 Version 2.0.39 commit 5a5e8d852ce98a805b02679a971cdf4216d94177 Author: Adam Dickmeiss Date: Mon Jul 6 16:30:21 2009 +0200 Check for supported recordCompression during startup Function zebra_register_open checks that specified recordCompression is supported. commit e27d8c4e191b2b2b04b2e9c4e5b5f4a9e6c49472 Author: Adam Dickmeiss Date: Mon Jul 6 16:29:44 2009 +0200 recordcompression settin in sample commit ef6e86161049cd2fc0f9890b97cec9b835f7fcd6 Author: Adam Dickmeiss Date: Mon Jul 6 16:29:09 2009 +0200 Remove obsolete Doxygen setting commit 877066bb282e1ee809ef2caf2ff5351bf6424c45 Author: Adam Dickmeiss Date: Mon Jul 6 14:07:26 2009 +0200 Fix locals for where bzip2 is not present but zlib is commit e43cf25b9705f8428249a707b68f0e148c51e511 Author: Adam Dickmeiss Date: Mon Jul 6 13:59:20 2009 +0200 Avoid logging of all compression/decompression commit 2c2dcf07d04f1b52adc104c57273050f47b8b876 Author: Adam Dickmeiss Date: Mon Jul 6 13:59:02 2009 +0200 Fix recordCompression check commit d71149439012fadf092321e3b507d23711715743 Author: Adam Dickmeiss Date: Mon Jul 6 13:15:09 2009 +0200 Allow records to be zlib-compressed Configure now looks for zlib development headers + libs. When present, zlib compression may be enabled with recordCompression: zlib in zebra.cfg. commit e5f5fb6515a2ee5f1040e76484d8a7b8121cf845 Author: Adam Dickmeiss Date: Fri Jul 3 11:25:28 2009 +0200 Change recd{A,B} block sizes Change record block sizes from 128/512 to 256/2048 and set move block size margin to 4096. commit b57cdb012a10dcba70a608a9a365bd8893407e6e Author: Adam Dickmeiss Date: Thu Jul 2 17:01:50 2009 +0200 Record db tuning: dont use ref_count > 1 .. Avoid a compression chunk size of 90000 which may be good for BZIP2 but is useless for non-compressed records. Refactor flushing a bit. Tune the move-to-higher block factor from 24 to 12. commit 475d4ac8314b3d6a24b974246af581662e0b6c02 Author: Adam Dickmeiss Date: Thu Jul 2 14:07:52 2009 +0200 Delete rather than mark-empty dict entries (bug #2913). The dict_del_string is now removes NULL subptr entries from pages and cleans out pages with zero entries. commit a89d8384ad975fdddb2aa56e8c27b689a5e23f96 Author: Adam Dickmeiss Date: Thu Jul 2 11:23:43 2009 +0200 Reindent commit 38b8c213f9be6890ddba9d5564dc978c2ae2bc3d Merge: 30e1845 8f7de49 Author: Mike Taylor Date: Tue Jun 30 08:40:06 2009 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 8f7de4981a0fdc9a1837c79aee55612ddfce9725 Merge: 94c14ae 32a20fc Author: Adam Dickmeiss Date: Fri Jun 26 16:03:40 2009 +0200 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 94c14ae06c9a8090b53e6dcce3a59ed9d667ba50 Author: Adam Dickmeiss Date: Fri Jun 26 16:03:24 2009 +0200 Use Docbook formatted GPL v2 from FSF commit 30e1845ecb00a53e8b76bae7eb1df87988b610a0 Merge: 5170c2e 32a20fc Author: Mike Taylor Date: Sun Jun 21 10:16:52 2009 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 32a20fc8c5e976e338db03d553fed7ec5240cc89 Author: Adam Dickmeiss Date: Fri Jun 19 21:57:07 2009 +0200 News for 2.0.38 commit 12e8071a11d81313deeb8ccb9045b114c6148310 Author: Adam Dickmeiss Date: Fri Jun 19 21:32:49 2009 +0200 Version 2.0.38 commit 5f0188ce3efa4894ae0b4c0d993437872f431623 Author: Adam Dickmeiss Date: Fri Jun 19 15:27:14 2009 +0200 ISAMB: ark header dty if freelist is updated commit 170167b891ba8e3f8284d850f7c4236a39e38887 Author: Adam Dickmeiss Date: Fri Jun 19 15:25:37 2009 +0200 Log freelist info changes commit 5478f209e90c32b8083c9b230de618599df93ff6 Author: Adam Dickmeiss Date: Fri Jun 19 14:59:51 2009 +0200 Return a value for function zebra_chdir commit ce0c8ffd1c3471504b638f6b47a0e85bf1b6f24f Author: Adam Dickmeiss Date: Fri Jun 19 14:53:26 2009 +0200 Fix fscan return val check commit c1b2004dece42eba1b3d79c34bcbf7cac4ba2092 Author: Adam Dickmeiss Date: Thu Jun 18 15:34:31 2009 +0200 Handle failures for some C calls (chdir, write, etc) commit 042a4ef65f158cc554f56e39ce09f80ef775a21b Author: Adam Dickmeiss Date: Thu Jun 18 08:47:36 2009 +0200 Change estimated hits for multi-and/or (bug #2907) The r_pos method of rset multi-and/or is modified so that the ratio is calculated differently. This should fix bug #2709. commit 5170c2efdf762674413668501dc635ff2bf81f8a Merge: 47da973 05c6542 Author: Mike Taylor Date: Thu May 28 09:02:21 2009 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 05c65427ef879ed8034093b352f8e69b16e198d5 Author: Adam Dickmeiss Date: Wed May 20 11:07:50 2009 +0200 post/postrun calls ldconfig commit 47da973c83c9e3570447d03486e919d29e7f7934 Merge: f3915cc ba51557 Author: Mike Taylor Date: Tue May 19 00:18:17 2009 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit ba515577c1ad18c4b997c0c6e70fd22dba03def5 Author: Adam Dickmeiss Date: Mon May 18 13:07:31 2009 +0200 Version 2.0.37 commit eccd9332c4cdd581183b4ab7b72ee33921d5bc32 Author: Adam Dickmeiss Date: Mon May 18 12:46:27 2009 +0200 Summarize news commit f3915ccf01b49f93eaab660e087c8e41d649511f Merge: 68f181b 8d8fd83 Author: Mike Taylor Date: Sun May 17 22:31:50 2009 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 8d8fd83ac10dd174264826c11cc301002a9313c1 Author: Adam Dickmeiss Date: Thu May 14 13:53:49 2009 +0200 Log also Git SHA1 when zebrasrv starts commit 68f181b6ad215ffecc80e3a9cfb302b363985786 Merge: ea595ee 3fdd3e7 Author: Mike Taylor Date: Wed Apr 29 09:04:53 2009 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 3fdd3e7aa5372e1a2a981a5826273f381f74be8e Author: Adam Dickmeiss Date: Mon Apr 27 15:20:51 2009 +0200 Fix problem with generic proximity handling. The generic proximity handling did not collect seqnos for first operand correctly. New test case for it in test_search. Fix problem with generic proximity handling. commit aec7e0b196785323777262d3c6ca3e6c770a696d Author: Adam Dickmeiss Date: Mon Apr 20 14:02:39 2009 +0200 Preserve behavior as well.. commit 3f2d76448b61a6ee23a7079ef5274fcae73e7237 Merge: 7772a60 1cc042c Author: Adam Dickmeiss Date: Mon Apr 20 13:45:53 2009 +0200 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 7772a601a6d2305397f162be3d1ff54e9ca98a93 Author: Adam Dickmeiss Date: Mon Apr 20 13:44:15 2009 +0200 Fix code fragment with undefined behavior. commit ea595ee5d9d7bd77575c3a4726645c9f6eb3acd1 Merge: bd8bb26 1cc042c Author: Mike Taylor Date: Tue Apr 14 10:27:06 2009 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit bd8bb26da2fffe069a9624f253695419eb5c6475 Author: Mike Taylor Date: Tue Apr 14 10:26:55 2009 +0100 Fix typo. commit 1cc042c168862a25393ee8cbc1ddebbd5f83a292 Author: Adam Dickmeiss Date: Sat Apr 11 20:00:52 2009 +0200 Fixes for tutorial (dc_-removed) and other. Tutorial updated with fixes as noted by Eric Begin and without dc_ in index names (due to oai2index.xsl being updated earlier). commit 785d6553b7fdd5651b327c75736888288ad7492f Author: Adam Dickmeiss Date: Wed Apr 1 16:42:22 2009 +0200 More prox tests for safari commit 3c5f8cc6f6de4af5be651acc27cfa7743cf72be3 Author: Adam Dickmeiss Date: Wed Apr 1 16:28:44 2009 +0200 New prox tests for safari filter. commit 7ccc68c77eb208c2070c7939d9a41a33254934c5 Author: Adam Dickmeiss Date: Wed Apr 1 16:24:27 2009 +0200 Pass type in to printf sz param commit c526dc6d25a789a3b4762ac4d8962ef1b20dde02 Author: Adam Dickmeiss Date: Wed Mar 25 21:43:18 2009 +0100 New YAZ GFS to illustrate retrieval of MARC. commit 19e8f6c22ecdbc5a73a784ce0498e219ef901950 Merge: 441c86f 275f8ac Author: Adam Dickmeiss Date: Tue Mar 24 21:42:17 2009 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 275f8ac18585942472f1f410afeeb409bdd7d195 Author: Adam Dickmeiss Date: Tue Mar 24 17:09:30 2009 +0100 Update commit 118a515cfa4c1ee67ede51b8145b20ee21dd5969 Author: Adam Dickmeiss Date: Tue Mar 24 16:50:49 2009 +0100 New ranking rank-2 .. Like rank-1 but subtracts staticrank. rank-2 is a combination of rank-1 and static rank.. The staticrank is inverse (lowest value comes first, etc..). rank-2 thus substracts that from score. This allows a system to specify a "base" rank (=staticrank). commit a1211b2ad8aac08e30b45bb2f182007759cf7d11 Author: Adam Dickmeiss Date: Tue Mar 24 16:50:26 2009 +0100 Align profilePath for other tests commit 46cdb2c9a87c036eb19b6a4333a5097f120c95bf Author: Adam Dickmeiss Date: Tue Mar 24 16:32:51 2009 +0100 Minor reformatting. commit 441c86f4df20ea077a812e82c4e02d7d28976367 Merge: 70ff479 e4c44f3 Author: Adam Dickmeiss Date: Fri Mar 20 22:46:20 2009 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit e4c44f3e20e063238ac9bf47be7d362ada569678 Author: Adam Dickmeiss Date: Thu Mar 19 11:42:10 2009 +0100 marcxml example installed commit 7da8ed507abcae5e09f8822cffa567e51f191d6a Author: Adam Dickmeiss Date: Thu Mar 19 11:36:17 2009 +0100 MARC21slim2MODS3.xsl not in use (so removed) commit 7551d160ec239d8678c964dbe6c83b3e2041093b Author: Adam Dickmeiss Date: Thu Mar 19 11:35:33 2009 +0100 no GPL header here commit 66ec9aa407cf95f205d860d071960011f91be366 Author: Adam Dickmeiss Date: Thu Mar 19 11:33:00 2009 +0100 install marc21 sample commit a4361ca2c97b07c12a2f18ff825ccbd5a093867d Author: Adam Dickmeiss Date: Thu Mar 19 11:32:38 2009 +0100 Fix dist-check (uninstall of records) commit 6ba6ebca2efbc5711079dce1137bf70e3dc389cd Author: Adam Dickmeiss Date: Thu Mar 19 10:56:17 2009 +0100 zebra.cfg part of dist (again) commit 70ff479b4b91c9f062d0e6d37c570a42e71a3888 Merge: b9d11b1 2735322 Author: Adam Dickmeiss Date: Wed Mar 18 17:21:45 2009 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 27353220fe14cdcf78c6f06f6713de692ab0e9f7 Author: Adam Dickmeiss Date: Wed Mar 18 16:18:33 2009 +0100 gils example installed (bug #2684) commit 1ae1d7d8642311e56b1034a10a909cd546514061 Author: Adam Dickmeiss Date: Wed Mar 18 15:41:34 2009 +0100 Fix ICU search problem / caret not escaped. For some ICU versions (4.0.1, possibly others) the normalized term may include a caret (^) in it and so this chracter must also be escaped before turned into a regular expression. commit 2ff967af5b21698f420ecd2b017e6bc2dbcb095a Author: Adam Dickmeiss Date: Wed Mar 18 10:45:13 2009 +0100 Mention Libxml2/Libxslt for DOMXML/Alvis commit b9d11b1ed1c9052b44245aa2d89f8239695bf02a Author: Adam Dickmeiss Date: Mon Feb 23 17:57:42 2009 +0100 Update to new logo commit ce0d471c60fca91fb41f5aeeef3c1a36bd3c07e0 Author: Adam Dickmeiss Date: Tue Feb 17 10:34:01 2009 +0100 Version 2.0.36. commit cb8fefbb513a354a7fecf50383d1857fce6ae9b3 Author: Adam Dickmeiss Date: Tue Feb 17 09:16:07 2009 +0100 Zebra version autocreated by configure for NSIS spec. commit 6895e8a699bfea8f61ca5b16b5fcc1d22495b744 Author: Adam Dickmeiss Date: Tue Feb 17 09:15:14 2009 +0100 Summarize news commit 7d2e837262bb9d7b393cf01a6c5f8b079add3d11 Author: Adam Dickmeiss Date: Tue Feb 17 08:59:49 2009 +0100 Update year and URL to mailing list commit 022315e51f7179fc8ab9910d702e791685e62f1a Author: Adam Dickmeiss Date: Tue Jan 20 11:45:14 2009 +0100 Harmonise index:type parsing for special fetches Harmonise index:type parsing for special fetches so that facets, special index (and sort) uses parse_index_spec. Also make zebra::index fetches case-insensitive for index names. commit 1d471f499b0be3a3990ad252ff9c19da0462f9aa Author: Adam Dickmeiss Date: Thu Jan 15 14:49:21 2009 +0100 Align snippets handling of unknown register type with indexing Align snippets handling of unknown register type with indexing. This is to ensure that for unknown index types, the snippets behave the same way as indexing.. If not, snippets, can not be generated correctly. commit 426d07a60c57c3555934655a78437cf4677c65c8 Author: Adam Dickmeiss Date: Thu Jan 15 14:30:24 2009 +0100 removed a few debug stmts commit 6a0f9234f945bc4956e2bcef75f715661a9eba9a Author: Adam Dickmeiss Date: Thu Jan 15 13:33:53 2009 +0100 Updated footer comment commit a679d5f5143c6efe6df7223f493eef27348dec37 Author: Adam Dickmeiss Date: Fri Jan 9 18:05:14 2009 +0100 Skip test if grs.xml is not present commit 09a9136012a8e5b13ba96150bad03193660e6015 Author: Adam Dickmeiss Date: Fri Jan 9 17:44:11 2009 +0100 Produce error if .chr file has no directives commit 89d16cf15eda0e4802d18b8ad09bd3653508ebfc Author: Adam Dickmeiss Date: Fri Jan 9 14:38:04 2009 +0100 Happy new year commit 943fa5869844eac8233a7d05f87189dd3458fa0d Author: Adam Dickmeiss Date: Fri Jan 9 14:09:45 2009 +0100 Fixed 'inconsistent register' bug caused by terms of size IT_MAX_WORD commit 9e430c87992b890d3911d415132cfa1b7f6b9ed3 Author: Adam Dickmeiss Date: Fri Jan 9 13:25:08 2009 +0100 Avoid record match in test mode (-s) and refactor a bit commit feee4a7d1b539d294ab52ffb51200850f08be52f Author: Adam Dickmeiss Date: Fri Jan 9 11:40:59 2009 +0100 Fixed dangerious use of sprintf commit 68c4c13349e24a3cd7aa061ee4d86e4b2828f950 Author: Adam Dickmeiss Date: Tue Jan 6 10:18:03 2009 +0100 Adjust messages produced by '-V'. commit 9b0cecba4b304555747a655a88d13291f1a7795f Author: Adam Dickmeiss Date: Mon Jan 5 12:05:48 2009 +0100 mk_version.tcl part of dist commit a02be6c13a7353e7b2fba65a1faab1c6819d1728 Author: Adam Dickmeiss Date: Mon Jan 5 12:04:14 2009 +0100 Use mk_version.tcl on Windows commit 5643360306f6213dd5ecf9d306566b9d99e7e09c Author: Adam Dickmeiss Date: Mon Jan 5 11:41:47 2009 +0100 The configure script produces include/idzebra/version.h The configure script produces include/idzebra/version.h. The function zebra_get_version returns SHA1 ID as second argument. commit fdc275e5119878ef5f8f24acf1f23735da4f3a18 Merge: 5378adc a5a4e10 Author: Adam Dickmeiss Date: Mon Jan 5 10:56:02 2009 +0100 Merge branch 'bug2338' commit 5378adcc2a9401702bf92a5dd10b909278a93df6 Merge: 4884a9b a490674 Author: Adam Dickmeiss Date: Tue Dec 30 16:45:02 2008 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 4884a9b3412dfd4c948c29b5f5275dfdf9b14207 Author: Adam Dickmeiss Date: Tue Dec 30 16:44:45 2008 +0100 Added implementation-codes directive for .mar files commit a4906741aaade23017e48aa14194f2c39dfb75d6 Author: Adam Dickmeiss Date: Thu Dec 25 13:32:13 2008 +0100 Call autoheader when needed commit 2944029372eb5f9ac0bceecda98ffab3617400dc Author: Adam Dickmeiss Date: Thu Dec 25 13:08:13 2008 +0100 Same buildconf.sh as YAZ commit a5a4e10abdb1f3ddcf2fd1e54692811a705e0c3d Author: Adam Dickmeiss Date: Thu Dec 11 12:23:46 2008 +0100 Annotations. Introduced define for CFile state. commit a5ea5985a282ff55b4f86b47045be40300a746a8 Author: Adam Dickmeiss Date: Thu Dec 11 10:27:50 2008 +0100 Partial fix of bug #2338: Drop database does not free up space. The recd{A,B} no longer leaks, but sort register files are still around. commit bf304399db842992bf8a3700d7da42100eecf15a Author: Adam Dickmeiss Date: Thu Dec 11 10:27:30 2008 +0100 Using isam:b. commit b5f030af4f75ee89f6199999132b371a87a29c98 Author: Adam Dickmeiss Date: Tue Dec 9 16:20:14 2008 +0100 Calling rec_get/rec_del for each record to be deleted in database. commit f3f94568869a1ae0402bfa4f0dea4d80b09695df Author: Adam Dickmeiss Date: Fri Dec 5 16:03:23 2008 +0100 Prelimiary work on bug 2338. commit c4bba1aaafe64aa87aa4217ac43904fa9e2c7b71 Author: Adam Dickmeiss Date: Mon Nov 10 18:16:39 2008 +0100 Updated for latest doc/common. commit 5a1dff056342561c67f92e4751fc85853ac65a59 Author: Adam Dickmeiss Date: Fri Nov 7 14:00:34 2008 +0100 Same buildconf.sh as yaz commit cb61a1ed1e4fc3d47fe09ba5c7fb10ddfd3e6aaf Author: Adam Dickmeiss Date: Thu Nov 6 18:11:10 2008 +0100 Bump nsi to 2.0.34 commit 7598c76f1a4989a91003bd4fbd90f30a7c7255ef Author: unknown Date: Thu Nov 6 18:03:59 2008 +0100 Fixed memory init problem for mod_dom in show records mode. commit a46626a5becb4d5e0b16846d783dfe9befe7d61c Author: Adam Dickmeiss Date: Thu Nov 6 13:32:59 2008 +0100 Removed CVS Ids. commit 649bb3911322f20d7fdaa636bb58371b56d6b24f Merge: a25d0b3 1d02162 Author: Adam Dickmeiss Date: Thu Nov 6 12:56:34 2008 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 1d0216216cbc58d92173a9da209fb5ce8559e584 Author: Adam Dickmeiss Date: Thu Nov 6 12:55:18 2008 +0100 Windows port uses newer versions Libxml2/libxslt + ICU. commit a25d0b3de4cdfaf6afff1954623634d9d34812b1 Author: Adam Dickmeiss Date: Thu Nov 6 12:23:23 2008 +0100 Rephrase a bit commit e6df9ccd224fb620edee84759930de8886e5baf8 Author: Adam Dickmeiss Date: Thu Nov 6 12:21:45 2008 +0100 Bump version to 2.0.34. commit e4d66bad15067519e5d224f3be8453aa66532d67 Author: Adam Dickmeiss Date: Thu Nov 6 12:18:49 2008 +0100 Updated news for 2.0.34 commit 6ddc44cd9d1fcb0e4045d846dc87cbfacf125003 Author: Adam Dickmeiss Date: Thu Nov 6 12:14:45 2008 +0100 Added doc-ealn rule commit 283af3f9949fc128d9b8308185130b324333db2b Author: Adam Dickmeiss Date: Thu Nov 6 11:59:06 2008 +0100 Pass section_id for sortkeys commit 6277df6076edfef81e676d4aab7bd1f212bf739f Author: Adam Dickmeiss Date: Wed Nov 5 16:13:39 2008 +0100 Make section_id part of multi-value sort (one sort chunk / section). commit e3f2abdb7863901fc997d5535ff512520edcbd0f Author: Adam Dickmeiss Date: Thu Oct 23 12:09:34 2008 +0200 New attribute @fields for snippets that indicates match in other fields. The snippets now has a new attribute @fields which includes one or more field names of where the snippet *also* occur. This is useful for any:w searches but one wants to know which other fields there is identical terms. Note that this requires that the indexing uses same sequence numbers . For DOM this means specifying the indexes in the same Date: Thu Oct 23 11:46:48 2008 +0200 Fixed comment. commit aa76dfa21ba30fe802a5ef6f3907b57ecd7e6c65 Author: Adam Dickmeiss Date: Thu Oct 23 11:45:30 2008 +0200 No longer in use. commit 4f0ac986e5526dfaf91564f7e7d03b915afe8f07 Author: Adam Dickmeiss Date: Thu Oct 23 11:35:09 2008 +0200 Align sequence numbers for words in z:index sections for mod_dom. commit 505fb644f131fc438521998fb01983efb45c9663 Author: Adam Dickmeiss Date: Mon Oct 6 08:50:24 2008 +0200 Updated facet sort tests. commit 540425328b2cd23e7affd860918c8b537856e342 Author: Adam Dickmeiss Date: Thu Oct 2 17:37:18 2008 +0200 Fixes for sort-based facets. The sort-based facets no longer re-search in order to get hits (only count during the sweep through the sort file). commit cd02e9c5558d2f0db2ab83fcad810a6522fd2319 Author: Adam Dickmeiss - Indexdata Date: Thu Oct 2 13:58:08 2008 +0200 Fixed addinfo passing. Index type 's' is sort for absent index rules. commit 96d166b6556cec66bc66cfc91b71e069288c051e Merge: b9217c7 4026084 Author: Adam Dickmeiss Date: Thu Oct 2 10:58:48 2008 +0200 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit b9217c7876c7102f82a7c6547bc1858ed3b39979 Author: Adam Dickmeiss Date: Thu Oct 2 10:57:54 2008 +0200 Factor our logging of Expat XML parser errors. commit 4026084f1a80d525c6681605f100aa9b18574fce Author: Adam Dickmeiss Date: Tue Sep 30 09:42:47 2008 +0200 Removed unused rule. commit 2cf8341fde67a92369c46d9b12e6d056e5bc5a0e Author: Adam Dickmeiss Date: Fri Sep 19 11:10:02 2008 +0200 sort uses custom record ID if given / test_safari commit abc8493f709d3bd50e0d1a6781d030fb4675f131 Author: Adam Dickmeiss Date: Thu Sep 11 16:06:45 2008 +0200 beginnings of facet test for custom record-id (test_safari) commit b3679b1ecd730266f70a62347f66e5964a2fa030 Author: Adam Dickmeiss Date: Thu Sep 11 15:57:59 2008 +0200 renamed record filter module sources commit 78b13a3ac6a79768fb609c14db2a8e0c94a9c4da Author: Adam Dickmeiss Date: Thu Sep 11 15:38:20 2008 +0200 updated Deb control description so that IDZebra is not mentioned commit 4b25ee9a2fbd9a641095362fc424c1f7b7c0ca2c Author: Adam Dickmeiss Date: Thu Sep 11 15:27:17 2008 +0200 Facets using sort register functional commit 64e695fc8ebc57dad345fa037e6a83bd403bb22b Author: Adam Dickmeiss Date: Thu Sep 11 10:08:19 2008 +0200 Simplify a bit. Turned a few functions to static commit 99b29133f76df10f9dc617a6b2ed876dded7ce52 Author: Adam Dickmeiss Date: Thu Sep 11 10:00:06 2008 +0200 Using WRBUF for additional info stuff for retrieval commit a5f2b33412d10ea2de178a45b734d9961c487aee Author: Adam Dickmeiss Date: Thu Sep 11 09:26:56 2008 +0200 Simplify a bit . Removed obsolete comment commit 00bacc2ba5811fbffb27d32541df068858a84d03 Author: Adam Dickmeiss Date: Wed Sep 10 14:52:19 2008 +0200 Deal with multiple sort keys in zebra::index:: retrievals commit 2e05c3b9f83d9e7e430dba0bfd31d768234f928e Author: Adam Dickmeiss Date: Wed Sep 10 14:50:45 2008 +0200 Refactor and rewind fix Refactored the sort indexing rewind code. The zebra_sort_read could return EOF where it shouldn't. commit b81eb4e30e5febe06da7118cd9a84a63604cb1e0 Author: Adam Dickmeiss Date: Wed Sep 10 14:50:00 2008 +0200 Proper sort entry copying commit af102b1fb451ba27bfa7343528c4240b3ab3a80b Author: Adam Dickmeiss Date: Tue Sep 9 14:24:40 2008 +0200 Functional multi-value sort + tests commit bdef6b61d9565342be2f314b5947ada0e2f2099a Merge: 40869f1 c76c630 Author: Adam Dickmeiss Date: Tue Sep 9 11:10:39 2008 +0200 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit c76c6307014b193b15d892e51a88511ebac39464 Author: Adam Dickmeiss Date: Tue Sep 9 11:10:03 2008 +0200 Renamed test_sortindex to test_sort3 commit 03eeca8eff513ddca5eb61e591898a4cbf740fb9 Author: Adam Dickmeiss Date: Tue Sep 9 11:09:56 2008 +0200 Renamed test_sortindex to test_sort3 commit 40869f1460c8b3804904ec207b18c5607f82de6e Author: Adam Dickmeiss Date: Tue Sep 9 11:08:11 2008 +0200 More work on multi-map for sort Added a new function zebra_sort_add_en to eventually replace zebra_sort_add. commit 0ef68e6e54cfd7a91a28ee3b1f305924ac34e787 Author: Adam Dickmeiss Date: Mon Sep 8 14:07:08 2008 +0200 First work on multi value sort ISAM commit 55c58d19e99fdbc8f6035f9e88eea563970379e8 Author: Adam Dickmeiss Date: Mon Sep 8 14:06:59 2008 +0200 Allow ISAMB entry sizes of 4K (used to be 128) commit a2e1ea6f086b5cb7578ddcc9e615f8286a1971c6 Author: Adam Dickmeiss Date: Tue Aug 26 11:29:49 2008 +0200 Run both git submodule init + update commit 8fd8085671b4270baae56c827ff259e8da07196d Author: Adam Dickmeiss Date: Tue Aug 26 11:17:35 2008 +0200 Always run 'git submodule update' when git is in use commit e90ccc68006a9f8b72e6664663e6be5f71ffe8d8 Author: Adam Dickmeiss Date: Tue Aug 26 10:38:06 2008 +0200 Use PDF_COMPILE for PDF creation commit a31bdf4843665f7a3509edbae681686c551a149c Author: Adam Dickmeiss Date: Tue Aug 26 10:30:49 2008 +0200 Use PDF_COMPILE for PDF creation commit b397f6feaa676b4b01f64d6278fb33075b78730f Author: Adam Dickmeiss Date: Fri Aug 15 13:45:54 2008 +0200 Bump version to 2.0.33 commit cee6212f8e96a436ad490ba91ec2cfb16df3d038 Author: Adam Dickmeiss Date: Thu Aug 14 13:34:42 2008 +0200 Added tutorial.xml to dist files commit befd4e7c3fdae7fd6de9d38cb832d275d2d081aa Author: Adam Dickmeiss Date: Wed Aug 13 12:32:21 2008 +0200 Put debug call in #if 0 section. commit 6fd073e068943b4428f0fa85d9d21519a974d41d Author: Adam Dickmeiss Date: Wed Aug 13 11:41:17 2008 +0200 Determine database ordinal when sorting. Bug #2202. commit dfecbd92db8f9581ec24f1cd29c48198e1413546 Author: Adam Dickmeiss Date: Tue Aug 12 12:16:46 2008 +0200 Added ord_list_print. commit 125946893fceb92f36727a7c91c1674a2668571f Author: Adam Dickmeiss Date: Tue Aug 12 12:16:25 2008 +0200 Reformat. Avoid C++ style comments. commit d5170943ca365ace791c3254db15cc852df56d6b Author: Adam Dickmeiss Date: Tue Aug 12 10:56:10 2008 +0200 Fixed memory leak that occurred if sorting failed. commit d2bd84bb41320884222ce44b72aa760807b3e659 Author: Adam Dickmeiss Date: Tue Aug 12 10:50:37 2008 +0200 Applied Merijn van den Kroonenberg's patch. Bug #2202. commit d6de35596bb0dc4410fc59cc5e1abc18b911fc0e Author: Adam Dickmeiss Date: Wed Jul 9 11:47:16 2008 +0200 Replace z:meta node with embedded record instead of adding it. commit 26325895a68fa527a1cd26ea2ccbe80b51db44bd Author: Adam Dickmeiss Date: Wed Jul 9 11:39:52 2008 +0200 Changed naming convention for embedded records for DOM filter. The retrieve section uses process-meta rather than meta and the attribute for meta is called name rather than element_set_name. commit 55d680f049f456e25109a73445806b0b108b4ee4 Author: Adam Dickmeiss Date: Wed Jul 9 10:58:14 2008 +0200 Added test of DOM filter and use of input chain + snippets. commit 6d6696e506bce609bb0d1b4977f14a132c05c155 Author: Adam Dickmeiss Date: Wed Jul 9 10:56:50 2008 +0200 Fixed call to zebra_snippets_log commit b3971ce2ed90ece7784b160cfa666c381f5c124a Author: Adam Dickmeiss Date: Wed Jul 9 10:55:46 2008 +0200 Fixed snippets creation for DOM and usage of input xsl. commit 50d5984f510e0434dc6811b46c822fc2301c4450 Author: Adam Dickmeiss Date: Tue Jul 8 16:48:14 2008 +0200 Removed attr_content_xml - it was identical to attr_content. commit 07d4b5295345d1ae16eb4deaac4df64e50263fa8 Merge: 76f8077 93f79ae Author: Adam Dickmeiss Date: Tue Jul 8 15:40:16 2008 +0200 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 76f8077473d16bc4886ca603f56ebf2aa36e2b17 Author: Adam Dickmeiss Date: Tue Jul 8 15:37:10 2008 +0200 Added facility to embed metadata for the DOM filter. Added a facility to embed metadata for records generated by the DOM XML filter. The meta data step is triggered by a 'meta' section in the retrieve section of the dom config, e.g. The meta section substitutes metadata for all elements called 'meta' in namespace http://indexdata.com/zebra-2.0 . The meta element must have exactly one attribute, element_set_name, which specifies the special element set name which is equivalent to the suffix to zebra:: for non-embedded special retrievals. This allows snippets, facets etc to be included. commit 784bb11a4ee525eb88c78c3fc9e08a8b5c2e9939 Author: Adam Dickmeiss Date: Tue Jul 8 10:57:04 2008 +0200 Using NMEM rather than ODR for memory stuff. commit 617e9bf364131235f70aedd813fedabe278a061c Author: Adam Dickmeiss Date: Tue Jul 8 10:49:48 2008 +0200 Added special_fetch for record control system. Added special_fetch for record control system which allows a record filter to include special retrievals (facets, snippets) into a combined record. So far special fetches have been exposed via special element set names only. commit 93f79aeeca36600f7e2ebb892dc3ccac4772c91b Author: Jakub Skoczen Date: Wed Jun 18 15:20:39 2008 +0200 Changed the attribute names (ie dc_title to title) commit 01e4d2e98b8c202a7ba75718f4bc59da714580ff Author: Adam Dickmeiss Date: Fri Jun 6 14:53:36 2008 +0200 Version 2.0.32 commit 71f78db16c00e3c6454ec6ec672c826cb3c9dd19 Author: Adam Dickmeiss Date: Fri Jun 6 14:53:25 2008 +0200 Omit debian directory from tar dist commit 30cfa2598ccd9da5323e34053f8404def2500fab Author: Jakub Skoczen Date: Wed Jun 4 14:52:32 2008 +0200 Updated the files to handle oai_dc namespaces for the record meta-data. commit cc552a6904eb35285c3cf7eff0822a932b62eeba Author: Adam Dickmeiss Date: Wed Jun 4 13:33:31 2008 +0200 More stuff in dist for AOI example commit 9d082d346e7ef6313f6435cd324a7e05ba46dbe3 Author: Adam Dickmeiss Date: Wed Jun 4 12:54:25 2008 +0200 Fix profilePath commit ce556bc293c5eed60090acaf82cc668d333abd7b Author: Adam Dickmeiss Date: Thu May 15 11:45:16 2008 +0200 Added other sort index test. commit f4bf81ef6c0ba4f997b710a8ec5f346670974813 Author: Adam Dickmeiss Date: Thu May 15 11:34:04 2008 +0200 Spell fix commit a741f3ed46c75118dd042c30b375c9cea923b33e Author: Adam Dickmeiss Date: Wed May 14 10:25:19 2008 +0200 Include idzebra-2.0-examples in RPM package commit 734bbc43bb8ad9deabf59186c0e9b1ca1b7ea664 Author: Adam Dickmeiss Date: Wed May 14 09:42:09 2008 +0200 Fixed Zebra version in NSI config commit fd8ac917393bd2dfeaeddabaeb3d150dc15df540 Author: Adam Dickmeiss Date: Wed May 14 09:20:11 2008 +0200 Towards 2.0.30. commit 0e77ef05bce104aedc4a661ed978cef98ec77a1f Author: Adam Dickmeiss Date: Tue Apr 22 13:27:40 2008 +0200 Make sure DISPLAY is unset for inkscape processing. commit 18136f065dcf9c937bc9598c652bfeb71ed6451d Author: Adam Dickmeiss Date: Tue Apr 22 11:37:03 2008 +0200 Service name: zebrasrv for zebrasrv (bug #978) commit 02a605826f5c382306851a62273fbb4533f57071 Author: Adam Dickmeiss Date: Mon Apr 21 12:56:21 2008 +0200 Fixed check for include of pthread.h commit 4893a578956a0e0048d854f277809170f702b1ca Author: Adam Dickmeiss Date: Sat Apr 19 19:45:10 2008 +0200 Fixed typo. commit d46ace3ea1c666fea65433fddfc493594a7aaddc Author: Adam Dickmeiss Date: Fri Apr 18 16:33:05 2008 +0200 Added date-range search tests. commit 5a4d40ae6b8372f38c1871b493866e2848d125b4 Author: Adam Dickmeiss Date: Wed Apr 16 12:40:13 2008 +0200 Moved test/sort and test/sort to test/api. commit 965cbd297cf8de73cfe01d55983b8161ae7cf67e Author: Adam Dickmeiss Date: Wed Apr 16 11:49:39 2008 +0200 Re-organized test files. commit 1922579d92e1a9559d4c3ab4f1cf461f56c83c3b Author: Adam Dickmeiss Date: Wed Apr 16 10:53:41 2008 +0200 Renamed files for sort tests. commit ce529949177ef63507c8becc93366df10d3d846a Author: Adam Dickmeiss Date: Wed Apr 16 10:21:03 2008 +0200 Added sort test. commit 4717561b3bc0bcd508b5d017079bd99b3a27dd84 Author: Adam Dickmeiss Date: Wed Apr 9 13:54:29 2008 +0200 Renamed safari1 test to test_safari. commit 36f484800c64a3005bb82ab86d3ce6454e218598 Author: Adam Dickmeiss Date: Wed Apr 9 13:44:58 2008 +0200 Added test case for facets. commit 6c3a0ff8ce9c94d093efa97730f892ebecac6113 Author: Adam Dickmeiss Date: Wed Apr 9 12:51:42 2008 +0200 Fixed alwaysmatches searches for ICU. This commit fixes the alwaysmatches including _ALLRECORDS for ICU term indexing. Bug #2139. commit 288e73d2917d6e02bbff7e4eec0772d82bc1a0d1 Author: Adam Dickmeiss Date: Thu Apr 3 22:11:32 2008 +0200 Towards 2.0.28. commit d0ba4855f30a787e784cc699572ae0469815d6b5 Author: Adam Dickmeiss Date: Thu Apr 3 21:57:20 2008 +0200 Update news. commit 029c9c04734e61873504c236b98e3145e70c4034 Author: Adam Dickmeiss Date: Thu Apr 3 21:54:08 2008 +0200 More CVS Id removals. commit 97a7adeb9e5059463f039495cc01cfa448463a27 Author: Adam Dickmeiss Date: Thu Apr 3 21:45:51 2008 +0200 Omit CVS Id. Update copyright year. commit 7297814fe530200ab3f1bc56380206834e8c3a82 Author: Adam Dickmeiss - Indexdata Date: Thu Apr 3 10:21:25 2008 +0200 Fix isamb_pp_forward to update the returned_numbers. commit 71f81d5c693d08d8cdc4f371d38c9598b3813243 Author: Adam Dickmeiss - Indexdata Date: Thu Apr 3 10:21:02 2008 +0200 Using YLOG_DEBUG instead of YLOG_LOG for facets stuff. commit 73920b6f7f49407da60018dfbba8f7a458c155c6 Author: Adam Dickmeiss Date: Wed Apr 2 21:00:50 2008 +0200 Use isamb_pp_forward2 as the isamb forward function. The existing isamb_pp_forward has removed by this commit and the isamb_pp_forward takes it place. The _2 version seems to be a lot faster for "long" skips and it's a lot simpler to understand (IMHO). commit 60ba1bbd30dc4302bac6888136dc6bf8f9c0c7c7 Author: Adam Dickmeiss Date: Wed Apr 2 20:57:44 2008 +0200 isamb_pp_forward2 takes into account scope. isamb_pp_forward2 takes into account scope . The function previously assumed scope = 2. commit 4f8e7cf65d950e97389d046b255ff3b09e1d9bb5 Author: Adam Dickmeiss Date: Mon Mar 31 11:34:41 2008 +0200 Let clean-local rule remove register files. commit e26fd4d7361802023a6264f406e98d71503050cd Author: Adam Dickmeiss Date: Wed Mar 26 15:14:36 2008 +0100 Ignore *.o, *~ files. commit e1be1f5267e2be257664ded166b6890e4f24db83 Author: Adam Dickmeiss Date: Wed Mar 26 15:03:45 2008 +0100 Handle right-trucation for ICU normalized terms. The string searches now handles right-trucation for ICU normalized terms. That is @attr 5=1 is supported as well as no-truncation, @attr 5=100. All other truncation attributes produces an error. We use some pretty heuristic methods to determine where to put the .* in our resulting regular expression. commit b4e2b5d713294cc740933a8e770338cef303c8fe Merge: 629c435 8dbcb21 Author: Adam Dickmeiss Date: Tue Mar 18 13:59:50 2008 +0100 Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/idzebra commit 8dbcb21f153124c2479e966b0ca0aff28f5b4760 Author: Marc Cromme Date: Tue Mar 18 13:20:16 2008 +0100 added debugging instructions in the extended services setup pages commit 629c4355616929318fd86b426544126c9b3f47fd Author: Adam Dickmeiss Date: Tue Mar 18 09:55:54 2008 +0100 Removed unused files. commit 0efcca9923da4586d3c1d1c10d4afa68c894f576 Author: Adam Dickmeiss Date: Wed Mar 12 21:33:39 2008 +0100 Ignore sub directory config. commit 5a1067c32f615b8a3ac3fc6d72f0ecacca31203c Author: Adam Dickmeiss Date: Wed Mar 12 21:31:10 2008 +0100 Fixed check for Git submodules. commit 34c193eda828dd8c6009d9b432d377113a49d777 Author: Adam Dickmeiss Date: Wed Mar 12 14:35:31 2008 +0100 Auto add Git submodules in buildconf.sh. commit 3befbe92e089e52f9826988d5a4dc03b4eaf62ba Author: Adam Dickmeiss Date: Wed Mar 12 14:34:44 2008 +0100 Generate ChangeLog using Git. commit 131e8143a9b8da294d582f0793833679101a2672 Author: Adam Dickmeiss Date: Wed Mar 12 11:47:05 2008 +0100 Moved ignore files. commit aa61d44969d09a45d04e8a6d30ab51875ad89e61 Author: Adam Dickmeiss Date: Wed Mar 12 11:26:01 2008 +0100 Added sub modules. commit 641b06ee918ab2d4f899177b7412507d7969b4c6 Author: Adam Dickmeiss Date: Wed Mar 5 09:33:23 2008 +0000 Added id attributes for example sections. commit 2f0f6b7d4f24c08c360d56db6879f0895ff5d7fe Author: Adam Dickmeiss Date: Wed Mar 5 09:29:09 2008 +0000 Version 2.0.27. commit c9074a8094fd1a1b8cde9355bc75e0812e5ab88b Author: Adam Dickmeiss Date: Wed Mar 5 09:21:48 2008 +0000 Added new tuning paramters for facets. Two new tuning parameters for facets are available. 'facetNumRecs' specifies how maximum number of records to be analyzed in a result set. 'facetMaxChunks' specifies how maximum number of sub record chunks to be fetched and analyzed per record. commit 15ffae8c3b615b07a046b0b78a66a887d43fc7c5 Author: Adam Dickmeiss Date: Wed Mar 5 09:18:51 2008 +0000 Avoid record data merge when compression is disabled. Changed record data handling so that data is not combined from multiple records when compression is disabled. This should speed up record fetches considerably for the non-compression case. commit 947765e57ed655ea532a2f7679797063bf9154b8 Author: Adam Dickmeiss Date: Wed Mar 5 09:15:04 2008 +0000 Comment commit 73bfc0981a9547abf51e91b1574a27041d260938 Author: Adam Dickmeiss Date: Wed Mar 5 08:46:54 2008 +0000 Ignore auto-generated Makefile. commit f2c9fe341a6a38c959363b0c4a7ab77ab4d4e6f3 Author: Adam Dickmeiss Date: Wed Mar 5 08:46:44 2008 +0000 Ignore auto-generated cql2pqf.txt . commit 34a23ab482d1f2360e26b8006922c6c012dfe397 Author: Adam Dickmeiss Date: Mon Mar 3 21:46:09 2008 +0000 Fixed multiple Build-Depends lines. commit 75bd2dbbeb4837dcd7578b89a6541601e4a1051f Author: Mike Taylor Date: Wed Feb 13 12:05:43 2008 +0000 Ignore generated Makefile.in commit 20844f5a6fb8d6bf1d84d553ca2da11ee09f41f5 Author: Marc Cromme Date: Thu Feb 7 13:31:33 2008 +0000 removed superflous dist-hook from build environment commit cba4cc1311ace82564eafe2c69baeaef1fa78b36 Author: Marc Cromme Date: Thu Feb 7 13:30:19 2008 +0000 corrected SRU yazserver setup commit 3c90610273e17a844c227984b4fc4107fad305ca Author: Marc Cromme Date: Thu Feb 7 13:29:38 2008 +0000 fixed make dist commit ba2b6b4c02d80cc553eaba38ded067836f65baa2 Author: Marc Cromme Date: Thu Feb 7 12:38:39 2008 +0000 pretty format XML source code commit b014345252c770fff856df02953cc863c5341a49 Author: Marc Cromme Date: Thu Feb 7 12:36:35 2008 +0000 added section on SRU CQL webservice added section on Z39.50 protocol commit 306231655249a6c67f850f6b0e907ed931585b59 Author: Marc Cromme Date: Tue Feb 5 12:16:52 2008 +0000 added several sections on web service usage of zebra, including snippets, facets, index element sets and xslt transformations commit 19f3ea2eccaeb7e16c2807b07c6243f66405c6bc Author: Marc Cromme Date: Tue Feb 5 10:15:58 2008 +0000 added lot of examples commit 472cc12b32bacbd3216be1e2a33854e229cb3d35 Author: Marc Cromme Date: Tue Feb 5 08:27:07 2008 +0000 aded Debian install path as well commit 59f0ad65b51f783ba61b63b0c97e6003bafa84b3 Author: Marc Cromme Date: Tue Feb 5 08:24:51 2008 +0000 added missing DOM filter config commit 0c663271d8ece9c920a79611defa578eb6f4d4c3 Author: Marc Cromme Date: Mon Feb 4 15:05:47 2008 +0000 added OAI fetching script commit fd448e894bd9a4b3caed66542c017706fee83712 Author: Marc Cromme Date: Fri Feb 1 13:54:39 2008 +0000 removed the outdated quickstart and examples, and started on a better tutorial using the DOM filter OAI indexing example previously packages in new Debian package. commit 5178ed6269fbc54658f35689960e2f292587801c Author: Marc Cromme Date: Fri Feb 1 11:05:02 2008 +0000 tweaking OAI-PMH example to install correctly both in tarball and Debian install commit 1f8fbdc72892099fcc9dbca53d098e1e4693837b Author: Marc Cromme Date: Fri Feb 1 10:00:23 2008 +0000 added OAI-PMH example in build system commit 052ce5507b7f8975756917ac11ff6c83db550547 Author: Marc Cromme Date: Fri Feb 1 09:55:30 2008 +0000 added commit 0c46af64ba9de14df2a1b556dd39017eec3f0b63 Author: Marc Cromme Date: Fri Feb 1 09:46:10 2008 +0000 added example OAI data commit 9a58af1c47eb3b1a5a805c6c1634639b3d28d103 Author: Marc Cromme Date: Fri Feb 1 09:45:17 2008 +0000 added files for OAI-PMH example commit e9c13eff03277584496c19487dc6afc4a8db2a4d Author: Marc Cromme Date: Fri Feb 1 08:51:28 2008 +0000 added directory for OAI-PMH example configuration commit 658e913f7bdebe46f428d58914951ed19d193e2f Author: Marc Cromme Date: Wed Jan 30 08:02:10 2008 +0000 added reference to Kete commit df3b590a48c28a89d42f15e8ad8bc9cca0d20e62 Author: Adam Dickmeiss Date: Mon Jan 28 14:19:59 2008 +0000 Towards 2.0.26. commit 097198895cce2171985c7ef99a13865f8829c074 Author: Adam Dickmeiss Date: Sat Jan 26 15:51:00 2008 +0000 Chinese text tests commit eeb136c56069a5365e5550fec2e40ac592b48981 Author: Adam Dickmeiss Date: Sat Jan 26 15:48:29 2008 +0000 Omit backslash from REGEX_CHARS. Only use for ICU search commit 7b2fe71e5eb87d3c8563d6f2e7c5999770c89350 Author: Adam Dickmeiss Date: Sat Jan 26 15:32:51 2008 +0000 Log normalized terms when indexdetails log level is used commit 1df86c90a941584991fcb5a4ea3f070a4e1c45d2 Author: Adam Dickmeiss Date: Sat Jan 26 15:32:05 2008 +0000 Extend REGEX_CHARS with more "reserved" regex chars. Added the following three characters to the list of "reserved" regular exprssion chars: \ " $ . The problem fixes searches for some Chinese terms that are normalized with ICU. Indeed these terms include one of the above REGEX_CHARS. If they are not properly escaped it will reproduce invalid regular expressions. commit a9edee55ab21cf71cb1c09e9aed547fd0e84a818 Author: Adam Dickmeiss Date: Thu Jan 24 21:52:46 2008 +0000 Require autoconf 2.60 (bug #2050) commit 2f90c38b8537b48fc38a343748d03d5354029b50 Author: Adam Dickmeiss Date: Thu Jan 24 16:17:29 2008 +0000 Handle untrans failure for element fetch zebra::index:. commit ef21c46268e6bbdd5783099a822933ac78cf1a81 Author: Adam Dickmeiss Date: Thu Jan 24 16:17:03 2008 +0000 Issue warning if scan term could not be determined commit cec0b36de7a46e326939482e51c65090d77d4faf Author: Adam Dickmeiss Date: Thu Jan 24 16:15:35 2008 +0000 Align use of seqno for ICU snippets commit 29d5f346a6f02c3bfbc57bc778e3865c951fd2be Author: Adam Dickmeiss Date: Thu Jan 24 16:14:40 2008 +0000 zebra_term_untrans handled non-existing index_type commit a4d01d6a78fb8203571670f2bf1ef2739f30a765 Author: Adam Dickmeiss Date: Thu Jan 24 16:13:29 2008 +0000 Log snippets using wrbuf_puts_escaped commit efeec04ee7f36cd14b8d8136734af4b28860ffb8 Author: Adam Dickmeiss Date: Thu Jan 24 16:13:12 2008 +0000 assert on NULL ptr fror zebra_maps_is_icu commit 553e10dbbb5997aa78becebdf6bbecb0280a2699 Author: Adam Dickmeiss Date: Fri Jan 18 14:24:56 2008 +0000 Added ZEBRA_FILEVERSION commit 2b32f605f4c8385347cbc44c2dd7f8a188f7470f Author: Adam Dickmeiss Date: Fri Jan 18 12:39:35 2008 +0000 Install doc in prefix/share/idzebra-2.0 commit e82e03f8d8fb31b337c5c47bdcb2d0723b6074ad Author: Adam Dickmeiss Date: Fri Jan 18 12:13:22 2008 +0000 Debian 2.0.24-1 commit a8d6b935f845ecc51806d70f80e025de3e86e622 Author: Adam Dickmeiss Date: Fri Jan 18 11:49:23 2008 +0000 Changed OriginalFilename to the .rc file commit ae3c0a40a6a02d0dc7748aba3816aa9ac73f4f67 Author: Adam Dickmeiss Date: Fri Jan 18 11:33:36 2008 +0000 Added DLL resources (version, etc) to zebra.dll. commit d8b7b88d8cb7baef72f3489b189ba4c7f2a9c648 Author: Adam Dickmeiss Date: Fri Jan 18 09:07:01 2008 +0000 Towards 2.0.24. commit 0e80e052a69d96e6c835d7461d3b38b64044dc93 Author: Adam Dickmeiss Date: Fri Jan 18 09:02:24 2008 +0000 Update copyright years commit 3af4a6b34a5b1ca793094341c87f8790f4f337c5 Author: Adam Dickmeiss Date: Thu Jan 17 21:48:36 2008 +0000 Enable ICU using HAVE_ICU on Win32 (same as YAZ) commit 32efa3f3690ad20c6c712c7e91500b33f025088c Author: Adam Dickmeiss Date: Thu Jan 17 15:08:18 2008 +0000 ICU libs now part of Win32 dist commit 6925136497a91eb61c0bbaefa639d1574f4b8d1f Author: Adam Dickmeiss Date: Thu Jan 17 14:13:24 2008 +0000 Towards 2.0.24. commit 28d1d00131b5e63828cf638ee1b971a348cd0d6d Author: Adam Dickmeiss Date: Thu Jan 17 14:01:45 2008 +0000 ICU enable Zebra on Windows commit 84858894e246ed2b2701098187f841efa7b7b53d Author: Adam Dickmeiss Date: Thu Jan 17 13:56:18 2008 +0000 Using YAZ_HAVE_ICU rather than HAVE_ICU. commit 12f3921ae6c4279e7c0bdf8e1eca400600bdfb1c Author: Adam Dickmeiss Date: Wed Jan 16 11:54:28 2008 +0000 Zebra logs timing for facet results commit 8143b5e6ea30fe2976f3547802c19a7c06444817 Author: Adam Dickmeiss Date: Wed Jan 9 23:00:13 2008 +0000 Changed prototype of encode_key_write. commit 75fc9c6f0432202b6689a06af1dbfe2aab79321f Author: Adam Dickmeiss Date: Wed Jan 9 22:59:44 2008 +0000 Fix encode_key_write to handle large index string. commit 6587ec659336a07b71dd50d6874f8b316eca4191 Author: Adam Dickmeiss Date: Wed Jan 9 22:18:04 2008 +0000 Removed unused definitions commit 793cada3ccf8a89a1362e70aabdd1e2c588319f4 Author: Adam Dickmeiss Date: Wed Jan 9 22:17:34 2008 +0000 Removed useless debug msg commit 2861525dc044c1816b2e6f471927c62cacd5fc61 Author: Adam Dickmeiss Date: Wed Jan 9 14:57:07 2008 +0000 Removed code no longer in use. commit 6b75f88ead401c95ebf4e6d6761447264789c01a Author: Adam Dickmeiss Date: Wed Jan 9 14:53:26 2008 +0000 Fixed bug #2002: Zebra crashes during merge using ICU indexing. The ICU stuff may produce long strings which results in buffer overflow. This patch fixes that. The old charmap system produced srings no longer than IT_MAX_WORD which is considerably less than INP_NAME_MAX in kinput.c. This fixes key_file_read so that strings longer than IT_MAX_WORD are truncated. commit c9a42d334f292b889d643cf80f6b330c051a9597 Author: Adam Dickmeiss Date: Fri Dec 28 10:29:40 2007 +0000 Fixed zebra_recid_to_sysno for parameter no_sysnos. Fixed zebra_recid_to_sysno for parameter no_sysnos so that it is never set to a higher value than the original passed value (which servers as maximum number of sysnos to be returned - presumably size of sysnos array. commit b68eefbd3de281695c6c63b2e7578b630e6d5cdf Author: Adam Dickmeiss Date: Thu Dec 20 19:09:47 2007 +0000 Version 2.0.22. commit 6a87679ff43a37a289ab356961780eb251d0504a Author: Adam Dickmeiss Date: Thu Dec 20 19:09:16 2007 +0000 Deian 2.0.22-1. commit 527dab66d9847bb7f8a931c558306a070064bf25 Author: Adam Dickmeiss Date: Thu Dec 20 19:08:34 2007 +0000 Towards 2.0.22. commit b1051b3d18e9d1ea529f5ac944aa0720206f96ad Author: Adam Dickmeiss Date: Thu Dec 20 19:07:10 2007 +0000 Update with things. commit 5670e4ac9b1b2fe462afdfec8dc0f747957084bc Author: Adam Dickmeiss Date: Thu Dec 20 19:05:12 2007 +0000 Let zebra_map_tokenize_start returns -1 in case of error. commit e86905c6c3e2ef3d05ab57c4662acddfcc265c15 Author: Adam Dickmeiss Date: Thu Dec 20 19:02:12 2007 +0000 Handle encoding errors strings passed to ICU commit 56b270676cfdf82eadf3e3a497fd8fc32e9bd65b Author: Adam Dickmeiss Date: Thu Dec 20 13:16:09 2007 +0000 Reference intro commit def59ed38b95ff15724168644c4575b335b6c69a Author: Anders S. Mortensen Date: Thu Dec 20 11:44:18 2007 +0000 Now supporting melm too. commit fc458befb0a78a1de6629f6873d9a467be1393c1 Author: Adam Dickmeiss Date: Thu Dec 20 11:21:29 2007 +0000 Changed log message for adelete action commit 4097bac1dce126e79ce1550fad8b2034a311ff80 Author: Adam Dickmeiss Date: Thu Dec 20 11:15:41 2007 +0000 Implemented update action : adelete. New action action_delete added. zebra_extract_file honors it and deletes a record as usual but does not return error code if a record does not exist already. Function zebra_extract_file takes action parameter rather then deleteFlag. The file/path update is changed accordingly. zebraidx honors command 'adelete'. commit 0f22e8ea0099e3fbf082ebd37095000be7ff0c45 Author: Adam Dickmeiss Date: Thu Dec 20 11:03:53 2007 +0000 Bump version to 2.0.21. commit 91056985a65db6893bb136a9f92402dadfed659a Author: Adam Dickmeiss Date: Wed Dec 19 14:11:36 2007 +0000 Funcion zebra_recid_to_sysno only attemps mapping if segment indexing is enabled. commit fca7da6419a78f8bd1346898c1e99be070feb279 Author: Adam Dickmeiss Date: Wed Dec 19 13:46:04 2007 +0000 Require YAZ 3.0.17. commit 5d1021b2b70231c8f36fd7ec4583c4816a4f25d6 Author: Adam Dickmeiss Date: Wed Dec 19 13:38:21 2007 +0000 Towards 2.0.20. commit 1d2919b93a4835aa36ad39f32c1bdeb34fdcb142 Author: Adam Dickmeiss Date: Wed Dec 19 13:35:39 2007 +0000 On facets and versions. commit bd964f3a7291ef3171b917348142472384b636cf Author: Adam Dickmeiss Date: Wed Dec 19 09:30:29 2007 +0000 Added some material about ICU chains. commit 183b746522e090db50f827ed39c57acabfa9e9c5 Author: Adam Dickmeiss Date: Tue Dec 18 13:55:28 2007 +0000 WS updates (no code changes). commit 0f65ff8b82e565ccc0a22c5c2bfccefff4f16df1 Author: Adam Dickmeiss Date: Tue Dec 18 13:41:27 2007 +0000 Prevent zebra_clean from deleting files for uncommited trans. commit 8d8e126e76f2001e4ce431efb293fbfa0d65c9d7 Author: Adam Dickmeiss Date: Tue Dec 18 13:39:39 2007 +0000 Simplify definition commit 6ba2b233baf29688eb6e311f44a623890b604f3d Author: Adam Dickmeiss Date: Tue Dec 18 10:04:15 2007 +0000 Allow 'index' setting value 'none' for no index types. Using index:none in zebra.cfg is treated specially and is now allowed to be used to specify 'no index types specified'. commit 13288b9c3996262162ff22d10d32bac69ed03df7 Author: Heikki Levanto Date: Mon Dec 17 14:22:05 2007 +0000 Added a note on unlimited disk space commit 121d372fc7aaf150bd93f3e046031c914d5aaedb Author: Heikki Levanto Date: Mon Dec 17 14:12:09 2007 +0000 Improved error reporting in case of no more space. Now it lists each directory with info on how much used and available. commit 76ba9c91346dc0d911aa52a3b7d40d56058585f7 Author: Anders S. Mortensen Date: Mon Dec 17 12:38:57 2007 +0000 Added a little documentation. commit 707cc9ebfa7f462ec58a31cfbad4c1a09fecfa00 Author: Anders S. Mortensen Date: Mon Dec 17 12:28:50 2007 +0000 Finished. commit 29031807a95fde753e12d606c7db2e31acc5f645 Author: Adam Dickmeiss Date: Mon Dec 17 12:24:50 2007 +0000 Escape backslash for ICU terms in searches commit 265975914bf06d41d2e060dca2c9ee7072aa17c9 Author: Adam Dickmeiss Date: Mon Dec 17 12:23:03 2007 +0000 Scan test. Using ICU config in 'tab'. commit 5764142966b5a10616035b992d1d90084fb39b9b Author: Adam Dickmeiss Date: Mon Dec 17 12:22:05 2007 +0000 Added word ICU config for da (Danish). commit daca89243af359a79f23b69690d2b39aa6db9b67 Author: Anders S. Mortensen Date: Mon Dec 17 11:48:14 2007 +0000 Added. commit 5e8a750d3038d737054cd56cb893e534d77bc109 Author: Adam Dickmeiss Date: Mon Dec 17 08:44:07 2007 +0000 Sort indexes using ICU normalization. commit c51d8a82aae537ffa1ad29aecea5cb6e7a9be37a Author: Adam Dickmeiss Date: Thu Dec 13 20:19:40 2007 +0000 Added clean-local sections to fix make distcheck commit e4b67f7065d49c87839442f19f72141098d16920 Author: Adam Dickmeiss Date: Thu Dec 13 19:59:21 2007 +0000 Removed log msg commit c393a764a0ff22b6a9a3560dfa3edbb46ccb13ae Author: Adam Dickmeiss Date: Thu Dec 13 19:50:26 2007 +0000 Consider srcdir in tests (for make distcheck) commit 19eb2f5565a7f77d29fbba22cab158dcadf4d5db Author: Adam Dickmeiss Date: Thu Dec 13 19:50:13 2007 +0000 Add modulePath (fix distcheck) commit a2951b68223de6544efefef63f4541965cc805a6 Author: Adam Dickmeiss Date: Thu Dec 13 18:10:49 2007 +0000 MARCXML example uses ICU. commit 12dfc68329774a228050f5b3e85d7c493f7092a5 Author: Adam Dickmeiss Date: Thu Dec 13 18:10:35 2007 +0000 ICU charmap files. commit 2c130f28f8f06161e35a7945c9acb11d966937f9 Author: Adam Dickmeiss Date: Thu Dec 13 18:08:26 2007 +0000 Fix icuchain file load to use profilePath commit 5a20b7d6e7181628a8aa5583d084a24eeaf4d6be Author: Adam Dickmeiss Date: Thu Dec 13 17:42:28 2007 +0000 MARCXML example is using filter 'dom' instead of 'alvis'. commit 3312f8e6706be46ce1bc567b1c5d1e82cce1b2db Author: Adam Dickmeiss Date: Thu Dec 13 17:41:50 2007 +0000 Proper identity XSL commit bf99dfa4e17281320b4f5016b099f395e6d62965 Author: Adam Dickmeiss Date: Thu Dec 13 15:43:52 2007 +0000 ICU test is UTF-8 based. commit 7336356a8d037e2782e201bcdc48ff4ae2850ae4 Author: Adam Dickmeiss Date: Thu Dec 13 11:09:20 2007 +0000 ICU functional for scan and snippets. commit 34b6f9669f88fef08ad911000f2b66fb2c3429b9 Author: Adam Dickmeiss Date: Mon Dec 10 17:06:07 2007 +0000 Handle display buf for searches (ICU). Extend zebra_map_tokenize_next to return display terms. For RPN-query evaluation (rpnsearch.c) store display term in WRBUF rather than buffer. commit 6c3e218ef89acbc3275761919ef8731615ae6d7b Author: Adam Dickmeiss Date: Fri Dec 7 14:17:37 2007 +0000 Added test for complete-subfield search (:p). commit 896b30853daabb6294afe8b0a2f74fa6d6e397d8 Author: Adam Dickmeiss Date: Fri Dec 7 14:09:09 2007 +0000 ICU term lists are handled for search. commit 8d18c2ba52018f0a4149abb5e2bd2bb2c75fe14e Author: Adam Dickmeiss Date: Wed Dec 5 09:55:10 2007 +0000 Allow facet size to be specified. A facet size may be specified by appending colon and number after index type, e.g. zebra::facet::title:w:10 . commit a1f5729d06659c681dfd68d56c756478bbdcdf99 Author: Adam Dickmeiss Date: Wed Dec 5 09:29:52 2007 +0000 Sort facets by set frequency. commit 52faec54d6e3cc18105f36546df7b23faeb9c945 Author: Adam Dickmeiss Date: Tue Dec 4 12:52:33 2007 +0000 SUTRS-like result for Facet. commit b2084f54a96f78eede08dda6f98d5ee1f502e91b Author: Adam Dickmeiss Date: Tue Dec 4 11:13:17 2007 +0000 Remove log message from zebra_recid_to_sysno commit 6a1d0f3d04117ada4de3943dcfa40764f139a5db Author: Adam Dickmeiss Date: Mon Dec 3 17:16:48 2007 +0000 Added strmap object commit e19ee19bbf5ccd24b95ff357517fc0645a68958d Author: Adam Dickmeiss Date: Mon Dec 3 17:09:01 2007 +0000 Reduce number of CHECKs so that speed can be tested commit 783dcac27963455215ae4b22864564943f088baa Author: Adam Dickmeiss Date: Mon Dec 3 16:54:49 2007 +0000 Removed unused source symtab.c. commit 4ff69ae35942e69d6947ff169febc26d5db8dddf Author: Adam Dickmeiss Date: Mon Dec 3 14:33:35 2007 +0000 Added more tests WRT position attribute commit d58c970cc76247dc3f7f263bf235daf6177695af Author: Adam Dickmeiss Date: Mon Dec 3 14:33:22 2007 +0000 Memory leak fix - in case of error in use of position attribute. commit 95a5868bb03e3445b1e234a969358b6eaa74a49c Author: Adam Dickmeiss Date: Mon Dec 3 13:34:17 2007 +0000 Omit first-in-field index terms for facets commit f82c996895d8dcd69e987660ebf9fdaafdba35b0 Author: Adam Dickmeiss Date: Mon Dec 3 13:04:04 2007 +0000 Added function zebra_create_rset_isam . commit 560208f2fa44eabecd96de83679901f570297d30 Author: Adam Dickmeiss Date: Mon Dec 3 12:57:55 2007 +0000 Added position attribute test commit ebc8a5296010dd0379bf7ae81b6c31145f8e85a7 Author: Adam Dickmeiss Date: Mon Dec 3 11:49:11 2007 +0000 First functional facet result (zebra::facet::..). commit 4e66751dbded138d3a4c5f6256d1a514b212db7e Author: Adam Dickmeiss Date: Mon Dec 3 11:47:53 2007 +0000 Log records when they differ in tl_fetch_compare commit ebf3ccba5a3bb82321066f26d1162424483b98fa Author: Adam Dickmeiss Date: Mon Dec 3 11:46:39 2007 +0000 Fixed memory leak for safari filter commit 08d6561cdd2bb03f02913f25b20a428aa9aea575 Author: Adam Dickmeiss Date: Mon Dec 3 09:12:38 2007 +0000 Added zebra_strmap_it(erator). commit cfe61a9ffca3be9a4104ec3aad56e4618a5d59cd Author: Adam Dickmeiss Date: Sun Dec 2 11:30:28 2007 +0000 Added simple string map (hash) utility. commit cd405b18db3526be1855d7e14a598616237a4b2e Author: Adam Dickmeiss Date: Sat Dec 1 21:34:10 2007 +0000 Fixed bug in zebra_recid_to_sysno (handle non isamb case) commit 3731bdaf94aeba2550fc553aebe34831c203dc36 Author: Adam Dickmeiss Date: Fri Nov 30 12:19:08 2007 +0000 Allow record retrieval for record types using custom record IDs. A filter may specify its own record_id by assigning a non-zero to record_id member in RecWord. However, until this commit, the original record was not retrievable . Updating only occured with a custom match ID. With this patch the record can be retrieved . The allrecords index (_ALLRECORDS) is used as a map between custom record IDs and Zebras internal record store which is identified by the system-number (storeData and storeKeys). commit d72e1bb8f40e57e62944199c576e22e14f1b2b60 Author: Adam Dickmeiss Date: Fri Nov 30 10:08:01 2007 +0000 Added testlib functions for fetch of records commit 8681cc56ce8bba50a0b531107519e9f462949e9b Author: Adam Dickmeiss Date: Fri Nov 30 09:51:31 2007 +0000 Moved local declaration (for debugging) commit 503ad800671bf46891e5a39c2a3a17544d577721 Author: Adam Dickmeiss Date: Wed Nov 28 11:16:32 2007 +0000 Extend recindex system may use ISAMB for records map. The recindex system may use ISAMB for map between record ID and record data. The recindex_open has an extra parameter to enable this feature (disabled for now). commit 6ee446e1ec64b03521ffd54f0d3003686566d093 Author: Adam Dickmeiss Date: Wed Nov 28 10:38:10 2007 +0000 WS updates (no code changes). commit f2daad6f8d9e14d93e4e40b9fe663d768b4044d9 Author: Adam Dickmeiss Date: Wed Nov 28 09:56:42 2007 +0000 Extend isamb_merge read handler with new insert mode. Extend isamb_merge read handler, read_item, with new insert mode of value 2. Like 1 this means "insertion", but, unlike 1, forces an existing key to be replaced even though the comparison is 0. Until now ISAMB has assumed "same" key for value of 0. commit b5e83a9b112dbf718cd98f7cd89edd2f06fa0354 Author: Adam Dickmeiss Date: Fri Nov 23 14:00:16 2007 +0000 New records.obj; removed recstat.obj commit 980ed96922282e7d6e20df51c14a7bb6e97246e8 Author: Adam Dickmeiss Date: Fri Nov 23 13:59:14 2007 +0000 Got rid of redundant files WRT records mgt. commit 8fa59ec675af0ea4f15f157401c61121b5cb5782 Author: Adam Dickmeiss Date: Fri Nov 23 13:52:52 2007 +0000 Factor records system mgt into recindex.c, records.c. commit 8896080000b8d31751ca253b59aaae425ebd9e48 Author: Adam Dickmeiss Date: Fri Nov 23 13:11:08 2007 +0000 Refactor recindex out of Records struct commit d8deeadf0ff6606e63ce21b2b2499a40d69e482c Author: Adam Dickmeiss Date: Thu Nov 15 08:53:24 2007 +0000 Version 2.0.19. Use YAZ' wrbuf_write_escaped. commit de23bf389661453824039451e218797d0b924523 Author: Adam Dickmeiss Date: Thu Nov 15 08:53:04 2007 +0000 More ICU tests commit 1546a45b784bae6a8c6a66bf6b63dba85f8b47b9 Author: Adam Dickmeiss Date: Wed Nov 14 21:10:46 2007 +0000 Ignore logfiles commit 2335f9cae4f600796bd89f404c44aeb448071330 Author: Adam Dickmeiss Date: Wed Nov 14 21:10:26 2007 +0000 Ingnore test programs and log files. commit 3ad217db5690ff3f42bd97a6eb25619385a70b5f Author: Adam Dickmeiss Date: Wed Nov 14 13:12:41 2007 +0000 Added small test commit 1b13fcc6c6e0820ce52c340155e84ae69a4b18a8 Author: Adam Dickmeiss Date: Wed Nov 14 09:51:00 2007 +0000 Make a test somewhat more readable commit ba950cd0f07c22d667375141f368490123a72127 Author: Adam Dickmeiss Date: Wed Nov 14 09:44:16 2007 +0000 Use test facility of YAZ commit 52a3c85ef0baad016f2b324644f34d9fd62f7d34 Author: Adam Dickmeiss Date: Tue Nov 13 13:41:51 2007 +0000 Use zebra_map_get_or_add instead of zebra_map_get for searches. Use zebra_map_get_or_add instead of zebra_map_get for searches. For systems that do not define default.idx the system must generate a zebra map for it (and warn if default.idx was used). commit d8bc3109fc2006ac7623909a062ce7df5420d69e Author: Adam Dickmeiss Date: Mon Nov 12 13:41:19 2007 +0000 Require YAZ 3.0.16 or later commit b1026ec8dd05ad9588e5ab471c35cba59e11e37d Author: Adam Dickmeiss Date: Mon Nov 12 13:40:50 2007 +0000 Update for ICU transform (was normalize) commit 99dfd244ebcc60d73eb50500f67207ae1aa591d8 Author: Adam Dickmeiss Date: Thu Nov 8 21:21:58 2007 +0000 First successful test with ICU sortkeys in dictionary. commit 47eafc2497abc6886cd77cd3707eddeafdd244dc Author: Adam Dickmeiss Date: Thu Nov 8 21:21:16 2007 +0000 Added test of regexp patterns (DFA) commit 03cd7d7f298324b3cc7185de7e9c65eab79c5048 Author: Adam Dickmeiss Date: Thu Nov 8 13:35:36 2007 +0000 Update for locale API changes. commit c19bdb08393eb7b97f7783cb576f223b4fc505ed Author: Adam Dickmeiss Date: Thu Nov 8 09:30:05 2007 +0000 Use header icu.h instead of icu_I18N.h commit 790139cda48a3bea01df242d4372bffaba94f368 Author: Adam Dickmeiss Date: Thu Nov 8 08:18:37 2007 +0000 Check for YAZ_HAVE_ICU instead of HAVE_ICU commit b975cabc6e2d7aaa3dea6f1e4a4d7f2c440d5c5a Author: Adam Dickmeiss Date: Thu Nov 8 07:54:17 2007 +0000 Do not perform t17 if ICU is disabled commit 4d9f66ed35ee70e5670cd67cc9e2da7b5de93bf7 Author: Adam Dickmeiss Date: Wed Nov 7 11:22:58 2007 +0000 Fix non-ICU compilation (due to previous commit) commit 714209e118e0c66ce43edc1ab452ef675825c265 Author: Adam Dickmeiss Date: Wed Nov 7 10:24:28 2007 +0000 Added first test ICU indexing test commit a479e3c7f966848a6fc71ac2c2c7f5db7068351b Author: Adam Dickmeiss Date: Tue Nov 6 10:29:58 2007 +0000 The zebramaps implements index_types functionality. commit 1c2f77dd881bcf0b2718cafeb380581634a165fb Author: Adam Dickmeiss Date: Mon Nov 5 13:58:01 2007 +0000 Merge icu_chain into zebramaps. commit 6d0a142a5e3a35b4508a75226758ca918633440d Author: Adam Dickmeiss Date: Mon Nov 5 11:36:23 2007 +0000 Changed error handling for unknown zebra maps. The zebramaps system a warning the first time an inknown index type is used. This warning, should only be issued if maps were read from a configfile (zebra_maps_read_file). commit 18dd1a93498eca4352323fb277ea437d24106b1f Author: Adam Dickmeiss Date: Mon Nov 5 11:27:24 2007 +0000 Refactor zebramaps parsing commit cb0ae247ea096af96d5fdb453290747fbbf032fd Author: Adam Dickmeiss Date: Mon Nov 5 11:20:39 2007 +0000 Changed limit set parameter for rpn_scan commit d9efeb647dc1dd2ff8045306605f2d90beabf3cd Author: Adam Dickmeiss Date: Thu Nov 1 16:01:33 2007 +0000 Beginnings of facets commit 290a65e5f45f2c5c774489e4175beaec23f5ea23 Author: Adam Dickmeiss Date: Thu Nov 1 15:59:47 2007 +0000 WS changes for function calls. commit bfe7ce5c9c47f3f4ad1ac76d4232b9807d5ee158 Author: Adam Dickmeiss Date: Thu Nov 1 14:56:07 2007 +0000 Added rpn_facet which does little at this stage. commit 17fa6045fff873ebf6339d465f07f2b3c0e0edf0 Author: Adam Dickmeiss Date: Thu Nov 1 14:12:44 2007 +0000 Document scan approximative limit commit 1aac6e217a6ff917fdacabec636aa00cbf2f3226 Author: Adam Dickmeiss Date: Thu Nov 1 14:10:03 2007 +0000 Honor approximative limits for scan (type 12). The documentation mentions attribute 9/11. However, that's not found anywhere in the code. Attribute 12 is chosen (same as a search global approximative limit). commit e199777080c6fa0963d51b7df1763fd5286ca9a4 Author: Adam Dickmeiss Date: Wed Oct 31 16:56:13 2007 +0000 Changed the index type to a string everywhere. The functions zebra_map_get and zebra_map_get_or_add changed their 3rd argument 'int reg_id' to 'const char *id'. The recExtractCtrl struct defined in idzebra/recctrl.h changed: the seqno array was removed. It is used by no filters and assumes that index type(AKA register type) is a char (int). commit 6f7dfe3c3f09f7104c1ae7616c9d207edeab308d Author: Adam Dickmeiss Date: Tue Oct 30 19:17:15 2007 +0000 Introduced zebra_map_t in zebra_maps API. commit 9ad95c1cfd8defda656d4c287c45342f908d045c Author: Adam Dickmeiss Date: Mon Oct 29 22:22:06 2007 +0000 WS changes for function calls. commit 670bc043a748e0539a534643fc3993a6c9426c13 Author: Adam Dickmeiss Date: Mon Oct 29 20:07:04 2007 +0000 Refactor database lookup to single function. Search for each database is handled by rpn_search_APT_database. Resultes for each database is collected by rpn_search_APT. This is simpler and shorter than previous version of search which had database merge in multiple places. commit 951640aaee0a8445a079e006ffb1fa081719b066 Author: Adam Dickmeiss Date: Mon Oct 29 19:54:46 2007 +0000 Revert commit 2eacaa1e549428b231de5844f397466f6a44c59f Author: Adam Dickmeiss Date: Mon Oct 29 16:57:51 2007 +0000 Changed type of index_type char/int to string. The index_type is part of the RecWord structure which is used by all record filters. It used to be a int char (e.g. 'w'). It is now a string so that arbitrary index types can be specified . For example there might be a Greek Title (e.g. word:greek or word_greek). commit 4b903c542156253ebb2a4f004b528fe9e3af5212 Author: Adam Dickmeiss Date: Mon Oct 29 13:43:57 2007 +0000 First indexing using index_types system (ICU). commit 09aa21f9fc2a275701c7820a260b75b6323fcc42 Author: Adam Dickmeiss Date: Mon Oct 29 11:10:43 2007 +0000 WS changes for function calls. commit d82c0efad7971d102220a8824e1ea674db5b7fe2 Author: Adam Dickmeiss Date: Mon Oct 29 09:25:40 2007 +0000 WS changes for function calls. commit 7657d349adae01f0fa31b277f06778f23632ecd1 Author: Adam Dickmeiss Date: Mon Oct 29 09:23:08 2007 +0000 Fixed bug #1820: Omitted password crashes Zebra in some cases. commit a14464ed699cf0bb44536dfc2c8137300f7b081d Author: Adam Dickmeiss Date: Mon Oct 29 08:20:16 2007 +0000 Only include icu_I18N.h if HAVE_ICU is defined commit ae9a8f5eaa933c899c35556e438de8ee7f676318 Author: Adam Dickmeiss Date: Mon Oct 29 08:19:39 2007 +0000 Added a few asserts commit d23fa8a4dd996c3613303249d197ee74b8b10d49 Author: Adam Dickmeiss Date: Sun Oct 28 18:41:08 2007 +0000 Fixed bug #1819: incorrect number of args to melm does not.. This is a trivial fix for bug #1819: incorrect number of args to melm does not issue warning/error. commit e9f4ac05ebcdf0bf3497e62d0f70e9b643d9cc80 Author: Adam Dickmeiss Date: Thu Oct 25 19:25:00 2007 +0000 Tokenize for index_type system. commit 6d2a90b3e3802726c044e128d1a34f5f892f9f3f Author: Adam Dickmeiss Date: Thu Oct 25 10:04:38 2007 +0000 Modernize Doxyfile commit a45e75f3bebc173a2464dd0024774c81c9ae8873 Author: Adam Dickmeiss Date: Thu Oct 25 09:23:34 2007 +0000 Removed unneeded include. commit f4767dc0b946394baeeaed3fea5b8579d170ab5e Author: Adam Dickmeiss Date: Thu Oct 25 09:22:36 2007 +0000 Renamed index_rule to index_type. commit 2350e972879eb1c4de0d2d800edacb3567b7caf4 Author: Adam Dickmeiss Date: Thu Oct 25 07:43:13 2007 +0000 Do not write zebrasrv.pid in daemon mode commit 42cd12e606db733d23606480a1ece262ebba77ed Author: Adam Dickmeiss Date: Wed Oct 24 13:55:55 2007 +0000 Using yaz_match_glob from YAZ. commit 2de23570d27a0d5f4683e4c9ebd9c13eab2fc2a1 Author: Adam Dickmeiss Date: Tue Oct 23 12:39:48 2007 +0000 Check for ICU for include of icu_I18N.h. commit d4999f503a4d90db9a7777a2da2bb58cff1823a5 Author: Adam Dickmeiss Date: Tue Oct 23 12:36:22 2007 +0000 Doxygen. commit 570bf3746bef524124e2a90a2999981a1c734b20 Author: Adam Dickmeiss Date: Tue Oct 23 12:26:25 2007 +0000 First parts of index_rules system (ICU support). commit e30daf1c89e3b781de360a9dcad4f83e72e16d28 Author: Adam Dickmeiss Date: Mon Oct 22 13:05:22 2007 +0000 Zebra links with ICU enabled YAZ. Requires YAZ 3.0.15 or later. commit f613e5baf878c308d24808fa279145269fc2490a Author: Adam Dickmeiss Date: Sun Oct 21 19:39:00 2007 +0000 Fixed bug #1796: MARC parse errors when using mod_dom on scan. commit 8607f8bf6ed89b0adf92fdecebb63e8430af9fdf Author: Adam Dickmeiss Date: Wed Sep 19 10:03:44 2007 +0000 Towards 2.0.18 commit 69af3578ac7d0c56df4e0fc6718a2e8d19e9fd1b Author: Adam Dickmeiss Date: Tue Sep 18 19:55:24 2007 +0000 Comment commit ac7e25f7dba2a56d0ecb9babd9512a20e5712bb0 Author: Adam Dickmeiss Date: Tue Sep 18 19:21:32 2007 +0000 Removed reference to url.srw commit 32a484ae46e29867a944010785a25556c60b4e5b Author: Adam Dickmeiss Date: Tue Sep 18 18:57:29 2007 +0000 Fixed scan for enabled staticrank. commit 3078095d1eea5013db0094cee83bfb27ffbb4263 Author: Adam Dickmeiss Date: Wed Sep 12 09:29:27 2007 +0000 Use conditions to enable/disable manifest files commit 7fc79094615c3eaff009dfb0336821aaba8ea65a Author: Adam Dickmeiss Date: Wed Sep 12 07:46:40 2007 +0000 Towards 2.0.16 commit 1b5d9571e1a842998c25b50093ca6d9dd84c909a Author: Adam Dickmeiss Date: Tue Sep 11 15:29:35 2007 +0000 Added version.obj commit c2e103625a6fd9a65739125a95784c8fdc841c8b Author: Mike Taylor Date: Fri Aug 31 21:12:51 2007 +0000 Include , avoid warning. commit 87f0188b0b31dde5f5510a30b17a89f45384f271 Author: Adam Dickmeiss Date: Fri Aug 31 07:02:24 2007 +0000 Fixes for snippet/scan where we do "reextract". The setStoreData handle was assumed to be present. The alvis and dom filter now check for it. For the reextract case it's NULL and we do not do splitting. commit 291eda73f1f61c5985d272b2d85cf272de3f64c6 Author: Adam Dickmeiss Date: Tue Aug 28 21:40:57 2007 +0000 Fixed bug #1406: Delete All Result Sets causes assertion failure. commit 194618080c2667fbce5ce7276e710c0f81d9c57d Author: Adam Dickmeiss Date: Tue Aug 28 18:12:09 2007 +0000 Use AC_SYS_LARGEFILE instead of AC_TRY_RUN test to check for 64-bit file support. commit 5def48f6cb987e716ea03cb13b95736a8f630c0e Author: Adam Dickmeiss Date: Tue Aug 28 17:57:46 2007 +0000 Use AC_CHECK_TYPES for 'long long' rather then AC_CHECK_SIZEOF. AC_CHECK_SIZEOF uses AC_TRY_RUN on, at least, on some autoconf versions. And AC_TRY_RUN is best avaoided. commit f63c1ba61f101f81fc16b7a9ea0b1fbc4e6cae16 Author: Adam Dickmeiss Date: Mon Aug 27 17:43:21 2007 +0000 Using yaz_snprintf rather than sprintf commit 8af1b744fc580fb3e22ef54ba883d1ed67412b20 Author: Adam Dickmeiss Date: Mon Aug 27 17:40:10 2007 +0000 Visual studio version in zebra_get_version commit 3fcc65de3bb8ac7af03900dccf23a5b1219b2e8e Author: Adam Dickmeiss Date: Mon Aug 27 17:22:22 2007 +0000 Added zebra_get_version commit e3ee8c601b372e587b39f20bdbed0cabeecb2df5 Author: Adam Dickmeiss Date: Mon Aug 27 09:05:40 2007 +0000 Package idzebra-2.0-utils depends on exact version of libidzebra-2.0. Package idzebra-2.0 depends on exact version of idzebra-2.0-utils. commit 107cc39e2b054cdd9fa016b54435a7f681b0d097 Author: Adam Dickmeiss Date: Mon Aug 27 08:32:53 2007 +0000 Depend on version 2.0.15 commit dd4ced2dc2223d702e95791719a48f3f765eba87 Author: Mike Taylor Date: Wed Aug 22 22:58:05 2007 +0000 New commit 5690a02eb4b66139814483dab8e7a5b5fcb74a55 Author: Adam Dickmeiss Date: Wed Aug 22 12:36:22 2007 +0000 Update for newer Libxml2/libxslt and Expat 2.0.1 commit ec4e109c7c97e8afae0bc2e2a1856aab2951a92c Author: Adam Dickmeiss Date: Wed Aug 22 10:26:06 2007 +0000 On snippets and scan display term commit f687a80fbc9827c82db4d162630f7010d754b583 Author: Adam Dickmeiss Date: Wed Aug 22 08:13:00 2007 +0000 Do not set entries in scan response handler. It is initialized by the GFS already. Using GFS's initialization allows us to specify display_term. commit 7f49e3326f7cf483c6d99393fef0816627544a2e Author: Adam Dickmeiss Date: Wed Aug 22 08:02:30 2007 +0000 A little more on snippet support commit 44c5557ecbffe5dedb6870c61e8362688bf1562c Author: Adam Dickmeiss Date: Wed Aug 22 08:01:32 2007 +0000 Fixed bug in snippet support where first char was missed commit 5623222cf968d493c2bc9506c42b8344de60c4e5 Author: Adam Dickmeiss Date: Tue Aug 21 13:27:04 2007 +0000 Scan now returns displayTerm which is extract from original record. Goodbye to @'s - for scan. Bug #1411. commit 6988ba91e363565638c27a8d5895ad9afc409e75 Author: Adam Dickmeiss Date: Tue Aug 21 11:06:46 2007 +0000 Generic snippet support. Unlike previous versions of snippet implementations for Zebra this is not tied to a specific filter. The snippet(s) are returned as an XML record with one or more snippets in it - for special element set name zebra::snippet. commit 40294b8507793f9447a647bfe2f961d232091456 Author: Adam Dickmeiss Date: Tue Aug 21 07:49:18 2007 +0000 Removed snippet code from alvis filter commit 069747eea98eaa9df53282368a481ac26fd2e0e6 Author: Adam Dickmeiss Date: Mon Aug 13 08:53:42 2007 +0000 Fixed magic NS for DOM XML indexing. commit efb17a2217474f9c890b2ab109e58240765e18a3 Author: Adam Dickmeiss Date: Tue Jul 10 09:43:33 2007 +0000 Removed / in doc install rule to avoid double-slash (cygwin) commit 080ae4a565fb895f3c1f3b3bf11cff6867718418 Author: Adam Dickmeiss Date: Tue Jul 10 09:41:12 2007 +0000 Removed / in doc install rule to avoid double-slash (cygwin) commit 676ae79af06721621b1f66bdaec06164b3ba7b1f Author: Adam Dickmeiss Date: Wed Jun 27 22:17:20 2007 +0000 For data-1, do not chop text data in ISO2709 creation . The problem is that in some cases the chop operation will remove essential content. However, chop is needed in cases where input is XML/SGML. Therefore, this operation performed in the data-1 map code instead and chop is enabled by default. The chop can be disabled with 'nochop' in parameter in map rule, e.g. map title /(3,245)/(3,a) nochop commit ca820b5e84bec416bf0f5790d1aac509842b4faf Author: Adam Dickmeiss Date: Wed Jun 27 22:04:45 2007 +0000 Added data1_chop_text which removes whitespace in cdata nodes commit 8582f894567d414c1bf007cb4155844e7659a556 Author: Adam Dickmeiss Date: Wed Jun 27 13:46:43 2007 +0000 Remove comment about XML only being support in record update commit cb9ea43a711db622208172601e7ee6ee6cd2a925 Author: Adam Dickmeiss Date: Tue Jun 26 21:01:33 2007 +0000 Fixed typo commit e046543b28de73cccd5b8b1cc9d13126bd20dd05 Author: Marc Cromme Date: Fri Jun 22 12:59:23 2007 +0000 fixed typo commit 0cb66192b46f353d3d8b2b115fbcf841921609d2 Author: Adam Dickmeiss Date: Tue Jun 19 19:42:17 2007 +0000 Fix bug no in NEWS commit a8d9ca813f29e7d1dd0e04ee5dafca2d25f38202 Author: Adam Dickmeiss Date: Tue Jun 19 19:39:54 2007 +0000 When mod.dom alwo sets additional info when it returns diagnostic 'Specified element set name not valid for specified database'. commit 681641deb0d9806b16d4605619cd6ef566393c0a Author: Adam Dickmeiss Date: Sun Jun 17 07:06:03 2007 +0000 Removed definition of docdir. It is set by automake already commit bade734afdf52709b5c01052bab003dc968d079c Author: Adam Dickmeiss Date: Fri May 25 14:05:52 2007 +0000 Flush the iconv sequence for each sequence in a .chr file. This fixes nothing because the ICONV handles in use always flushed themselves. They may not always do that, so we must do it. commit 293023bab35c9ea0ced910e19b4d367d48a2cd69 Author: Adam Dickmeiss Date: Fri May 25 13:46:01 2007 +0000 Cosmetic commit 3f837255e2e97bd39ffabb13621d398f5610348c Author: Adam Dickmeiss Date: Fri May 25 12:17:11 2007 +0000 Fixed bug #1142: Non-indexed but listed attributes issues diagnostic. We keep the existing behavior by default and continue to issue a diagnostic. Typically there are many attributes given in .att-files which are never used in a Zebra installation. If they issue 0 hits, then most Zebra servers will basically lie about their capabilities. It would also confuse a lot of users.. (Dead programs tell no lies). But it is certainly useful to be able to say "allow unknown use attribtute" in controlled environments and in multi server systems (where attributes may not indexed in all places) . Zebra now allows attribute 14 to control this. 14=0 makes Zebra works as usual (throw a diagnostic). 14=1 makes Zebra produce 0 hits (for the leaf/APT) commit 763bf5f4fc8d22feda4784ec7a9db01902902016 Author: Adam Dickmeiss Date: Thu May 24 13:44:09 2007 +0000 Using acro. entities. Replaced some it's to its (where appropriate). commit 1b8e1d7dfece31918056f76819c18675ed6e781e Author: Adam Dickmeiss Date: Tue May 22 11:12:53 2007 +0000 Use entity idcommon rather than common commit 8174591e6c5c002acca0db83c4c46e1d0265a9e2 Author: Adam Dickmeiss Date: Mon May 21 11:54:59 2007 +0000 Zebra returns character encoding as part of init response even if client does not suggest one. commit 60b519816aefda59ed16a7b484f13f144cd1fcac Author: Adam Dickmeiss Date: Mon May 21 11:53:49 2007 +0000 Simplify data1 character set conversion commit 3608e3fddc1cebd4e359737faeeac1997703a24c Author: Adam Dickmeiss Date: Mon May 21 08:23:32 2007 +0000 More news commit abe63ccc314ed5619a58d63b73202d10668cae55 Author: Adam Dickmeiss Date: Mon May 21 07:15:06 2007 +0000 Fixed bug #1132: tstcharmap fails on flurry (amd64). Problem was missing include of stdlib.h. commit a49b6f2fc9cc5208800f0195647f61eb24997812 Author: Adam Dickmeiss Date: Sat May 19 19:44:14 2007 +0000 Fixed bug #1131: Missing value-of data in DOM filter. The problem was that the internally generated MARCXML did not have the namespace "http://www.loc.gov/MARC21/slim" declared. commit efced36ec8c431c1f630c69beed3e29965900538 Author: Adam Dickmeiss Date: Wed May 16 12:31:17 2007 +0000 Use YAZ_CHECK_LOG consistently. commit 88ca925c7ebfcb70825060ac39fb254ba9ca0211 Author: Adam Dickmeiss Date: Wed May 16 10:58:19 2007 +0000 Ignore tstres commit 34cbac3d95d4115856ac1620911e51c7e056289c Author: Adam Dickmeiss Date: Wed May 16 10:57:05 2007 +0000 Fixed bug #1049: zebra.cfg lines with leading space are ignored. Res system now uses YAZ' tokenizer. Added test for this (tstres.c). commit bdaf384287d886e1f796a31ab1337c13da1d16a2 Author: Adam Dickmeiss Date: Wed May 16 10:50:03 2007 +0000 Bump to 2.0.15. Require YAZ 3.0.3 commit d64c82cd05145e97c4edef0434c383a29c95c8fe Author: Adam Dickmeiss Date: Wed May 16 08:57:26 2007 +0000 Indentation. Removed a few unused functions. commit 0d51b70100d33b91e18690cf52943228bc743dd8 Author: Adam Dickmeiss Date: Wed May 16 08:46:19 2007 +0000 Fixed bug #1128: sortmax not honored. commit 43e4297c07b9c8b29bfc1ea647fc27456198f6ce Author: Adam Dickmeiss Date: Mon May 14 14:05:21 2007 +0000 Factor common work in term_100, ..term_105 into private function add_non_space. commit bb5e455404dc9d18e846a5508588cf402249a1f9 Author: Adam Dickmeiss Date: Mon May 14 13:21:32 2007 +0000 Added string relation tests. commit 9f937bde31af9c7d6eb0f1355d884110131fa2b9 Author: Adam Dickmeiss Date: Mon May 14 12:33:33 2007 +0000 Fixed bug #1121: Crash for some searches with customized string.chr. This involves longish but trivial use or WRBUf instead of static buffer - problem is the heavy use equivalent directives in the customized string.chr. commit 6441ecad8fa8d7bab64a58857ea025458aa5332d Author: Adam Dickmeiss Date: Wed May 9 07:42:46 2007 +0000 Fix dup YAZ_EXPORT commit 3de37d13913bc23896efd6639c6e1742a9e43fde Author: Adam Dickmeiss Date: Wed May 9 07:36:06 2007 +0000 Towards 2.0.14. commit 3f0a77c9e002cc8bc888e33ae5f96a79e6daaa31 Author: Adam Dickmeiss Date: Wed May 9 07:30:53 2007 +0000 Notes on version update. commit cc1c1b6d188dd076ef2aa2b539852f3afb8ad111 Author: Adam Dickmeiss Date: Wed May 9 07:30:43 2007 +0000 m4 quoting commit a12477a52f995b809b00ac9e7b73a9b98cfbc540 Author: Adam Dickmeiss Date: Wed May 9 07:07:18 2007 +0000 Fixed bug #1114: scan within set may use excessive CPU. commit 65333d1f3b9df92be6b48e1d0b9cd7f0f0023e5b Author: Adam Dickmeiss Date: Tue May 8 14:55:30 2007 +0000 Use YAZ 3 lib,dll commit 951a16f58a1372353a1c85ef9e162ddbe84bbff6 Author: Adam Dickmeiss Date: Tue May 8 14:49:38 2007 +0000 Issue diagnostic for scan if 'set' in @attr 8=set does not exist. Fixed memory leak in rpn_scan (unreleased WRBUF for each term). commit d05a55789f78d56886f991e6054d7913a1bece20 Author: Adam Dickmeiss Date: Tue May 8 14:27:23 2007 +0000 Display match string if log level "extract" is used. commit 53f50a1b1dd002ef484a41f50f3598386335cae1 Author: Adam Dickmeiss Date: Tue May 8 12:50:03 2007 +0000 Use Odr_oid for OIDs. Require YAZ 3.0.2 or later. commit 121e938050358a6d52133deac0316eab29f002dc Author: Adam Dickmeiss Date: Thu May 3 07:20:19 2007 +0000 Require YAZ 3 commit 9dbf16ff99472e07182dab1c7cf8796a4d357b0c Author: Adam Dickmeiss Date: Wed Apr 25 09:38:21 2007 +0000 Allow safari filter to specify index type. commit 4df7866a571bf540cb320b62e6eec6f7e81b65dd Author: Adam Dickmeiss Date: Wed Apr 25 08:22:01 2007 +0000 log optimized on level 'extrat'; details in 'details' commit d2d7564a11bb6f83a77abedbf463bee79a34b778 Author: Adam Dickmeiss Date: Wed Apr 25 08:18:01 2007 +0000 Return proper EOF for safari filter commit e84a2f16cabdb0e4e212f9aa2f83eeaefa28c808 Author: Adam Dickmeiss Date: Wed Apr 18 11:37:39 2007 +0000 Dont use nmem_init, nmem_exit commit 7786ecc8ce35a72145aeb9c098a4cfcc9d3c4822 Author: Adam Dickmeiss Date: Tue Apr 17 20:27:14 2007 +0000 Update for YAZ 3s libyaz_server.la commit 1b5ef8265837240930862dddd2d7ef963a0cc211 Author: Adam Dickmeiss Date: Mon Apr 16 21:54:37 2007 +0000 Another and hopefully, last, YAZ OID DB update commit 1872e3fc60b482771bbd1cb4b0290b8d6a9ef5d0 Author: Adam Dickmeiss Date: Mon Apr 16 08:44:31 2007 +0000 Update for YAZ 3s new OID system commit 4e67b823f05b521f193af096a40c0f64758c5fc1 Author: Adam Dickmeiss Date: Sat Apr 7 22:26:27 2007 +0000 Changed extract code so that it optimizes updates of records where content is almost identical to previous version of record. This makes updating of the internal explain database faster too. Also fixed memory leak that occurred for each deleted record. commit 27a6d4f7f7425896345ab5a2bfdf35a96c97416e Author: Adam Dickmeiss Date: Sat Apr 7 22:24:12 2007 +0000 Fixed bad memory reference that could occur if empty key block was to be sorted. commit 30d8682ec25b5468a8158a7a457fe6ca8345d765 Author: Adam Dickmeiss Date: Sat Apr 7 22:18:46 2007 +0000 Remove leading blank line commit 28045b27be52a2f8ac41900051612f5640cea165 Author: Adam Dickmeiss Date: Tue Apr 3 16:54:46 2007 +0000 Fixed bug #1017: assert failure in isamb for delete of records. Problem was that root ptr of sort ISAMB was not properly flushed to disk when it changed. commit b8b8cd66686521782aa58bfccb8a30534769c423 Author: Adam Dickmeiss Date: Tue Apr 3 15:26:14 2007 +0000 Make directory config it it is not there commit f22aee0a271559cb1fc0eed0b7583019e34fc4e0 Author: Adam Dickmeiss Date: Mon Apr 2 16:57:08 2007 +0000 Removed a few YLOG_LOG messages. This could be enough to fix bug #1012. commit c26514edaee3ee71f9fdd6df6f99f4c28d34e0ff Author: Adam Dickmeiss Date: Wed Mar 21 19:37:15 2007 +0000 Update with latest changes. commit cf8586f9486b6807386d9c4381ef391724c51f0b Author: Adam Dickmeiss Date: Wed Mar 21 19:37:00 2007 +0000 Describe the @type action for DOM filter commit e7ac5d718e802430433faca1e4f040b2cfcf4977 Author: Adam Dickmeiss Date: Wed Mar 21 19:36:47 2007 +0000 Minor change in link to CQL material in YAZ commit 4dc8f758cd85d2e9925bc5df8a1aa0418b82fea2 Author: Adam Dickmeiss Date: Wed Mar 21 13:47:12 2007 +0000 For RPN queries the index type (w,p,..) may be specified verbatim as structure attribute with string value, e.g. @attr 4=w . commit c2b02ec229dce1e323055d23566b4edf98a32e12 Author: Adam Dickmeiss Date: Tue Mar 20 22:42:19 2007 +0000 ChangeLog in dist commit 46d18b14e7af411cd9b9a4614e6bb0cb1a99069c Author: Adam Dickmeiss Date: Tue Mar 20 22:07:35 2007 +0000 Use yaz_iconv flushing. commit a3b3b8fc3baa797d7052466bd8d6b4414617e46d Author: Adam Dickmeiss Date: Tue Mar 20 22:07:21 2007 +0000 Remove debug msg commit 1d5547df252368f3ed9b1be0f9f7709b9df0fdaa Author: Adam Dickmeiss Date: Mon Mar 19 21:57:25 2007 +0000 Use non-const char return value for strtok work commit 3e4a78274a6cb7a99f3e90967ea30c830ffbf8c3 Author: Adam Dickmeiss Date: Mon Mar 19 21:50:39 2007 +0000 WRBUF updates. commit 9982694ca69efc2bf4db54cd5b5607e3680cd32a Author: Adam Dickmeiss Date: Wed Mar 14 14:16:14 2007 +0000 Changed some types in mod_dom.c ; mostly 'xmlChar *' to 'const char *'. The use of const is more appropriate than non-const becuase these string references point to xmlNode content - and we are not allowed to change that. Added buffer safe PI attribute reading for mod_dom.c by implementing function attr_content_pi. Function index_value_of still has potential buffer flows. The record extraction system now has a new member, action, which may be modified by a record filter to signal delete/replace/insert. This is only honoured if update is used (in which case the outer system already has said "we don't care whether it's insert or replace anyway). Added mod_dom test for the use for @type=delete . commit 21f90a8618faec6bee8d125c12088b74db8eb8b9 Author: Adam Dickmeiss Date: Wed Mar 14 11:48:31 2007 +0000 Changed record update API . It is now handled by function zebra_record_update which does insert/replace/delete/update of records . This function replaces zebra_record_{insert,delete} and zebra_admin_exchange_record. commit 46c0e649af38cec11668a4a15ab10915b06ccbc1 Author: Adam Dickmeiss Date: Tue Mar 13 13:46:11 2007 +0000 Fixed bug #944: Allow extraction of multiple records per ES update. Based on patch from Hans-Werner Hilse. commit f11e0c25c05988079b5571598ac59039b4cee448 Author: Adam Dickmeiss Date: Thu Mar 8 21:07:45 2007 +0000 Debian package 2.0.13-1 commit 9fd5dd76e0bb2c992adc7723627f0e301bf00154 Author: Marc Cromme Date: Thu Mar 8 17:19:12 2007 +0000 changed and parser such that the following conditions actually work: 1) no element at all 2) empty element 3) element starting with an instruction (that is, and/or not mandatory any more. Needed to make new define DOM_INPUT_DOM besides DOM_INPUT_MARC and DOM_INPUT_XMLREADER Still missing detection of or after all nodes. And more important: when finding errors here, it's kind of lam just to emit an warning, one should stop processing! commit 59e342c979248e16031fc537c7d7b6744da93b2c Author: Adam Dickmeiss Date: Thu Mar 8 13:18:35 2007 +0000 For MARC indexing, skip until record separator is met. commit 3d8114076c20e3046df8d4889512c6c050bd3b61 Author: Adam Dickmeiss Date: Thu Mar 8 12:57:35 2007 +0000 Bump to 2.0.13 commit 4f229a2cde329eb18013dddf7eae145cfe15765c Author: Marc Cromme Date: Thu Mar 8 11:29:16 2007 +0000 corrected typo commit 271266c6e2dfeef76ba5724848e435c441d671e7 Author: Marc Cromme Date: Thu Mar 8 11:24:50 2007 +0000 added example of MARCXML indexing with chopping of sort indexes cccording to 'ind2' field containing integer commit 14ad407ad29aa99585b84f7606508a7bec752019 Author: Adam Dickmeiss Date: Wed Mar 7 21:25:29 2007 +0000 Added mod_dom to win32 makefile commit cf66499bac7c49c5bdd363a2c927295fa92f547a Author: Adam Dickmeiss Date: Wed Mar 7 21:14:15 2007 +0000 Towards 2.0.12 commit 1f2c5b0995c6618bffb987e7c10f0861684db3a0 Author: Adam Dickmeiss Date: Wed Mar 7 21:08:36 2007 +0000 Fixed bug with indexing of attributes for rec.grs-class of filters. If xpath was enabled xelm a/@b would be ignored. commit ea03b56f916419aebe22f51962d6b24c0f737124 Author: Marc Cromme Date: Wed Mar 7 14:18:35 2007 +0000 Added always the XML parsing flag XML_PARSE_NONET to any XML_PARSE_XINCLUDE to avoid spoofing Zebra to fetch megabyte from an external xincluded url. pretty normal safety thing to do, we just did forget before. commit 4b4d00c51b49de97fca1d5e2ae10d943c116c916 Author: Marc Cromme Date: Wed Mar 7 13:05:20 2007 +0000 removed documentation of non-working 'insert', 'update' 'delete' functionality in Alvis filter removed 'update' instruction from example OAI indexing stylesheet commit 5a673fcd1e94096a9c389ffe08c87b3cd89b06fb Author: Adam Dickmeiss Date: Tue Mar 6 12:40:18 2007 +0000 Fixed bug #931: lem 'zebra::index::field' hangs if not specified 'storeKeys: 1' in zebra.cfg. commit 10fa93c4e981675844ea25e09882495a636e9e4e Author: Adam Dickmeiss Date: Tue Mar 6 12:21:04 2007 +0000 Fixed bug #943: Searches with localid always find a hit. commit 02e8762b23b8043382edeeb0eed93e2519471570 Author: Adam Dickmeiss Date: Tue Mar 6 12:09:44 2007 +0000 Avoid mixed stmt/var declare commit 56587f023ae3462ff5ad55101edb7f3d1bdb6b6a Author: Marc Cromme Date: Tue Mar 6 09:24:34 2007 +0000 added missing extra dist target commit 1995ca9c4d5451771944163fc302d21578055241 Author: Adam Dickmeiss Date: Tue Mar 6 08:48:57 2007 +0000 Fixed bug #946: Coredump on MARC display. commit 3a0123c57a12b743568263fcaf73246d05af2482 Author: Adam Dickmeiss Date: Tue Mar 6 08:23:24 2007 +0000 Added missing xsl for dom1 test. commit 800fb31d00e78000dd2229231401ee67d03ed78d Author: Marc Cromme Date: Mon Mar 5 13:02:11 2007 +0000 added tests for bug #883 'Need an 'ignore' value for the z:type attribute in the canonical indexing format' resolved bug #883 tested as well on gutenberg collection zebra-setup/gutenberg case closed, see http://bugzilla.indexdata.dk/show_bug.cgi?id=883 commit 7bc692d5bc6971008fc2e1e37d63c080383d6a3e Author: Adam Dickmeiss Date: Sat Mar 3 21:39:10 2007 +0000 Fixes for perform_convert: use xmlParseMemory instead of xmlParseMemory to avoid reading beyond end of buffer. Ensure conversions are stopped if XSLT conversion fail(s). commit 8ade6bf0476b510499488f499156604172b8d1fc Author: Marc Cromme Date: Thu Mar 1 11:21:20 2007 +0000 removed section on special record retrieval features, which need a rewrite - only commented out. added section on debugging of DOM filter configurations added a bullet point on semantics of DOM filter explaining that records not emerging record and index instructions are discarted, i.e. dropped on the floor. This meets Seb's wishes for the gutenberg collection commit d38d4aeca52d904915aa081cad527399351044cb Author: Marc Cromme Date: Thu Mar 1 11:18:40 2007 +0000 removed quick start and examples, which are very GRS-1 centric. These need re-writing in terms of the DOM filter commit 7a23ff31063e70f55eb387477130a358f0992988 Author: Adam Dickmeiss Date: Thu Mar 1 10:35:46 2007 +0000 Allow record filters to return 'skip' this record (RECCTRL_EXTRACT_SKIP). Make dom filter return 'skip' if no zebra 'record' node exists in indexing document. Bug #883. commit 103492ea21e1a93e78e865157e811873ff4f32f8 Author: Adam Dickmeiss Date: Wed Feb 28 18:43:06 2007 +0000 Fix handling of record retrieval in the case of open failure of external record file (storedata:0). commit c99814e954c58dbeceaa411212ce49ccf09cbf83 Author: Marc Cromme Date: Wed Feb 28 16:46:19 2007 +0000 added nice debug output of all xmlreader and xslt XML stuff when running with zebra/index/zebraidx -c zebra.cfg -s update water.rdf Don't do thins on huge data - the logs will be at least 4-6 times the size of the input data !! commit be7fa211269fb4f31acd497186c9d72fb8f8f973 Author: Marc Cromme Date: Wed Feb 28 14:46:41 2007 +0000 closing bug #928 by dropping DOM document to xmlbuffer and re-reading into DOM each time a XSLT transform did occur. Yes, ugly, ugly, but no other possibility. Added output of XML after each transformation on YLOG_DEBUG level, run indexer with '-v debug' to see all transformations commit 317fbe6637258762fd75aa72f75db406db9f2f9d Author: Marc Cromme Date: Wed Feb 28 13:16:24 2007 +0000 removed general warning log of indexing process. this can be seen by running the indexer with '-v debug' anyhow. commit 62c8013389b7d982b7423a89880154320b42e2d6 Author: Adam Dickmeiss Date: Mon Feb 26 16:12:24 2007 +0000 Avoid sprintf with NULL %s value (Solaris dislikes it) commit 4bb8eae594f868a52290bb439b03c69a90bd543e Author: Adam Dickmeiss Date: Sat Feb 24 17:05:40 2007 +0000 Fixed bug #929: Unfinished transaction in non-shadow does not get a warn. commit 9040d4abe6fe0fc2820f224baf8c538716b02ea0 Author: Adam Dickmeiss Date: Sat Feb 24 16:47:16 2007 +0000 Deal with two common places for corrupt Explain database commit 6b22ee11c602f66f94cef22bdf8077002e8d844a Author: Adam Dickmeiss Date: Sat Feb 24 16:46:22 2007 +0000 Proper cleanup (isamb_close) for bad headers commit f6d0d9921cbcbf2e0b639c47d21ce1ef860d4acb Author: Adam Dickmeiss Date: Fri Feb 23 14:59:12 2007 +0000 Use xmlGetLineNo instead of xmlGetNodePath for errors/warnings commit 4912d00122077ee90a30287edf946a2cdb59f253 Author: Adam Dickmeiss Date: Fri Feb 23 11:35:08 2007 +0000 For each element macro. commit a4a2134d6bb8e741f1e64f3e00232946f31ea50b Author: Adam Dickmeiss Date: Fri Feb 23 11:16:39 2007 +0000 For dom filter, in input element construct, parse @inputcharset instead of @charset . commit 7729ad61cb420817f12337ccfc4f9fb1c67222a3 Author: Adam Dickmeiss Date: Fri Feb 23 11:10:37 2007 +0000 Wrap log messages for dom filter. This uses yaz_vsnprintf. Requires YAZ 2.1.49 or later. commit 0abddc11543465c41fb86921552ab6b42f2f323f Author: Adam Dickmeiss Date: Fri Feb 23 09:35:17 2007 +0000 Fix dist: do not put domfilter.eps in dist. commit c99c50f588fb803362a47a933c988360ab1cd98c Author: Marc Cromme Date: Thu Feb 22 15:44:19 2007 +0000 added more instructions to DOM filter docs, spell checked both DOM and Alvis filter docs commit 9f8a802a9e3f380830596f70d3622626acca328e Author: Marc Cromme Date: Thu Feb 22 12:22:04 2007 +0000 added missing dependendy of index.html to all PNG files commit 37cb4f3f5daa7e8a79ac5c3bc2d5cec3258b3dc6 Author: Marc Cromme Date: Thu Feb 22 12:10:09 2007 +0000 added missing domfilter.eps to make rules, such that it is included in the distribution tarball commit 5ea4437cb9c7f0641afa3c1c59f56c442eac4d33 Author: Adam Dickmeiss Date: Thu Feb 22 08:59:30 2007 +0000 Remove PDF files from EXTRA_DIST/doc_DATA (as done for yaz, metaproxy for quite some time). Avoid rule option '--export-area-drawing' for inkscape for generating .png (it doesnt work with sarge). Bug #916. commit 28d0fdb9253a14f8117b5c26ea0aed73ba9d16a7 Author: Adam Dickmeiss Date: Wed Feb 21 17:03:23 2007 +0000 zebra.pdf depends on domfilter.pdf commit bd797d70f666280cdf941337d86b438a8d2506fc Author: Marc Cromme Date: Wed Feb 21 15:03:30 2007 +0000 more info on DOM filter config commit 71aa4212b624953ed6e934b41290e6ef8fb0e48a Author: Marc Cromme Date: Wed Feb 21 14:15:45 2007 +0000 added domfilter.svg to distribution tarball, now make dist runs again commit 49decee635c51f48079d9c7b035ff239f24ed500 Author: Marc Cromme Date: Wed Feb 21 14:15:07 2007 +0000 added more content on dom filter pipelines commit 799d116b6a50e44e9eeccf17ed81ffb70220b4f4 Author: Marc Cromme Date: Wed Feb 21 13:38:22 2007 +0000 started explaining each dom filter pipeline commit c1152dc950bd0edb1e638f55f71f8f7c20c4f01a Author: Marc Cromme Date: Wed Feb 21 12:29:52 2007 +0000 added figure of workflow on DOM XML filter commit 09ef254fb9ed3d174e92242be24f5de39b80d758 Author: Marc Cromme Date: Tue Feb 20 15:02:18 2007 +0000 small changes to format commit 3dce3db6c51f18945298451088c8e7efe6aff8e4 Author: Marc Cromme Date: Tue Feb 20 14:57:00 2007 +0000 added proper namespace in example config commit 7a1897c37a9fc946a3b44b10a46ed1eecdd3634a Author: Marc Cromme Date: Tue Feb 20 14:53:25 2007 +0000 some more changes, more to come commit b00064c85119fb3a6ca07f809f41d8f97f192165 Author: Marc Cromme Date: Tue Feb 20 14:28:31 2007 +0000 added initial DOM XML filter documentation. Much is missing yet ... commit e306088f1dbf196ce1355541c5cae201cc388554 Author: Adam Dickmeiss Date: Sun Feb 18 21:53:22 2007 +0000 Fixed bug #898: xslt tests fails on several platforms. Problem was that test for zs:index node crashed for absent namespace (href==NULL). Added all .xslt-files in use in est/xslt tests. Also fixed memory leak in use of xmlGetNodePath. commit 9ac6539198e34919dd9cfd83556739a7a67d551e Author: Adam Dickmeiss Date: Sun Feb 18 21:50:52 2007 +0000 Fixed minor memory leak commit e69e2841729cc1ad5563a4d5697a4ab295f4e437 Author: Marc Cromme Date: Thu Feb 15 15:41:16 2007 +0000 changed to respect correct index instructions in new DOM filter commit 298a7903c3915135806074286f98e8b3f336e1d3 Author: Marc Cromme Date: Thu Feb 15 15:08:41 2007 +0000 optimized code such that the RecWord structure recword is only initialized once for each to-be-indexed record, and not once for each to-be-indexed term - at the expense of a bit of pointer passing when recursively transversing the XML DOM tree commit 2bada0b20d0aca13e248d920070c7aa91cacc8f4 Author: Marc Cromme Date: Thu Feb 15 14:44:48 2007 +0000 removed dead code pieces which are reminisences from the original alvis-style parsin and indexing stuff. Now only new dom indexing code is present. commit 5e2a64f624de4bd6fae0a69a5db5fb0fdb588ee0 Author: Marc Cromme Date: Thu Feb 15 14:33:41 2007 +0000 pretty formatting warning messages, always giving the file name and the XML node path as informative parameters along commit 5a16dce531da8ad151c5c496952e21f43389d029 Author: Marc Cromme Date: Thu Feb 15 13:01:00 2007 +0000 rewritten mod_dom instruction parsing code hooked into mod_dom indexing new stylesheets added, one for PI based indexing, and one for based indexing segmentation fault traced and fixed test framework updated to use new mod_dom parsing commit a101ad077b7c8cb3ea5b658e994b9e8e83fd3bb7 Author: Marc Cromme Date: Wed Feb 14 16:43:37 2007 +0000 added 'static' declaration to functiondefinitions commit 20c1a7cff563f8b371ef6eaec600f7e171cbbb80 Author: Marc Cromme Date: Wed Feb 14 16:38:41 2007 +0000 changing attribute 'action' to 'type' for better confrmance with Alvis filter syntax commit f1d5d3a64682b741757c91311f3362c9d43f288c Author: Marc Cromme Date: Wed Feb 14 16:31:37 2007 +0000 indenting entire file according to the rules stated in the very end of the file, using emacs M-x indent-region, and manual line breaking afterwards commit f0d268c32a5a055b66233d1c22349950a5ffdec5 Author: Marc Cromme Date: Wed Feb 14 16:16:15 2007 +0000 continued hooking in tinfo and recctr, still need to do real indexing commit 85c5e09eacc5c89eda6e1ffa6f039fa1e8dd7221 Author: Marc Cromme Date: Wed Feb 14 15:42:24 2007 +0000 removed wanings by zillions of (const char *) casts and the like commit f18d8dbad5065593a62409da7c6989e367812199 Author: Marc Cromme Date: Wed Feb 14 15:23:33 2007 +0000 removed the crappy PI and parsing code comitted yesterday replaced with clean parsing logic developped outside mod_dom.c needs to take care of all new warnings due to stricter compile flags finally, needs to be hooked into actual indexing of records commit 918ed6b8ab55442925eb485df3cebea180cff983 Author: Marc Cromme Date: Tue Feb 13 12:19:37 2007 +0000 removed unnecessary out-commented code lines commit eec24169543303f147c70a5cf15f4c52169f5e2e Author: Marc Cromme Date: Tue Feb 13 11:37:02 2007 +0000 facturized DOM XML indexing code out into function static void extract_doc_alvis(struct filter_info *tinfo, struct recExtractCtrl *recctr, xmlDocPtr doc) This is the function to be re-written using both PI and instructions, and also fixing the bug of index type 'p' and '0' chop-over of merged content. commit 60804971c0b59e786daaf8efb93fefc1ec42e8c2 Author: Marc Cromme Date: Mon Feb 12 14:00:20 2007 +0000 experimental processing-instruction based indexing XSLT added commit a9d72cc2d60e03a4f95df1acbc12ff8ed4e58a29 Author: Marc Cromme Date: Mon Feb 12 13:58:12 2007 +0000 avoiding unnecesasary unused namespace declarations in output documents commit 609cb0b087011be4927c12b7882dfdd4e688e6c0 Author: Marc Cromme Date: Mon Feb 12 13:24:31 2007 +0000 added parsing function 'parse_pi_zebra_20' for processing-instruction parsing and 'format_pi_zebra_err' for error or wanrning formatting. Those are yet not called, and need to be build into the XML parsing in the DOM module. commit c5365d8095f29747f5998028934cfc034d038673 Author: Adam Dickmeiss Date: Mon Feb 12 10:33:50 2007 +0000 Fixed bug #884: Entity declarations in input are lost at retrieval time. commit ea8f2ba5fbb613bb0d70a76582fb23e7f3a17e58 Author: Adam Dickmeiss Date: Sat Feb 10 18:37:42 2007 +0000 Fixed serious bug in mf_open which made it fail to see an already existing metafile. The bug was introduced in mfile 1.70. commit 040064bce3cb53d898fc7fe273a1f3086a7aa524 Author: Adam Dickmeiss Date: Sat Feb 10 12:46:54 2007 +0000 buildconf.sh part of dist. commit 1a1c0890198a3879b0a60b634eed22a4efb73c5b Author: Marc Cromme Date: Wed Feb 7 13:33:17 2007 +0000 corrected DEPRECIATED to DEPRECATED commit 5afc1bbbed387dd110cd0902e90c0779e92f07c0 Author: Marc Cromme Date: Wed Feb 7 13:19:35 2007 +0000 added debian libidzebra-2.0-mod-dom package commit f549d4f3a0081285ecbc3406305abde674ad048e Author: Marc Cromme Date: Wed Feb 7 12:50:13 2007 +0000 making 'dox' target phony commit 97dc097858772a66c8e90e8b07f77c9c20450131 Author: Adam Dickmeiss Date: Wed Feb 7 12:08:54 2007 +0000 Implemented new filter 'dom'. See test/xslt/dom-config*xml for examples. This, like alvis, performs indexing and retrieval using XSLT. But Unlike alvis, it allows multiple XSLT steps to be performed and does ISO2709 commit 06085703f3b5bcadfaf65bb499924a1662f9289e Author: Adam Dickmeiss Date: Tue Feb 6 09:34:56 2007 +0000 The configuration, fileverboselimit, has a value of 1000. When reached a message is logged. Bug #845. commit 3e96aa60be900d8b3b8e9825409f811b16f72823 Author: Adam Dickmeiss Date: Tue Feb 6 09:33:31 2007 +0000 Omit sort info: bug #844. commit a3f58753865d355c9dbb283d0ac8f67956d8a1f9 Author: Adam Dickmeiss Date: Tue Feb 6 09:32:50 2007 +0000 More compact statistics commit 8092206c8a9d91f7b26029a79810431c97306dcc Author: Marc Cromme Date: Mon Feb 5 14:32:31 2007 +0000 dropped section on future directions commit fdad2b849ba30355fbb50a599af70639e691ae3a Author: Marc Cromme Date: Mon Feb 5 14:05:26 2007 +0000 spll checked commit 18b8cf7807ea21217f947b5a0bd0ea8b1185b96f Author: Marc Cromme Date: Mon Feb 5 14:02:27 2007 +0000 fromatting of feature tables updated commit c614b7ba9397183d925e7372c884d8e466141a4d Author: Marc Cromme Date: Mon Feb 5 13:35:12 2007 +0000 feature table updated commit ca4101c308ad8427fafba129a4f58a8b38ead63e Author: Marc Cromme Date: Fri Feb 2 14:42:44 2007 +0000 cleaning a bit. more cleaning needed commit 23ebb5f3708511db457cebc72bf11e6d9db23b9c Author: Marc Cromme Date: Fri Feb 2 14:34:20 2007 +0000 more feature info. tables still look like a grande disaster, but the content is there - more or less. needs pretty formating and tweaking commit 8a21627cd2820f05b4718761b7c67ee3b1cddd51 Author: Adam Dickmeiss Date: Fri Feb 2 13:48:13 2007 +0000 Fixed bug in zebrasrv: the default module path and default module path was not set recognized. commit 775bf7d99438335ba135b673dfb3e19fe9bcba24 Author: Adam Dickmeiss Date: Fri Feb 2 12:16:38 2007 +0000 Use YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS everywhere where this diagnostic is returned. Put more appropriate addinfo in case of filter load failure during retrieval. commit d836a152d0414e1729fea5dcbd8d394d910aad2c Author: Adam Dickmeiss Date: Fri Feb 2 12:07:33 2007 +0000 Fix DEFAULT_PROFILE_PATH commit b19b79e382ef8196f1625763db1af3a82b1e0c81 Author: Marc Cromme Date: Fri Feb 2 11:10:08 2007 +0000 replaces acronymes in XML text with new defined acronyme entities commit 5ca4e60e990af6ad6b62ebff855d7b642f37c3ec Author: Marc Cromme Date: Fri Feb 2 09:58:39 2007 +0000 added acronyme entities commit e6ff84c71e457ff668dce640382fc1ad88c37d6d Author: Marc Cromme Date: Thu Feb 1 21:26:30 2007 +0000 some more typos corrected commit c7d11afe252052d73b6ce41ebdb19ecbc4b7623f Author: Marc Cromme Date: Thu Feb 1 21:18:53 2007 +0000 corrected typos commit dba1046a7e353d3ed66936aa90d8a5fb54a68a9c Author: Marc Cromme Date: Thu Feb 1 21:08:52 2007 +0000 added Alvis 'XML' commit 3293280cc9cb3895c65f4eec13490f21ffe8a79a Author: Marc Cromme Date: Thu Feb 1 21:08:12 2007 +0000 placed Alvis filter module before GRS-1 in arch chapter commit 656a766f96dd92939c3604a7bf88f2355d040fc8 Author: Marc Cromme Date: Thu Feb 1 21:04:15 2007 +0000 placing Alvis filter chapter before GRS-1 filter chapter commit 1b368282fac5d740ffc22c049e2b4881ca8d3a1a Author: Marc Cromme Date: Thu Feb 1 20:49:05 2007 +0000 first shot on tabulated feature overview - much needs to be done yet commit 3f95bc864e6652d442488242b4d0b14da816e9a6 Author: Mike Taylor Date: Wed Jan 31 12:26:50 2007 +0000 New commit 871d1504333ccd4dd85c2c80cbc1027ab9364532 Author: Adam Dickmeiss Date: Wed Jan 24 18:00:39 2007 +0000 Bump version to 2.0.11 commit b349107d4656edbdcbeac8565db752bf431447ec Author: Adam Dickmeiss Date: Wed Jan 24 16:05:25 2007 +0000 Depend on YAZ 2.1.48 or later commit 8fba721bcf0f18f9b03cf62c3aaf0a064fd7d9a7 Author: Adam Dickmeiss Date: Wed Jan 24 15:23:58 2007 +0000 Towards 2.0.10. commit 25aa9d21203318cca1927f906ab4f7370e43a5fe Author: Adam Dickmeiss Date: Mon Jan 22 18:15:02 2007 +0000 Staticrank indexing is now an index register type defined in default.idx via directive 'staticrank'. The 'staticrank' directive for grs is no longer supported (was only implemented for Zebra 2.0.8). commit 0135442601735e2aec0114afd5720fe2b9597a84 Author: Mike Taylor Date: Mon Jan 22 11:02:12 2007 +0000 New commit 86702aad7008abed6afef80feed08b3e4e1cbcd1 Author: Adam Dickmeiss Date: Wed Jan 17 15:35:47 2007 +0000 Avoid full rset count for rset_count. Proper break for result set sort/rank. commit af90f7f836a48a8e4bf6d5c2fc15c7133bac06f3 Author: Adam Dickmeiss Date: Wed Jan 17 13:51:36 2007 +0000 Change prototype of busyhandler commit e7e89fcff6def53627f730159017982d6cd96703 Author: Marc Cromme Date: Wed Jan 17 13:31:36 2007 +0000 documentation updated according to suggestion from zebra list commit 538b41355b5607b4bd09c9c98682694fd6628940 Author: Adam Dickmeiss Date: Wed Jan 17 13:22:53 2007 +0000 Experiment with check for dead sessions. commit 5ec1f005c341f170fb66ddf9189fc624a10fc79d Author: Adam Dickmeiss Date: Wed Jan 17 12:59:38 2007 +0000 For searches, allow truncmax value to be controlled with attribute 13. If given, that overrides the value of 'truncmax'. commit e1352999e1be86b0ce5c2698bb62f9fc7d598a4f Author: Adam Dickmeiss Date: Tue Jan 16 15:31:23 2007 +0000 For truncations being limited (abort at truncmax terms), zebrasrv returns SearchResponse with resultSetStatus=subset. commit 0f563f23506dabd7c84bdb750d4539b2b6cacf02 Author: Adam Dickmeiss Date: Tue Jan 16 15:01:15 2007 +0000 For estimated hit counts, Zebra returns resultSetStatus=estimtate as part of SearchResponse. Requires YAZ 2.1.47 or later. Bump Zebra to version 2.0.9. commit 95d8b81632dd8067f0f7378b751c7b66352956ea Author: Adam Dickmeiss Date: Mon Jan 15 20:14:37 2007 +0000 Towards 2.0.8. commit 9badda2656368a4f692b4486d7323a2cccb83927 Author: Adam Dickmeiss Date: Mon Jan 15 20:11:44 2007 +0000 Noted some changes to NEWS commit 5a8a42bede922e70156e7b289db071592c71529b Author: Adam Dickmeiss Date: Mon Jan 15 20:08:23 2007 +0000 2007. commit dcff7587e772bd975b5b4b56af9cf88dd3f120a3 Author: Adam Dickmeiss Date: Mon Jan 15 20:04:34 2007 +0000 Use dblatex instead pdfjadetex to generate PDF commit 89d3a004b7c651fd5673abfc192e1472dc4d4197 Author: Adam Dickmeiss Date: Mon Jan 15 15:10:13 2007 +0000 2007. commit 8ec8c9f64c4d7ce3a3057abcb9d32e9f9b0652dc Author: Adam Dickmeiss Date: Mon Jan 15 15:01:35 2007 +0000 Added releaseinfo commit 3f3bb5184cb06221655717e9cfeb646dc699ead5 Author: Adam Dickmeiss Date: Mon Jan 15 14:55:50 2007 +0000 Productname from ZEBRA to zebra in refentries commit 9b416ec335af48b943e352a0c741e7997439e517 Author: Adam Dickmeiss Date: Mon Jan 15 14:51:04 2007 +0000 Rename to table ID to unique and proper ID. commit 4aebbfa121c4e4b1b1d9298b678aba4baad85c39 Author: Adam Dickmeiss Date: Mon Jan 15 14:48:51 2007 +0000 Put author elements in authorgroup. commit 3fbd2beb5c41de39604f27b39a9461335b2b176b Author: Adam Dickmeiss Date: Mon Jan 15 13:01:26 2007 +0000 Fixed bug #815: Extended Services "delete" requires a dummy "record" to be set. The fix, surprisingly, is to allow SUTRS for "update". The problem is that Z39.50 mandates that *some* record to be sent (including the case where a record is to be deleted by ID). However, ZOOM-C sends a "void" SUTRS record in this case.. This record is not parsed by the server. commit 500b60a5f338715e5a1b28a73e0bd5e2529bf320 Author: Adam Dickmeiss Date: Tue Jan 9 09:11:22 2007 +0000 Suggest fakeroot commit 075ab3dda4ad564be22fb00f84aefd50f3a4f072 Author: Adam Dickmeiss Date: Fri Jan 5 16:11:25 2007 +0000 Null value for res_set makes it do nothing commit ae5c8868f2bee81cebddf3251432eb47c3da3591 Author: Adam Dickmeiss Date: Fri Jan 5 10:45:11 2007 +0000 Removed zebra_timing_t. Using yaz_timing_t instead. Requires YAZ 2.1.45. commit c0765995c15b95d23d183c43fda4516ad47b1f53 Author: Adam Dickmeiss Date: Fri Dec 22 19:47:36 2006 +0000 Implemented bug #781: Easier tracking of result sets. We only do this when mkstemp is available (most moderun Unixes supports this). The PID is included in filename : tempdir/zrs_PID_XXXXXX. commit b04a1cdb1a0345252a78caa8f7731089df314ad0 Author: Adam Dickmeiss Date: Fri Dec 22 13:57:25 2006 +0000 Added support for specification of staticrank for grs-class of filters. This is enabled by using 'staticrank indexname' in .abs. Contents of indexname (elm ... indexname:w) is then used as value for staticrank. commit 7952454742648f5f5b62205c27ee019c7b6a1592 Author: Adam Dickmeiss Date: Fri Dec 22 13:57:03 2006 +0000 Using atoizint for staticrank commit 6d4e4ede992b336e000169cc8f792a23875cbe47 Author: Adam Dickmeiss Date: Fri Dec 22 13:48:20 2006 +0000 Added function atoizint with a atoi/atoll wrapper. commit e05cb2631696372c6bdabcabe22401efe9645ab7 Author: Adam Dickmeiss Date: Fri Dec 22 12:14:25 2006 +0000 Add timing for zebra_start/zebra_stop. commit fd10c2116175815cf6c2da430a439c27991e1918 Author: Adam Dickmeiss Date: Fri Dec 22 12:13:39 2006 +0000 Use atoll/atoi for ascii to zint conversion in alvis filter. commit ec1a1d838f713f8a12616e567de3bcff8daf0e60 Author: Adam Dickmeiss Date: Wed Dec 20 14:29:04 2006 +0000 Do not warn for truncmax limit commit 4e476a533ed351b90fd331a0dd827084686a9158 Author: Adam Dickmeiss Date: Wed Dec 20 14:19:21 2006 +0000 Do not truncate more than at most 'truncmax' terms in one single term with right-truncation/regular attribute. By default, 'truncmax', is 10000. commit 741b736adad40ec4262e47ab373e55aa6f52c4c0 Author: Adam Dickmeiss Date: Wed Dec 20 08:37:49 2006 +0000 Fix reference to uninitialized var (bug introduced in previous commit). commit 153745fb3ac60cf1e66e51ad9fb24bc014b62679 Author: Adam Dickmeiss Date: Tue Dec 19 16:57:38 2006 +0000 Using zebra::index::field:s rather than zebra::sort::field for retrieval of sort keys. commit 99027168c47d0dc7422c854deaa4594e7f784a85 Author: Adam Dickmeiss Date: Tue Dec 19 13:55:05 2006 +0000 Fix bad ptr in yaz_log debug msg commit f0a357a78f95b0bf2912fb2bddc66140b8bf17df Author: Adam Dickmeiss Date: Tue Dec 19 13:17:34 2006 +0000 Avoid file sync for read-only files. commit a4d1fff3d8575f7f3db84630cc408fdd8d051f8f Author: Adam Dickmeiss Date: Tue Dec 19 00:25:41 2006 +0000 Changed assert in isamb, since we have larger keys commit 161aa7805930f6b91ccea027e4afa4ccce41c379 Author: Adam Dickmeiss Date: Mon Dec 18 23:40:06 2006 +0000 Implemented sorting via the ISAMB system. To enable, use sortindex:b in zebra.cfg. The sort keys can also be fetched using zebra::sort:field . commit 4e15ff3b25e6332179a4b67f757c935b714fcdec Author: Adam Dickmeiss Date: Sat Dec 16 09:04:28 2006 +0000 Disable check: bug #730 commit 5b72794c95eb694bd6717e5c11b0a4e45078a56b Author: Adam Dickmeiss Date: Fri Dec 15 21:11:37 2006 +0000 Define YAZ_HAVE_XML2 commit be6820b238db37a855dd7b940377a427b7046d73 Author: Adam Dickmeiss Date: Wed Dec 13 13:05:45 2006 +0000 Fixed bug #767: Zebra indexing stylesheet fails to work. The problem was that the root node was not of type element and split_level = 0 (deal with whole record / no split). We make split level 0 a special case (again) and use extract_full for this. commit 3fe5d30485d3fc95b24ee5e7dc75971447ecb5aa Author: Adam Dickmeiss Date: Tue Dec 12 17:33:35 2006 +0000 More digits in output for total docs commit db3bfc0c9159e419b54c357ea27105cba92a66d8 Author: Adam Dickmeiss Date: Tue Dec 12 15:23:45 2006 +0000 Rename isb to isb_postings. commit bc188023090ef327b214032d0b2ae4dd8dfddcde Author: Adam Dickmeiss Date: Tue Dec 12 15:22:26 2006 +0000 Possible fix of two bugs (1) bug #759: Crash during retrieval of some records (2) bug #765. commit 7e774be25a0c4791a9fb196389ac6d4f9f40a113 Author: Adam Dickmeiss Date: Tue Dec 12 13:54:33 2006 +0000 Added gnuplot scripts for dictisam timings, filesystems comparisons. commit 0152d93e3eb697047545f4f6eec0b8c63cae4d1c Author: Adam Dickmeiss Date: Tue Dec 12 13:51:23 2006 +0000 All output to stdout for easy feet into gnuplot. The following is now logged: user,real,sys for dict+isam, postings, documents, distinct words, new words, dict splits, isamb leaf splits, isamb interior splits. commit baeef217d2eeb54b96daabeeca6792c33708aaad Author: Adam Dickmeiss Date: Tue Dec 12 13:46:41 2006 +0000 Added functions isamb_set_int_count, isamb-set_cache_size, isamb_get_int_splits, isamb_get_leaf_splits, iasmb_set_int_count. commit 883a7ce6ae98a97520d62038acca2612cb582836 Author: Adam Dickmeiss Date: Tue Dec 12 13:42:23 2006 +0000 Added statistics functions dict_get_no_{lookup,insert,split}. commit 8a5853c99ad09bcdb1ea567a594e3b586715fe90 Author: Adam Dickmeiss Date: Mon Dec 11 17:08:03 2006 +0000 Remove unused variable (dst_buf) commit 3cc9c2670e9230e76665ef3fa60eab3bfb523c6d Author: Adam Dickmeiss Date: Mon Dec 11 15:08:55 2006 +0000 Allow MARC line format to be read. commit 7253cbefce93c35a083505e14d97b3ae24c0a66b Author: Adam Dickmeiss Date: Mon Dec 11 10:02:14 2006 +0000 Using timing utility commit 761702c17906c9c71a0c42e7abaa18e578aec012 Author: Adam Dickmeiss Date: Mon Dec 11 09:50:36 2006 +0000 Added a utility for doing timings. commit c400342b100d11a62454aca4e4568ea67c858ad6 Author: Adam Dickmeiss Date: Sun Dec 10 21:02:28 2006 +0000 More appropriate usage commit 2f2827ef6acf22faa96e0ff55bbb24845e423176 Author: Adam Dickmeiss Date: Sun Dec 10 21:00:56 2006 +0000 Make MARC indexer with different ISAM strategy. commit 654dbcc899c70a1cb26d215796c6e3b8c4a46a58 Author: Adam Dickmeiss Date: Sun Dec 10 20:59:52 2006 +0000 Use rand() twice on platforms where RAND_MAX < 2^16. commit 1c4ec5fadcec479a371b7a31cda840ef81e43154 Author: Adam Dickmeiss Date: Sun Dec 10 11:54:29 2006 +0000 Added new test which makes variations to ISAM entry size. commit b5052763f9975c0446ff13905d4f8b3c5c56f132 Author: Adam Dickmeiss Date: Sun Dec 10 11:54:11 2006 +0000 Produce .dat files with bench1. prefix commit 413f72bc622b8dcd20504e269d8c0b69a4c421d9 Author: Adam Dickmeiss Date: Sun Dec 10 11:49:16 2006 +0000 Allow size of ISAM entry to be specified in bench test commit 3c5356c1ac5cb9bfb33a3e61d2b1a7db6e7615db Author: Adam Dickmeiss Date: Sat Dec 9 08:03:57 2006 +0000 Added some performance test utilities. commit 4eaf00a0af4c40bd166e2224964319a58efafeaa Author: Adam Dickmeiss Date: Thu Dec 7 21:13:56 2006 +0000 Added some ISAMB benchmark code commit 19d7025dd6bf2b0b7b9beb38ecfea2e4e52897d7 Author: Adam Dickmeiss Date: Thu Dec 7 19:23:56 2006 +0000 Allow different values for cache parameter for isamb_open: 0=normal, 1=caching of pages, -1 testing (NULL ISAM). commit b571d1a1012dfbe07e4a484ea5425c909bbf7120 Author: Adam Dickmeiss Date: Thu Dec 7 10:01:32 2006 +0000 Remove @XSLT_LIBS@ from idzebra-config --libs / --lalibs output. XSLT libs is part of @YAZLIB@ already. commit ab97a59cbf609730cbc674885832fd5bb1dc64fb Author: Adam Dickmeiss Date: Wed Dec 6 22:52:38 2006 +0000 Use zint for numbers in update statistics. commit 571cd02bff379234c2eeaf95fdd6b9c038d5b3de Author: Adam Dickmeiss Date: Wed Dec 6 13:00:12 2006 +0000 Added new object check_res. commit ee1ab971c7e0f4a0abc050eaf2c92c478316009c Author: Adam Dickmeiss Date: Wed Dec 6 10:26:54 2006 +0000 Added more to list of options. commit 543289d9a87cbcac45a5456714cbb9f55725253a Author: Adam Dickmeiss Date: Wed Dec 6 10:26:40 2006 +0000 Deal with a picky ambiguity with configs like a.b where both suffix and prefix are allowed. Both a and b must be checked. commit 9b46631dae8ab93da1e8f87f5d6638a493135c03 Author: Adam Dickmeiss Date: Tue Dec 5 14:06:29 2006 +0000 Fixed bug #445: zebra.cfg does not check for valid directives. commit 4c112f15503aebed494fab8aa5296c3661bfb31c Author: Adam Dickmeiss Date: Tue Dec 5 09:26:37 2006 +0000 Provide defaults for profilePath and modulePath for the zebra{srv,idx}. commit dd094f96179451fb9445cc33d288a0ba540dc42c Author: Adam Dickmeiss Date: Tue Dec 5 09:26:04 2006 +0000 Reformat a bit. commit 6b553b7b42f0a2940c9765b9811e5db44ba8265f Author: Adam Dickmeiss Date: Tue Dec 5 09:24:47 2006 +0000 Deal with NULL profile_path. commit afbef0c68dc14c3c81b7f83dfd5f296bfcaefa59 Author: Adam Dickmeiss Date: Tue Dec 5 09:24:31 2006 +0000 For Res(ources), maintain reference count (poor man's smart ptr). commit b2200ef6f97a9b967723643d27a4ffb388883f6d Author: Adam Dickmeiss Date: Tue Dec 5 08:14:59 2006 +0000 Experiment with alternative reckeys store. commit bd6c6c5d9ee278f702572c33b4ea56827c7ca6cb Author: Adam Dickmeiss Date: Tue Dec 5 08:14:47 2006 +0000 Only add first in field marker if there field has term(s) in it commit 08b7c1004e499046730ef564c901cc3b584d6e1f Author: Adam Dickmeiss Date: Sun Dec 3 16:05:13 2006 +0000 Fixed bug #739: Extended service update fails with Alvis filter. This change makes it possible to have register and shadow as same directory. The size limits is only counted for each file type (so if shadow is 10M and register is 20M the total size of directory is 30M). commit 027c4aa269709a33000e42fb478f8b1cb79e0842 Author: Adam Dickmeiss Date: Sun Dec 3 15:55:02 2006 +0000 Removed unused var commit 1d1da372c86b3070920f6f38bde4ea38a54e2a87 Author: Adam Dickmeiss Date: Thu Nov 30 11:03:57 2006 +0000 Removed a few heavily used yaz_log calls commit 4aae319a0b820d1e8d3ab5d82c48f5047c9995f9 Author: Adam Dickmeiss Date: Thu Nov 30 10:33:18 2006 +0000 Added support for specification of approximative limits for whole query. This is specified as attribute type 12. Semantics is the same as estimatehits in zebra.cfg. commit 2c6926a6b89cacdaa99b701847ef347c35f62420 Author: Adam Dickmeiss Date: Thu Nov 30 10:29:23 2006 +0000 Change IDs for the special retrieval stuff. commit b092477356ed4849f27e0f761af0af4af9539517 Author: Adam Dickmeiss Date: Wed Nov 29 18:06:57 2006 +0000 Disable xelm path ! case code in case of index_name (att in 1.3) being NULL. It's not documented and not in use for Zebra 2. The .abs reader can never generate it so it's dead code which just slows indexing down. commit 83a4da7afe6ef6dd408d0982645399284f5ed87f Author: Adam Dickmeiss Date: Wed Nov 29 10:31:29 2006 +0000 Cut memory for sorting in half when threaded sort is in effect. commit 5ee5d60638efd971bb67b48c6fd9bf73de795d8e Author: Adam Dickmeiss Date: Wed Nov 29 10:24:01 2006 +0000 Version 2.0.7. commit 6e8b41b7843838b712f1c25ca1be1f61edf1bc5d Author: Marc Cromme Date: Wed Nov 29 09:01:53 2006 +0000 shortened zebra::meta:.sysno lement XML format commit 300581b6fb502ae0ac1fb3802458526a6d40e2be Author: Marc Cromme Date: Tue Nov 28 14:37:45 2006 +0000 added example of config file commit 2ce46f160259c9452405b68489c16654919cd16c Author: Marc Cromme Date: Tue Nov 28 14:18:26 2006 +0000 added entry on encoding directive commit a92270aafb3ba7b336bc2334ed7c44c631c1cb29 Author: Marc Cromme Date: Tue Nov 28 13:05:57 2006 +0000 added more information on character mapping added entry on equivalent directive added short examples commit 9757a9ac857180889850aec2756595c04501aeb7 Author: Adam Dickmeiss Date: Tue Nov 28 11:42:13 2006 +0000 Towards 2.0.6. commit 12a519a0bc231a70b7c3211cc21e9fb1f98510f0 Author: Adam Dickmeiss Date: Tue Nov 28 08:44:10 2006 +0000 Issue warning if staticrank is < 0. And set to 0 commit 21183d937806badd59032ea24773a1eb85918835 Author: Adam Dickmeiss Date: Tue Nov 28 08:43:53 2006 +0000 Added assert commit 6d1a5ad0fa40f223ec8983f1f270547f2672ebce Author: Adam Dickmeiss Date: Mon Nov 27 21:50:15 2006 +0000 Zebra 2 RPM with the following packages: idzebra-2.0, libidzebra-2.0, libidzebra-2.0-modules, libidzebra-2.0-devel. commit 2c8babfbd5db819d45eaf5f01e00fbef2689c4c0 Author: Adam Dickmeiss Date: Mon Nov 27 14:27:12 2006 +0000 Require YAZ 2.1.40 or later commit 830a3c8800fdfb57a4ccd45fd113bc6ace47724c Author: Adam Dickmeiss Date: Mon Nov 27 10:40:33 2006 +0000 Avoid indexing of zebraInfo stuff. Problem is that explain.abs has lines elm (4,2) targetInfo ExplainCategory and it will zebraInfo child as ExplainCategory. This is now prevented by making a zebraInfo node with no children. commit 0ee0c058fb3daeca717a4394aa4fd3bc64b5437d Author: Adam Dickmeiss Date: Mon Nov 27 10:10:14 2006 +0000 Better debugging for indexing.. Introduction of zebra_log_dict_entry. commit 0a667d16ee52f85592f6cb73ce9a3915409f1c7b Author: Adam Dickmeiss Date: Mon Nov 27 10:09:48 2006 +0000 Fixed bug #736: Updates gets slower. The problem was that duplicate name tags (with database name in it) was generated for attributeDetails. This caused indexes to grow and grow for each update iteration. commit f064c8e9a0d96ef7a0ab489034c59b21d1c37f84 Author: Adam Dickmeiss Date: Mon Nov 27 09:17:01 2006 +0000 Disable hit snippets for now. It does not work well and it slows retrieval down a lot. commit 418038362451c405454fd4bf8dd2100975a8b764 Author: Adam Dickmeiss Date: Sat Nov 25 09:15:19 2006 +0000 Fixed bug #735: Delete fails to process rest of file after a record that does not exist, commit 9a3756e232c5891f08e9bf36a41c44e9bbf3ef5a Author: Adam Dickmeiss Date: Fri Nov 24 19:48:23 2006 +0000 Added new object files to list commit 8fac074c14a0b5f7f60d3c41dcaf0d9a46841e0b Author: Adam Dickmeiss Date: Fri Nov 24 13:25:42 2006 +0000 Rephase a bit. commit 213c8c2649191ea7385934f5ac039928362b96ed Author: Adam Dickmeiss Date: Fri Nov 24 13:25:02 2006 +0000 Mention --disable-shared option as a way to prevent modules to be built. commit e70a548d193a5187b8074c439f2d7fa687a8e8c4 Author: Adam Dickmeiss Date: Fri Nov 24 13:05:11 2006 +0000 Moved section about special retrieval zebra:: to Architecture chapter. Added table with supported zebra:: elements. commit 09e11d810ed4f35bf4106609bc5daabff971b591 Author: Marc Cromme Date: Fri Nov 24 12:21:31 2006 +0000 updated test since non-used attributes are not longer printed out commit 0b9734fe70bbb721a5c0464dc122c77b98299c30 Author: Adam Dickmeiss Date: Fri Nov 24 11:35:23 2006 +0000 Using wrbuf rather than sprintf. Allow all syntaxes for ::data fetch. commit d91825919ba6a27dae03f7e9b811f3444083b004 Author: Adam Dickmeiss Date: Thu Nov 23 21:38:26 2006 +0000 Added check for sys/utsname.h. commit 01f520729f8ee69cc740d7db430a4c4f4887a589 Author: Adam Dickmeiss Date: Thu Nov 23 21:35:02 2006 +0000 Added Include of string.h commit 7f9752358eb1c926c7a54a668493f2f5e5b03f60 Author: Adam Dickmeiss Date: Thu Nov 23 21:34:22 2006 +0000 Omit test with multiple processes and update on FreeBSD. Bug #733. commit 5fb26f09be8e9bfe050702dcd47a0fd91c91c7b4 Author: Adam Dickmeiss Date: Thu Nov 23 18:42:48 2006 +0000 Make buildconf.sh work for FreeBSD commit 8e584bbdc77d4c825ed3596c4d8c24a0ab7300e5 Author: Adam Dickmeiss Date: Thu Nov 23 14:01:21 2006 +0000 Use size of rec->info stuff in meta record fetch. Failing that will result in a SEGV or similar. commit b9c1a6fcf5c4821d0190efdecbc14ea5d6c96aec Author: Marc Cromme Date: Thu Nov 23 09:03:50 2006 +0000 implemented full metadata display of fast element set names implemented more test of fast element set names, including zebra::meta and zebra::data element set names updated documentation on fast element set names commit 7811412f7d0c4af0a6f42c17b059d8a9d4162ae8 Author: Adam Dickmeiss Date: Wed Nov 22 14:12:49 2006 +0000 Added include of yaz/xmalloc.h. commit eb44a82db835f33bbd984072ee18dd2ec34ae9cb Author: Adam Dickmeiss Date: Wed Nov 22 14:06:53 2006 +0000 Remove function tl_start_log. commit a15e33171bfa06d18a4629156898979b49a2fcb8 Author: Adam Dickmeiss Date: Wed Nov 22 11:13:17 2006 +0000 Added a few memset for structures that are later written to disk. This makes valgind happy on platforms which aligns members in structs. commit 5a42423347510f085e18bb656f16e6c65cc474ee Author: Adam Dickmeiss Date: Wed Nov 22 10:26:12 2006 +0000 Added initializer value for two locals commit ccd38ea970d3cf707b22183fff661119ada6650c Author: Adam Dickmeiss Date: Wed Nov 22 09:42:27 2006 +0000 For build script: -p enables profiling. commit b3af54f7bf58db2a5d85b6a54b720bf6c5359c1f Author: Adam Dickmeiss Date: Tue Nov 21 22:17:49 2006 +0000 Get rid of SYSNO which is zint anyway. Removed various prototypes of unused/undefined functions. commit 2abea6bb56b0b40da2519d384c9326357f05ed04 Author: Adam Dickmeiss Date: Tue Nov 21 17:55:47 2006 +0000 Added commit dbb2d91da77e66472ebf9c9e5311a5b263ad66f1 Author: Adam Dickmeiss Date: Tue Nov 21 17:48:08 2006 +0000 Make threading for index sort configurable. commit 9cb67fae9997acfd1399515584c6ab5222f3eaf1 Author: Adam Dickmeiss Date: Tue Nov 21 14:54:12 2006 +0000 Remove log msg commit ca39c711e9398043092cceeb3b4a7d8a0db1c0d8 Author: Adam Dickmeiss Date: Tue Nov 21 14:32:38 2006 +0000 Split it_key stuff into it_key.c. For indexing, sort key chunks in a separate thread (POSIX threads only). commit a1b0fc99b8a098eff3d56172af6dd249a28399b3 Author: Adam Dickmeiss Date: Mon Nov 20 13:59:35 2006 +0000 Increase reckeys hash size from 1023 to 32767. commit 8d54ef98fc7b1e31c4b4aa0ad21980bdb14d739c Author: Adam Dickmeiss Date: Mon Nov 20 13:59:13 2006 +0000 Remove obsolete SORT_EXTRA code (no longer in use). commit dcd1514bd18b7c8623f2f2271f36d11948cf3821 Author: Adam Dickmeiss Date: Fri Nov 17 17:32:45 2006 +0000 Contact address for Zebra is zebra-help@indexdata.dk commit 5f9da49ae7414fbb37d999a389c8d39fd057f5c2 Author: Marc Cromme Date: Fri Nov 17 14:54:00 2006 +0000 updated docs to reflect change to 'zebra::index::' special elem set name commit 249111ff0c1796c93f3a044c7afebd770ae0968a Author: Marc Cromme Date: Fri Nov 17 14:24:56 2006 +0000 added tests fror wrong element set names which are not recognized commit 950d8094d0ee3aae2f4da7e5557c600ba871f269 Author: Marc Cromme Date: Fri Nov 17 13:47:22 2006 +0000 preventing later memory acess violation when one leaves retrieve.c:zebra_special_fetch by error condition before setting *rec_lenp by setting int len = 0; upon initialization. commit a00cd5d59423f99eddcea98bd10c5fca80b318bb Author: Marc Cromme Date: Fri Nov 17 08:20:17 2006 +0000 removing unnecessary comments not setting the *rec_lenp = 0; at retrieve.c:127 to provoke test failure with segfault in the last unit test of test/api/t16.c , which is commented out. It seems like *rec_lenp = wrbuf_len(wrbuf); at retrieve.c:247 leaves rec_lenp in an uninitialized state, which causes a segfault later. More investigation needed. commit bf647b34fd7224275cb2c1020925897f0d28fe01 Author: Marc Cromme Date: Thu Nov 16 21:58:54 2006 +0000 protected wrong buffer-length write by initializing to 0, but there is more debugging needed: there is still something fishy with the last out-commented test of test/api/t16.c. commit c266dcc8a54593cc8d511074cce43a35729a9e1f Author: Marc Cromme Date: Thu Nov 16 20:44:28 2006 +0000 added tests for zebra::data, zebra::meta::sysno and zebra::index::title:p element sets. Last one segfaults and need further debugging, it is commented out. commit f88bc82b3fd2296b35ddbc327b43d240304e0ee4 Author: Adam Dickmeiss Date: Thu Nov 16 13:27:54 2006 +0000 For alvis filter make XML pass-through if stylesheet is attribute is omitted (not specified). commit 724e70cf7629655ad7ef628f1b42ced08cc372f1 Author: Adam Dickmeiss Date: Thu Nov 16 12:48:28 2006 +0000 Added new test for check for zebra:: element set names. commit ac38d08734d73237def74cdacc659955374be2ed Author: Adam Dickmeiss Date: Thu Nov 16 11:11:36 2006 +0000 Fix setting of recordAttr->recordSize in case of storeData method. commit c9adef173c600dd4f741b878313879dfa71744db Author: Adam Dickmeiss Date: Thu Nov 16 11:10:46 2006 +0000 Output format = input for zebra::data fetch (raw fetch). commit 60cf55c8e68e07456299c4500e945f04eef9aa6b Author: Adam Dickmeiss Date: Thu Nov 16 10:49:11 2006 +0000 idzebra:: stuff functional. commit ad6a7a4bf4af72a6a9c3caf7250873af47031c7e Author: Adam Dickmeiss Date: Thu Nov 16 10:48:35 2006 +0000 Annotate zerbaExplain_lookup_attr_str commit 346a451790f8782b1bbc03a98951687f563f2445 Author: Marc Cromme Date: Wed Nov 15 14:09:43 2006 +0000 added suggestions for better workflow in comments commit 7a41489c9fb0495b4baaad3a00190c5b5a876ead Author: Marc Cromme Date: Tue Nov 14 14:32:13 2006 +0000 re-organized record retrieval such that special element set names zebra::index display all indexed terms from all indexes zebra::index::title display all terms from only title index zebra::index::title:p display all terms from only title index type p zebra::meta::sysno display only zebra internal record sysno zebra::data dislpay raw record binary data as SUTRS all work More testing with zebra:.data is needed Sitll missing zebra::meta::filename, zebra::meta::count, etc .. Better error messages would be an asset... commit 35f67dc85e5507c1edc1fecbc2835fab0255ada4 Author: Adam Dickmeiss Date: Tue Nov 14 12:41:19 2006 +0000 Added small test of mfile sub system commit 5b3741a896469e69a52c74dc021f44c940e38df9 Author: Adam Dickmeiss Date: Tue Nov 14 12:11:48 2006 +0000 Avoid abort. EXTRA_CHECK defined and annotated commit 5d2484328c438d0e3c8565b6531383e866fbac4e Author: Adam Dickmeiss Date: Tue Nov 14 12:03:48 2006 +0000 Use assert rather than abort commit e1505cfe25eded532b0e9e814753f6a2723265c3 Author: Adam Dickmeiss Date: Tue Nov 14 10:45:34 2006 +0000 Changed test to pass for Libxml 2.6.16. commit 0a699504f439b75a2c8aa27efb855d4a0967b551 Author: Adam Dickmeiss Date: Tue Nov 14 10:03:21 2006 +0000 Fix mf_write call in cf_commit_flat. commit 0f78f3fe78e859d9f0d3f0d3e13fcd28085dd427 Author: Adam Dickmeiss Date: Tue Nov 14 08:12:06 2006 +0000 Work on bug #550: Avoid exit. In particular the mfile/cfile/bfile has been refactored quite a bit. Remaining exit uses zebra_exit. Removed redundant apitest.c. commit 91500c092797da8e769f1e63ff0c6bd67aad0fc8 Author: Marc Cromme Date: Mon Nov 13 14:53:40 2006 +0000 added section on special zebra:: elemset names, and updated docs to follow suit with changes alvis oai filter example commit f3d280a5a9ee4a99fbf738d16a8a58d9ef498da2 Author: Marc Cromme Date: Mon Nov 13 13:53:49 2006 +0000 written XML formatting for new zebra-specific elem set 'zebra::' which lets you dump the exact content of indexed fields in records. Using for example elemset 'zebra::dc_title' dumps only the physical string index 'dc_title' fields in the virtual, from indexes constructed, record. Usisn 'zebra::dc_title:w' dumps only te subset of those which are indexed as type 'w'. Added test record for oai-alvis example with utf-8 sequences and nasty XML escapes. Testing works on GRS-1 filters, but yet not on 'Alvis' filters, the direct YAZ function zebra_storekeys_fetch in index/retrieve.c seems not be called at all .. more debugging needed. commit 27c0f37066fbd730a7c56ec97b44d7c66a3a7c26 Author: Adam Dickmeiss Date: Mon Nov 13 09:07:05 2006 +0000 Parse element spec zebra::field,type to make Zebra return storekeys for records. commit 58b1837132acdc0f4683fef187b6a5b06534fa85 Author: Adam Dickmeiss Date: Fri Nov 10 13:10:31 2006 +0000 Test for bug #730. commit d94e1b43a4a350167e0949c38907dd8c35aa408c Author: Adam Dickmeiss Date: Fri Nov 10 12:57:49 2006 +0000 In tl_init_data check for return code from zebra_add_record. commit 5d13c6c6bb31cb385291820d9d1d9e4d192e8d0a Author: Adam Dickmeiss Date: Fri Nov 10 12:56:26 2006 +0000 Fixed bug #730: Bad XML for update with alvis filter does not fail as it should. The Libxml2 function xmlReadIO does not report errors so we use xml reader interface always for ALVIS filter. commit d4451321ac90adc2c6c52d7d07fadc5af632a59a Author: Adam Dickmeiss Date: Thu Nov 9 14:39:24 2006 +0000 Renamed function zebra_snippets_rec_keys to zebra_rec_keys_to_snippets. Factor storedata retrieval out of zebra_record_fetch. commit 91c31916bd40829afa20cd4e104ffc764ea116bf Author: Adam Dickmeiss Date: Wed Nov 8 22:08:26 2006 +0000 Change mfile_/cfile-functions to return error code(s) rather than exit. Added bf_read2 / bf_write2 which does not call exit for errors. commit a9b4e41c61e30e376528b83aa87955fe9594423a Author: Adam Dickmeiss Date: Wed Nov 8 22:06:50 2006 +0000 Removed a few redundant comments. commit d1b7eaa7b281d10d697bbfb3dea01c3807334c24 Author: Adam Dickmeiss Date: Wed Nov 8 22:05:43 2006 +0000 Use blanks rather than NULs in block (bfile test) commit 1bf3c420dad254b9b0275f28541772e28197e19f Author: Adam Dickmeiss Date: Wed Nov 8 13:05:33 2006 +0000 Changed test to that bfs is reconstructed after bfs_reset. commit c8816fc1830fcfa92a58c82506fa665eeac8713c Author: Adam Dickmeiss Date: Wed Nov 8 12:59:27 2006 +0000 Added test of bfile/cfile/mfile system commit d5c921e71defabcb16299ee27bd7c9bdabe2e461 Author: Adam Dickmeiss Date: Mon Nov 6 20:48:42 2006 +0000 Filter 'text' loadable as most other filter types. 'grs.sgml' always static. commit 9eaf65aa25be411fbd6298292f5ad7a7df7083ed Author: Adam Dickmeiss Date: Sun Nov 5 19:57:40 2006 +0000 Only enable ALVIS if Libxml2 2.6.15 or later is in use. commit 789def370a1ed54daee69faaa3814ab7a8bdf47e Author: Adam Dickmeiss Date: Fri Nov 3 23:17:08 2006 +0000 Fixed bug #723: Enable EXSLT for alvis. We use whatever YAZ finds out for Unix confiugre (YAZ_HAVE_EXSLT & YAZ_HAVE_XSLT). commit 181e7ece7b5690b563a3a0e3c9aeff4a57b63bd9 Author: Adam Dickmeiss Date: Thu Nov 2 10:47:05 2006 +0000 Log level -v indexdetails logs all terms indexed for each record. commit 4baef7e0b9ea339001aa01a9e5126edad270c9e2 Author: Mike Taylor Date: Wed Nov 1 18:05:53 2006 +0000 Ignore another generated binary commit 58c0ae56c63692ba8f8856cdbb25a060c1317b77 Author: Adam Dickmeiss Date: Mon Oct 30 16:21:29 2006 +0000 Use f(void) instead of f() commit 9f14452b00e9757af221205b626a70e4d8fe7f28 Author: Adam Dickmeiss Date: Mon Oct 30 14:05:30 2006 +0000 Fixed bug #234: mbox filter hangs when seeing a non-mbox filter. Also, again (!), fixed the way regx determines EOF; now EOF is signalled if nore rules matches (except BEGIN which always matches). commit 4e27fea1f9fafa8fa80caeb77ae0da62be0def9a Author: Adam Dickmeiss Date: Mon Oct 30 11:18:26 2006 +0000 Revert last change for extract.c, due to tests failing. We can't use offset for determining whether a record stream indexing is finished or not. Indeed filters, like ALVIS, reads large chunks at a time. The grs.{regx,tcl} filter instead is modified to return the "right thing", i.e. NULL data1 tree (signalling EOF / no more data). commit 1e6d660cabb2425e31552deb2161b72435b27d5b Author: Adam Dickmeiss Date: Sun Oct 29 20:35:58 2006 +0000 For record file stream indexing, stop looping if offset is unmodified by call to filter. This appears as bug #234, but really isn't. commit fc9fd53abee281ae70a928af9a66a75338cfbffc Author: Adam Dickmeiss Date: Sun Oct 29 18:01:26 2006 +0000 Use f(void) rather than f() commit c401b3a1421e31b3d6b77bc7bac6ffb934207df1 Author: Adam Dickmeiss Date: Sun Oct 29 17:20:00 2006 +0000 Fixed several prototypes.. Most changes are f() to f(void). commit 35006038c98c6a2dd02902492d39982e5561ce6e Author: Adam Dickmeiss Date: Sun Oct 29 17:19:07 2006 +0000 Added -Wstrict-prototypes for buildconf.sh -d mode. Added -o mode which uses -O3 plus warning options. commit bc4308f57215143ed7b634db6ac86a77064d2839 Author: Adam Dickmeiss Date: Sun Oct 29 17:18:05 2006 +0000 Removed unused function rpn_scan_ver1 commit ad2cfc71a31490b128be49e47bb85dc9f29cce6c Author: Adam Dickmeiss Date: Fri Oct 27 11:05:14 2006 +0000 Initialize variable which could be un-initialized commit 6cf7c0bdb8d8e4a101771d234830539c2f55dc0e Author: Adam Dickmeiss Date: Thu Oct 26 23:49:14 2006 +0000 Change prototype for data1_absyn_getmarctab, data1_absyn_getelements. commit 52637f6d9498ad3b01737ef4faa889beff34214d Author: Adam Dickmeiss Date: Thu Oct 26 23:45:46 2006 +0000 Fixed bug #710: Duplicate keys for CDATA in xelm/melm rules. For X-Path termlist indexing, the sequence number is updated to the maximum sequence number generated. commit 3498aefc23092a4649ce37d5c204f8aacfd2b826 Author: Adam Dickmeiss Date: Mon Oct 23 09:31:48 2006 +0000 Added a check to verify that private OIDs works commit d47631945b44bd28a9e655bad29c0993048e6841 Author: Adam Dickmeiss Date: Mon Oct 23 09:01:42 2006 +0000 Removed no longer in use zebrazv.cfg commit 0bb95c837c417c4fd2b345422de9cb48d19b3e5a Author: Adam Dickmeiss Date: Mon Oct 16 11:03:47 2006 +0000 Towards 2.0.4 commit 0233d9169db4012ea5fb5bd13269bc67a6583c4b Author: Adam Dickmeiss Date: Mon Oct 16 07:04:29 2006 +0000 Build-Depends yaz > 2.1.36 commit 466ae312f71741fd16a8a60d929b6a6d9cf38294 Author: Adam Dickmeiss Date: Sun Oct 15 07:28:21 2006 +0000 More news items commit ba54c2986ad5d1088cd70b577d9941a9d4e14e6c Author: Adam Dickmeiss Date: Thu Oct 12 13:06:00 2006 +0000 Fixed bug #47: Commit needs to check for roll-back. commit 4b9677b925750d09eafd35ed02f3d36786718750 Author: Adam Dickmeiss Date: Thu Oct 12 12:28:42 2006 +0000 Fixed bug #696: Less than Date searches returns unexpected hit count. commit ca8c7208a371bcfb79c846dfec9cd7cb42ecaf92 Author: Adam Dickmeiss Date: Thu Oct 12 12:27:28 2006 +0000 Allow character ordinal 1 in [..] ranges to specify "raw" value. commit fa2de335b2e9e5bee959e273319e97ef6be0676a Author: Adam Dickmeiss Date: Thu Oct 12 10:13:33 2006 +0000 Fix crash that occurred if mc-ldr rules was used in conjunction with missing .mar file. commit 736d28749cda5e336fbdd7751e55be385d2db7d4 Author: Adam Dickmeiss Date: Wed Oct 11 20:19:31 2006 +0000 Added tstpass test commit 06fa4578d2a5938d5ba073168661f25670465750 Author: Adam Dickmeiss Date: Wed Oct 11 20:18:47 2006 +0000 Fixed bug 672: Trailing characters in password are ignored. By default htpasswd uses DES encryption of maximum key length 8. This means that a password can only have 8 significant digits. Function passwd_db_auth now returns -2 if password is greater than 8. commit 20748e92bc15812298ad44318f0c54dd297bb9df Author: Adam Dickmeiss Date: Wed Oct 11 12:37:23 2006 +0000 More on regular expressions in grs.regx filters. commit e0db7ec19fac98614f8dee77c734da7202a3c2d2 Author: Adam Dickmeiss Date: Wed Oct 11 12:23:24 2006 +0000 Fixed bug #658: update docs on zebra.cfg settings. commit 7591739d6edc7bf66c47d712ffd955813895904b Author: Adam Dickmeiss Date: Wed Oct 11 09:39:44 2006 +0000 Fixed 'make distcheck'. Failed due to html files not being removed by uninstall. Added uinstall-hook for the doc directory. commit aff82b142abbf5043865c30c735f30187db3bb91 Author: Adam Dickmeiss Date: Wed Oct 11 08:55:52 2006 +0000 Fixed bug #670: modulePath is not a path. Uses new utility yaz_filepath_comp - available in YAZ 2.1.35 and later. commit 5ffac76f04c812b586d0fb5619cb281135a7fe4c Author: Adam Dickmeiss Date: Tue Oct 10 14:45:41 2006 +0000 Use check for 'long long' to determine type for zint. commit 3fc87bc9adc573a29b4261a6c96c5350d8680a5a Author: Adam Dickmeiss Date: Tue Oct 10 10:19:28 2006 +0000 Removed unused local variables. commit a5e97e0247e22579d34731d1b4af29f6c5785b04 Author: Adam Dickmeiss Date: Tue Oct 10 10:14:26 2006 +0000 Ignore Zebra register files commit e568c00ad91afbbfbd48743a8407a4af019c88a9 Author: Adam Dickmeiss Date: Mon Oct 9 22:13:06 2006 +0000 Added extra presence check for tcl.h, because some systems have tclConfig.sh installed even though Tcl C headers are missing. commit 3946190aece0417a4ad4e40946dfcb9f1bca4755 Author: Adam Dickmeiss Date: Mon Oct 9 22:10:00 2006 +0000 Simplify and optimize commit clean operation commit e57a1c65b9630e5b93d254519090bd0875c1d3c9 Author: Adam Dickmeiss Date: Thu Oct 5 13:19:10 2006 +0000 Quote various places in Windows makefile to deal with directories with blanks in them. commit 91a865871a86acac889c6b35b3e07cd23cf7b879 Author: Adam Dickmeiss Date: Wed Oct 4 12:45:51 2006 +0000 More NEWS commit a1c7ea4ea8821a0c837850f147893c0b35ae63dd Author: Adam Dickmeiss Date: Fri Sep 29 13:03:06 2006 +0000 Version 2.0.3. commit f5fb1bd0a0df8a28471285cdf622897f4c2391b3 Author: Adam Dickmeiss Date: Fri Sep 29 10:02:45 2006 +0000 More optimizations of the melm matching. commit 2c381d0b592241769db6e2b599e60c1712604a57 Author: Adam Dickmeiss Date: Fri Sep 29 07:05:44 2006 +0000 Do not use sync(2) after commit. The fsync on individual files suffices. commit 396e9aaedfbed7534e329b42475cd7abe2fd3814 Author: Adam Dickmeiss Date: Thu Sep 28 18:38:44 2006 +0000 Fixed bug #685: Optimize xelm/melm matching. Indexing the Koha collection is reduced from 6073 sec to 2578 sec (on Zebra 1.3.38 though). commit 60e5ce8bab203c128527900dea366237612082fc Author: Adam Dickmeiss Date: Thu Sep 28 08:47:21 2006 +0000 Align query tests commit 20ce3747efde7ae4be9be815ffc562b384cb2e6d Author: Adam Dickmeiss Date: Thu Sep 28 08:47:10 2006 +0000 Added more rules to verify bug #686 commit 91201c1a293555f074bf49cde35febe01b6b804a Author: Adam Dickmeiss Date: Tue Sep 26 12:56:33 2006 +0000 Fixed bug in ISAMB's utility function decode_ptr. With gcc -O3 on some platforms the src argument was not updated. commit 005e9e47b04e46decd36cc3bc409c4eb3cb973f0 Author: Adam Dickmeiss Date: Fri Sep 22 12:45:53 2006 +0000 Update for 2.0.2 commit b0e96fd39e829ed6efb70a27999986fab11301f6 Author: Adam Dickmeiss Date: Fri Sep 22 12:44:01 2006 +0000 Version 2.0.2 commit 549e300268fc6d67c2d056ca8ca47682a8530571 Author: Adam Dickmeiss Date: Fri Sep 22 12:42:38 2006 +0000 Fix FSF address commit 3792780712898860435acfb9bf38c00f98cee037 Author: Adam Dickmeiss Date: Fri Sep 22 12:34:45 2006 +0000 Updates for first-in-field support + alwaysmathces searches. Refer to native query support as RPN rather than PQF. commit 20d1df123f3e5be61a77687223952430ac184cd9 Author: Adam Dickmeiss Date: Fri Sep 22 10:18:06 2006 +0000 Renamed main.c to zebraidx.c. Renamed zserver.c to zebrasrv.c. Removed zserver.h. commit c5b0d6e42ff18583f4ebbaa40077160903fd8b77 Author: Adam Dickmeiss Date: Fri Sep 22 10:11:51 2006 +0000 Update news commit 918c8b1ec479083d82c390d5dceb4899654cb666 Author: Adam Dickmeiss Date: Thu Sep 21 20:22:33 2006 +0000 Skip 0 hit counts in scan. commit 2a0be28b861bf340b8213ad17438daf49e5cb8b0 Author: Adam Dickmeiss Date: Thu Sep 21 10:10:07 2006 +0000 Split function rpn_scan in two. commit a49a88c44a59e817c5a0f2e1f4d9c57b0c7c1f72 Author: Adam Dickmeiss Date: Thu Sep 21 08:59:32 2006 +0000 Update for zrpn split. commit 1ab2b4589da1d33372cc1f9a87afdac160ca11de Author: Adam Dickmeiss Date: Thu Sep 21 08:56:52 2006 +0000 Rename source files commit 18e6d4befe9117cc44003fc9c1e62aac14d4e3bb Author: Adam Dickmeiss Date: Thu Sep 21 08:39:14 2006 +0000 Split zrpn.c commit 8b409b87708f39dffe49d5e85b8f7c0be29d02a3 Author: Adam Dickmeiss Date: Wed Sep 20 19:29:25 2006 +0000 Avoid C++ style comments commit cae931abd2ea541c01d0be828456fea704a1880f Author: Mike Taylor Date: Wed Sep 20 15:19:38 2006 +0000 Describe the use of "a" in permission strings. commit b8b19cd5ced95c850cf66f0ce306161ff78f490e Author: Adam Dickmeiss Date: Wed Sep 20 10:51:25 2006 +0000 Fixed bug #669: Numeric sorting does not work, but yields "random" order. The numerical sort did not convert characters back to original form, that is it would only work with 'charmap @'. Any charmap should now work but results will look random if charmap does not include the digits [0-9]. commit fe9c1bf692a3a1f8dffa5cd98a9f1e99a3abc604 Author: Adam Dickmeiss Date: Tue Sep 19 14:22:54 2006 +0000 Fix LFS check which on some systems, such as Solaris, reports LFS false - when LFS is present. The sprintf+long double format check is gone and replaced by a simple arithmetic expression which does the same thing. commit f7a35c8865bf897ea727edf97b8b3b996a2f5419 Author: Adam Dickmeiss Date: Fri Sep 15 10:45:12 2006 +0000 Rename rec_rm to rec_free. Annotate the recindex.h file a bit. commit 1d76eefd3435e9a3fb330fd2ae3317b401183915 Author: Adam Dickmeiss Date: Fri Sep 15 10:44:34 2006 +0000 Removed unused vars. Rephrase comment commit b9236f91bdec221da53f549b9255e96705929309 Author: Adam Dickmeiss Date: Fri Sep 15 10:07:09 2006 +0000 Removing api_swig.[ch] from build because it does not compile on AIX. It is currently unmaintained. commit d80dc596a2011f4ab285657fabfd81ba202dd442 Author: Adam Dickmeiss Date: Fri Sep 15 09:21:52 2006 +0000 Fix modulePath in upgrade-example. Put re-indexing paragraph in note section. commit b8f1102671932cb3770fbb24081faac1012d080e Author: Adam Dickmeiss Date: Thu Sep 14 09:01:18 2006 +0000 Remove trailing garbage bytes in this MARC sample commit 10d6b6813c5bb9e7b19a12c241ac4e05f5741605 Author: Adam Dickmeiss Date: Mon Sep 11 22:57:54 2006 +0000 Fixed bug #657: Problem with drop database and recordId: file. commit f3997622106bec8b8febad0d025bfc6ec23e9473 Author: Adam Dickmeiss Date: Fri Sep 8 18:25:49 2006 +0000 Update for support for first-in-field in and/or lists commit 179f0d2cd10868f92ee68bed25fb87cf25adf923 Author: Adam Dickmeiss Date: Fri Sep 8 18:24:53 2006 +0000 Implement first-in-field search for and-list (@attr 4=6) as well as or-list (@attr 4=106). Support isam:c for this as well. commit c33ea56e3771c3b80ba66ef8fda3a09cad171ebb Author: Adam Dickmeiss Date: Fri Sep 8 14:40:51 2006 +0000 Honor position attribute, i.e. allow first-in-field search. To enable this, "firstinfield 1" must be given for an index in default.idx. Enabled in tab/default.idx for w. At this stage first-in field is only supported for phrase searches (including simple words). commit 9aacfd0955fc70f27165254a2844618c85e8600d Author: Adam Dickmeiss Date: Fri Sep 8 09:56:40 2006 +0000 Dont override log level (e.g. when set with YAZ_LOG env) commit 94c8b65c0a0eafb2b1e3cf70ed63e1d0f4341a5d Author: Adam Dickmeiss Date: Fri Sep 8 08:34:56 2006 +0000 Ignore register+lock files. commit 41dc674228e5243d195f5369539260f011d9efa0 Author: Adam Dickmeiss Date: Thu Sep 7 10:02:29 2006 +0000 Fix test for index.html in dist/install hook commit 0785b8c3e1b0123eb57be317029e0787fb0183b4 Author: Mike Taylor Date: Wed Sep 6 14:31:59 2006 +0000 Tweak language about x-pquery commit 8707aaa9f358bc23e4d2adf4644f7e52c6440af8 Author: Adam Dickmeiss Date: Tue Sep 5 12:50:56 2006 +0000 Changed behavior for dict_scan: if the callback function returns 0 the scan operation visits all terms in range (before to after); if the function returns non-zero the scan operation is cancelled. commit 6481ca376f2878b6fe64272074d08f44e3b57e11 Author: Adam Dickmeiss Date: Tue Sep 5 12:08:47 2006 +0000 Added id tag to reference section commit 7b25277add2aae5caabee02213911aeeb65030c8 Author: Adam Dickmeiss Date: Tue Sep 5 12:01:31 2006 +0000 Put man pages in reference section of main documentation . Avoid duplicated material for man pages. Put Zebra version in productnumber tag of man page. commit 7c4f374dbf6bc1a32ff560389c05a2252eaa28ce Author: Adam Dickmeiss Date: Mon Sep 4 12:11:40 2006 +0000 Clean .tkl files be making them. Cosmetic change in install-data-hook commit 37dc985516f52f34fc8434cc8beb982bb0c8988f Author: Adam Dickmeiss Date: Sun Sep 3 21:37:26 2006 +0000 Change makefiles so that html files are automatically installed and part of dist. No more maintenance of HTMLFILES ... Section about fields and character maps moved to separate chapter because it relates to all record types (not only grs). Added lots of id attributes to sections to get rid of docbook xsl warnings and to ensure proper HTML file name. Added Olegs paper on MARC indexing to grs chapter. commit 819007639f67bdf6a147a8fc5e66c7fbad9ada6a Author: Marc Cromme Date: Thu Aug 31 09:50:07 2006 +0000 fixed dependency typo in libidzebra-2.0-modules which made installs halt due to non-existing package libidzebra-2.0-mod-marc commit 0ee1415968148352b07c112d0a4eb1deb4aa2322 Author: Adam Dickmeiss Date: Thu Aug 31 08:36:53 2006 +0000 Allow check for scan failure. For test of bug #647. commit 34c9397e52ad1492e2226ac838bff8e4a783f216 Author: Adam Dickmeiss Date: Thu Aug 31 08:35:48 2006 +0000 Fixed bug #647: Scanning wrong indexes do not trigger scan error. commit 6e04a8f4bee882f0dc6aee97a704300911b0ae74 Author: Adam Dickmeiss Date: Tue Aug 29 14:25:40 2006 +0000 Commentary updates commit 5ec9ca6ba57e794c245273637806d24a070f14f5 Author: Adam Dickmeiss Date: Tue Aug 29 13:39:48 2006 +0000 Test of proper return value of dict_insert commit 81fea315c5f745053a8afdca84d45e4ffae6c27c Author: Adam Dickmeiss Date: Tue Aug 29 13:39:18 2006 +0000 dict_insert returns -1 if dict not writable commit 8b2d919ca1ab2134c098057bb0965ec7dc42cd9d Author: Adam Dickmeiss Date: Tue Aug 29 13:38:38 2006 +0000 Reformat commit 861a4414a4a0d1d1076f97fe8105b0a3a3ab4a31 Author: Adam Dickmeiss Date: Tue Aug 29 13:36:26 2006 +0000 Changed behavior of dict_lookup_grep so that it returns value of function handler if function returns non-zero value. Previously dict_lookup_grep returened 1 in this case. commit a4b519d430b264b1fa1153041ee4d6e61ee3248a Author: Adam Dickmeiss Date: Tue Aug 29 12:48:48 2006 +0000 Make internal lookup ec function static. Reformat a little commit 9d9266bfed4daa001a3f038f0d5b6e8c51a37373 Author: Adam Dickmeiss Date: Tue Aug 29 12:31:12 2006 +0000 scan test uses YAZ' test facility commit 1f61b7e564e0ed44176f4c26302c828c45dd121c Author: Adam Dickmeiss Date: Tue Aug 29 11:28:42 2006 +0000 More comments on dict.h. Moved typedef Dict_ptr to private dict header. commit d92484ecfc009ac44ce5674577fe455fa8c30598 Author: Adam Dickmeiss Date: Tue Aug 29 09:27:55 2006 +0000 Make dict_str{cmp,ncmp,len} internal commit d11d06eb6cb73bd56217636882f6f61a89cb0ec8 Author: Adam Dickmeiss Date: Tue Aug 29 08:27:59 2006 +0000 Segment message is LOG_DEBUG commit a9f14f3591fb7cf555414f84c24e79e1e0fd4945 Author: Adam Dickmeiss Date: Wed Aug 23 13:56:07 2006 +0000 Warn if non-integer is passed to 'att' directive' commit 6db760372765ddc1ebf4f00f1b3b85832abb1048 Author: Adam Dickmeiss Date: Wed Aug 23 07:37:02 2006 +0000 Use ZEBRA_GCC_ATTR instead of GCC_ATTRIBUTE (due to chgs in idzebra/api.h). commit 592a05fe5502ccdd6c50896eab27f69cd4ed0770 Author: Adam Dickmeiss Date: Tue Aug 22 13:59:02 2006 +0000 Only use gcc attribute warn_unused_result on GCC 4 or newer. commit 852d5f1f9aa0a70f7e54a68143ee86752394a2f2 Author: Adam Dickmeiss Date: Tue Aug 22 13:39:22 2006 +0000 Common stream reader interface for record filters (struct ZebraRecStream). commit 6dacbea766edc98899e9ad30f276da0809d9f4ef Author: Adam Dickmeiss Date: Tue Aug 22 10:21:53 2006 +0000 Fixed bug #638: USMARC conversion differs for grs.xml. commit 422279f19e20343e71a46c5505696b2efa455b60 Author: Adam Dickmeiss Date: Tue Aug 22 08:11:32 2006 +0000 Test indexing of leader + range operator. commit e6b9d553e21799a45c35cf0f6c8a85c44bffeb89 Author: Adam Dickmeiss Date: Wed Aug 16 15:05:00 2006 +0000 Depends rather than Provides for libidzebra-2.0-modules commit deb0cef3d4d19dc6508b2fed71711b3fb1be26a2 Author: Adam Dickmeiss Date: Wed Aug 16 13:16:35 2006 +0000 Experimental segment facility (for matching of words within one field/segment). commit 4ec3d03247ad7f4a911143655d697d88cb081c24 Author: Adam Dickmeiss Date: Wed Aug 16 13:14:55 2006 +0000 Fix comment commit e2bb43175f2ac706d3895cb032becdba078b416c Author: Adam Dickmeiss Date: Wed Aug 16 13:14:45 2006 +0000 A little clearer rset counting commit f8d924262bf4847a8366354cae841a458cde789d Author: Adam Dickmeiss Date: Wed Aug 16 13:13:53 2006 +0000 Fix a few leaks in testlib. Store test results in yaz_log commit c66753469d139c4233a3572edf4b15b0497e0f28 Author: Adam Dickmeiss Date: Tue Aug 15 14:28:32 2006 +0000 Definitions in zebramap.h are private. ZebraMaps no longer used in recctrl system. commit 98cb23ff38e16a59f984cc9ed1d2fd197f27d4ce Author: Adam Dickmeiss Date: Tue Aug 15 08:33:16 2006 +0000 Use Depends rather than Provides for idzebra-2.0 package commit 3b8c3227f359d5a4ff1b2df52139f1b88a01ce34 Author: Adam Dickmeiss Date: Mon Aug 14 22:33:46 2006 +0000 Use Docbook tables rather than HTML tables. This makes jade happy and allows us to make PDF. commit 53919fd96e0a3e907a023c44257e65dd34a1d957 Author: Adam Dickmeiss Date: Mon Aug 14 22:28:01 2006 +0000 Fix date for zebra release commit de31c38f785cafdadae526d27c64005e33238761 Author: Adam Dickmeiss Date: Mon Aug 14 19:56:50 2006 +0000 Dont use for non-literal terms. Fix sources list description to use the official location (not the testing /t/debian/). commit 28b7414cc9cfb8fa8956c02dcf6090c665b26f9d Author: Adam Dickmeiss Date: Mon Aug 14 19:33:38 2006 +0000 Fix index.tkl rule. Does not depend on common/tkl.xsl commit e13277be8b20bd0a4c53b9a6bbdbed990d98fdfb Author: Adam Dickmeiss Date: Mon Aug 14 18:57:04 2006 +0000 Use VS 2003 rather than VS 2005 commit 31c0644406a982db1c50b963280a474efe97901a Author: Adam Dickmeiss Date: Mon Aug 14 18:12:35 2006 +0000 Skip manifests (for now). Update to newer libxml tools. Add d1_utils.obj commit 79b1d746fd584d9ccbda15a3e200ef7972b27bfd Author: Adam Dickmeiss Date: Mon Aug 14 17:43:31 2006 +0000 Make symlink for idzebra-config.1 in install hook commit 52b172a592a3dc922ca573fb69360d1043a490ab Author: Adam Dickmeiss Date: Mon Aug 14 15:46:17 2006 +0000 Fix Conflicts line with idzebra to use full version commit a2d323d1865971714eb4172346a7921c8a67b53c Author: Adam Dickmeiss Date: Mon Aug 14 13:38:14 2006 +0000 Remove conflicts with idzebra, but let idzebra-utils conflict with older idzebra 1.3 series. The latter, however, does not appear to conflict as it should. commit dbf689d280136be4e5b2dd88cae6f28b539129f4 Author: Marc Cromme Date: Mon Aug 14 12:34:54 2006 +0000 updated News commit 54deb99fcc48302b679c70a45d6d9fdb319efecb Author: Adam Dickmeiss Date: Mon Aug 14 12:34:29 2006 +0000 Update for idzebra-config-2.0 commit f244ffa34c34fa73f55e0981a59ec298b36935bf Author: Adam Dickmeiss Date: Mon Aug 14 12:18:46 2006 +0000 Using suffix 2.0 for development tools idzebra-config and idzebra.m4. This means that Zebra 2.0 is completely separate from potential newer releases. commit 4478d785b7769691261005c98063b98a5a5971b3 Author: Adam Dickmeiss Date: Mon Aug 14 10:40:05 2006 +0000 Update copyright year + FSF address commit 79378ee88d2008df7b2f067561d7df0eb2436862 Author: Adam Dickmeiss Date: Mon Aug 14 10:06:05 2006 +0000 Update to new FSF address. GPLv2 commit ddad4c87874bdcc1b7c0575338d15610e68439ab Author: Adam Dickmeiss Date: Thu Aug 10 18:02:28 2006 +0000 postinst,prerm files part dist commit ae8b65eeea5199dae5a59d9a57398b28c5419ec9 Author: Adam Dickmeiss Date: Thu Aug 10 18:01:58 2006 +0000 alvis module part of libidzebra-2.0-modules. Recommends idzebra-2.0-common (tables, etc) for idzebra-2.0-utils and include idzebra-2.0-common as part of virt package idzebra-2.0. commit 9db80121f44ca0cc86ccdc92d773d21ed0ae7144 Author: Adam Dickmeiss Date: Thu Aug 10 15:43:03 2006 +0000 Another fix for zebrasrv.8 link commit c48a13e70b6db0a55b2d915d039c86842541bebc Author: Adam Dickmeiss Date: Thu Aug 10 13:33:47 2006 +0000 Fix update-alternatives path to zebrasrv.8 commit d1aad239391716f88270cc7bab75fbc59d9c0f30 Author: Adam Dickmeiss Date: Thu Aug 10 13:08:57 2006 +0000 Dont hard code make options. Use MAKE="make -j8" or similar commit 325dfaa45a42dd93f7a3741682310630f0f6bd3c Author: Adam Dickmeiss Date: Thu Aug 10 08:44:45 2006 +0000 Fix tl_close_call (bug introduced in previous commit) commit b97e932d3406f33399d848ebbe601688ba91a0ed Author: Adam Dickmeiss Date: Thu Aug 10 08:44:11 2006 +0000 Include only most important 2.0 news commit 8c5cbed7bc369b1f561bd01171b9336a38c294ac Author: Adam Dickmeiss Date: Wed Aug 9 13:22:49 2006 +0000 Fix leak in test program. commit e590cf3b85bc9dcdd908033b96c64bb5457f19e9 Author: Adam Dickmeiss Date: Mon Aug 7 10:14:59 2006 +0000 Use less memory for each result set. Size of zset_sort_entry reduced. commit 930d9dc74a2bee5037ee1372dd5de4a6963ecd6b Author: Adam Dickmeiss Date: Mon Jul 31 12:26:55 2006 +0000 Zebra Attribute Extension Approximative Limit changed from type 9 to type 11, because type 9 is rank weight (which is was available in Zebra 1.3 series as well). commit 7e534b6c6cdf143c7e6340a09a1e95c156098b13 Author: Mike Taylor Date: Wed Jul 19 16:37:28 2006 +0000 Ignore generated grs.xml.idzebra commit 2d6f6f8688e1fcd5c607771a4e0008ad2498acd3 Author: Mike Taylor Date: Fri Jul 7 11:42:52 2006 +0000 Ignore more commit c86db2053f05397d6bdd11b038d191a41537c5a6 Author: Mike Taylor Date: Fri Jul 7 11:36:18 2006 +0000 Ignore generated .lo files. commit f36e8f2cd429214b4fb431178686f6f35f87084a Author: Marc Cromme Date: Fri Jul 7 06:30:48 2006 +0000 added tests for correct removal of idzbra internal metadate under indexing and retrieval commit c23dcf8e79596d2ae1fc05596e1d60ed318962e7 Author: Marc Cromme Date: Thu Jul 6 12:42:21 2006 +0000 bug #504 fix The GRS module now ignores any previously existing GRS subtree of the form ... both under indexing and retrieval of records. This is to facilitate remote update of GRS records, which have been augmented by zebra-internal meta data info, such that this part is not appended twice. The local storage is still including the GRS subtree, but it is not indexed any more, and stripped before retrieval, i.e. for all practical purposes it is not existent. commit d1e1a6a2a574e8019e700abb9d8a9d03ba41aab5 Author: Adam Dickmeiss Date: Thu Jul 6 11:40:23 2006 +0000 Remove destroy member of data1_node commit d089fa72c83a673c788d828687dbec88fe9d1c4a Author: Adam Dickmeiss Date: Thu Jul 6 07:59:39 2006 +0000 Change log of retrieval of default resource commit 54453c3aa60e354161680de92b95a279ef6a0916 Author: Adam Dickmeiss Date: Thu Jul 6 07:56:00 2006 +0000 Set version-info to 0:0:0 commit af106062008d15e8abe7d3b5670a2401a427a3d2 Author: Adam Dickmeiss Date: Thu Jul 6 07:54:57 2006 +0000 Fixed recommends line which referred to non-existing modules. commit 899c6e872ce56a69bca11f9f0f2ca3147d0be852 Author: Adam Dickmeiss Date: Wed Jul 5 15:43:59 2006 +0000 Check for missing query in testclient commit be6f4de56d3ab4fd49fbea540afe2580b947cded Author: Adam Dickmeiss Date: Wed Jul 5 15:03:44 2006 +0000 Omit version-info for convenience libraries commit ce9fb839e550a3d807c4c25bf46b79d745313bc2 Author: Adam Dickmeiss Date: Wed Jul 5 13:19:15 2006 +0000 Simplify windows makefile commit 6e2dd5682dff4d91a1f6f23faaf4011a4e1c6d6c Author: Adam Dickmeiss Date: Wed Jul 5 12:34:17 2006 +0000 Directory recctrl no longer part of dist commit a5ae2b3069c7059bf103c1787cc61c7091026ee1 Author: Adam Dickmeiss Date: Wed Jul 5 12:33:38 2006 +0000 Updates to tstflock for Windows commit 38241cbf471b954b9bfcb94e50375a25c069faf6 Author: Adam Dickmeiss Date: Wed Jul 5 12:02:12 2006 +0000 Get rid of DEBUG_FLOCK. Just set flock level for tstflock program. commit 651974e51cda5f503b3cbecbe11370a329d6b7e4 Author: Adam Dickmeiss Date: Tue Jul 4 14:10:28 2006 +0000 Working on and operation which deals with segments (matches within fields) commit c063130cc6128bbf21d502c84d006bcd9bf3c2ad Author: Adam Dickmeiss Date: Tue Jul 4 10:25:21 2006 +0000 Slightly reformatting for doxygen commit 11edef8271df7f3598f94373720aea3a5b6b3ad5 Author: Adam Dickmeiss Date: Tue Jul 4 10:25:08 2006 +0000 Doxygen looks in more directories for source commit 5c8f6e2e28b80fef1d943de52ab33d0e496c94c5 Author: Adam Dickmeiss Date: Mon Jul 3 21:21:37 2006 +0000 No longer in use commit ea48a53fe407f3162fbe9b37046459b265b69d4b Author: Adam Dickmeiss Date: Mon Jul 3 21:21:04 2006 +0000 Record filter files moved to index directory commit 5ba92997dbb29abf9a102711533e1fb73424d956 Author: Adam Dickmeiss Date: Mon Jul 3 21:19:13 2006 +0000 Shorter sleep in tstflock commit ba2e370543b87fe3c0549f27e84ed4f4002fa41a Author: Adam Dickmeiss Date: Mon Jul 3 20:41:38 2006 +0000 Update idzebra-config for new libs install layout. commit 3125b09b2621c1f0cfa795085f11c2c284fc74d5 Author: Marc Cromme Date: Mon Jul 3 15:14:06 2006 +0000 removing tstflock.out commit 7415d28c149c1bab51fe93aeaccdd14085b69bd9 Author: Adam Dickmeiss Date: Mon Jul 3 14:27:00 2006 +0000 Build main libidzebra-2.0.la. Bug #620. commit 4b596d1b6150430c615ca7724876e5974a282d7d Author: Adam Dickmeiss Date: Mon Jul 3 13:40:58 2006 +0000 Deal with double unlocks (which does happen sometimes) commit cbd0a7c0bf27f55373c0326f0aff4a1e0e4c81aa Author: Anders S. Mortensen Date: Mon Jul 3 12:30:24 2006 +0000 A few typos. commit 8b45b3079db774065246ef67a8b2c22b5f13ed18 Author: Adam Dickmeiss Date: Mon Jul 3 12:23:17 2006 +0000 Only use confstr on Linux to see if linuxthreads is in use. commit ef2203682d3625cf232a5f82ddbc0383ae271df6 Author: Anders S. Mortensen Date: Mon Jul 3 12:16:31 2006 +0000 Typo. commit 7cba8e6df70ba12b7dad1570564ff9e7a8112dd3 Author: Anders S. Mortensen Date: Mon Jul 3 12:00:03 2006 +0000 Fixed a few typos. commit dbb259a0017a7ccff0a62aac11de415c418f31a0 Author: Marc Cromme Date: Mon Jul 3 11:45:01 2006 +0000 corrected xml error commit 41107f15886b1645510c9dd82e067d56a6751b10 Author: Marc Cromme Date: Mon Jul 3 11:30:59 2006 +0000 small updates commit f1a47574b77092816b4ed7b7c37e298c1a8110ac Author: Adam Dickmeiss Date: Mon Jul 3 10:52:48 2006 +0000 Disable the termset feature for searches. We believe the reference to result sets in scan (@attr 8=set) is a better way to get terms for a result set. commit a2c4cb0542fef348b998284ca9bf3b2348f5c5b7 Author: Adam Dickmeiss Date: Mon Jul 3 10:43:43 2006 +0000 Fixed a bug in termset search: the term name offset was incorrect. commit 32389c925760f3dadf9091390e039075c99470c5 Author: Adam Dickmeiss Date: Mon Jul 3 09:50:51 2006 +0000 Use confstr(_CS_GNU_LIBPTHREAD_VERSION ..) to determine whether fcntl locks is conforming to POSIX or not. In POSIX mode, locks are shared for all threads in a process. In the other (linuxthreads) mode , it isn't. commit b7963f43864a0e8d4e738cf46f7ee4baad6db420 Author: Adam Dickmeiss Date: Sun Jul 2 21:22:17 2006 +0000 Added program to test scope of fcntl lock: process or thread commit f6fa9dad999f49bbec3783f95f10b74da447320b Author: Mike Taylor Date: Sat Jul 1 19:28:08 2006 +0000 Ignore tstflock.out commit 2bf73f691756b5ccfdc981d932e23a2ac08ff284 Author: Adam Dickmeiss Date: Fri Jun 30 15:10:29 2006 +0000 Write seq to yaz_log commit 4f8332e37fadf4306abe2b8f4a0e9442c7450d0f Author: Adam Dickmeiss Date: Fri Jun 30 15:10:20 2006 +0000 Disable debug mode commit d2a2cd0f1bb0a5f31bfc59039012efae30d8955e Author: Heikki Levanto Date: Fri Jun 30 14:48:04 2006 +0000 typo commit 25801551c8321842e7b0c2a65925692ccf63a9e4 Author: Marc Cromme Date: Fri Jun 30 14:36:12 2006 +0000 multiple corrections from Heikki's suggestions, renaming of html file id's commit 48faacdb311bbc6964f1478be2a8802d7160b000 Author: Adam Dickmeiss Date: Fri Jun 30 14:01:22 2006 +0000 Test interprocess locks commit 0cb355c68d4a00890aa75e64df25a92c02a85ca7 Author: Marc Cromme Date: Fri Jun 30 14:00:34 2006 +0000 another typo commit 64dc2c2a92458f6157657807bbe8697ff82f2980 Author: Marc Cromme Date: Fri Jun 30 13:59:37 2006 +0000 typo corrected commit 26dfd04d1977167a820f5b4f7e48f2e57a93af05 Author: Marc Cromme Date: Fri Jun 30 13:58:07 2006 +0000 aded references to Koha, Emilda, Reindex and Alvis commit efbacfd3929039959d79f4a2ae8a9dfbf9f548ed Author: Adam Dickmeiss Date: Fri Jun 30 13:02:20 2006 +0000 Further testing of locks. commit 26bd21f4cafb9f2a352c698eec6b072bd815fcf1 Author: Marc Cromme Date: Fri Jun 30 12:31:22 2006 +0000 added web service commit d3171bed6fd79937cb996f95b363a34677170bc6 Author: Marc Cromme Date: Fri Jun 30 12:13:54 2006 +0000 added update-alternatives script calls to map zebraidz to zebraidx-2.0 and zebrasrv to zebrasrv-2.0 commit b374ab328be4535cff9412e265a3fb87c53c1272 Author: Adam Dickmeiss Date: Fri Jun 30 11:10:17 2006 +0000 Experiments with file locks commit 9a3a1d59b4b4babd1554b9bfeb9ea7989a5cb173 Author: Marc Cromme Date: Fri Jun 30 10:58:41 2006 +0000 typos corrected commit 878a848853ad9e4f63da983476161613e114672d Author: Marc Cromme Date: Fri Jun 30 10:46:26 2006 +0000 rewrite of extended service section to add new information from Sebastian, triggered to a question from Eric Lease Morgan and Joshua Ferraro commit e497f2e26145007eabaa7961b9fe72417d369290 Author: Marc Cromme Date: Fri Jun 30 10:45:09 2006 +0000 added notes on Ubuntu installation commit ac7ce15f6d22a53794a5590c78ae4fda9032ceb1 Author: Heikki Levanto Date: Thu Jun 29 16:02:12 2006 +0000 minor typos commit 876883e86ca647ef6481c47459e6372a13ea65c4 Author: Adam Dickmeiss Date: Thu Jun 29 14:10:33 2006 +0000 Fix echo_source for idzebra-config. Update it to use /usr/lib libs again commit 9dc53f54ba9b3d1a87d3e21f999f5130902ab6e8 Author: Marc Cromme Date: Thu Jun 29 14:02:07 2006 +0000 correct typo commit a0c8ad663e1c39942375e032abfd0be156f9c2ca Author: Adam Dickmeiss Date: Thu Jun 29 13:47:52 2006 +0000 Revert. Libs installed in /usr/lib (again). Minor tweaks for Debian rules. commit 053934ce0725900e24f11a97232f19dd6f1c5dc3 Author: Marc Cromme Date: Thu Jun 29 11:20:39 2006 +0000 renamed packages to *idzebra-2.0-* commit 553ce0f9320b097b962ddd961989f5c8ad7fcf9f Author: Marc Cromme Date: Thu Jun 29 09:32:25 2006 +0000 added bug number commit e075935572b3ef0a246aaefde50efadbfa12e5c4 Author: Adam Dickmeiss Date: Thu Jun 29 09:10:28 2006 +0000 Store Zebra libs in /lib/idzebra and modules in /lib/idzebra/modules . commit 5ceb96687dc82a78d6beba7f066c37abb0cd2bd5 Author: Adam Dickmeiss Date: Wed Jun 28 22:50:50 2006 +0000 Minor spell fixes commit ef5199a63950bf2b30862803e13305b54e96bb07 Author: Marc Cromme Date: Wed Jun 28 21:55:56 2006 +0000 updated debian package files to se idzebra-2.0 dirs we might want consider renaming debian packages to idzebra-2.0-something instead of idzebra2.0-something, as there are still problems in the /usr/share/doc/idzebra-2.0-doc dir, which comes from the package idzebra2.0-doc .. commit ae563ab622b982c7f9cfb2a92c13cb417566e0c5 Author: Adam Dickmeiss Date: Wed Jun 28 21:55:10 2006 +0000 Set IDZEBRAINC and IDZEBRATAB according to new install layout. commit 4f11f342b0d38977160e5afd4637efad853f353b Author: Adam Dickmeiss Date: Wed Jun 28 21:45:06 2006 +0000 Install hooks puts versions for all bin_PROGRAMS programs. commit 05f79d037c5d464d9edd2659195d596071d7da5d Author: Adam Dickmeiss Date: Wed Jun 28 21:40:47 2006 +0000 Remove no longer needed comments commit 793cf3d1c05dc8e2d971b1c6f233589b0473864a Author: Adam Dickmeiss Date: Wed Jun 28 18:19:32 2006 +0000 Fix make distcheck . commit 3e61994433eac158b5d087f3cedaddaf03b06620 Author: Adam Dickmeiss Date: Wed Jun 28 13:26:13 2006 +0000 Build shared libraries by default. Installing various man pages and programs with suffix -2.0 (PACKAGE_SUFFIX), to enable multiple versions installed at the same time. commit 3ef0c861c68e520a9a1cb0fa523251a2d3d739ee Author: Adam Dickmeiss Date: Wed Jun 28 09:40:17 2006 +0000 Fixed bug #619: @not searches results in bad memory reference. commit 54bf7dc88056fa2a813786e72dfea55b7c0e3e40 Author: Adam Dickmeiss Date: Wed Jun 28 09:39:34 2006 +0000 Added test cases for @and, @or, @not including bug #619. commit b61682c79e8311e1ec73d22872a56ff934c9b249 Author: Adam Dickmeiss Date: Wed Jun 28 09:38:17 2006 +0000 Log if pqf parsing fails commit db3c7cdcbbb9b943aa180159d016e997f5d2f175 Author: Marc Cromme Date: Tue Jun 27 13:42:20 2006 +0000 more upgrade changes documented commit 2a793a2ad3c0864d9654be660da329dd34dd44f6 Author: Marc Cromme Date: Tue Jun 27 12:37:43 2006 +0000 document another upgrade snatch commit 95283c5c6fcd51a57d71649d65b4f2196c655a4f Author: Adam Dickmeiss Date: Tue Jun 27 12:24:14 2006 +0000 File lock fixes for Windows commit 2ae72487ef112b855407623eb4e37d73d1d0b99d Author: Marc Cromme Date: Tue Jun 27 12:07:05 2006 +0000 upgrade instructions from Zewbra 1.3 commit bd3a317131488141726cedfba9f86b9e479c5385 Author: Adam Dickmeiss Date: Tue Jun 27 11:56:28 2006 +0000 Bug #529. On Unix, combine pthreed locks with file locking because file locking is per-process only. On Windows use file locking, because that seems to be work per-thread. commit e92856ea4fecc1a5ea6875ad47797d462fd5fcae Author: Marc Cromme Date: Mon Jun 26 15:11:19 2006 +0000 preparing release 2.0.0 new debian/changelog debian/rules moved debian/*.install files corrected so-numbers of shared libs removed danbib filter stuff commit 3f97d3b682ee70a2b523b67153a83e9545d1b610 Author: Marc Cromme Date: Sun Jun 25 21:54:03 2006 +0000 added few comments commit 105e2d14529d13a05ac9723daf0640e81a1b71c0 Author: Marc Cromme Date: Sun Jun 25 21:08:14 2006 +0000 added i686 platform commit 92e6edd8ee7ab998fe525ade78ae7859533bdd56 Author: Marc Cromme Date: Sun Jun 25 21:04:49 2006 +0000 updated debian installation instruction commit 1ab2e1e0d6f2aa60baa5195b0a313f689d4c1027 Author: Marc Cromme Date: Fri Jun 23 13:45:41 2006 +0000 added examples fo phrase and word search commit 1ae4d572640ac104c00f8306beed27b3a0bcfe3b Author: Marc Cromme Date: Fri Jun 23 12:41:14 2006 +0000 typo commit 7bf9055a2f98663195d1c72f5cfd4cd7617920d9 Author: Marc Cromme Date: Fri Jun 23 12:40:33 2006 +0000 section on relation attributes added commit cb1402d1cc3fdc321a04a891c04b13cf9747ae0d Author: Adam Dickmeiss Date: Fri Jun 23 11:21:38 2006 +0000 Get of of searchtype=always. Instead deal with always matches in numeric_relation/string_relation code. commit ba642ea21a324bc06ce2b892b9940a5d61e7e02d Author: Marc Cromme Date: Fri Jun 23 11:12:07 2006 +0000 added section on mapping of string/xpath/internal indexes, added discussion of completeness attributes commit 963f6ae94a0fddbf19740d932fff79b43b2d8f0f Author: Adam Dickmeiss Date: Thu Jun 22 23:06:06 2006 +0000 Align code for regular word search and numeric search a bit. Introduce defines in a few places. commit 9d5bfe73fd06d99c306f91860a322aece5b6f4fc Author: Adam Dickmeiss Date: Thu Jun 22 22:58:59 2006 +0000 Fixed leak in rset_dup. It leaked rs->control handles. commit 07bf224c54711e9b9fb09344ba2da0f02c6f67ab Author: Adam Dickmeiss Date: Thu Jun 22 15:44:44 2006 +0000 Using wrbuf for internal X-Path string. Fixed uninitialized var with new alwaysmatches code. commit 6684933a7dbf61609c4c4a1db1ebb8d80169ad05 Author: Adam Dickmeiss Date: Thu Jun 22 15:07:20 2006 +0000 Indexing system change. Introduced new index category type zinfo_index_category_t which is used to properly distinguish between index (normal index,), sort, alwaysmatches index, and anchor (to be implemented later). Also added support for proper alwaysmatches relation for X-Path searches. Bug #617. commit 997db1975fa2132c9bb155b69c86f1310f5136b4 Author: Marc Cromme Date: Thu Jun 22 14:01:55 2006 +0000 zebra specific stuff split into advanced section added section on completeness field tested and verified all PQF examples commit 6660da7da58c0cba7336a97394577a432058b9e4 Author: Adam Dickmeiss Date: Thu Jun 22 09:48:08 2006 +0000 Added support for alwaysmatches on regular indexes. Is enabled on a register type basis. i.e. w,p, in default.idx. Bug #616. commit 8d4fd86574ab7de92b916c99073550348eb778f1 Author: Marc Cromme Date: Wed Jun 21 13:32:33 2006 +0000 added section on idxpath query model commit 4f8a19742e1f4ddb422fa515ff9c3f1d37e5641f Author: Marc Cromme Date: Wed Jun 21 13:29:08 2006 +0000 added idxpath.att attribut set definition file commit ffcbfbe43d27ba4e07f4323d73f17660be5ee2b2 Author: Marc Cromme Date: Wed Jun 21 13:14:26 2006 +0000 added idxpath attribute set definitions commit 3105dee95d21fffa0e2f9249c5827690d9d3e155 Author: Marc Cromme Date: Tue Jun 20 14:20:50 2006 +0000 added section on named result sets, and section on scanning inside result sets commit d2f556b08050918081e72d18c73b817b9f41aaf9 Author: Marc Cromme Date: Fri Jun 16 12:54:55 2006 +0000 added section on explain, search, scan and on PQN commit fa91adf8d4d03f1b04c2ad3e4be9bc9a487e9a51 Author: Marc Cromme Date: Fri Jun 16 10:30:12 2006 +0000 pretty-formatting tables, internal links veriefied, a little more text commit d9971fa46bc2da8b2c89c2d6d5619849907ac34c Author: Adam Dickmeiss Date: Fri Jun 16 08:59:59 2006 +0000 Ignore ChangeLog commit 0002d3ccff37e5598553683e95714ca5711f05e8 Author: Marc Cromme Date: Thu Jun 15 13:41:49 2006 +0000 additional information on zebra functionalities and attribute lists added commit f5497e3c3bcee00bc10b576506b5d7901bb7b3bd Author: Marc Cromme Date: Wed Jun 14 13:57:45 2006 +0000 XML sanitize new text commit 6d074f35cdc58c223a2f0e4c7ee9d9be5d47ddfb Author: Adam Dickmeiss Date: Wed Jun 14 13:44:15 2006 +0000 More notes about query model. commit 3d60205d934852596d8939b4db1114ec53a9d2f4 Author: Marc Cromme Date: Wed Jun 14 12:20:06 2006 +0000 added extra information on zebra extentions to the bib1 attribute set model commit 1387aa486156772f1008173fd23bade59b15655a Author: Adam Dickmeiss Date: Tue Jun 13 20:09:54 2006 +0000 zvrank no longer part of dist commit dbce572a22c976629901309fe6c274016a4b06ce Author: Adam Dickmeiss Date: Tue Jun 13 20:04:38 2006 +0000 Cast size_t to long for printf commit 59638a3f3df5f99b95d620d87310c04dd78f7633 Author: Adam Dickmeiss Date: Tue Jun 13 20:04:15 2006 +0000 Dont case to size_t when it is an int commit c20b200f539b64303b72e0bf321156772a3d8ac9 Author: Adam Dickmeiss Date: Tue Jun 13 20:03:33 2006 +0000 Revert. Use int for record length (for retrieval) commit 19802492f4d1e43ac9d476a549b47e8263878773 Author: Adam Dickmeiss Date: Tue Jun 13 19:45:14 2006 +0000 Fixed length modifier for prints. commit 7f417885b90eff084fc83be569b98e30dad4a056 Author: Adam Dickmeiss Date: Tue Jun 13 19:43:42 2006 +0000 Fixed a couplr of prints of size_t commit 7ba3e305d83b2caf9ba94df22638c8c9fbddd934 Author: Adam Dickmeiss Date: Tue Jun 13 19:42:04 2006 +0000 Use size_t for record length (for retrieval) commit 75fe75c4ae6a1d4c0c6078e3cded9ad1a70d487e Author: Adam Dickmeiss Date: Tue Jun 13 19:40:18 2006 +0000 Changed several yaz_log calls which prints off_t value. commit 0f4bdf991e08230bedd2e19449ce544e3660242a Author: Adam Dickmeiss Date: Tue Jun 13 15:23:03 2006 +0000 No longer needed. commit 3555e8a7c6794d0fe6dba314f570013e44947acf Author: Adam Dickmeiss Date: Tue Jun 13 15:10:43 2006 +0000 Use shell mode for configure.ac and idzebra-config.in commit 6ee199cf614c4e680d1456783c1908fe5684a7d3 Author: Adam Dickmeiss Date: Tue Jun 13 14:50:39 2006 +0000 Fix year commit de79197bd3ee5ef00d6d6353ef4f83d035fe4e1c Author: Adam Dickmeiss Date: Tue Jun 13 14:25:32 2006 +0000 Re-indent. Abort if YAZ is not found. Remove messages about how to run make. commit 130159571956e4a73c7259e2473ae1ebc6f5c7eb Author: Mike Taylor Date: Tue Jun 13 14:22:45 2006 +0000 New commit f3b9f5e6291ec8a4d29a379914ad875ec4872adc Author: Adam Dickmeiss Date: Tue Jun 13 14:11:20 2006 +0000 Do not abort configure if no --enable-mod-- is given and the module can not be enabled (bug introduced in 1.14 of configure.ac). commit 558bf94a5f36eb89b0ca7ac4780b641da852c36b Author: Marc Cromme Date: Tue Jun 13 13:45:08 2006 +0000 added a lot of info about attribute sets, PQF query structure, and string use attributes commit 8b21c0028a137ae87201c1f4334879dabb23bad7 Author: Adam Dickmeiss Date: Tue Jun 13 12:03:58 2006 +0000 Bump to version 1.4.1. commit b88909df16157ed1e7859bc3fad6b01520d4865e Author: Adam Dickmeiss Date: Tue Jun 13 12:02:02 2006 +0000 Disable X-Path indexing for explain records (in the case where explain.abs is missing). Make extract module log to log level "extract". Rename buffer_extract_record to zebra_buffer_extract_record. commit fcd2a635a412152b942200396471eb0545199c9c Author: Adam Dickmeiss Date: Tue Jun 13 11:45:07 2006 +0000 Fix attset so that it points to explain.att commit a4d2f62568bcf788630502fc1cbcad1163d3f87a Author: Marc Cromme Date: Tue Jun 13 09:26:59 2006 +0000 added chapter on query model, PQF, bib1-attribute sets. Much documentation still needed on these issues commit c6805b31fe5b18364344f39afb062bc220eea69a Author: Marc Cromme Date: Tue Jun 13 07:52:15 2006 +0000 removed entry of not-needed XML file commit fc11759bf7f7438bbbcda73a16eb7e6a348ac6e5 Author: Adam Dickmeiss Date: Mon Jun 12 23:46:21 2006 +0000 Abort configure if filter is enabled and depending libs are not present. commit dac659f8177c69d846346bebd56f1f367fb58465 Author: Adam Dickmeiss Date: Mon Jun 12 23:44:39 2006 +0000 Remove unneeded message. commit 076760fe655177de4ffc5a265e3155965bf0e9b6 Author: Marc Cromme Date: Mon Jun 12 12:07:53 2006 +0000 updated link to The BIB-1 Attribute Set Semantics commit 95bb55fadc3ff69e78e6a61b2096f1326979424b Author: Marc Cromme Date: Mon Jun 12 11:59:11 2006 +0000 spelling checked commit 99de02ebfebd28b230dd2ee76544919266086043 Author: Marc Cromme Date: Mon Jun 12 11:48:24 2006 +0000 extended discusson of how ranking works commit 53f91ef0ea7d588a26e90bf87ad46bdb84938d6f Author: Marc Cromme Date: Mon Jun 12 09:39:17 2006 +0000 removed non-functional ZVrank algorithm for ever. Removed description in documentation. commit 72c776b15ed8f48acb406c9a543bd808b3cfc5a3 Author: Marc Cromme Date: Mon Jun 12 09:27:00 2006 +0000 added makefile entry fro examples/marcxml commit bfaed8583b3284230b88624e7f8e849cdb48a703 Author: Marc Cromme Date: Mon Jun 12 09:12:13 2006 +0000 added alvis filter marcxml config in dist tarball commit 0b01ca54972ce3219d33cd92a8e5fc6a9ab78f6a Author: Marc Cromme Date: Fri Jun 9 20:46:38 2006 +0000 reduced example XML size, tweaked indexing rules, added display XSLT sheet for zebra internal info commit ac3392a1ff953eab99ccae78ea075db2544ba8f4 Author: Marc Cromme Date: Fri Jun 9 20:07:04 2006 +0000 more rules commit 43d00072633d57366ae57d146950607d834d6239 Author: Marc Cromme Date: Fri Jun 9 13:20:56 2006 +0000 added description of example commit a4b18309b7264800f2f46c996d991e958ba90680 Author: Marc Cromme Date: Fri Jun 9 12:53:18 2006 +0000 indexing example MARCXML working now commit 63dc541893610698aa2de6be16b308c3f74a3186 Author: Marc Cromme Date: Fri Jun 9 12:22:16 2006 +0000 added few indexing rules commit 9d9b1f0baf4c713b5fd6c3d722147a5b65e83860 Author: Marc Cromme Date: Thu Jun 8 10:53:28 2006 +0000 aded record indexing rule - now need to do all seperate indexes commit f4a6bacdb4ec6a7ba64635b1d568a60aa1648426 Author: Adam Dickmeiss Date: Thu Jun 8 10:33:19 2006 +0000 Function data1_path_fopen doesn not call yaz_fopen if profilePath is NULL or "". commit 00893f6b27da02aaebbbb25e7bc859759ccc8642 Author: Marc Cromme Date: Thu Jun 8 10:04:33 2006 +0000 removed commit dd270fdefa829d591999a57081930d32686f94bb Author: Marc Cromme Date: Thu Jun 8 09:35:33 2006 +0000 added MADS stylesheet commit 060faf0d33d68d3f2405ec4512d52026e1e02b31 Author: Marc Cromme Date: Thu Jun 8 09:31:28 2006 +0000 added comments on LOC data commit 1e41847e4cbe9a6aeb009843c9656d4ef4ee2bc1 Author: Marc Cromme Date: Thu Jun 8 09:30:57 2006 +0000 corrected path to xslt stylesheets commit 447e063b2c639b03902f0db46d9eaf5b8edb788c Author: Marc Cromme Date: Thu Jun 8 09:22:58 2006 +0000 alvis marcxml filter records and example config started commit 1c13094529ee6d7129d4152388b86fa6f4363893 Author: Adam Dickmeiss Date: Thu Jun 8 08:30:37 2006 +0000 Require YAZ 2.1.20 or later commit b71255d3820e00decd68f0c1a650e7a7e7181187 Author: Marc Cromme Date: Thu Jun 8 08:28:22 2006 +0000 added 43 example marc21 xml records from LOC commit e1edb06bb88cb52c97073f3600afa2b371cbd1d7 Author: Adam Dickmeiss Date: Wed Jun 7 20:50:23 2006 +0000 Remove grs.csv, grs.danbib, xslt filters from configure commit b2a878e4bf146ab7c0dabe71176daab346c90f0b Author: Adam Dickmeiss Date: Wed Jun 7 18:26:02 2006 +0000 Include manifest for msvcr80.dll. commit 4fd652ea50465c7f90803ddedb7cea37893e372f Author: Adam Dickmeiss Date: Wed Jun 7 14:37:37 2006 +0000 Bundle .manifest files. Use /r for doc stuff (due to doc/common) commit 69b66fb0c3c17f6deca8ede6940355a2512f8957 Author: Adam Dickmeiss Date: Wed Jun 7 14:37:02 2006 +0000 Copy .dll.manifest from YAZ to bin commit 3746a1be699b247ca567fb9cda50cd4504f25928 Author: Marc Cromme Date: Wed Jun 7 13:17:48 2006 +0000 correcting typo's commit ba673549208d47aff1fdec9cf23455dbb1aadfc8 Author: Marc Cromme Date: Wed Jun 7 13:10:19 2006 +0000 honing text on classic explain with fully worked yaz-client examples commit 08ba6b946fdd92b78ac2ee6712281c96cd712335 Author: Adam Dickmeiss Date: Wed Jun 7 11:20:03 2006 +0000 Bundle with Visual Studio 8 CRT by default commit a6ace1fb9f08fa495c63089d30efba63383af849 Author: Adam Dickmeiss Date: Wed Jun 7 11:02:06 2006 +0000 Ignore my.LCK which is generated by test tstflock.c commit 4db0bb7728a6e795e802429af7e52f2b9ae51f68 Author: Adam Dickmeiss Date: Wed Jun 7 11:00:46 2006 +0000 Fix log of zint type commit afa71e9ea1ff3707654936324c30703a618852ff Author: Adam Dickmeiss Date: Wed Jun 7 10:50:08 2006 +0000 Changed some types from int to zint + added a few casts commit 0af00389d43835ef54928dc22f7d34ae30f3c723 Author: Adam Dickmeiss Date: Wed Jun 7 10:14:39 2006 +0000 Use CAST_ZINT_TO_INT in some places, so we can easily spot casts commit fa33f4e91645cc757624b7b237cbd4fdf5bd8d18 Author: Adam Dickmeiss Date: Wed Jun 7 10:01:11 2006 +0000 For VS, define _CRT_NONSTDC_NO_DEPRECATE commit 665a6196710aa7e3bcc570c083f353d756cb0a8d Author: Adam Dickmeiss Date: Wed Jun 7 07:50:58 2006 +0000 Make ChangeLog as part of make dist commit 27742a4ea82e9b3494c166203b06d1d7c48da923 Author: Adam Dickmeiss Date: Tue Jun 6 21:01:30 2006 +0000 Removed rsbool_create_and, rsbool_create_or because they are no in use. Renamed rs_create functions to rset_create_. commit 9e9edbbacba71cd3143eeb3df849121e021d8805 Author: Adam Dickmeiss Date: Tue Jun 6 09:46:52 2006 +0000 Removed xslt+danbibr from win makefile commit c9454ba7556b581f6fabd13946dc183d073c0795 Author: Adam Dickmeiss Date: Tue Jun 6 08:55:22 2006 +0000 Added some information about "classic" Explain. commit 05f31b27a8b7d81cfd3e9767ad2c2b58771bc142 Author: Marc Cromme Date: Fri Jun 2 13:55:55 2006 +0000 removed grs.danbib filter removed grs.csv filter removed xslt filter all unused and dead code commit 7c3637ab5bd6e3d366eb25296ac4ece396208926 Author: Adam Dickmeiss Date: Fri Jun 2 10:59:53 2006 +0000 Revert commit 43e4790905f0b4e56ecb2f28adab19dd1f1cc3e1 Author: Adam Dickmeiss Date: Fri Jun 2 10:59:21 2006 +0000 Dont generate xsl.in files commit 955088a6aebab75451286ddbf0ad3fa6a33982ac Author: Adam Dickmeiss Date: Thu Jun 1 13:10:16 2006 +0000 Reformat commit de8f6928dbda1d5622e59429bd7bf4d494c25af2 Author: Adam Dickmeiss Date: Thu Jun 1 13:05:52 2006 +0000 Fixed bug in r_open (isam:s) commit 4494cb5dd6d79d72f15c41af16833cc373044a36 Author: Marc Cromme Date: Wed May 31 16:11:58 2006 +0000 removing the XSLT filter from the build, only keeping the ALVIS filter commit 207705c3267eca038937df8a915e44b66b2ea711 Author: Adam Dickmeiss Date: Tue May 30 23:08:29 2006 +0000 Let configure generate doc/local.ent rather than doc/zebra.xml . Update doc/Makefile.am to use _COMPILE definitions. commit 76ef1248858c492953d506a970ac12e74a29f712 Author: Adam Dickmeiss Date: Tue May 30 22:03:13 2006 +0000 Update sort test to use the missingValueAction = 'abort'. commit 9ceac3e96fe083b93b6fd4a676003dd10482e465 Author: Adam Dickmeiss Date: Tue May 30 21:41:35 2006 +0000 Fixed bug #597: Support null missing key for sort. Reject type missingValueData which is unsupported. commit bb4eac07c552975c048b3c3d373b549681376e80 Author: Adam Dickmeiss Date: Tue May 30 13:44:44 2006 +0000 encode_info moved from index.h to extract.c and simplified commit fc83d98d346711f446d9f9a29cc2ff0eee398053 Author: Adam Dickmeiss Date: Tue May 30 13:21:13 2006 +0000 Change return type for a zebra_add_record + zebra_repository functions to be ZEBRA_RES rather than int. Split code in index/trav.c into two. commit 98d7e1e7378345d4d6b8b547ba25f2f0801b1a46 Author: Adam Dickmeiss Date: Tue May 30 13:06:35 2006 +0000 Show iteration number if t15 fails commit 836127b305396d4491bfadf245929cf60e5b5036 Author: Mike Taylor Date: Tue May 30 09:56:47 2006 +0000 Ignore generated htmlhelp.hhp, toc.hhc commit 8de067c78a432ef4fa197fa8240d2aa6d04ff99c Author: Marc Cromme Date: Mon May 29 13:48:43 2006 +0000 made place for record delete commit b1cd24579e181eb399c977fb59ddfdd22a5bc03e Author: Mike Taylor Date: Mon May 29 08:28:19 2006 +0000 Ignore tstflock commit b5e0f092ff4326645b09ddcac88da36008572304 Author: Adam Dickmeiss Date: Wed May 24 19:12:46 2006 +0000 Documentation for now based on Docbook XML/XSLT using xsltproc + Norman Walsh's stylesheets. It means that the CVS version of Zebra is no longer depending on jade/openjade or docbook-to-man scripts. PDF is no longer part of the distribution - but can optionally be made using DSSSL/jadetex or FOP. commit c7c5c02116d3bea4c011bb967d687c852223f555 Author: Adam Dickmeiss Date: Wed May 24 19:10:18 2006 +0000 Depend on Tcl 8.4 instead of Tcl 8.3 commit 66eb724d4e68e942529f4d356daa8b888a51d8c0 Author: Adam Dickmeiss Date: Wed May 24 18:31:33 2006 +0000 Fixed bug #594: Zebra pollutes XSLT output? For alvis and xslt filter we are using xsltSaveResultToString instead of xmlDocDumpMemory. commit 1722bbb1db5ba2b1cf096388cf3206863ae0a203 Author: Marc Cromme Date: Wed May 24 12:56:56 2006 +0000 corrected logical error in finding indexation stylesheet commit a92a4f15b3e570c055590166ae91f497e61cd949 Author: Marc Cromme Date: Wed May 24 08:23:01 2006 +0000 returning default schema name or identifier when no element set is specified commit a23d731a11b2451e011c1b856725a08148482af5 Author: Marc Cromme Date: Tue May 23 15:21:58 2006 +0000 added support for default retrieval schema other than indexing schema commit 1f6534eb1702e5c48071e7b54fe0eee29cabd35c Author: Marc Cromme Date: Tue May 23 10:04:43 2006 +0000 updated with YAZ info commit b8d5d7476807b64d1c197efd9710cd4f5291152c Author: Marc Cromme Date: Tue May 23 09:41:06 2006 +0000 added items to configuration display and instructions commit 296574b8e825da3594047d8d63c9639d90866047 Author: Adam Dickmeiss Date: Mon May 22 13:28:00 2006 +0000 Fixed bug #454: Indexing with grs.regx much slower than version 1.3.32. The hash function in the record key management system was improved and the hash size was increased. This make this sub system approx 10 times faster as far as gprof is concerned. There _is_ a bigger overhead with the 64-bit keys over Zebra's 32-bit keys, but not much. commit 4b4ea60e30c8a36a9f9a516f19e61b721a16a21f Author: Adam Dickmeiss Date: Mon May 22 11:43:32 2006 +0000 Ignore register and shadow commit e7cf9381a4b902cb2b91053f80ab7899b7d5bb00 Author: Adam Dickmeiss Date: Fri May 19 23:45:28 2006 +0000 Remove local attribute handling and other dead code. commit 1369748dd7899789c97d94801048bf942e0cc6e6 Author: Adam Dickmeiss Date: Fri May 19 23:20:24 2006 +0000 Furhter code reductions because of string attributes commit 68df4151853ed44cb353f8a03c97822423284d6a Author: Adam Dickmeiss Date: Fri May 19 17:33:18 2006 +0000 Use new YAZ logging calls (YAZ_USE_NEW_LOG) commit c52a452864725d5f43a9b1fe0d43d57fa24d1bf0 Author: Adam Dickmeiss Date: Fri May 19 17:28:55 2006 +0000 added zvrank again commit 000ca905dd979786affbd458fec90dde19207de7 Author: Adam Dickmeiss Date: Fri May 19 17:28:11 2006 +0000 added ranksimilarity, removed zvrank commit 6ba9698e88c0283e40fa5980a1a6b551fff2d597 Author: Adam Dickmeiss Date: Fri May 19 13:49:33 2006 +0000 Zebra uses string attributes for indexing internally. Using set+numeric use attribute can still be used. But that is a search-only conversion which inspects .att-set files as indicated using attset-directives in zebra.cfg. attset references are no longer required, but when used they deserve as "check" for that the index names used are also present in .att. commit f7a3769dede0071696bdcc13ae2ee1efe6d52d96 Author: Adam Dickmeiss Date: Thu May 18 12:03:05 2006 +0000 Sort Keys are stored using the reckeys_t structure. sort files are named with the ordinal value (index ID) , rahter than use-attribute. This patch ease the move towards string indexes everywhere. commit 388742fccf1ecb74c539c70fd1ac7f15f329932a Author: Adam Dickmeiss Date: Wed May 17 17:46:44 2006 +0000 Implemented bug #588: allrecords search. Using @attr 1=allrecords "" matches all records in a database. commit df31b471baecad084d39999ee31fbb98485448ca Author: Mike Taylor Date: Wed May 17 14:12:56 2006 +0000 Fix mistake: fuzzy matching is 5=103, not 5=102 Add truncation.regexp, 5=102 commit 1d94ccc48442dc0b08cbc6db585b9ecab261e1ba Author: Marc Cromme Date: Thu May 11 10:26:13 2006 +0000 changed API to get terms and docs in fields commit 6e17288c2f2ab204c9163df01b95f20cd171e592 Author: Adam Dickmeiss Date: Thu May 11 10:15:33 2006 +0000 Make two functions to get term/doc occurrences rather than one. commit 3042550d9340f8f9e3058702240e2cd376aa33fa Author: Adam Dickmeiss Date: Wed May 10 14:13:45 2006 +0000 Check size of off_t and adjust printf format accordingly. commit b26d8949b70912ac2e6852abe543890c5cb01c79 Author: Adam Dickmeiss Date: Wed May 10 13:54:01 2006 +0000 Fix printing of match string in updating code commit 24031af43eeb85eb33b0c208ee6c6b02144cb799 Author: Adam Dickmeiss Date: Wed May 10 13:46:55 2006 +0000 Fix bad init of zebSUInfoB node commit 54ddb0c5a3a8157235271665cd874576e656eed4 Author: Adam Dickmeiss Date: Wed May 10 12:31:08 2006 +0000 Added code which maintains number of term occurrences and document occurrences for an index. commit cdcde0c689ec4b66f1884dbd455284b7a35fb425 Author: Adam Dickmeiss Date: Wed May 10 12:30:02 2006 +0000 Fixed rec_cp. Did not copy the 0-termiante info buffers commit 2c120c0d1353589746ea7000646970fc13814e3d Author: Adam Dickmeiss Date: Wed May 10 09:11:22 2006 +0000 No more experiments with combined sh libs commit 3ffa2e910d57f2842c7e9ed12b3f60d24e187826 Author: Adam Dickmeiss Date: Wed May 10 09:08:55 2006 +0000 Optimize zebraExplain_lookup_attr_{su, str} by using a impementing a move-to-front stategy. commit ecb3935e78cd9bcfdebafdee0834cfb1060d7b5e Author: Adam Dickmeiss Date: Wed May 10 08:13:17 2006 +0000 Put local variables footer in all c, h files. commit 0923abfae0f509e33ce05bcd88195ea8dd735f9f Author: Marc Cromme Date: Wed May 10 07:54:41 2006 +0000 changed comments commit 3168ab325caf86d3bac38c33f7d3b701d1110539 Author: Marc Cromme Date: Tue May 9 11:31:37 2006 +0000 added sysno and matchStr (if exists) to logging of add/update/delete indexing operations on files commit 7faa9bb89d27160c17979a21156885539d4f9dcf Author: Adam Dickmeiss Date: Tue May 9 10:46:56 2006 +0000 Fixed bug #576: Regexp-2 search misses hits. Problem was that init_pos was always set to 2. And the ordinal encoded prefix might be of length 1. Hence the first character would not be part of regular expression _with_ errors. commit 9b7dbbec2a6a910a2883ea3da5e6136e9240f820 Author: Adam Dickmeiss Date: Tue May 9 08:12:22 2006 +0000 Remove unneeded debug logs commit b51ecd6583f18202c633b256a861d94bd485ec2e Author: Marc Cromme Date: Mon May 8 14:03:16 2006 +0000 added spots for missing statistics: size_docs_field no_docs_field no_docs_database size_docs_database no_terms_field commit 2fe33cc7dd66b25bdcb4708b1991a5b5a2496e07 Author: Marc Cromme Date: Mon May 8 12:09:49 2006 +0000 added doxygen rules make dox make showdox commit 6c4788f3ebc354ab79c7477cf66a7b6a3e26c5c2 Author: Marc Cromme Date: Mon May 8 10:09:07 2006 +0000 added hit count in ressultset corrected yaz logging which complained over wrong types on ADM 64 commit 3af041405bbd3f60e04434fe182ea1a9012eb744 Author: Adam Dickmeiss Date: Fri May 5 17:19:38 2006 +0000 For buildconf.sh -d, add -Wdeclaration-after-statement commit 8407158947485c3897c8232bf5a1f4501eb5e710 Author: Adam Dickmeiss Date: Fri May 5 17:18:50 2006 +0000 Avoid declaration after statement commit a11eb314509b40582a1c44450e540aa2defee325 Author: Adam Dickmeiss Date: Fri May 5 13:17:34 2006 +0000 Log when a file is opened using data1 system commit 4358b098c7cb6adc62f6ada9f513555cee2f921c Author: Adam Dickmeiss Date: Fri May 5 09:15:11 2006 +0000 Added two YAZ_EXPORTS commit 30bb91a2915de98455a8f7a5af5c087239f22203 Author: Adam Dickmeiss Date: Fri May 5 09:14:02 2006 +0000 Implement functions to get register usage statistics: mf_area_directory_stat, bfs_{register,shadow}_directory_stat. commit af0296d15d13db076eaa1f53a590b75303f6d16a Author: Adam Dickmeiss Date: Fri May 5 09:12:21 2006 +0000 Added prototype recTypeClass_load_modules commit f49130df276ecd0cdc157338da45ae5c46546d3a Author: Adam Dickmeiss Date: Fri May 5 07:34:25 2006 +0000 By default, no searching for loadable modules is performed unless modulePath is defined. commit 8de059a4446c5ad8f95e8090d1dc97f0c2bb8d9e Author: Marc Cromme Date: Thu May 4 10:11:09 2006 +0000 added more statistics to rank function, renamed variables to better names commit 178199283530635a796aec2a90db8f57c1152bb0 Author: Marc Cromme Date: Wed May 3 13:55:20 2006 +0000 added statistics to similarity rank function commit 10491ea09aa727918360fab60c2c3d6b58c70640 Author: Marc Cromme Date: Wed May 3 13:26:12 2006 +0000 added coment on magic number 34 which is sqrroot of 1000 commit 26dbe80fbe19c043db62765b41bcb496c91cbd78 Author: Marc Cromme Date: Wed May 3 09:42:39 2006 +0000 removed emacs trailer commit 746f36f2b12f2a342dc0213cb03458359a493c8f Author: Marc Cromme Date: Wed May 3 09:31:25 2006 +0000 added new ranking function rank-similar in ranksimilar.c moved ranking related declarations from header index.h to header rank.h commit 74c151fd60c07fe3af5d05262086a2c97922d1f3 Author: Mike Taylor Date: Tue May 2 12:55:18 2006 +0000 Completed revision of text. commit b6ff969813b5ac4c0a6b266979469b0cc24201fd Author: Mike Taylor Date: Tue May 2 12:23:02 2006 +0000 Rolling mods to Marc's new ranking prose. (Check in early, check in often, to reduce conflicts if Adam is also working on this. Actually, if he is, and if my checking happens first, then there will still be conflicts but I will have shifted them onto Adam, as whoever checks in second has to resolve the problems. So I should have said that this checkin is in order to shift/reduce conflicts :-) commit ddd6e6bffac75d2671330b14b262a6594212dcce Author: Marc Cromme Date: Tue May 2 08:27:43 2006 +0000 added possibility to display static rank information in output of xslt and alvis filter. Added member staticrank to recRetrieveCtrl. commit 3fbdef96a1c730eb52d1ffbd7c90143fb7168f25 Author: Marc Cromme Date: Mon May 1 13:07:40 2006 +0000 added warning on clash betwen @attr 2=102 and @attr 9= some number commit 8c2a7ff624c3b415f20b1676d7cf15b777941bc2 Author: Marc Cromme Date: Mon May 1 12:59:33 2006 +0000 added section on static and dynamic ranking, versus sorting commit d6d530f5bd06fa69e55acf3c718ef61cc82604de Author: Adam Dickmeiss Date: Mon May 1 08:27:20 2006 +0000 Experiment with combined shared lib libidzebra-all.la. Create two programs zebraidx2, zebrasrv2 using it. commit 0ec1c21af9238b4aab7ae0343ad6476ea79842b0 Author: Adam Dickmeiss Date: Fri Apr 28 18:50:48 2006 +0000 Fix shell test. Use = rather than == (not portable) commit 3f8634ae4b443725ed340661a3a9ccdaae2da92f Author: Marc Cromme Date: Thu Apr 27 20:40:41 2006 +0000 make distcheck works now =============================================== idzebra-1.4.0 archives ready for distribution: idzebra-1.4.0.tar.gz =============================================== commit 6c5eead59b04271013219c4e71b3a1314ced4957 Author: Marc Cromme Date: Thu Apr 27 10:52:26 2006 +0000 bypassing checks when running make distcheck commit 66389dd83548212275fda1dbe09a242c947afa30 Author: Marc Cromme Date: Wed Apr 26 13:27:16 2006 +0000 changed xslt filter to expand config file and xslt stylesheet file names according to profilePath setting in zebra.cfg. Added setting of profilepath in xslt tests to include $(srcdir), thus making make target distcheck succeed for xslt tests. commit 6eede4f6572f495e9363015b336d9e17662a5368 Author: Adam Dickmeiss Date: Wed Apr 26 11:12:31 2006 +0000 Change config function in recType interface to return ZEBRA_RES to signal success/failure. commit 38b4afcb715d0416c75e6f6262bdddbb90832954 Author: Adam Dickmeiss Date: Wed Apr 26 11:08:41 2006 +0000 Copy files rather than symlink commit 6dfee19bc1cec29ff5ec5e9cd8021d1354a6126e Author: Marc Cromme Date: Wed Apr 26 11:03:13 2006 +0000 optimize for C source code commit 072571aaf56ebd387bed8cad5f2cd2ae38333c1f Author: Adam Dickmeiss Date: Tue Apr 25 19:37:21 2006 +0000 Accept NULL value for sysno in zebra_delete_record commit 12c94e36b7e7e423a18d2a8395596859da8f5e9f Author: Adam Dickmeiss Date: Tue Apr 25 13:52:38 2006 +0000 Implemented special retrieval _storekeys_ which returns record keys commit 0381d7dc936e74ac2fb55ad217b760c97ace0d5b Author: Marc Cromme Date: Tue Apr 25 12:26:26 2006 +0000 reverted to Emacs sgml mode commit b81cd7ee4098ebe5770e4f1f7daca5afc9e82956 Author: Marc Cromme Date: Mon Apr 24 13:23:15 2006 +0000 added configuraiton output commit 47054fae00306e75212a26ee5305f00032c99001 Author: Marc Cromme Date: Mon Apr 24 12:53:02 2006 +0000 inserted Emacs nxml-mode in bottom of XML file commit 692f2bbbfb8a6300aeb98a49b358344bee1e5729 Author: Adam Dickmeiss Date: Thu Apr 20 11:08:59 2006 +0000 Removed. commit f328ca1d21fe410bb3c9ecb43879da1669888075 Author: Adam Dickmeiss Date: Thu Apr 20 11:08:55 2006 +0000 Fix dependancy of tkl.xsl commit 8294e92cdecaeeb98bc42ae2bac74bee7f4f08b0 Author: Adam Dickmeiss Date: Thu Apr 20 10:25:17 2006 +0000 Updated to use doc/common (id-docbook-common) commit 551ff541dcd53447e07c9ba95d4792bd4fc14d80 Author: Mike Taylor Date: Thu Apr 13 12:42:57 2006 +0000 zebra_lock_create() now logs an error and returns a null pointer if the lock fails, rather then as previously seggy-faulting on a null indirection. This happens if, for example, you do "zebraidx init" using a configuration that asks for the lock-files to be put into a non-existent directory. commit ecc6478d1369aad1b66e11be682ceb82d78ee21d Author: Adam Dickmeiss Date: Wed Apr 5 02:52:31 2006 +0000 Create register+shadow for t15 commit b8bc024e463e9498e6db70d36fc93dcc5673ba50 Author: Adam Dickmeiss Date: Wed Apr 5 02:52:11 2006 +0000 In zebra_commit_ex handle better the case where bfs cannot be created commit bd58c091d65d69624f6851974ae989376823ca9f Author: Adam Dickmeiss Date: Wed Apr 5 02:11:44 2006 +0000 Renamed fileExtract to zebra_extract_file.. The new function returns ZEBRA_RES. commit e0eb94804d9403aee827c71dfcef5b504881edc9 Author: Adam Dickmeiss Date: Wed Apr 5 02:10:20 2006 +0000 Added ZEBRA_CHECK_HANDLE(zh) which returns ZEBRA_FAIL if handle is NULL. This used in many of the public Zebra functions. commit 8d79127b1f081818d59b1f6119d373d50468ab30 Author: Adam Dickmeiss Date: Wed Apr 5 02:03:33 2006 +0000 Added zebra15.cfg for t15 commit 61080b04dd2fe74b70d413cb31e9197713bb0762 Author: Adam Dickmeiss Date: Wed Apr 5 02:02:36 2006 +0000 Remove mf_unlink_name commit a163e5642ee63cbc14ab2d44eadeb15ed167eaed Author: Adam Dickmeiss Date: Wed Apr 5 02:01:21 2006 +0000 Added check for sys/wait.h commit acb2f01fbd0e885b9654c8125f4437aa810f90df Author: Adam Dickmeiss Date: Tue Apr 4 00:10:09 2006 +0000 Doxygen comments commit 2f53a97bcc937a8cd60bd2fe2a34add196b4f6b4 Author: Adam Dickmeiss Date: Tue Apr 4 00:09:51 2006 +0000 More consistent Doxygen comment usage commit 1a57f931b61684b92a5322e18ee6e4b27a7d8c31 Author: Adam Dickmeiss Date: Tue Apr 4 00:09:00 2006 +0000 Don't exit in dir_open. commit cdc4ddb67d385d188b23c3b9da245d4501264558 Author: Adam Dickmeiss Date: Tue Apr 4 00:03:27 2006 +0000 Added test which reproduces the error with shadow files being deleted "too early. commit 2cced0fc9668eedb5fb19d721ed4aa4c3f9ed371 Author: Adam Dickmeiss Date: Tue Apr 4 00:02:34 2006 +0000 For testlib programs argv[1] holds log level (if given). argv[2] holds log format (if given). Also testlib start up routine deletes (empties) the log file. commit 060a5dbb2b5cf572656bd6513395e52ee103b8f0 Author: Adam Dickmeiss Date: Tue Apr 4 00:00:18 2006 +0000 Fix the way we delete the shadow files after a "succesful" commit operation. The problem with the exising code was that read-only sessions (searches, etc) could "suddenly" miss the shadow files that they read.. commit 2172d9cde5ac3e0f8bf17838aa7b1ac360f87049 Author: Adam Dickmeiss Date: Fri Mar 31 16:02:56 2006 +0000 Missing tst function commit 74fdf8a15af7bb827a256d9df3ecc34a57d2120f Author: Adam Dickmeiss Date: Fri Mar 31 15:58:03 2006 +0000 Use GCC attribute warn_unsed_result for a few of the most important API functions. This allows us to find places where errors are not properly dealt with. All testlib functions are prefixed with tl_.. They usually return 1 for TRUE, 0 for FALSE .. And YAZ_CHECK functions are used in virtually all tests now. commit cc74bd253ed898cd5b94826912cbc1ca1c940387 Author: Adam Dickmeiss Date: Fri Mar 31 08:51:26 2006 +0000 In zebra_register_open, only call zebraExplain_open if all previous calls are succesful (ZEBRA_OK). commit 5168b35eab901a50e5afca1a01b2250c343b97f7 Author: Adam Dickmeiss Date: Thu Mar 30 18:00:51 2006 +0000 idzebra.m4 moved to sub directory m4 commit ebcf2ad410ec9196eee698f021a1bfd6057bdc25 Author: Adam Dickmeiss Date: Thu Mar 30 09:52:15 2006 +0000 Add extra argument to zebraExplain_lookup_ord so that we can get string based index back. Provide example of the printing of this in rankstatic.c. commit 074e63e27b02896c927606ce5bb324a55613dd31 Author: Adam Dickmeiss Date: Wed Mar 29 10:43:23 2006 +0000 Fixup data1 tags which makes XML non-wellformed.. This effectively but not elegantly fixes records produced by the grs.marc filter. If a tag t is bad, it is changed to from to . commit bfd4dd0d44c779d699f7a1b32e72744733f02caf Author: Adam Dickmeiss Date: Wed Mar 29 08:38:45 2006 +0000 Fixed bug #549: Typo in makefile WRTP alvis filter commit 87b857f34ce8fb0af15a4b7f1becb5a54cec3ab7 Author: Adam Dickmeiss Date: Tue Mar 28 17:03:55 2006 +0000 Move to automake 1.8/1.9 commit 23bca0017111f1c9408386f6363d70e689f313ac Author: Adam Dickmeiss Date: Tue Mar 28 12:39:07 2006 +0000 Allow no default.idx at all. Make zebra_maps_read_file public. commit ac300df2169e3dcbdf9ab726349925cc3a122028 Author: Adam Dickmeiss Date: Sun Mar 26 14:17:01 2006 +0000 Get rid of unsed variable active in struct zebra_register. Avoid use of exit in recindex functions.. Use ZEBRA_OK/ZEBRA_FAIL signal instead. commit 510c122aceb2b7a3ec12a6be3de610f0ff470ae4 Author: Adam Dickmeiss Date: Sun Mar 26 14:05:19 2006 +0000 Fix zebra_maps_open not to leak if default.idx cannot be found commit 07daef4fb241a9106fb995bb87a823708babcb10 Author: Adam Dickmeiss Date: Sun Mar 26 14:03:18 2006 +0000 Return error (0) rather than exit for bad dict header (magic) commit 6d3b83ae7e008f2d61326051b03f7f07d3cc2ef0 Author: Adam Dickmeiss Date: Sun Mar 26 14:02:49 2006 +0000 Allow dict_close of 0 pointer commit 06d303953b0bc8b2e97212f6f3a5bf46b4e954b5 Author: Adam Dickmeiss Date: Sat Mar 25 21:18:09 2006 +0000 Fix logging of record type commit ae9b4cc8fdea88c54753b50e30ef6ba58077c2d1 Author: Adam Dickmeiss Date: Sat Mar 25 21:17:40 2006 +0000 Use grs.sgml rather than grs.xml in test t13 commit 66291dd47d5d44e4af1e3f9b1158bd5c6a32f0c3 Author: Adam Dickmeiss Date: Sat Mar 25 15:34:07 2006 +0000 Using yaz/test.h. Test for zebra without config commit f1ec926159c7559f181e7be8dbc9276b9e75f739 Author: Adam Dickmeiss Date: Sat Mar 25 15:33:43 2006 +0000 Using yaz/test.h commit 620f52e2409924d81f740001b9de6077f933cb52 Author: Adam Dickmeiss Date: Sat Mar 25 15:33:29 2006 +0000 Minor leak fixes - in case if zebra_register_open fail. commit c7e31a7e62b9328d0753a4da4c46493bedec20e3 Author: Adam Dickmeiss Date: Sat Mar 25 10:06:55 2006 +0000 Make log_level static commit 9426a55fbae4e19d123946f15fbf9ee4b03ead3d Author: Adam Dickmeiss Date: Fri Mar 24 13:33:57 2006 +0000 Fix windows logging .. Call _locking repeatedly .. Becuase Windows gives up locking after 10 seconds. Bug #529. commit e083eb5af2d518ebdaa35911561b9f663b5e325f Author: Adam Dickmeiss Date: Thu Mar 23 20:40:31 2006 +0000 Make variable static rather than public commit 966aaa6c44c0c446a766bb75f643e37d34b2a099 Author: Adam Dickmeiss Date: Thu Mar 23 20:38:00 2006 +0000 Added a few log calls in flock util commit 85baa2f829cd740862eb6248fb2bde6553e6989f Author: Adam Dickmeiss Date: Thu Mar 23 17:50:17 2006 +0000 Minor commit 2c3c2214cd279df3cbfd230448a35e91e6caa390 Author: Adam Dickmeiss Date: Thu Mar 23 17:32:03 2006 +0000 Refactor tests for WIN32/pthread commit ce6df1eaab07d33544975ffe67a4b7a231cf795a Author: Adam Dickmeiss Date: Thu Mar 23 12:07:12 2006 +0000 WIN32 flock test commit 1f021d94022e3b8d510bc1e63f286656935e880e Author: Adam Dickmeiss Date: Thu Mar 23 12:06:37 2006 +0000 Export flock functions commit 23c386f2b4511acfdb389adc7f48f15d284c639c Author: Adam Dickmeiss Date: Thu Mar 23 09:15:24 2006 +0000 Moved file locking utilities from index/lockutil.c to util/flock.c and definitions in include/idzebra/flock.h. commit a93ffbc5bd917ade607d1d6960b1ecb26f621ec2 Author: Adam Dickmeiss Date: Thu Mar 23 09:13:47 2006 +0000 More interesting case using recordId commit cf74a32bc8f34221e85c56411c141923405269e9 Author: Adam Dickmeiss Date: Tue Mar 21 14:36:22 2006 +0000 Safari filter uses register type 0 (raw). commit 3c37091eb3e508bff58b297eaa0feab5e92ff53b Author: Mike Taylor Date: Mon Mar 20 15:17:30 2006 +0000 Fix printf()-format mismatch error, %d/zint. commit 28d9bda2734f323dafccfd07422e36b65b6487f1 Author: Mike Taylor Date: Mon Mar 20 09:41:08 2006 +0000 List more required packages. commit 1159610ba48547a9af5275cbfb7df457b58a5b0c Author: Mike Taylor Date: Mon Mar 20 09:30:13 2006 +0000 Documentation only. commit 4e48a2f759ac1e7224f00d7c091bb840885cf7d2 Author: Mike Taylor Date: Mon Mar 13 17:42:09 2006 +0000 zebra_register_open() now fails if zebra_maps_open() returns a null pointer. commit 6acd2e140d59433a002f2f1890cb4a6e25895c68 Author: Mike Taylor Date: Mon Mar 13 17:40:28 2006 +0000 The static function zebra_map_read() now takes an additional boolean argument indicating whether it should fail fatally if a reqeusted file is absent. zebra_map_read() now has a return value: 0 if OK, -1 on failure. zebra_maps_open() now returns a null pointer on fatal error. commit c73cdef608e23dc827647fb5d3e69822f4614467 Author: Mike Taylor Date: Wed Mar 8 10:47:37 2006 +0000 Comments on ZeeRex. Remove extraneous vertical space in sections. commit c4e7ef61ea4e05dc00cdaa2b1540986b4e84b505 Author: Marc Cromme Date: Sat Mar 4 21:39:20 2006 +0000 added additional explanations on record aupdate parameters commit 7b149568c78c6a73915e282ef10edc95171e66fd Author: Marc Cromme Date: Sat Mar 4 21:07:57 2006 +0000 added seb's nice PHP extended service code snippet commit 029570b7f2633e2b56053c1c51ed140c77dfd26f Author: Adam Dickmeiss Date: Thu Feb 23 14:43:13 2006 +0000 Add the wonderful _CRT_SECURE_NO_DEPRECATE commit 3bc095519d9e6186b97309b9d9e59e589e3594b7 Author: Adam Dickmeiss Date: Thu Feb 23 14:41:15 2006 +0000 Enable xslt+alvis only if libxslt is present. commit f19d5a2a00dc48dfda777589fdd4ac21252f5ccc Author: Adam Dickmeiss Date: Thu Feb 23 11:26:00 2006 +0000 Fixup test, due to Zebra returning unsupported use attribute for string attribute values. commit 67f1321cbac10c08079a589eb8a948796aa90779 Author: Adam Dickmeiss Date: Wed Feb 22 08:42:16 2006 +0000 att_getentbyatt returns "bad use attribtute" if string attribute is used. Returns "bad attribute set" as before if numeric attribute is given. commit 38bd819ed5b2c30a9bc302412d04f9cb8d345f02 Author: Adam Dickmeiss Date: Tue Feb 21 15:23:11 2006 +0000 Ensure zebra_start fails if bad .cfg is passed. commit 3592c160de9edabf9bdc7a5e0f592af6b9f938bb Author: Marc Cromme Date: Tue Feb 21 14:54:25 2006 +0000 added more text on GRS and Alvis filters commit b90451f554a75bd47e03d14674fcb89f66106dd0 Author: Adam Dickmeiss Date: Mon Feb 20 18:40:23 2006 +0000 Make proper flag for memory read(raw_reading) and file reading commit 289761234a123e7fb51df77ab9baf0a2cd101dbd Author: Adam Dickmeiss Date: Mon Feb 20 18:39:43 2006 +0000 Handle negative staticranks returned by filters.. Issue warning and set to zero. commit 591d69201fa7de38a5a5411a198767828837db91 Author: Adam Dickmeiss Date: Mon Feb 20 18:33:09 2006 +0000 More testing of iscz1_{de,en}code commit 4d7345f0e28b1e56658c26a31ffaee95dcf502c0 Author: Adam Dickmeiss Date: Mon Feb 20 12:41:42 2006 +0000 Fixed bug #472: dumpdict is broken. commit 1bf3a26f6bb1fc5090047457bf5fd7ae87bc2aae Author: Adam Dickmeiss Date: Mon Feb 20 12:38:42 2006 +0000 Handle unknown register type in zebra_term_untrans commit 31232fe1b6651119ed966bf60282f6ca109a06ea Author: Adam Dickmeiss Date: Mon Feb 20 07:13:31 2006 +0000 Fix HTMLFILES again. Avoid dependency on zebra.xml. commit dee666e82a2a55fd571a4e70496e8444e9eac158 Author: Adam Dickmeiss Date: Sun Feb 19 15:10:04 2006 +0000 Update HTMLFILES to fix 'make dist' commit baace83df196efe065b7c10b016527a3e91ab245 Author: Marc Cromme Date: Fri Feb 17 14:06:06 2006 +0000 added Alvis XSLT indexing example where one indexes OAI harvested records commit 2c0ee3249ef46031064a0e8e7d63bd400317f5e9 Author: Marc Cromme Date: Thu Feb 16 16:50:18 2006 +0000 more info, some SRU examples, etc .. commit 8dfb15f5e6eaf6c3160bf949611d4d6e20df71b5 Author: Marc Cromme Date: Thu Feb 16 15:17:21 2006 +0000 sorted authors commit 94ec3a0012667d2c67e4bdba2a8255e863f88925 Author: Marc Cromme Date: Thu Feb 16 15:13:25 2006 +0000 added section on extended services update, delete, insert through yaz-client commit a0e0e6201b34e05f715a65d19a9b5667b734a58f Author: Marc Cromme Date: Thu Feb 16 14:45:51 2006 +0000 more info added commit ffead55f11110e1502bbc40100e7f4654d3bb8bf Author: Mike Taylor Date: Thu Feb 16 13:27:18 2006 +0000 SRU service description complete. commit 43b4d8d93cd567284f4e48731119f3da2a1daedf Author: Marc Cromme Date: Thu Feb 16 12:32:31 2006 +0000 added new generated html files to makesystem commit b367b4068098c28aa284c447edf42ba2c8d7c42b Author: Mike Taylor Date: Thu Feb 16 12:28:52 2006 +0000 Rolling. commit 5816573f7b51ed5b6b84e3c0c71dd5243483edaa Author: Mike Taylor Date: Thu Feb 16 10:43:15 2006 +0000 New commit 527166b05362eb28169d52c0d8fb475f0e09cb23 Author: Mike Taylor Date: Wed Feb 15 17:00:55 2006 +0000 New commit 9b7dd50ac883e0b2d0881bdead9a0684f597c50b Author: Mike Taylor Date: Wed Feb 15 17:00:39 2006 +0000 New, copied from CVSROOT/yaz/etc/pqf.properties (Zebra arguably needs a copy now, so that it can use it for its CQL support when specified in the GFS configuration file. Zebra can only be built when YAZ is present, true, but one can imagine a binary-only installation of Zebra that includes statically linked YAZ libraries and no YAZ configuration files.) commit be1ed58119bbbc6063723f1a255ab67e18885d8f Author: Mike Taylor Date: Wed Feb 15 16:54:36 2006 +0000 Invocation explained. commit 495a66ecd5fb966a8bd52f95dc25cde9d673e569 Author: Marc Cromme Date: Wed Feb 15 14:57:48 2006 +0000 added sections on alvis filter configuration, not finished yet commit b83408311d403f7463c336ec398766ec7d719418 Author: Marc Cromme Date: Wed Feb 15 12:08:47 2006 +0000 added section on static and dynamic ranking commit 883dd187102825985797e08086ee6a5f753f2366 Author: Mike Taylor Date: Wed Feb 15 11:16:22 2006 +0000 New IDs. commit 14a2dbce03d7802ab5b1e57b09d915339bb5fc54 Author: Marc Cromme Date: Wed Feb 15 11:07:47 2006 +0000 added chaper on alvisxslt recordmodel buildsystem fails on zebra.pdf, therefore removed from build for a while commit f9ba2efb65f7f9835bc454a55586c285d5385ecb Author: Mike Taylor Date: Wed Feb 15 10:58:01 2006 +0000 New chapter on SRU support. commit 41469c17552690987cc7fa7b5749b08e02004959 Author: Mike Taylor Date: Wed Feb 15 10:57:42 2006 +0000 Copyright date to 2006. commit e97b4b1ddf6384271c79b15635f41267ae5e0ed1 Author: Adam Dickmeiss Date: Fri Feb 10 15:19:55 2006 +0000 Fixed bug #465: Dup fields in ISO2709 in retrieval commit e208cf170e7317da273f3eccdc48c5cf3f8e33f0 Author: Adam Dickmeiss Date: Thu Feb 9 09:20:23 2006 +0000 Update win makefile with new objects commit 981098c7b427b4d3bbd986ac2d6b888c4e7bfc8b Author: Adam Dickmeiss Date: Thu Feb 9 08:55:36 2006 +0000 Loosen the Libxml2/xslt version requirement. We require libxslt 1.1.11 or later (rather than 1.1.12 or later). Thus the xslt filter can be used on the stock libxml2 on Mac OS X Tiger. commit e25e81fb1286e771866415bedd5ac963af86568c Author: Adam Dickmeiss Date: Thu Feb 9 08:42:55 2006 +0000 Work around bug #461: Link failure - missing Tcl symbols commit 1d09966e51904c44ed82eaa920ffc9fbcc087541 Author: Adam Dickmeiss Date: Thu Feb 9 08:31:02 2006 +0000 Fixed bug #447: Zebra aborts with "isamb: Inconsistent register". This fixes zebra_drop_database. We put a prefix in front of each dictionary entry in the matchDict and are then able to delete the whole subtree when database is dropped. commit 1ef7d46cdc719bc71b84ea81a1e7b467f9669fba Author: Adam Dickmeiss Date: Wed Feb 8 13:45:44 2006 +0000 Fixed bug #462: recordId: (set,use) is picky commit 25cf3bc85f9df25a4fc36707cc80a77fe6f35c83 Author: Adam Dickmeiss Date: Tue Feb 7 00:17:44 2006 +0000 Fix dfa_match_first to avoid match past nul byte commit 9be04e6cf1e848fcc4f065a7407e489684aaaf61 Author: Adam Dickmeiss Date: Mon Feb 6 23:22:28 2006 +0000 Fix for bug 460 commit 8261dce5dd97ae98c9b07d532b12f01ef6fbf751 Author: Adam Dickmeiss Date: Mon Feb 6 23:21:49 2006 +0000 Added test for bug #460 commit 53e96e83f38181c44adaf9aacba292b0c6c3b4b3 Author: Adam Dickmeiss Date: Mon Feb 6 13:34:13 2006 +0000 Dont index attributes. Bug #460 commit 05f87dcf55976c4ce82fdea867f00b16d4d8ee09 Author: Adam Dickmeiss Date: Thu Jan 26 22:17:16 2006 +0000 Fix non-init member sortSpec (introduced by previous commit) commit 6c4e4a85e067e039fdaace5f94e51203074f0174 Author: Adam Dickmeiss Date: Mon Jan 23 13:59:48 2006 +0000 Removed zebra.xml from XMLFILES (was added in 1.30). If it is present documentation will have to be build on distribution dists (and we don't want to require people to have jade installed). commit 3d775a219c4cc3382851dd82174680724a2f3202 Author: Adam Dickmeiss Date: Mon Jan 23 07:04:34 2006 +0000 Remove unused html files commit 7e5449f267caffdc5a57da4df1660890be76e368 Author: Adam Dickmeiss Date: Sun Jan 22 00:24:10 2006 +0000 Fixed 'make dist' by including all HTML files in HTMLFILES. commit 6b1dece7410af50ba077381066c10c44f0188868 Author: Adam Dickmeiss Date: Thu Jan 19 13:31:08 2006 +0000 Fixed bug #451: Sorted result set disappears .. NEW BEHAVIOR commit 985e74909c7e486edbb5220522796ec66c735504 Author: Adam Dickmeiss Date: Thu Jan 19 13:30:02 2006 +0000 Removed unneded initializer commit d659f801ef702c37a0d6bcbf6c227fdcc4e75520 Author: Marc Cromme Date: Thu Jan 19 09:26:59 2006 +0000 corrected build error by including changes in zenra.xml.in, not in zebra.xml file commit 20e4253a40eb337adedf5496b64baaa6010485d8 Author: Marc Cromme Date: Wed Jan 18 14:00:54 2006 +0000 started re-modelling documentation to be less Z39.50- centric, GRS-centric and BIB1-centric added general chapter on architecture, describing different record models (TEXT, GRS, ALVIS XML/DOM), which is not finished at all. commit 13f9deabbde0e0e64633b962a6b187aa5966d81e Author: Marc Cromme Date: Tue Jan 17 21:26:43 2006 +0000 corrected bug in disthook rule which always wrote "zebraidx.html not found in HTMLFILES", even if other files where missing. Added new installation.debian.html to HTMLFILES to prevent make dist fail. commit 3cb7de1fe75a4cfcd28bd882fa10d244acc37857 Author: Marc Cromme Date: Tue Jan 17 13:03:34 2006 +0000 added sentence on sever side CQL parsing commit 68b8d65e2b6874fb06e389c2ad2b68e6b77587ba Author: Marc Cromme Date: Tue Jan 17 13:00:02 2006 +0000 all URL's checked, and updated our commented when no active URL was found. Added paragraph on SRW/SRU and ALVIX XSLT filter commit 03e4c0b03d2c8492b7bff6bef8c088523572163f Author: Marc Cromme Date: Tue Jan 17 12:16:12 2006 +0000 taken dead Redhat 7.X URL package links out commit 9d362ae644a6dafc54920b7dc18bf9e5be8b6b60 Author: Marc Cromme Date: Tue Jan 17 12:06:53 2006 +0000 added section on GNU/Debian Linux installation commit d8b7f92dc036c81ed51a5f22b8c5bc9a5ae74487 Author: Adam Dickmeiss Date: Thu Jan 12 13:21:45 2006 +0000 Fixed bug #451: Sorted result set disappears after update commit 3e76d7533ae842c778fb8cd99e364bae25c361e9 Author: Adam Dickmeiss Date: Thu Dec 15 13:28:46 2005 +0000 Added a test case for bug #447 commit aed917ab8001642c774a55a4a4fffe9a26887a52 Author: Adam Dickmeiss Date: Thu Dec 15 13:28:32 2005 +0000 Added a test utility marcos TL_ASSERT, TL_ASSERT2 commit b742367152889d22ee12cfb286c3013193ca3047 Author: Mike Taylor Date: Wed Dec 14 10:28:25 2005 +0000 Ignore generated file "out" commit 078eeee35b62a26ef622e8cb79ac0af2c14d0ab3 Author: Mike Taylor Date: Wed Dec 14 09:05:43 2005 +0000 Moved out of the Zebra archive, and into ZOOM-Perl, as these files are not really part of the GILS example but part of the ZOOM-Perl test-suite. commit 9f2cdb515d5ba4c8f0806a3420b73061a8e9cd75 Author: Adam Dickmeiss Date: Tue Dec 13 13:47:35 2005 +0000 Store unique ordinal integer for database. This is to begin solving problem with drop and record IDs. Bug #447. commit cbd0f2df2142b3e009cec184251db42dd5363b1e Author: Marc Cromme Date: Tue Dec 13 09:24:36 2005 +0000 added alvis filter to debian package mechanism commit a0dfc2c01cc95431cc7aa01f481db5d51a02b545 Author: Mike Taylor Date: Mon Dec 12 17:24:49 2005 +0000 Use isam:b so that the "drop" extended service works. commit c944571888712854653be0d2debf903b8651c8e2 Author: Adam Dickmeiss Date: Fri Dec 9 11:33:32 2005 +0000 Removed zebra_clearError. The scheme is meant to be .. Return ZEBRA_FAIL on failure. Only then it is meaningful to check for error code. It is therefore no longer necessary to clear it (reset it). commit 3c32ec08b365ba1cbfa705d7cbefca5b7b4afe28 Author: Adam Dickmeiss Date: Fri Dec 9 10:56:59 2005 +0000 Drop database returns diagnostif if isam is not isam:b commit 04ecd9c7e5f10487439020b866406c58e1196ca6 Author: Adam Dickmeiss Date: Fri Dec 9 10:49:10 2005 +0000 Fix bad printing of sysno commit c6959870998f868e6a0e9201739fb54aef696bc6 Author: Adam Dickmeiss Date: Fri Dec 9 10:45:04 2005 +0000 For buffer_extract_sysno, match criteria is only used if SYSNO pointer is NULL. If sysno is non-NULL, that sysno is used. This should make record update with opaque record ID work in a consistent manner. commit 31304c10a671699d2b3f5ac082cc17e772b15842 Author: Mike Taylor Date: Fri Dec 9 10:14:52 2005 +0000 Don't use recordId. commit 9637ba0802eb0fe437c1f0d277dd3c524981ba56 Author: Adam Dickmeiss Date: Thu Dec 8 11:10:03 2005 +0000 This member was not initialized in some cases (valgrind) commit 0fcdeabd672314bd0aaf406ffdad36d8c267d3dd Author: Adam Dickmeiss Date: Thu Dec 8 11:06:49 2005 +0000 Fixed bug #446: iso2709 filter SEGVs on bad input data. commit ddcf0c647f3685b150885b547cd7d7cb71d5f722 Author: Adam Dickmeiss Date: Wed Dec 7 17:00:46 2005 +0000 Somewhat improved diagnostics for update with opaque record ID commit b0afd1f82c9b6d503d6cf2f8f87a147c7aa16cce Author: Mike Taylor Date: Wed Dec 7 15:32:34 2005 +0000 New commit 0799272d0b04fc3158a8406283559c616ae3222a Author: Adam Dickmeiss Date: Tue Dec 6 15:36:38 2005 +0000 Avoid stmt/var declare. Omit useless static keyword commit e7e1b9261c5b813008b95f279be96b13568ffedf Author: Marc Cromme Date: Mon Dec 5 13:58:52 2005 +0000 added grs node construction - not finished yet commit acb63831cbd1595325151f0829b8dc9ae3eb8fbe Author: Marc Cromme Date: Mon Dec 5 12:18:40 2005 +0000 added first version of CSV GRS filter still missing is - build of GRS data1 node tree to be given to indexer - control of how to call back zebra such that each record per line gets indexed on it's own - configuration file reading and config parameter passing commit 53e80efb6110282ca208b459e7d947e4157f9569 Author: Adam Dickmeiss Date: Tue Nov 29 11:38:34 2005 +0000 Allow string value v in @attr 10=v for SearchResult-1 reference commit 8cd521d7155551f57b5d629fd39e2025b7df26c9 Author: Adam Dickmeiss Date: Tue Nov 29 09:37:04 2005 +0000 Disable limit debugging commit eb5bda120e13dbe68357564054193587d99e9580 Author: Adam Dickmeiss Date: Wed Nov 16 04:33:22 2005 +0000 Fix grs.sgml to use off_t rather than int for file offsets commit 52824e358151328181178232866be5766dcfce6c Author: Adam Dickmeiss Date: Thu Nov 10 11:25:47 2005 +0000 Allow updates on empty records. commit 18793c78b02261258fb05021cc185715f8f16062 Author: Adam Dickmeiss Date: Thu Nov 10 11:25:13 2005 +0000 Handle zh==NULL in print_dict_item commit d59e8fa050e2ed66b5152df48dbafb26f490e0e9 Author: Adam Dickmeiss Date: Thu Nov 10 08:08:19 2005 +0000 Added a test for bug #432 commit 4ee6ccf56b9e212a64894ceb919da35a5e94f2a9 Author: Adam Dickmeiss Date: Wed Nov 9 12:01:09 2005 +0000 Log test errors to yaz_log so ease trace of automated tests commit 34552d7bc714468512b1873f1d6b75608d6b4655 Author: Adam Dickmeiss Date: Wed Nov 9 11:51:29 2005 +0000 Register no longer uses register type prefix (REG_TYPE_PREFIX). Try to avoid dup keys for filters (bug #432). commit 8a57ec471c6e6fc6979dfad0415a5665fdb43320 Author: Adam Dickmeiss Date: Wed Nov 9 08:27:28 2005 +0000 Rename argument to zebra_rec_keys_set_buf commit 1096988cbba8ece70c1ab3c964a5f1e2b1759773 Author: Adam Dickmeiss Date: Wed Nov 9 08:09:44 2005 +0000 Added test for bug #431 commit ff83da9583191588c5816189b55966a6bb057d71 Author: Adam Dickmeiss Date: Wed Nov 2 11:43:26 2005 +0000 Zebra reads (non-standard) attribute 10 for RPN queries. The value, when specified, is returned as subqueryId in SearchResult-1. If unspecified subqueryId is omitted in SearchResult-1. commit bbfc1815f4a53d2138ada838ddb2472fbef5f36e Author: Adam Dickmeiss Date: Tue Nov 1 10:16:08 2005 +0000 Added note about the agrep algorithm used commit d317e36ad9e111c87c3de248f27a5a2c7adb9faf Author: Adam Dickmeiss Date: Sun Oct 30 22:52:37 2005 +0000 One more debug msg in limit code commit 728245ddfc695b2cc9ff9e6e3788f625798c55f9 Author: Adam Dickmeiss Date: Sun Oct 30 22:31:28 2005 +0000 Print info about limit filter progress if ZEBRA_LIMIT_DEBUG=1. commit 60ef5f615dd758097e842067a875307df11e4f07 Author: Adam Dickmeiss Date: Fri Oct 28 09:22:50 2005 +0000 Using zebra_rec_keys for per-record key store commit 593927cb1897c1e3163c284448eff7fee6ddad51 Author: Adam Dickmeiss Date: Fri Oct 28 07:25:30 2005 +0000 Fix leak for rset_key_control commit 1a9d19320e28d7d9f2777c25971d524725725ff9 Author: Adam Dickmeiss Date: Thu Oct 27 20:06:58 2005 +0000 Use xsl:element for document element to prevent ns commit 506e2c39ef2e84e1bfdf96715fdd98d00dade948 Author: Adam Dickmeiss Date: Thu Oct 27 09:09:52 2005 +0000 Tests for identical keys in ISAMB commit 58e601f9b6d9ac15b90fa7c72686e81e01e5416f Author: Adam Dickmeiss Date: Thu Oct 27 08:49:29 2005 +0000 Indentation commit 54196cf5a8914f1314a8fba42166dd809f9d2198 Author: Adam Dickmeiss Date: Sat Oct 22 17:32:09 2005 +0000 Fixed bug #415: Strange truncation behavior commit df1bf5bea1452112a786e8f7b85607b46c856315 Author: Adam Dickmeiss Date: Fri Oct 21 18:29:04 2005 +0000 Fix dbaccesslist not being initialized (when no auth is used) commit dbfe7852bd2cc333d4ab7582bbffbcc7c05fb091 Author: Sebastian Hammer Date: Thu Oct 20 18:28:10 2005 +0000 Added database subscription feature. Description in NEWS and doc commit 729c4dfa231681232d61ba74f64e2dd70342dd42 Author: Adam Dickmeiss Date: Mon Sep 19 09:37:31 2005 +0000 Fixed bfx_open so that more_info is set to correct value commit 2c5c76f0a69069ae2a448e9d4e7b46dcc04bf761 Author: Adam Dickmeiss Date: Mon Sep 19 08:20:15 2005 +0000 Reduce default API logging commit 22851818d50bb92ec91e9ec6f2bf484bd09307f6 Author: pop Date: Fri Sep 16 17:00:41 2005 +0000 SWIG API has separated structures for service and session now. index.h not included anymore. commit 1fde4f52fc72af8e10a600a81c6f0924105add6a Author: Adam Dickmeiss Date: Fri Sep 16 09:58:38 2005 +0000 Allow same document to be modified multiple times within one transaction. commit 0f70ea3a047095011c9100bade7bf29ca39589e0 Author: Adam Dickmeiss Date: Thu Sep 15 12:48:42 2005 +0000 Remove call to zebra_opn_res. zh->res=0 means no register yet commit 1a5a2ec367cdc74e54439406e3888a67f445a1fc Author: Adam Dickmeiss Date: Thu Sep 15 10:34:22 2005 +0000 api_swig.h part of dist commit 7f02bad575a64004a3a0122a99666afd41dd8966 Author: pop Date: Thu Sep 15 09:27:18 2005 +0000 Zebra api extension tuned for SWIG commit 6c3da5ae754ebcd91827f61f1d402129fe379093 Author: Adam Dickmeiss Date: Tue Sep 13 13:15:24 2005 +0000 Missing to res_open commit 3d3d0cebd23fa527a7e9d5d728e3c744acb37580 Author: Adam Dickmeiss Date: Tue Sep 13 11:51:05 2005 +0000 Added parameter for zebra_open. commit 262720eca99a59a3bfcdc20703aa20b2257bf927 Author: Adam Dickmeiss Date: Tue Aug 30 12:27:18 2005 +0000 Dont declare module_path if dlfcn.h is not set commit 8ca3d9cf56031e19b8368b1f82279bf02c7dadac Author: Adam Dickmeiss Date: Tue Aug 30 12:25:38 2005 +0000 Creating idzebra.dll instead of static zebra.lib. Using yaz.lib or yazd.lib depending on DEBUG=0|1. commit eca0079ec91514049034728df2b91a26566a5d89 Author: Adam Dickmeiss Date: Tue Aug 30 12:23:02 2005 +0000 Fixed a problem in snippets handling that occurred when using string indexes (problem in zebraExplain_lookup_ord). commit 98578de25d24d3aa0e50bb190e603adee4e920ce Author: Adam Dickmeiss Date: Tue Aug 30 10:44:56 2005 +0000 No longer in use commit 11de0965b256736f01e55b17a603eb9ebad5ec12 Author: Adam Dickmeiss Date: Fri Aug 26 10:13:30 2005 +0000 Update snippets handling for new store keys structure. Also omit index_type / reg_type completely from it, because the index ordinal is sufficient. commit 822907083eacfb5978b8efc75b27b52e91ce9a1b Author: Adam Dickmeiss Date: Fri Aug 26 10:11:49 2005 +0000 Omit print of Zebra version. zebra_start does that commit f00e7a29573e40d3ddf9cf63d6f82512a93a38ce Author: Adam Dickmeiss Date: Thu Aug 25 12:53:42 2005 +0000 Install proper msvcr71.dll commit 78f51742e3b066955a13167346413627be644643 Author: Adam Dickmeiss Date: Thu Aug 25 12:46:17 2005 +0000 Add rankstatic to win makefile commit 3caf18527ce7a4c423453bb755aed257e5300bd1 Author: Adam Dickmeiss Date: Thu Aug 25 10:37:05 2005 +0000 For trunctations, only 20 temp sets are merged at a time (truncchunk) commit 35f5aba7d93a1ae18767463ba90c3cd340b4d9bd Author: Adam Dickmeiss Date: Wed Aug 24 08:30:37 2005 +0000 Allow complex compspec so that SRW/SRU schemas are supported commit b9eaf5f31be2394a70655d3b21a1ff03bf96d949 Author: Adam Dickmeiss Date: Tue Aug 23 08:02:47 2005 +0000 Remove database: from this sample commit 1c13455bb1e12b4e74361e58d5862c9597c1b5c7 Author: Adam Dickmeiss Date: Mon Aug 22 14:39:47 2005 +0000 Increase params array. If not it'll get overriden when snippets are in use. commit be0203ee07adfeda7821a2c44ba6dd31a532b792 Author: Adam Dickmeiss Date: Mon Aug 22 09:04:17 2005 +0000 Added type signed/unsigned char type casts to make GCC 4 happy. commit 87cf7a7eba859697c0cb8322cf458a73c7cfdff3 Author: Adam Dickmeiss Date: Mon Aug 22 09:03:34 2005 +0000 Align alvis with xslt (again). commit 852c2d471176b3f597b6b2a328a3c6eba0965ad3 Author: Adam Dickmeiss Date: Mon Aug 22 08:19:51 2005 +0000 Members in RecWord term_buf, index_name changed from char * to const char *. commit 27562aeaaf73ee45d337d88cbc5a5c38ee3f4eed Author: Adam Dickmeiss Date: Mon Aug 22 08:18:43 2005 +0000 Added type casts (signed/unsigned char) to make GCC 4 happy commit dc58eff985d645a38b3945aa248a4e2b8070ab98 Author: Adam Dickmeiss Date: Mon Aug 22 08:17:01 2005 +0000 Added include of yaz/log.h commit e7fc5dfa9d99d5d81f4e5de31547c413bca28c91 Author: Adam Dickmeiss Date: Fri Aug 19 21:42:17 2005 +0000 Do not enable ALVIS for systems without LibXSLT commit bb90b19c6082e427d5c014e6751a095a37a20b6d Author: Adam Dickmeiss Date: Fri Aug 19 21:41:37 2005 +0000 Added some type casts to avoid warnings produced by GCC 4. Made a few functions static to avoid nameclash with alvis filter. commit 11b80ecf43b2c8bd1d376859e52ed6e61781b70c Author: Adam Dickmeiss Date: Fri Aug 19 21:40:17 2005 +0000 Make a few functions static to avoid nameclash with xslt filter commit c154b6ebab028dc512c43403864a8e4a7fc2b178 Author: Marc Cromme Date: Fri Aug 19 14:06:31 2005 +0000 copied xslt.c filter over on alvis.c filter, to give alvis folks their own version commit 73dc84a6886c4d2c3f8c82b888a0728e34a5b51b Author: Marc Cromme Date: Fri Aug 19 14:05:29 2005 +0000 taken snippet stuff out to avoid problems from this code commit 698b93b6cfaa18af8d00f93ee5465b352b7aef3a Author: Adam Dickmeiss Date: Fri Aug 19 13:11:54 2005 +0000 Remove snippet log stuff commit 81dba20c87c8f3f7019eccf89bd52c48a157a78a Author: Adam Dickmeiss Date: Fri Aug 19 12:58:01 2005 +0000 Added a few casts converting from unsigned char* -> char*. commit d95fcf3ebd1d19bc0bd15e0efc69c6efa40a0423 Author: Adam Dickmeiss Date: Fri Aug 19 11:04:23 2005 +0000 Pass a stop_flag to ranking method calc. When set to 1, it signals stop of result set processing. commit 3e7372e15b55113d4d29582fc30e7e3a398161fc Author: Adam Dickmeiss Date: Fri Aug 19 11:03:53 2005 +0000 Removed unused variable commit cb744fce22089ac1cb861cbebe502fb0e2ae4321 Author: Adam Dickmeiss Date: Fri Aug 19 10:48:36 2005 +0000 Reverse score in static-rank handler due to the increasing value property of the ISAM keys. commit 8e4994aae59602f0caabe147d8ebd65ec08d3e3a Author: Adam Dickmeiss Date: Fri Aug 19 10:47:50 2005 +0000 Show score in snippet format commit c33b816c4435530975e7b5edfd5b2334201ea5a4 Author: Adam Dickmeiss Date: Fri Aug 19 09:45:24 2005 +0000 Pass staticrank in buffer_extract_record. This is what we did for file_extract_record before. commit 342c28e71fe5122d17d760a930107cab0266e9c6 Author: Adam Dickmeiss Date: Fri Aug 19 09:21:34 2005 +0000 Extend the ranking interface so staticrank is passed to calc method. Added simple staticrank algorithm/example. commit f1bc6181b7e4ee95b137e8d19f08a0943a21dfdf Author: Adam Dickmeiss Date: Fri Aug 19 09:20:21 2005 +0000 Fix this test so that it works with 'make distcheck'. commit 0b916c43a55c3d66e938fa5f19b51a230c448777 Author: Adam Dickmeiss Date: Thu Aug 18 19:20:37 2005 +0000 Updates for Windows commit 44082770642275dd993aa621d9dc5c5b0dc454d3 Author: Adam Dickmeiss Date: Thu Aug 18 12:50:17 2005 +0000 Added support for static ranking. Bug #174. The staticrank is enabled by specifying staticrank:1 in .cfg. The xslt1 was removed. Filter xslt can do it all and support specifying split=1. XSLT filter can specify staticrank using attribute 'z:rank'. Added tests for staticrank and record ID match in xslt3.c, xslt4.c. commit 92522f476051e879371444a91f598e8213d34701 Author: Adam Dickmeiss Date: Wed Aug 17 21:30:31 2005 +0000 Added test t13 which illustrates the resource API and tests it. commit fe11c4b55fa92d5c3c768218580841e69665ed72 Author: Adam Dickmeiss Date: Wed Aug 17 21:29:44 2005 +0000 Allow NULL config to be given for zebra_start and zebra_start_res. commit 3a4f37bf02075e0ad4b56b2b1f7bf9ac9cada998 Author: Adam Dickmeiss Date: Wed Aug 17 21:28:07 2005 +0000 Added a utility res_clear which removes/clears all items in a resource handle. commit 140d4866bc52fb0cd796ecdaa84253e31dcb85f0 Author: Marc Cromme Date: Fri Aug 12 13:50:51 2005 +0000 heikki's comments added, but not integrated yet commit 1269c580faf759f36ace9270279535a16acb3d58 Author: Marc Cromme Date: Fri Aug 12 13:34:10 2005 +0000 make system error corrected commit 2c7721aaabd7af28b8c2bb9944c43ba2fe9ce493 Author: Marc Cromme Date: Fri Aug 12 13:19:06 2005 +0000 added changed entities commit c473db9c7ca11d1bbe1d0c980c48f4e470cfde70 Author: Marc Cromme Date: Fri Aug 12 12:44:36 2005 +0000 finished re-write of chaper 7 and zebrasrv man page, now hopefully much more informative than before. All relevant YAZ frontend options are mentioned as well as zebra specific options and syntaxes commit 3d6d9a44b38717e7e9a2c64b68db895998d4de82 Author: Adam Dickmeiss Date: Tue Aug 9 12:30:46 2005 +0000 Allow record subsystem to return system numbers (document ID) with a fake offset. This is to test that Perl API and other components works properly with 64-bit integers. commit 09563d8acae53c6479d853e35e3bd53991e880c7 Author: Adam Dickmeiss Date: Tue Aug 9 10:18:00 2005 +0000 Removed Perl API. It's a separate CVS project idzebra-perl now. commit f2f159d942dae64203f266941c76bc487e33714e Author: Adam Dickmeiss Date: Tue Aug 9 10:01:03 2005 +0000 Comment zebra_result_set_term_{no,info}. commit aa7cc3c1655c632a7b3a7053fb5b46b8ce0d3aeb Author: Adam Dickmeiss Date: Tue Aug 9 09:35:25 2005 +0000 Added extra parameter setname for zebra scan functions. This allows a scan to be limited by a result set (NULL for no limit). If no result set is given for scan functions, attribute 8 is inspected. If present, value of attribute 8 is used as limit. commit 03c0c95bfdcd5d59d00f0b05d928c13f3192d09d Author: Adam Dickmeiss Date: Tue Aug 9 08:58:18 2005 +0000 Added modules location to be returned. commit b48a14d0d5fafde2fbbcc3c45451fc6f6de93c00 Author: Adam Dickmeiss Date: Mon Aug 8 12:04:02 2005 +0000 Remove YLOG_LOG msg commit 47436e2df7f47807600ddfa0e58e5195a484ef55 Author: Adam Dickmeiss Date: Mon Aug 8 11:08:52 2005 +0000 Remove comment which issues automake warning commit 7dcaf748021e168c37a2e3eb263db03248b2d170 Author: Marc Cromme Date: Fri Aug 5 14:39:12 2005 +0000 updated the zebrasrv man page by copying relevant files over from yaz documentation. Still miss to write a nice description, and also updating of the same info in the zebra manual is needed commit c093259af1129171ffb244fe10f5110d7463d88d Author: Adam Dickmeiss Date: Fri Aug 5 10:40:13 2005 +0000 Fixed bug #400: Generic record IDs doesn't match. commit c8f76d22ffc89ae0a867b6b6e91bbb279bde1f9e Author: Adam Dickmeiss Date: Fri Aug 5 10:33:05 2005 +0000 Added include stdlib.h commit 83ffc352fb52d3cd5aadbcd11f52b58456131394 Author: Adam Dickmeiss Date: Wed Aug 3 07:44:27 2005 +0000 Get rid of a few YLOG_LOGs commit 3459774ec153f7f58f1860f2d24df8ff1df50b31 Author: Adam Dickmeiss Date: Thu Jul 21 13:05:16 2005 +0000 Reduce memory considerably during bug merges (heap-recursive ones). commit 32da497331f7655667ead364172fefbb6ac723d3 Author: Marc Cromme Date: Mon Jul 18 10:05:21 2005 +0000 made extra check for presence of config.sub and config.guess to aviod break of build if newer autotools did install these as symlinks commit 69983aaec470e41649c4dfae8a9e7cbcf061cacf Author: Adam Dickmeiss Date: Wed Jun 29 16:52:26 2005 +0000 Fixed bug #317: xelm only indexes cdata at matching node (not children). commit 51e194ae762d9b2b15fcc088e5f4005029f78f60 Author: Adam Dickmeiss Date: Wed Jun 29 16:50:08 2005 +0000 include id in snipet xsl commit dffefbf2faee02ce58bc8d3659a4b250d46c838b Author: Adam Dickmeiss Date: Wed Jun 29 12:31:46 2005 +0000 Fixed a bug in ISAMB splitting. A new block was attempted to be read while it was not yet flushed to disc. Should now be fixed. commit cae6de97d03369a9429024f9d4abc9f1e5fbf3bb Author: Adam Dickmeiss Date: Tue Jun 28 12:18:32 2005 +0000 Truncate extremly long safari record lines. commit ab1e3781d08bd0fca3e682b1a885177f07ad849a Author: Adam Dickmeiss Date: Fri Jun 24 13:45:54 2005 +0000 XSLT filter reads z:record construct which may define record ID for tree/record. commit 9eebf93dc2525854867cbc43920ea8ba4a199ab5 Author: Adam Dickmeiss Date: Thu Jun 23 06:45:46 2005 +0000 Register type (w,p) + set-use/string attriute combined in register id and stored in dictionary. Experimental (NATTR=1) support for plain string attributes everywhere. That doesn't pass tests yet, since there is no mapping in search phase. commit 3f385c9ee5fea1f18f200a598747c9b385eee9d8 Author: Adam Dickmeiss Date: Wed Jun 22 19:42:37 2005 +0000 Added support for term references (queryIDs) for searchResult. commit c65dec48dcbc11c57d6378f8ddfa1e685048f371 Author: Mike Taylor Date: Mon Jun 20 14:17:50 2005 +0000 Ignoer zebrasrv.pid commit 47007b7931cbb46173013028646079757da7d979 Author: Adam Dickmeiss Date: Thu Jun 16 09:08:53 2005 +0000 For RPM spec, use License: rather than Copyright: (obsolete) commit be32b4e5c154545c2b91b76144d6cbf1238f969a Author: Adam Dickmeiss Date: Wed Jun 15 21:31:45 2005 +0000 Removed map_only arg from chrmaptab_create. Added skeleton for proper charmap test. commit 14796de1db54c523990409333ee84bd403116caf Author: Adam Dickmeiss Date: Wed Jun 15 18:52:49 2005 +0000 Remove prototype for removed function zebra_prim commit cb55ec9ab9fc8de32816e0125671e43ec0377bde Author: Adam Dickmeiss Date: Wed Jun 15 15:30:05 2005 +0000 Rename xslt filter attribute 'field' to 'name'. commit 47eeb5384a8fae8bcac8afb8a84782ca094683f9 Author: Adam Dickmeiss Date: Tue Jun 14 20:28:53 2005 +0000 Use HAVE_UNISTD_H when including unistd.h. commit 6c1cf0fc7d20c78779899d0ba0d3f31f065e2e46 Author: Adam Dickmeiss Date: Tue Jun 14 20:28:05 2005 +0000 Add check for sys/resource.h commit 6ff4dbbbe3f56b7d41be5e9f35aba883e3632d8e Author: Adam Dickmeiss Date: Tue Jun 14 20:27:33 2005 +0000 Remove YLOG_LOG msg. commit 21ac4591a8f74b9de5030532d18d962bbe72b3d3 Author: Adam Dickmeiss Date: Tue Jun 14 20:03:01 2005 +0000 Added new test/filter directory with filter tests. commit e77e69cb9cf741189af0cd5ffb165c3d67cd7fa7 Author: Adam Dickmeiss Date: Tue Jun 14 20:02:30 2005 +0000 The start_up routine sets an upper-limit on CPU seconds so that tests with bad indefinite loops stop at some point. commit ef438c09072c88b30059c51e4391d5693751d923 Author: Adam Dickmeiss Date: Tue Jun 14 20:01:21 2005 +0000 Make this test faster. commit f64645447b8b099975747eb50583cddd7d2dfa88 Author: Adam Dickmeiss Date: Tue Jun 14 18:28:21 2005 +0000 Fixed bug #382: filter text never stops. Also added facility for text filter separator. commit 6afe2f64d056e86d3d0cd880f48dcf941d758692 Author: Adam Dickmeiss Date: Tue Jun 14 18:27:23 2005 +0000 Fixed bug #381: grs.xml produces warning. commit f9e7e7c0cbaab295c911c44002eb7009dee03b7b Author: Adam Dickmeiss Date: Tue Jun 14 12:42:48 2005 +0000 Removed replace_tokens code that has not been used for quite some time. commit 2c2b9264ce0153ca29e4575003371e2d9649504f Author: Adam Dickmeiss Date: Tue Jun 14 12:42:19 2005 +0000 Added test for search on \\{. commit b253fbc82a68432634d84a1ed7a9ac7017446969 Author: Adam Dickmeiss Date: Tue Jun 14 10:33:31 2005 +0000 Added more charset tests commit 9eaad46fe45a09ea35d9ce6561748145ebd52838 Author: Adam Dickmeiss Date: Mon Jun 13 10:29:20 2005 +0000 Recognize resource estimatehits again. Allow server to omit records for bend_fetch in the case of estimate/approximate hits in effect. Requires YAZ 2.1.9. commit 5368365d44ba3ecb0d6d5755aa8419e6be4ebc66 Author: Adam Dickmeiss Date: Mon Jun 13 10:27:52 2005 +0000 Added routine res_get_int which returns resource value as int. commit aa37dc73fac74b9d431987a02cc2f604af452fcc Author: Adam Dickmeiss Date: Fri Jun 10 10:55:18 2005 +0000 For approx_limit == 0, use unlimited hit count commit 810bce66201f40acfd7e8577d3997e6ea385f1cf Author: Adam Dickmeiss Date: Thu Jun 9 10:39:52 2005 +0000 Fixes for hit estimates. Added zebra_set_approx_limit. commit 371c6ab1ec4d3e80d4e829a61498487a2f96d774 Author: Adam Dickmeiss Date: Tue Jun 7 15:12:39 2005 +0000 Avoid mixed stmt / var declare commit 7a2d0f25682890bde5d8f2883d6020df2ed0b365 Author: Adam Dickmeiss Date: Tue Jun 7 14:53:38 2005 +0000 Save register type for TERMIDs and snippets. commit 5498d6d66ab0f3639b6d4517cad14f2ba25b7553 Author: Adam Dickmeiss Date: Tue Jun 7 13:10:52 2005 +0000 Change xslt NS to http://indexdata.dk/zebra/xslt/1. Add snippet area for root document if snippet attribute is defined. commit a8092592e1febfd07f451dff0ab8aef21f08fe80 Author: Adam Dickmeiss Date: Tue Jun 7 11:38:16 2005 +0000 Added snippet stylesheet test. commit 94bf7abfff6a30fab5567d8275db14122ed01822 Author: Adam Dickmeiss Date: Tue Jun 7 11:36:38 2005 +0000 Added snippet utilities and snippet window implementation. XSLT filter gets snippet as simple string for now. commit 1285f0f6eeb151a62b69d8d3381c54ace03e55d4 Author: Adam Dickmeiss Date: Tue Jun 7 07:41:04 2005 +0000 Make a copy of ord(inals) in rset_term_create. commit 2cd05dfd682c368fd3bd73912144344d2954325f Author: Adam Dickmeiss Date: Mon Jun 6 21:31:08 2005 +0000 Save ord(inal) indexes IDs so we can make snippets properly. commit a876f6c2860bf13e36f47c8ce938d74b4ce98b8e Author: Adam Dickmeiss Date: Thu Jun 2 11:59:53 2005 +0000 Fixed and added a few Doxygen comments. Got rid of redundant function rset_get_no_terms. commit e63cb633d580e1a364de81d4f24fb2c9fa70e279 Author: Adam Dickmeiss Date: Thu Jun 2 11:58:12 2005 +0000 Process all source with doyxgen commit 74c8a62d1403d51315d58bd293b6284490e78003 Author: Adam Dickmeiss Date: Wed Jun 1 14:42:29 2005 +0000 Ensure correct fname marcschema.xml is part of dist commit b912fcbe609de53861c5cf9b5196986dd97a1462 Author: Adam Dickmeiss Date: Wed Jun 1 07:32:46 2005 +0000 Allow split path/level to be specified in XSLT conf. commit 824db602e8767538b3eb075a604f557ebc9c3085 Author: Adam Dickmeiss Date: Tue May 31 17:36:16 2005 +0000 XSLT filter uses XML config for to list each supported recordSchema. commit 0193e3e218a53df6c3011e2f16f73b1af9a7e19e Author: Adam Dickmeiss Date: Tue May 31 17:10:06 2005 +0000 Make passwd_-vars local. Make zebra_start log Zebra version commit 1d1083ab048f9f1000f0bf11225be23a6730cb06 Author: Adam Dickmeiss Date: Tue May 31 14:18:17 2005 +0000 XSLT filter uses XML config for to list each supported recordSchema. commit e8393fc8e78d777294f6eabf4029b90d566cf978 Author: Adam Dickmeiss Date: Tue May 31 13:01:36 2005 +0000 Towards snippets/high-light of matched terms in records. Added zebra_get_hit_vector that gets hit terms for record with given ID in a result set. Added print_rec_keys which dumps indexed terms. commit 989564485b832bc896b2c0bf73c8e4a7f28f1ad2 Author: Adam Dickmeiss Date: Tue May 31 07:29:10 2005 +0000 For loglevel=searchhits print terms+search keys commit 5d3d666d4712604159141d991dadd3e6299565bd Author: Adam Dickmeiss Date: Tue May 31 07:22:20 2005 +0000 Avoid duplicate level print for test api commit bbdba174c32cd0f6f45781d6123d41186617ba5f Author: Adam Dickmeiss Date: Mon May 30 13:27:08 2005 +0000 Implemented zebra.cfg directive 'passwd.c' which specifies user accounts file with encrypted passwords. The directive 'passwd' specifies user accounts file with clear-text passwords. The previous version of Zebra used plain/clear text depending on configuration automatically. That caused upgrade trouble. Bug #356. commit e14b48004c060bfbb6649e35e635dacd0983ac3e Author: Adam Dickmeiss Date: Mon May 30 13:22:11 2005 +0000 Document directives passwd,passwd.c,perm commit 0644aefe571a910f0cdedabde97af0c17f0d0e3b Author: Adam Dickmeiss Date: Tue May 24 20:40:15 2005 +0000 Avoid mix vardecl/stmt. commit 87d7f05db5b40cbc720c8b5fe610183322739f07 Author: Adam Dickmeiss Date: Tue May 24 20:39:02 2005 +0000 Fix spelling commit 3d66d38a45193460ee3b94a171201f1e1d825253 Author: Adam Dickmeiss Date: Tue May 24 12:36:26 2005 +0000 fix link commit 2cb08a89ee65d8ae2646b91dcf27bc3883759691 Author: Adam Dickmeiss Date: Tue May 24 11:35:41 2005 +0000 Added support for temr hit counts. This was not in place for earlier 1.4 versions, but is present in the 1.3 series. Bug #124. commit 86277fd5ab0909de99a3e81b92d087ae45882a4a Author: Adam Dickmeiss Date: Tue May 24 11:27:48 2005 +0000 Allow loglevel string to be specified for tests as first arg commit a8be496e66ed5ba01a42537e4aa29c6670cd3037 Author: Adam Dickmeiss Date: Tue May 24 11:27:19 2005 +0000 WS updates commit 6d2647676d01d9493897295d1830badec3e4f27a Author: Adam Dickmeiss Date: Wed May 18 11:47:50 2005 +0000 Fixed bug #342: estimate hit not in effect for multi-ands. commit c4f5c81c1fef61826e2ca7815d5f427a0a82b8e7 Author: Adam Dickmeiss Date: Tue May 17 08:50:48 2005 +0000 Make bf_cache return ZEBRA_RES so we can check if shadow was properly enabled. Fixed leak that could occur if zebra_begin_trans failed. commit aaa368e6d266e63701364457b6c92d0c53098edd Author: Adam Dickmeiss Date: Fri May 13 09:41:59 2005 +0000 Added new source to WIN32 makefile commit 6b0d7bc3eb2a61f75cf002b16944717bcc716fb1 Author: Adam Dickmeiss Date: Thu May 12 10:17:07 2005 +0000 Fixed crash that could occur if ES update transaction failed. commit 8c88f4605887e81d551372c3beb0af34b2747c09 Author: Adam Dickmeiss Date: Thu May 12 10:16:26 2005 +0000 Added sample directive for permissions commit 46bfcfb367c08f8badb48093b0031cf33fa9d663 Author: Adam Dickmeiss Date: Thu May 12 10:10:32 2005 +0000 Added configure check for crypt. commit 6cb032fd2ece4742e3516e0941507143f677e5cd Author: Adam Dickmeiss Date: Wed May 11 12:39:36 2005 +0000 Align Zebra API more so that ZEBRA_RES is used to signal error/OK. Error code should only be checked when ZEBRA_FAIL is returned. Updated sort test t4.c to really do sorting! commit f00cbbbdc1df5478ce74c4a13efafc42257e4cc1 Author: Adam Dickmeiss Date: Wed May 11 12:36:45 2005 +0000 WS updates commit d8e960f5f1060148a5fffa7a767c72391662fbdc Author: Adam Dickmeiss Date: Mon May 9 21:55:11 2005 +0000 Added a few files to be ignored commit e8899adeac7c35feef7b93af73c2026245b2a205 Author: Adam Dickmeiss Date: Mon May 9 19:57:35 2005 +0000 Fixed bug #108: File updates sometimes produce duplicates. commit 9d8561bd741838fc97615790511774743848f031 Author: Adam Dickmeiss Date: Mon May 9 13:24:09 2005 +0000 Fix leak that occurred whtn diagnostic was issued commit 57ddb966ad625aa8d8f1d837918f906645645a56 Author: Adam Dickmeiss Date: Mon May 9 13:22:44 2005 +0000 Added check which creates many databases. commit 0ad2ccc469f9a06aa330f27f6810140ae33e76ec Author: Adam Dickmeiss Date: Mon May 9 12:03:59 2005 +0000 Avoid mix vardecl/stmt commit c7dd9d0303fba8cc5524269ba4ccb7276df4c277 Author: Adam Dickmeiss Date: Mon May 9 11:39:57 2005 +0000 Only enable xslt filter if libxslt 1.1.12 or newer is present. This corresponds to libxml2 version 2.6.15 or later and should ensure a recent xmlreader API is available. commit 984155e880a57de40cd6ed2f4e7be33aecef52fa Author: Adam Dickmeiss Date: Mon May 9 10:28:09 2005 +0000 Fixes for limits - introduced in previos commit commit 89895e559c05c44e538a732b1e072e28413ddc1f Author: Adam Dickmeiss Date: Mon May 9 10:16:12 2005 +0000 Changed semantics of zebra_set_limit. First parameter 'exclude' renamed to 'complement'. commit f967c55541a4adb26f43fc78f6bb7b98ebba6a32 Author: Adam Dickmeiss Date: Mon May 9 10:04:30 2005 +0000 Omit return stmt from void func commit 2da0f67191a2222daaecab6892082777b77b37f3 Author: Adam Dickmeiss Date: Fri May 6 18:59:35 2005 +0000 Fixed bug #321: zebra segvs if lock dir does not exist. commit 6b2166e712b20158a0aa0e577c331c7e94d8ec2f Author: Adam Dickmeiss Date: Wed May 4 12:53:05 2005 +0000 Make test for bug #317 commit 1f1106ca4cb980d93dec90480e25df75ddd59c4d Author: Adam Dickmeiss Date: Wed May 4 10:50:09 2005 +0000 Using zint for testlib hits. Extended sort test to test for bug #316. commit 2ca7b6bfd7e8d9a2cb9c36bf2520b46511a594eb Author: Adam Dickmeiss Date: Wed May 4 10:48:39 2005 +0000 Fixed bug #316: Numerical sort does not work for search. We copy all attributes for attribute+term to sort attributes. commit 5dd30bc682bf1338ed6beb1a485ccde86b06cc5a Author: Adam Dickmeiss Date: Tue May 3 14:04:31 2005 +0000 Make equivalent work with trunc=104, 105. Added test for it. commit 7724096e65524efc2e44fd9287a680a2b8c4f34b Author: Adam Dickmeiss Date: Tue May 3 13:57:44 2005 +0000 Fixed broken trunc=103, due to missing break stmt in switch. commit 30279ee0ba1d8afe0da4c03cee83e50696518279 Author: Adam Dickmeiss Date: Tue May 3 12:31:28 2005 +0000 Include XSLT libs in idzebra-config --libs output. commit 0e898c0c6183c6dd9701286f6a4ac9b734c9bdbb Author: Adam Dickmeiss Date: Tue May 3 09:11:34 2005 +0000 Extended the result set system. Added support for filtering/limits. on the rsiamb result set class. Re-iactored key control so that it is administrered by a proper "class". commit a5b3cefa3cf58a5fe2de76b4f0e36210edc8f091 Author: Adam Dickmeiss Date: Tue May 3 09:07:17 2005 +0000 Fixed a few printfs commit 039c0742c748c6e05611c0bc8a50390a785698ec Author: Adam Dickmeiss Date: Mon May 2 09:25:12 2005 +0000 Attempt to fix bug #305. More scan tests. commit f24d7d2fd56ec639ccd0d9c2f9628964ef72c078 Author: Adam Dickmeiss Date: Mon May 2 09:05:22 2005 +0000 Added scan test. commit ff84e9e985f187ebcc7bbb365027831fe3f970ad Author: Adam Dickmeiss Date: Sun May 1 20:43:11 2005 +0000 Doxygen stuff: added more about each module. commit 9b9f570a2960c2c8a7026b2faee943794b08ce49 Author: Adam Dickmeiss Date: Sun May 1 07:38:51 2005 +0000 Reorder declaration. commit aa9c7bcd6f5ec5a2523c40f929ebdc9d72c1b48a Author: Adam Dickmeiss Date: Sun May 1 07:17:46 2005 +0000 Make two xslt filters, "xslt" which does not split (reads whole XML doc) and does not depend on xmlreader. "xslt1" which splits on top-level and depend on xmlreader. xmlreader is unavailable in Debian woody (stable). commit aabb55c8b1c9e9c3076895f4eeb916019749d209 Author: Adam Dickmeiss Date: Fri Apr 29 23:09:57 2005 +0000 Doxygen fixes. Template for mainpage commit 2e3c91c03c8b603ba364154aa8449565886fc0d0 Author: Adam Dickmeiss Date: Fri Apr 29 23:09:30 2005 +0000 WS + reformat updates commit 165023b6c23ba526d756e780306a37ff25e01887 Author: Adam Dickmeiss Date: Fri Apr 29 21:48:02 2005 +0000 ignores more files commit 6333ee9bbec96e15997f155571e6342853cf458f Author: Adam Dickmeiss Date: Fri Apr 29 21:46:14 2005 +0000 Added this. commit 276a7ec32a38fb6c796d79d9d239039e8e6613ff Author: Adam Dickmeiss Date: Fri Apr 29 18:56:22 2005 +0000 Fixed bug #304: Fuzzy search = regExpr-2. commit 664413d3aab4207a0f895caa87c4a57b022e5998 Author: Adam Dickmeiss Date: Fri Apr 29 18:43:30 2005 +0000 Allow -vdebuglevel to be specified in scan test commit dc030e8fbc67937e0fa1812f6ce4a8ab728d092c Author: Adam Dickmeiss Date: Fri Apr 29 18:38:50 2005 +0000 Fixed bug #305: Scan with preferredPositionInResponse <= -2 crashes. commit e6297b9f1d2e5c0c551760b3499531a92ef4688f Author: Adam Dickmeiss Date: Fri Apr 29 10:54:45 2005 +0000 Return diagnostic "Scan: unsupported value of position-in-response" also if position > num. commit b8120f98b2ade67c1253da4b31e63368cd9d420a Author: Adam Dickmeiss Date: Fri Apr 29 10:37:12 2005 +0000 Fix log message added in previus commit. commit fa17ff183a984ff5d651c3446b25dd7986432afc Author: Adam Dickmeiss Date: Fri Apr 29 10:36:13 2005 +0000 Return diagnostic "Scan: unsupported value of position-in-response" if position is < 1. The rpn_scan could be modified to support any position since dict_scan can handle it. commit f7ad7a7efdffe5f1ff2cf36ad64cb6c10ebfed4f Author: Adam Dickmeiss Date: Fri Apr 29 10:33:53 2005 +0000 Remove a few YLOG_LOGs commit 5eab6e77e9795fad2ffc3cd6f00163f2a9573da9 Author: Adam Dickmeiss Date: Thu Apr 28 18:56:13 2005 +0000 Abort configure if invalid --enable-mod value is given commit d03ad0bbaf2bfd26b203c4b8a67483ed6f4d91ab Author: Adam Dickmeiss Date: Thu Apr 28 14:58:24 2005 +0000 Oops forgot this commit d3b2d38b8a8acdaa822e2f5b7470f58018aa2c74 Author: Adam Dickmeiss Date: Thu Apr 28 14:58:12 2005 +0000 No longer used (renamed to invalid.mbx). commit 187f5faa754557ecf0e89109081693c794897052 Author: Adam Dickmeiss Date: Thu Apr 28 13:34:05 2005 +0000 Use mode to switch between presentation format brief and indexing. commit ec0e8763c676e67054d9813b043ba9c5384a57ca Author: Adam Dickmeiss Date: Thu Apr 28 13:33:20 2005 +0000 Fixed set_param_int (did not append properly) commit e88cb2d3dbe83ae6c6a2529310e92ddd9be39509 Author: Adam Dickmeiss Date: Thu Apr 28 12:34:45 2005 +0000 Added test for adding XML content as buffer - not file. commit fd5356062a1e7ed5d750b8ffc97d0052c1c6af85 Author: Adam Dickmeiss Date: Thu Apr 28 12:34:21 2005 +0000 Pass the following args to XSLT during retrieval: schema, filename, score, size. Allow pass-thru option (without XSLT) using reserved Zebra NS (i.e. original XML is returned). commit 12aa5211e599a051eca016ff5747a244accff884 Author: Adam Dickmeiss Date: Thu Apr 28 12:13:04 2005 +0000 Added utility function init_extractCtrl to initialize sequence numbers for indexing. Reworked end-of-file signaling for indexing so that return code from file_extract_record really signals if end-of-stream has been reached. commit f24cd8a4e4caa9629e6320cfc81a57011c2e9d5e Author: Adam Dickmeiss Date: Thu Apr 28 11:25:24 2005 +0000 Get rid of global log_level. WS updates commit 45c685c8e3eeb840cfb941330508e82b2894b541 Author: Adam Dickmeiss Date: Thu Apr 28 09:32:09 2005 +0000 Remove unused members from file_read struct (sdr_..). commit 18f466a66abebb91634853a5eb2dc7cadc3c8ce2 Author: Adam Dickmeiss Date: Thu Apr 28 09:18:20 2005 +0000 Make the mailbox test as a program. commit 0f3b8bcc6fe2e3beeec7c834d9a64dca48a4f1b7 Author: Adam Dickmeiss Date: Thu Apr 28 08:20:39 2005 +0000 Added new fundamental filter 'xslt'. This filter reads XML records and uses LibXSLT for both indexing (extract) and retrieval (present). During indexing the filter generates a Zebra indexing record via XSLT which describes how Zebra is to index the record. Because the driver is XSLT driven it can use any X-Path plus logic behind the scenes and is thus more powerful than xelm/elm in .abs. The XSLT can accept parameters from Zebra. For example, if a date is received the filter could make a date index. The filter also uses allows splitting of XML records during indexing, so that MARC collections can be indexed directly (but it is quite limited and takes place before XSLT is invoked: XSLT requires a DOM structure in memory). Refer ot example test case in in test/xslt. commit 0955b9f1ed141bfc60beb7afd63a790aa6525a23 Author: Adam Dickmeiss Date: Thu Apr 28 08:12:28 2005 +0000 Remove unused var commit c8b510c1c66a9119ede10b63975fc5f7f1ea49f5 Author: Adam Dickmeiss Date: Tue Apr 26 10:09:38 2005 +0000 Remove the obsolete rset public control variables. WS updates. commit 4af6d9d39d87a0121958ff33b413748377163d68 Author: Adam Dickmeiss Date: Tue Apr 26 08:11:22 2005 +0000 Use Bib1-attribute defines. Minor WS-updates. commit a44867f8aeac3dceaaf3e2ed01af29b6a678b471 Author: Adam Dickmeiss Date: Mon Apr 25 21:40:34 2005 +0000 Refactoring. Let more search utilities return ZEBRA_RES rather than RSET. WS updates. commit fee10afdae5bbc7cd0ea61dd6e74df579a20106f Author: Adam Dickmeiss Date: Mon Apr 25 11:54:08 2005 +0000 Optimize multiple binary ANDs + OPs to multi ANDs, ORs. commit 3b3dd7d754a7280fa83c099862d3a3f201ed0f12 Author: Adam Dickmeiss Date: Mon Apr 25 10:45:28 2005 +0000 Remove unused var commit 5304823b6d0dd99b7878937301a7639b4f2eca87 Author: Adam Dickmeiss Date: Mon Apr 25 10:42:08 2005 +0000 Remove assert: if end-of-stream PP may not be leaf commit b8e7314298fa5e61a64deb55ec51a619fd6b4869 Author: Adam Dickmeiss Date: Sat Apr 23 16:30:58 2005 +0000 Fixed bug #282: xml tag named 'var'. Also made the grs.sgml filter ignore sections so they are not treated as regular elements. commit bb2aa2352ac7ee2d8fcdbbb7528e62c7ba7a8ce1 Author: Adam Dickmeiss Date: Wed Apr 20 10:21:29 2005 +0000 Remove fprintf commit 77f01f9b79fd08a6841cf6fdf0a8802cbcdefe5b Author: Adam Dickmeiss Date: Wed Apr 20 10:20:32 2005 +0000 This test checks for bug #281 as well. commit 647212270fdb2030f6a1ab1f9880874f531847b2 Author: Adam Dickmeiss Date: Wed Apr 20 10:18:19 2005 +0000 Allow do_query(_x) to accept exphits of -1, which means any number of hits but OK. commit edcd2c238dd59430ef9933f56fdce1631dad323e Author: Adam Dickmeiss Date: Wed Apr 20 10:17:14 2005 +0000 WS updates commit 0857db29ad5ef1b1ebd9e6bf311e1b446b15586a Author: Adam Dickmeiss Date: Wed Apr 20 10:16:29 2005 +0000 Removed a few log entries commit 008d2cf0f073cb1e77fe14db18ce07e0c3b5d176 Author: Adam Dickmeiss Date: Wed Apr 20 10:15:19 2005 +0000 Fixed bug #281: heap truncation fails. Problem was thattermid parameter was set for "sub" result sets.. that when counting hits/ranking etc is no longer available. termid now only set for top set. commit 32411af8c3defde4eaa0cbf6e1abad4eff12fbc3 Author: Adam Dickmeiss Date: Wed Apr 20 08:32:36 2005 +0000 WS cleanups. Added setting trunclimit and truncchunk to adjust the truncation code limits. commit 832542c8592480b997ec80fedbe4d9a9cb2ecaca Author: Adam Dickmeiss Date: Tue Apr 19 08:44:30 2005 +0000 Rename prototypes isc_ -> isamc_ commit f6dbdf7151bbdfaf47ec281a71ed6ef49b596f29 Author: Adam Dickmeiss Date: Mon Apr 18 08:05:28 2005 +0000 WIN32 compile fix commit 49d0ee122a9f86ec2967b577dcc297c501785edd Author: Adam Dickmeiss Date: Fri Apr 15 10:47:47 2005 +0000 Many public functions returns ZEBRA_RES rather than int to avoid confusions about succeeded/failed requests. Query parser more picky about unsupported relation attributes. commit 316086745a698f6c5a5e64a285cf1e764e3315b0 Author: Adam Dickmeiss Date: Thu Apr 14 12:02:58 2005 +0000 Reserved element set _sysno_ returns sysno for record commit b27fc3cd78e802f8c50354e527bf4ce902171486 Author: Adam Dickmeiss Date: Thu Apr 14 12:02:08 2005 +0000 Cosmetic commit 9a6e6e95d703c4f42f83e969404daa74ef7e2c20 Author: Adam Dickmeiss Date: Thu Apr 14 12:01:50 2005 +0000 Test case for retrieval out of range of sortmax. commit ca689b51081914dd8a62c08844e4d4b23fc33b26 Author: Adam Dickmeiss Date: Thu Apr 14 12:01:22 2005 +0000 Fix bug in retrieval code. If present request was out of sortmax range it would not return all hits (or report error). commit 3b2776240fdaec214a1046cdc0b9c45f2fc88a14 Author: Adam Dickmeiss Date: Thu Apr 14 09:03:24 2005 +0000 Supply string attribute in additional info when scan fails with unsupported use attribute. commit 4996e114d85dc25968183c60b5796f09475bf921 Author: Adam Dickmeiss Date: Thu Apr 14 09:02:40 2005 +0000 Cosmetic. commit 0efbb49dac8beff78bd761fd2da9e18e54797526 Author: Adam Dickmeiss Date: Thu Apr 14 07:48:57 2005 +0000 Fix uinitialized var in test commit ecf94fc25324414287d3bbfbeba4440e558edd17 Author: Adam Dickmeiss Date: Wed Apr 13 13:03:47 2005 +0000 Get rid of typedefs iSAMS_P, ISAMC_P, ISAMB_P and use ISAM_P instead. commit 9bc03f3bb7b1f86ab509082cfc0791f6d0f823a8 Author: Adam Dickmeiss Date: Wed Apr 13 08:52:26 2005 +0000 Added zebra_scan_PQF. commit fdbaae03ebe22fb5ede3b0e857fe7691e1d55b28 Author: Adam Dickmeiss Date: Wed Apr 13 08:52:01 2005 +0000 Scan using string attributes commit 3d2e3daede3f1e4a0b17e0d2d4e60aea6390e287 Author: Adam Dickmeiss Date: Fri Apr 1 10:15:13 2005 +0000 Fix parallel build commit ec020ffecd27c2569cb69ba155a93f6183426627 Author: Adam Dickmeiss Date: Thu Mar 31 12:55:55 2005 +0000 DISABLE_SHARED again (for now) commit 3c4d4c20c0735741737e66cf8d270a87fa7eb58e Author: Adam Dickmeiss Date: Thu Mar 31 12:42:06 2005 +0000 Added tempalte filter for the ALVIS project. Added new version member for struct recType. commit 0d1f1699d41eec211295db7e1cdaae5bc1104837 Author: Adam Dickmeiss Date: Thu Mar 31 12:20:06 2005 +0000 Add module path for safari test commit deff57cfa9d9b39c4a4f1c9b82a64c6e61d821a4 Author: Adam Dickmeiss Date: Wed Mar 30 09:25:23 2005 +0000 Moved zebrautl.h to idzebra/util.h. Implemented bf_xpen, bf_xclose that opens/closes a BFile with magic header and managed block free list handling. bf_alloc/bf_free performs the block allocation. commit 8374209906a1ff4f2b0f9a855f67af2b460dfea4 Author: Adam Dickmeiss Date: Mon Mar 21 17:20:54 2005 +0000 Fixed bug #275: Leaf node split problem(s). commit a3b63c6d6e93131e388dfd86953e3df1275a6b86 Author: Adam Dickmeiss Date: Fri Mar 18 12:05:11 2005 +0000 Fix a bug where second-half of block in leaf split could become larger than max block size. commit 7f1be056d02d78487e9589f44177d683dbfa9fee Author: Adam Dickmeiss Date: Thu Mar 17 09:48:46 2005 +0000 Do not warn about empty records commit 004bd919116b88cd6dfd0594de51bde7d62296be Author: Adam Dickmeiss Date: Thu Mar 17 08:31:53 2005 +0000 Fix declaration of zebra_get_bfs. commit d609724b63e4c82cf94a02bf7a8b40a33254a250 Author: Adam Dickmeiss Date: Thu Mar 17 08:31:28 2005 +0000 Do not warn about empty records unless they are marked as new. commit 3921e1ac4b8cbf5c9a36ed230912f51e11f4a267 Author: Adam Dickmeiss Date: Thu Mar 17 07:54:23 2005 +0000 Added zebra_get_bfs to get BFile handle for session commit 5cc048d68e36e2d4d79ed7a7d7efec4266039351 Author: Adam Dickmeiss Date: Wed Mar 16 15:26:37 2005 +0000 Honor fileVerboseLimit for zebra_add_record (buffer_extract_record) commit 0cac58c528d39e9838a4ee6e3f76bc5ca6bd30bf Author: Adam Dickmeiss Date: Fri Mar 11 17:56:32 2005 +0000 Implemented the 'equivalent' directive for .chr-files. commit c3cdbb99e17d1f4d438bf9ee65391b24484ce88d Author: Adam Dickmeiss Date: Wed Mar 9 13:45:29 2005 +0000 Dont log print by default. commit a9e90f22d2cefbafc9d490a03a3bc7d1b75d57ee Author: Adam Dickmeiss Date: Wed Mar 9 12:14:42 2005 +0000 Several updates for the changes of hit count datatype from int to zint (long long or long). commit 71ef94163cc848e4ed12965238087d2505c42c05 Author: Adam Dickmeiss Date: Tue Mar 8 14:41:37 2005 +0000 Fix endless loop in log2_int for negative values for input commit 8ed385caafd1d9695a5a9c0783f0dbe2a53f3e80 Author: Adam Dickmeiss Date: Tue Mar 8 14:02:08 2005 +0000 Added a few casts from zint to double/int where appropriate. Change a few types from int to zint. Out parameter hits in zebra_search_.. changed from int * to zint *. commit 20b140c237f2b6f049ab5fc828c617f0f6eee6c0 Author: Adam Dickmeiss Date: Sat Mar 5 11:35:18 2005 +0000 Added include of ctype.h and added a declaration. commit b09c1d0aa414cb43fb667be54a29b3cc7279ea85 Author: Adam Dickmeiss Date: Sat Mar 5 09:19:14 2005 +0000 String attribute support for record filter interface. commit d27bfe71f168747a2273d2f91ac04c315ae6e47d Author: Adam Dickmeiss Date: Fri Mar 4 12:00:06 2005 +0000 buildconf script configures directlry when -d / -c is given commit 4e0c3427c48f694de513318f2bd6d3470428fc88 Author: Adam Dickmeiss Date: Fri Feb 25 10:08:44 2005 +0000 Added two else-statements in seldom used term structure handling code. commit 137b7070fefab44194e844b21d2e523c1c0f41a5 Author: Adam Dickmeiss Date: Tue Feb 8 00:59:59 2005 +0000 Mention init command commit 96f2ba71b5c9042a90ca94ea84a79cd89a2957d5 Author: Adam Dickmeiss Date: Tue Feb 8 00:36:08 2005 +0000 Added support for string components in simpleelement specs. Supported formats are: element[@attr=value] _or_ element[@attr] _or_ element If a simpleelement begins with ! the nodes are excluded (instead of included). Exclusion only makes sense if a larger node set is included _first_. commit 724a7b03b740187d1f68e3b97dcadd5169381bce Author: Adam Dickmeiss Date: Wed Feb 2 19:37:27 2005 +0000 Fixed bug #262: spaces in control fields in MARC returned commit d273c516841743aa88638024f9e6a8b1b6e3d622 Author: Adam Dickmeiss Date: Wed Feb 2 08:03:22 2005 +0000 Fixed bug #259: Second indicator lost in MARC records commit e71f9725fdb39042cd0d2d3b468085c66e352e8d Author: Adam Dickmeiss Date: Mon Jan 24 14:44:23 2005 +0000 More comments commit 38b3ab356ed3af9098cab18e41bca206def200b3 Author: Adam Dickmeiss Date: Sun Jan 23 12:36:27 2005 +0000 Put code that deals with default database selection in separate function zebra_select_default_database. Since database affects register we must call it in zebra_begin_trans, zebra_commit_ex, zebra_init. commit ccabffc112ba33841d636522046c9ce4f02152c2 Author: Adam Dickmeiss Date: Sat Jan 22 12:20:34 2005 +0000 Renamed API function zebra_deleleResultSet to zebra_deleteResultSet. commit b9d6210c039df8f2832ac0cee7be1e6dc1833a2f Author: Adam Dickmeiss Date: Fri Jan 21 19:07:25 2005 +0000 Doxygen comments commit 591f23727b1804a0fa57f7b3c8f02a73df39d8d2 Author: Adam Dickmeiss Date: Fri Jan 21 18:41:19 2005 +0000 Renamed API function zebra_deleleResultSet to zebra_deleteResultSet. commit cab0ac043896bc95349ae4ccc10b58251e0b526e Author: Adam Dickmeiss Date: Fri Jan 21 13:23:25 2005 +0000 Fixed bug #253: Setting group.database not honored. commit 5b075eaada4ac72aa62b52788dbc0ad31c261270 Author: Adam Dickmeiss Date: Fri Jan 21 13:19:25 2005 +0000 A few more Doxygen comments commit 442d401f2a05df0bfbb6a7d43eb30a85fc6fe180 Author: Adam Dickmeiss Date: Fri Jan 21 13:06:43 2005 +0000 Add range/first modifier in test commit 7c7aeb7843c5bec48a8928f07f6498fc12b3eb72 Author: Adam Dickmeiss Date: Mon Jan 17 22:32:16 2005 +0000 Reworked source parser for termlists in .abs-file. Added 'first' function that returns position of a needle in haystack. commit cf22d9136ae778877b227aa9d47dc3856a6d9149 Author: Adam Dickmeiss Date: Mon Jan 17 22:12:34 2005 +0000 Fix leak data1_iconv commit 8f261393d79c2d7b7bf5fb81a4288c45481f72f7 Author: Adam Dickmeiss Date: Mon Jan 17 18:58:10 2005 +0000 Moved AC_CHECK_HEADERS near top. Added unistd.h in check commit f00e10dfcb19faeeabb42c5532f4b47f5548be97 Author: Adam Dickmeiss Date: Mon Jan 17 01:21:43 2005 +0000 Fix bug #249: rstemp sets fail. Problem was that rset files were closed when they shouldn't. Added function rfd_is_last that returns 1 if the RSFD supplied is the last one; 0 otherwise. Added a use_list member in the RSET which is a list of RSFDs in an RSET (opposite of free_list). This means we can track RSFD leaks. commit d01bdeea950f667ea0ab4eaea212ac6d04f4d97a Author: Adam Dickmeiss Date: Mon Jan 17 01:16:37 2005 +0000 WS update commit 11158b087bc26a7bf07cb9a25db2720afaef1bd2 Author: Adam Dickmeiss Date: Mon Jan 17 00:01:51 2005 +0000 WS updates. Fix rstemp file open commit b5421e844f3a942161a2cf6dc9ce4e6f319ddb5e Author: Adam Dickmeiss Date: Sun Jan 16 23:38:34 2005 +0000 Added include stdlib.h commit 9bcaa7e6827f4147d071551c4b03aca2e1d473d7 Author: Adam Dickmeiss Date: Sun Jan 16 23:33:31 2005 +0000 Added stdlib.h again commit 2a0dfef5445280fb460590123807ff73016f1ca4 Author: Adam Dickmeiss Date: Sun Jan 16 23:28:16 2005 +0000 Include sys/types.h instead of stdlib.h commit 8add234f71c852fd95ca3aef168e3563265c93b9 Author: Adam Dickmeiss Date: Sun Jan 16 23:14:56 2005 +0000 Added include stdlib.h a few places to get prototype for atoi/exit/.. commit f705f23dc3c69f8be30e084c9689035268c45850 Author: Adam Dickmeiss Date: Sun Jan 16 23:14:27 2005 +0000 Added more Doxygen comments commit 540488a41a6ebc8a661c5517bc269705b8990a11 Author: Adam Dickmeiss Date: Sun Jan 16 23:13:06 2005 +0000 Add include sys/types.h to get off_t commit 90baac18fe65226ec366b0626ee0ad8e18a4c0d7 Author: Adam Dickmeiss Date: Sun Jan 16 20:19:20 2005 +0000 Added make cvs2cl that makes Changelog from CVS in Zebra 1.4 series commit 5369bc0406c56d966ed3d03d5683c283500a0379 Author: Adam Dickmeiss Date: Sun Jan 16 01:22:14 2005 +0000 WS update commit 9d840b825ab6011f2714bd4b4f81e453a3955a2d Author: Adam Dickmeiss Date: Sun Jan 16 00:30:59 2005 +0000 Bundle zlib1.dll commit eb0854052ca0ac9c555683b28a38efecc090cb77 Author: Adam Dickmeiss Date: Sun Jan 16 00:27:54 2005 +0000 Upgrade to Expat-1.95.8 commit c9b0b1f7c2794ef7fd87d4e520ebf2f61fd5bd02 Author: Adam Dickmeiss Date: Sun Jan 16 00:00:29 2005 +0000 Copy all DLLs from YAZBINDIR. Add rule to copy iconv.dll automatically commit fa9e852d06160cc6420c6f6091f4e482cf18e63a Author: Adam Dickmeiss Date: Sat Jan 15 22:13:14 2005 +0000 Fix spelling that made WIN32 comp. fail commit 2bd602254c9277bba8d86caf3cb97706d3939e3c Author: Adam Dickmeiss Date: Sat Jan 15 22:10:16 2005 +0000 A few Doxygen doc entries commit 40e64fc6d452f02389a00e5c8004f895342099c2 Author: Adam Dickmeiss Date: Sat Jan 15 21:45:42 2005 +0000 Renamed Set utility to DFASet, since this is tied to the DFA module. Renamed include/set.h to include/dfaset.h. Using YAZ_BEGIN_CDECL for public headers. Removed str.h . It is not used anywhere. commit 174ad2c7bbf2b7312ac080de2fd85d0509a55404 Author: Adam Dickmeiss Date: Sat Jan 15 21:43:40 2005 +0000 Added Doxyfile. commit 98912d364cb21abf4c2f3229d5578e2a3159f616 Author: Adam Dickmeiss Date: Sat Jan 15 20:47:15 2005 +0000 Fixed bug #165: Use multi-and and multi-or always. WS cleanups. commit fd5a92c4647b31b2b52ab9990934f45b0ff65718 Author: Adam Dickmeiss Date: Sat Jan 15 19:56:54 2005 +0000 WS change. (not code changes) commit 8fafd292dc52bbda380ba23789e676a887c7080a Author: Adam Dickmeiss Date: Sat Jan 15 19:42:07 2005 +0000 Bump year commit 6c9fcd3b5d3108702fa1ffc92dab4ab6060f9a19 Author: Adam Dickmeiss Date: Sat Jan 15 19:38:17 2005 +0000 Bump year. Change Aps->ApS commit 0aa335e5f7fddc3b5996598de19113ddf3050a07 Author: Adam Dickmeiss Date: Sat Jan 15 19:22:27 2005 +0000 Fixed bug #160: rpn_search_APT_and_list hard-codes a limit of 60. The limit is still a hard-limit. Now set to TERM_LIST_LENGHT_MAX = 256. Code checks for limit so no vulerabilities. commit bac81624d39f1ede307782dd7dcf8fcc7ef14d90 Author: Adam Dickmeiss Date: Sat Jan 15 18:53:46 2005 +0000 Pre C-99 declarations. commit 407d3ca3408a0b117616ca9c6fe92531d3b10d6c Author: Adam Dickmeiss Date: Sat Jan 15 18:43:05 2005 +0000 Fixed bug #113: Compress upper nodes in isam-b. commit 6989551b965aea847612bdaf4988bc8c36ba8627 Author: Adam Dickmeiss Date: Sat Jan 15 13:18:17 2005 +0000 Fixed bug #161: Fix Zebra compile on Windows commit ebb81679f96e02570bc786f0e1e2b82e6a041f3d Author: Adam Dickmeiss Date: Sat Jan 15 13:14:54 2005 +0000 Use ifdef IDZEBRA_STATIC_GRS_SGML for grs.sgml filter commit d2a54c2374f536a3fe635053b6664225a88d2f43 Author: Adam Dickmeiss Date: Sat Jan 15 13:03:29 2005 +0000 Added a few (zint)->(int) casts commit d195e3229385349f842d2f82b65ad8118d64aec5 Author: Adam Dickmeiss Date: Sat Jan 15 13:02:40 2005 +0000 Fix compilation error that occurs when HAVE_MKSTEMP is not set commit 5a9efaa5b4066dff96013a93f6e135e94e806d5c Author: Adam Dickmeiss Date: Sat Jan 15 13:01:49 2005 +0000 Use strchr instead of index commit a20bcb4d51f52c78700de2bdd99569ee37a40480 Author: Adam Dickmeiss Date: Fri Jan 14 09:52:42 2005 +0000 Do not print meta section for empty titles commit 4f992a15af3e29dfc561c4cfa4841ec0f858e7c8 Author: Adam Dickmeiss Date: Thu Jan 13 11:55:02 2005 +0000 WS changes commit 7864df5ec2f89863d32ecb6077daf1f21ec5cd9b Author: Adam Dickmeiss Date: Wed Jan 12 09:58:24 2005 +0000 Factor out listener address. commit 91f3276e52330d79dbeca2fb228c8837afcf9130 Author: Adam Dickmeiss Date: Tue Jan 11 14:03:04 2005 +0000 Fix log that could print NULL term commit 5794578fd142257ee866a4cb1b8fe196ea72f04d Author: Heikki Levanto Date: Fri Jan 7 16:53:39 2005 +0000 First version of the unified isam interface. Still some FIXME's around commit 3b98e1f4a4bed33d9ceae08db3139791078991e4 Author: Adam Dickmeiss Date: Fri Jan 7 14:44:54 2005 +0000 Fixed bug #245 commit 91b1f9f7ebbfef318d122f873db520a91ee50908 Author: Heikki Levanto Date: Thu Jan 6 11:13:10 2005 +0000 Removed an unnecessary declaration that gave a warning commit d00ca72690f01775ed98edfab2c9aee48d2e72d7 Author: Adam Dickmeiss Date: Wed Jan 5 00:13:20 2005 +0000 Do not include dlfcn.h commit 93d44a21d1aa585bb7f68d23a7590fc38ccb62a6 Author: Adam Dickmeiss Date: Wed Jan 5 00:10:19 2005 +0000 Check for dlfcn.h presence commit 175b76c4c1d086a2003d725bd9b56937dd4d1b32 Author: Adam Dickmeiss Date: Tue Jan 4 23:12:34 2005 +0000 Add examples/marc21/Makefile commit aeecc14b36d7d98f8d08fdbe5596d0b0ce946b03 Author: Adam Dickmeiss Date: Tue Jan 4 20:03:11 2005 +0000 Make marc21 example part of dist commit e3516c0003a563cf19a65326fca6241b0874b4d4 Author: Adam Dickmeiss Date: Tue Jan 4 20:02:54 2005 +0000 Make marc21.abs part of dist commit 8593daa76347981fac84c670ddf2880b1d4502c1 Author: Adam Dickmeiss Date: Tue Jan 4 20:00:20 2005 +0000 Remove unset var commit da7ec5aeb777e91acfc650f004e8d51a75115e40 Author: Adam Dickmeiss Date: Tue Jan 4 19:59:59 2005 +0000 Make default value for local r commit 8b73f86fff82af8bde3386eb2b6341483c89a768 Author: Sebastian Hammer Date: Tue Jan 4 19:10:29 2005 +0000 Added text commit b8d42085994bd1f27fe3565866b17285d4708c5f Author: Sebastian Hammer Date: Tue Jan 4 19:08:24 2005 +0000 Added description of 'melm' directive in absyn file commit 99f41dffa76b9a9c83aaf0457d1f0993eff63e00 Author: Sebastian Hammer Date: Tue Jan 4 17:03:22 2005 +0000 Added Marc21 examples commit 99defe97019ab3450305ca5298f7fda324361f72 Author: Sebastian Hammer Date: Tue Jan 4 16:50:03 2005 +0000 Added entries for melm/marc21 commit 66dcdacd4697717821e0562d15cadad86727a414 Author: Sebastian Hammer Date: Tue Jan 4 16:48:03 2005 +0000 Added commentary commit fc98ad57efa9022e772e1c22b7169c1faf4345e6 Author: Sebastian Hammer Date: Tue Jan 4 16:44:29 2005 +0000 Added Bath-based (level 1) config file for marcxml commit bc69879777443f6a65ede7dea9d46374de1c0bcd Author: Sebastian Hammer Date: Tue Jan 4 16:28:34 2005 +0000 Added support for 'melm' directive commit 5b79d46da9455cea15809443c9290376df384873 Author: Adam Dickmeiss Date: Mon Jan 3 19:33:22 2005 +0000 Cast pid type to long for printf format commit 03ada04bea71af9a1c6b6bb2cfed660e21775fdb Author: Adam Dickmeiss Date: Mon Jan 3 19:27:53 2005 +0000 Cast to unsigned char for ctype is.. compare commit 03b7cf6c23d28f8762eeb6bb4e415c52b2ebfc4e Author: Adam Dickmeiss Date: Mon Jan 3 12:10:23 2005 +0000 Use UTF-8 char in search commit a692aad104901f14ecb713bf85940117c68108e7 Author: Adam Dickmeiss Date: Mon Jan 3 12:08:04 2005 +0000 Use unix:socket instead of localhost:9901 commit 9352bc51ad89424a299ef67def1fb20436682a85 Author: Adam Dickmeiss Date: Mon Jan 3 11:02:42 2005 +0000 Fixed bug #246 commit 707115ebbe83ce68bf6162b5a0ebc43b022a2f31 Author: Adam Dickmeiss Date: Mon Jan 3 09:23:25 2005 +0000 Fix odd/even delete test commit 6cc6c9be5dd96693ad594072f6a7c16bd59e4a78 Author: Adam Dickmeiss Date: Mon Jan 3 09:19:26 2005 +0000 Assume PID file has been created just after server has started commit 7932a969b3849997dfc607686b19fab1637cd26e Author: Adam Dickmeiss Date: Sun Jan 2 23:24:07 2005 +0000 Proper assert for sub entry size commit 339db25a87b77481458e80a2b932f7161fe597c6 Author: Adam Dickmeiss Date: Sun Jan 2 23:21:31 2005 +0000 Use YAZ GFS PID file instead of zebrasrv.pid commit a7138d8cfaa70cfe8d2e7ab4cc05cb5bbe7a7639 Author: Adam Dickmeiss Date: Sun Jan 2 23:03:58 2005 +0000 Fix use of sscanf for zint commit 44ef59f8931ab98331a15e0f15abe2b7b9200260 Author: Adam Dickmeiss Date: Sun Jan 2 20:11:46 2005 +0000 Fix problem with codec check commit 1e58ebd4607490d810c7396a4e87eb70d9528166 Author: Adam Dickmeiss Date: Sun Jan 2 18:51:31 2005 +0000 Swap functions - minor changes to compare tst function commit 83bf26c44f20a65c1a07e1fcb59649540a3c2193 Author: Adam Dickmeiss Date: Sun Jan 2 18:50:53 2005 +0000 Allow ISAMB_PTR_CODEC=0 to work commit 108519e957961eea3ecf05bb064fac6f3d7db7ad Author: Adam Dickmeiss Date: Tue Dec 21 22:02:28 2004 +0000 Change character conversion steps for grs record retrieval. By default, MARC records and other unstructured types as far as Z39.50 is concerned do not exposed to character set conversion unless charneg is in effect (and records selected is YES). commit be946e8fca9b807679467d508ccfe0f4b450f2d0 Author: Adam Dickmeiss Date: Tue Dec 21 22:00:57 2004 +0000 Added zebra_octet_term_encoding that specifies encoding for search octet string search terms. Default record encoding is NULL - not ISO-8859-1. This potentially breaks some applications, but it allows for _no_ character set conversion for MARC records and others. commit eb6f5a00932fd50cb95aca3c1dd5039116254f4b Author: Adam Dickmeiss Date: Tue Dec 21 21:55:58 2004 +0000 Dont log each indexed entry commit 0bd11612f03796bf5d05ad76ca716abc63d05bf2 Author: Adam Dickmeiss Date: Tue Dec 21 17:18:29 2004 +0000 Add currentdir . to profilePath commit 4fcd66acda788111e42e313384d1f9d35a98c1c9 Author: Adam Dickmeiss Date: Sat Dec 18 21:56:34 2004 +0000 Fixed bug #241: Zebra 1.4 Modules fails to link. Bug was caused by nonportable use of tr. commit cf7ec53452a6180dad6592df0458ac56a3b7963b Author: Adam Dickmeiss Date: Wed Dec 15 13:07:07 2004 +0000 Added case for bug #235. Submitted by Roel de Cock. commit 39c4f4a6ae9f8e7eef4e2b93fad959be5ca3ee09 Author: Adam Dickmeiss Date: Wed Dec 15 09:10:47 2004 +0000 Get rid of tex messages commit 6553d554c426c2184c02a287b77f9e24ae70fdc1 Author: Adam Dickmeiss Date: Tue Dec 14 11:23:32 2004 +0000 Check for filter grs.xml when appropriate commit 331f05f608e3d45c11adce71f767e38e173e8f40 Author: Adam Dickmeiss Date: Tue Dec 14 11:23:15 2004 +0000 Added utility check_filter which checks for filter and exit(0) if it does not exist - but warns in log. commit 84b6283b3a13ae2aa4ce41dd8d3dded2ed7bca3e Author: Adam Dickmeiss Date: Tue Dec 14 10:53:49 2004 +0000 Do not run rusmarc test if koi8-r to utf-8 is unsupported commit fdc941154d663ae4cd0e54f2a8a1b82ca811e567 Author: Heikki Levanto Date: Tue Dec 14 10:37:25 2004 +0000 Added a declaration for get_srcdir commit 44c9cb83b1cf121aad11603b14231709288257be Author: Heikki Levanto Date: Tue Dec 14 10:30:42 2004 +0000 Including log.h to avoid a warning commit 1d58d72b93e6c7a486c7b2373f755a1a414e472f Author: Adam Dickmeiss Date: Tue Dec 14 09:49:24 2004 +0000 Added commit 29b4d50820806980bcde3f77a59832bf37aefa52 Author: Adam Dickmeiss Date: Tue Dec 14 09:47:55 2004 +0000 Added test/espec commit 4eb3b54bb2ca9af74f39f000d3d40dba99ded887 Author: Adam Dickmeiss Date: Mon Dec 13 20:51:27 2004 +0000 using yaz/log.h again commit 70ac1af85bfc3ed5298ee657a280a253be57469f Author: Heikki Levanto Date: Fri Dec 10 12:37:07 2004 +0000 Cleaned a bit more logging commit eab4cdc5571ca8811ebaae09358b223b7debc02f Author: Heikki Levanto Date: Fri Dec 10 11:56:21 2004 +0000 Not using the deprecated yaz-util.h any more commit 088dcd4065daaa14909fb3517d7c320b6cb1dcd8 Author: Adam Dickmeiss Date: Wed Dec 8 14:37:44 2004 +0000 Ignore .mf commit 304978642b62ccc975bf55f09df08b24373db753 Author: Adam Dickmeiss Date: Wed Dec 8 14:34:10 2004 +0000 Ignore programs etc commit 3d7c759cb74114fbab499c4cae53124ecb94f372 Author: Adam Dickmeiss Date: Wed Dec 8 14:32:17 2004 +0000 Ignore programs commit 0e56fa84bb4a5985c19a21926e86862c08d84689 Author: Adam Dickmeiss Date: Wed Dec 8 14:02:36 2004 +0000 Moved isam headers to include/idzebra. commit 3ba097accecfc6ff9b7620d580314a83568c0f27 Author: Adam Dickmeiss Date: Wed Dec 8 13:59:17 2004 +0000 email2.flt onemail vm vm2 part of dist commit d1a3f18845e937b0ff8065a624436de80a4cf57b Author: Adam Dickmeiss Date: Wed Dec 8 13:48:12 2004 +0000 Remove unused files commit f43c4a6c57e62f782c663b6e7b7f5dfdf7eadf7d Author: Heikki Levanto Date: Wed Dec 8 13:44:24 2004 +0000 Added the forgotten filter. And a small test file that hangs commit 05b9b8ed020c5bfa48a913d6a2e2b50ddf1bab8e Author: Adam Dickmeiss Date: Wed Dec 8 12:23:08 2004 +0000 Move/refactoring of public interfaces.. Dictionary now public. Private header dict-p.h added. Block File now public. Private headers mfile.h moved to away from include. commit 2a1a13bee8b26c95cbbccc9c4a00987b17baa60c Author: Adam Dickmeiss Date: Wed Dec 8 12:17:33 2004 +0000 Ignore all .log commit d5f24c652e5d95dcdd5d3dc8ba741600a7ac6f4f Author: Adam Dickmeiss Date: Wed Dec 8 11:41:53 2004 +0000 email2.flt not in CVS, so not part of dist commit aafb46ff7785fe25c94e43bcf987839a668a45eb Author: Adam Dickmeiss Date: Wed Dec 8 09:12:50 2004 +0000 Put test/mbox/Makefile in configure.in so that it compiles commit c50cc2f57afed0c8ef8b6205fe9187a7b6260f73 Author: Adam Dickmeiss Date: Tue Dec 7 20:04:39 2004 +0000 Fixed bug #232 commit 23a280ccc573215c819ac40c1fe674957503b8f9 Author: Heikki Levanto Date: Tue Dec 7 15:45:13 2004 +0000 Added a test case for the newly found bug #234 commit 93005164002b9a57d3318ef42791fb8fb763f67b Author: Adam Dickmeiss Date: Tue Dec 7 14:57:08 2004 +0000 Making test to illustrate bug #232 commit 2539a52e665c013f231a61d260b7404edb9e8786 Author: Adam Dickmeiss Date: Sat Dec 4 01:48:26 2004 +0000 Faster tests. commit def5926f92384bf3acfcfa889e80cc167d7c5a3c Author: Adam Dickmeiss Date: Sat Dec 4 01:38:50 2004 +0000 Refine test and make it more portable. Use YAZ's daemon mode. Use kill -CHLD to check if a process with PID exist (instead of ps -p). Use unix:socket rather than tcp:port. commit 3f98e1f5f48b3aaaa496ac92127dff0ff3fe48cc Author: Adam Dickmeiss Date: Sat Dec 4 01:08:33 2004 +0000 Test uses api rather than server&client commit e28a5dd2c7ab09f8b6841bf82c316dc84c35494b Author: Adam Dickmeiss Date: Sat Dec 4 00:51:39 2004 +0000 Test uses api rather than server&client. commit b4a743f2f07e693a8863c99c670668db35b0ddbe Author: Adam Dickmeiss Date: Thu Dec 2 17:43:04 2004 +0000 Do not use sub directories for test. commit 9d961069395f4ff45425de0fa847312dcb88a189 Author: Adam Dickmeiss Date: Thu Dec 2 17:27:03 2004 +0000 Added zebra_meta_records_create_range commit 07629039bf5999c3afa1c4876e9ebdf55fdbc85f Author: Adam Dickmeiss Date: Thu Dec 2 17:26:53 2004 +0000 Removed unused file. commit 8f170520029ded9cf0b7600f5ae07ecf73a9a34d Author: Adam Dickmeiss Date: Thu Dec 2 15:02:52 2004 +0000 sort test now using api commit a34c87ac6c08ec62534e4068a5bd1fac93df8abe Author: Adam Dickmeiss Date: Thu Dec 2 14:05:01 2004 +0000 Move X-Path tests to xpath subdirectory. commit 34c9e6d1eb1fdb87872d35538106b15e613cdd3d Author: Adam Dickmeiss Date: Thu Dec 2 13:59:08 2004 +0000 charmap test using api commit 2fce83d6949f3117dfa6591cf6e9351a111b6ae1 Author: Adam Dickmeiss Date: Thu Dec 2 12:08:39 2004 +0000 Remove unused stuff commit fac482cae7850747d73866d388c1f64954d700d1 Author: Adam Dickmeiss Date: Thu Dec 2 12:04:49 2004 +0000 Convert tests to programs commit 9af25502b9e14213d1d44e99e38f752c3a174b44 Author: Adam Dickmeiss Date: Thu Dec 2 11:28:20 2004 +0000 Cosmtic changes. No code change in actual code commit a4b443f306e458e42811b332b0bb75affa1a2e46 Author: Adam Dickmeiss Date: Wed Dec 1 11:37:45 2004 +0000 Reduce logging for indexing commit 39cb125e7755c6058a93dada8d5172804213cf8e Author: Adam Dickmeiss Date: Mon Nov 29 21:55:25 2004 +0000 Add support for section/chapter indexing. Add safari filter. commit e505b6cf2a7f6821264d82cd2e8869b2be38d0b2 Author: Adam Dickmeiss Date: Mon Nov 29 21:53:00 2004 +0000 Fix length for ISAMB dummy block commit a6c6ab1a43cc3bbe1dd7f233ead8a24e8eba4b56 Author: Adam Dickmeiss Date: Mon Nov 29 21:45:11 2004 +0000 Add member addinfo for recRetrieveCtrl to throw better diagnostics commit 0939cbe40b2dab77c8dbdcd129f4a3b226eaf9b5 Author: Adam Dickmeiss Date: Fri Nov 26 12:20:48 2004 +0000 Fixed bug #218: if a certain element/attrirbute doesn not appear.. commit 780246215d365591585d2457375faf9e36649eec Author: Adam Dickmeiss Date: Mon Nov 22 11:26:34 2004 +0000 Fix bug #216: Link missing Expat symbols. commit b4909a9b43a666f72e7631020066cc0618accd10 Author: Adam Dickmeiss Date: Mon Nov 22 10:54:42 2004 +0000 Fix new bug introduced by previous commit (../yaz* not used) commit 534550ba3bc9efc9fa24d8d46958c07e01b70438 Author: Adam Dickmeiss Date: Fri Nov 19 18:36:06 2004 +0000 Require YAZ 2.0.29 or later commit 9e606a2cc80cc6039e89b23f8ef6a20b5c2ad76f Author: Adam Dickmeiss Date: Fri Nov 19 18:31:26 2004 +0000 Fixed bug #212: make distcheck uses global yaz, not a local one commit 06dec5f5b1364f4c31d1858f35a16f61d325120a Author: Heikki Levanto Date: Fri Nov 19 15:52:58 2004 +0000 Fixed minor problems with deb/stable commit 5437b50633032595afe6f87dc0f989bc92a5aea8 Author: Heikki Levanto Date: Fri Nov 19 10:26:52 2004 +0000 Using the new ylog.h everywhere, and fixing what that breaks! commit 1c948d94056d5eb4e55ef3192a360514d7946669 Author: Adam Dickmeiss Date: Mon Nov 15 23:13:12 2004 +0000 Change spacing commit e9ec88f8f51de0a664dbcaecd4ee545c3e082da6 Author: Adam Dickmeiss Date: Mon Nov 15 23:09:36 2004 +0000 Make isam:c work again commit 4bc7825416b18d3b6e05b4e87bbed571009b00a9 Author: Adam Dickmeiss Date: Mon Nov 15 22:57:25 2004 +0000 Fix bug #171. Align with 1.3.16 branch. commit daae305f8a0c450f4f220d82a509cfcebfff4c52 Author: Adam Dickmeiss Date: Mon Nov 15 22:44:33 2004 +0000 Fix leak in resultSetRank. Rework logging and layout commit 1f0c3e82023083774711f132508a06630a11f750 Author: Adam Dickmeiss Date: Tue Nov 9 12:02:36 2004 +0000 Require YAZ 2.0.27 in configure commit 9fb43159103ddd82437c71d7f82eed86614d0f1b Author: Heikki Levanto Date: Fri Nov 5 18:08:06 2004 +0000 Cleaned a bit commit aeec4f7621ec859c72b789bb4c515303ea8a8dbf Author: Heikki Levanto Date: Fri Nov 5 17:44:32 2004 +0000 New rsbeween implementation. Much shorter and easier, and works well with ranking as well. commit fc94f3546d759ddb144f879ca9e6fa60f13df292 Author: Heikki Levanto Date: Thu Nov 4 13:54:08 2004 +0000 Dynamic logging and minor cleaning -v rset,rsisamb,rsisamc,rsmultiandor,rstemp mostly changed existing logs. Better logs needed when debugging something in these modules, but not yet. commit 9539a0f009a0fe40ff469b3262867c68aa49ba9d Author: Heikki Levanto Date: Thu Nov 4 13:11:51 2004 +0000 New logging -v rsisamc commit a47789869bfde93b798a773df1762fb7c76fe665 Author: Heikki Levanto Date: Thu Nov 4 13:10:07 2004 +0000 Logging with the new dynamic levels commit 18525dd52e7b562b9ff31987fbee4be16c68f4b8 Author: Heikki Levanto Date: Thu Nov 4 13:09:49 2004 +0000 Fixed expected results to match with the corrected zvrank commit 4d62b86b00d3b456eea3e7b3a21d809b3de0e5f7 Author: Heikki Levanto Date: Thu Nov 4 13:09:06 2004 +0000 - Changed logging levels to the new symbolic system. Now you can say "-v rank1,zvrank" and get log info for these two rankings. - Fixed a bug of not resetting the occurrence counts in zvrank - Cleaned whitespaces in zvrank commit 67700507285e0823f80e097fa0b1aae5968451bb Author: Heikki Levanto Date: Thu Nov 4 11:47:23 2004 +0000 Fixed the way keys are displayed in the log commit 24a64bbffcb21e463e21c714fa8bfdb76eda6b42 Author: Heikki Levanto Date: Wed Nov 3 16:04:45 2004 +0000 Fixed bug #203, rank-1 crashed with isam-c The fix was to add a TERMID to rstemp, then everything works fine. commit 2ba81025d0071244d8b55eac85985023868fe887 Author: Heikki Levanto Date: Mon Nov 1 16:09:05 2004 +0000 Added tests for catching the missing occurrences in rsbetween (bug #202) commit 22b64e5505a40921f1959cebcf61e84da29ec12d Author: Heikki Levanto Date: Mon Nov 1 15:53:57 2004 +0000 Added debug info and comments to hunt bug #202 Seems like this needs one more rewrite! Comments at the end of file indicate the way I want to do it next commit 4fc7ec562c1195e99e4f52a7f68807cd6efddda1 Author: Heikki Levanto Date: Mon Nov 1 11:45:39 2004 +0000 Added a test for ranking together with xpath - and uncovered bug #202 commit e172ced0dcc937dfc433a33c7e20962b9e6b5ea0 Author: Heikki Levanto Date: Fri Oct 29 14:30:27 2004 +0000 Added a missing config file commit ae8b5430a1c36e6b53abd04577757b58c8e5cd65 Author: Heikki Levanto Date: Fri Oct 29 14:16:22 2004 +0000 Added xpath tests in test/api, disables test/xpath commit f78d93fe6203420fade063107725920335867d39 Author: Heikki Levanto Date: Fri Oct 29 13:02:56 2004 +0000 Added the first xpath test commit f84ad20a7a6a45d02da7f162fa6bb1137e79a07f Author: Heikki Levanto Date: Fri Oct 29 13:02:39 2004 +0000 Refactored more stuff into testlib, cleaned up the tests. commit 7a3e232fcaa32abd41ddcdc66fe7155827d47836 Author: Heikki Levanto Date: Fri Oct 29 11:23:52 2004 +0000 Fixed an old-style declaration commit 4989a5fc444f3bca0f094f1ac2bfe4f04af5e666 Author: Heikki Levanto Date: Thu Oct 28 15:24:36 2004 +0000 Cleaned the test programs a bit, used routines in testlib commit 61b0f4d9c54eb0e2f23a03ab11d33234008bd7bf Author: Heikki Levanto Date: Thu Oct 28 14:01:31 2004 +0000 Added missing file commit 8801da78027ff39a9ac158d0a982094d42e2c22d Author: Heikki Levanto Date: Thu Oct 28 10:43:38 2004 +0000 Added the forgotten file commit 2fefff35eeb40ba802bb3ee11674a6037b84659c Author: Heikki Levanto Date: Thu Oct 28 10:37:15 2004 +0000 Removed livcode ranking Fixed zvrank Added tests for zvrank Started to refactor tests/api commit 73bedd5ba9152c9c107b502fae65723b551aff09 Author: Heikki Levanto Date: Tue Oct 26 15:32:11 2004 +0000 Re-estabslished rank-1. Gets same order of results, but slightly different scores, due to using a better estimate for term occurrences. commit b6dee8028d45d1c6db5a23d853fd67135bc1a0b9 Author: Adam Dickmeiss Date: Sun Oct 24 13:34:45 2004 +0000 Make zebra cfg part of dist to ensure tests pass commit b169e50ef204402fe272c2ba4df0597e279fe4d7 Author: Heikki Levanto Date: Fri Oct 22 11:33:28 2004 +0000 Term counts right in the log (if not in searchresponse) commit d5296d49d2481d1b83c3f40cb8639f1cb3af1895 Author: Heikki Levanto Date: Fri Oct 22 10:58:28 2004 +0000 Cleaned debug logs away commit 3c547fb0a2e275ef21871d865116e288114c0910 Author: Heikki Levanto Date: Fri Oct 22 10:12:51 2004 +0000 Added a routine to get an array of terms in a query, in preparation for ranking commit c5bc0f71fe718b3c66d86b48b1b8669278e94c18 Author: Heikki Levanto Date: Thu Oct 21 12:43:09 2004 +0000 Getting the terms from rsets where needed, still not passing them properly for the ranking... commit 1dfb2eabceebab1841f13a07314171c00873409d Author: Heikki Levanto Date: Wed Oct 20 14:32:28 2004 +0000 Creating search terms, and passing them around in searches. Not yet actually passign them to ranking, but getting closer... Also, fixed some bugs in rsprox (hooray for our tests!) commit cc67354cd95116f6580ebab21b67afa6523cb4bf Author: Adam Dickmeiss Date: Wed Oct 20 10:36:40 2004 +0000 Zebra not returning Valid XML. commit 1d1cefa2b1dc02edd4c4aa053ad1ab63073366ec Author: Marc Cromme Date: Mon Oct 18 13:29:25 2004 +0000 first version of zebra init script added commit 0229bb1ac74706a4e460a11a8a8712b4ea0f2ebe Author: Heikki Levanto Date: Fri Oct 15 10:07:32 2004 +0000 Passing a TERMID to rsets when creating, and getting it back when reading. This is a preparation for fixing the ranking and termcount features that were broken by forwarding. commit 7e43f744009a08592183399575f93500dbde7bae Author: Heikki Levanto Date: Wed Oct 13 10:11:19 2004 +0000 Added a forgotten cfg file that is needed for t8 commit 12c6db025bffd23e760ceb31120468cf363256df Author: Sebastian Hammer Date: Tue Oct 12 18:21:35 2004 +0000 Enabled retrieval of zebra metadata in XML when element set names used commit a4b829b0eedce2ea4095327eca60ec861ba5de9e Author: Heikki Levanto Date: Thu Oct 7 14:18:23 2004 +0000 Added a load of assertions in the zebraapi.c, so now most arguments should be checked. commit b734c4640f07d8d2f93d6a9eb934f55fea1264b1 Author: Adam Dickmeiss Date: Tue Oct 5 12:23:25 2004 +0000 Handle bad est espec properly commit 819a419fefe487a23624e5f94b6a20b342ce2de8 Author: Adam Dickmeiss Date: Mon Oct 4 09:27:48 2004 +0000 Only warn about empty records within file verbose limit commit 6ec32a146d639c16e9929435fdbfd8d915e918b3 Author: Adam Dickmeiss Date: Mon Oct 4 09:20:31 2004 +0000 Using proper type this time commit 95272ce88b72b42a81b82d5eab2dff68855d42df Author: Adam Dickmeiss Date: Mon Oct 4 09:19:16 2004 +0000 Add missing hash member to data1_element commit e241d077b55c5c7b76b758ad2ffebf44838b760f Author: Adam Dickmeiss Date: Sun Oct 3 22:06:32 2004 +0000 shadow/register not enabled by default commit 35b09bd81ef9079e33f4b4d197c9d8299aceb955 Author: Heikki Levanto Date: Fri Oct 1 15:36:41 2004 +0000 New tests for numeric searches commit 5547de9ea74a78fbaedeb6e07ac17d953252da99 Author: Heikki Levanto Date: Fri Oct 1 15:36:15 2004 +0000 Added an asserion in zebra_search_rpn api commit 2ccf6569d40973c1e3707e4fb366e7a89fc02a2b Author: Heikki Levanto Date: Fri Oct 1 14:50:22 2004 +0000 fixed a debug log message commit 078a786204b5edef350982c385342f889d37e5ad Author: Heikki Levanto Date: Fri Oct 1 14:25:28 2004 +0000 Using multiand/or instead of and/or in a few more places Added tests for numeric terms (and found bug #166) commit 8f35d180d9b19f5e8fc97de3831c0bb802c3e60c Author: Heikki Levanto Date: Fri Oct 1 09:13:06 2004 +0000 Removed a warning commit ba5c1e0d8e8e282e9f3c2ddc8b642d6401f0b3dc Author: Adam Dickmeiss Date: Thu Sep 30 18:31:14 2004 +0000 Added type cast to avoid warning commit ac2a5928508100836a6f98bef07f82914f4d7093 Author: Adam Dickmeiss Date: Thu Sep 30 18:30:35 2004 +0000 Added a version of data1_getelementbyname that uses a hash instead of linear search. It seems to speed up extract phase considerably. commit 9a312aae4dba8233b15f54e73f812488bab98eed Author: Heikki Levanto Date: Thu Sep 30 13:07:06 2004 +0000 Forgot to commit the new rset.h when removing rewind ops commit d50126fa619f94079daa731d66c305e86a38a85a Author: Heikki Levanto Date: Thu Sep 30 09:53:04 2004 +0000 Removed the rewind function from rsets, it was unused Cleaned one api/t7.c, so it compiles with -Werror commit 37a9e671c7abc0eb74ced2544fd8e93c7d2b291f Author: Adam Dickmeiss Date: Thu Sep 30 08:30:05 2004 +0000 Avoid non-portable dirent check commit a9eae0225b1a51b0257f80d9da9f95475dd04f53 Author: Adam Dickmeiss Date: Thu Sep 30 08:16:48 2004 +0000 Remove TCL_LIB from all LDADDs except for Tcl filter. We don't anything but the filter to link with it! commit b673999f9e517726d6e3789f3cefd194ce89ef15 Author: Adam Dickmeiss Date: Thu Sep 30 07:23:15 2004 +0000 Fixed usage of extern so that it works with older C standard. commit 4cea1b9769079a2cdc143f4fe483e69d5b77a813 Author: Adam Dickmeiss Date: Thu Sep 30 06:59:44 2004 +0000 New Debian sarge packages commit c04a10ad2c24474c9c86a8a1453f6f40e4bc1853 Author: Heikki Levanto Date: Wed Sep 29 11:00:56 2004 +0000 Fixed the rsmultior forward problem. Re-enabled using rsmultior in rstrunc (it created a multior, but didn't use it. Doh!) commit d405706f8daf33323ebf1f6223b550ff50171c6c Author: Adam Dickmeiss Date: Tue Sep 28 20:38:25 2004 +0000 Man page idzebra-config.1 commit d0833a4d6e48ad7f9a5a7d0b9e37a1c31b9968ef Author: Adam Dickmeiss Date: Tue Sep 28 20:09:13 2004 +0000 Include yaz/options.h commit 6f514a5c6e5430d6bd9cc036e0faaa4477d04410 Author: Heikki Levanto Date: Tue Sep 28 16:39:46 2004 +0000 multiand seesm to work. Is used for and-lists (@attr 4=6) commit d284fe71faaa02d3e066d7f1db7d884fe0f8b0ee Author: Heikki Levanto Date: Tue Sep 28 16:12:42 2004 +0000 Read works. Forward missing (but safe to commit, as not used from anywhere) commit 9402543e65954f4106b9e6d321a4f8dbee1a7d45 Author: Adam Dickmeiss Date: Tue Sep 28 13:31:18 2004 +0000 Added YAZ_{EXPORT,BEGIN_CDECL,END_CDECL} in header files commit 38f56500d2a26ab515dab1c453e5fd7d1000b99b Author: Heikki Levanto Date: Tue Sep 28 13:06:35 2004 +0000 Renamed rsmultior to rsmultiandor, and started to add the multiand features. Not there yet. commit 5e9aca2e8f33fe023b6b9da6df55642f96efcb50 Author: Adam Dickmeiss Date: Tue Sep 28 12:52:03 2004 +0000 Move Perl away. It is now a separate CVS project: idzebra-perl commit 36f8c4a15cad06268b2d5621aed28ab16c015cc5 Author: Adam Dickmeiss Date: Tue Sep 28 12:39:54 2004 +0000 Made zebramap.h public too commit 975930cb88b6d7b8a280f7d995d10bd988b6f04e Author: Adam Dickmeiss Date: Tue Sep 28 10:43:37 2004 +0000 Put content of headers into data1.h commit 22963c0b23a178529bc71e5879c7e4f9c3c9b7f9 Author: Adam Dickmeiss Date: Tue Sep 28 10:15:02 2004 +0000 Reorganized header files so that a certain subset are public. These public files are stored in include/idzebra . Private ones are stored in include. commit d5006a5694448c3f31f1fdf5a5d6ba49855a84a2 Author: Adam Dickmeiss Date: Tue Sep 28 08:44:48 2004 +0000 Take care of expat.h being unavailable commit bdcc8b0072a9cd12978862580bb59ae6e2666289 Author: Adam Dickmeiss Date: Mon Sep 27 12:18:44 2004 +0000 Fix dirs when srcdir is different from dstdir commit e12370b42f081172f1917d3b47c11b9327cffdb7 Author: Adam Dickmeiss Date: Mon Sep 27 12:18:15 2004 +0000 doswig part of dist commit a5a9ab496df5831c54837888292e7132b3172579 Author: Adam Dickmeiss Date: Mon Sep 27 11:22:39 2004 +0000 More wait commit 8ee402d79e37344b08c2b54ad45b50e8327a6c03 Author: Adam Dickmeiss Date: Mon Sep 27 10:44:47 2004 +0000 Implemented loadable filters. commit 191ceffa0af0cc1048ef11a1bf92fece3210c879 Author: Adam Dickmeiss Date: Mon Sep 27 08:29:38 2004 +0000 Do not declare static function f in AC_TRY_LINK test commit 1d327e12cc1408ed072b60a1663802a8f8ddcfcc Author: Adam Dickmeiss Date: Sun Sep 26 20:38:50 2004 +0000 Fix bug 154: Option -n does not disable shadow as it should. commit 184ccc4abc2a4082c9878de48196208400084dad Author: Adam Dickmeiss Date: Sun Sep 26 20:19:44 2004 +0000 Fix bug 156: Index corrupted after large-scale test. Error occured in Zebra 1.4 and in Zebra 1.3 due to change in size of zint. That resulted in struct index_entry size 12 which is not divisible in block size of 128. Functions {read,write}_indx modified. commit 6e8c025fafc311744b5ef785238fe0a623aba6d9 Author: Adam Dickmeiss Date: Fri Sep 24 15:03:19 2004 +0000 Wait more for zebrasrv to start (due to slow systems) commit 331a52cd9d00dc1205a5e502d0bb018c8e39d3e4 Author: Heikki Levanto Date: Wed Sep 22 12:13:10 2004 +0000 Fixed a but in reporting wrong number of hits commit d648cf738190682df2314f3fc3ef5a9e0396724c Author: Heikki Levanto Date: Wed Sep 22 11:59:25 2004 +0000 Added a test for sorting commit 0cb3550373ce8736a146157d72e3cb02e803a6e1 Author: Heikki Levanto Date: Mon Sep 20 15:59:48 2004 +0000 Perl tests work commit 3014f99c71e291a6b4ff0e3e6893705b9dbe0ac7 Author: Sebastian Hammer Date: Fri Sep 17 19:15:13 2004 +0000 Deleted test map statements commit 28a807ed731b0525e2ce6f17326569510296c106 Author: Adam Dickmeiss Date: Fri Sep 17 08:45:01 2004 +0000 Remove Id from header due to inconvenient diffs when yaz.m4 is copied commit 4f35e16275f20aa6d9c6b023f9f4ef4dce21afed Author: Heikki Levanto Date: Thu Sep 16 15:07:55 2004 +0000 After fixing the sorting bug, enabled its tests in t/07sort.t. At the same time removed the crashing version of the test, as its test is included in 07. commit 668faba622004e1d266c8776e24c42945a6731c3 Author: Heikki Levanto Date: Thu Sep 16 14:58:47 2004 +0000 Fixed a bug in sort that destroyed resultsets too early commit a1726a6ef7507a6b49eb19ee7784413f3534ded5 Author: Adam Dickmeiss Date: Thu Sep 16 14:02:46 2004 +0000 Remove string-hat.chr because it is unused in thie test. Change comment in beginning of sort.chr. commit ef56f2c981096db5da6193212e901ec467e78d5d Author: Adam Dickmeiss Date: Thu Sep 16 14:01:05 2004 +0000 Dont refer to sort.chr commit 136d95f400050559e7bd4641a117fb93e2cd54fc Author: Heikki Levanto Date: Wed Sep 15 14:11:06 2004 +0000 Cleaned test scripts to be (nearly?) atomic Found two problems in zebra itself, documented them in skipping tests Tests to be fixed when zebra itself behaves commit 69d2833ca96efad6777b13a1e52f23a09c749509 Author: Adam Dickmeiss Date: Wed Sep 15 09:17:25 2004 +0000 Added autoconf utility idzebra.m4 which defines --with-idzebra commit cef013b96c9508d5fd8552e7fd05962029b37e6f Author: Adam Dickmeiss Date: Wed Sep 15 08:13:51 2004 +0000 Removed old struct it_key handling. 580 lines removed. commit 65ae06c475fce3ffaf004d92605df5f01e931835 Author: Sebastian Hammer Date: Tue Sep 14 14:45:18 2004 +0000 Added sort2 test dir commit 7c3a0352f0492609a3b6b26b63a72b0b2d207aab Author: Sebastian Hammer Date: Tue Sep 14 14:38:07 2004 +0000 Added charmap facility to delete leading articles commit 710144c9d5a2577034d300ef6beb334d5145d657 Author: Sebastian Hammer Date: Tue Sep 14 14:35:52 2004 +0000 Added Sort2 test suite to check prefix-ignoreing code commit d2462e5d299a6772dace31311998d3fccacf86af Author: Adam Dickmeiss Date: Mon Sep 13 09:02:16 2004 +0000 Reduce log. LOG_LOG -> LOG_DEBUG commit 873d647f0e4265bfdb1dcfd357ae48a989e48401 Author: Adam Dickmeiss Date: Mon Sep 13 08:43:28 2004 +0000 Fix commit (flat shadow). Bug 131 commit 16f95c5ed443201fb6dbb6d85349d5e518b17932 Author: Adam Dickmeiss Date: Mon Sep 13 07:44:10 2004 +0000 Use YAZ_DOC for Docbook stuff commit a1a3938ccb17ca570836257acfd91fe4e545541d Author: Adam Dickmeiss Date: Sat Sep 11 21:04:01 2004 +0000 Using --with-yaz instead of --with-yaz-config commit 7af723a4a7a2ca0dce8c245a316120fbd9ca04db Author: Adam Dickmeiss Date: Sat Sep 11 20:52:55 2004 +0000 option --with-yazconfig renamed to --with-yaz commit 1cc0116831e49bf70538639a8fc9b08b9524c683 Author: Heikki Levanto Date: Thu Sep 9 15:23:07 2004 +0000 Minor fixes. Many things still broken... commit 16a7edea1240833a9dcf40af50e5d83dc15d0251 Author: Heikki Levanto Date: Thu Sep 9 14:47:51 2004 +0000 Fixed the broken typemap INOUT * long long commit a137a5cabe5ce29c9c98445f4099f7d528663bb9 Author: Adam Dickmeiss Date: Thu Sep 9 14:12:10 2004 +0000 Added sh script to run a test commit 10170f59203d9140fd4272a0a8fa1280ad52ace3 Author: Adam Dickmeiss Date: Thu Sep 9 14:11:48 2004 +0000 Disable shadow for now commit 41b873f704b09238f4d3fe512fe9d7a35d173adc Author: Adam Dickmeiss Date: Thu Sep 9 14:08:54 2004 +0000 Use other typemap for sysno. Remove zebra_resultSetTerms commit cb968c5c5fc37ac9bfbc8b91227b377d31e683e1 Author: Adam Dickmeiss Date: Thu Sep 9 14:07:06 2004 +0000 Use idzebra-config for Perl Makefile commit 33bcafa39b984ad635fd7c1014c8df47578cda87 Author: Adam Dickmeiss Date: Thu Sep 9 11:40:02 2004 +0000 Fix includes to new zebra api location commit 7c0b61313a0a90e951305a24686746cfb71ba510 Author: Adam Dickmeiss Date: Thu Sep 9 10:41:42 2004 +0000 Avoid using NULL bfs in zebra_init commit 726c42c6ae793b79a5351d2fce805d220d21321e Author: Heikki Levanto Date: Thu Sep 9 10:08:04 2004 +0000 Added the scope parameter to rsets, and using it in all forwards and reads commit 9410013db1ff20d37f25b4b62231be8f95f16615 Author: Adam Dickmeiss Date: Thu Sep 9 09:55:20 2004 +0000 DTD_DIR assignment commit a11e628cb73fff31137b4faa3e653390ff66650f Author: Adam Dickmeiss Date: Thu Sep 9 09:50:15 2004 +0000 Update to new yaz.m4 (--with-yaz-config change) commit f76093fc0b3b07a5b5a9d83e4c62dd467df8f53d Author: Adam Dickmeiss Date: Thu Sep 9 09:07:12 2004 +0000 Extra page_size arg for dict_open. Wrapper function dict_open_res that reads dict parmeters from resources (if set). commit 150e8c2e5ddf9ff8b9991902236826d128bcfb94 Author: Adam Dickmeiss Date: Mon Sep 6 09:31:34 2004 +0000 Sync with 1_3_16_branch. Fix bug 128. commit 65c43b0b2aaee671758f1e453d4766bf1bc51a53 Author: Heikki Levanto Date: Fri Sep 3 15:04:11 2004 +0000 Fixed an obvious typo in rsprox that prevented forward from forwarding very well... commit 13bf0c380e98816595127291b64368dd9b8ca639 Author: Heikki Levanto Date: Fri Sep 3 14:59:49 2004 +0000 Removed some FIXMEs. Mostly comments on things that had already been fixed. commit 840cf9f959b42b3f4b107de8e125cbc8c9cbbcfa Author: Heikki Levanto Date: Fri Sep 3 11:36:27 2004 +0000 Removed an unused old file commit daf02cb1cc4b38763ba4bcc2c3618e58705cbe1a Author: Adam Dickmeiss Date: Wed Sep 1 17:08:45 2004 +0000 Sync noinst_HEADERS due to removed rset header files so we can build. commit cd3ce7da1b13a23dc0f01b24abb9e52f87a12261 Author: Heikki Levanto Date: Wed Sep 1 15:14:45 2004 +0000 Removed some header files, they all contained one function prototype, and a lot of overhead. Moved said prototypes into rset.h commit 56131846f59919027a4d3c59efb485afb6efb0de Author: Heikki Levanto Date: Wed Sep 1 15:01:32 2004 +0000 Using the key_control block for the first key-handling functions in all rsets. Fixed a few missed zints in rsprox. general cleaning commit 230fdc17aa503a23c842cd587f241cfe2fce1c0d Author: Heikki Levanto Date: Tue Aug 31 14:43:41 2004 +0000 Using proper nmems for more rsets around the system, especially scan and zrpn. Still a few nulls get passed to them (test/api/t4 fails if I assert on nmem). commit 70effaa5a4a18f1bef9c6111dc082bb8714e4c19 Author: Heikki Levanto Date: Tue Aug 31 10:43:35 2004 +0000 Major restructuring in rsets. commit cbb800ea790752fe39645979811e1b9a03dafbbc Author: Adam Dickmeiss Date: Mon Aug 30 22:12:45 2004 +0000 Use prefix instead of idzebraprefix. Make --tab work. commit cf06263a81771d6fa17839badb9a554a7e6bbb20 Author: Adam Dickmeiss Date: Mon Aug 30 21:45:24 2004 +0000 Added another ignore. commit fcd23b68a84ac461cbea22271f91b7989a767201 Author: Adam Dickmeiss Date: Mon Aug 30 21:43:56 2004 +0000 Update cvsignore due to new type of files generated by libtool. commit 22b93084b7bbc50e5f13890551cfc1c0678a8e03 Author: Adam Dickmeiss Date: Mon Aug 30 21:36:53 2004 +0000 Fix various order for various linking steps. Add Tcl libs. commit 3e8db66d56c466a5a269362eb70b4931d9579128 Author: Adam Dickmeiss Date: Mon Aug 30 21:35:27 2004 +0000 Disable shared objects by default commit af5941499d0d0fe3f2d41f5aa1f82d6a04190349 Author: Heikki Levanto Date: Mon Aug 30 12:32:24 2004 +0000 Using a separate nmem for creating rsets commit 45188c35bebda2cd4f91ffd7c09fdb9cae973dab Author: Adam Dickmeiss Date: Sun Aug 29 12:31:32 2004 +0000 Created idzebra-config that returns compiler flags and libs commit 8d47d759a2e957ada235ab83bf877f2eb0d2ab99 Author: Heikki Levanto Date: Thu Aug 26 11:11:59 2004 +0000 Using nmem for all rsets, and keeping a freelist for freed rfds, so they can be reused commit 07a720514a9fa51ee3780389d588e257fdbab3b9 Author: Adam Dickmeiss Date: Wed Aug 25 13:23:13 2004 +0000 Add comment commit 609cbad0a65e5c684a70e8e01b36bead72e39e35 Author: Adam Dickmeiss Date: Wed Aug 25 13:21:43 2004 +0000 Use free_list for RSFDs so they are reused. commit a17786fb6f17c9bc1453900a6775b86e06222424 Author: Adam Dickmeiss Date: Wed Aug 25 09:28:01 2004 +0000 Fix syntax (oops) commit ec214819d7b9e2f5c362584d8e38f83e13aae600 Author: Adam Dickmeiss Date: Wed Aug 25 09:23:35 2004 +0000 Move headers zebraapi.h->idzebra/api.h, zebraver.h->idzebra/version.h, res.h->idzebra/res.h . Remove rsm_or completely. Add rsmultior. commit da1267b22edd9e3be497ce84b9734a0c870defdd Author: Adam Dickmeiss Date: Wed Aug 25 09:21:43 2004 +0000 isam no longer part of Zebra source commit fd9611ce08e58be9b411584cb304d9e083950151 Author: Adam Dickmeiss Date: Wed Aug 25 09:18:49 2004 +0000 Add rsmultior. Remove rsm_or commit 63eee531e747a957d0c658bb3c3d15be51cff9ff Author: Adam Dickmeiss Date: Wed Aug 25 09:18:06 2004 +0000 Do not include rsm_or.h . It is dead commit edf40cf79512700f2a60fce30e0cfee4b5c8d890 Author: Adam Dickmeiss Date: Wed Aug 25 09:17:33 2004 +0000 Initialize count, type due to removed rset terms commit 600bec37ca46bf4a7f084017fde81c61e438576b Author: Adam Dickmeiss Date: Wed Aug 25 08:42:13 2004 +0000 Add include\idzebra commit eb1d9cf5bea42ce04747d852d21dde853574fa3f Author: Heikki Levanto Date: Tue Aug 24 15:00:16 2004 +0000 Using a bit more of those nmems in rsets commit cc4289d73c2b872c09d221d5e1188d3cdd9da438 Author: Adam Dickmeiss Date: Tue Aug 24 14:29:09 2004 +0000 Allow range to be specified in termlist, e.g. title:w:range(data,2,4) which indexes 4 characters from position 2 in title. commit 927733195c5646988dcc65365bb45b978b02a15a Author: Heikki Levanto Date: Tue Aug 24 14:25:15 2004 +0000 Cleaned up the creation of rsets, added nmem commit 64536ef960bf4ed8de62b8db051fa99a181fff1f Author: Adam Dickmeiss Date: Tue Aug 24 10:44:53 2004 +0000 Fix other SO dependency commit 7c6c001c65e04f9a9975c023583bb9c0d05a5bf7 Author: Adam Dickmeiss Date: Tue Aug 24 10:40:23 2004 +0000 Fix SO lib dependency commit cb007c6145b0dbb3fcbe9826f081650becf9a05c Author: Adam Dickmeiss Date: Tue Aug 24 10:37:18 2004 +0000 Switching to Libtool shared libraries for Zebra. commit 9c50a60b4bd5de297f77866fd173c78a10328498 Author: Heikki Levanto Date: Tue Aug 24 08:52:30 2004 +0000 Fixed a crash with isam-c and multior (incremented a non-existing countp) commit e184d932ecfafa617833b4d45e123faa87969af1 Author: Adam Dickmeiss Date: Mon Aug 23 13:06:45 2004 +0000 Store number of keys in isam:b so we can return number of word occurrences fast. Delete isamb entries that gets empty. commit b4470de12aa07f21f5394c19af0d21b196087225 Author: Heikki Levanto Date: Mon Aug 23 12:38:53 2004 +0000 Removed the VOLATILE flag from rsets commit 863d336f803da454e03f39ee2225719fed05021e Author: Heikki Levanto Date: Fri Aug 20 14:44:45 2004 +0000 Removed the term count stuff from all rsets, and fixed what ever that broke. Ranking doesn't probably work at all after this! commit ca1bd3e863440cd606d900d63598470080a23cff Author: Adam Dickmeiss Date: Fri Aug 20 12:36:53 2004 +0000 Join with Zebra 1.3 branch commit f8732597517aa3a238e5cd61e4b4ced2425cbd05 Author: Heikki Levanto Date: Thu Aug 19 14:47:06 2004 +0000 Estimating the term occurrences the same way as total hits, when estimatehits is used. commit 375478a4799d7a1aefd08452f73f3d4f8d43438f Author: Heikki Levanto Date: Thu Aug 19 14:11:54 2004 +0000 Added pos commit a0d45ce280be3e2f2f3a7cb4b5a1fc65feb444b4 Author: Adam Dickmeiss Date: Thu Aug 19 13:10:49 2004 +0000 Files .xsl + .dsl part of dist commit 3335cd5f7e7af06ac6ed943859c473e092d559a1 Author: Heikki Levanto Date: Thu Aug 19 12:49:14 2004 +0000 the new multior. Seems to work, forwards OK, does not yet estimate pos. term counts work too! commit d9e9b611db8417a2af64b3507fe755e7afc51061 Author: Adam Dickmeiss Date: Thu Aug 19 11:51:41 2004 +0000 Add to ignore commit a278cb6145fd77850d502539d22a15ef7e34c354 Author: Adam Dickmeiss Date: Thu Aug 19 11:50:12 2004 +0000 Document bug fixes commit 21b018670707eb7a06f0d722c8a67b66d2778690 Author: Adam Dickmeiss Date: Wed Aug 18 20:00:35 2004 +0000 Fix problem with leaf split commit 4786cee234bde606b5b6cb47270e77019e0ea433 Author: Adam Dickmeiss Date: Wed Aug 18 17:02:05 2004 +0000 Fix bug in rec_release_blcoks that caused Zebra to halt. commit 7c9a23de14b2e5e6d4ba0fd25a79222f9519f9e8 Author: Adam Dickmeiss Date: Tue Aug 17 06:57:05 2004 +0000 Add IDZebra.i to dist commit 7887042844aef0c6f3d2b711e315abe91c26d211 Author: Heikki Levanto Date: Mon Aug 16 16:17:49 2004 +0000 Added skeleton for multior - not at all functional yet. Call to it implemented, but #ifdef'd out commit 6693bfefd0758c7679282ec57e7b3cb1a2f4f55f Author: Heikki Levanto Date: Mon Aug 16 12:09:43 2004 +0000 Another 64-bit format string commit a86aad6672a937f48446db7c9053a1b19e96121f Author: Adam Dickmeiss Date: Mon Aug 16 10:08:37 2004 +0000 Rework encoding of ISAMB header info to make it machine independent. Header also includes version major/minor for ISAMB. Also enabled pointer encoding as well. This will reduce size of ISAMB interior nodes. commit 20f1f9a8b62dc5e5b216617584ff78bce435dac3 Author: Adam Dickmeiss Date: Sun Aug 15 17:22:45 2004 +0000 Added facility to make attibutes in grs.regx and grs.tcl filter using the data command with argument -attribute . The content of data is the value of the attribute. This command should be used inside a begin element , end element section. commit 9b5460b01c5758f993296f3de90ea7622644ae15 Author: Adam Dickmeiss Date: Fri Aug 13 13:16:52 2004 +0000 Add test t6 from Zebra 1.3.16 branch commit 7942b121f85acd93fe42cb0444aba254ce3b8239 Author: Heikki Levanto Date: Wed Aug 11 14:43:43 2004 +0000 Added a small comment on what this test is all about! commit 3ea3705496f9f810982061713c6af941eee4c35e Author: Adam Dickmeiss Date: Wed Aug 11 13:36:13 2004 +0000 Remove log message commit 3c67867986bf92288ae3b56d6fd5d39404fa7b7a Author: Adam Dickmeiss Date: Wed Aug 11 13:35:04 2004 +0000 Fix truncation for isam:b for deleted words (which happen to have a 0 value). commit e440b3ac2f28ed9bd1f8627c0aa9368ba9f03ab2 Author: Adam Dickmeiss Date: Wed Aug 11 13:09:58 2004 +0000 Skip announce line commit fe89ed8ea4b4482f79f4c570f789c7004ddb10cc Author: Heikki Levanto Date: Tue Aug 10 15:21:48 2004 +0000 Added maxhits config option. Not yet used in present stuff, only in limiting the hitcount in search. commit b5eb8cd7ae4134d915ed8b4aec25ab90c8bd0dcb Author: Heikki Levanto Date: Tue Aug 10 08:54:39 2004 +0000 Limiting hits to INT_MAX, because yaz can't handle 64-bit hitcounts Now I can search and present in the huge data set! commit 8e1f2d86ffca33a892160b77147deb37f95d75d1 Author: Heikki Levanto Date: Tue Aug 10 08:19:15 2004 +0000 using a few more zints for hitcounts etc commit 75c42e4eb33630b36c990d47db7549c5bd5045aa Author: Mike Taylor Date: Tue Aug 10 08:16:43 2004 +0000 Ignore xsinit.h commit dd64666c00d90d263089e65f2662ddb0312dd7a1 Author: Adam Dickmeiss Date: Mon Aug 9 09:06:13 2004 +0000 Changing type of block_size to make register compatible with t2 collection. commit b8f4edee9cd85a983bd928e8e0d8668f208aa345 Author: Adam Dickmeiss Date: Mon Aug 9 08:40:09 2004 +0000 Remove libisam.a commit b5412d74ad8f1d24b4e0ddce3d3a058b164182cc Author: Heikki Levanto Date: Fri Aug 6 14:09:02 2004 +0000 pos estimates for rsbetween and rsprox commit 2b99f08490d3bd763bb086693044a6db10c0bcf9 Author: Adam Dickmeiss Date: Fri Aug 6 13:36:22 2004 +0000 More type casts due to zint. commit 4b70cb8485985ca71957a751017d15f5e937f55f Author: Adam Dickmeiss Date: Fri Aug 6 13:35:45 2004 +0000 Remove isam: i. commit 1e7738ebe0660944aca7dc4ce0f85d92b3585678 Author: Adam Dickmeiss Date: Fri Aug 6 13:24:59 2004 +0000 Remove this. commit f7e93f016e75e43d037b5c3e89aeb27b7176513a Author: Adam Dickmeiss Date: Fri Aug 6 13:14:46 2004 +0000 Remove oldest isam (isam:i) commit 8ffa50abf129b5c747fe36fd7f9bf72493d51fc0 Author: Adam Dickmeiss Date: Fri Aug 6 12:56:04 2004 +0000 Remove isamd. commit a8b86c35a39ce9eb5279c46dd99ef7e91b83fb7b Author: Adam Dickmeiss Date: Fri Aug 6 12:55:01 2004 +0000 Fix term counters to be of type zint. Fix several printfs of zint. commit 1bb217ab477284fd7fee47f19a6e8a780fa2bb50 Author: Adam Dickmeiss Date: Fri Aug 6 12:28:22 2004 +0000 Added several type casts and changed many types - mostly from int to zint. commit ba1cf01240f69bcffc890b9f85b9a52ac56696f0 Author: Adam Dickmeiss Date: Fri Aug 6 12:27:30 2004 +0000 Remove obj isamd,merge-d; add obj atoi_zn commit 5660e317ea2972ea6bb6a4f8a415f71579f71103 Author: Heikki Levanto Date: Fri Aug 6 10:09:27 2004 +0000 Using doubles in the position estimates, not to loose precision commit 4da0cd2978c9a902be772e95302e6522175402fd Author: Heikki Levanto Date: Fri Aug 6 09:43:03 2004 +0000 estimatehits config option, actually estimating the hits pos function in rsisamb, rsbool, rstemp seem to work commit 3130b11f24005f76a61a4b781991d2dc3cb6530e Author: Adam Dickmeiss Date: Fri Aug 6 09:38:36 2004 +0000 Updates for new objects in NMAKE makefile commit 89cea7e71257e182eb9457c14b9d1e779a19450e Author: Adam Dickmeiss Date: Fri Aug 6 09:38:23 2004 +0000 Upgrade to NSIS 2 commit 5c42d0e2ea62bdf3a84977b094ae2fb96309b3c5 Author: Adam Dickmeiss Date: Fri Aug 6 09:37:37 2004 +0000 Only use inline on GCC commit 714fc16a13c620527ebc11d254ba4e7b299a25f0 Author: Heikki Levanto Date: Wed Aug 4 09:59:03 2004 +0000 Changed the pos code to 64-bit clean. Still lots of stuff missing... commit 9f53cb738f15b0aa9afbedc90e3283007251b067 Author: Adam Dickmeiss Date: Wed Aug 4 09:05:17 2004 +0000 Remove log message commit 7b30a2f79cd07ac02714bee483fff14ca9afaa24 Author: Adam Dickmeiss Date: Wed Aug 4 09:00:00 2004 +0000 Fix declaration - to make it backwards compatible commit 2e4e9c6def27f1e1463dcb6f205fab6a98054f38 Author: Adam Dickmeiss Date: Wed Aug 4 08:35:22 2004 +0000 Remove isamd. It's not been in use for a long time and isamb is better in most cases. Change SYSNO to be zint. Change pointers in isamc and isamb to zint. Change block number in bfile/cfile to zint. zint is a long integer (64-bit). This change practially removes register limits for Zebra. Implement int-list encoding for ISAMs. commit 367b31a1c65ab68ded2db67d9922bf4b36cd5453 Author: Adam Dickmeiss Date: Wed Aug 4 08:26:43 2004 +0000 Fix indentation in example commit 70ba74c9bbf739fbe82d1bc2b0fb64a547c0c9e0 Author: Heikki Levanto Date: Tue Aug 3 14:54:41 2004 +0000 Added framework for the pos calls. rsisamb and rsnull have a real one, the rest rely on a global dummy. Not tested much yet, as it is never called. commit e6b40b4f140e8f7348fff1f7be78ac78946421ff Author: Heikki Levanto Date: Tue Aug 3 12:15:44 2004 +0000 Removed the count function from the rset f-table, in preparation to adding a more general pos function commit 433f7360a01640cfdbe09ce7ae19f3319b348bb3 Author: Adam Dickmeiss Date: Mon Aug 2 10:12:06 2004 +0000 Select database before commit takes place to ensure register is selected commit ee82b11e06964d05a119b3868a15fac03715bf01 Author: Mike Taylor Date: Mon Aug 2 09:55:30 2004 +0000 Add missing close-quote. commit b90689f392d42cdff06973e8d6ec3b883291fda2 Author: Adam Dickmeiss Date: Fri Jul 30 10:06:09 2004 +0000 Updates to make Debian Sarge package for 1.3.16-1 commit c0687d3f1095c9f3c4537e0a8ac6476a3942a806 Author: Adam Dickmeiss Date: Wed Jul 28 11:15:10 2004 +0000 Ensure that perl/IDZebra_wrap.c is part of dist. commit 96c3496d1f829a79f73846e0e1168aac3def7389 Author: Adam Dickmeiss Date: Wed Jul 28 11:01:58 2004 +0000 Fix sort test commit d9b85731ab7b965b1ae9bc1c283e39faf10a644a Author: Adam Dickmeiss Date: Wed Jul 28 09:47:41 2004 +0000 Added a new 'cut' directive to charmaps (.chr files) which specifies that only characters after the cutting char should be indexed. commit 64faa0860b884099c8054599f9dcfa57353165e3 Author: Adam Dickmeiss Date: Wed Jul 28 09:40:46 2004 +0000 More comments on register specs commit 4a3a97df9d47b8d099e403308f8015f130366994 Author: Adam Dickmeiss Date: Wed Jul 28 08:15:44 2004 +0000 Update Perl internals so that it matches the current Zebra API. The recordGroup structure is no longer available. A group of resources can still be referenced by setting groupName=>.. in various methods. commit 8339e09fa0aff2aa51f6ea3c7bc069f44ab5929a Author: Adam Dickmeiss Date: Wed Jul 28 08:05:58 2004 +0000 Make a copy instead of pointer for member: base commit cd3f39bbae63668b8806ed205132da166e73102f Author: Adam Dickmeiss Date: Mon Jul 26 13:59:25 2004 +0000 Fix memory leak commit 52da039ed3c4af86925c563b9a63f1f1fee1a4d5 Author: Adam Dickmeiss Date: Mon Jul 26 13:51:42 2004 +0000 Fix bug in data1_tag_add_attr (bug introduced in last commit) commit d9fb3117ca1b5f0038f8367c9a1d5d8f933b8920 Author: Adam Dickmeiss Date: Mon Jul 26 12:26:25 2004 +0000 Fixed bug 104: Bad default encoding for XML records for grs.xml filter. commit 42b9e1d0ec4a98637b142d127765f28ecd86b64b Author: Adam Dickmeiss Date: Mon Jul 26 12:20:06 2004 +0000 Simplify XML attribute node creation (xattr). Add data1 utilities data1_insert_preprocess, data1_insert_preprocess_n. commit 3985f957cc12ed8006b9b6aa024367c8596388d8 Author: Adam Dickmeiss Date: Wed Jun 16 22:12:30 2004 +0000 Use WRBUF instead of huge stack var commit 1c8acf0e2cc0626de5d915c0880e118aac8a6097 Author: Adam Dickmeiss Date: Wed Jun 16 22:07:48 2004 +0000 Added cvsignore commit fad075b9f201964d42a6869a44bd7a3e486163cd Author: Adam Dickmeiss Date: Wed Jun 16 22:06:49 2004 +0000 Proximity tests commit 3e09835371a4b88df2a4b0ab155abb01cf285a81 Author: Adam Dickmeiss Date: Wed Jun 16 21:48:57 2004 +0000 Do not perform rusmarc test if iconv does not do koi8-r. commit b24dc9a2d7ed255ed3b4f4ba35f11656aa89ef03 Author: Adam Dickmeiss Date: Wed Jun 16 21:29:49 2004 +0000 Enabling rsprox. Tests OK commit 05eead94bbc8fb6d9f1553422ac8d26135705b36 Author: Adam Dickmeiss Date: Wed Jun 16 21:27:37 2004 +0000 Cosmetic changes. Added an assert, since prox needs >= 2 sets commit 9a14cd596da0fd59d38a62aa4e4535dfd89aa295 Author: Adam Dickmeiss Date: Wed Jun 16 20:49:17 2004 +0000 For includes specs in Makefiles use AM_CPPFLAGS instead of INCLUDE. Use $(YAZINC) instead of @YAZINC@. commit e4943abc48c7750da0152b593a1e7aaf578f4b02 Author: Adam Dickmeiss Date: Wed Jun 16 20:32:41 2004 +0000 Remove unused local commit 8c2b1cb07e43a08cf1e0ac844c81d4e066eacf23 Author: Adam Dickmeiss Date: Wed Jun 16 20:30:47 2004 +0000 Initialize local to prevent gcc -O warning commit 3d38b3e2b49a3f87882d7b564fa845b9b36ac189 Author: Adam Dickmeiss Date: Tue Jun 15 10:56:31 2004 +0000 Minor changes to avoid a few warnings commit 51f51d3de3b24507ec02ffb8d0af62b57d25f8fb Author: Adam Dickmeiss Date: Tue Jun 15 09:43:27 2004 +0000 Zebra now works with make distcheck commit d4ef85573fcc8cd8c64d0d3915f3d5baddd19789 Author: Adam Dickmeiss Date: Tue Jun 15 09:29:31 2004 +0000 Add missing initialization of member replace_tokens in struct zebra_map. Error only showed up for missing default.idx (and charmaps) and more aggressive nmem_reset/nmem_destroy .. commit 3038982ea4d46e1562a4e88029199ca09153a839 Author: Adam Dickmeiss Date: Tue Jun 15 08:06:33 2004 +0000 More updates to allow tests when builddir != srcdir. commit 9f7d2fac648dbdba81e007f08ba3fbbb33c273b9 Author: Adam Dickmeiss Date: Tue Jun 15 08:05:54 2004 +0000 Allow ${var:-default} construct in resources. commit f8e697e68854f41919fb4cd6ef40c22018239de8 Author: Adam Dickmeiss Date: Tue Jun 15 07:42:45 2004 +0000 Shell accepts -c option commit 965edd26d5f3cb170e8a02fee134bc19c9c615f4 Author: Adam Dickmeiss Date: Mon Jun 14 23:45:11 2004 +0000 Prepare for srcdir != builddir in tests commit d576d9f0ae1a45fef6fe3281cac1a24999fc8106 Author: Adam Dickmeiss Date: Mon Jun 14 23:43:32 2004 +0000 Prepare for srcdir != dstdir in tests. commit c71dc4cafd880d69e6b14b308630fbc69a7d7b23 Author: Adam Dickmeiss Date: Mon Jun 14 23:42:33 2004 +0000 Allow rule subst in resources commit 7cf3de518896b7bec9927356a71d9fa989560767 Author: Adam Dickmeiss Date: Mon Jun 14 21:44:26 2004 +0000 Work on generic prox. Not yet tested - nor being used. commit 91cd9a822677f6ccaac0a5445d1781d10180460f Author: Adam Dickmeiss Date: Mon Jun 14 21:43:44 2004 +0000 New test commit 4445a9553c08f5b37b613bb4e074f8427fb44064 Author: Mike Taylor Date: Mon Jun 14 10:31:56 2004 +0000 Comment only, on possible widening of relevance plugin API. commit 605079d4ba2e4e687aeace5ea655ca4223566faa Author: Adam Dickmeiss Date: Sun Jun 13 18:45:25 2004 +0000 Handle undefined rank handler commit 5f5c3226dc29b0f8f2e1ee478cbfbd03f2c319e0 Author: Adam Dickmeiss Date: Sun Jun 13 18:44:57 2004 +0000 Avoid crash zvrank.weighting-scheme is unset. commit 964067fbd004a402fb6007597705e44b1a331a46 Author: Adam Dickmeiss Date: Fri Jun 11 10:36:08 2004 +0000 Added test/codec/Makefile commit 87de7bf0ce46771f1bb2ea8272adfdb8100058e2 Author: Adam Dickmeiss Date: Wed Jun 9 13:11:49 2004 +0000 Make codec routines public again. Add key_get_seq commit cb7fd35de99bb927babcaa4e904f44c7783d2ea8 Author: Adam Dickmeiss Date: Wed Jun 9 12:15:25 2004 +0000 Added rsprox commit 7ed734cd2fbccac903039ef91a9086763a39ace4 Author: Adam Dickmeiss Date: Wed Jun 9 12:13:03 2004 +0000 Added small test of codec speed commit 82d84f705e42b4e4abf746f923036b7ac8986b1e Author: Adam Dickmeiss Date: Wed Jun 9 11:11:33 2004 +0000 Remove unused code. Reformat a bit commit 3954f0a5830c668503a8d382de3599e9cdd88ea9 Author: Adam Dickmeiss Date: Wed Jun 9 08:29:36 2004 +0000 Utility that converts from danbib rules to Zebra .abs commit 9b3397e1da75fa0457dcbf05f47e5d4a75e12c0c Author: Adam Dickmeiss Date: Tue Jun 8 15:15:51 2004 +0000 Make ISAMB backwards compatible again commit faf6c6be807bc7b0e99116b758f8076dee803f2d Author: Heikki Levanto Date: Tue Jun 8 15:05:16 2004 +0000 #if'd out logging in rsbetween commit 00c427dace60183f4ba7bacdcdf004ac419527ce Author: Marc Cromme Date: Tue Jun 8 13:27:48 2004 +0000 credits given to tho credit deserves commit 2ea1d5785cda076ec9e07e268edd68d6fd8cbfff Author: Adam Dickmeiss Date: Mon Jun 7 22:11:25 2004 +0000 One less TODO commit 528c6d510de470a02e97881492001002008eab44 Author: Adam Dickmeiss Date: Mon Jun 7 22:09:32 2004 +0000 Maximum number of records to be sorted in a result set can be specified by setting "sortmax". Default is 1000. commit 68f060543c1d9a7f6c5b058720a65d5f1b491d19 Author: Adam Dickmeiss Date: Mon Jun 7 21:51:44 2004 +0000 Update list commit d587b2b301c06be60ad255eee6f7010cb2d56fe7 Author: Heikki Levanto Date: Fri Jun 4 13:54:56 2004 +0000 Added a function to estimate total size and current position in isamb commit ac810b30806428926533d83bb0ec4ffab7aec598 Author: Heikki Levanto Date: Thu Jun 3 15:05:05 2004 +0000 Switching to my new code, it seems to work on all my tests commit e5e87e3b665f390409902a8efd716cdec1b6a2a6 Author: Adam Dickmeiss Date: Thu Jun 3 11:45:28 2004 +0000 Remove two yaz_log that was added in previous commit commit 6c7e7bbe11beb9394c5e65510dee80ffe69ec637 Author: Adam Dickmeiss Date: Thu Jun 3 11:38:34 2004 +0000 Bug fix: zebra indexed files that did not match extension criteria due to bad side effect. commit 96e6851d3c808ca93c181226d510ea7f2a58b1aa Author: Heikki Levanto Date: Thu Jun 3 10:29:49 2004 +0000 Fixed a but in climb NEW_FORWARD still disabled, but starts to work commit 97e5c7f8db1ea9f806bf4bca38dee837c32d2e6f Author: Adam Dickmeiss Date: Thu Jun 3 00:24:12 2004 +0000 Proper test for forward commit 461f576fcd1ea465a917d34cecf01a7c9ca9c463 Author: Adam Dickmeiss Date: Thu Jun 3 00:23:48 2004 +0000 Fast forward on leaf too commit 18bc39eefdab1b2860c0e2f77a7c5fd822eb315d Author: Adam Dickmeiss Date: Wed Jun 2 23:05:55 2004 +0000 Another forward - with ideas from original isamb_pp_read commit 1afbdd9135e38942201f0ad0eaae5b6903755aeb Author: Heikki Levanto Date: Wed Jun 2 18:50:37 2004 +0000 Elementary forwarding seems to work in the new system code still disabled commit 1b55efb5218c3a0d60265168a572240ce2c85b03 Author: Heikki Levanto Date: Wed Jun 2 17:26:03 2004 +0000 Rewriting the isamb forward. Time being, new code is #ifdef'd out. Regular reads seem to work. forwarding is mostly missing, although there is some raw beginnings... commit 9f8807e43ac456d96e56bd6a4d1c2edcf1851ba7 Author: Heikki Levanto Date: Wed Jun 2 14:07:01 2004 +0000 Minor edit (to get around cvs problems) commit 32b696776940a403bb314ca72bb355a48ae97c21 Author: Adam Dickmeiss Date: Wed Jun 2 12:31:23 2004 +0000 Pass log function to some rsets commit 39b9f004ecc7242730ef003f387a16c50dac33f0 Author: Adam Dickmeiss Date: Wed Jun 2 12:30:32 2004 +0000 Added isamb_dump utility. commit 4761773f2ff08474c71cc3f44cae1642b45834c1 Author: Adam Dickmeiss Date: Wed Jun 2 12:29:03 2004 +0000 Make codec routines static commit 12d4ad07fc9bae26217f7d6bc17181a1b892337a Author: Adam Dickmeiss Date: Wed Jun 2 07:53:31 2004 +0000 Bug fix: If at and of leaf, then reset descending and go up again. commit 892728fe00debf2b9176e0bc7517a73113f6660b Author: Adam Dickmeiss Date: Wed Jun 2 07:51:52 2004 +0000 Loosen test a bit commit abf1ff982a494102c12d7aa9a5c6a61777a01e09 Author: Adam Dickmeiss Date: Wed Jun 2 06:51:06 2004 +0000 Reformat to keep lines <80 chars. Added two asserts. commit 64e3d8bb310ec317082d1fc89af4d7cb15d9e106 Author: Adam Dickmeiss Date: Wed Jun 2 06:39:36 2004 +0000 Added isamb_pp_forward test. Changed messages from test program from LOG_DEBUG to LOG_WARN so we see them! Test program calling bfs_reset. commit 572b9038cc3e92b170a30fc7cc0794ea870eb82a Author: Adam Dickmeiss Date: Tue Jun 1 18:04:41 2004 +0000 ISAMB_DEBUG disabled again. Warn if enabled commit 152a0ee011a478b0ee8c3ba4045bdd707e702d0b Author: Adam Dickmeiss Date: Tue Jun 1 15:22:58 2004 +0000 One more RSET_DEBUG commit debf05f862cf4790fd3f574f362004cd88ff6346 Author: Heikki Levanto Date: Tue Jun 1 14:50:59 2004 +0000 Fixed a borderline case isamb_forward commit 2fb4c6ee4faf175f2837e794366539c8683f42c8 Author: Adam Dickmeiss Date: Tue Jun 1 13:46:41 2004 +0000 Add more if ISAMB_DEBUG commit 63d92e7d9db4a75337d694bf491bdd81f6138c70 Author: Adam Dickmeiss Date: Tue Jun 1 13:04:29 2004 +0000 Define log_item commit 05259bf944ff61befc9bee89b7377bf365b25099 Author: Adam Dickmeiss Date: Tue Jun 1 12:56:38 2004 +0000 New method log_item for the various isams to print log an item (for debug) commit dad1f030850824e6c0d8dab90abd0b7fc84b301c Author: Adam Dickmeiss Date: Tue Jun 1 12:56:14 2004 +0000 Add assert to exploit bug commit 17cda78f31645bb910b2a5eb3142c7c117784d17 Author: Heikki Levanto Date: Tue Jun 1 12:32:18 2004 +0000 isamb forward commit e415f242d2c229cac756512570795f62f0322c30 Author: Adam Dickmeiss Date: Sun May 30 18:35:12 2004 +0000 Experiment with new codec for keys commit d697c51ca57a4b008e7575e6d414084fd77ed485 Author: Adam Dickmeiss Date: Sun May 30 18:09:31 2004 +0000 Remove expensive calls to logf commit 570f5eb73e3d3e35746242462cbbe6daf3fe2676 Author: Adam Dickmeiss Date: Sun May 30 18:05:30 2004 +0000 Fix option -f commit 842cbb4cd47fd56905c92429a6ede3a550b618cf Author: Adam Dickmeiss Date: Sun May 30 18:04:49 2004 +0000 Make a few defines for various constants. Introduce more compact encoding of ISAMB files. The new encoding is not enabled by default to avoid breaking register compatibility. commit 8fd431ba43f7305bd59d97de86ac350cb9136ef5 Author: Adam Dickmeiss Date: Thu May 27 09:28:01 2004 +0000 Raw retrieval mode uses raw copy instead of text filter commit ddfbbc116fdaf64910c86b87013757b88d73d6b6 Author: Adam Dickmeiss Date: Wed May 26 13:52:25 2004 +0000 Allow use of string attributes for regular attribute sets commit 2afddbf2fbd917d03179d53ea602f22645182fa3 Author: Adam Dickmeiss Date: Wed May 26 13:47:08 2004 +0000 Bug fix: did not return root (absyn) node commit 898ddf495d4c0306bfbe2ad91a0a368cad9af505 Author: Adam Dickmeiss Date: Wed May 26 13:26:17 2004 +0000 Bug fix: did not split on * commit 7eb93764804798d70e448919289e490ec479c7c7 Author: Adam Dickmeiss Date: Tue May 25 16:33:18 2004 +0000 Add truncation attributes commit 6ba5f9f66e3da0d247768f4e53d37fa46a630d7d Author: Adam Dickmeiss Date: Tue May 25 14:12:10 2004 +0000 Update SWIG interface for updated Zebra API. No Wrap in CVS commit 05f1744ff7e3d3514fef9c7f2d88e0b609378b1c Author: Adam Dickmeiss Date: Tue May 25 14:11:26 2004 +0000 Update new CQL parser commit eccfa5c346867b7cb1cd3b5fcb09235be4226ff4 Author: Adam Dickmeiss Date: Tue May 25 14:11:13 2004 +0000 Update for new CQL parser commit 92358ecf48eee1915a597b38addd532db490cbdb Author: Adam Dickmeiss Date: Tue May 25 14:10:54 2004 +0000 More flags to swig commit e2ec88e8006d368d52655aa2d552980773d15066 Author: Adam Dickmeiss Date: Tue May 25 13:03:48 2004 +0000 Make rule to make .c from .i via swig commit 46b5e688389c737910f721e3fbc310126aa95bc2 Author: Adam Dickmeiss Date: Tue May 25 12:17:38 2004 +0000 Update NEWS commit d42b3234a40e6d65397ad444b38fff3941afd1f6 Author: Adam Dickmeiss Date: Tue May 25 12:13:15 2004 +0000 Fix problem with 'end element' which could pop off top tag (under root data1 node). Fix uninitialized var. commit c16b638200ede4f4130c93906a000d0cfbcd9c95 Author: Adam Dickmeiss Date: Tue May 25 10:21:25 2004 +0000 Always set parent member in data1_node commit 41e829903f413447a0f50e81d21adb363b4c0357 Author: Adam Dickmeiss Date: Tue May 25 08:49:11 2004 +0000 Add zthes-b.est and ensure that .abs and .est is part of dist commit 8377dfe33a20ef4d20cc872484ddebb9d66b01f4 Author: Adam Dickmeiss Date: Fri May 21 13:25:17 2004 +0000 Added danbib.abs commit 10f3a00d861cfb57a65a3ac5333f33534d1f332e Author: Adam Dickmeiss Date: Fri May 21 13:25:07 2004 +0000 Continuation lines commit f456ec59032877bdf30c3c7432a11a003020c01e Author: Adam Dickmeiss Date: Fri May 21 11:58:56 2004 +0000 Added grs.danbib filter - for Danish Bibliographic Centre. commit c5f0a119be3ef4af84d7c7f5c028418cc8073d8a Author: Adam Dickmeiss Date: Fri May 14 10:57:42 2004 +0000 Add facility to specify separator for text files, i.e. text.sep=c where c is the separator. commit e408f6de48df5e13552ca72bb035f8b18f33d988 Author: Adam Dickmeiss Date: Mon May 10 08:47:54 2004 +0000 Do not use obsolete YAZ defines commit b2e639090a64b85997b055018089bc221bf3474b Author: Adam Dickmeiss Date: Mon May 10 08:43:19 2004 +0000 Rename CHANGELOG to NEWS commit 3c4d2aab9571a3ff5958d8ed80b39a04665fbcb8 Author: Adam Dickmeiss Date: Mon May 10 08:42:56 2004 +0000 Hook to check for missing HTML files in dist commit 2be6f2e10474562a997c342b20ea62348199c033 Author: Mike Taylor Date: Wed May 5 16:22:18 2004 +0000 Refuse to scan with step-size specified and non-zero. Use diagnostic 205 "Only zero step size supported for Scan". commit 1e869b75dd665a3ac79648269e1416bf7e04dcdd Author: Adam Dickmeiss Date: Mon Mar 29 15:48:14 2004 +0000 Fixed bug in return of handle for init when authentication failed. Support idPass authentication. Add preliminary support for user permissios (to allow safer remote update for certain users). commit 9926cccd021b92bbfd461f378c5fcad8af358ede Author: Adam Dickmeiss Date: Mon Mar 22 20:52:11 2004 +0000 For text filter, return only header if elementSetName=H . elementSetName=R returns contents only. Other elementSetName returns both header+content. commit 70f069b0c8cd5c73642296a92e119c1e856d93b3 Author: Adam Dickmeiss Date: Tue Mar 9 19:42:02 2004 +0000 Added/update .cvsignore commit 1c947f5a9631c976d7fb832a366a19e31816b883 Author: Adam Dickmeiss Date: Tue Mar 9 19:38:06 2004 +0000 Ignore test.*.[0-9] commit 3da49fcb0ed62af709e46fbc44d511f97d732983 Author: Adam Dickmeiss Date: Tue Mar 9 18:57:55 2004 +0000 Mention new tests rusmarc and charmap. commit 62e62137af3a42c5fb8ebc665623c8f1b9ae9a2b Author: Adam Dickmeiss Date: Tue Mar 9 18:52:37 2004 +0000 let tests create directories commit 70a624aa45d292ba54c94ff51ce3e7e2f890c467 Author: Adam Dickmeiss Date: Tue Mar 9 18:45:17 2004 +0000 Add test case for test/rusmarc commit 2dd8bfd275211ec1c984b93562c2085ae87040e0 Author: Adam Dickmeiss Date: Tue Mar 9 15:12:14 2004 +0000 Fixed problem with 'encoding' directive for .chr files. Added \LXXXX hex translation for .chr files. Added test/charmap test cases. commit 10590cc29e076afa175471c1c4d54dd3b2545b51 Author: Heikki Levanto Date: Thu Feb 12 15:15:54 2004 +0000 Fast-forward in rsbool and rsbetween. commit 41fd28c13ea2e1cd82e411e2a2db4e1ee56f4e06 Author: Heikki Levanto Date: Thu Feb 12 15:14:19 2004 +0000 More tests for forwarding commit dd54c64b5a89d7f4180e24463e5238eed6e3620b Author: Heikki Levanto Date: Mon Feb 9 17:44:49 2004 +0000 Tests for rsbetween's fastforward function commit 78646a6f682820f4157c1c17cd2dee3129327917 Author: Heikki Levanto Date: Fri Jan 30 13:07:14 2004 +0000 Added a comment, cleaned whitespace commit 0e56fa9e96a83d41b65546e2d85d86ccbc1350ab Author: Heikki Levanto Date: Fri Jan 30 13:06:37 2004 +0000 New tests for the forward function (simple ands and ors) commit 7ead84f2bb444f7a420b1d1c8e8c47aec61f156c Author: Heikki Levanto Date: Fri Jan 30 11:43:40 2004 +0000 Added forward functions to rsbool, and a few tests for them. commit 999c8d8e4e8e2940188d7dfcc5d1bb0651f7f4a9 Author: Adam Dickmeiss Date: Thu Jan 29 13:11:01 2004 +0000 Fixed a number of warnings. Copyright year. commit 39290b5192ee6163b3f964e320809b675011f2b7 Author: Heikki Levanto Date: Wed Jan 28 10:44:52 2004 +0000 Added an #include to get memcpy properly defined commit 3aa36f2aff049abbb012fab528183a189c06663f Author: Heikki Levanto Date: Thu Jan 22 16:23:23 2004 +0000 Made the temp file policy configurable by zebra.cfg (tempfiles: yes/Auto/no) commit 23b1af194b14847f3ba187e3c5c3015797ad3c4a Author: Heikki Levanto Date: Thu Jan 22 15:40:25 2004 +0000 Not creating a temporary file when indexing, if there would only be one temp file. Using the memory buffer directly instead. This is configurable, but the config is hard-coded as it is now. Will need to be in zebra.cfg. commit 61d2ac77d420c1b8e6b6b5b7ef65b8852f2481d5 Author: Adam Dickmeiss Date: Thu Jan 22 11:50:16 2004 +0000 Dont complain about missing matchStr commit 2a6f64379961f30bfe6376964ce279ab5242da1f Author: Adam Dickmeiss Date: Thu Jan 22 11:27:20 2004 +0000 Revise resource API to take default/override resources. Allow Remote insert/delete/replace/update with record, recordIdNumber (sysno) and/or recordIdOpaque(user supplied record Id). Server now returns zero hits rather than issue 'unsupported use attribute' if an attribute is supplied that is defined in .att but not being used. commit c9c5094f5d94f9e538c4608ace97241ff1c6e10d Author: Adam Dickmeiss Date: Mon Jan 19 12:10:20 2004 +0000 Remove unnecessary elm ../? constructs from Explain commit b85319b88e7721ed86bbe4981839c6d2a1afea64 Author: Heikki Levanto Date: Fri Jan 16 18:04:33 2004 +0000 Part of the previosu commit commit 9949fe7912e81ebf77d345a0581dc31a439bc2b8 Author: Heikki Levanto Date: Fri Jan 16 15:27:35 2004 +0000 Declarations for the rset_forward function. No actual code yet commit 138b954cffe470bf0e62d812cae6e859aa57cdb5 Author: Adam Dickmeiss Date: Thu Jan 15 14:22:21 2004 +0000 Towards 1.3.15 commit 881b9293d6699c85195142af3f4a957f4982e6e2 Author: Adam Dickmeiss Date: Thu Jan 15 13:31:30 2004 +0000 X-Path attribute expressions with spaces in them is now handled. commit 5083512c4f7e4bc102821697b25627b05571b908 Author: Adam Dickmeiss Date: Thu Jan 15 13:30:32 2004 +0000 Enable sorting on author commit 7650b6e26e7f8cb3869348f92069e975c5557d1b Author: Adam Dickmeiss Date: Wed Dec 17 12:08:44 2003 +0000 Fix base address for MARC output commit b5e5a59302ebdab8904b548771ea705790f04b64 Author: Adam Dickmeiss Date: Wed Dec 17 12:03:54 2003 +0000 Fix base address for output (Colin MacLean) commit df9a3a9811db8c6ad09feeb94d66b429d98d8fde Author: Adam Dickmeiss Date: Wed Dec 10 23:30:15 2003 +0000 Fix base address for MARC reader commit d7728e1b31c9043189b9c05635ea5512fd0d31e7 Author: Heikki Levanto Date: Thu Dec 4 11:20:39 2003 +0000 zebrash can now sort a result set commit 56ee2a08a2f905045b179f6550273202035c6da7 Author: Adam Dickmeiss Date: Wed Dec 3 13:57:16 2003 +0000 Describe option -L in options for zebraidx man page commit 97fffe49b2bb16e5cd030f682af375bed1e100bc Author: Adam Dickmeiss Date: Sat Nov 29 16:47:58 2003 +0000 Point to Expat-1.95-7 on Windows commit 4bdff658573cc5f9dee866e687554105cdc9ff02 Author: Adam Dickmeiss Date: Sat Nov 29 16:47:22 2003 +0000 Mention where to get Expat and BZIP2 WIN32 versions commit f8595feb180319b8bd0685e647c49dad5a39bc39 Author: Adam Dickmeiss Date: Sat Nov 29 16:05:41 2003 +0000 Debian 1.3.14-1 commit b53c90d3b735035531c5b80546ceab3077817804 Author: Adam Dickmeiss Date: Fri Nov 28 23:16:23 2003 +0000 1.3.14 commit dd2789da08da1675bb057805911597e8cea06156 Author: Adam Dickmeiss Date: Fri Nov 28 23:07:10 2003 +0000 Changes info commit 0348ff0e69495870d980f29198072070e06f9c4e Author: Adam Dickmeiss Date: Fri Nov 28 23:06:59 2003 +0000 Remove data1_pr_tree calls commit d6520c564eba0960fb3fedc6f5ad4a3f9653cc39 Author: Adam Dickmeiss Date: Fri Nov 28 14:47:45 2003 +0000 Bug fix: zebra_begin_trans did not always invalidate result sets when register was reopened. commit e15bfa00eb87aa8e45dc2d0da932d03705dc65bc Author: Mike Taylor Date: Thu Nov 27 10:35:27 2003 +0000 Ignore autom4te.cache commit d66990c38540b6196ede05d4b5636a9b51609134 Author: Mike Taylor Date: Mon Nov 24 12:58:00 2003 +0000 Fix long-int overflow when calculating number of microseconds elapsed in a run of more 2147.48 seconds (35:47) commit 4f46504ef9d4bcef7a3ca0f34c57c894dfa58bb0 Author: Mike Taylor Date: Mon Nov 24 12:54:57 2003 +0000 Fix typo in inTline_mk_field(), resolves undeclared function warning in marcread.c commit b4c71713ff8400d7b6eb211c9c2ed23adb04fded Author: Heikki Levanto Date: Fri Nov 21 15:30:16 2003 +0000 Minor details commit 68437bb1cecfbc6a77a21e2dd559dfe0dd337927 Author: Adam Dickmeiss Date: Fri Nov 14 00:28:04 2003 +0000 modify abs file to allow for MARC conversion commit 112edbbf3b1acb84e5a38d6d28c5f9ee39d180e1 Author: Adam Dickmeiss Date: Thu Nov 13 23:57:41 2003 +0000 MARCXML to ISO2709 conversion in retrieval. commit 34f7c15066aa6cb10e2b8545c50849cab592f639 Author: oleg Date: Sun Nov 9 11:56:06 2003 +0000 Update, commit e73b37d9148cd03627e1813219cda9bcaa5758a8 Author: oleg Date: Sun Nov 9 11:54:47 2003 +0000 File updated (reason: uncorrect 4XX fields). commit 2509df2e2c0c18aeb0e357a04718c3767cfffabc Author: oleg Date: Sun Nov 9 11:49:49 2003 +0000 Fixed error with linked fields for UNIMARC clone records. commit 84e7aa0b86a8a2841f9a379129d0de24d9803463 Author: oleg Date: Sun Nov 9 11:48:16 2003 +0000 More friendly behaviour in during character set negotiation. commit 7291154c614bce80fc8b0f6c1eeafa77a6e5c45d Author: Adam Dickmeiss Date: Mon Nov 3 14:04:34 2003 +0000 Fix address commit e05231ab618c1fc468bbe24feac7c2ff6b013917 Author: Adam Dickmeiss Date: Thu Oct 30 11:11:57 2003 +0000 Fix link to support commit ffb82a5f38c86ba2ef8241de797fbf11a86acbdc Author: Adam Dickmeiss Date: Tue Oct 21 10:00:51 2003 +0000 add zebrasrv.pid commit c8efd6bf5a0531afb5fec23a5885e2b0bcc0cd13 Author: Adam Dickmeiss Date: Tue Oct 21 09:59:05 2003 +0000 Log to t4.log rather than t3.log commit 2c8209d30aec3939bedcb19d4482c886ed899216 Author: Adam Dickmeiss Date: Mon Oct 20 19:26:05 2003 +0000 Improve message for bad path in file traversal. logf -> yaz_log renames commit a0bb036bc4059b8ed7d31340fefd3caeb561e711 Author: Adam Dickmeiss Date: Mon Oct 20 18:56:00 2003 +0000 Test case for filter grs.marcxml commit b6e815e8a200db9b337d0c2e169fd22c3e3ed2ec Author: Adam Dickmeiss Date: Mon Oct 20 18:47:08 2003 +0000 Added .cvsignore commit 91552c9a8ba370242cb3dc478c3bcc9351262493 Author: Adam Dickmeiss Date: Tue Oct 7 09:18:55 2003 +0000 New test marcxml commit b3890b03023cb9904ac1b10e2eee86669246d1dd Author: Adam Dickmeiss Date: Tue Oct 7 09:18:43 2003 +0000 On -V, display Expat version commit 856d020355a71f37c0b55564f97d52072646b7c8 Author: Adam Dickmeiss Date: Tue Oct 7 09:18:21 2003 +0000 yaz_log instead of logf. Change logging a bit commit 9ee953297dc307bc12e8477d58c3b61da1d159a0 Author: Adam Dickmeiss Date: Tue Oct 7 09:17:56 2003 +0000 Simplify commit 8588adc96f07d3e660d2e9743293caffbb9f780a Author: Adam Dickmeiss Date: Fri Sep 26 10:36:54 2003 +0000 Add date commit d785173d83c12473edb69697ef03850e6569a7c0 Author: Adam Dickmeiss Date: Fri Sep 26 10:36:27 2003 +0000 Bump version commit a71d644254f1ee344b1f2f8c0d4db631d2ef8587 Author: Adam Dickmeiss Date: Fri Sep 26 10:25:15 2003 +0000 Changes commit 577a95549c265eb59770e4bebb1f29bd3eed51bf Author: Adam Dickmeiss Date: Fri Sep 26 10:17:54 2003 +0000 Add out files commit c0a0611823a48addba9e6dba1b23d8c3776feecd Author: Adam Dickmeiss Date: Fri Sep 26 10:16:55 2003 +0000 Add zebrasrv.pid commit 3f2f86e87743556389c6d20f31ab4816f4758a47 Author: Adam Dickmeiss Date: Fri Sep 26 10:16:02 2003 +0000 Add tmp, lock commit d9707b0f30d49fc9bb98d5ce10da8842dcd6d275 Author: Adam Dickmeiss Date: Wed Sep 24 11:45:44 2003 +0000 Reduce output for tests commit a7597451093ff97eb3e9821488261f8df9369060 Author: Adam Dickmeiss Date: Tue Sep 23 10:09:38 2003 +0000 Use fgets when input if not a tty. Remove newline for each line commit 9d902359e729980cc1844cce2b5b83d72a4367d3 Author: Adam Dickmeiss Date: Tue Sep 23 09:53:08 2003 +0000 WS commit 2ca8c684022bcc46ee9e8b0390c302cb3460d6df Author: Adam Dickmeiss Date: Mon Sep 22 12:51:23 2003 +0000 Notes on regx filter. commit d7f55702eff15238a26815ec519272ae0fb83558 Author: Adam Dickmeiss Date: Mon Sep 22 12:35:58 2003 +0000 Fix examples for win commit 81bfeebf6eb672324fe5f648f7c2bb6dfc8a6a4c Author: Adam Dickmeiss Date: Tue Sep 16 20:52:42 2003 +0000 Added socket commit 7ef8c6bb1793187024a612ed93405d61bed9e25a Author: Adam Dickmeiss Date: Tue Sep 16 20:51:36 2003 +0000 Added .cvsignore commit e70714d18b3feacb6fb8a9dbe24557d8fe1d27e0 Author: Adam Dickmeiss Date: Tue Sep 16 19:35:19 2003 +0000 Allow C89 comments only commit 823e434d02737a874ea44e3c8cb31164c22d6d7f Author: Adam Dickmeiss Date: Tue Sep 16 14:43:30 2003 +0000 Missing testall.sh from dist commit 230d053f9d121fbfe7fa3aafa9c7d94d5d5255fa Author: Adam Dickmeiss Date: Tue Sep 16 14:06:21 2003 +0000 Update minor commit 2d23268b6fe7b71e1cf566e6ab018a8e7f709bfc Author: Adam Dickmeiss Date: Tue Sep 16 14:04:04 2003 +0000 Compress man pages commit 3bf301b46354151f3ed2ece4ad69b98f73db15fa Author: Adam Dickmeiss Date: Tue Sep 16 13:58:25 2003 +0000 Display Tcl version if enabled commit 72fb813b56c42335985ef47d9d2a23ebc456eae0 Author: Adam Dickmeiss Date: Tue Sep 16 13:58:00 2003 +0000 Test for filter bug in config commit 5f196d5c2d38a50f3b986438fad5aa3c3a3f04c6 Author: Adam Dickmeiss Date: Tue Sep 16 13:56:52 2003 +0000 Fix bug in tryMatch (introduced by previous commit) commit 8f611f1ada2fb8cfda909be015032c924cfed42a Author: Adam Dickmeiss Date: Tue Sep 16 12:18:24 2003 +0000 Test sort/config commit c5294e4f1d1563db1eecb3bdd4ea48c40f390fb6 Author: Adam Dickmeiss Date: Tue Sep 16 09:35:18 2003 +0000 Fix permission of postinst commit 41b84f19fbdf1439a54c784a74b17cc754dd17be Author: Mike Taylor Date: Fri Sep 12 15:11:59 2003 +0000 Ignore the testclient binary commit 61b497b2e6cadb5c3f142a3ed282f71098198150 Author: Adam Dickmeiss Date: Mon Sep 8 10:30:40 2003 +0000 Minor. commit f280b4adca76b5b447dae9d6a01ff1f9067c08b9 Author: Adam Dickmeiss Date: Mon Sep 8 10:26:51 2003 +0000 data1_concat_text didnt set last_child right in all cases commit 3e84d150fb06c916c70a4ff2c0271ab40104aea8 Author: Adam Dickmeiss Date: Mon Sep 8 10:26:26 2003 +0000 Add check for proper last_child commit b72718347ce9e412d57b1203441fe7e51746772c Author: Adam Dickmeiss Date: Mon Sep 8 09:51:02 2003 +0000 Year commit d2f1d40c609fba02e35145b0d974eb9416a092fe Author: Adam Dickmeiss Date: Mon Sep 8 09:50:04 2003 +0000 Fix XML error handling commit 025215fcab86e8ea7c143238da9ffab5afdd1067 Author: Adam Dickmeiss Date: Mon Sep 8 09:30:17 2003 +0000 Try to avoid SEGV in Expat when XML_Parse fails commit 1aa248f52f0b5c72155a8f8423122a4b89bf3394 Author: Adam Dickmeiss Date: Fri Sep 5 12:35:06 2003 +0000 Check for valid handle in call to zebra_pidfname commit 10ccfd152f58ba6d9ae9f958d8710656f1e3dfdd Author: Adam Dickmeiss Date: Fri Sep 5 12:33:39 2003 +0000 Fix test commit 3bdbcd2522ef89b9b71dcabe8bd3e43c775bfa90 Author: Adam Dickmeiss Date: Fri Sep 5 10:54:44 2003 +0000 1.3.12-2 commit e35491873c74b8dbba42ad427b12ef872d1e11a6 Author: Adam Dickmeiss Date: Fri Sep 5 10:51:17 2003 +0000 Only issue error 114 if all databases fail commit 248747ef40e38e5f4801d5403ee055f7f0156733 Author: Adam Dickmeiss Date: Fri Sep 5 10:50:33 2003 +0000 Separate zebraidx-commands document. Mention create&drop zebraidx commands commit 804ae66d4a87b9d5b24349591de771a8a7b03b63 Author: Adam Dickmeiss Date: Thu Aug 21 10:47:24 2003 +0000 Towards 1.3.12 commit ab86c24bb4b5d4ea6bc98b7172d7d17d678565b5 Author: Heikki Levanto Date: Thu Aug 21 10:42:43 2003 +0000 Added this commit e8ddf3796d9ff4fe1eac68c613a68a40e1390bce Author: Heikki Levanto Date: Thu Aug 21 10:40:44 2003 +0000 Added two test scripts commit 40d5411e09bb369d361c48b68e3b57c4557f6d4c Author: Adam Dickmeiss Date: Thu Aug 21 10:31:09 2003 +0000 Debian minor release to fix pid file. commit 10c319371a218dd827d746634d23ac2d33f15461 Author: Adam Dickmeiss Date: Thu Aug 21 10:30:03 2003 +0000 Write zebrasrv.pid to lockDir. commit e33d0e66713eb58368fc53a7fa39bd2eb61e5c6c Author: Adam Dickmeiss Date: Thu Aug 21 10:29:18 2003 +0000 Fix header commit f578ebbcfe51125d91358a98a79ab8411f38933f Author: Adam Dickmeiss Date: Thu Aug 21 10:29:00 2003 +0000 New filter grs.marcxml. commit 03e275196b3f82415a965d0bdd6bfa52a15d7446 Author: pop Date: Sat Jul 26 16:27:46 2003 +0000 Added support for resultset terms. commit 87c62083368d018a7d159fcfd6fc1c930b02b7e3 Author: Heikki Levanto Date: Mon Jul 7 14:56:04 2003 +0000 Fixed a bug in zebrash and a warning in zebraapi commit c3143b73c994edc3e1ec3dff53b91136ac00437c Author: pop Date: Mon Jul 7 13:55:37 2003 +0000 renamed perl specific sorting commit 8c703765dad3228649e340337b293f76603ca9de Author: pop Date: Mon Jul 7 10:59:33 2003 +0000 Zebra perl API following changes in zebraapi.c/.h (all functions returning an int status). Now it's compatible, but return status is not yet implemented in all case. commit c163115e3641d9f586c7aa5723e2685a31084ab3 Author: Heikki Levanto Date: Fri Jul 4 14:27:19 2003 +0000 minor fix commit 285276d2e61111c371c8ed9f8c37e8a7eaf7c39d Author: Heikki Levanto Date: Fri Jul 4 14:25:51 2003 +0000 Added zebrash test commit acd585265765ad9a43bf97f6ca6d05c836ea4fed Author: Heikki Levanto Date: Fri Jul 4 14:00:22 2003 +0000 find and show work, using wrbuf for output commit 4b2532df6fcb883f8eaa41c9514a2dbc94aa0701 Author: Adam Dickmeiss Date: Fri Jul 4 13:58:32 2003 +0000 zebra_records_retrieve returns -1 on error; 0 if OK commit 3fe1af12eeb36da994844f526013025b7ea3980f Author: Heikki Levanto Date: Thu Jul 3 16:16:22 2003 +0000 started show command - doesn't work yet commit 0d9d89d4c176ce718c9949f428f18d45a5e85ede Author: Heikki Levanto Date: Thu Jul 3 14:45:02 2003 +0000 Added quick find command 'find' (or 'f'). Quickstarts if necessary, adds "@attr 1=/" if necessary, and uses constant result set name. commit b6830e77ae855c0be7fcf4352a5d88477f4c83b0 Author: Adam Dickmeiss Date: Wed Jul 2 22:00:06 2003 +0000 Remote drop of database commit 6a395dd488e0f34f54ea44bafcde9c959292c252 Author: Adam Dickmeiss Date: Mon Jun 30 19:37:12 2003 +0000 Implemented drop database commit ee8baface27bd07f490f4886a8359bcd6368b3ab Author: Adam Dickmeiss Date: Mon Jun 30 15:56:48 2003 +0000 Fix indefinite loop in dict_del_subtree commit a0635c1c9988b30dd7ee62368ae32ade044d291b Author: Mike Taylor Date: Thu Jun 26 08:46:31 2003 +0000 Update the description of the ULS application according to an email request from Fraser Nicolaides , project officer. commit 0b4d89b9cf179a6a8f707cb2b72f38971fb0defb Author: Adam Dickmeiss Date: Mon Jun 23 15:38:16 2003 +0000 Fix printf (again) commit ae2d0647bd3a555df77397b6c2f9c129fda0733a Author: Adam Dickmeiss Date: Mon Jun 23 15:36:11 2003 +0000 Implemented isamb_unlink. commit dbd6f3a01791401472b07250bf35dcbc3ead4f92 Author: Adam Dickmeiss Date: Mon Jun 23 15:35:25 2003 +0000 Fix printf commit c6d31ee570fabe247e8b1fe708d04b9684cf43e3 Author: Heikki Levanto Date: Mon Jun 23 14:35:41 2003 +0000 insert/delete tests in zebrash, transactions... commit 72b0213cbba2b182edb0477ef4e1e98d002ec541 Author: Adam Dickmeiss Date: Fri Jun 20 16:27:55 2003 +0000 Fix new yaz_log. WS commit 104beff061317519411d779c7c84419ccdfc70e1 Author: Heikki Levanto Date: Fri Jun 20 14:21:23 2003 +0000 Cleaning zebraapi (return conventions etc) More details in zebrash (perl interface still broken because of this!) commit 21e0509079b75c945697f1fa89fc5b366cf825ed Author: Adam Dickmeiss Date: Wed Jun 18 21:32:44 2003 +0000 Remove PR_TRAN message commit 58e3c5132f9fe86fefbf2e130275ab9980eeed1e Author: Adam Dickmeiss Date: Wed Jun 18 11:46:33 2003 +0000 Fix memory handling of quries in result sets commit cafda7991cae5042961ec520e87617efc9829194 Author: Adam Dickmeiss Date: Tue Jun 17 22:23:52 2003 +0000 Fixed SOIF filter commit c4318fe5480927a441042829d2953fc1484fb46b Author: Adam Dickmeiss Date: Tue Jun 17 22:22:57 2003 +0000 Fixed anchor handling for /patterns/ (tryMatch) commit 948466207c45deb782e066f46227f0e57305458f Author: Adam Dickmeiss Date: Tue Jun 17 13:53:27 2003 +0000 Forgot to invalidate result sets when changing from ro to rw commit be9e8319fee306c2a72414785d294c807c6f6fd3 Author: Adam Dickmeiss Date: Fri Jun 13 13:10:30 2003 +0000 Changes commit 340b7272ace5d3c17152c14a24eb8ab0eec4bf25 Author: Adam Dickmeiss Date: Thu Jun 12 18:20:33 2003 +0000 Bump version commit 5c620c1a13f1558b1a926b401aee6c1872456bdb Author: Adam Dickmeiss Date: Thu Jun 12 18:20:08 2003 +0000 Fix for root.absyn not being set (when .abs is bad for example) commit fa0768ee40cd69f1ceae9d0959ba5a7b2abeb47d Author: Adam Dickmeiss Date: Thu Jun 12 18:14:49 2003 +0000 Fixed rsbetween. Returned results in cases where it shouldn't commit 0bcb943c7e2e4c733c863543d85928b15b23d7b4 Author: Adam Dickmeiss Date: Mon Jun 2 13:33:16 2003 +0000 fix select_database commit 2d31b0942f5ff2191e1e5d7634c85745988738bf Author: Adam Dickmeiss Date: Mon Jun 2 13:13:59 2003 +0000 Indentation. commit 202f71c87b756c4d4f3d604737ca89c9ba08409b Author: Adam Dickmeiss Date: Mon May 26 20:07:40 2003 +0000 Fix setting of automake ISTHR to reflect POSIX thread availability commit c5bed3b13630bf1d194e821ab51113c37c70abe7 Author: Adam Dickmeiss Date: Sat May 24 22:35:11 2003 +0000 Zebra server checks for zebrasrv.pid and refuses to start if it is already locked by another (running) zebrasrv. commit 2147978ec217214e2fea9ca2d0a5b089fe0977f4 Author: Adam Dickmeiss Date: Sat May 24 22:34:48 2003 +0000 tests writes to log file instead of stdout commit dcb12ac3b21f6f8254071c5d9f6c2b13ea12661b Author: Heikki Levanto Date: Thu May 22 16:16:22 2003 +0000 Added zebra api logging (on loglevel app2) commit 403ae06f9dbf8180008ccc8128f642203d41ae50 Author: Adam Dickmeiss Date: Wed May 21 14:39:21 2003 +0000 Makefile updates for Automake 1.5+. Test script updates commit 75afa0301433673a23f5c7c8e1f8c78efb4a2d4c Author: pop Date: Wed May 21 08:03:02 2003 +0000 Removed ODRs from zebra_search commit af396a0ed07e6455e01d463d88771b76f40f257c Author: Adam Dickmeiss Date: Tue May 20 21:39:57 2003 +0000 Handle non-existant register area better commit 8383e12ef39118ffa824de7abc2cad3ca7b74e46 Author: Adam Dickmeiss Date: Tue May 20 13:54:30 2003 +0000 Fix comment commit 39d323b0aabcc0f1a08f37c3fa45fb187c7570ac Author: Adam Dickmeiss Date: Tue May 20 13:52:40 2003 +0000 Removed zebra_search_rpn. Updated a few tests commit b547f7eb4e4ae29d08a2c0fb7e2108b22ade3dd7 Author: Adam Dickmeiss Date: Tue May 20 12:52:49 2003 +0000 ODR handles no longer needed for zebra_search_{rpn,PQF} commit 18bdfd28a9f4d38e2f81556396f51821c3d71088 Author: Adam Dickmeiss Date: Tue May 20 09:43:46 2003 +0000 White space. Fix warning. commit 4b3707d52e5d6fbf0e6353086d4c42e67d92319d Author: Adam Dickmeiss Date: Mon May 19 21:38:40 2003 +0000 Zebra logo commit 6059368fdd11d7671beb904d6a4c6c98871e489c Author: Adam Dickmeiss Date: Mon May 19 21:37:38 2003 +0000 New test commit 382ea2685628fcfb8f7c5cc4db35d9f9f505ed4a Author: Adam Dickmeiss Date: Mon May 19 21:35:02 2003 +0000 Debian zebrasrv start/stop commit 475636e5103f99d27803fa34ff8b3e4d5eedb8b7 Author: Adam Dickmeiss Date: Tue May 13 13:52:12 2003 +0000 Check for open register in begin_trans commit 65ffa52caa982b4caced8032117a3a21b8769103 Author: Mike Taylor Date: Mon May 12 16:10:40 2003 +0000 ignore zebrash commit b9eea3a2ebd3feae59bc8c01a70dbe8b9e0b807a Author: pop Date: Wed May 7 20:51:12 2003 +0000 Added log prefix features. Fixed handling of "0" values in data1. Session.pm is using Carp now. commit 20ba1d9d1d672f244ed83dee5224241df29378ea Author: Adam Dickmeiss Date: Tue May 6 20:09:28 2003 +0000 More test updates commit e93e9d110b6bb2596e011de5fb0c8825ac2fe2b2 Author: Adam Dickmeiss Date: Tue May 6 17:39:01 2003 +0000 Updated tests commit 3dc1e5934bab74aaa0fba8dc5878ee261b231f1d Author: Adam Dickmeiss Date: Tue May 6 17:27:09 2003 +0000 Dont put CVS in dist commit 8bce7c5592247e2c2c70f123f8e5e5294a84dfda Author: Adam Dickmeiss Date: Tue May 6 12:09:24 2003 +0000 Call automake twice to avoid missing depcomp commit 32cac77d96efdbbf90dea9c2e66727906508d0bc Author: Adam Dickmeiss Date: Mon May 5 20:59:02 2003 +0000 cvsignore commit 34b0081ff14782bba0706627f07f52252dd0e197 Author: Adam Dickmeiss Date: Mon May 5 20:52:04 2003 +0000 Fixed a bug with text being chunked in pieces for the grs.xml filter. commit 0f32a55fdb9d34efa61f330a3354f74b763bfbf5 Author: Adam Dickmeiss Date: Mon May 5 20:14:42 2003 +0000 WS. Use data1_concat_text commit 804cbe110c2f61627074d7f495f7d97d086105ff Author: Adam Dickmeiss Date: Mon May 5 20:13:28 2003 +0000 New function data1_concat_text that concatenates text nodes. commit 33f0147480916aa5ab3ae42f98da4be820a846f2 Author: Adam Dickmeiss Date: Mon May 5 10:00:16 2003 +0000 ignore zebrasrv.pid commit 4c0ba2b0b732ced2def25e7e500e749b19af0007 Author: Adam Dickmeiss Date: Mon May 5 09:58:42 2003 +0000 Dont warn character 0x00 in Expat Encoding Handler commit 88498c8304d56507d64fba1ea3bbc2baef668702 Author: Adam Dickmeiss Date: Mon Apr 28 21:05:25 2003 +0000 New YAZ layout. idzebra-doc architecture independent. commit 723557d65c0d6d24c4bf6a8c2106ae48b968ac1c Author: Adam Dickmeiss Date: Fri Apr 25 09:46:49 2003 +0000 Debian changeslog commit bdf6fff005b3a0821fd6673bd441f79ffc97e81b Author: Adam Dickmeiss Date: Fri Apr 25 08:57:36 2003 +0000 Indentation commit ce16678f99baa1c1ffc208e901213711cb0f66bb Author: Adam Dickmeiss Date: Fri Apr 25 08:57:17 2003 +0000 Note on xelm commit 7ec81d893efe0407cda28aeca3cb232266dd713f Author: pop Date: Thu Apr 24 22:29:52 2003 +0000 xelm directive support changed. xpath: enable directive is not needed. support f or attribute based indexing without xpath indexing, using xelm commit 085797b0c343055c24a9491386eb05b68a7275a6 Author: Adam Dickmeiss Date: Thu Apr 24 20:10:24 2003 +0000 Update version commit c6de35d6094d5122d35d966dbdf1bfd3dfe5c7e0 Author: Adam Dickmeiss Date: Thu Apr 24 20:05:19 2003 +0000 Update spec file for new YAZ RPM packages commit 40169ceb63d072129b53dfc2d208ba24e4c29945 Author: Adam Dickmeiss Date: Thu Apr 24 19:47:50 2003 +0000 Version increment commit 8435c4aa3528b121b17304862a883bc322f75576 Author: Adam Dickmeiss Date: Thu Apr 24 19:46:59 2003 +0000 Handle no database selected in zebra_begin_trans commit 6e53ed9583fd178f3a68a0ee0019223c79e19640 Author: Adam Dickmeiss Date: Thu Apr 24 19:35:52 2003 +0000 test programs not made by normal build commit b385fad64ec1afb51fd0ec9ad76567282ab20bfe Author: Adam Dickmeiss Date: Thu Apr 24 19:34:19 2003 +0000 Minor changes in Debug log messages commit c5b916eaefb0d82a54e280ea5b43bb9cee7af7c9 Author: Adam Dickmeiss Date: Thu Apr 24 09:09:20 2003 +0000 Remove -L/usr/lib from TCL_LIB to avoid dependancy problems commit a849d07e0e43f0298b047ffbc2bb22928f8c647b Author: Adam Dickmeiss Date: Thu Apr 17 06:07:04 2003 +0000 include files part of RPM commit 5865cb46d40433f1ca179164ef50c5222bc52880 Author: Adam Dickmeiss Date: Tue Apr 15 20:56:47 2003 +0000 Fix ZPERL_LIBS commit d68c6ec7dcaffc5fcd835ba3f0172374356eed70 Author: pop Date: Tue Apr 15 20:56:33 2003 +0000 Fixed logging in record_update test commit 8645ef631b7b7b59ba766dfe8a0a52288a80b7e0 Author: pop Date: Tue Apr 15 20:55:14 2003 +0000 Tuned to DEBIAN Stable pkgs commit 2953b2e39b289b3625e6a3a7c5a3f2b5e1d95ce8 Author: Adam Dickmeiss Date: Tue Apr 15 20:48:04 2003 +0000 Avoid memory overruns for big regular expressions commit cc8dce2e2405e3d831c44c8bf0cd3923386266c2 Author: Adam Dickmeiss Date: Tue Apr 15 20:47:05 2003 +0000 Check for Perl libs commit 40333aa22cb4feca08c2d839c0b0773670f0e6a0 Author: pop Date: Tue Apr 15 20:40:56 2003 +0000 Added prerequisites commit 90307a85924c3b9a6ce11db3d13d0c7f24fd396d Author: Adam Dickmeiss Date: Tue Apr 15 16:46:18 2003 +0000 Fixes for multiple updates in one transaction commit 01729541c2031fe1a1dd002f8e9ceaa58427e69e Author: Adam Dickmeiss Date: Tue Apr 15 16:38:32 2003 +0000 Improve error messages commit c3325d2586de28abaf2a4149204bc5d5833bba82 Author: Adam Dickmeiss Date: Sat Apr 5 12:32:43 2003 +0000 New SOIF filter commit f9ce2a88ff314a083f352de1f300173f407a4a91 Author: Adam Dickmeiss Date: Sat Apr 5 12:32:34 2003 +0000 Fixed >2GB overflow with metafiles commit cb85184168c20cf285b314ac747f92bd37012c8c Author: Adam Dickmeiss Date: Wed Apr 2 19:01:38 2003 +0000 Remove // comment commit 8e2c0ecade94d069e780517afaa4bb049749a361 Author: Adam Dickmeiss Date: Wed Apr 2 18:46:13 2003 +0000 Avoid // comments commit 6a0afdb9a9daff1bef244c783e6066046f40f998 Author: Adam Dickmeiss Date: Tue Apr 1 20:23:08 2003 +0000 Changes commit 0ab0d03ddbebe9e882cc06ca0287a3e97850f0f4 Author: pop Date: Tue Apr 1 10:14:23 2003 +0000 Fixed linking with -lieee commit 4c01004f98083cefbe51cfa53676e2e0900db491 Author: Adam Dickmeiss Date: Tue Apr 1 07:48:20 2003 +0000 Towards 1.3.10 commit 732e272a6d35533ccc89f4ccab0ea8069097b8a1 Author: Adam Dickmeiss Date: Mon Mar 31 22:14:18 2003 +0000 Use rset_dup for result set references commit 48b764604b23e70fe0a354bdfa02dc6ff0bffced Author: Adam Dickmeiss Date: Mon Mar 31 21:53:40 2003 +0000 Allow multiple open instances of rstemp commit d36550b2aa964b750d1043de4e4e026ab0606376 Author: Adam Dickmeiss Date: Mon Mar 31 20:57:29 2003 +0000 Links for GCC/VC commit 359a7b289a00fa4904ad6b3c6282bcb99934c014 Author: Adam Dickmeiss Date: Mon Mar 31 20:56:28 2003 +0000 Fix email address for pop commit 54f62385efb0b6b99dff15d0c72e0e257f45a843 Author: Adam Dickmeiss Date: Mon Mar 31 20:48:12 2003 +0000 More on WIN32 compilation commit dce23e96a08bf0fe05fc2f48b5ba96892015bc8a Author: Adam Dickmeiss Date: Fri Mar 28 13:55:24 2003 +0000 Changes. commit 2d52963edb0b6bd5bfc084f2cf936911ae456d39 Author: Adam Dickmeiss Date: Fri Mar 28 13:53:41 2003 +0000 Fix and operation which in some cases for equal keys on left and right side could produce extra hits. commit 996d52d71822d0599763e05254901161798c3a3c Author: Adam Dickmeiss Date: Thu Mar 27 21:57:01 2003 +0000 Fix problem with maps to numeric tags commit ef5136dcb919eb176e876ce4d29f8906ee554212 Author: Adam Dickmeiss Date: Thu Mar 27 13:38:13 2003 +0000 SuSE linux commit 397ed9cc5c2a74c066c2c565d5eef22558f63e27 Author: Adam Dickmeiss Date: Thu Mar 27 10:46:29 2003 +0000 zvupdates. missing doc commit b1e27ac647d3f28b773603157077a9d55e5ec3eb Author: Adam Dickmeiss Date: Wed Mar 26 22:22:17 2003 +0000 check for function sqrt in -lm commit 12b347494a6a01bea198b51fe6ce68a505321635 Author: Adam Dickmeiss Date: Wed Mar 26 20:59:22 2003 +0000 Changes commit e56f2f24a85220e580e6a9b86e5700a29719d6bc Author: Adam Dickmeiss Date: Wed Mar 26 20:58:08 2003 +0000 Towards 1.3.8 commit 107253562075857b3e8352dbc15e9fdd0bf2506e Author: Adam Dickmeiss Date: Wed Mar 26 16:57:24 2003 +0000 remove debugging from rank1 commit 13e782a92a268e4e2b14c2ad4a56620a1a04a4ee Author: Adam Dickmeiss Date: Wed Mar 26 16:52:48 2003 +0000 livcode commit 49ae06a7901f27cce5657bdc57fd7d147bf59fa1 Author: Adam Dickmeiss Date: Wed Mar 26 16:41:48 2003 +0000 Integrated ranking algorithm from Liverpool University commit d0362e4b1aca98601c185c9c28c8767bb5014f85 Author: Adam Dickmeiss Date: Wed Mar 26 09:26:27 2003 +0000 Information about zvrank commit cb5a187ebc65e4ec1047d7ca2169cfc316774b4a Author: Adam Dickmeiss Date: Wed Mar 26 09:25:56 2003 +0000 Changes. commit ff239404c4969d04388c7af260c5c7c11e82fd67 Author: Adam Dickmeiss Date: Wed Mar 26 00:02:05 2003 +0000 Missing return value commit 01d68c3e68001168758afc0c4ffd101a7c5cf149 Author: Adam Dickmeiss Date: Tue Mar 25 23:47:23 2003 +0000 mf_unlink delays unlink (for WIN32) commit a4eec8711bc993796ed9bfc1561b360c7a44ea69 Author: Adam Dickmeiss Date: Tue Mar 25 20:45:12 2003 +0000 zebraidx clean commit 8f7cd01d361d4c2ebb375b05c98eb9e82cae4a43 Author: Adam Dickmeiss Date: Tue Mar 25 19:56:01 2003 +0000 Fix repositoryDelete so that it uses recordId setting commit f927fab40f1e3d0d97965f7b02868516b9152ca1 Author: Adam Dickmeiss Date: Fri Mar 21 08:02:24 2003 +0000 Spelling commit a0acd766ca9eac2c185da604cdc0b93275a57863 Author: Adam Dickmeiss Date: Thu Mar 20 14:37:35 2003 +0000 Initialize log_freelist commit 070bb655a27d87b2faf795244df0e481ae6a7d5d Author: Adam Dickmeiss Date: Tue Mar 18 08:53:35 2003 +0000 Fix uninit. var commit dbf15c09e6ad1986b914c695c161f81f774e9f39 Author: Adam Dickmeiss Date: Mon Mar 17 20:22:54 2003 +0000 Fixed bug in insert_int commit 52551bf774d771a0422a401946fd0c5ee3788f34 Author: pop Date: Thu Mar 13 04:25:17 2003 +0000 added zebra_insert_record call, function in perl api, documentation and tests commit 2ebb686ca09ee2e128f4db3fb418d4846991b6a0 Author: pop Date: Wed Mar 12 17:11:23 2003 +0000 added force_update option for update_record, delete_record calls, to hopefully a llow multiple changes of a record within one transaction. Stupid, idn't it? commit 6aa184fabb86b0535bc1d4d50cb6967e7425a068 Author: pop Date: Wed Mar 12 17:08:53 2003 +0000 added force_update option for update_record, delete_record calls, to hopefully allow multiple changes of a record within one transaction. Stupid, idn't it? IDZebra::ScanEntry is an array ref now; commit 1ccadd935ed1b004e16537ab77c0653dd9058f99 Author: oleg Date: Tue Mar 11 13:24:10 2003 +0000 Rename file. DocBook XML better, I think. commit 4ec243cf897e7d84cf8860ff3b0086c5364306e7 Author: oleg Date: Mon Mar 10 13:27:38 2003 +0000 Added standalone document, which describe MARC indexing process. commit 9823f7a1e997efcb035afcaa26718b8b7f87fc0a Author: pop Date: Sat Mar 8 14:27:58 2003 +0000 free xpath regexp commit 7fc45ea31ae45c60e81074183b096ea0dcc0e60c Author: pop Date: Thu Mar 6 23:32:10 2003 +0000 Cannot fetch more than 1000 records at a time commit 19338e444cb99f4e78aac04709bcba2e9a565e2b Author: Adam Dickmeiss Date: Thu Mar 6 13:16:02 2003 +0000 Added links commit 6c57b2c269b3b1d16ebf2ab52c3ad3547d5ecdbb Author: Adam Dickmeiss Date: Thu Mar 6 11:58:08 2003 +0000 Scan with limiting result set commit 34252670515d7057b40aa9bd6acde0c891678d31 Author: Adam Dickmeiss Date: Wed Mar 5 16:52:26 2003 +0000 cvsignore commit 3df3e928408f9b730578eba65737e9c8a19dd707 Author: Adam Dickmeiss Date: Wed Mar 5 16:44:02 2003 +0000 Removed unused variable commit 63623cd0c55c41dc07c69cb76961f3db61924b97 Author: Adam Dickmeiss Date: Wed Mar 5 16:43:48 2003 +0000 Extra paranthesis to avoid GCC warning commit 723f6363425041889689c16a162fc352848000bb Author: Adam Dickmeiss Date: Wed Mar 5 16:43:31 2003 +0000 Removed unused function tr. Fixed warning commit 671b306a76625f84b890d4356a4b38394404c4e3 Author: Adam Dickmeiss Date: Wed Mar 5 16:41:10 2003 +0000 Fix GCC warnings commit 1801257818390335cae90e54d488d7294d17848b Author: Adam Dickmeiss Date: Wed Mar 5 16:40:51 2003 +0000 Add MAC OSX commit 739a88c380b89126a22a35a4f21ed1f2f4ec4291 Author: pop Date: Wed Mar 5 14:15:07 2003 +0000 Creating directories for zebra repository in demo commit c45742c694d4fa704d4282ada62c7f46c69fea88 Author: pop Date: Wed Mar 5 13:55:21 2003 +0000 Updated documentation, ERADME, scanning, sorting and filter virtual file handles are documented now. Added support and documentation for shadow registers. commit 7c4bb1a2e1e0ed1748e7a443d81af618530f44a6 Author: oleg Date: Wed Mar 5 11:12:18 2003 +0000 Fixed error for MARC field, which has fixed lenght. commit 316571421f340cca21ed5c70215cd890e5243306 Author: pop Date: Wed Mar 5 00:35:57 2003 +0000 missed something... commit 5635837565a8ba1f94211d456f5849dc6e300a21 Author: pop Date: Wed Mar 5 00:28:16 2003 +0000 Added test for transactions Removed unused files commit eb8857cfa2ceaa2635f14888b95d6f71b8def045 Author: Adam Dickmeiss Date: Wed Mar 5 00:08:04 2003 +0000 WIN32/Unix installation sections commit f6ce51cf9a3cd13f256209c4fb3841a86f0e35a0 Author: Adam Dickmeiss Date: Tue Mar 4 23:48:55 2003 +0000 Check for bad zebra_begin_trans usage commit 8e6c661870cbd78853147ab1f83bbea91cf8263f Author: Adam Dickmeiss Date: Tue Mar 4 23:36:29 2003 +0000 Moved zebraapi.h to include. Is installed in /include commit e035737c20ac0caf47e9e48e3b11f006e9132e9c Author: pop Date: Tue Mar 4 23:32:55 2003 +0000 Fixed perl API for new layout commit fc9684841bbfad0b625e7365b99bae7b7df737df Author: Adam Dickmeiss Date: Tue Mar 4 23:30:20 2003 +0000 zebra_begin_trans got extra "write" flag. zebra_begin_read implemented in temrs of zebra_begin_trans. zebra_end_read is equivalent to zebra_end_trans. commit ac5747296ef5b85e2125da04fa1f7d33852ad971 Author: pop Date: Tue Mar 4 23:05:30 2003 +0000 First cleanup, zebra_api_ext.c is epmty now commit 619b7a25eae7bffe31395d103d8eb4c5d0a84581 Author: pop Date: Tue Mar 4 19:33:52 2003 +0000 Scan feature added, not documented yet commit 8e1d114f1969b19d12afc6ab0b04031e35ae5c88 Author: pop Date: Mon Mar 3 18:27:25 2003 +0000 Added sorting, +tests. documentation is needed. commit 62aeae27f2897b54a14c6fe60da004f2f23bd2e8 Author: pop Date: Mon Mar 3 12:14:27 2003 +0000 Added documentation and test for the IDZebra::Resultset object Added documentation for IDZebra::RetrievalRecord Resultsets (in the C api) are destroyed with session close Added DESTROY code for IDZebra::Resultset, to clean up odr memory Enhanced test and documentation commit 29cf1a0e43f38bf53107f750e4595199b81c4363 Author: Adam Dickmeiss Date: Mon Mar 3 10:31:46 2003 +0000 Replaced fprintf calls with yaz_log calls. Fixed bug in zv_init_schema initialisation. Removed unused variables in prn_rs and weighting functions. Removed some unused code left from original rank1.c file. Indentation. commit 85d30f28b52160da8d5bb52e3977503f953624cb Author: pop Date: Mon Mar 3 00:49:37 2003 +0000 test.pl removed commit a1dba281bafc701a7e958d6e7512a2dbb3027191 Author: pop Date: Mon Mar 3 00:48:55 2003 +0000 CQL tests and error handling commit dfa73b7f3e4991f95e868da0ea7e2a9bbf18784a Author: pop Date: Mon Mar 3 00:47:58 2003 +0000 ZebraRetrievalRecord changed. Fixed returning of null buffers in the wrapper commit 5a7df12ffccaa5f7d1b32b7158eb4a9c0babde2b Author: pop Date: Mon Mar 3 00:46:26 2003 +0000 fixing storeData/storeKeys commit 5981b70de0f2d78207ec598384a4b7915c012da9 Author: pop Date: Mon Mar 3 00:45:37 2003 +0000 Working on record retrieval. commit 2f8d4d90ec5eba3725182f83c067e141db160495 Author: pop Date: Mon Mar 3 00:44:39 2003 +0000 Test is split into parts now, to be used by Test::Harness commit 0d4ce8fe167ca3df0c216179de0a2e9d22ce3a6a Author: Adam Dickmeiss Date: Sun Mar 2 23:12:50 2003 +0000 Bug fix: missing close (and leaking file handle) commit b551622098261f77647eb99bbbd4b92a3285ea5f Author: Adam Dickmeiss Date: Sat Mar 1 22:45:37 2003 +0000 Predictive parser for X-Path predicates. Parser called zebra_parse_xpath_str instead of parse_xpath_str. commit da923ac841e6e83bf7ce9abd27be1445e7917207 Author: Adam Dickmeiss Date: Sat Mar 1 20:41:34 2003 +0000 Bug fix: uinitialized xpath predicate member (value) commit 3f27ac09ee6fa8bef4e88693cd2422ac7933b4f7 Author: oleg Date: Sat Mar 1 04:12:22 2003 +0000 Test of directory. commit 5cc2a9ae32ed244d0159c81cd06cd4ff32ab0b3d Author: pop Date: Fri Feb 28 20:12:18 2003 +0000 Added sysno and score to ZebraRetrievalRecord commit 924ac21637671fe586641fc29952ef5a78c7b7c5 Author: pop Date: Fri Feb 28 20:11:20 2003 +0000 That's it for today commit 3adbc5bfe003fd7b3a105782b551c5d18fe65104 Author: pop Date: Fri Feb 28 18:45:50 2003 +0000 Versioning... commit a9d007b7f9024da4d8e04370fcb9063ec1816378 Author: pop Date: Fri Feb 28 18:38:28 2003 +0000 Removed old stuff, and done some cleanup in the documentation, and around resultsets commit dc3c04329444e64a53fb799adb40bbb6370b3f1b Author: pop Date: Fri Feb 28 16:20:10 2003 +0000 Enhanced security for lost filter objects. Added calls to support virtual file handles in perl commit 41e1d7c01ff2e185fceba64fcfd196080d719515 Author: pop Date: Fri Feb 28 16:18:18 2003 +0000 New cql map file to be used for testing commit 0a34a94a93dc7d594d0f6a7f359a63dbc1297775 Author: pop Date: Fri Feb 28 16:17:42 2003 +0000 Perl filters now can optionally reach data via a virtual filehandle. Enhanced features on the api (like searching :)) Bug fixes commit 85df0876b407903782d24f5909af0631508bf4de Author: Adam Dickmeiss Date: Fri Feb 28 15:55:56 2003 +0000 Changes. commit f51e2207f5c878c383d8fe293481c1872773caca Author: Adam Dickmeiss Date: Fri Feb 28 15:35:54 2003 +0000 CDDB test part of distribution. commit 2fa64f1f1d968b5aae13af1ea11946916e41817b Author: Adam Dickmeiss Date: Fri Feb 28 15:34:21 2003 +0000 Add include of unistd.h for sleep(3). commit b5cc5d024ac6286a0f2ab984cb8ef7995fc8a33e Author: Adam Dickmeiss Date: Fri Feb 28 15:28:36 2003 +0000 64-bit offsets for register files on Windows commit 36403af0892015e79516d8cfc954d6f79f8ce1ca Author: Adam Dickmeiss Date: Fri Feb 28 14:34:37 2003 +0000 Added include of string.h commit 11f210a8d94bd9d8470eccbfde96db834f9743bf Author: Adam Dickmeiss Date: Fri Feb 28 14:34:21 2003 +0000 Updated WIN32 makefile for new source commit da934a2c8bda48f87cb49db30b946d7b1a13aa4b Author: Adam Dickmeiss Date: Fri Feb 28 14:09:49 2003 +0000 Documented unread commit 0a5aa3b65fe14789bcada545a0e399545725d1ff Author: oleg Date: Fri Feb 28 12:33:38 2003 +0000 Added support of the complex indexing for MARC records (whithout documentation yet). Added test for RUSMARC records. commit 52fad02a1584f75a0c7ea56c5e3381f84c3f1ce0 Author: Adam Dickmeiss Date: Fri Feb 28 10:44:44 2003 +0000 Create directories automatically commit 2057f8905b6063f8d8a89a1ab655773bc9c36e07 Author: pop Date: Thu Feb 27 23:26:19 2003 +0000 Looks better commit 71b5e86474a714d645b2119a590fe25e9cc7ae04 Author: pop Date: Thu Feb 27 23:21:40 2003 +0000 Variable scoping back to individual function calls. Cleaner, safer, slower :) commit 4003296c8a5cf45925cf18f2d6feef929ead1f66 Author: pop Date: Thu Feb 27 23:12:18 2003 +0000 Perl API os growing commit 1b62315f3ba83b91a8580f72943124ba9cb09249 Author: pop Date: Thu Feb 27 23:08:10 2003 +0000 zebra_end_trans is just calling zebra_end_transaction now: this second one is re turning transaction status (for debug/test purposes in the API) commit f0e68a4ee36180d52d69369d0bb09a33392bb643 Author: Adam Dickmeiss Date: Thu Feb 27 22:55:40 2003 +0000 Fix memory leak for sortKeys.buf. Add Johannes Leveling's zvrank. Enable with 'rank: zvrank' in zebra.cfg. commit 5a7507a06f32009131d12ff7e52ecc8c1adce9db Author: Adam Dickmeiss Date: Thu Feb 27 17:12:11 2003 +0000 Fix prototype for bufferExtractRecord commit a9af358edd64e859e406d8293af06e0b071ed0cb Author: Adam Dickmeiss Date: Thu Feb 27 11:33:45 2003 +0000 Towards 1.3.7 commit 4e62ee01de32fadf7036b0a6aa61a76528f6e3e0 Author: Adam Dickmeiss Date: Thu Feb 27 11:29:13 2003 +0000 Set additional info for error 114 commit 3e06ed92b9b6a1dc1c889e2199030d4e59db0e93 Author: Adam Dickmeiss Date: Wed Feb 26 21:46:37 2003 +0000 Truncation=104 (CCL) support commit 769b0ece6d1eb33e0f499c798cfff292c4f41053 Author: pop Date: Wed Feb 26 12:30:54 2003 +0000 Don't dump core, when there were no recods indexed due to unknown type commit 5b0f4f6cb31f0678fcf7ba9abc58ed9392b34a04 Author: pop Date: Wed Feb 26 11:40:04 2003 +0000 Doesn't diw when the constructor of the perl filter is failed commit b2b91c241a47b106fedee0c8bc99675bb179c765 Author: pop Date: Wed Feb 26 09:13:51 2003 +0000 added recordType parameter to bufferExtractRecord commit 94731f54d976f745cc604bd7e00e7de3fd8151fa Author: Adam Dickmeiss Date: Tue Feb 25 21:51:05 2003 +0000 Change types of signed/unsigned int commit 8b2a5cf09bb9c5cd5c0f780f63c40612366b8daa Author: Adam Dickmeiss Date: Tue Feb 25 21:50:27 2003 +0000 Remove unused variables commit 7eec88b19326d12780b7587133ed4941cd9776a8 Author: Adam Dickmeiss Date: Tue Feb 25 21:46:52 2003 +0000 Dont set errCode to 0 in zebra_end_trans, zebra_end_read commit 5501453af5f35ea671edc7186f9959d0421fa58d Author: Adam Dickmeiss Date: Tue Feb 25 14:17:58 2003 +0000 Add missing source files for Perl. commit ffb6aaba033b87c9e2e4d32e1f84f88bc6679e1f Author: Adam Dickmeiss Date: Sun Feb 23 22:52:15 2003 +0000 Add missing source (for WIN32) commit 4ecf459c8ef0ad862ce780e6f9b578f4cca730ef Author: Adam Dickmeiss Date: Sun Feb 23 21:30:58 2003 +0000 Date commit 60effea2e8990b44b408c64ecc921851b0d93382 Author: Adam Dickmeiss Date: Sun Feb 23 21:26:50 2003 +0000 Date. commit 2ff878a783b51d3cb1fe6f75dd5613fb234d2cb7 Author: Adam Dickmeiss Date: Sun Feb 23 15:15:42 2003 +0000 Changes commit afc0de3a668e5bc6621c4599ce552aa5e8ac9757 Author: Adam Dickmeiss Date: Thu Feb 20 21:24:42 2003 +0000 Dates commit 579c5c2ee7d0d8aa67af7092e46158187cc27b99 Author: Adam Dickmeiss Date: Thu Feb 20 21:13:37 2003 +0000 Bump version commit fdffce0ddb29102dd5aa533d6e42a5d0fa3e3222 Author: Adam Dickmeiss Date: Thu Feb 20 21:06:47 2003 +0000 Renamed spec file. commit 5e22c797a3b8155ec46e4680f2bc3b5ef163752b Author: Adam Dickmeiss Date: Tue Feb 18 11:57:58 2003 +0000 Updated for YAZ 1.9.3 commit fbbce5a85247803288df5d97e5061889f118c826 Author: Heikki Levanto Date: Wed Feb 12 15:45:59 2003 +0000 Asserts in zebraapi, clearing the errCode commit 2740e690cd7ddedcc936475a80c6356faa771f5f Author: Heikki Levanto Date: Tue Feb 11 17:28:10 2003 +0000 Silly comments added commit c860ce4e5d976ea40d5b571c9d0d4fe9ff2f6e88 Author: Heikki Levanto Date: Tue Feb 11 17:27:28 2003 +0000 better logging, a few more calls commit 11a23e22fd9b87344dd1e2b37ce6898b8225d5b3 Author: Heikki Levanto Date: Tue Feb 11 14:01:39 2003 +0000 Minor cleaning, removed a crash from error reporting routines if not initialized correctly, and tests for those commit 9bbaa63b531cc24a1bc79e0447a9d6fbde113a3f Author: Adam Dickmeiss Date: Mon Feb 10 09:42:42 2003 +0000 Added TCL_LIB for zebrash commit 322abc688457f766fbcfe5598cd83a2fbc5d0c4c Author: Heikki Levanto Date: Fri Feb 7 15:41:28 2003 +0000 Minor fiddling, log functions. Still no real testables... commit c12b2fd1dec22f73a18a8f89551f169a19203f8a Author: Heikki Levanto Date: Thu Feb 6 17:35:21 2003 +0000 Minor improvements in the help commit 4a7fb99818837b391aa7e70cf35385e77aa3deeb Author: Heikki Levanto Date: Thu Feb 6 16:58:56 2003 +0000 Started on the zebra shell - api-level debugging tool commit 79204e21fcf9811512b174138025916407510227 Author: pop Date: Tue Feb 4 12:10:19 2003 +0000 added commit 26a5a4b96b90361859cf856d6c41852b03ca2f84 Author: pop Date: Tue Feb 4 12:06:46 2003 +0000 xelm support enhanced, now supports simpler predicates commit 78b872f7c2e688a0701fab47e392e28c444b1225 Author: pop Date: Tue Feb 4 11:42:22 2003 +0000 xelm test commit 8a871eacb9411aac5c6262e0f593b671415dc199 Author: Adam Dickmeiss Date: Fri Jan 17 18:39:44 2003 +0000 Updated profilePath. isam:b for zebra-b.cfg commit 55f7753517be121c50701a923dc638b5a8f3be5e Author: oleg Date: Wed Jan 15 07:26:40 2003 +0000 Add macros for case insesitive string compare. The Z39.50-1995 required case insensitive Database name. It fixed. commit 48d62eb784b4476f4be281417b94878e7169bf2c Author: Adam Dickmeiss Date: Mon Jan 13 22:45:22 2003 +0000 Fix logging commit f091b701a8326e533f4877e755ec561e109b47b9 Author: Adam Dickmeiss Date: Mon Jan 13 22:37:12 2003 +0000 Do not use readdir_r commit 83574dcb462d530758e21aea0a8a843cd0dce60f Author: Adam Dickmeiss Date: Mon Jan 13 22:28:18 2003 +0000 Fix type of len commit 5066a2c2ead5876e528294b9850f3a3fb5fb3d46 Author: Adam Dickmeiss Date: Mon Jan 13 22:16:24 2003 +0000 Fix and op. Mixed ranking/non-ranking did not work commit 8f9e2cb55203802cb43fcda15a85797579372250 Author: Adam Dickmeiss Date: Mon Jan 13 15:43:25 2003 +0000 Add include of sys/types.h (MAC OSX) commit 523c53e5f1fd1e24828dc4a6979d34987241fe43 Author: Adam Dickmeiss Date: Mon Jan 13 15:06:23 2003 +0000 Simplified the character set negotiation code a bit. Added unlink of zebrasrv.pid again. YAZ no longer calls bend_stop for children. commit 65120d727892457382342a9efc7bee7da1e27d07 Author: oleg Date: Mon Jan 13 10:56:09 2003 +0000 Add a few fixs: correct use yaz_iconv(), correct delete of zebrasrv.pid file. Add support short names for character set. It is inheritance the oldest names, which will be deleted later. commit cad3d9cf6b923f0bd0adb6731db88e3ff6bac80a Author: oleg Date: Mon Jan 13 10:53:16 2003 +0000 Fixed behaviour of Zebra in one-byte environment (see comments in file). commit e809d64f640790b2695a659bd2eb0ebd4e3cf963 Author: Adam Dickmeiss Date: Mon Dec 30 12:56:07 2002 +0000 Update zthes example 2 to use xelm commit f4bb896e485ca3ce8f3b14d5199f79ba90f6b2f0 Author: Adam Dickmeiss Date: Mon Dec 30 10:25:24 2002 +0000 examples/zthes now part of distribution commit 00d69171180b9edc123986794b572be57caa5bb2 Author: Adam Dickmeiss Date: Mon Dec 16 22:59:34 2002 +0000 Fix X-Path Searching for numeric structure commit b17cf6fd6cad7283033afe18fc346250ec1b2ad3 Author: Adam Dickmeiss Date: Mon Dec 16 20:27:18 2002 +0000 xelm commit 587c1d5cac956ec0cf482fc14ecea40240e85fd8 Author: Adam Dickmeiss Date: Tue Dec 10 12:54:24 2002 +0000 Fixed bug in sort for unset entries at end of sort file. commit d46ae7055fcdac3336decda8d8ed50eb5c25ffd9 Author: Adam Dickmeiss Date: Thu Dec 5 16:09:39 2002 +0000 Minor commit 8d16f8a75221de7152eceb7d6be4d9e847d99e4f Author: Adam Dickmeiss Date: Tue Dec 3 16:40:17 2002 +0000 Description of systag. Adam's and Mike's versions both here. commit 291f3ed7fc3e5d55e7993ae4e5c19e0bb0158d3d Author: Mike Taylor Date: Tue Dec 3 16:10:19 2002 +0000 Remove documentation of tagsysno (bah!) and add documentation of systag, though I don't properly understand what it's doing. Tweak the .cvsignore files. commit 21f3c59928c1a77691436a472f385d58262dad4a Author: Adam Dickmeiss Date: Mon Dec 2 16:55:55 2002 +0000 Revert relative path for zebra commit c8a333d48c42e2a51f43fd42ef79e23d40a565a7 Author: Adam Dickmeiss Date: Mon Dec 2 16:55:14 2002 +0000 Directive systag. commit 44e62bbbf76dffbca214dfba7e7a501ae8c78b99 Author: Mike Taylor Date: Mon Dec 2 15:38:33 2002 +0000 new, top secret, file commit ea597d9e75a2106887526480b81b883d908e0fb4 Author: Mike Taylor Date: Mon Dec 2 15:19:12 2002 +0000 Add Zthes's synonymous element-names to tagset files Tell top-level configuration file to recognise zthes.att commit 72e26b79a2b55e5aaec932bad7e645e83824c5c4 Author: Mike Taylor Date: Mon Dec 2 15:11:49 2002 +0000 Fix Harvest-NG reference to Harvest (vanilla); credit Peter Popovics for the Perl work commit 24cf42a15df56f9fe2436eedef816212b9d4fb17 Author: Mike Taylor Date: Mon Dec 2 15:10:58 2002 +0000 document tagsysno commit e5efc09d27b42670350f492ebd926033d7c6deb3 Author: pop Date: Mon Dec 2 10:27:33 2002 +0000 tmp, register, lock are created now commit bb45d1f271522de94ba190f4024a27e2398f55fb Author: pop Date: Mon Dec 2 10:23:30 2002 +0000 Scan is working now commit 681dc600200afd81cec7d692af984ec925ff51dc Author: Mike Taylor Date: Sun Dec 1 23:29:07 2002 +0000 add "make clean" rule commit 8f0696b6f9d35a965160a8f823909d712b2d93ad Author: Mike Taylor Date: Sun Dec 1 23:28:30 2002 +0000 Additional elements on the end of tagSets M and G. These have been in here for about three years. Come on, guys! :-) They're used in the Zthes profile (which is why they were added to tagSets M and G in the first place), so their absence from the config files distributed with Zebra make me wonder just how seriously people have been trying to implement Zthes with Zebra in all that time. commit c50b7223e10de52e713be64559129ea89e8ed601 Author: Mike Taylor Date: Sun Dec 1 23:26:26 2002 +0000 All sorts of minor and semi-major improvements. Remove harvest.mbox -- its content is now incorporated. commit ab80ea375b1c9356f49b160a3b1ab76f468546b5 Author: Mike Taylor Date: Sun Dec 1 23:25:06 2002 +0000 All sorts of new stuff and modifications in the attempt -- so far unsuccessful and perhaps ultimately doomed -- to wedge the Zthes taxonomy model into a Zebra configuration. commit 1cd729b5e40fe0bee16a0a2c073dffc8bcbd1d28 Author: Mike Taylor Date: Wed Nov 27 18:40:46 2002 +0000 append commit 1eb657177a49e431b60cebcdcf8eb4b32fd1d40b Author: Adam Dickmeiss Date: Wed Nov 27 00:57:37 2002 +0000 Updated yaz.m4 commit f5c13e9fc6bb254a712c1b60cf2916a3f9c9b0b3 Author: Adam Dickmeiss Date: Tue Nov 26 23:10:23 2002 +0000 Update version for RPM package commit b6232e686d42ee25262bcf6fbf5edd3bf8da43a8 Author: Adam Dickmeiss Date: Tue Nov 26 22:20:06 2002 +0000 DEFAULT_PROFILE_PATH fix for WIN32 commit 63b02e326652929cfe753848b02381e131e53127 Author: Adam Dickmeiss Date: Tue Nov 26 22:18:34 2002 +0000 Remove // comments commit d274d136775e11065ce0dd20cb0179a9d64fde6d Author: Adam Dickmeiss Date: Tue Nov 26 22:18:17 2002 +0000 remove atmp after use commit 586b0ab50d888a68ce844c4b7d196e9c23e1afbd Author: Adam Dickmeiss Date: Tue Nov 26 22:04:13 2002 +0000 DEFAULT_PROFILE_PATH 0 for Win32 commit 8c10633cefe898c76f3de89d2ddd0a3ca27c0eae Author: Adam Dickmeiss Date: Tue Nov 26 22:02:04 2002 +0000 Changes commit bccfb1a28ed58217fd7713df78d0ac7c73306140 Author: Adam Dickmeiss Date: Tue Nov 26 21:51:18 2002 +0000 Build depends YAZ 1.9.2 commit 9547d3a190e933173ff2015dc63aab498dcba130 Author: Adam Dickmeiss Date: Tue Nov 26 21:45:28 2002 +0000 Automake conditional to control perlread.c. Perl disabled by default. commit cefaccf49b16e9ae79f53d963a03ad40f332de0f Author: Adam Dickmeiss Date: Tue Nov 26 20:15:44 2002 +0000 Use = rather == in test (for Perl) commit a073dc58b9244c9a38e014d47363170771ced398 Author: Adam Dickmeiss Date: Tue Nov 26 13:50:29 2002 +0000 Increased version number commit 4386e2d60238c3698153d90bedc3fb0f35a7fe3f Author: Mike Taylor Date: Mon Nov 25 12:57:54 2002 +0000 Notes for documentation. commit fb6e87e036fa1b6d282a30140c202d49152a105b Author: Mike Taylor Date: Mon Nov 25 10:29:24 2002 +0000 append commit 0716d034f533ce87da162a61e62ca350dc5a3b7e Author: Mike Taylor Date: Mon Nov 25 10:29:04 2002 +0000 ignore auto-generated file commit 4e7d0c112f988c61da5e9c2db928b73735ef1f4a Author: Mike Taylor Date: Mon Nov 25 00:31:14 2002 +0000 new file commit 24baf956f5d2c41e48a5d755adf70b3c7e1ce7da Author: Mike Taylor Date: Tue Nov 19 10:51:22 2002 +0000 ignore commit 35313087050bd73d0a749f8855287009710b9250 Author: pop Date: Mon Nov 18 13:30:19 2002 +0000 Testing of retrieval and sort added commit 039f5f25e37aad9bd856d3f2fe93a96cd67710c8 Author: pop Date: Mon Nov 18 13:29:37 2002 +0000 IDZebra.i doesn't have to be distributed. Added Resultset.pm commit 54d5b0f4883b330987489aa9247000f1d2f2ea94 Author: pop Date: Mon Nov 18 13:28:28 2002 +0000 No major changes here... Do we need this at all? commit 85f354cfc387c5e659c47171821a2e54ad4b2e6e Author: pop Date: Mon Nov 18 13:27:19 2002 +0000 New class to represent a retrieval context. Created as a result of search or sort commit 03d53289357e1714d2b1a9492a029eb352325480 Author: pop Date: Mon Nov 18 13:25:53 2002 +0000 Search now returns a Resultset object, for retrieval purposes. Added sort functionality. commit b9659896db2090f13cc56766787673c6fa0f9e37 Author: pop Date: Mon Nov 18 13:24:16 2002 +0000 Added record retrieval calls (search, sort, retrieve) commit 9f0570bd9f370c88cb707c369c23a5392561f644 Author: pop Date: Mon Nov 18 13:21:57 2002 +0000 Added sort and retrieval functionality. commit 8ecf1c1bb3460e75b647c7c84dba53365c8daf45 Author: pop Date: Mon Nov 18 13:20:31 2002 +0000 Restructured header files. Now zebra_perl.h contains definitions which are going to be shadowed by swig also. Other definitions in zebra_api_ext.h are just used internally. commit 510df7e597d0d28dbc326d604e7b60605bca304b Author: pop Date: Mon Nov 18 13:18:10 2002 +0000 recordGroup typedef moved to zebra_perl.h commit 110403896e7928d0f079c377f7f26192bfb13850 Author: pop Date: Mon Nov 18 13:16:43 2002 +0000 Added record retrieval calls (search, sort, retrieve) File layout changed (all shadow classes are defined in zebra_perl.h now) Header file structure changed commit 43d2ebb33d16b27b18e4fc5bc24a81e1be43aba3 Author: pop Date: Mon Nov 18 13:12:47 2002 +0000 Fixed included headers structure, definitions for shadow classes rearranged. commit eb605e77ed5e4cbc21e32adce1888261148bb7b4 Author: pop Date: Mon Nov 18 13:11:30 2002 +0000 Prototype changed for grs_perl_get_mem, grs_perl_get_dh in perl/IDZebra.i in order to allow proper wrapping code generation, without c warnings commit 06baa91f7a7f47d46ae76f86c95d7860ffe6a2d4 Author: pop Date: Mon Nov 18 12:52:16 2002 +0000 Added record retrieval calls (search, sort, retrieve) File layout changed Header file structure changed commit 62785c75e108df98df439f47c4429e098ba0fabc Author: Adam Dickmeiss Date: Mon Nov 18 11:07:59 2002 +0000 init key_file_no to 0 commit 8c7947050502fe0e1d15a65ee21247cac594d310 Author: pop Date: Sat Nov 16 00:24:36 2002 +0000 removed PERL_IMPLICIT_CONTEXT allows to build with perl 5.6.1 and 5.8.0 as well commit d7d6cf00aebaa821151fb82f08ee3b84818934d4 Author: pop Date: Sat Nov 16 00:17:57 2002 +0000 search_PQF name corrected commit 8bff94618ba188dbb48dd205734a478ef914008b Author: pop Date: Sat Nov 16 00:16:33 2002 +0000 Still some fixing commit fec3d1bd069856709d4609240632c4f3cc8f8c34 Author: pop Date: Sat Nov 16 00:12:39 2002 +0000 Sample .abs file for testing with perl commit 5853e59dcc311f8cfb28f39ea4cd3482ea6c3cbf Author: Adam Dickmeiss Date: Fri Nov 15 23:00:59 2002 +0000 For directory perl 'make dist' reads MANIFEST commit 806749525584c7598f8f239a6941ec5294547a20 Author: Adam Dickmeiss Date: Fri Nov 15 22:21:54 2002 +0000 Added interface commit c8504e6a297055834322bd89b52e8410f549f337 Author: Adam Dickmeiss Date: Fri Nov 15 22:01:42 2002 +0000 No // comments. Header. commit 37695f0ca9b5f0cc0bf1d55fb1b0a39a5e8bb486 Author: Adam Dickmeiss Date: Fri Nov 15 21:57:41 2002 +0000 Missing grs_add_handler for Perl commit af03c4a4f5320b52c7cc5f47bab7c9ad4b3e384d Author: Adam Dickmeiss Date: Fri Nov 15 21:26:00 2002 +0000 Perl Filter and Perl API commit 54867e37cc72f7a550a15ed77de30e0c1837b57d Author: Heikki Levanto Date: Mon Nov 11 15:41:19 2002 +0000 Removed the -e, modified -c to do the same commit 4ed7a26e63a0a8f537743b3c4c083c85fee4325a Author: Heikki Levanto Date: Mon Nov 11 15:40:56 2002 +0000 A simple test with *one* sgml record commit b389354c86c0562b58c638dcfe59834791c4db50 Author: Heikki Levanto Date: Mon Nov 11 15:19:25 2002 +0000 Added -e command line option to expect a given number of hits, and return with exit(3) if getting anything else. Makes test scripts nicer to write commit 3ee1a8c3e7c63fe8fe350249e4763a029ae81737 Author: Heikki Levanto Date: Mon Nov 11 15:05:29 2002 +0000 Fixed a problem with end-of-stream handling. Probably still broken, but in a different way. Need more testing. commit 4e68a651c499e3acc77fbf2dbedd294855206f00 Author: Adam Dickmeiss Date: Sat Nov 9 22:26:19 2002 +0000 XPath tests commit cab06858d0404c4cd9dff44a38db53c81b8bd646 Author: Adam Dickmeiss Date: Sat Nov 9 22:26:04 2002 +0000 Fix zebraidx init's. Use SIGTERM instead of SIGKILL for scripts commit 674c1cc7102753f0cba3c03cf7553826ba9e9436 Author: Adam Dickmeiss Date: Fri Nov 8 19:59:52 2002 +0000 dinosauricon gone commit bdd8fba38500ff9292f7125d61a6072406bb949d Author: Mike Taylor Date: Fri Nov 8 17:00:57 2002 +0000 resolve ### links commit b27d056b65936ce5212067e8bf88fab49c780314 Author: Adam Dickmeiss Date: Fri Nov 8 13:34:46 2002 +0000 Swap order of elements nonews and title commit 97d355ca782abd948aaf5f22108f08ab99dc264f Author: Adam Dickmeiss Date: Fri Nov 8 13:23:52 2002 +0000 TKL documentation format commit c2d79d09e1eaae0142285db415e28d6dfeb3db88 Author: Adam Dickmeiss Date: Fri Nov 8 13:22:48 2002 +0000 *.log to cvsignore commit 939f4cf209fc2bfa1d82f5cbac5c9e34f68a9b24 Author: Adam Dickmeiss Date: Fri Nov 8 13:22:25 2002 +0000 cvsignore added commit 8161ed659fd38755f877f194ca18bd845e34c839 Author: Mike Taylor Date: Fri Nov 8 01:08:06 2002 +0000 Add .cvsignore commit 9d4e6632c1548802427457774ee51c70f47e08ce Author: Mike Taylor Date: Fri Nov 8 01:07:10 2002 +0000 Add Zthes example commit c6870a73f20b8694063dc738d5b8127ff38d593f Author: Mike Taylor Date: Fri Nov 8 01:04:58 2002 +0000 Remove the dinosauricon example. commit d8ba36b7da24857c593393ef680c3983070e1124 Author: Mike Taylor Date: Fri Nov 8 01:01:38 2002 +0000 Fix to describe new Zthes example instead of dinosauricon. commit dfc79a96b0ad352eb2b974c9d70c5e9fb8c6b79e Author: Adam Dickmeiss Date: Thu Nov 7 09:07:07 2002 +0000 SortKey fix and better logging for extract_rec_in_mem commit 49f49aa27c8d63cea66dfb5a9e06e5735c835509 Author: Adam Dickmeiss Date: Thu Oct 31 10:11:39 2002 +0000 Brief description of xelm commit 18bb12424be1039e67dddbbada3449da4177c2f4 Author: Adam Dickmeiss Date: Wed Oct 30 14:45:42 2002 +0000 Define oslash; so that our address looks OK commit 066ce352a46a7e50987bab404994d199eef748ff Author: Adam Dickmeiss Date: Wed Oct 30 14:35:08 2002 +0000 If installed, Zebra can operate without profilePath setting commit 1a55fdbd6cfd02fd42f8051d0f5ed83fc4f59c06 Author: Adam Dickmeiss Date: Wed Oct 30 14:02:21 2002 +0000 cvsignore. Move away Makefile commit aa36decbdd330b8858eac641056bf607a8eea8a1 Author: Adam Dickmeiss Date: Wed Oct 30 13:59:42 2002 +0000 No reference to yaz/tab in manual or zebra.cfg's. Gils example moved to examples/gils. test/gils is kept testing. Sub directory examples now part of tar-ball after make dist. commit e752c2712240e5020ee737cbf1cb0f33b9a1ba28 Author: Adam Dickmeiss Date: Wed Oct 30 12:58:21 2002 +0000 Use readdir_r on threaded systems commit fabf09f46b730f484dd23da4682819ffbf739b65 Author: Adam Dickmeiss Date: Wed Oct 30 12:55:18 2002 +0000 One more html file commit d2e692248eac6469ef7a3a3f8044010cb5cc1da7 Author: Adam Dickmeiss Date: Wed Oct 30 11:09:39 2002 +0000 Errata from Johannes Leveling commit cc61c175f3b9e1b45cc2598c41ffe3242db27b97 Author: Heikki Levanto Date: Tue Oct 29 10:46:59 2002 +0000 Modified to demonstrate the dependency on file timestamps instead of trying to show a mysterious bug commit 76b98cc82d9d4c5f3fa050cd47b88c3f42760061 Author: Heikki Levanto Date: Tue Oct 29 10:39:15 2002 +0000 The bug was solved, these extras no longer needed (updates were skipped because of the low resolution of file timestamps (1 sec), not because of some deep mysterious bug in zebra...) commit a84a0679f74e885257ddba6ed6c32e93f1743f68 Author: Adam Dickmeiss Date: Mon Oct 28 21:39:11 2002 +0000 Simply profilePath commit 2062fca4a1e808a853ea11a607425fb84613374b Author: Heikki Levanto Date: Fri Oct 25 09:10:57 2002 +0000 A new test case, h3.sh, and its config h2.cfg These are to be removed later! Not part of the make check These demonstrate a problem in the indexing commit 6cb7decde9ca7df0ad2ee44efd1f24898b527837 Author: Mike Taylor Date: Thu Oct 24 22:28:19 2002 +0000 remove auto-generated Makefile, Makefile.in commit 51bd76ba7370f129ee9ccae4611e074d1c701105 Author: Adam Dickmeiss Date: Thu Oct 24 21:57:38 2002 +0000 New debian release commit 5e6b6a90f396b08a6c8f8bd626e8961a08009ba1 Author: Adam Dickmeiss Date: Thu Oct 24 21:54:29 2002 +0000 Fix sort key creation (bug introduced by previous commit) commit 1c2e551dbdc6e631d19a405e2dbda45a234632f8 Author: Heikki Levanto Date: Thu Oct 24 13:43:15 2002 +0000 Renamed test0?.sh to stop0?.sh, added timing2 commit 3d4f0f1ddbc8b1ec6df244bb400184f086e211c8 Author: Heikki Levanto Date: Thu Oct 24 13:07:02 2002 +0000 cleaning old code away commit 2d542e2071070e2e802c7f74bca465bbd7515ee2 Author: Adam Dickmeiss Date: Thu Oct 24 10:29:24 2002 +0000 New debian release commit 2537999a92e083694efe6a60ccf664f147c37ae2 Author: Adam Dickmeiss Date: Wed Oct 23 14:29:10 2002 +0000 Restore this record commit 271a10a59d479e149b9cd47258b9bf74c6690526 Author: Adam Dickmeiss Date: Wed Oct 23 14:28:20 2002 +0000 Fix sort. Delete dup session_lock in zebra_close commit d04590889450ad503a8979703370d3c7cdc7f0fc Author: Heikki Levanto Date: Wed Oct 23 14:22:40 2002 +0000 Added a timing test, minor modifications in 02 commit fc0d7f26cdad5ac7ca028e83af4af05ec4dd291f Author: Adam Dickmeiss Date: Wed Oct 23 13:55:37 2002 +0000 More options for test client commit 45b4e214a010658e34d12b750fbe5ce46e6b7919 Author: Adam Dickmeiss Date: Wed Oct 23 13:41:15 2002 +0000 Option -d for testclient. Typos. commit e50fd13b322abbf5a35c89cfebe731529fbddbbd Author: Heikki Levanto Date: Wed Oct 23 13:25:00 2002 +0000 Added a third argument commit 844a5b86252d4e947888c569dbc950631cabe914 Author: Heikki Levanto Date: Tue Oct 22 14:41:33 2002 +0000 Using my new tests (those that pass!) commit 7bb5a5e32f98b8b836d3a3806f5307f7a5ad6d51 Author: Adam Dickmeiss Date: Tue Oct 22 14:41:29 2002 +0000 data1 moved to zebra (WIN32) commit 2de99d429fb5529cbfbf8f141282fd71c981d732 Author: Heikki Levanto Date: Tue Oct 22 14:03:42 2002 +0000 Added scripts to test server start/stop/kill commit 02266b68e2e2c86d8a8467ee56721926b365d2d0 Author: Adam Dickmeiss Date: Tue Oct 22 13:19:50 2002 +0000 change license for data1 source commit 361f9e3c1f8e00ab87acf4b828cf24a0fe632b7f Author: Heikki Levanto Date: Tue Oct 22 12:58:35 2002 +0000 Removed the old test scripts (replaced by test[1-2].sh) commit 49e78a6ad633347049dc5d61e1370a727b8b82b1 Author: Heikki Levanto Date: Tue Oct 22 12:57:33 2002 +0000 Moved the test sequences (old t[1-8].sh) into more consistent scripts commit 519fefb91135ad52134b9fc4e82b3874f5525a2b Author: Adam Dickmeiss Date: Tue Oct 22 12:51:08 2002 +0000 data1 part of zebra commit e868e46c150fd38e72a1d087ce5306bb7c715847 Author: Adam Dickmeiss Date: Tue Oct 22 10:47:48 2002 +0000 Added testclient using ZOOM C from YAZ commit 0f4ea4b1335e491695773bf51c6e4af72a007fa3 Author: Heikki Levanto Date: Tue Oct 22 10:09:04 2002 +0000 Testing with isam b. Added echos in test scripts to see what is happening commit b33ab4fd103294017212e045a0eb1bd7ecd292ff Author: Heikki Levanto Date: Tue Oct 22 09:37:55 2002 +0000 API to the resource system, passing memMax through it. commit 6fcc8f68ea38920627e815b284b5b7b05c99bfec Author: Mike Taylor Date: Mon Oct 21 18:30:23 2002 +0000 tweak commit b7fc2a00e8b425dafdee22ec0fd73599f84b1760 Author: Mike Taylor Date: Sun Oct 20 14:02:02 2002 +0000 Fix typos, broken links, etc. commit 5a725b87b6f160570302cc4ae8563e478d0c4324 Author: Mike Taylor Date: Fri Oct 18 16:16:59 2002 +0000 tweaks commit 0cfe585dbabdaa7f2a36c1dc0b4879b36655cffa Author: Mike Taylor Date: Fri Oct 18 08:31:37 2002 +0000 Synchronise changes commit 807d2c445492c36b95b7ef1b3202ccdc0e302aa5 Author: Mike Taylor Date: Thu Oct 17 21:54:21 2002 +0000 Minor changes. commit 25a37c9be836f891281688788a7a1f967ea2b2cb Author: Mike Taylor Date: Thu Oct 17 08:10:08 2002 +0000 Rolling commit. There's a little more prose in the developing "examples" chapter, and minor tweaks here and there to the other files, mostly just fixing typos and suchlike. commit 5243917e35bcd84925e89f609d291658a188e45b Author: Mike Taylor Date: Wed Oct 16 20:33:31 2002 +0000 rolling commit commit 959c65fe556f2937a2c0afc7741c473a0fe1a808 Author: Heikki Levanto Date: Wed Oct 16 09:30:57 2002 +0000 Optimizing insert-delete pairs away Speeds up updates with many identical keys, as when appending to a mbox file. Old code still in but ifdef'd out. commit 51fc70e752ec936e8815d639b34dd0fab17e0aab Author: Adam Dickmeiss Date: Fri Oct 11 09:05:09 2002 +0000 FIXMEs in comments. Fixed indentation of Zen and the.. commit 518c06f68ffac6658aa792da45282a165b32ca95 Author: Heikki Levanto Date: Thu Oct 10 14:27:18 2002 +0000 Minor changes here and there. Still FIXMEs left. commit b1532582db24dd7901c960b6169aa9793bb34bbb Author: Adam Dickmeiss Date: Wed Oct 9 20:57:25 2002 +0000 New debian package commit 08f481538f810a51b7f60d1c65b1dc7b121cf3a0 Author: Adam Dickmeiss Date: Tue Oct 8 22:17:44 2002 +0000 Fix setting of schemaIdentifier or GRS-1 records commit e7881e4ee963f6e7c5e26abcaa32e10a3fbb6431 Author: Adam Dickmeiss Date: Tue Oct 8 09:10:49 2002 +0000 Fix man pagers for RedHat docbook2man commit 528edc9943ba3311a40b4ab875c0bc9aca5caa87 Author: Mike Taylor Date: Tue Oct 8 08:09:43 2002 +0000 Rolling commit commit bf07c880d791008bb81431e479c93c03d7567a44 Author: Mike Taylor Date: Tue Oct 8 08:08:52 2002 +0000 Remover records/taxa.xml, simplified config commit 827f4637d064d26fe9faffbc39ae2aefe317306a Author: Adam Dickmeiss Date: Fri Oct 4 18:29:51 2002 +0000 official release for debian commit b68247ccdc734ee2127a9ee0cc3fdd7d11266cab Author: Adam Dickmeiss Date: Fri Oct 4 18:26:40 2002 +0000 Towards 1.3.3 commit e4a0cd3ec6365d5eeea15897d63337ccafc011b1 Author: Adam Dickmeiss Date: Fri Oct 4 18:15:47 2002 +0000 Changes info commit 41d642cfebfa415417f3825fd805012d7a47fe96 Author: Adam Dickmeiss Date: Fri Oct 4 18:15:09 2002 +0000 Version info to stdout. commit 1cbe807c3b6b51e28c51cbdf7832eb3b8271dd02 Author: Adam Dickmeiss Date: Thu Oct 3 10:29:41 2002 +0000 Added dist-hook for html files commit eb700030823ff35d2b94d2e6139ee40617520331 Author: Adam Dickmeiss Date: Thu Oct 3 10:16:23 2002 +0000 Fix scan commit d63f162539324b4254efadf6e1da9ae197bb0f9d Author: Adam Dickmeiss Date: Wed Sep 25 21:48:43 2002 +0000 Create documentation in current directory rather than . commit db7aaadf49d20de63bf9028cff7512b0e7500fed Author: Adam Dickmeiss Date: Wed Sep 25 10:02:02 2002 +0000 Changes commit cd13985dc9d5335f6dc2f6b015407cc8dd5d8772 Author: Adam Dickmeiss Date: Wed Sep 25 09:50:20 2002 +0000 Man pages installed by 'make install'. Redhat package with man pages commit 053e1a276c3678355e3243837e81a349cda7fe9d Author: Adam Dickmeiss Date: Tue Sep 24 19:45:14 2002 +0000 Add Zebra metadata as suggested by Mike Taylor commit d6c8724ed6eeb2625a6ee316f2130817a314fbe7 Author: Adam Dickmeiss Date: Tue Sep 24 19:44:20 2002 +0000 Escape ? for non-trunc searches commit bd7b3a96753d67f123e61c3ec7ce6a9b5ac2ea73 Author: Adam Dickmeiss Date: Tue Sep 24 19:41:00 2002 +0000 Fix log message commit e57e9b19f4257768441a8025d08ce0e3430c7d78 Author: Mike Taylor Date: Fri Sep 20 09:58:04 2002 +0000 Rolling tweaks commit f4aa1406e883728944dc92421841c77d0ee9fcde Author: Adam Dickmeiss Date: Thu Sep 19 21:06:50 2002 +0000 Added man pages zebraidx(1), zebrasrv(8) commit 2dec2bfe164369203c36fcc4b43b941d445ed1b3 Author: Adam Dickmeiss Date: Thu Sep 19 19:51:48 2002 +0000 Added id attribute for example sections commit 238730873cdf47ff4945ce1635870b10601c9aa3 Author: Adam Dickmeiss Date: Wed Sep 18 21:01:14 2002 +0000 Fix search for complete fields. Update version commit 2b17f33968c38dfe50b7710da1c9e5004da9cf8b Author: Adam Dickmeiss Date: Tue Sep 17 21:17:37 2002 +0000 Fix return values for ESUpdate commit ef144bcc0523415f8ce2fd5d92db86043c2c1c7d Author: Adam Dickmeiss Date: Tue Sep 17 12:27:12 2002 +0000 Work on ES Update commit c7972c35afac7ee98226dbaef1af53d014a367f5 Author: Adam Dickmeiss Date: Mon Sep 16 22:23:49 2002 +0000 Only install html and pdf for idzebra-doc commit 568465f0b64ab749b33167f832d94f8faacaecd1 Author: Adam Dickmeiss Date: Mon Sep 16 22:23:22 2002 +0000 Fix install-data-hook commit c15b9ab49ac30e1bd9c92216a9ffa63f976ad323 Author: Adam Dickmeiss Date: Sat Sep 14 09:35:54 2002 +0000 Remove comment commit 6e098b17d8074bd3201d55ba70eeaa49ce3ed583 Author: Adam Dickmeiss Date: Fri Sep 13 20:37:11 2002 +0000 Remove redundant dependency in debian/rules commit d0493ef0da1b7c23a362542810f85062afad3a09 Author: Adam Dickmeiss Date: Fri Sep 13 11:40:35 2002 +0000 Make remote adm-import and adm-create work again (via Extended Services) commit 513fb84da37d0b19529a97e1c4fa046ea8e7d0c1 Author: Heikki Levanto Date: Fri Sep 13 11:03:46 2002 +0000 Removed unnecessary begin/end trans around zebra_repository_update (they are already in main, where they belong) commit efcd52e23097c5fa48a5c6eacd3e1f6edc0e8e32 Author: Heikki Levanto Date: Fri Sep 13 10:33:17 2002 +0000 Zebraidx update file file file ... commit c853052276a4532643bb6ca00caf6e53bd28f703 Author: Adam Dickmeiss Date: Fri Sep 13 09:24:16 2002 +0000 Improve check for iconv commit b5b9a40216a338472c3410c8e2554a7a8a900a60 Author: Adam Dickmeiss Date: Wed Sep 11 20:27:52 2002 +0000 Make proper copyright file for Debian commit a3a1b01a5bf8982759f02dca9d18990f08b75dac Author: Adam Dickmeiss Date: Mon Sep 9 10:32:10 2002 +0000 Removed shortcuts to indexer and server. Using Index Data\Zebra in Programs folder. commit ffc71045cdd726d0b720ec4b6ce91c8db31929ce Author: Adam Dickmeiss Date: Mon Sep 9 09:36:23 2002 +0000 Using idzebra instread of zebra in filenames/directories commit f6999bc6543f9799eae0b595e2d7c7e3806cf119 Author: Adam Dickmeiss Date: Mon Sep 9 09:35:48 2002 +0000 Changed a few messages commit 8438438421cafaf9a61dc21e7d551b50cf7619c7 Author: Adam Dickmeiss Date: Mon Sep 9 09:35:17 2002 +0000 Zebra server stops when config file cannot be read commit fbf46d6d15f99ed15ae0089a95df6efaf3e205bd Author: Adam Dickmeiss Date: Fri Sep 6 20:38:01 2002 +0000 Missing #ifdef WIN32 commit ad79299e8f93b8af87e29a8d95d41eb1071284ec Author: Adam Dickmeiss Date: Fri Sep 6 19:55:25 2002 +0000 Remove zebraidx shortcut. Dont use examples (yet) commit d3886454d7ba0cb1ce0d58055ccf3cd7ffd321ad Author: Adam Dickmeiss Date: Fri Sep 6 19:54:05 2002 +0000 Use Zebra Server as service display name commit deb1d0562f2176eecde64d30bb2eecd8a321b54c Author: Adam Dickmeiss Date: Fri Sep 6 13:28:24 2002 +0000 Fix version commit 923d7d605ceb9281a908c9fc7fefbbad058ae7ea Author: Adam Dickmeiss Date: Fri Sep 6 13:05:02 2002 +0000 Changes commit 58d040d35c788ccbc275065181f0cbc4d242a1c9 Author: Adam Dickmeiss Date: Fri Sep 6 13:01:59 2002 +0000 Fix date commit baf16023e5e3c68e4a7c7acd3a23326400cd04bf Author: Adam Dickmeiss Date: Fri Sep 6 12:56:59 2002 +0000 Changed package names to idzebra, idzebra-doc commit 3159bcfbbeac4ee2c8dee1d1a26a7ed7b95b6e4d Author: Adam Dickmeiss Date: Fri Sep 6 11:43:36 2002 +0000 fix spell commit 7b4417cdb8241d4502f531dadc0aa23f0cc46606 Author: Adam Dickmeiss Date: Fri Sep 6 10:28:02 2002 +0000 Changed/removed various internal log mesages commit 81bea45797ad361518e842d9c8fc5438a764e4a1 Author: Adam Dickmeiss Date: Thu Sep 5 19:45:16 2002 +0000 changed zebra-runtime to section text, zebra-doc to section doc commit 5b8070a3e08bf536274aaebf4e275cb6a92cef0e Author: Adam Dickmeiss Date: Thu Sep 5 14:59:12 2002 +0000 revert changelog commit f787ae9f7a0e70a5177e6531d8ad47b135fd22e6 Author: Adam Dickmeiss Date: Thu Sep 5 14:44:08 2002 +0000 Fix Depends, new version commit ad082113401287efdd32da0b2c2a3b169a169ea9 Author: Adam Dickmeiss Date: Thu Sep 5 14:36:20 2002 +0000 Zebra Debian packages. Towards 1.3.2 commit 200ea21b7af30b96a75a5de18c4703845cf3f12e Author: Adam Dickmeiss Date: Tue Sep 3 19:05:02 2002 +0000 Implemented simple free list block handling for isamb commit b963e595793d0286ae17f1af9a1e80a5892380f1 Author: Adam Dickmeiss Date: Tue Sep 3 13:21:24 2002 +0000 Dont return value when function is void commit bffe75e40b5c2e0668d58e7a30f8e4797578cba0 Author: Adam Dickmeiss Date: Tue Sep 3 12:22:21 2002 +0000 WIN32 fix commit 4a617d48ef8d8516c83bf49fac1206b580ba537e Author: Adam Dickmeiss Date: Tue Sep 3 11:44:54 2002 +0000 Follow of symlinks can be controlled with config followLinks and option -L commit 2aa1ec5f214157fe8a534885295398d6ea24f586 Author: Adam Dickmeiss Date: Mon Sep 2 11:19:59 2002 +0000 Fix date commit f964910eb92b5671e5d999aab72301457413c89c Author: Adam Dickmeiss Date: Mon Sep 2 11:19:33 2002 +0000 Better check for Tcl on Debian commit a4abda703eec54c664657d7ad581a47cd2f198a2 Author: Adam Dickmeiss Date: Fri Aug 30 12:44:31 2002 +0000 Add whitespace for idzebra XML elements (to make it look prettier) commit bb1b04e2bfa617355d0b8292a3452b9f4fd39176 Author: Adam Dickmeiss Date: Fri Aug 30 11:28:55 2002 +0000 WIN32 install for Zebra using NSIS from Nullsoft commit d9cb562622b27bf13f2abd8d2ec8780a86833f47 Author: Adam Dickmeiss Date: Fri Aug 30 11:28:31 2002 +0000 Add EXPAT reader for WIN32 zebra commit dda755973378f66f8f7880ac77dbacb351f02a42 Author: Mike Taylor Date: Fri Aug 30 01:18:40 2002 +0000 Move some private notes in here. commit bffe964768496135023ab242d6b468558fa1c2be Author: Mike Taylor Date: Fri Aug 30 01:17:10 2002 +0000 Revise and expand examples.xml based on experiments with minimal configuration. Fix automake stuff to recognise examples.xml commit 496125ec5b13de49f4c34a2eb548467cfba0159a Author: Mike Taylor Date: Thu Aug 29 16:30:22 2002 +0000 Running tweaks. I am cheating on the autoconf system at the moment, will be a good boy soon, honest injun. commit 7cbc8098da524d3f7e1cd76b86b41c7636b357b5 Author: Mike Taylor Date: Thu Aug 29 16:29:16 2002 +0000 Don't need bib1.att any more -- Zebra is now evidently clever enough not to bother using the BIB-1 OID at the top level of a query which has only XPath attributes in it. Cute. commit 25a18f478323f274163dac615b225f403da3eaf5 Author: Mike Taylor Date: Thu Aug 29 16:28:18 2002 +0000 Updated genera.xml from dinosauricon Added taxa.xml (replacing old UNUSED-taxa.xml) Added README with data provenance. Configuration tweaks. commit 4ed19ee90fcd394f986d52c10ecf866888abc729 Author: Adam Dickmeiss Date: Thu Aug 29 15:10:47 2002 +0000 Fix xpath indexing for non-existent attribute value commit c76d814c4ebc9ec7fc962c900cb4b48ed58a4f30 Author: Mike Taylor Date: Thu Aug 29 14:20:27 2002 +0000 add .cvsignore files commit 482db9e9920f972dc60b5a4767f651bc8f429f0d Author: Mike Taylor Date: Thu Aug 29 14:19:38 2002 +0000 tweak commit b0c9a12807b10f2831951a270691b08aa1376262 Author: Mike Taylor Date: Thu Aug 29 14:05:11 2002 +0000 flesh out dads description commit 0ea0788a838ebc8f5918758a7c2d14d4c15c7f25 Author: Mike Taylor Date: Thu Aug 29 14:04:45 2002 +0000 docbook.dsl for rh7.2 commit c36658ab15443afe397ccfc87f14ad11dfcc0e80 Author: Mike Taylor Date: Thu Aug 29 13:40:37 2002 +0000 Running to keep up with zebra source changes (I think) commit ee4ada9656faa612678aee238151a8b6652ad549 Author: Adam Dickmeiss Date: Thu Aug 29 10:00:15 2002 +0000 Using yaz_log_init_prefix2 instead log_event_start for indexing commit 73ee6ebf9388c712be03c0523f527681984d5cbb Author: Adam Dickmeiss Date: Thu Aug 29 09:59:25 2002 +0000 Better error diagnostics for XML reader commit 54da2f13bc20e4369757453575668339c8dfd9fd Author: Adam Dickmeiss Date: Thu Aug 29 08:47:08 2002 +0000 Fix log messages commit ff8552d3012ab841cc90d5f80e5ad1373e194fde Author: Adam Dickmeiss Date: Thu Aug 29 08:41:07 2002 +0000 Switch to DEBUG commit ffedd6a68cc4abe71450a0d504c7f0db8393a9d4 Author: Mike Taylor Date: Thu Aug 29 01:23:16 2002 +0000 Added new "examples" directory, perhaps eventually to be merged with ../test -- contains my experiments at making an almost completely unconfigured Zebra XML repository. commit 8ad5e21914fe3a09f6241a06b25fd7e1bbc1d73e Author: Mike Taylor Date: Thu Aug 29 01:16:12 2002 +0000 New file (nowhere near finished) commit ca2d3fd0b71d134c00d5b741d48367e7b06263d2 Author: Mike Taylor Date: Thu Aug 29 01:15:25 2002 +0000 Smallish mods to introduction. Rephrasing, mostly. commit eb5695e1505a97f439f0bc18b279f1c94b350b82 Author: Mike Taylor Date: Wed Aug 28 20:58:13 2002 +0000 add docbook DTD path for Red Hat 7.2 commit 583fe2d2582ab4078527c152b232ddf359336e91 Author: Adam Dickmeiss Date: Wed Aug 28 19:52:28 2002 +0000 Zebra uses yaz_iconv commit c63292356fbdef7b575efbf027ba8574482b0320 Author: Adam Dickmeiss Date: Wed Aug 28 12:47:09 2002 +0000 Zebra uses own XML reader (was part of YAZ before) commit 9c7cf0ea5cde299283402db722e308c041ec2db7 Author: Mike Taylor Date: Wed Aug 28 09:39:45 2002 +0000 Fix spelling of XPath. commit 79e9818dfb6b9a0a04bdd6bc6467c8dae3b8f493 Author: Mike Taylor Date: Wed Aug 28 08:14:47 2002 +0000 Rolling tweaks. Nothing earth-shattering yet, though I have added an initial Applications section to introduction.xml commit 5b903e946423cc2c91665853f8478b9d44d7088d Author: Mike Taylor Date: Tue Aug 27 07:49:23 2002 +0000 Changes as discussed by email only. commit 32140b47f685f9aadf7117442470e07609184463 Author: Adam Dickmeiss Date: Fri Aug 23 14:30:51 2002 +0000 Fix crash that occured for string-queries in database that didn't have them commit 1cc3a4c563181caabb6f18ca40a0796051a73b57 Author: Adam Dickmeiss Date: Fri Aug 23 14:29:58 2002 +0000 Print more characters for pretty dump commit 8d5daba42fb2a49f7441b1b725511f5e7f927743 Author: Adam Dickmeiss Date: Fri Aug 23 14:29:33 2002 +0000 Remove howto apply .. section commit 9d89b6b3207d7e0842997192635636195a77b179 Author: Adam Dickmeiss Date: Fri Aug 23 14:28:19 2002 +0000 Added & for some records commit 3cddca8f4cb93fc50fadfafdae4856203b7905ff Author: Adam Dickmeiss Date: Fri Aug 23 13:42:59 2002 +0000 New option: --disable-threads commit 771f74b330f0c55e570866efcd0bc20350412853 Author: Adam Dickmeiss Date: Thu Aug 22 14:58:22 2002 +0000 Changed indentation. Directives xpath, encoding commit 28a1f5a22fba61d5e6838dc5e00000f19032e4cb Author: Adam Dickmeiss Date: Thu Aug 22 12:21:36 2002 +0000 Remove How to Apply These Terms ... commit a37ea7980630d5f1553b7c818a7f0be47eb174f2 Author: Adam Dickmeiss Date: Tue Aug 20 12:34:40 2002 +0000 Towards 1.3.1 commit 33ca955198b19dbf989edfeda20922628d183943 Author: Adam Dickmeiss Date: Tue Aug 20 12:01:00 2002 +0000 Towards 1.3.1 commit bb4aad0e76abf3bb2e62025897051df3a02c3c6e Author: Adam Dickmeiss Date: Mon Aug 19 21:11:27 2002 +0000 use data1_mk_tag_n commit 7d4f4b37e1fb629e3fb04362394973c8aa01ef6c Author: Adam Dickmeiss Date: Sun Aug 18 10:20:35 2002 +0000 Graceful error (2) if lock files cannot be accessed commit e5e4f1de02396b2cfab488f8e5918853e96d6b53 Author: Adam Dickmeiss Date: Sat Aug 17 08:00:27 2002 +0000 Updated Makefiles commit 6d3046596722d64bd7996f02956724c5feef43b3 Author: Adam Dickmeiss Date: Sat Aug 17 08:00:15 2002 +0000 xpath enable/disable, dirs fix commit 2f17d6b47070a9d12fa32c872f154ab0c4a8db4b Author: Adam Dickmeiss Date: Sat Aug 17 07:59:54 2002 +0000 xpath enable/disable commit 665fd22cd201282a59e36a794cfab5106e762e7d Author: Adam Dickmeiss Date: Sat Aug 17 07:59:03 2002 +0000 Fixed bug in dirs_read where wrong entry for deletions commit c4973b38b3d4c1f277eb526fb9dda8bcfb68f047 Author: Sebastian Hammer Date: Mon Aug 5 20:39:57 2002 +0000 Removed reference to software split in 1.0 to avoid confusion commit 21327f3ee047e0cc77201fb3c2127787dc831ccc Author: Adam Dickmeiss Date: Mon Aug 5 20:05:07 2002 +0000 debug=0 libiconv=0 commit 58319aa6faa965e65d48e0a70b3cb9b922d407eb Author: Adam Dickmeiss Date: Mon Aug 5 20:04:27 2002 +0000 Removing ZMBOL commit e978eab8fb509cfd6b5542259c9e4c9b06c1a81b Author: Adam Dickmeiss Date: Mon Aug 5 19:51:50 2002 +0000 version 1.3.0 commit 025686ba4489e6e3ba17a138a81e2d3b5f64a80c Author: Adam Dickmeiss Date: Mon Aug 5 19:46:01 2002 +0000 Removed several annoying LOG_LOGs commit 64047719fa2acfe64e40352bdc5fe302e136c995 Author: Adam Dickmeiss Date: Mon Aug 5 19:37:57 2002 +0000 Had to use -9 for kill commit 4797b718f9e281c86ed5cefd50f8aaeb78e0f18a Author: Adam Dickmeiss Date: Mon Aug 5 14:20:29 2002 +0000 Updated requires for RPM commit b91ce3324c28145911b703dfe4e4c0ddb12d6532 Author: Adam Dickmeiss Date: Mon Aug 5 14:08:08 2002 +0000 Remove zmbol references commit 99328ff8ecb84ae5b26c27f2c65d1f511f2f00f2 Author: Adam Dickmeiss Date: Mon Aug 5 14:07:56 2002 +0000 Updated descripton commit 9cbe7b17c2f2e9d664111e83edf2a8a9c09b4b38 Author: Sebastian Hammer Date: Mon Aug 5 08:27:05 2002 +0000 Updated intro commit 345261ff2a235eb7d7a64889089e24671fb34bad Author: Sebastian Hammer Date: Mon Aug 5 08:11:17 2002 +0000 Updated intro text commit bad06dda453543b8dd716ee54e9b7cb2b015b6e5 Author: Adam Dickmeiss Date: Sun Aug 4 22:42:44 2002 +0000 More structured README commit 1e10d4dcb51344a7a248f3b9ade54051d763986a Author: Adam Dickmeiss Date: Fri Aug 2 20:40:03 2002 +0000 Minor. commit 79176bd8a477e1c64ac3ec03b50405ed5ed85a3f Author: Adam Dickmeiss Date: Fri Aug 2 20:31:42 2002 +0000 Towards GPL commit 896c0427df9d8eff5de6a1735dcd992e067df844 Author: Adam Dickmeiss Date: Fri Aug 2 19:26:55 2002 +0000 Towards GPL commit 8f7e8952ccd2eca24d2bb91a79d2f17f346c490c Author: Adam Dickmeiss Date: Fri Aug 2 10:07:48 2002 +0000 XPATH fixes - leaf attributes part of tag path commit e1dd69ab7c08046ca9e02ea55536492763bd9f2e Author: Adam Dickmeiss Date: Thu Aug 1 09:37:44 2002 +0000 Remove data1_pr_tree commit dbf7ead21f60be189f0d532175c92924a8eb73fd Author: Adam Dickmeiss Date: Thu Aug 1 08:53:35 2002 +0000 Work on xpath-like queries commit 630182dca442d492ff006177812a2be1191dc102 Author: Adam Dickmeiss Date: Mon Jul 29 20:04:24 2002 +0000 Using data1_createx commit b6d668f5407b24e0c9a05f5a3ee4fa4c93377c5c Author: Adam Dickmeiss Date: Fri Jul 26 14:43:09 2002 +0000 remove LOG_LOGs commit 7bb77f81cdde5a5851129ce1598fcace767c932a Author: Adam Dickmeiss Date: Thu Jul 25 13:45:59 2002 +0000 iconv.dll commit d306437fb2d524d6534152262d8ec59d44b69066 Author: Adam Dickmeiss Date: Thu Jul 25 13:45:49 2002 +0000 no fsync on WIN32 commit 47ea1fc957c7b97bb30a26698f072109cae275e4 Author: Adam Dickmeiss Date: Thu Jul 25 13:06:43 2002 +0000 Character set negotiation updates commit 95d8e798d30fff70c71d1b3256bbb7852efaee02 Author: Heikki Levanto Date: Tue Jul 16 13:17:53 2002 +0000 Removed a crash on zebraidx init, if the register area isn't there commit 9839f960344403921a7740bed060088054034a5d Author: Heikki Levanto Date: Tue Jul 16 09:52:20 2002 +0000 fsync all files before closing them Safety, and also much more reliable timings commit 0dcc0c2239a9fdf36692684a5956765fb35b1870 Author: Adam Dickmeiss Date: Mon Jul 15 12:31:40 2002 +0000 New source files commit ba1ca9cd76ff8e56daff04ee0e6c8fa21c7b04b6 Author: Adam Dickmeiss Date: Mon Jul 15 11:50:45 2002 +0000 isamb experimental cache - and dummy isam commit 189d7a12a2d0bac0bf87b53fa658c972fffc238c Author: Adam Dickmeiss Date: Mon Jul 15 11:50:01 2002 +0000 Ensure record memory is null-terminated commit 758e9300a0402ec5c86c1a8c9184486bc41df810 Author: Adam Dickmeiss Date: Mon Jul 15 11:48:21 2002 +0000 Minor fixes for dmoz script commit b8e1425a7f78791afbf45dc11acd82808e455c65 Author: Heikki Levanto Date: Fri Jul 12 18:12:21 2002 +0000 Isam-D now stores small entries directly in the dictionary. Needs more tuning and cleaning... commit 6feeb67bdd353384cc16289c7db4fcb2e62cb74f Author: Heikki Levanto Date: Thu Jul 11 16:16:00 2002 +0000 Fixed a bug in isamd, failed to store a single key when its bits did not fit into a singleton. commit eb675b4bc920ee55a2b94ce7c9febe558d2ae2ab Author: Heikki Levanto Date: Thu Jul 11 13:15:57 2002 +0000 Added notimestamps:1 option in the config file to disable timestamping in explain. Produces consistent checksums on all test runs! commit 38f321eafd606e8ac91da5c1450393fed73d37f5 Author: Heikki Levanto Date: Thu Jul 11 13:03:01 2002 +0000 Added dumpdict command line option to dump the dictionary before doing the usual stats commit 42632d1251eba8a9b158625dff3344fc747b2b17 Author: Adam Dickmeiss Date: Tue Jul 9 10:05:31 2002 +0000 Fix nasty bug regarding near limit register areas commit 0851370c56015b5a552402a71ecc48c9bbe23989 Author: Adam Dickmeiss Date: Mon Jul 8 08:43:23 2002 +0000 Fix YAZ include commit a749ce4ff4739420474e7d40f400321a86f67684 Author: Adam Dickmeiss Date: Fri Jul 5 16:07:02 2002 +0000 Convert to ISO-8859-1 for indexing and retrieval commit 971894f6614f5e7a4560ed0b8094a7eb1a668bde Author: Adam Dickmeiss Date: Fri Jul 5 12:43:30 2002 +0000 Fix MARC and REGX/TCL filter for new data1 structure commit cc9f94a61cbd9dcc0df0cf7d0c7c41d2cec88189 Author: Adam Dickmeiss Date: Wed Jul 3 14:10:12 2002 +0000 reset error for retrieve. Remove sleep call commit c126f98b685389719342f338083e39f7fcbc42b3 Author: Adam Dickmeiss Date: Wed Jul 3 10:13:30 2002 +0000 added dmoz makefile.am commit 03ecbe8fd92f9e55e07a21bc0486e3f78fcaa7cc Author: Adam Dickmeiss Date: Wed Jul 3 10:05:19 2002 +0000 Prepare for extra root tag node for better XML support commit 0f4c5842f8656d87624b8796d29eb999968c66b5 Author: Adam Dickmeiss Date: Wed Jul 3 10:04:34 2002 +0000 Added dmoz. commit c4e6b0ddb98fc8442bd1ec2b0f4340e99bea18cc Author: Adam Dickmeiss Date: Tue Jul 2 20:20:09 2002 +0000 idzebra:{filename,score,size,localnumber} tags for XML commit f3ced7d9ab3c492a9f27678cddefea291b4e3bd4 Author: Adam Dickmeiss Date: Thu Jun 20 08:03:30 2002 +0000 Better stat commit 700883e4e5d8ff7e6617048a780aa7e69d8105ba Author: Adam Dickmeiss Date: Wed Jun 19 13:40:03 2002 +0000 date on plot too commit fdae0bb0b4e14521a82bdfb7e06a0e557444159d Author: Adam Dickmeiss Date: Wed Jun 19 13:26:45 2002 +0000 Set title as well. commit 42093a81b8e308081fd8be296adcc7aa7353989c Author: Adam Dickmeiss Date: Wed Jun 19 13:19:43 2002 +0000 Add include of sys/time.h commit fe21dcd0fa4f07ebfd344dd922e3f1aa7512ab22 Author: Adam Dickmeiss Date: Wed Jun 19 12:38:47 2002 +0000 No X11 output for gnuplot commit 1e739c60397fc5274dba921252b63df2664bdb49 Author: Adam Dickmeiss Date: Wed Jun 19 11:37:11 2002 +0000 Real/User/Sys report from zebraidx commit 1dec188ccbdafb0ec7b7c98857d701a7b77d46a1 Author: Adam Dickmeiss Date: Wed Jun 19 10:29:17 2002 +0000 align block sizes for isam sys. Better plot for test commit ddf2eb42a6c93adebc4e30e79a3ee83c28e320bd Author: Adam Dickmeiss Date: Wed Jun 19 09:00:28 2002 +0000 with isamd commit a07f447c2312b6af6a818c82105343e21f743387 Author: Adam Dickmeiss Date: Wed Jun 19 08:32:34 2002 +0000 Added Ids. Better logging commit 9ca612132e1ef66f43d61e5cefa854ba18c6e1a6 Author: Adam Dickmeiss Date: Wed Jun 19 08:28:55 2002 +0000 added dmoz commit c15b0644c4cd2ad3c26cb7a8de58ae3ad922bb16 Author: Adam Dickmeiss Date: Sun Jun 2 19:31:51 2002 +0000 move doc commit 3980bd0e6023ab7d825006b672d59d56249d7c19 Author: Adam Dickmeiss Date: Sun Jun 2 19:30:07 2002 +0000 move doc from /usr/share/zebra/doc to /usr/share/doc/zebra commit c7301c95631413019060f344ccffdb4f943f8a57 Author: Adam Dickmeiss Date: Sun Jun 2 19:28:53 2002 +0000 Remove SYNC commit a20e59c5087fb92c419f2330c786367f9ce8ccd2 Author: Adam Dickmeiss Date: Thu May 30 13:22:17 2002 +0000 Bug fix for deletes (max_item 2) commit d697b6568abc53f9b3b83abb42ca545195dae3dc Author: Adam Dickmeiss Date: Tue May 28 21:10:34 2002 +0000 No more @-tag for MARC commit b037a54d0613cebff411506dd9f54262394642e6 Author: Adam Dickmeiss Date: Tue May 14 21:12:56 2002 +0000 Minor fix for isamb commit 1ee11e429c7c1e1883988a50d3c2c84dbce539e8 Author: Adam Dickmeiss Date: Tue May 14 20:48:47 2002 +0000 Fixed x-path indexing commit d9a9544ebf605f5141ced91c4cf2c2fc97b93539 Author: Adam Dickmeiss Date: Mon May 13 14:13:43 2002 +0000 XML reader for data1 (EXPAT) commit fcfd0a80561bc65bbe3240244509aada0e3888b2 Author: Adam Dickmeiss Date: Wed May 8 16:46:17 2002 +0000 add test scripts commit 941c3ed285a7089122fbd6da94e68ca50223bd17 Author: Adam Dickmeiss Date: Tue May 7 12:54:56 2002 +0000 added zebra1.cfg and zebra2.cfg commit d57bb162b65a585e0ed3ad319d9673d66bc6d90c Author: Adam Dickmeiss Date: Tue May 7 11:05:19 2002 +0000 data1 updates. Run number fix commit 98ba43ecd2cc7a62dd91b16fd8007c7fd4dd6feb Author: Adam Dickmeiss Date: Tue May 7 11:04:58 2002 +0000 no test here commit fa0d8b6c561c504f38cce0a2648aef662a2f38c5 Author: Adam Dickmeiss Date: Tue May 7 11:04:37 2002 +0000 Added test scripts commit cbc198ddb6b75785106347a61513b003b52dc665 Author: Adam Dickmeiss Date: Mon May 6 17:45:21 2002 +0000 added assert for read failure commit ec84578232c3de8ad75cc35638bed1bbe14fb7f7 Author: Adam Dickmeiss Date: Fri May 3 17:59:17 2002 +0000 more data1 cleanup commit 3ecabdd7340cf895d4d446a217b8b69c17a2d781 Author: Adam Dickmeiss Date: Fri May 3 13:50:24 2002 +0000 data1 cleanup commit 313737060e826ddd9687b340750b49ebe38db40e Author: Adam Dickmeiss Date: Fri May 3 13:49:04 2002 +0000 play with shellsort commit 0064d2b465336e0648efc8a020b8427da9016124 Author: Adam Dickmeiss Date: Fri May 3 13:46:33 2002 +0000 bad sprintf commit 2352f7f9c3d0c138a9fb7d02decc2a3a62571625 Author: Adam Dickmeiss Date: Fri May 3 13:46:05 2002 +0000 make checkergcc happy commit 4d942c0e72457c0ffcab606a7ecaa72157bc7e45 Author: Adam Dickmeiss Date: Tue Apr 30 21:07:56 2002 +0000 more verbose buildconf.sh commit f026071ff0fbd2df52851b204b0dbcee8b45509d Author: Adam Dickmeiss Date: Tue Apr 30 19:31:09 2002 +0000 isamb delete; more statistics commit 175aced6e1fba324771b361822e8a27a38e567bb Author: Adam Dickmeiss Date: Tue Apr 30 08:28:37 2002 +0000 isamb fixes for pp_read. Statistics commit b2603bace3f8d6fb1fb29b8366ad6a70d5ca378f Author: Adam Dickmeiss Date: Mon Apr 29 18:10:24 2002 +0000 Newline at end of file commit 349ddf2c6256dc5d0fbabb693b688883610ae5fa Author: Adam Dickmeiss Date: Mon Apr 29 18:03:45 2002 +0000 More isamb statistics commit 3e72747f4b28856e5f684dbe8984f8fb28680e62 Author: Adam Dickmeiss Date: Fri Apr 26 08:44:47 2002 +0000 Index statistics working again commit b0af93f1eaf72822168b479ce83d91ccad3546a3 Author: Adam Dickmeiss Date: Tue Apr 23 18:09:05 2002 +0000 Minor change commit 224005e2f3362ed680003a3d028dd17afa13994a Author: Adam Dickmeiss Date: Tue Apr 23 18:07:17 2002 +0000 zebraidx prints user/sys times commit 2e6e4817f094605bbd3455b95ac5fc69920dcc34 Author: Adam Dickmeiss Date: Tue Apr 23 17:56:54 2002 +0000 Minor changes commit adfd6d1b6afa9964e4483a16dcf8c2f64d20989a Author: Adam Dickmeiss Date: Tue Apr 23 13:39:10 2002 +0000 Much faster merge for b-tree commit 325246f1b9dc840b98c8d5a1b57208fd7b15968b Author: Adam Dickmeiss Date: Thu Apr 18 20:22:09 2002 +0000 remove yaz_log message commit 58d3dcbd7f5bb2545776b1f70a8366930f4eefab Author: Adam Dickmeiss Date: Thu Apr 18 19:48:28 2002 +0000 rs_and reads all items commit 1f3396c47808ac26d212035cc4bf26d8ee68261a Author: Adam Dickmeiss Date: Wed Apr 17 13:19:02 2002 +0000 fix temp fname for null path commit 49682406526f450628e224b2dcc96f342a4c3cc1 Author: Adam Dickmeiss Date: Wed Apr 17 09:44:56 2002 +0000 minor commit d8e4054c431384d7642d33255c55ad0706e5f793 Author: Adam Dickmeiss Date: Wed Apr 17 09:03:38 2002 +0000 another fix commit 3588e611b9f188ef8feafd3b71d53de3eca2fcaf Author: Adam Dickmeiss Date: Wed Apr 17 08:48:54 2002 +0000 isamb: resize fix commit 0b366aebe8bbba8de457b4b2d9571cbf2dd43352 Author: Adam Dickmeiss Date: Wed Apr 17 08:17:13 2002 +0000 flat blocks for isamb commit 764b78fb481cf1084a5a583ffefbe8a0f32af28c Author: Adam Dickmeiss Date: Tue Apr 16 22:31:42 2002 +0000 isamb work commit 8ec67e89869d6ab86fcdf35563f3f7ebfe02947a Author: Adam Dickmeiss Date: Mon Apr 15 14:05:43 2002 +0000 log number of records processed, etc commit 7d9280e88954e1abd67db88bfed1096ce30814d1 Author: Adam Dickmeiss Date: Mon Apr 15 13:48:10 2002 +0000 Option -n works again commit 7d1252fc050f22ba587c88d5a39a80ba3262d7af Author: Adam Dickmeiss Date: Mon Apr 15 09:48:30 2002 +0000 Using AM_CPPFLAGS instead of INCLUDES commit 3f1ccb1a5d47e99a07c4236f149f199dfebd21d0 Author: Adam Dickmeiss Date: Mon Apr 15 09:07:10 2002 +0000 regx filter works with non-absyn commit 15ded665c8ca37e3c7a99ce48c2e78acdb727bd6 Author: Adam Dickmeiss Date: Sat Apr 13 18:16:42 2002 +0000 More XPATH work; common sequence numbers for extract keys commit 053c19fa30845e0d69fc55a1757bdbb652b37770 Author: Heikki Levanto Date: Fri Apr 12 15:25:03 2002 +0000 Looping bug at hit fixed (I hope) commit 9710e24853b43d708fd00be62a8f9361296f3533 Author: Heikki Levanto Date: Fri Apr 12 15:03:46 2002 +0000 More prints commit 1c63ec480b6ed176ff10a4905e0d692be8e000fc Author: Heikki Levanto Date: Fri Apr 12 14:57:41 2002 +0000 first prints in place commit 5e7516d00451ada59a311fad05e8e3959242cdc7 Author: Adam Dickmeiss Date: Fri Apr 12 14:55:22 2002 +0000 key_print_it commit c8348c66f50a54dabed6660a4353c7d27c70c286 Author: Heikki Levanto Date: Fri Apr 12 14:51:34 2002 +0000 print func commit 85728191a4dc93d31e3d1bd0ddc2ae60381ae6ba Author: Adam Dickmeiss Date: Fri Apr 12 14:40:42 2002 +0000 Work on XPATH commit 7d58178a1dc3caf91251a0d27a0e4e9e033b1b63 Author: Adam Dickmeiss Date: Thu Apr 11 20:09:47 2002 +0000 work on string tag indexing commit 856b750295c4bcdb0b5e69e5afff9f681194c381 Author: Adam Dickmeiss Date: Thu Apr 11 20:09:08 2002 +0000 Indentation commit 52abadd829e92fed45e603cbf47e22447d19d5eb Author: Adam Dickmeiss Date: Thu Apr 11 20:06:16 2002 +0000 remove zebra.xml commit bfc37d7893ea3861cfedbfa02f6210916a956b70 Author: Heikki Levanto Date: Thu Apr 11 11:39:59 2002 +0000 Removed to logf calls from tight inside loops commit 4fe772289b1ab968655c27b144d08fc69c113fd9 Author: Heikki Levanto Date: Wed Apr 10 14:47:48 2002 +0000 Minor fixes, especially in the beginning Added several FIXMEs to mark places that need attention commit c1dc7627995e76239179aad06d41c73dadfdb67f Author: Adam Dickmeiss Date: Tue Apr 9 19:58:38 2002 +0000 zebra.html dependancy for make dist commit 7706c88171b7a821bb06303809e403ef436043c0 Author: Adam Dickmeiss Date: Tue Apr 9 19:41:50 2002 +0000 zebra.html part of EXTRA_DIST commit 7d77cebae2b7af01eb7211f4ca9860217b3d32cb Author: Adam Dickmeiss Date: Tue Apr 9 19:20:22 2002 +0000 spell fixes (using ispell) commit 71e41c3f5146a6f783fbae7e59776bcdd4e3c4c8 Author: Heikki Levanto Date: Tue Apr 9 15:24:13 2002 +0000 rsbetween.[ch] - new result set type commit c6b44a954475cd6e5cbfe560e63158fc48d4899f Author: Adam Dickmeiss Date: Tue Apr 9 14:36:53 2002 +0000 Fix XML attributes for MARC reader commit 79dbb0556936ee101483f693d38bd5e97c49689e Author: Adam Dickmeiss Date: Tue Apr 9 13:26:26 2002 +0000 More documentation cleanups commit dd8372e3f27c68a0410f13044dd184ccde8ca243 Author: Adam Dickmeiss Date: Mon Apr 8 19:52:29 2002 +0000 More Docbook doc updates commit 040b59f0cf332e811e4f800702a35ef181440eec Author: Adam Dickmeiss Date: Mon Apr 8 13:51:18 2002 +0000 Fix simpara commit a31f9b2d25006c89ae7e9fb5870c0d222ee88a3a Author: Adam Dickmeiss Date: Mon Apr 8 13:50:12 2002 +0000 docbook xml manual commit 694c50e2c266f90eeb265fa5612c65c94d84c2e4 Author: Adam Dickmeiss Date: Fri Apr 5 19:45:20 2002 +0000 Fix Tcl includes for Debian commit 8e13fd186da8a4f5c9c37b83ea3e46fb70f1f420 Author: Adam Dickmeiss Date: Fri Apr 5 12:54:29 2002 +0000 Using yaz_fclose commit d1ea2b7f6c07fa9247c4bfa9996981e57b27948c Author: Adam Dickmeiss Date: Fri Apr 5 12:49:51 2002 +0000 WIN32 work (doesn't compile, yet) commit 81a75ae20b5b250309a70de51bfdf8de0019f882 Author: Adam Dickmeiss Date: Fri Apr 5 08:46:26 2002 +0000 Zebra with full functionality commit 6e89ec34f77c7085a3c95b7e63fce3a1040ed124 Author: Adam Dickmeiss Date: Thu Apr 4 20:54:20 2002 +0000 Minor commit 98e21f950e6d0babe88a6a1ccb03b90f0b3a6b1a Author: Adam Dickmeiss Date: Thu Apr 4 20:50:36 2002 +0000 Multi register works with record paths and data1 profile path commit 2b1851bd5565e3d21f9cf9a37661a584c063b75f Author: Adam Dickmeiss Date: Thu Apr 4 14:14:13 2002 +0000 Multiple registers (alpha early) commit 4ac7ffc88f998c27874b19511a3294e0addfc4ec Author: Adam Dickmeiss Date: Wed Mar 27 07:53:13 2002 +0000 seqno/statevalue in register rather than session commit 886253fb90810e512cacf4f02694645ead7a22e0 Author: Adam Dickmeiss Date: Thu Mar 21 23:06:36 2002 +0000 Source 'tag' in abs-file commit 8fd7a5c9e8f01fa8eb6bd7cccf36806bfcb80e7f Author: Adam Dickmeiss Date: Thu Mar 21 20:34:14 2002 +0000 Fixes for Digital UNIX commit 36cf672c845827f76adf9e1d8ea7a2938f6fa4da Author: Adam Dickmeiss Date: Thu Mar 21 20:15:57 2002 +0000 Add ../index to include path commit 779d03c32f5e82d36929465522973c16b48d5991 Author: Adam Dickmeiss Date: Thu Mar 21 20:12:27 2002 +0000 fix build of libzebra.a commit 8abdfafe0e02938490b7140bfbf577fe4a7cfa15 Author: Adam Dickmeiss Date: Thu Mar 21 13:31:37 2002 +0000 Added h-files. commit dcdfa15cfe06178c55ff4d28156a5bf4d56f9082 Author: Adam Dickmeiss Date: Thu Mar 21 11:14:59 2002 +0000 1.1.1 commit ece003721c549fccb73922828e58c91ca41bbd0c Author: Adam Dickmeiss Date: Thu Mar 21 10:31:54 2002 +0000 Removed locksrv, lockidx. commit ef1a5f228251582d793560b6f1089941f90db81a Author: Adam Dickmeiss Date: Thu Mar 21 10:26:47 2002 +0000 Changes commit 5402489b101b792e481ffad68ee0e7c449012fb4 Author: Adam Dickmeiss Date: Thu Mar 21 10:25:42 2002 +0000 use lockDir. Fixes for searchResult for null/sort sets commit f1a944fbdac20e88bf55918f2a4f66c301d684e2 Author: Adam Dickmeiss Date: Wed Mar 20 20:24:29 2002 +0000 Hits per term. Returned in SearchResult-1 commit c8bb72d81cc3496fdfc7143e6fa5216fdb1a60f9 Author: Adam Dickmeiss Date: Fri Mar 15 20:45:33 2002 +0000 *** empty log message *** commit 5adb31268b057741850de38eafd42baf8dc947ea Author: Adam Dickmeiss Date: Fri Mar 15 20:35:37 2002 +0000 *** empty log message *** commit cc4fcee50354f71ed32a586de6d226b61139819e Author: Adam Dickmeiss Date: Fri Mar 15 20:34:44 2002 +0000 *** empty log message *** commit ffc81ee5833d7bcbd183414da4156490ef7d2879 Author: Adam Dickmeiss Date: Fri Mar 15 20:32:14 2002 +0000 *** empty log message *** commit e8364431da27c49f96cc4018418eb260117984e8 Author: Adam Dickmeiss Date: Fri Mar 15 20:31:32 2002 +0000 Minor. commit ee67c6573539584ff255e11ad752a6014074c987 Author: Adam Dickmeiss Date: Fri Mar 15 20:20:55 2002 +0000 *** empty log message *** commit e2f07a294e07cb1a8b9659afd2d834a26ee2baed Author: Adam Dickmeiss Date: Fri Mar 15 20:11:36 2002 +0000 *** empty log message *** commit 02cb6d6ffea2b80351aea040f29053bddebeae0c Author: Adam Dickmeiss Date: Thu Mar 14 18:41:59 2002 +0000 WIN32 compile (again) commit 399876019df22a56614e9fda05552574939ccc0d Author: Adam Dickmeiss Date: Wed Feb 20 23:07:54 2002 +0000 Fixes for update commit 61866f71b35d841f82fb53895700ea264ba33a39 Author: Adam Dickmeiss Date: Wed Feb 20 17:35:48 2002 +0000 Remove this file. commit bc638111d4bdc5dbf20eced4d170d590dca858bb Author: Adam Dickmeiss Date: Wed Feb 20 17:34:46 2002 +0000 Remove configure. commit b422c823595e4b6c88ba82369cc066a0175ce55c Author: Adam Dickmeiss Date: Wed Feb 20 17:32:38 2002 +0000 Bump version number commit 7e75317bed8eecabcb57e59b16093a32238738e2 Author: Adam Dickmeiss Date: Wed Feb 20 17:30:01 2002 +0000 Work on new API. Locking system re-implemented commit a9059af90b4153d3abd91c9a795b1159ef77fa93 Author: Adam Dickmeiss Date: Mon Feb 18 11:47:23 2002 +0000 charmap warns for duplicate entries commit ac66787b71dd244e895a262a82b2a4944f8fea6b Author: Adam Dickmeiss Date: Mon Feb 18 11:46:58 2002 +0000 Server crashed when bad sorting critieria was given commit 00e2ae45d26782ff57fa199e8be81a5bbbb8b4c1 Author: Adam Dickmeiss Date: Mon Jan 14 01:52:22 2002 +0000 Bug fix in scan: first two entries wasn't returned. ICVS: ---------------------------------------------------------------------- commit 0c293b944e22e54f19f7b5febd105f94c5971a81 Author: Adam Dickmeiss Date: Mon Jan 7 19:52:22 2002 +0000 Fix bug in sortIdx_type so that it returns error always when non-existant sorting area is used (bad use attribute). commit 3d9f3bffb46938b54ea2aaf3738d8579fdcfdebd Author: Adam Dickmeiss Date: Mon Nov 19 23:29:09 2001 +0000 Fix unused var. commit da5e43382ca16244e96457aa700c30e9b3178191 Author: Adam Dickmeiss Date: Mon Nov 19 23:08:29 2001 +0000 Added const qualifier for name parameter of key_SU_decode. commit 8d3211326d448452d82a869143ed6d08d463954b Author: Adam Dickmeiss Date: Mon Nov 19 23:05:22 2001 +0000 Added a few prototypes. commit c4760eba3ea62db555c516243d588db18bcdacf8 Author: Adam Dickmeiss Date: Thu Nov 15 08:41:24 2001 +0000 Fix for weight (bug introduced by previous commit). commit 89d059a3e4541ff00bbb4193ba34c1dbe1e21928 Author: Adam Dickmeiss Date: Wed Nov 14 22:06:27 2001 +0000 Rank-weight may be controlled via query. commit bb96b42dc69e6dfa37ee277333e6de0df85fb070 Author: Adam Dickmeiss Date: Mon Oct 29 22:16:38 2001 +0000 Server unlocks both "cmt" and "org" lock in zebra_server_unlock. commit 16ee5170e5b6672fab258ac830a7450752890dcd Author: Adam Dickmeiss Date: Fri Oct 26 20:22:31 2001 +0000 Less LOG_LOG messages. commit ff2e26b66494c09069b8584e61345eed9bcf9e1a Author: Adam Dickmeiss Date: Thu Oct 25 13:23:46 2001 +0000 Version 1.1. commit 50dbe0d73a13e5c700124b4511251eaeecc5342a Author: Adam Dickmeiss Date: Mon Oct 15 20:57:18 2001 +0000 Using CFLAGS instead of INCLUDE to set C flags. commit 77686142af94172d1887190ebd47aeb53f704057 Author: Adam Dickmeiss Date: Mon Oct 15 19:53:43 2001 +0000 POSIX thread updates. First work on term sets. commit 7015acd8e5d174585a19064a0bc7ce19c612591e Author: Adam Dickmeiss Date: Mon Oct 15 19:38:22 2001 +0000 More readable script. commit cad0d3221732216fe2ab02e574eda4508b915584 Author: Adam Dickmeiss Date: Mon Oct 1 08:56:58 2001 +0000 For UNIX process ID is logged. commit a82fb3f08b316b5b6d7a512520c2c832ad6bdb09 Author: Adam Dickmeiss Date: Fri Sep 21 10:40:08 2001 +0000 Added Redhat boot script for zebrasrv. commit ba572d8e1de44023f355c09c4250328aba0e9a47 Author: Adam Dickmeiss Date: Tue Jul 10 00:04:53 2001 +0000 Added file rsidamd.obj. commit 954447ef6b2f5a0a4852b58f00074236f774f9fe Author: Adam Dickmeiss Date: Mon Jul 9 23:40:09 2001 +0000 WIN32 fix. commit 9580155b65a60b2d79fcdf3f2abdce32f96e142c Author: Adam Dickmeiss Date: Mon Jul 9 23:12:08 2001 +0000 Added dirent.c. commit 6f27675ef554a06c5996a8815ed24dd3e6171aa1 Author: Adam Dickmeiss Date: Thu Jun 14 11:44:56 2001 +0000 Bug fix: default storeKeys setting wasn't read when group was specified. commit 05692dfdf2fe5f33a9215caaeaaa6b0c22333db7 Author: Adam Dickmeiss Date: Tue May 29 08:51:59 2001 +0000 More fixes for character encodings. commit 1e955e15c167cf701d87eb891acd70ed8cdad791 Author: Adam Dickmeiss Date: Mon May 28 13:58:48 2001 +0000 Call flushSortKeys when record is skipped to fix bad re-use of sort keys to whatever next record that comes in. commit 1577e2d83cdd5e6c251d0c674d327252cf9b27be Author: Adam Dickmeiss Date: Tue May 22 21:02:26 2001 +0000 Fixes for Tcl UTF8 character handling. commit 7a49c3db444b475f63722c3da03e15c6db93f1a9 Author: Adam Dickmeiss Date: Tue May 22 21:01:47 2001 +0000 Removed print of data1 tree on stdout so that inetd works again. commit 3c0f22abd00bb52f62942faeeb514585779743de Author: Adam Dickmeiss Date: Wed Apr 11 07:58:13 2001 +0000 Bug fix: multiple space mapped to one space when using complete subfield. commit 08dfaf179e9c3bf0ec66a3a34fab11d5cd5d1fa8 Author: Adam Dickmeiss Date: Thu Mar 29 21:31:31 2001 +0000 Fixed "record begin" for Tcl filter. commit 232b2a3c37fd4bdeb90a4a4613d081370599c625 Author: Adam Dickmeiss Date: Thu Mar 29 19:48:00 2001 +0000 Updated. commit 1f33e8b4ed0aa796773133a2bc8a7e6543255017 Author: Adam Dickmeiss Date: Thu Mar 29 14:07:14 2001 +0000 Fixed nasty bug for fileUpdate. commit 12ed44cad4b6c14fd21384e26c077349af702fcb Author: Adam Dickmeiss Date: Wed Feb 28 09:01:41 2001 +0000 Fixed problem with missing isams for buildconf.sh. commit c0370114d3a568c1504bb68b57e182806c878a79 Author: Adam Dickmeiss Date: Tue Feb 27 10:10:40 2001 +0000 Improved filter. commit 09aca6953d7bd8ad544568b455a324d1bb9ba9a3 Author: Adam Dickmeiss Date: Tue Feb 27 09:50:18 2001 +0000 Added CDDB sample. commit 04a991ce4fba7c149df537f3050af0e600c23b28 Author: Adam Dickmeiss Date: Mon Feb 26 22:14:59 2001 +0000 Updated for BZIP2 1.0.X. Configure script doesn't enable 64 bit LFS on broken glibc on Redhat 7.0. commit f07a28f05c7edf99a2405461ad7730323b0a191f Author: Adam Dickmeiss Date: Mon Feb 26 21:21:50 2001 +0000 Updated. commit fc3500eeca332014b8551501eebd278491deae38 Author: Adam Dickmeiss Date: Wed Feb 21 11:23:17 2001 +0000 Modified date. commit e5ebc859654d84aa9098142b34015648d8e333de Author: Adam Dickmeiss Date: Wed Feb 21 11:22:54 2001 +0000 Updated buildconf.sh. commit 4abe6a2856194069bdf0e73aad45ca34a4bc6d62 Author: Adam Dickmeiss Date: Wed Feb 21 11:05:58 2001 +0000 Ninor changes. commit 9b4f970d2816490fa4cc850fabc51f494ee5612b Author: Adam Dickmeiss Date: Wed Feb 21 11:01:41 2001 +0000 Removed Makefile.in's. commit 37081f0a1f804cda1cc902f0539cc02ca63d22a9 Author: Adam Dickmeiss Date: Wed Feb 21 11:00:05 2001 +0000 Added yaz.m4. commit fe8eef56f75e2667367e506e7a6dae0862c06afa Author: Adam Dickmeiss Date: Wed Feb 21 09:53:49 2001 +0000 Removed. commit 8909bbaee87ad9fda12fec77d91c2f79cb0b70af Author: Adam Dickmeiss Date: Wed Feb 21 09:53:23 2001 +0000 Removed install-sh. commit f1a9ed95b17effaee3cb8a3e8117d94030ea3b21 Author: Adam Dickmeiss Date: Wed Feb 21 09:52:39 2001 +0000 Fixed LFS detection. commit 84b299a6805c6fb2049b9c8fdd08a778bd209e99 Author: Adam Dickmeiss Date: Wed Feb 14 21:42:07 2001 +0000 Fixed versions as returned in INIT response. commit 71647c93775e998a0e602c0371c34e1143d131dd Author: Adam Dickmeiss Date: Mon Feb 5 14:08:27 2001 +0000 Added rsisamd.h commit 044461d6b9ed20023930fa761286914f0b404f4c Author: Adam Dickmeiss Date: Mon Jan 29 13:29:07 2001 +0000 Test script creates tmp and lock if necessary. commit 68f2ac443fce741dad6036c30c31f8c150f5271f Author: Adam Dickmeiss Date: Mon Jan 22 11:41:41 2001 +0000 Added support for raw retrieval (element set name "R"). commit 671a4683745b7a6341099294ae04ebefc337ba84 Author: Adam Dickmeiss Date: Mon Jan 22 10:42:56 2001 +0000 Added numerical sort. commit 74f1d61c9fc9c7c9209e4ba68bc4a1c3601ab3c5 Author: Heikki Levanto Date: Tue Jan 16 19:17:54 2001 +0000 Added rsisamd commit 4825ec6553e8d87b63d59527c94a46dd7fe4e3ab Author: Heikki Levanto Date: Tue Jan 16 19:17:18 2001 +0000 Added rsisamd.c commit 7a34a5bb242300d4df70e2534f20d25ec4508cc5 Author: Heikki Levanto Date: Tue Jan 16 19:05:45 2001 +0000 Started to work on isamg commit b1cc92fc80e32020fb2a91c6577b33ca2cef354a Author: Heikki Levanto Date: Tue Jan 16 19:05:11 2001 +0000 Started to add isamg commit 0912d7cd382d578f045ef8f2cd1e092b3747d6e5 Author: Heikki Levanto Date: Tue Jan 16 16:56:15 2001 +0000 Searching in my isam-d commit 1d9c8aefb2de3a4668090ae4c7ec7193c9301bdd Author: Adam Dickmeiss Date: Sun Jan 14 13:41:06 2001 +0000 Added include of sys/types.h for UNIX to get definition of off_t. commit c7802a517bf6c79fefd72501e85f08f267c39ea9 Author: Adam Dickmeiss Date: Tue Dec 5 19:09:15 2000 +0000 Fixed problem where indexer could crash if abstract syntax was undefined. commit df117f4652b6999cf689cf5e2e65f8d8541ab4b0 Author: Adam Dickmeiss Date: Tue Dec 5 14:44:58 2000 +0000 Fixed minor bug that could cause zmbol to break it data were emitted with not parent tags. commit ee469875edc1db23aae63746ec9fff6a7be8d4ab Author: Adam Dickmeiss Date: Tue Dec 5 12:22:53 2000 +0000 Termlist source implemented (so that we can index values of XML/SGML attributes). commit 1ccf2613ceef2359f589cb3dd7e72a899c618b2f Author: Adam Dickmeiss Date: Tue Dec 5 10:01:44 2000 +0000 Fixed bug regarding user-defined attribute sets. commit 3b7b0e72cc359c7df837fe7ff1252f2efecd41c7 Author: Adam Dickmeiss Date: Tue Dec 5 09:59:10 2000 +0000 Work on dict_delete_subtree. commit 087298c5eeb7746a1d0ded9067b1d582bd641a25 Author: Adam Dickmeiss Date: Fri Dec 1 17:59:08 2000 +0000 Fixed bug regarding online updates on WIN32. When zebra.cfg is not available the server will not abort. commit 88d48fdfa040774186998d2e318ae69b11591884 Author: Adam Dickmeiss Date: Wed Nov 29 15:21:31 2000 +0000 Fixed problem with passwd db. commit f4e5e779697a3a44134b7af483817e83ce8cfcb0 Author: Adam Dickmeiss Date: Wed Nov 29 14:24:01 2000 +0000 Script configure uses yaz pthreads options. Added locking for zebra_register_{lock,unlock}. commit 7132274fbe39ea0c8748dccf3f995a5c9ec3baba Author: Adam Dickmeiss Date: Wed Nov 8 14:06:18 2000 +0000 Updated version. commit 5a78c428319c846f4b6d0426a0a590f769e2c631 Author: Adam Dickmeiss Date: Wed Nov 8 13:46:58 2000 +0000 Fixed scan: server could break if bad attribute/database was selected. Work on remote update. commit ae9d96e2ee58639ec8d34bda9705de72dbcaa3db Author: Adam Dickmeiss Date: Wed Nov 1 09:18:14 2000 +0000 Fixed for new version of automake. commit c07c596f4c450d2ac08ba4da000f40294f099be0 Author: Adam Dickmeiss Date: Tue Oct 17 13:40:56 2000 +0000 Minor changes. commit 337386794590f25932f12542393af1bf7ed29b22 Author: Adam Dickmeiss Date: Tue Oct 17 13:37:55 2000 +0000 Minor. commit 535f9a05785e1f0c49d658d0467479b63e20bbdd Author: Adam Dickmeiss Date: Tue Oct 17 12:49:35 2000 +0000 Added YAZ in aclocal.m4. commit 51f64da61cda404e0aebb108bb583801f9d81b88 Author: Adam Dickmeiss Date: Tue Oct 17 12:48:47 2000 +0000 Updated. commit 289af445bf7c8042b46200f9f2af18049ae049fb Author: Adam Dickmeiss Date: Tue Oct 17 12:37:09 2000 +0000 Fixed notification of live-updates. Fixed minor problem with mf_init where it didn't handle shadow area file names correctly. commit 7149e5607a0d473d958ed1758728cc343b56d681 Author: Adam Dickmeiss Date: Mon Oct 16 20:16:00 2000 +0000 Fixed problem with close of lock file for WIN32. commit 2b33b395b50c562323ea2b0251f9b798cf5241d2 Author: Adam Dickmeiss Date: Wed Oct 11 12:31:27 2000 +0000 Using YAZ_INIT for autoconf. Added template code for isamb. commit 6a045f4752f3aeeeb4e0d952a1240245c5c67a37 Author: Adam Dickmeiss Date: Wed Oct 4 13:24:52 2000 +0000 SUBDIR fix for automake. commit d9c86c0fb916851a641fd17bda58a1fa3045d95e Author: Adam Dickmeiss Date: Wed Sep 6 08:59:36 2000 +0000 Using read-only (for now) for server. commit a4672c6ad0168d8c39b6806e33b90cba4151ac0d Author: Adam Dickmeiss Date: Tue Sep 5 14:04:05 2000 +0000 Updates for prefix 'yaz_' for YAZ log functions. commit 120b9ad8cd0e1d1a6522582bb14fa92a3ecaed6e Author: Heikki Levanto Date: Thu Jul 13 10:14:20 2000 +0000 Removed compiler warnings when making zebra commit 1c3797bc503c1e7a109c8887d89d3ddda93bba71 Author: Adam Dickmeiss Date: Fri Jul 7 12:49:20 2000 +0000 Optimized resultSetInsert{Rank,Sort}. commit 2a01843068a0ed80c574af6772a784efc361d003 Author: Adam Dickmeiss Date: Thu Jul 6 11:40:37 2000 +0000 Minor. commit 2d64cd0fe7bd7ee23fd095f327a350ac917bf93d Author: ian Date: Fri Jun 9 13:56:38 2000 +0000 Added some logging on Authentication and searches. commit bf50d26509dd5db5e81f9b3330ba9099747a8707 Author: Adam Dickmeiss Date: Tue May 23 21:28:03 2000 +0000 Combined zebra/zmbol makefile. commit 297ba5c5c265a5f869f43a0a211bf9f48f700add Author: Adam Dickmeiss Date: Thu May 18 12:01:36 2000 +0000 System call times(2) used again. More 64-bit fixes. commit a0da17360613c183107d78449bda31fcb97911fa Author: Adam Dickmeiss Date: Mon May 15 15:32:50 2000 +0000 Added support for 64 bit input file support. commit 588b859472c0c1efdca8774ede0bcf1260abfcbe Author: Adam Dickmeiss Date: Mon May 15 15:32:33 2000 +0000 Added 64 bit file input. commit 195352c94a50dd8a23773abf3a7f7641ae1225d3 Author: Adam Dickmeiss Date: Mon May 15 13:02:39 2000 +0000 Minor change. commit b333f34d7e5787c0a1940848b732c1f38c4c1044 Author: Adam Dickmeiss Date: Mon May 15 12:56:37 2000 +0000 Record offset of size off_t. commit fbb8cf7bf8582db044949d488ca9dcdbb92f352b Author: Adam Dickmeiss Date: Tue May 9 10:56:50 2000 +0000 Added call to xmalloc/nmem debugging functions. commit c1a85f9caaa8476a69b392349e90b7c4981e7db3 Author: Adam Dickmeiss Date: Fri May 5 13:48:03 2000 +0000 Fixed locking for metafiles. commit b9ba556f29428d79db2a874b1a33504290125216 Author: Adam Dickmeiss Date: Tue May 2 11:26:13 2000 +0000 Fixed tcl configure switch. commit c4b3b6322c32ee380e63ff06cabaad213952c195 Author: Adam Dickmeiss Date: Wed Apr 19 14:35:59 2000 +0000 WIN32 update (this version is known not to work on Windows). commit e5ba12655112ab17ee08e0d048cc5afae8e8c670 Author: Adam Dickmeiss Date: Mon Apr 17 14:22:00 2000 +0000 WIN32 update. commit 0b996e4dc626fec99f29c97955191db6a8604b85 Author: Adam Dickmeiss Date: Thu Apr 6 09:19:41 2000 +0000 Fix. commit 56795fa9571dcb939b249bcd654ae5094fee835f Author: Adam Dickmeiss Date: Thu Apr 6 09:07:08 2000 +0000 Updated description. commit 7292ca10a37d541e3cc4da25e26a35738bf0b7f2 Author: Adam Dickmeiss Date: Thu Apr 6 09:06:37 2000 +0000 Updated zebra.spec. commit 87515c8d89b4b0e3ceadac4bded487efa099a94e Author: Adam Dickmeiss Date: Thu Apr 6 09:03:27 2000 +0000 Added zmbol spec file. commit 1c1f26b0b758efb903aaa0a6288dfabf1efcdc17 Author: Adam Dickmeiss Date: Wed Apr 5 10:07:02 2000 +0000 Minor zebra compile fix. commit aad54b136f5e842bb1ba2e1dfd7736f8de90ef8c Author: Adam Dickmeiss Date: Wed Apr 5 10:04:28 2000 +0000 Modified test script. commit f12eb4478fcad5ac0d68a39c0f32920a969b7a6d Author: Adam Dickmeiss Date: Wed Apr 5 09:59:42 2000 +0000 Added Makefile.am. commit 4a54f2b4306be2fa40369e110862e30877256b39 Author: Adam Dickmeiss Date: Wed Apr 5 09:58:12 2000 +0000 Fix. commit 2f0bc95803328681365dc88e9c1a50749d13fe2a Author: Adam Dickmeiss Date: Wed Apr 5 09:55:44 2000 +0000 Minor. commit aa130d02e07d1246ed28ba2c69134ef988afb7db Author: Adam Dickmeiss Date: Wed Apr 5 09:54:27 2000 +0000 Added various Makefile.in's. commit 26c69f158724741e5a9498a7f653f8220f623cb3 Author: Adam Dickmeiss Date: Wed Apr 5 09:52:46 2000 +0000 Added aclocal.m4. commit 69da23537c6bb71ab948e079708bf8ea090de73f Author: Adam Dickmeiss Date: Wed Apr 5 09:49:35 2000 +0000 On Unix, zebra/z'mbol uses automake. commit 4bf05517c81b30c6cc2e16fb5e475c02be45d117 Author: Adam Dickmeiss Date: Mon Mar 20 19:11:15 2000 +0000 Remote record import. commit c41c84a497ae744aa825a90f144c85b54f1cd4bb Author: Adam Dickmeiss Date: Mon Mar 20 19:08:35 2000 +0000 Added remote record import using Z39.50 extended services and Segment Requests. commit eb2b742588ce07fb4516bbca22c93b938b13e433 Author: Adam Dickmeiss Date: Wed Mar 15 15:00:30 2000 +0000 First work on threaded version. commit 83533000f9456dcab2fc171abafd84d6104d4087 Author: Adam Dickmeiss Date: Thu Mar 2 14:35:19 2000 +0000 Added structure year and date. commit db8964b08c4f429bde43d5940000ae99ec544bd2 Author: Adam Dickmeiss Date: Thu Mar 2 14:35:03 2000 +0000 Fixed proximity handling. commit a1cb24becf02389d1a084d513bb57f6cdf6e82f0 Author: Adam Dickmeiss Date: Wed Mar 1 10:02:04 2000 +0000 Dummy makefiles no longer generated for Zebra. commit d429dba76804d37be5bf22128266621390200a33 Author: Adam Dickmeiss Date: Fri Feb 25 13:42:20 2000 +0000 Fixes. commit 8725809220c087e81103568caa32886f0afec383 Author: Adam Dickmeiss Date: Fri Feb 25 13:24:49 2000 +0000 Fixed bug regarding pointer conversion that showed up on OSF V5. commit d91d6d903a16f58d4dc5e0a70a8b617b60a7e5a7 Author: Adam Dickmeiss Date: Fri Feb 25 11:35:41 2000 +0000 Updated about tclconfig, yazconfig. commit d82a3109cb3fcc56fd613b71a3a48d5ec72146f8 Author: Adam Dickmeiss Date: Thu Feb 24 12:31:17 2000 +0000 Added zebra_string_norm. commit 0a92d9b74c7db4b0a48d1d23e2b7a4f2980d0085 Author: Adam Dickmeiss Date: Thu Feb 24 11:00:07 2000 +0000 Fixed bug: indexer would run forever when lock dir was non-existant. commit eeb47e350ff5e7ddb304ad0757cefbdcecbb2ce7 Author: Adam Dickmeiss Date: Thu Feb 24 10:57:02 2000 +0000 Sequence number incremented after each incomplete-field. commit 70bca9ad928352b5374817fa5360c803cbb477ae Author: Adam Dickmeiss Date: Thu Feb 10 10:40:43 2000 +0000 Minor. commit 79059adbdbad6653f7566b9931c0f7c94fb76d86 Author: Adam Dickmeiss Date: Thu Feb 10 10:23:34 2000 +0000 Minor. commit 00c1f0bc4bee703d109c1afa30877f18f3ca101a Author: Adam Dickmeiss Date: Thu Feb 10 10:19:47 2000 +0000 Patch level 1. commit 2500b406caa84d00a37f1b46d1df7de8b6f54d40 Author: Adam Dickmeiss Date: Thu Feb 10 10:16:05 2000 +0000 Added comment. commit 2a91fe8326f431b98d98f22754dc211d9623979e Author: Adam Dickmeiss Date: Tue Feb 8 12:34:17 2000 +0000 Fix: referred to zmbol.mak. commit 2ad55b3f17e054d19923e92adcb994854f41d9d8 Author: Adam Dickmeiss Date: Fri Feb 4 08:49:25 2000 +0000 Better configure help. commit 96cf0d36e560a2f63d68b3d271e3273ea711f258 Author: Adam Dickmeiss Date: Thu Jan 27 16:26:00 2000 +0000 Fixed configure script. commit c5c1c56eebe056a12b7683e54af64c4717e77ff0 Author: Adam Dickmeiss Date: Tue Dec 28 15:48:12 1999 +0000 Minor Fix. commit 32e3781dfb248c2109df1753d33f9a6aeec2a78a Author: Adam Dickmeiss Date: Thu Dec 23 09:03:32 1999 +0000 Changed behaviour of trunc=105 so that * is regular .* and ! is regular . commit 4ffcc4caf5dae0a8a55ebb4b481003b764127c84 Author: Adam Dickmeiss Date: Wed Dec 15 09:54:21 1999 +0000 Minor changes. commit e5ac901438129e9164111e2eb8c21536d1cb34a9 Author: Adam Dickmeiss Date: Sat Dec 11 21:39:35 1999 +0000 Minor updates for RPM. commit b27753366afbf23f168f3af6aec160e7c22d4157 Author: Adam Dickmeiss Date: Thu Dec 9 01:19:14 1999 +0000 Mkdir of lib/bin. commit 65a10c9960b7ccdf694efe9ad6a12d9edc6efbc1 Author: Adam Dickmeiss Date: Thu Dec 9 01:17:19 1999 +0000 Release. commit b2b08bcab0a34dffa988288f3d860fa50091d9c6 Author: Adam Dickmeiss Date: Thu Dec 9 01:03:48 1999 +0000 Updated doc makefile. commit fa07a1e944e47feeb9e58296659bb57c4c32bde7 Author: Adam Dickmeiss Date: Wed Dec 8 22:44:45 1999 +0000 Zebra/Z'mbol dependencies added. commit 075d0e660334b9baf35c65e3da596b465057e2bf Author: Adam Dickmeiss Date: Wed Dec 8 22:11:56 1999 +0000 Separate WIN32 sub directories for Zebra and Z'mbol. commit 45a6ad99e5210bc4ef39bf00d81aee8f0fb26168 Author: Adam Dickmeiss Date: Wed Dec 8 15:03:11 1999 +0000 Implemented bf_reset. commit 49f1c8c877affdeb9e9221047c48beed3f475afb Author: Adam Dickmeiss Date: Thu Dec 2 11:34:51 1999 +0000 Updated LICENSE and CHANGELOG. commit 7cb238bb0036500bd2b24eb2cef615b72786cd72 Author: Adam Dickmeiss Date: Wed Dec 1 21:58:48 1999 +0000 Proper handle of illegal use of isams. commit e1018028efe789874038c31dcff203c2ec4bb601 Author: Adam Dickmeiss Date: Wed Dec 1 19:11:42 1999 +0000 Added @PROGPREFIX@ for install process. commit 43e51e6fd8d1e10b5d5b6d62de8da6ec833f806c Author: Adam Dickmeiss Date: Wed Dec 1 14:29:50 1999 +0000 Minor. commit 43506dd0ff92373604bb7288e2dcc943b2c1d524 Author: Adam Dickmeiss Date: Wed Dec 1 13:30:30 1999 +0000 Updated configure for Zmbol/Zebra dependent settings. commit 28f3461a79a4569d736f4ffc66c6ae207e38c2ab Author: Adam Dickmeiss Date: Wed Dec 1 12:59:09 1999 +0000 Added LICENSE. commit 11a52e9713421d9fecde42abda313dd869169f5f Author: Adam Dickmeiss Date: Tue Nov 30 14:14:00 1999 +0000 Added RPM spec. commit 45dcbe04562559c1af90b5049fa1871311907072 Author: Adam Dickmeiss Date: Tue Nov 30 14:02:45 1999 +0000 Moved isams. commit 77bf0bfbc8bab19e55eca94bd431a490b7ae2c05 Author: Adam Dickmeiss Date: Tue Nov 30 13:59:21 1999 +0000 Removed isams from sub dir isamc. commit 2cbbdb4285acbc22b6575a4dac427a793e14d671 Author: Adam Dickmeiss Date: Tue Nov 30 13:57:48 1999 +0000 Removed isamh. commit e150e51a7e20a902e9fd2f11f00811f94f67d529 Author: Adam Dickmeiss Date: Tue Nov 30 13:48:03 1999 +0000 Improved installation. Updated for inclusion of YAZ header files. commit c7700ec8d0d767670b6a3f3a860ba21d9dce8c28 Author: Adam Dickmeiss Date: Mon Nov 29 15:13:26 1999 +0000 Server sets implementationName - and Version. commit b718b0a9f4aaf52d38031bfb82d0d539e50332d6 Author: Adam Dickmeiss Date: Thu Nov 4 15:00:45 1999 +0000 Implemented delete result set(s). commit 967d839b42a38836f6ef9ac271f4185460bcb6ea Author: Adam Dickmeiss Date: Fri Oct 29 10:02:33 1999 +0000 Fixed decompression buffer overflow. commit 92bb4bdb37873f21cabe7b045e1a593ab648ae55 Author: Adam Dickmeiss Date: Fri Oct 29 10:01:54 1999 +0000 Minor fix in bend_init where handle wasn't set to NULL when zebra_init fails. commit a17b23c8615d81523afa6d124d2f91e237f06605 Author: Adam Dickmeiss Date: Fri Oct 29 10:00:00 1999 +0000 Fixed minor bug where database name wasn't set in zebra_record_fetch. commit deec5ea01546cfdbc2d7a2b9e85c8eeeace21d11 Author: Adam Dickmeiss Date: Fri Oct 15 08:27:46 1999 +0000 Fixed replace handler. 8-bit fix. commit 285a986588deacac089734552a7149142f7afc7d Author: Adam Dickmeiss Date: Thu Oct 14 14:33:49 1999 +0000 Added truncation 5=106. commit 6630f5b4dc744c984086bc9dd8f8b17303fa39f6 Author: Adam Dickmeiss Date: Thu Oct 7 09:48:36 1999 +0000 Allow res_get / res_get_def with NULL res. commit ad49d4d9d6a6cda40f80193e2d3dafe560c90cfd Author: Heikki Levanto Date: Wed Oct 6 15:18:13 1999 +0000 Improving block sizes again commit 500505a8413687c67b6be99ff1ae9c1460d35e25 Author: Heikki Levanto Date: Wed Oct 6 11:46:36 1999 +0000 mproved statistics on isam-d commit 72ca1631366b5196106ac777e492b6a70c273651 Author: Heikki Levanto Date: Tue Oct 5 09:57:40 1999 +0000 Tuning the isam-d (and fixed a small "detail") commit 3ecb370349f3ea43b0b34cf4d097918c349b1aac Author: Heikki Levanto Date: Mon Sep 27 14:36:36 1999 +0000 singletons commit afc642709ad7c44f9bce0bbf533d8d76fbb1bcbd Author: Heikki Levanto Date: Thu Sep 23 18:01:18 1999 +0000 singleton optimising commit 75b192c1c670ec987b49f81acf860666345f719d Author: Adam Dickmeiss Date: Thu Sep 23 10:05:05 1999 +0000 Implemented structure=105 searching. commit a47d9b179296ab7f1fbc2921531c1514b1dc9530 Author: Heikki Levanto Date: Tue Sep 21 17:36:43 1999 +0000 Added filter function. Not much of effect on the small test set... commit f6fb80f1dfd9b1a486595496a0f43aaeb16f7b40 Author: Heikki Levanto Date: Mon Sep 20 15:48:06 1999 +0000 Small changes commit b918342ded2c57bcd57bf7af6748c17bce4d1cf6 Author: Heikki Levanto Date: Mon Sep 13 13:28:28 1999 +0000 isam-d optimizing: merging input data in the same go commit 87142cb2b4f17d37fd5111576668d90e2a3aec3d Author: Adam Dickmeiss Date: Wed Sep 8 12:13:21 1999 +0000 Fixed minor bug "replace"-mappings. Removed some logging messages. commit 245ce174727953c86b42469927d469f860f07230 Author: Adam Dickmeiss Date: Wed Sep 8 12:12:39 1999 +0000 Removed log message. commit ab29b69b841495c2713d8a82ad8b2100f78aa3aa Author: Adam Dickmeiss Date: Wed Sep 8 12:12:06 1999 +0000 Fixed bad message. commit 55ee8bb315da3bfcc40677276bfa45fd2094d89c Author: Adam Dickmeiss Date: Tue Sep 7 11:36:32 1999 +0000 Minor changes. commit 1b1c0452f350e2a499535f40540f0d3a034a9738 Author: Adam Dickmeiss Date: Tue Sep 7 08:13:08 1999 +0000 Removed log messages. commit 01ddc55fd5a59535e229c09440cfdadccadf3555 Author: Adam Dickmeiss Date: Tue Sep 7 07:19:21 1999 +0000 Work on character mapping. Implemented replace rules. commit c0a1c79e55f706009113b2de3c11a6f13d4a0e7d Author: Heikki Levanto Date: Wed Aug 25 18:09:23 1999 +0000 Starting to optimize commit eb22d015af8ae3cce21364bc72110308e3e65cc2 Author: Heikki Levanto Date: Tue Aug 24 13:22:19 1999 +0000 Fallback to isamc commit e632770a0cff96f36f61f8c2d98926975ae8f72c Author: Heikki Levanto Date: Tue Aug 24 13:17:42 1999 +0000 Block sizes, comments commit 6d1c06c091a197d911a8e15737ff01ec7ab92166 Author: Heikki Levanto Date: Tue Aug 24 10:12:02 1999 +0000 Comments about optimising commit 701142ce73cdcafac2e9e30b89a484eb49fffbf8 Author: Heikki Levanto Date: Sun Aug 22 08:26:34 1999 +0000 COmments commit e001ebdd731ab742f95e185348c67c8ffdde790d Author: Heikki Levanto Date: Fri Aug 20 12:25:58 1999 +0000 Statistics in isamd commit 7c82553e8fbccbb18a70c6f5e39db75069bfc9d3 Author: Heikki Levanto Date: Fri Aug 20 08:28:37 1999 +0000 Log levels commit 544e8fcc65541951ba92d0212838a0bebbc3084c Author: Heikki Levanto Date: Wed Aug 18 13:59:19 1999 +0000 Fixed another unlikely difflen bug commit 391f50227af9b86500ad1ddee46f3bd9d461aa92 Author: Heikki Levanto Date: Wed Aug 18 13:28:16 1999 +0000 Set log levels to decent values commit 3d9123eca4abdaa6582bb4d77b68e7d18650507c Author: Heikki Levanto Date: Wed Aug 18 10:45:27 1999 +0000 Another fix for the difflen problem. commit 6c2c89df968733e5c7dcae9ddc99b380672f3eb6 Author: Heikki Levanto Date: Wed Aug 18 10:39:20 1999 +0000 Added a comment on memory leaks commit 94e635de44e41a5fdd258a211577abf52a63dccb Author: Heikki Levanto Date: Wed Aug 18 10:37:11 1999 +0000 Fixed (another) difflen bug commit 263e82c8a15945a66fa7ddcd8826df20010bcd59 Author: Heikki Levanto Date: Wed Aug 18 09:13:31 1999 +0000 Fixed a detail commit 93fc01961d210c8ada1d3147763da8f7293dcbfb Author: Heikki Levanto Date: Wed Aug 18 08:38:04 1999 +0000 Memory leak hunting commit 1a6ff0680d514e270257e7e599d34b6f8c9317a1 Author: Heikki Levanto Date: Wed Aug 18 08:34:53 1999 +0000 isamd commit 27babe1d585162b54b750fd5bf6a2139dee42bc1 Author: Heikki Levanto Date: Wed Aug 18 08:33:41 1999 +0000 Fixes commit 8d2d1dd1c21f67a45e148d09fef0f50baf0fb803 Author: Heikki Levanto Date: Tue Aug 17 19:46:53 1999 +0000 Fixed a memory leak commit 7afdc32625057ad7146fd043f5bcac1eeb3d53b6 Author: Heikki Levanto Date: Tue Aug 17 19:44:25 1999 +0000 Fixed memory leaks commit d7c6ba3bf7a4578f4be0addf318e9abebdfac4b9 Author: Heikki Levanto Date: Sat Aug 7 11:30:59 1999 +0000 Bug fixing (still a mem leak somewhere) commit ae14be135d7d1a0b8d428977d5e6d4d03c660b3b Author: Heikki Levanto Date: Wed Aug 4 14:21:18 1999 +0000 isam-d seems to be working. commit 3b985da49d20315701f5bb2db353d242ff1e85a6 Author: Adam Dickmeiss Date: Mon Aug 2 10:13:47 1999 +0000 Fixed bug regarding zebra_hits. commit cb4bd60bc882597a3232f8098bd755385bfca9f2 Author: Heikki Levanto Date: Fri Jul 23 15:43:05 1999 +0000 Hunted a few bugs in isam-d. Still crashes on the long test run commit b43a340b3b0673ebbaafe319ad552baeb078fbdf Author: Heikki Levanto Date: Fri Jul 23 13:58:52 1999 +0000 merged closer to working, still fails on filling a separate, large block commit e7031475f0d0c08a4b994e32c9cf3258f3a7c427 Author: Heikki Levanto Date: Wed Jul 21 14:53:55 1999 +0000 isamd read and write functions work, except when block full Merge missing still. Need to split some functions commit b3aa0c75d2016b90e8f8219ddc907fb80649d13a Author: Heikki Levanto Date: Wed Jul 21 14:24:50 1999 +0000 isamd write and read functions ok, except when diff block full. (merge not yet done) commit daa4802416fa7b68f60a1156ad039134e99aef25 Author: Adam Dickmeiss Date: Wed Jul 21 08:31:33 1999 +0000 More version info on WIN32. commit 543ab71dfcf03778b00faa164f94552cf11cab79 Author: Adam Dickmeiss Date: Tue Jul 20 13:59:18 1999 +0000 Fixed bug that occurred when phrases had 0 hits. commit 92a3e035582e89ded678e816e0ea2e0039da0ade Author: Adam Dickmeiss Date: Thu Jul 15 12:05:32 1999 +0000 Bug fix: Anyset (.) includes all 8-bit characters when charmap is defined. commit 1515246d3f97053b8c2fcaeb80f50acf2c33b32a Author: Heikki Levanto Date: Wed Jul 14 15:05:30 1999 +0000 slow start on isam-d commit e8f4cf34c75ffdc7bbfaf3fa232f29cc1384b60c Author: Heikki Levanto Date: Wed Jul 14 13:21:34 1999 +0000 Added isam-d files. Compiles (almost) clean. Doesn't work at all commit 672c57c13fdaa8e1e7b752671034dc871f613a51 Author: Heikki Levanto Date: Wed Jul 14 13:14:47 1999 +0000 Created empty commit 4cd4460739e2cf4919c32623534d2cdebea455c6 Author: Adam Dickmeiss Date: Wed Jul 14 13:05:29 1999 +0000 Tcl filter works with objects when TCL is version 8 or later; filter works with strings otherwise (slow). commit 8e5f17591325078343ec4dff4708a12c78863f78 Author: Heikki Levanto Date: Wed Jul 14 12:34:43 1999 +0000 Copied from isamh, starting to change things... commit 3dfee58630d250d3cc6f4aa7cec34df3b99722d1 Author: Heikki Levanto Date: Wed Jul 14 12:12:07 1999 +0000 Large-block isam-h (may not work too well... Abandoning for isam-d) commit 3726bf6622da6a8b983bb4cbb7d654e84c3216d7 Author: Adam Dickmeiss Date: Wed Jul 14 10:59:26 1999 +0000 Changed functions isc_getmethod, isams_getmethod. Improved fatal error handling (such as missing EXPLAIN schema). commit 0af5d3854fbf1ca317b8dc3cf3b478728f6d4d5a Author: Adam Dickmeiss Date: Wed Jul 14 10:56:43 1999 +0000 Fixed potential memory leak. commit 2af4c6b019ff3be030179820044bda9d721862f3 Author: Adam Dickmeiss Date: Wed Jul 14 10:56:16 1999 +0000 Filter handles multiple records in one file. commit 0a76e10d0d8914522c3d54723250f8141e7ad13f Author: Adam Dickmeiss Date: Wed Jul 14 10:55:28 1999 +0000 Fixed memory leak. commit 0f6cf21e0feb7059bbd7576a44ac61470eb09d0b Author: Adam Dickmeiss Date: Wed Jul 14 10:53:51 1999 +0000 Updated various routines to handle missing explain schema. commit 44fe6818860e5d8b175b4bafedc8dd4eea057c50 Author: Heikki Levanto Date: Tue Jul 13 15:24:50 1999 +0000 Removed the one-block append, it had a serious flaw. commit 7f19b8bba3b3eb28130c34ed50fa56a6b3b374cd Author: Adam Dickmeiss Date: Tue Jul 13 14:45:42 1999 +0000 Fixed memory leak. commit bf25b1c32932f0f9dbe10119de1c361d9301e6a8 Author: Heikki Levanto Date: Tue Jul 13 14:22:17 1999 +0000 Better allocation strategy in isamh_merge commit 7877f72714417871cd555050060131660146a053 Author: Adam Dickmeiss Date: Tue Jul 13 13:37:38 1999 +0000 Updated zebra.cfg. commit 05f72596a6a875f108fe8a933069f3ff942e471e Author: Heikki Levanto Date: Tue Jul 13 13:21:15 1999 +0000 Managing negative deltas commit 4c32050b877fd85e68771370d63f9a96dd7aa5a3 Author: Adam Dickmeiss Date: Mon Jul 12 07:27:54 1999 +0000 Improved speed of Tcl processing. Fixed one memory leak. commit f7afb145661ac2f567c60f203bf0dbe32309402f Author: Heikki Levanto Date: Thu Jul 8 14:23:27 1999 +0000 Fixed a bug in isamh_pp_read and cleaned up a bit commit ea515bb01793545523b57be6331e9596022f1f97 Author: Heikki Levanto Date: Wed Jul 7 09:36:04 1999 +0000 Fixed an assertion in isamh commit b017c9ebfe65bb69d6d6dc17f29a4c331952b8cd Author: Heikki Levanto Date: Tue Jul 6 16:30:20 1999 +0000 IsamH startss to work - at least it builds indexes. Can not search yet... commit db097baeeb1b87a8daddd3c88be106d517b9f443 Author: Adam Dickmeiss Date: Tue Jul 6 13:34:57 1999 +0000 Fixed bug (introduced by previous commit). commit fde0305326b70f56b884c2e0438646406d7fb72b Author: Adam Dickmeiss Date: Tue Jul 6 12:44:40 1999 +0000 Minor. commit f3425fb457792aae865096cf9acf5cb41798b1d1 Author: Adam Dickmeiss Date: Tue Jul 6 12:28:04 1999 +0000 Updated record index structure. Format includes version ID. Compression algorithm ID is stored for each record block. commit 7ac37393aeb242f6eddf1a604923bd009baace41 Author: Adam Dickmeiss Date: Tue Jul 6 12:26:41 1999 +0000 Retrieval handler obeys schema and handles XML transfer syntax. commit a356c604b0424b75838d8a67f26b3b3ea570dd90 Author: Adam Dickmeiss Date: Tue Jul 6 12:26:04 1999 +0000 Fixed filters so that MS-DOS CR is ignored. commit 5ed7bb5a4a7e46271cc161304b114eae54b53674 Author: Heikki Levanto Date: Tue Jul 6 09:37:04 1999 +0000 Working on isamh - not ready yet. commit 4f2ca550b3aeaf42480ba84e196fd930ba407a18 Author: Heikki Levanto Date: Wed Jun 30 15:07:23 1999 +0000 Adding isamh stuff commit 6b0310a64df542131c2f4abded39f35844235e4d Author: Heikki Levanto Date: Wed Jun 30 15:06:28 1999 +0000 copied from isamc.h, simplifying commit e1d0fa1a3689bc422a3c22a676eb0192f34ddb02 Author: Heikki Levanto Date: Wed Jun 30 15:05:45 1999 +0000 opied from isamc.p.h, starting to simplify commit e4cfbd4200124336df680bf1e7497822a040298c Author: Heikki Levanto Date: Wed Jun 30 15:04:54 1999 +0000 Copied from isamc.c, slowly starting to simplify... commit 30f1e61054db8537e562e15728a86a51d21b4d4c Author: Heikki Levanto Date: Wed Jun 30 15:03:55 1999 +0000 first take on isamh, the append-only isam structure commit 78e20a4e6a704e81bddb2ac37caf83f5a670041d Author: Adam Dickmeiss Date: Wed Jun 30 09:08:23 1999 +0000 Added coder to reset. commit 4d6d0d754cc1f0b1f7f814a2268e679d26b890f7 Author: Sebastian Hammer Date: Mon Jun 28 13:25:40 1999 +0000 Improved diagnostics for Tcl commit 795af4e3c7346eff351ff387228ec548956eada8 Author: Adam Dickmeiss Date: Fri Jun 25 13:48:02 1999 +0000 Updated MSVC project files. Added BZIP2 record compression (not very well tested). commit 39f64b098543dfd2fc9113322103724431d273b0 Author: Adam Dickmeiss Date: Fri Jun 25 13:47:25 1999 +0000 Minor change that prevents MSVC warning. commit 350d6eaf6f36faf17fcb2f1b80379b84496a82d6 Author: Adam Dickmeiss Date: Thu Jun 17 14:38:40 1999 +0000 Bug fix: Scan SEGV'ed when getting unknown use attribute. commit f9da3895c7f972aa56c80eda5c1b463455042380 Author: Adam Dickmeiss Date: Thu Jun 10 12:14:56 1999 +0000 Fixed to use bend_start instead of pre_init. commit da822637709558b602b796afed937ef434209749 Author: Adam Dickmeiss Date: Thu Jun 10 09:20:03 1999 +0000 Minor change to pre_init handler. commit d960df9d3f91d209797047fca679027e365e8d02 Author: Adam Dickmeiss Date: Wed Jun 9 11:58:48 1999 +0000 Changed Makefiles to NOT include ../../yaz/z39.50. commit ef696645cc3b7e0f4027008d1dc589c0f0f90c1f Author: Adam Dickmeiss Date: Wed May 26 07:49:12 1999 +0000 C++ compilation. commit 084ad8d210469872bda11c201267a361ca295435 Author: Adam Dickmeiss Date: Tue May 25 12:33:32 1999 +0000 Fixed bug in Tcl filter. commit 8ddf739043beb068cac9287afa88ea92bf4d3ed6 Author: Adam Dickmeiss Date: Fri May 21 12:00:35 1999 +0000 Minor. commit 10e178572346e8c5c3caaa43b803dd10c005cb5f Author: Adam Dickmeiss Date: Fri May 21 12:00:17 1999 +0000 Better diagnostics for extraction process. commit 0a50c507e32a11d9ef0d1f8458b02590044f25d5 Author: Adam Dickmeiss Date: Fri May 21 11:08:46 1999 +0000 Tcl filter attempts to read .tflt. Improvements to configure script so that it reads uninstalled Tcl source. commit 4415da5dbbba04e50d4524347486d60113ed569c Author: Adam Dickmeiss Date: Thu May 20 12:57:18 1999 +0000 Implemented TCL filter. Updated recctrl system. commit 66a36a0b61fbe94ee4d4458506df5144eb8150d1 Author: Adam Dickmeiss Date: Tue May 18 20:00:33 1999 +0000 Minor fix. commit 4ed5fbcd29d2a98b048d1d94510b262d352b4f7c Author: Adam Dickmeiss Date: Sat May 15 14:36:37 1999 +0000 Updated dictionary. Implemented "compression" of dictionary. commit 5b4dcfcb99600327a11b58de4fec33003dc4d816 Author: Adam Dickmeiss Date: Sat May 15 14:35:48 1999 +0000 Minor changes. commit d9d2a1764247c9e849ecaa429054579367734191 Author: Adam Dickmeiss Date: Wed May 12 15:24:25 1999 +0000 First version of ISAMS. commit bceca936710690858ea162e7bc22de819f0e280f Author: Adam Dickmeiss Date: Wed May 12 13:08:05 1999 +0000 First version of ISAMS. commit 3feb8e43ca780f100b017e983fca9e235b3d0c24 Author: Adam Dickmeiss Date: Wed Apr 28 14:53:07 1999 +0000 Fixed stupid bug regarding split-files. commit 3180c4ff61c4e475ba6db7a00b1750f0a02f33ac Author: Adam Dickmeiss Date: Thu Apr 22 14:26:38 1999 +0000 Added check for -lwrap. commit 9252c3f4231f9f3226326ce1360f055bad48b8d1 Author: Adam Dickmeiss Date: Tue Mar 9 16:27:49 1999 +0000 More work on SDRKit integration. commit a4e93d62564084d6d1b6670d4fe75dd70a6ed139 Author: Adam Dickmeiss Date: Tue Mar 9 13:07:05 1999 +0000 Work on dict_compact routine. commit 254c4ba29c56564d33fae651343e83fb5c35a36f Author: Adam Dickmeiss Date: Tue Mar 9 10:16:35 1999 +0000 Work on compaction of dictionary/isamc. commit e9b33fe049e35d06dfeedb830feea32553d26cee Author: Sebastian Hammer Date: Tue Mar 2 16:15:42 1999 +0000 Added "tagsysno" and "tagrank" directives to zebra.cfg. commit 3a92201b54249c5bcb63d557c8e87afa3858a5ae Author: Sebastian Hammer Date: Tue Mar 2 16:14:15 1999 +0000 *** empty log message *** commit ac0167708e784f6fd1511ce7b0361e5db498faf8 Author: Adam Dickmeiss Date: Fri Feb 19 10:38:30 1999 +0000 Implemented chdir-setting. commit 617f456d88a1a46b0dd9d9a5a2bd97bed73c1e2f Author: Adam Dickmeiss Date: Fri Feb 19 10:37:40 1999 +0000 Minor fix. commit 18ceebf9dad34b382ffc84171f9e33246b8e075c Author: Adam Dickmeiss Date: Thu Feb 18 15:01:04 1999 +0000 Structure=key uses register type 0. commit edff0b159ebbd0f26f58dda840f36ee400faab0c Author: Adam Dickmeiss Date: Thu Feb 18 14:59:54 1999 +0000 Minor changes. commit 21e03c79e86bc7f7edcd0469d40186fabd9a15f4 Author: Adam Dickmeiss Date: Thu Feb 18 12:49:31 1999 +0000 Changed file naming scheme for register files as well as record store/index files. commit 20604ec4af0848930fa6ee9203eba5ffc8e6fb1c Author: Adam Dickmeiss Date: Wed Feb 17 12:18:12 1999 +0000 Fixed zebra_close so that a NULL pointer is ignored. commit 6e044d5a523bb4363d07af757ebf1bcfe0ad6c04 Author: Adam Dickmeiss Date: Wed Feb 17 11:29:55 1999 +0000 Fixed in record_fetch. Minor updates to API. commit 9eab10a0c1473a3f4c81af8421d49e1c32892415 Author: Adam Dickmeiss Date: Mon Feb 15 08:52:37 1999 +0000 Added SUTRS for API test program. commit 2730140edaab8fc1df36e4b82fb1a4fcc523de05 Author: Adam Dickmeiss Date: Fri Feb 12 13:29:19 1999 +0000 Implemented position-flag for registers. commit 3c5f6226f97612c0d6ac40591f600587c5ffa858 Author: Adam Dickmeiss Date: Tue Feb 2 14:49:59 1999 +0000 Updated WIN32 code specific sections. Changed header. commit 0113b6aaf2c27d960591e7087785123f16a235f3 Author: Adam Dickmeiss Date: Mon Jan 25 13:47:54 1999 +0000 Fixed bug. commit 134389ffedebe3bbb00cb88f3f3ceace3241945a Author: Adam Dickmeiss Date: Wed Dec 16 12:23:29 1998 +0000 Added facility for database name mapping using resource mapdb. commit 0bc0c3f6a2ec99f93da7d18acfd6ef1ad4509167 Author: Sebastian Hammer Date: Sun Nov 29 22:45:55 1998 +0000 Added some Swedish characters commit 43969174fc6bf4b8be5d1e72c0799a5fb705be9a Author: Adam Dickmeiss Date: Tue Nov 17 09:53:31 1998 +0000 Changed project. commit e19bd45069a282b054015f9cf88e109968b9fa7f Author: Adam Dickmeiss Date: Mon Nov 16 16:03:41 1998 +0000 Moved loggin utilities to Yaz. Was implemented in file zlogs.c. commit 86ab0d5abf18dc1afdd4aee52baf502d54a99e40 Author: Adam Dickmeiss Date: Mon Nov 16 10:18:10 1998 +0000 Better error reporting for result sets. commit 10d6601ca574d93bd5534b3a997a6b12305c75bc Author: Adam Dickmeiss Date: Mon Nov 16 10:11:55 1998 +0000 Added addtional info for error 114 - unsupported use attribute. commit 4c1c4df443dc34e0a183de4760a2890396409bb8 Author: Adam Dickmeiss Date: Mon Nov 16 10:10:53 1998 +0000 Fixed problem with zebraPosSetCreate that occurred when positions were less than 1. commit c95a9e501773dedb579f26c59bfd529d0ef9c6ec Author: Adam Dickmeiss Date: Wed Nov 4 16:31:32 1998 +0000 Fixed bug regarding recordBytes in databaseInfo. commit c6ab7eba05f6ee40175f89ccf80998cdf6435c38 Author: Adam Dickmeiss Date: Wed Nov 4 15:13:32 1998 +0000 Added SOIF-filter. commit e6cd523a792fca5557b3d9647f7b33986a4c32de Author: Adam Dickmeiss Date: Tue Nov 3 16:07:13 1998 +0000 Yet another fix. commit e01afb6f5d5ba62821a703bd792298811b27e6ce Author: Adam Dickmeiss Date: Tue Nov 3 15:43:39 1998 +0000 Fixed bug introduced by previous commit. commit 5d61848786092f61fd25b7753f550460a4a619b6 Author: Adam Dickmeiss Date: Tue Nov 3 14:51:28 1998 +0000 Changed code so that it creates as few data1 nodes as possible. commit 9f14aa718863c3cbc73375667d0df785b96f0d9c Author: Adam Dickmeiss Date: Tue Nov 3 14:38:44 1998 +0000 Minor changes. commit 9b6159f0ac334f4b5984e05bed5439863f984861 Author: Adam Dickmeiss Date: Tue Nov 3 10:22:39 1998 +0000 Fixed memory leak that could occur for when large data1 node were concatenated. Data-type data1_nodes may have multiple nodes. commit 0d6d7e64c352de4bbb384da16b19f8dcb5aebbae Author: Adam Dickmeiss Date: Tue Nov 3 10:17:09 1998 +0000 Fixed bug regarding creation of some data1 nodes for Explain records. commit 35590968609f84a4ac4f4965c7b359cf06640491 Author: Adam Dickmeiss Date: Tue Nov 3 10:16:11 1998 +0000 Uses stat and not lstat so that file traversal follows symbolic links. commit d0fa45cf0b317b7332a097928dc3c8827536a97d Author: Adam Dickmeiss Date: Wed Oct 28 15:20:40 1998 +0000 Updated makefiles to work with YC automatically. commit b9bbdf9c3eb24d29c3181c693204d7cb790bc318 Author: Adam Dickmeiss Date: Wed Oct 28 15:18:55 1998 +0000 Fix for DOS-formatted configuration files. commit e6c873a1bf7291b89cfcfe76184c4154c61056e1 Author: Adam Dickmeiss Date: Wed Oct 28 10:54:37 1998 +0000 SDRKit integration. commit 98a65c4df19ff025d24167f425610d809a93bf80 Author: Adam Dickmeiss Date: Wed Oct 28 10:53:57 1998 +0000 Added type cast to prevent warning. commit aa0758514b0b2b0058b69ed5ab27d8c26ce5ce00 Author: Adam Dickmeiss Date: Wed Oct 28 10:48:55 1998 +0000 Added type cast to prevent warning. commit 4e1ac996f683092752e957b56ac228b2b9c1a381 Author: Adam Dickmeiss Date: Sun Oct 18 07:54:52 1998 +0000 Additional info added for diagnostics 114 (Unsupported use attribute) and 121 (Unsupported attribute set). commit 392b67432545d96cb2f9b3264a9427582fc1934f Author: Adam Dickmeiss Date: Sun Oct 18 07:51:10 1998 +0000 Changed one logf call. commit 75049be3951292bbbbd53d83ca38ccbd191e4b08 Author: Adam Dickmeiss Date: Fri Oct 16 08:14:28 1998 +0000 Updated record control system. commit 5260b5390d8a1a36c66e52083e8ebb9d26b49f01 Author: Adam Dickmeiss Date: Thu Oct 15 13:12:00 1998 +0000 Changes. commit eb15a2b4b168b0b618c12834735774667cd3a9ef Author: Adam Dickmeiss Date: Thu Oct 15 13:11:46 1998 +0000 Added support for option -record for "end element". When specified end element will mark end-of-record when at outer-level. commit 023b1af5942f75cf6d2b70ffd42df4a3c5d16dae Author: Adam Dickmeiss Date: Thu Oct 15 13:10:33 1998 +0000 Fixed bug in Zebra that caused it to stop indexing when empty record was read. commit 5e1f8f38f613f6e662a189eed0879d23a29e9e26 Author: Adam Dickmeiss Date: Thu Oct 15 13:09:29 1998 +0000 Minor changes. commit 520b3e5894e64f76194cd9143f05d2713b93198c Author: Adam Dickmeiss Date: Tue Oct 13 20:39:09 1998 +0000 Changes. commit ac1f474fffc762b2e3ac16950325eed2b04a8704 Author: Adam Dickmeiss Date: Tue Oct 13 20:37:53 1998 +0000 Changed configure script. commit 985e8a4d37568d885a9f29171364c1b9818ded9d Author: Adam Dickmeiss Date: Tue Oct 13 20:37:11 1998 +0000 Changed the way attribute sets are saved in Explain database to reflect "dynamic" OIDs. commit 7b0d294fbfd859a840c6c7bb1c5d4566e08050c1 Author: Adam Dickmeiss Date: Tue Oct 13 20:36:02 1998 +0000 Changed "indent" format string in log messages. commit abad0a32ee7fbde0cad3bb4aa6b562d28d849d3b Author: Adam Dickmeiss Date: Tue Oct 13 20:33:53 1998 +0000 Fixed one log message and change use ordinal to be an unsigned char. commit 50237e1d2713126e87d510017a4cc304a69c6798 Author: Adam Dickmeiss Date: Tue Oct 13 20:09:18 1998 +0000 Changed call to readconf_line. commit 925b59699ea916845d25af1b26e7c58d5beeac00 Author: Adam Dickmeiss Date: Tue Oct 13 20:07:22 1998 +0000 Changed some log messages. commit 0824b8e4170a9bba07a0097d1af18f81c75729bd Author: Adam Dickmeiss Date: Mon Sep 28 11:19:12 1998 +0000 Fix for Compiled ASN.1. commit 0216e1f261655bf8b32fd4878d25135751bdc6fa Author: Adam Dickmeiss Date: Tue Sep 22 14:01:00 1998 +0000 Minor changes. commit e5b0bb88921b593c89dd6ae9077c6566bc8a6a91 Author: Adam Dickmeiss Date: Tue Sep 22 10:48:18 1998 +0000 Minor changes in search API. commit 2d6227440bb26674cab2091b3d79c1934995b762 Author: Adam Dickmeiss Date: Tue Sep 22 10:03:38 1998 +0000 Changed result sets to be persistent in the sense that they can be re-searched if needed. Fixed memory leak in rsm_or. commit 52365e1ba3d9ffe33ed10788a8a91cb4fa7d6133 Author: Adam Dickmeiss Date: Fri Sep 18 12:41:00 1998 +0000 Fixed bug with numerical relations. commit 9fce226051f8b951b3c6f424fbdbd996ceb42007 Author: Adam Dickmeiss Date: Wed Sep 2 14:15:24 1998 +0000 Zebra uses GNU Configure. commit 0df6c383d656dba662eb9d9acafed01a0973fcff Author: Adam Dickmeiss Date: Wed Sep 2 13:53:16 1998 +0000 Extra parameter decode added to search routines to implement persistent queries. commit 0481a9d462ba15064121ecd84a5d59b70fb000a4 Author: Adam Dickmeiss Date: Mon Aug 24 17:29:23 1998 +0000 Minor changes. commit 75573f447b51a5d666a115fbf445af3d2717be48 Author: Adam Dickmeiss Date: Fri Aug 7 15:07:13 1998 +0000 Fixed but in cf_commit_flat. commit beda7a0a471cf2c19abb42dd9d1dad0d2aa28069 Author: Adam Dickmeiss Date: Thu Aug 6 14:35:28 1998 +0000 Routine bend_deleterequest removed. commit bff44ac0dfeb0850a1c3d312807a466ad5caf555 Author: Adam Dickmeiss Date: Wed Jul 1 10:13:51 1998 +0000 Minor fix. commit 12cdf00008c22bb5edf92632c7236b2676a273dd Author: Adam Dickmeiss Date: Wed Jul 1 09:16:10 1998 +0000 Element localno only added when it's greater than 0. commit 7baf7862039be84c33ed3b8a1468895418ebec0d Author: Adam Dickmeiss Date: Tue Jun 30 15:15:09 1998 +0000 Tags are trimmed: white space removed before- and after the tag. commit 9bd1e955dce39994af1266e9a952a7b8c6a4a0bc Author: Adam Dickmeiss Date: Tue Jun 30 12:55:45 1998 +0000 Bug fix. commit 6cb93fe44be70d87286dc68385efdf9563e1849f Author: Sebastian Hammer Date: Fri Jun 26 11:16:35 1998 +0000 Added support (un-optimised) for left and left/right truncation commit e02a2ef3bba24dbbbb00988c368f461ab49b3dc6 Author: Adam Dickmeiss Date: Thu Jun 25 19:16:29 1998 +0000 Minor changes to Visual C++ project. commit dc017c2fd1686d5a1bb5b04c45f11c69da60421a Author: Adam Dickmeiss Date: Thu Jun 25 09:55:47 1998 +0000 Minor changes - fixex headers. commit 55a5cde7eb23fb9aa5a8386d34bb1b6e131c19d8 Author: Adam Dickmeiss Date: Wed Jun 24 12:16:09 1998 +0000 Support for relations on text operands. Open range support in DFA module (i.e. [-j], [g-]). commit 5d51844baabbb37b83afdd9b10db0a6c53cd1905 Author: Adam Dickmeiss Date: Tue Jun 23 15:33:33 1998 +0000 Added feature to specify sort criteria in query (type 7 specifies sort flags). commit 4247c4670f5bc5ad61e458734a590d57be5a9f34 Author: Adam Dickmeiss Date: Mon Jun 22 11:36:47 1998 +0000 Added authentication check facility to zebra. commit 9289fb373f6404bb9d795c3a9eef42b4ce5d50d7 Author: Adam Dickmeiss Date: Mon Jun 22 11:35:09 1998 +0000 Minor changes. commit 7ba079c33928d43eaf1080f4d19a1156fd33938b Author: Adam Dickmeiss Date: Mon Jun 22 11:34:45 1998 +0000 Changed scan callback function so it doesn't stop further scanning. commit 75b086d1cbf7d4134e599d2d3b0cd51abb34292a Author: Adam Dickmeiss Date: Mon Jun 22 11:33:39 1998 +0000 Added two type casts. commit 7eb600284267432c57780b67dc101a406a79f57f Author: Adam Dickmeiss Date: Sat Jun 13 00:24:01 1998 +0000 Added apitest project. commit 3f45c68ea8b1d3a3e9c5b3a014b3d001e89c46eb Author: Adam Dickmeiss Date: Sat Jun 13 00:14:08 1998 +0000 Minor changes. commit 186445176c11c6d5506770e2be0e5d68d456b82d Author: Adam Dickmeiss Date: Fri Jun 12 15:27:59 1998 +0000 Minor change. commit d0276ba178f8bdd1ccad216d8b4ec9af832b0cf7 Author: Adam Dickmeiss Date: Fri Jun 12 12:22:11 1998 +0000 Work on Zebra API. commit 3b728a4683973b29bdb8eef0347cc79b01ff3e93 Author: Adam Dickmeiss Date: Fri Jun 12 12:21:53 1998 +0000 Fixed memory-leak. commit 066b33db71d0ad453bf0d53a3fa40a93ec9445e0 Author: Adam Dickmeiss Date: Thu Jun 11 15:42:20 1998 +0000 Changed the way use attributes are specified in the recordId specification. commit 7b60afe0622f8b757421f72cfa591f8be7b7d107 Author: Adam Dickmeiss Date: Thu Jun 11 15:41:06 1998 +0000 Minor changes. commit bbc5017bf20ab7e410b4913acd70816812b5059f Author: Adam Dickmeiss Date: Tue Jun 9 12:16:47 1998 +0000 Implemented auto-generation of CategoryList records. commit b7ca672b4bfacb1897e1da99563397826a8ac50b Author: Adam Dickmeiss Date: Mon Jun 8 15:26:06 1998 +0000 Minor changes. commit 48d26dcea283f57c49f77b82d6a987e41d775749 Author: Adam Dickmeiss Date: Mon Jun 8 14:43:09 1998 +0000 Added suport for EXPLAIN Proxy servers - added settings databasePath and explainDatabase to facilitate this. Increased maximum number of databases and attributes in one register. commit b63ec925e865fd55b560bac229b7eb23fd7da46e Author: Adam Dickmeiss Date: Mon Jun 8 14:40:44 1998 +0000 Fixed problem with signed character(s) in regular expressions. commit 8c63ceb6afdfcea5c1efbd716f75c99f18c77b5c Author: Adam Dickmeiss Date: Tue Jun 2 12:10:27 1998 +0000 Fixed bug related to attributeDetails. commit f3fb9ca751f7bca28706c951df4ea9d22106c6a8 Author: Adam Dickmeiss Date: Wed May 27 16:57:44 1998 +0000 Zebra returns surrogate diagnostic for single records when appropriate. commit 1a1ab19ff3d30e9bb5f26a2334b302dbe5227b67 Author: Adam Dickmeiss Date: Wed May 27 14:32:03 1998 +0000 Changed default block category layout. commit 165a8e98e1dd2d74a7e67742ef939cb47c86f947 Author: Adam Dickmeiss Date: Wed May 27 14:28:34 1998 +0000 Fixed bug in mf_write. 'Cap off' byte written at wrong offset. commit 85a2a0b28cb516d28ac70b7824f2b7d4b07e56ae Author: Adam Dickmeiss Date: Wed May 20 10:12:10 1998 +0000 Implemented automatic EXPLAIN database maintenance. Modified Zebra to work with ASN.1 compiled version of YAZ. commit a52e4b70e079601037de557b9a95c07f915f567a Author: Adam Dickmeiss Date: Wed May 20 10:00:35 1998 +0000 Fixed register spec so that colon isn't treated as size separator unless followed by [0-9+-] in order to allow DOS drive specifications. commit b6a6842040cf048cde4756b673fe47b4ae0ff9bc Author: Adam Dickmeiss Date: Sun Apr 26 11:37:46 1998 +0000 Updated Visual C++ project files. commit ac248aaee0b0be972370f6bab8e383302f3af6d3 Author: Adam Dickmeiss Date: Sun Apr 26 10:56:57 1998 +0000 Added include of string.h. commit 45708f1b509a55d335b7711d967071446bde4ecb Author: Adam Dickmeiss Date: Fri Apr 3 14:45:18 1998 +0000 Fixed setting of last_in_set in bend_fetch. commit 25476b7e1a0e7dbbe261a88fd7f14869aa27e237 Author: Adam Dickmeiss Date: Thu Apr 2 14:35:29 1998 +0000 First version of Zebra that works with compiled ASN.1. commit e9a1d4a77195ebba6dc3ddaf1b970958bb7e6a62 Author: Adam Dickmeiss Date: Wed Mar 25 13:48:02 1998 +0000 Fixed bug in rset_trunc_r. commit c6cadd4345e1c7081473afe2b3a0ce6b62664c4e Author: Adam Dickmeiss Date: Thu Mar 19 12:22:09 1998 +0000 Minor change. commit c0826c3b142ac40494080a5c45c42abbd8ffc3f8 Author: Adam Dickmeiss Date: Thu Mar 19 10:04:35 1998 +0000 Minor changes. commit f35acdb246c32bc8330fd77104f952711ad1bff5 Author: Adam Dickmeiss Date: Wed Mar 18 09:23:55 1998 +0000 Blocks are stored in chunks on free list - up to factor 2 in speed. Fixed bug that could occur in block category rearrangemen. commit cd0427111b705e414406e1e262f3772e40c7f662 Author: Adam Dickmeiss Date: Mon Mar 16 10:37:24 1998 +0000 Added more statistics. commit 801ef4b322574c793abdc1ba81dea2da62ca60bc Author: Adam Dickmeiss Date: Fri Mar 13 15:30:50 1998 +0000 New functions isc_block_used and isc_block_size. Fixed 'leak' in isc_alloc_block. commit 3c1fd34223220690747a11e43a2d5833a8e7e3f7 Author: Adam Dickmeiss Date: Wed Mar 11 11:19:04 1998 +0000 Changed the way sequence numbers are generated. commit 154c6dacd76fe573d1d6ee3bc7284a05f0445bc6 Author: Adam Dickmeiss Date: Wed Mar 11 11:18:18 1998 +0000 Changed the isc_merge to take into account the mfill (minimum-fill). commit df35d958902a7b9a7217a54def82f33c9b8c52ab Author: Adam Dickmeiss Date: Fri Mar 6 16:58:04 1998 +0000 Fixed bug which related to scanning of large indexes. commit 1d81c32c736b0b108f1739b25cd46efec0cec34c Author: Adam Dickmeiss Date: Fri Mar 6 13:54:02 1998 +0000 Fixed two nasty bugs in isc_merge. commit f1e7c832bcf4e2ecaaefc01a1cec1ba78e90dd12 Author: Adam Dickmeiss Date: Thu Mar 5 13:03:29 1998 +0000 Improved ranking. commit ce3907338568fce46c5751e7e1091a5ad1c8e291 Author: Adam Dickmeiss Date: Thu Mar 5 08:45:11 1998 +0000 New result set model and modular ranking system. Moved towards descent server API. System information stored as "SGML" records. commit 6eff7513e0c5f8c1bc43ffa22e063c7add0dc6f6 Author: Adam Dickmeiss Date: Thu Mar 5 08:42:44 1998 +0000 Minor changes to zebramap data structures. Query mapping rules changed. commit ec5e593725d0d141d2005c3fc11207bde70912e0 Author: Adam Dickmeiss Date: Thu Mar 5 08:41:31 1998 +0000 Minor changes. commit b306d131fe1c06ca1d313f3b04a159b4a3a376f9 Author: Adam Dickmeiss Date: Thu Mar 5 08:41:00 1998 +0000 Implemented rule contexts. commit d3c991bbc47dbfe568c6298118c9eea7e62ac36b Author: Adam Dickmeiss Date: Thu Mar 5 08:39:25 1998 +0000 Minor changes to zebramap data structures. Changed query mapping rules. commit 50cca4dc248badf5fc15bfd0e24efc02476e5697 Author: Adam Dickmeiss Date: Thu Mar 5 08:38:46 1998 +0000 New member recordSize in recRetrieveCtrl. commit 33b386a95c0aac273527d596ce1aafa0dc567b7b Author: Adam Dickmeiss Date: Thu Mar 5 08:36:27 1998 +0000 New result set model. commit 3db15cf883ad80b6a4b0e960f3c3b59c86b59c6b Author: Adam Dickmeiss Date: Thu Mar 5 08:17:24 1998 +0000 Added a few comments - no code changed. commit 247f1ebfc107315f1c0b2b59bb59fe4774f3b0d4 Author: Adam Dickmeiss Date: Tue Feb 17 10:32:51 1998 +0000 Fixed bug: binary files weren't opened with flag b on NT. commit e89f9552c15bc7f95c0495457a36ac45914fcb40 Author: Adam Dickmeiss Date: Tue Feb 17 10:31:33 1998 +0000 Fixed bug in zebraIndexUnlock. On NT, the lock files wasn't removed. commit 33befbaff1a6de9d3ec82c07f2ecbdac1c83960e Author: Adam Dickmeiss Date: Tue Feb 17 10:29:27 1998 +0000 Moved towards 'automatic' EXPLAIN database. commit 6b4542bc30184c89f99a732a93741d9dd66b8fae Author: Adam Dickmeiss Date: Tue Feb 10 16:39:15 1998 +0000 Minor change. commit 5c693d36af8be6f6642257160b3c6441d2e2d762 Author: Adam Dickmeiss Date: Tue Feb 10 12:03:04 1998 +0000 Implemented Sort. commit bfaff2a3d97a1980b3318fedf628222ebf1a7225 Author: Adam Dickmeiss Date: Tue Feb 10 11:56:46 1998 +0000 Implemented rset_dup. commit 0c819048d11d510e40ece7112ab4c95d8c7d86a9 Author: Adam Dickmeiss Date: Tue Feb 10 11:55:07 1998 +0000 Minor changes. commit 8b263fee83cd799947c93d4f83730380e199f209 Author: Adam Dickmeiss Date: Fri Jan 30 15:31:49 1998 +0000 Updated. commit 5828f224c2c886840471953aec1ddc1cec12a4ad Author: Adam Dickmeiss Date: Fri Jan 30 15:30:57 1998 +0000 Updated doc. commit 9b3f49d1b2ce69af8bc3b3dd656ce179ca65e8cd Author: Adam Dickmeiss Date: Fri Jan 30 09:41:15 1998 +0000 Updated documentation. commit dd19b67f25013bb26e6ff6a52ebddd5471f493dd Author: Adam Dickmeiss Date: Thu Jan 29 13:40:27 1998 +0000 Updated. commit 0c2c147590a99fba778d04dc3e695587b56f6961 Author: Adam Dickmeiss Date: Thu Jan 29 13:40:11 1998 +0000 Better logging for scan service. commit 3069523c17210f316ece638052eee94fce1db9e1 Author: Adam Dickmeiss Date: Thu Jan 29 13:39:13 1998 +0000 Compress ISAM is default. commit 6561129ee4916ac52934aed6f8a34e7cff84fd49 Author: Adam Dickmeiss Date: Thu Jan 29 13:38:17 1998 +0000 Fixed problem with mapping to record with unknown schema. commit 3d5a77c17f7b3ccfcf28059d0a2e0018869a5402 Author: Adam Dickmeiss Date: Thu Jan 29 13:36:01 1998 +0000 Structure word-list, free-form-text and document-text all trigger ranked search. commit 5b886a7358c16434d5c9f5f0d4af2f6e2e5d5c73 Author: Adam Dickmeiss Date: Thu Jan 29 13:35:11 1998 +0000 Updated doc. commit 96810973bbdcdec7019b22fc26aaffddac2cb70d Author: Adam Dickmeiss Date: Thu Jan 29 13:33:23 1998 +0000 Added README. commit 0cf23341b340ed13e308726b6ab3625299759b49 Author: Adam Dickmeiss Date: Thu Jan 29 13:33:04 1998 +0000 1.0b1. commit c7e9d9753aedacae07d8e68b47303ec3bcb5d2e2 Author: Adam Dickmeiss Date: Thu Jan 29 13:32:43 1998 +0000 New test directories. commit 98ef679b7434b0f25befe4e012ce3b309a4f4fd8 Author: Adam Dickmeiss Date: Mon Jan 26 10:37:57 1998 +0000 Better diagnostics. commit 73d50b4eee5d1af8aae0ba0f0e7fed7ebad2dd51 Author: Adam Dickmeiss Date: Mon Jan 26 10:37:34 1998 +0000 Minor changes. commit ed18ba9fff7e6a77b5f569e293ff3dda6d14ce49 Author: Adam Dickmeiss Date: Mon Jan 26 10:36:49 1998 +0000 Updated indexes. commit d91798e261f46d9ad10ce880c5174d7f9e9f3057 Author: Sebastian Hammer Date: Mon Jan 19 15:26:18 1998 +0000 Updated doc. commit bb761dd62f7718bb3040cd146ca5a2de40544cdf Author: Adam Dickmeiss Date: Mon Jan 12 15:04:31 1998 +0000 Removed exit - call. commit b8fb0cb30ffc1fb35a34608a27245dd091566bb9 Author: Adam Dickmeiss Date: Mon Jan 12 15:04:07 1998 +0000 The test option (-s) only uses read-lock (and not write lock). commit 04fba3ff986bf55dcaca1ef958f2b118e9a6832d Author: Adam Dickmeiss Date: Mon Jan 12 14:39:39 1998 +0000 Fixed bug in term_Tnode. commit d79f0901b184c1bcf383be8500aee3cfd197ca1d Author: Adam Dickmeiss Date: Wed Jan 7 13:53:41 1998 +0000 Queries using simple ranked operands returns right number of hits. commit 7344c78e86d875f0b99e7a45af392575c1be64a6 Author: Sebastian Hammer Date: Wed Jan 7 11:15:31 1998 +0000 *** empty log message *** commit 221024eb6b10e45d6479bb4154dd7de7fca1d477 Author: Adam Dickmeiss Date: Thu Dec 18 10:54:24 1997 +0000 New method result set method rs_hits that returns the number of hits in result-set (if known). The ranked result set returns real number of hits but only when not combined with other operands. commit 25928549b1b529f333fc3c0ed83adb08341c67ac Author: Adam Dickmeiss Date: Fri Dec 12 06:38:07 1997 +0000 Changed NETLIB to ELIBS as in YAZ. commit 2075a703d790d007244b7882f978490f2ff9c28b Author: Adam Dickmeiss Date: Fri Dec 12 06:37:53 1997 +0000 Fixed doc. commit b741825859991c0f7b5a717a2803ebab34463ce0 Author: Adam Dickmeiss Date: Fri Dec 12 06:33:58 1997 +0000 Fixed bug that showed up when multiple filter where used. Made one routine thread-safe. commit 2ae9406691467233fc7e48eed0cf7b920586d7ae Author: Adam Dickmeiss Date: Wed Nov 19 10:22:14 1997 +0000 Bug fix (introduced by previous commit). commit 195222aff7f9fa54caaef052c3fdd15f47f4703d Author: Adam Dickmeiss Date: Tue Nov 18 10:05:08 1997 +0000 Changed character map facility so that admin can specify character mapping files for each register type, w, p, etc. commit 68d94f14f5dc211c46689f33a9f61ad4682b8d0e Author: Adam Dickmeiss Date: Tue Nov 18 10:04:03 1997 +0000 Function res_trav returns number of 'hits'. commit f2abc18f818fb8ea926c60ec1accb370c20edc30 Author: Adam Dickmeiss Date: Tue Nov 18 10:03:24 1997 +0000 Member num_children removed from data1_node. commit 988d4b71d4f60465198a51a0f43d166815541040 Author: Adam Dickmeiss Date: Mon Nov 17 15:35:26 1997 +0000 Bug fix. Relation=relevance wasn't observed. commit 8b458130570103484319d3c2d6b8004cf5cf708e Author: Adam Dickmeiss Date: Thu Nov 6 11:41:00 1997 +0000 Implemented "begin variant" for the sgml.regx filter. commit 2443105a0f8ec46cff8e44e2f009ef2e5ab2f051 Author: Adam Dickmeiss Date: Fri Oct 31 12:40:49 1997 +0000 Fixed a few memory leaks. commit dd46dde2bd619572c2e5e0d5adc9b21668197872 Author: Adam Dickmeiss Date: Fri Oct 31 12:40:09 1997 +0000 Update MSVC project files. commit 9316ebeab370ca5ee115c7eaecbd195d5b92abe1 Author: Adam Dickmeiss Date: Fri Oct 31 12:39:30 1997 +0000 Changed log message. commit eaa8c71186392f0d2a1ab714dc6f3f0a4da71d03 Author: Adam Dickmeiss Date: Fri Oct 31 12:39:15 1997 +0000 Resouce name can be terminated with either white-space or colon. commit 74eec9c27962c38e3a6f0983f78adf7e9d7de0eb Author: Adam Dickmeiss Date: Fri Oct 31 12:38:12 1997 +0000 Bug fix: added missing xfree() call. commit b7942589b21cca1b6d44c7bf9446dcb6a5942953 Author: Adam Dickmeiss Date: Fri Oct 31 12:37:01 1997 +0000 Code calls xfree() instead of free(). commit 77405f9b10e80d5c0d08db19b299e9bf8d96387b Author: Adam Dickmeiss Date: Fri Oct 31 12:36:12 1997 +0000 Minor change that avoids compiler warning. commit 687f4b034335c161ed1b7b04275857c7fbc69211 Author: Adam Dickmeiss Date: Fri Oct 31 12:35:44 1997 +0000 Added a few log statements. commit ec874a59d0538f9eae969cf885e63f5ebda0f601 Author: Adam Dickmeiss Date: Fri Oct 31 12:34:43 1997 +0000 Changed a few log statements. commit 02e38d377742dae21e624d6fa1bf43c3940d9aac Author: Adam Dickmeiss Date: Fri Oct 31 12:34:27 1997 +0000 Bug fix: memory leak. commit b574e5f6216096ee5a5b32e1f96c95ab45f6679e Author: Adam Dickmeiss Date: Fri Oct 31 12:34:04 1997 +0000 Added missing nmem_init. commit 3679505d0d073f7db6425e597eb559b53e8c4827 Author: Adam Dickmeiss Date: Wed Oct 29 12:05:01 1997 +0000 Server produces diagnostic "Unsupported Attribute Set" when appropriate. commit 98fbc9a14c0e43976979db6bb1dd4d9bf32c6850 Author: Adam Dickmeiss Date: Wed Oct 29 12:02:47 1997 +0000 Added missing prototype. commit 00796628a5c7dec56efe81be9cf781bb98afc47d Author: Adam Dickmeiss Date: Wed Oct 29 12:02:22 1997 +0000 Using oid_ent_to_oid used instead of the non thread-safe oid_getoidbyent. commit 79a75f0b53cd07ea390a9da1e8c03d61d16a1819 Author: Adam Dickmeiss Date: Mon Oct 27 14:35:04 1997 +0000 New character mapping files. commit 42a51f164decd9a67018749836b40833b285162e Author: Adam Dickmeiss Date: Mon Oct 27 14:34:26 1997 +0000 Fixed bug - data1 root node wasn't tagged at all! commit 0b006645a0dbbd7a55d1ddcc1c2c57f83661479a Author: Adam Dickmeiss Date: Mon Oct 27 14:34:00 1997 +0000 Work on generic character mapping depending on "structure" field in abstract syntax file. commit 3d01abbe1238c82d62e4c01eb7cac760d3d53377 Author: Adam Dickmeiss Date: Mon Oct 27 14:33:03 1997 +0000 Moved towards generic character mapping depending on "structure" field in abstract syntax file. Fixed a few memory leaks. Fixed bug with negative integers when doing searches with relational operators. commit e4771c7fffc9d4e31c4245e8c5e090abd08eaad1 Author: Adam Dickmeiss Date: Mon Oct 27 14:27:59 1997 +0000 Fixed memory leak. commit 3c0459742097fa807b2927e4ae69e2ae4b5fbecd Author: Adam Dickmeiss Date: Mon Oct 27 14:27:13 1997 +0000 Minor changes. commit ac2780bc12c8c2fce4c5e2bfe4c4dbb58616b8e2 Author: Adam Dickmeiss Date: Mon Oct 27 14:25:38 1997 +0000 Fixed memory leaks. commit 28e11b3f5f2cee01a583300fb0438ca484380143 Author: Adam Dickmeiss Date: Wed Oct 1 11:44:06 1997 +0000 Small improvement of new ranking. commit c9ac021f1381269609f3654384698f398cf46b96 Author: Adam Dickmeiss Date: Mon Sep 29 12:41:35 1997 +0000 Fixed bug regarding USE_TIMES var. commit 067b55382bc9916b3f7dcd473512c703d4de4a5d Author: Adam Dickmeiss Date: Mon Sep 29 09:09:04 1997 +0000 Changes. commit e583a127856d4f363ff2ba7b4321bcc8c048edba Author: Adam Dickmeiss Date: Mon Sep 29 09:08:36 1997 +0000 Revised locking system to be thread safe for the server. commit 7324debd62e6d2ad57eef4e765cc252604026cd0 Author: Adam Dickmeiss Date: Mon Sep 29 09:07:29 1997 +0000 Minor change. commit 6f1d59535b020d95c6c8b20cc21f28ac1c192818 Author: Adam Dickmeiss Date: Mon Sep 29 09:06:41 1997 +0000 Removed static var to make this module thread safe. commit ce67ec8b9610a9a60c66b2d095f29314d9ee478a Author: Adam Dickmeiss Date: Mon Sep 29 09:06:10 1997 +0000 Removed one static var in order to make this module thread safe. commit d6a9b756bbc67a138ecea66eff5391e0c8947ac2 Author: Adam Dickmeiss Date: Mon Sep 29 09:05:17 1997 +0000 Thread safe DFA module. We simply had to put a few static vars to the DFA_parse structure. commit 64b67497bdb5bc74ba5d8247a5780a12c72ca07f Author: Adam Dickmeiss Date: Mon Sep 29 09:02:49 1997 +0000 Fixed small bug (introduced by previous commit). commit a6908b6d93de84a850a3e558a2e4c17f02c3d651 Author: Adam Dickmeiss Date: Thu Sep 25 14:57:23 1997 +0000 Windows NT port. commit 20663edc1f255a5cb9140239138a69e3b76b25a4 Author: Adam Dickmeiss Date: Thu Sep 25 14:57:08 1997 +0000 Added string.h. commit f6a21cd1386a2378990aa0a91a1536d2368326da Author: Adam Dickmeiss Date: Thu Sep 25 14:56:51 1997 +0000 Windows NT interface code to the stat call. commit 9e9e990b7088cf47ef2a435174c0c014386ede31 Author: Adam Dickmeiss Date: Thu Sep 25 14:55:52 1997 +0000 Minor changes. commit db99c7ca72f89121e1c8d7d6b8f72f3c5b4533a1 Author: Adam Dickmeiss Date: Thu Sep 25 14:55:33 1997 +0000 Windows port uses stat and not lstat. commit c5ef994b26d692fbfecc3ac97f69e4bf7bd0fcea Author: Adam Dickmeiss Date: Thu Sep 25 14:54:43 1997 +0000 WIN32 files lock support. commit 54f2027610e84e1912a4964e4b6bd339042b1127 Author: Adam Dickmeiss Date: Thu Sep 25 14:53:24 1997 +0000 New VC 5 project files using MULTI Threaded DLL standard libs. commit 572c7a6871dba771a900949b612762442abe46ff Author: Adam Dickmeiss Date: Wed Sep 24 13:36:51 1997 +0000 *** empty log message *** commit 27f033269b7e8a800cba8d1192506695d21a3b00 Author: Adam Dickmeiss Date: Wed Sep 24 13:36:41 1997 +0000 More work on new ranking algorithm. commit b0728a451f81973f750f6a806b566d506a17dbe9 Author: Adam Dickmeiss Date: Mon Sep 22 12:39:06 1997 +0000 Added get_pos method for the ranked result sets. commit fd12cf9b8e16c109f3c0f7aedb0e0efd65209e16 Author: Adam Dickmeiss Date: Thu Sep 18 08:59:16 1997 +0000 Extra generic handle for the character mapping routines. commit b9093505b17a074e79137ed64595c8269f77d330 Author: Adam Dickmeiss Date: Wed Sep 17 12:19:05 1997 +0000 Zebra version corresponds to YAZ version 1.4. Changed Zebra server so that it doesn't depend on global common_resource. commit 5f8ba9f35bd3c9aeafe26613021f2edd141b8611 Author: Adam Dickmeiss Date: Tue Sep 9 13:37:52 1997 +0000 Partial port to WIN95/NT. commit c9c9b6ebd2eb395472c741944831ee0796d574dd Author: Adam Dickmeiss Date: Tue Sep 9 13:37:27 1997 +0000 Added MSV5.0 project files. commit c0c85097014e5b007075ab71d9b5bee412e28dd5 Author: Adam Dickmeiss Date: Fri Sep 5 15:29:57 1997 +0000 Changed prototype for chr_map_input - added const. Added support for C++, headers uses extern "C" for public definitions. commit de4ada45ce039553f8322e620cc047d8cf4a065e Author: Adam Dickmeiss Date: Fri Sep 5 09:52:31 1997 +0000 Extra argument added to function chr_read_maptab (tab path). commit 2ff1b56a4ff7022b426d4e36ec7d544f22fe7b87 Author: Adam Dickmeiss Date: Thu Sep 4 13:59:27 1997 +0000 Minor changes. commit b8f7371095d3714a3061a87f4107c7def22377c5 Author: Adam Dickmeiss Date: Thu Sep 4 13:58:36 1997 +0000 New retrieve/extract method tellf (added). Added O_BINARY for open calls. commit 2954746ef5c897ec5e651cc2c39eda878f1d5da5 Author: Adam Dickmeiss Date: Thu Sep 4 13:57:39 1997 +0000 Added O_BINARY for open calls. commit 0ca8a9894b43c838980d650dd265f7a3da4ed219 Author: Adam Dickmeiss Date: Thu Sep 4 13:57:20 1997 +0000 New file extract/retrieve method tellf (added). Added O_BINARY for open calls. commit dfd70c0272aeab51b5a7f06bb58c1975fd097439 Author: Adam Dickmeiss Date: Thu Sep 4 13:56:39 1997 +0000 Added O_BINARY to open calls. commit 18689333339cd8c6039e1f8877eca72b891f5c38 Author: Adam Dickmeiss Date: Thu Sep 4 13:56:15 1997 +0000 Added new filter grs.marc. where refers to abstract syntax. New method tellf in extract/retrieve control block. commit 1f793b6c2f61fd47c7a26c0274f0c7e6ab9d1a07 Author: Adam Dickmeiss Date: Thu Sep 4 13:54:39 1997 +0000 Added MARC filter - type grs.marc. where syntax refers to abstract syntax. New method tellf in retrieve/extract method. commit 95ca8a80ef40beb756f3012c76abcec34ed19d40 Author: Adam Dickmeiss Date: Mon Jul 28 08:30:47 1997 +0000 Server returns diagnostic 14 when record doesn't exist. commit 3e8c552017711447703c5841d88ee4a2adce691a Author: Adam Dickmeiss Date: Tue Jul 15 16:33:07 1997 +0000 Check for zero length in execData. commit 3b0bd1aac42b5a96187b4d45af5230a2bf14fd10 Author: Adam Dickmeiss Date: Tue Jul 15 16:32:29 1997 +0000 Bug fix: Match handler didn't terminate the resulting string! commit 27efd5b3932a53f250920887cbf446ee58eb5c51 Author: Adam Dickmeiss Date: Tue Jul 15 16:29:03 1997 +0000 Initialized dummy variable to keep checker gcc happy. commit edf09fc5529eae3e8214a432058b4c07b2b8d2f9 Author: Adam Dickmeiss Date: Tue Jul 15 16:28:41 1997 +0000 Bug fix: storeData didn't work with files with multiple records. Bug fix: fixed memory management with records; not really well thought through. commit 151f14593b5b81be4a65f64e402a73023d9b0022 Author: Adam Dickmeiss Date: Tue Jul 1 13:01:08 1997 +0000 Bug fix in routine find_entry: didn't take into account the len arg. commit 80eac939036e614a3c09c84b85569b9318da5288 Author: Adam Dickmeiss Date: Tue Jul 1 13:00:42 1997 +0000 Bug fix in routine searchRecordKey: uninitialized variables. commit 9b426aeb9256cef844693c13f38aba4b10f7056d Author: Sebastian Hammer Date: Wed Apr 30 08:56:04 1997 +0000 null commit 30c13aff20c90ba746c40c7ab85b9460faac2c48 Author: Adam Dickmeiss Date: Tue Apr 29 09:26:03 1997 +0000 Bug fix: generic recordId handling didn't work for compressed internal keys. commit 1dfe489f2357b1694bb5dd2168485230190cf17b Author: Adam Dickmeiss Date: Mon Feb 24 10:41:50 1997 +0000 Cleanup of code and commented out the "end element-end-record" code. commit c2ddc41a3fa404e257e4d828fa13b69b4a0d5fe5 Author: Adam Dickmeiss Date: Mon Feb 24 10:39:39 1997 +0000 Temporarily removed the "end-element" to auto "end record" code. commit 0178f4d569300f64162b53e0cd10d413c7b7cd99 Author: Adam Dickmeiss Date: Wed Feb 19 16:22:33 1997 +0000 Fixed "end element" to terminate record in outer-most level. commit 4761eb8c7f59142020d60e68127a159e9ad4ef55 Author: Adam Dickmeiss Date: Wed Feb 19 16:22:21 1997 +0000 Fixed NETLIBS variable in Makefile. Fixed "end element" to terminate record in outer-most level. commit 0c6fde4c161e2a2d8716cea7089148317bbcbefd Author: Adam Dickmeiss Date: Wed Feb 12 20:45:21 1997 +0000 Internal release. commit 7ec2e4ca8ae514ec3cd94845c5caaa87a113482b Author: Adam Dickmeiss Date: Wed Feb 12 20:42:58 1997 +0000 Changed some log messages. commit 5a4211916c8b14d4b0ec9cc717e613b88394affb Author: Adam Dickmeiss Date: Wed Feb 12 20:42:43 1997 +0000 Bug fix: during isc_merge operations, some pages weren't marked dirty even though they should be. At this point the merge operation marks a page dirty if the previous page changed at all. A better approach is to mark it dirty if the last key written changed in previous page. commit 9167923869bcb07faf7e357c883f070be098c66e Author: Adam Dickmeiss Date: Wed Feb 12 20:39:45 1997 +0000 Implemented options -f that limits the log to the first records. Changed some log messages also. commit 2a2f94560670aad22d976bd986ca67ec891aac28 Author: Adam Dickmeiss Date: Wed Feb 12 20:37:17 1997 +0000 Changed the messages logged. No real code changed. commit ebebe9d285d8183365ae942719c87baf19677e70 Author: Adam Dickmeiss Date: Wed Feb 12 20:36:55 1997 +0000 Changes. commit 09a0d0a11c4183513c11c5a570a7d51dba618d0c Author: Adam Dickmeiss Date: Mon Feb 10 10:21:14 1997 +0000 Bug fix: in search terms character (^) wasn't observed. commit 87e6195e30805568aae3d2071047a8ba6ae5b760 Author: Adam Dickmeiss Date: Mon Feb 10 10:20:13 1997 +0000 Flag fileVerboseFlag set to 0 (default). commit de50782bd265b584f1e7c14f5376a499dedea780 Author: Adam Dickmeiss Date: Mon Feb 10 10:19:20 1997 +0000 Added facility for open character sets, eg [a-]. commit af7bc27d33843a8e667022f24589450c39f907f2 Author: Adam Dickmeiss Date: Fri Jan 31 11:10:34 1997 +0000 Bug fix: Leading and trailing white space weren't removed in scan tokens. commit 9cf5dedda26c0ebaf38daa6fa3f15a763d6b2fcb Author: Adam Dickmeiss Date: Fri Jan 17 11:31:40 1997 +0000 Bug fix: complete phrase search didn't work. commit 7cf4e149027f602723f729b8a3b8601833232021 Author: Adam Dickmeiss Date: Thu Jan 2 12:05:01 1997 +0000 Merge. commit b65a198dd944f9e3f4bd6d660d4a7f5d260a60bc Author: Sebastian Hammer Date: Thu Jan 2 10:49:27 1997 +0000 Added optional, physical ANY commit 70961362d71c04daaf0b0feafe59e78d235eb116 Author: Adam Dickmeiss Date: Mon Dec 23 15:30:49 1996 +0000 Work on truncation. commit 75a4bfb9aee40405a751320769d74fd890f2c0b4 Author: Adam Dickmeiss Date: Mon Dec 23 15:30:44 1996 +0000 Work on truncation. Bug fix: result sets weren't deleted after server shut down. commit 2d223d4bb4e25e45905009f71e21624604388cb3 Author: Adam Dickmeiss Date: Mon Dec 23 15:29:54 1996 +0000 More work on truncation algorithm. commit 0fd96d50259bb7aa12636180add7c40ba4f5fc60 Author: Adam Dickmeiss Date: Mon Dec 23 15:29:42 1996 +0000 Work. commit 5d20c4e9f612a012313370c82dc8481b9f19d5df Author: Adam Dickmeiss Date: Fri Dec 20 11:07:20 1996 +0000 Implemented Multi-or result set. commit a18ad7925f7e7440b36c2ec29eb991c0c377d532 Author: Adam Dickmeiss Date: Fri Dec 20 11:07:14 1996 +0000 Multi-or result set. commit 01d003d2633f2c160e255737ae63165effaf2dde Author: Adam Dickmeiss Date: Fri Dec 20 11:06:36 1996 +0000 Implemented multi-or result set. commit ebb67760aea966de2e476018400f7449bc6f2ae8 Author: Adam Dickmeiss Date: Wed Dec 11 12:08:00 1996 +0000 Added better compression. commit 8b6b24d02231b0c3960e9d0ab36aefed80783610 Author: Adam Dickmeiss Date: Wed Dec 11 12:07:45 1996 +0000 Added doc about how queries are handled. commit 649f3373ebd781ae2f7f4a592230a3a49a6d33df Author: Adam Dickmeiss Date: Fri Nov 15 15:03:58 1996 +0000 Logging of execution speed by using the times(2) call. commit 9aff3a4c1cf25ef7fd0b93cfa650d31eb736cbc9 Author: Adam Dickmeiss Date: Fri Nov 15 15:02:14 1996 +0000 Minor changes regarding logging. commit 006237a33041ba329aa1ce4b6bb9d7c7499a5fd1 Author: Adam Dickmeiss Date: Thu Nov 14 09:52:21 1996 +0000 Strings in record keys bound by IT_MAX_WORD. commit 8a10428f21d9a1c308a85eae620d2de8c7765577 Author: Adam Dickmeiss Date: Thu Nov 14 08:57:46 1996 +0000 Reduction of storeKeys area. commit eed3cdbd136db8f184cbb30a9ad02539cb1a6eea Author: Adam Dickmeiss Date: Mon Nov 11 13:37:42 1996 +0000 Added proximity support in search. commit 543fcf12c500813da5f2da099eb773852fb2bdc0 Author: Adam Dickmeiss Date: Fri Nov 8 14:17:24 1996 +0000 More doc. commit e769baa9d142649c877f59f40af17b27b401ef2a Author: Adam Dickmeiss Date: Fri Nov 8 14:05:33 1996 +0000 Bug fix: data1 node member u.tag.get_bytes weren't initialized. commit 82bdd90d99e036b5c491666b5be5471c59f8e1b8 Author: Adam Dickmeiss Date: Fri Nov 8 11:15:57 1996 +0000 Compressed isam fully supported. commit 7af74fb4a98eb4baeffb6a1a648e837563fe7b4f Author: Adam Dickmeiss Date: Fri Nov 8 11:15:28 1996 +0000 Number of keys in chain are stored in first block and the function to retrieve this information, isc_pp_num is implemented. commit 0b5d38bc84d5261aaed3bce3be748c5d7008f2ff Author: Adam Dickmeiss Date: Fri Nov 8 11:10:13 1996 +0000 Buffers used during file match got bigger. Compressed ISAM support everywhere. Bug fixes regarding masking characters in queries. Redesigned Regexp-2 queries. commit b164e0eb750ec0a6077e0fc1960dc1f12a790661 Author: Adam Dickmeiss Date: Fri Nov 8 11:08:01 1996 +0000 New internal release. commit 591eae620501c3711dd509aaaac7d27912233919 Author: Adam Dickmeiss Date: Fri Nov 8 11:07:33 1996 +0000 Wrote some doc about Search. commit 9c83011e3d6c2845e174a548735720f95b20e3fc Author: Adam Dickmeiss Date: Fri Nov 8 11:07:05 1996 +0000 More work. commit db4634a724c423fc5d2facda6e9e11d959c13617 Author: Adam Dickmeiss Date: Mon Nov 4 14:09:16 1996 +0000 Minor changes. commit 16153aaaa1fcb0881ff7e3056bd9c991fcf57c29 Author: Adam Dickmeiss Date: Mon Nov 4 14:08:55 1996 +0000 Optimized free block usage. commit 0ac0f444414651f31406b227b64a447fd324ac4a Author: Adam Dickmeiss Date: Mon Nov 4 14:07:39 1996 +0000 Moved truncation code to trunc.c. commit 7107ed62f445c83a9c79b375158442f6b03f3ce6 Author: Adam Dickmeiss Date: Fri Nov 1 13:36:46 1996 +0000 New element, max_blocks_mem, that control how many blocks of max size to store in memory during isc_merge. Function isc_merge now ignoreds delete/update of identical keys and the proper blocks are then non-dirty and not written in flush_blocks. commit bbe002446a766b4697fa40a9210634dc4c06755e Author: Adam Dickmeiss Date: Fri Nov 1 13:35:03 1996 +0000 New element, max_blocks_mem, that control how many blocks of max size to store in memory during isc_merge. commit 6ccabd72334e17c9621a73b1b50469d2a89030c9 Author: Adam Dickmeiss Date: Fri Nov 1 09:00:33 1996 +0000 This simple "text" format now supports element specs B and M. commit 3d65c1cdc034161b511510acda8777afdb41cf56 Author: Adam Dickmeiss Date: Fri Nov 1 08:59:11 1996 +0000 First version of isc_merge that supports update/delete. commit f0dbdd21e0227559e4407a5e25ce3ead47ede825 Author: Adam Dickmeiss Date: Fri Nov 1 08:58:41 1996 +0000 Interface to isamc system now includes update and delete. commit df933f159390cf6f221af93740dcdc943fff6de2 Author: Adam Dickmeiss Date: Tue Oct 29 16:44:56 1996 +0000 Work on isc_merge. commit 79eae30cc8f83e0c4c1044bf4d27924c5e935f1e Author: Adam Dickmeiss Date: Tue Oct 29 16:44:42 1996 +0000 Added isc_type, isc_block macros. commit 2f19e1d09666a88da5680a7dbbdc705db9a38215 Author: Adam Dickmeiss Date: Tue Oct 29 14:12:09 1996 +0000 Update. isamc system incorporated. commit c55a1b30ba82e0343574574da5481cac2735a82b Author: Adam Dickmeiss Date: Tue Oct 29 14:11:17 1996 +0000 Updated doc. commit 45554249f7785e31125a062dc410a93ef693f574 Author: Adam Dickmeiss Date: Tue Oct 29 14:09:36 1996 +0000 Use of cisam system - enabled if setting isamc is 1. commit 74441b6e65b2b60480b5b01e265f0472f048f6fe Author: Adam Dickmeiss Date: Tue Oct 29 14:08:13 1996 +0000 Uses resource lockDir instead of lockPath. commit c325477904a47c61586ad9b756b9280c22351c6b Author: Adam Dickmeiss Date: Tue Oct 29 14:03:16 1996 +0000 Include zebrautl.h instead of alexutil.h. commit 94ad502634fd97a08c4af0731eb3eddca13a3691 Author: Adam Dickmeiss Date: Tue Oct 29 14:02:45 1996 +0000 Uses buffered read to speed up things. commit 80bc3ce27ae1f6e17e993274c8eed047686bae5b Author: Adam Dickmeiss Date: Tue Oct 29 14:02:09 1996 +0000 Doesn't use the global data1_tabpath (from YAZ). Instead the function data1_get_tabpath is used. commit c3950f70c647c6726ab2d5d49506f3ff4948888c Author: Adam Dickmeiss Date: Tue Oct 29 14:00:00 1996 +0000 Page size given by DICT_DEFAULT_PAGESIZE in dict.h. commit e127268c91736bf5a116cbc24653da4b845ca046 Author: Adam Dickmeiss Date: Tue Oct 29 13:55:18 1996 +0000 Include of zebrautl.h instead of alexutil.h. commit 577183a6c1003ca21fe46416c49f4458ff7af716 Author: Adam Dickmeiss Date: Tue Oct 29 13:54:52 1996 +0000 Changed name of setting tempSetDir to setTmpDir. commit 659af456d07b957cbf9ef9d94e079adf88364bc7 Author: Adam Dickmeiss Date: Tue Oct 29 13:48:13 1996 +0000 Updated to use zebrautl.h instead of alexutil.h. commit 3e8be1519166498594f00dc76671cb28d0b0ec4a Author: Adam Dickmeiss Date: Tue Oct 29 13:47:49 1996 +0000 Implemented res_get_match. Updated to use zebrautl instead of alexpath. commit 231ae24dce5e113aab05f17deb60344957d3622a Author: Adam Dickmeiss Date: Tue Oct 29 13:46:10 1996 +0000 Removed obsolete headers alexpath, alexutil. Created zebrautl.h as a replacement. commit eee8870c6ae6e22f98a15e0b47626a8698d0e0da Author: Adam Dickmeiss Date: Tue Oct 29 13:45:33 1996 +0000 Changed definition of DICT_DEFAULT_PAGESIZE. commit dfa13dd254b1bf22ec57973b3465cd64eafd479c Author: Adam Dickmeiss Date: Tue Oct 29 13:44:12 1996 +0000 Added res_get_match. commit 3244991731d8dfe3c48d129467b3b4f8a69cacab Author: Adam Dickmeiss Date: Tue Oct 29 13:43:44 1996 +0000 Removed definition of SYSNO. commit 4b748c85825d964add98d53b85b4f01292cef4b4 Author: Adam Dickmeiss Date: Tue Oct 29 13:43:07 1996 +0000 Added a few comments. commit 7905afa0cdbee2d751d058bda53919746361dda2 Author: Adam Dickmeiss Date: Tue Oct 29 13:41:33 1996 +0000 First use of isamc. commit 932697e4b6d6dd00a210b84b285bd8c0000f379f Author: Adam Dickmeiss Date: Tue Oct 29 13:40:37 1996 +0000 First work. commit a5b96cb157ceec819f6f53d91176123c33d4dd5d Author: Adam Dickmeiss Date: Fri Oct 18 12:39:23 1996 +0000 Uses LOG_DEBUG instead of LOG_WARN for "Character map overlap". commit 3306f42fca660929b71139a38599c7e992c56451 Author: Adam Dickmeiss Date: Fri Oct 18 12:38:22 1996 +0000 New internal release. commit 1cdd84e7d045f28abfbca5a76712f1c9b8475809 Author: Adam Dickmeiss Date: Fri Oct 18 12:37:24 1996 +0000 Updated doc about new record type specification. commit 480e25e5ac6c8a9b3342f491a8d255e9236de7df Author: Adam Dickmeiss Date: Fri Oct 18 12:37:05 1996 +0000 Release for the NWI folks. commit 02cb90fd537c2e5aba82b28fbb2a25e92a5e2f29 Author: Sebastian Hammer Date: Fri Oct 11 16:17:28 1996 +0000 Work. commit 42143dd8393ba4fbad62289dcff47b150c1f4be5 Author: Sebastian Hammer Date: Fri Oct 11 16:06:43 1996 +0000 Fixed arguments to nodetogr commit 7332bdbc19cd0f8c88d7f4e38ffaae076c9a0a81 Author: Adam Dickmeiss Date: Fri Oct 11 10:56:58 1996 +0000 New module recctrl. Used to manage records (extract/retrieval). Several files have been moved to the recctrl sub directory. commit bf52d699af06165384b2dfd74a1848bf529ed600 Author: Adam Dickmeiss Date: Fri Oct 11 10:56:25 1996 +0000 New module recctrl. Used to manage records (extract/retrieval). All record types are accessed by means of definitions in recctrl.h. commit 1300c402a9ecc32b470a7db96c0d93172ed1cf25 Author: Adam Dickmeiss Date: Fri Oct 11 10:54:52 1996 +0000 New module recctrl. Used to manage records (extract/retrieval). commit f671b6881c99082e63161c46b254d15ca9a72f22 Author: Adam Dickmeiss Date: Tue Oct 8 13:00:40 1996 +0000 Bug fix: result sets with ranked operands in boolean operations weren't sorted. commit 5a81e9f43740743803c6550ea187980822d71f9c Author: Adam Dickmeiss Date: Tue Oct 8 12:59:17 1996 +0000 Bug fix: result sets with ranked operands weren't sorted. commit e3dc42abdcff3ad1c811b84ac24db0597b5b1826 Author: Sebastian Hammer Date: Tue Oct 8 09:41:25 1996 +0000 Fixed diagnostic. commit a99f6aeb70a32e98287105df3c697dde9d839546 Author: Sebastian Hammer Date: Mon Oct 7 16:05:29 1996 +0000 Work. commit bf1f271315a6acfd52d8d7abf1aee2e0502bdbf2 Author: Adam Dickmeiss Date: Wed Jun 26 09:21:43 1996 +0000 Bug fix: local attribute set wasn't obeyed in scan. commit 3ab71b2226048d75d931a5f6c740ca219ef2240d Author: Adam Dickmeiss Date: Mon Jun 17 14:26:20 1996 +0000 Function gen_regular_rel changed to handle negative numbers. commit 239ec8f8cc9194097025c4b00d2ac0b0514dcf49 Author: Adam Dickmeiss Date: Mon Jun 17 14:24:08 1996 +0000 Bug fix: read_charset didn't handle character mapping. commit 80eb0a73f541530f383715296203036b3adbacc2 Author: Sebastian Hammer Date: Tue Jun 11 10:54:15 1996 +0000 Relevance work commit ae180d691c051115ecfe15192cff4f9c1ff5f4bb Author: Sebastian Hammer Date: Tue Jun 11 10:53:55 1996 +0000 Work commit c633dc31e974f0c8b375729c0a850ac18adb68f8 Author: Sebastian Hammer Date: Tue Jun 11 10:53:16 1996 +0000 Relevance work. commit 98af666ffbc85555b29f9885974c53ceab97fa15 Author: Adam Dickmeiss Date: Fri Jun 7 08:51:53 1996 +0000 Bug fix: Character mapping was broken (introducued by last revision). commit c15792ddc302d81e8a2878ec0d11ce195bc20c26 Author: Sebastian Hammer Date: Thu Jun 6 13:30:08 1996 +0000 Work commit 3966308c8ea8605dd854790096a15d1c0a79e6a6 Author: Sebastian Hammer Date: Thu Jun 6 12:08:56 1996 +0000 Fixed bug. commit 70d1a2d88311930a7a8d4b249d5894ec30204100 Author: Sebastian Hammer Date: Thu Jun 6 12:08:53 1996 +0000 *** empty log message *** commit 6d413b57ed0b37bede3ec825bcc2fbf1a3c94df5 Author: Sebastian Hammer Date: Thu Jun 6 12:08:37 1996 +0000 Added showRecord function commit a84a0e3f9c33484b80679f5f4535a8fdee9995e5 Author: Sebastian Hammer Date: Thu Jun 6 12:08:16 1996 +0000 Added showRecord Group entry commit c5ae7c0234530d9c3c907383583cd156ed45628d Author: Sebastian Hammer Date: Tue Jun 4 14:56:12 1996 +0000 Fix commit b8844c65622c12fb105bf7fc6bab2fc237af7c14 Author: Sebastian Hammer Date: Tue Jun 4 14:18:52 1996 +0000 Charmap work commit cb1317543281a64aeb8b389d5cdfffa5bb2cde90 Author: Sebastian Hammer Date: Tue Jun 4 13:28:00 1996 +0000 More work on charmapping commit 7ed12b6cc4a492d6062dd56bb1ebc49c9bc75b4a Author: Adam Dickmeiss Date: Tue Jun 4 10:20:02 1996 +0000 Added support for character mapping. commit f4c557cfebb4fa779a858c7d305081d4d92578da Author: Adam Dickmeiss Date: Tue Jun 4 10:18:58 1996 +0000 Minor changes - removed include of ctype.h. commit 3f05d9800b0d3b0acc2fcf9b90b71e630d09a90d Author: Adam Dickmeiss Date: Tue Jun 4 10:18:11 1996 +0000 Search/scan uses character mapping module. commit 534a95f238f1c78d76a9be7186c67a08754125d7 Author: Sebastian Hammer Date: Tue Jun 4 08:32:15 1996 +0000 Moved default keymap to keychars.c commit 1d373480854a095d4f3c0a47d6eecef6975e8e61 Author: Sebastian Hammer Date: Tue Jun 4 08:21:13 1996 +0000 Work commit 14141c6ce46edf228f26c1bffef0809933b7735c Author: Sebastian Hammer Date: Tue Jun 4 08:20:16 1996 +0000 Smallish commit efbe45e46b5d995dda0753bb0d6d1b6842918fd6 Author: Sebastian Hammer Date: Tue Jun 4 07:54:55 1996 +0000 Added output-map. commit 26b8ff30091b8d7c27cc38de45af595acb0445bf Author: Sebastian Hammer Date: Mon Jun 3 16:32:13 1996 +0000 Temporary bug-fix commit 7247993b5d35aa9c8f249f6340bc59d87a1f08cd Author: Sebastian Hammer Date: Mon Jun 3 15:17:46 1996 +0000 Fixed bug. commit 02badd97d306cbe29a3d0597650fe67015ed3061 Author: Sebastian Hammer Date: Mon Jun 3 10:15:09 1996 +0000 Fixed bug in mapping function. commit 8e3453044933e1ba76fbab75449f625731da3a6b Author: Sebastian Hammer Date: Fri May 31 09:07:54 1996 +0000 Work on character-sets commit 003ed9e50b40a26c54bf79cab71bd26f7957b870 Author: Sebastian Hammer Date: Fri May 31 09:06:57 1996 +0000 Work on character-set handling commit 3c959bd2d43fa0a5d707895a742d7b9b8779ba21 Author: Adam Dickmeiss Date: Tue May 28 15:15:01 1996 +0000 Bug fix: Didn't handle unknown database correctly. commit 3eb26862c3e82f9332c75c9c560f1044f80bc778 Author: Adam Dickmeiss Date: Fri May 24 14:46:04 1996 +0000 Added dict_grep_cmap function to define user-mapping in grep lookups. commit 19b3a576969e77f965d0d2c915b40821db2aa265 Author: Adam Dickmeiss Date: Wed May 22 08:26:36 1996 +0000 Removed CFLAGS definition. commit 2515cda2053e7c10f10cae7bfc7c5a1fd97b1807 Author: Adam Dickmeiss Date: Wed May 22 08:25:56 1996 +0000 Minor change. commit 252d2081a943e847418dc677a4b95ebb2244ce4a Author: Adam Dickmeiss Date: Wed May 22 08:23:41 1996 +0000 Bug fix: trailing blanks in resource values where not removed. commit febdebf04b0c264efce4a58d602117f4a7f7fbdb Author: Adam Dickmeiss Date: Wed May 22 08:21:59 1996 +0000 Added public ZebDatabaseInfo structure. commit e1f85310e64f96f4f4878b36e313786b8c63a512 Author: Sebastian Hammer Date: Thu May 16 15:31:04 1996 +0000 a7 commit e8acd5b751eb2e7e7fc0470309185984406f561b Author: Adam Dickmeiss Date: Wed May 15 18:36:28 1996 +0000 Function trans_term transforms unsearchable characters to blanks. commit 82e1d75fa903fa0380a4416b8d87ec898324b820 Author: Adam Dickmeiss Date: Wed May 15 18:35:17 1996 +0000 Implemented snot operation. commit 37a0daf2cf9d12c9b62fce9975e56bc86bc858b2 Author: Adam Dickmeiss Date: Wed May 15 11:58:18 1996 +0000 Changed some log messages. commit 4fc8ef20b8a1d0ceb0d414c64d315437c881a471 Author: Adam Dickmeiss Date: Wed May 15 11:57:56 1996 +0000 Fixed bug introduced by set/field mapping in search operations. commit dbfa7d133bf33952be14064ac98b37674f9d717b Author: Adam Dickmeiss Date: Tue May 14 15:49:09 1996 +0000 Bug fix: In function split_page. In rare cases variable best_indxp was referenced. commit 399fde9960e03d0f0584d5374cf32cfadd8befd2 Author: Adam Dickmeiss Date: Tue May 14 15:47:07 1996 +0000 Cleanup of various buffer size entities. commit 4c6c27a5098e5fd9425051ef97f98e898c098a20 Author: Adam Dickmeiss Date: Tue May 14 14:04:33 1996 +0000 In zebraidx, the 'stat' command is improved. Statistics about ISAM/DICT is collected. commit 3fb2ce9f740725e9e36d35f9dcb15b52edbe475f Author: Sebastian Hammer Date: Tue May 14 12:10:16 1996 +0000 Bad areadef scan commit 4cff781d858d8eafd2d10e7877a47a2ee4949be7 Author: Adam Dickmeiss Date: Tue May 14 11:34:16 1996 +0000 Minor changes. commit 172e2b480354c7e44a50c654f09b8ab35f245f45 Author: Adam Dickmeiss Date: Tue May 14 11:34:00 1996 +0000 Scan support in multiple registers/databases. commit c332d3fe0ad55f5dbf6705ece399eaf8a7e9ac96 Author: Adam Dickmeiss Date: Tue May 14 11:33:40 1996 +0000 MEMDEBUG turned off by default. commit 276a6af7f9d8ef0ef2ffc3f25e639be148ca2c7c Author: Adam Dickmeiss Date: Tue May 14 11:33:22 1996 +0000 Added doc. commit 4e45c8e2e01c52e8d03dbd9a0873a9e2ff7e5f91 Author: Adam Dickmeiss Date: Tue May 14 06:16:35 1996 +0000 Compact use/set bytes used in search service. commit bad279c5dd1ae783ef9393775f0483cc3228cdbb Author: Adam Dickmeiss Date: Mon May 13 14:23:03 1996 +0000 Work on compaction of set/use bytes in dictionary. commit 1fbe87dfa2e2876af6c2771503f2b070fecb340f Author: Sebastian Hammer Date: Mon May 13 13:25:51 1996 +0000 Work. commit 3c4ef0d7b419130f790f24b8d390c561e70be36a Author: Sebastian Hammer Date: Mon May 13 12:07:21 1996 +0000 Added end record marker commit 904e4c7a5d970ba391aa80ddd9584f23e921a72f Author: Sebastian Hammer Date: Mon May 13 10:20:17 1996 +0000 Work. commit 82311dccccd49f72dc33e5756ea5a5c662b258e1 Author: Sebastian Hammer Date: Thu May 9 09:59:57 1996 +0000 Work commit e2c9631b12b78533d94ec74ee714a5b46c117600 Author: Sebastian Hammer Date: Thu May 9 09:59:42 1996 +0000 New GILS doc. commit f4cbc977eb069dcf24da9aa782c4049865cc41fd Author: Adam Dickmeiss Date: Thu May 9 09:54:42 1996 +0000 Server supports maps from one logical attributes to a list of physical attributes. The extraction process doesn't make space consuming 'any' keys. commit 1cd8e47d53d94462ab3a96f01ab200222004b901 Author: Sebastian Hammer Date: Thu May 9 07:28:49 1996 +0000 Work towards phrases and multiple registers commit e73d8ded31632a4003f2e898e7babf244f23e768 Author: Sebastian Hammer Date: Tue May 7 12:29:35 1996 +0000 Work. commit 09638ed93bcc8c8b385d899232bec0b007158dd7 Author: Sebastian Hammer Date: Tue May 7 11:19:13 1996 +0000 First version commit da4a8f59cab60996df2a7470f58f7c8fac46ec06 Author: Adam Dickmeiss Date: Wed May 1 13:46:51 1996 +0000 Mail filter. commit 99e4ce02beb2ea748b9970ef35fe8834f04a1528 Author: Adam Dickmeiss Date: Wed May 1 13:46:35 1996 +0000 First work on multiple records in one file. New option, -offset, to the "unread" command in the filter module. commit ed3944df3f241654030ef0d391c85b3e6f6e7230 Author: Adam Dickmeiss Date: Wed May 1 13:44:05 1996 +0000 Added seek function to the recExtractCtrl and recRetrieveCtrl control structures. Added end-of-file indicator function and start offset to recExtractCtrl. commit 896122c20b323ec3ddf2a2bfa334643e0a977d7e Author: Sebastian Hammer Date: Wed May 1 07:16:30 1996 +0000 Fixed ancient bug. commit f847e42bde3d8c0ac862fc9cbc65c2f8fc6aa1d3 Author: Adam Dickmeiss Date: Fri Apr 26 12:09:43 1996 +0000 Added a few comments. commit 36c4e524e444ce307da04894e39b44db8f10c76d Author: Adam Dickmeiss Date: Fri Apr 26 11:51:20 1996 +0000 Resource names are matched by the yaz_matchstr routine instead of strcmp. commit fbf310e3816958482b62a453b8215eaf3398ba3c Author: Adam Dickmeiss Date: Fri Apr 26 11:50:04 1996 +0000 Added message. commit 10c7f8f3a452ee23e7cbc5eb3cf627bfef6cb273 Author: Adam Dickmeiss Date: Fri Apr 26 10:00:23 1996 +0000 Added option -V to zebraidx to display version information. Removed stupid warnings from file update. commit 000e0a6a2e01a5997bacbda7702ca60dca785073 Author: Adam Dickmeiss Date: Fri Apr 26 09:59:47 1996 +0000 Added ZEBRADATE; date of this file. commit efc9ee6dcb946a247a45c7545471af21a530e0ff Author: Adam Dickmeiss Date: Fri Apr 26 09:59:31 1996 +0000 Minor changes. commit 3a417319ed74c6e699e497b2355a2eda2cc18820 Author: Adam Dickmeiss Date: Thu Apr 25 13:27:57 1996 +0000 Function recordExtract modified so that files with no keys (possibly empty) are ignored. commit 1952c5d35e4a44fbb75395055591fca8ac47ed66 Author: Sebastian Hammer Date: Wed Apr 24 13:36:19 1996 +0000 a6 commit 0f7364db455d942ff565299e56309be95b88c1b4 Author: Sebastian Hammer Date: Wed Apr 24 13:34:19 1996 +0000 Refinements. commit 8d1e93a6c1ecf5e314f4d525731164ad08b75cb6 Author: Adam Dickmeiss Date: Wed Apr 24 13:29:16 1996 +0000 Work on optimized on commit operation. commit 28bf032598869adec59c789eed6ff9bde6984b9b Author: Adam Dickmeiss Date: Wed Apr 24 13:29:03 1996 +0000 New changes. commit 68eebb3e4f383b99573138f3c3cc9dc0e317abc1 Author: Adam Dickmeiss Date: Tue Apr 23 12:39:07 1996 +0000 Bug fix: In function dirs_del dict_delete is used to remove a file rather than a bogus dict_insert. commit 9f76b710c8510b06ac9cb4a58c5efde4daf85de8 Author: Adam Dickmeiss Date: Tue Apr 23 12:36:41 1996 +0000 Started work on more efficient commit operation. commit bf2f4a3883ea4ef15c35965a2d6a05715dcbffb7 Author: Adam Dickmeiss Date: Fri Apr 19 16:49:00 1996 +0000 Minor changes. commit 20956e941d49591da38aceb603792605521e0e60 Author: Adam Dickmeiss Date: Fri Apr 19 16:23:47 1996 +0000 Serious bug fix in shadow implementation; function new_bucket might set wrong bucket number on new bucket. commit 7edae22b5d556f3db505615888ef02b950dd5e83 Author: Adam Dickmeiss Date: Thu Apr 18 16:02:56 1996 +0000 Changed logging a bit. Removed warning message when commiting flat shadow files. commit 500a61134d49f8d0288a772f8d87e7a5b3280bd2 Author: Sebastian Hammer Date: Wed Apr 17 09:21:29 1996 +0000 Changes to reflect inclusion of YAZ. commit 0c9fdce49848132a12807f8dc9706b382274f1df Author: Adam Dickmeiss Date: Fri Apr 12 07:02:21 1996 +0000 File update of single files. commit 327142accc3f6115431fc838dfc45291259253d7 Author: Adam Dickmeiss Date: Fri Apr 12 07:01:55 1996 +0000 Yet another bug fix (next_block was initialized to 0; now set to 1). commit 42ccdccb3ac2803338cdc3c9298f1bc0acfdea3a Author: Sebastian Hammer Date: Wed Apr 10 16:01:27 1996 +0000 Fixed order of path/filename. commit 9ab36093bff474786e1672c30a72313b5506b0d0 Author: Sebastian Hammer Date: Wed Apr 10 11:36:49 1996 +0000 1.0a5 commit a5eb0e845b7c27860ac15bf42249c9046b90f157 Author: Adam Dickmeiss Date: Tue Apr 9 14:48:49 1996 +0000 Bug fix: offset calculation when using flat files was completely broken. commit 0c499c33b853a029f00aed4b3630374e955e1c86 Author: Adam Dickmeiss Date: Tue Apr 9 10:05:20 1996 +0000 Bug fix: prev_name buffer possibly too small; allocated in key_file_init. commit c0883a6fae21edf72536dd4514bc409dfba3383a Author: Adam Dickmeiss Date: Tue Apr 9 06:50:50 1996 +0000 Bug fix: bad reference in function fileUpdateR. commit 95ff8b9c4821c47dad5d3f2e38ae0d3f6e461f74 Author: Adam Dickmeiss Date: Tue Apr 9 06:49:18 1996 +0000 Traversal of directories doesn't follow symbolic links. commit 2771f5feddda09bed04d609683bf95df053924a4 Author: Adam Dickmeiss Date: Tue Apr 9 06:47:28 1996 +0000 Function scan_areadef doesn't use sscanf (%n fails on this Linux). commit 35e8592909fffca48f7d8efff6582b4a619d1fcc Author: Sebastian Hammer Date: Fri Mar 29 14:11:47 1996 +0000 Change to is_merge commit adc0ef50c52d332902ef92c8feb460eee55a1f05 Author: Adam Dickmeiss Date: Tue Mar 26 16:01:13 1996 +0000 New setting lockPath: directory of various lock files. commit 9bfe216ddf91de1d3d4262417687aa18d661d314 Author: Adam Dickmeiss Date: Tue Mar 26 16:00:44 1996 +0000 The directory of the shadow table can be specified by the new bf_lockDir call. commit 02c1a99b836ae2b00a4b8ac4d53da39743865733 Author: Adam Dickmeiss Date: Tue Mar 26 15:59:45 1996 +0000 Documented lockPath. commit cba904dca083ec8742a47bbd03e810e553c6e72d Author: Adam Dickmeiss Date: Tue Mar 26 15:59:04 1996 +0000 The directory of the shadow table file can be specified by the new bf_lockDir call. commit 93157200c061494ccef0927089db4050de72968f Author: Adam Dickmeiss Date: Tue Mar 26 15:57:21 1996 +0000 Minor changes. commit f7160fd308d3fe990398d95cd5d63ec08b2b9b15 Author: Sebastian Hammer Date: Mon Mar 25 10:20:05 1996 +0000 Added refer (specifically HCI bibliography) filter commit 012ba31fe1064519e65be07a725a678c77a31601 Author: Sebastian Hammer Date: Mon Mar 25 10:19:22 1996 +0000 Hci Work commit 5f3589d9c32611a8d1e26da7553cf06b18481032 Author: Sebastian Hammer Date: Fri Mar 22 15:34:26 1996 +0000 Added HCI filter commit 9a677b99c57aed3fa62f6737c4b8fd5bf2114d8b Author: Sebastian Hammer Date: Fri Mar 22 15:34:18 1996 +0000 Fixed bad reference commit cdc04db6a4bcbf0630b5da7cfdf7195a88f0a9f9 Author: Adam Dickmeiss Date: Thu Mar 21 14:50:08 1996 +0000 File update uses modify-time instead of change-time. commit 1d992eee889b7c7f5dd3e83c3efdadc8543a0afc Author: Sebastian Hammer Date: Wed Mar 20 16:17:11 1996 +0000 Bug hunting commit 66754808c6d7f236dac6c6d6ab50d1ad976cfacc Author: Sebastian Hammer Date: Wed Mar 20 16:16:55 1996 +0000 Added diagnostic output commit b8d492961ba89859e02543581d097b75a59b546c Author: Sebastian Hammer Date: Wed Mar 20 13:29:11 1996 +0000 Bug-fix commit 44cec91a73f331f5825fea0f2ef640cc28fdda11 Author: Adam Dickmeiss Date: Wed Mar 20 09:36:40 1996 +0000 Function dict_lookup_grep got extra parameter, init_pos, which marks from which position in pattern approximate pattern matching should occur. Approximate pattern matching is used in relevance=re-2. commit 3e97ca3e99068d83691ad6d43d53dd9f1f316889 Author: Adam Dickmeiss Date: Wed Mar 20 09:35:15 1996 +0000 Function dict_lookup_grep got extra parameter, init_pos, which marks from which position in pattern approximate pattern matching should occur. commit 7b559154955fd4ac7f18657344241ca83443b3a2 Author: Adam Dickmeiss Date: Wed Mar 20 09:20:39 1996 +0000 Spellings. commit b9732ff4230548163453f28181a96ed268e4de1f Author: Sebastian Hammer Date: Tue Mar 19 19:22:44 1996 +0000 Fixed update-bug commit 068bf8e48e3757f4514cf5bce8eec12a2e35de6a Author: Sebastian Hammer Date: Tue Mar 19 18:30:03 1996 +0000 Smallish commit df2695582c076a610c89cb7ab6eb973e4a9c2d63 Author: Sebastian Hammer Date: Tue Mar 19 13:14:57 1996 +0000 Moved an xfree() commit 5a47fb16ab0fc9574660a0ed04151f359c826cbf Author: Adam Dickmeiss Date: Tue Mar 19 12:43:26 1996 +0000 Bug fix: File update traversal didn't handle trailing slashes correctly. Bug fix: Update of sub directory groups wasn't handled correctly. commit 9bf9498168489df4a3df3e01ce95f46643b7ea9e Author: Adam Dickmeiss Date: Tue Mar 19 11:08:42 1996 +0000 Bug fix: Log preamble wasn't always turned off after recordExtract. commit 3e8c1012bf5b053c51a87f37e8ee3ea2056b0aa2 Author: Sebastian Hammer Date: Mon Mar 18 10:48:13 1996 +0000 Doc update commit d7b0aea36e8578a03266ee4b9d7ba14297beeebe Author: Sebastian Hammer Date: Wed Mar 13 16:17:10 1996 +0000 Removed str commit ac9adb8f14f933005d958f231db722a836f1e329 Author: Sebastian Hammer Date: Mon Mar 11 14:54:07 1996 +0000 *** empty log message *** commit 34e1e6c2ddbbd31f9c4b8401c973ed7fae9eda34 Author: Sebastian Hammer Date: Mon Mar 11 14:52:23 1996 +0000 Fixed update bug. Repeated insertion in the same area sometimes caused problems. commit eeefdb17312edc896a6f6182bca6a5fc9bf22189 Author: Sebastian Hammer Date: Fri Mar 8 15:10:09 1996 +0000 Smallish. commit 9314fca68f6f5c0de94244823bebfab596550e53 Author: Sebastian Hammer Date: Wed Feb 28 16:47:43 1996 +0000 Added NWI filter commit aee0a6654a8bac70461f1a2d22f924587b21e9dc Author: Sebastian Hammer Date: Wed Feb 21 15:55:44 1996 +0000 Fixed URL commit 0d2825772055a5aeb7086d5a7d2d600cf498445e Author: Adam Dickmeiss Date: Mon Feb 12 18:45:36 1996 +0000 New fileVerboseFlag in record group control. commit b1a4c757e1728f5b036cc39e5b990faa83b73bfc Author: Adam Dickmeiss Date: Mon Feb 12 18:45:17 1996 +0000 Changed naming of some functions. commit 3c7b393422a52f6ac9fa925811e60e551b1ec0d5 Author: Sebastian Hammer Date: Mon Feb 12 18:19:45 1996 +0000 Smallish commit 062978fe7432da086bd0cb468149d88d1b6414cf Author: Sebastian Hammer Date: Mon Feb 12 18:19:07 1996 +0000 *** empty log message *** commit c8a98a8c762c0b528177561e8eb8dae40cf5cd1f Author: Sebastian Hammer Date: Mon Feb 12 16:13:51 1996 +0000 New filter commit ee6cf4efedf15c91fc7fd8e1bd08382e6c0f48f7 Author: Adam Dickmeiss Date: Mon Feb 12 15:56:11 1996 +0000 New code command: unread. commit 288e50e499479a436edb71358c51fb8317c26da3 Author: Sebastian Hammer Date: Sat Feb 10 12:20:54 1996 +0000 *** empty log message *** commit 144e8636e37a45caf6596b8e65e60ac69e315a31 Author: Sebastian Hammer Date: Sat Feb 10 12:20:37 1996 +0000 Smallish commit 869b11178c518bf4b8c81e1cb5daca8cfc8a17c6 Author: Adam Dickmeiss Date: Wed Feb 7 14:06:37 1996 +0000 Better progress report during register merge. New command: clean - removes temporary shadow files. commit 9cb291694ad137f4e72c8c31203ced6ca3741f2c Author: Adam Dickmeiss Date: Wed Feb 7 14:03:46 1996 +0000 Work on flat indexed shadow files. commit 1f6d50562f7c9bb02e6781aee7594928e6ede569 Author: Adam Dickmeiss Date: Wed Feb 7 14:03:28 1996 +0000 New info. commit bee234a243b7bfc164f7096f35d1bcb98e7b24a9 Author: Adam Dickmeiss Date: Wed Feb 7 10:08:43 1996 +0000 Work on flat shadow (not finished yet). commit 864f2cb16fb0ffc6b6ffaa74ddbaee3bbf85142d Author: Adam Dickmeiss Date: Tue Feb 6 17:11:18 1996 +0000 Minor changes. commit fc5b1ebd4b23c1c55514a973f35ee98f2207597e Author: Sebastian Hammer Date: Tue Feb 6 10:19:56 1996 +0000 Attempt at fixing bug. Not all blocks were read before they were unlinked prior to a remap operation. commit 21bc9d554eee6a69f15fa4e54e14a256e6e0ce39 Author: Sebastian Hammer Date: Tue Feb 6 10:19:17 1996 +0000 Work. commit 589b5761fb59634afc37909e62cb34ce56cbbb12 Author: Adam Dickmeiss Date: Mon Feb 5 12:29:55 1996 +0000 Logging reduced a bit. The remaining running time is estimated during register merge. commit 0373ce8620c5c9254a8e3fedc3ac7894cfdc7a60 Author: Adam Dickmeiss Date: Mon Feb 5 12:28:58 1996 +0000 Removed a LOG_LOG message. commit 77211cd5220ed1f7db582307b6577f56ac6a7b4b Author: Adam Dickmeiss Date: Mon Feb 5 12:28:07 1996 +0000 Minor changes. commit c8ecacb7e0284165e2249e117a0b859d75e297f0 Author: Adam Dickmeiss Date: Fri Feb 2 13:44:43 1996 +0000 The public dictionary functions simply use char instead of Dict_char to represent search strings. Dict_char is used internally only. commit b31a8654c5b7a597dd4a351f452ac91e5ef60798 Author: Adam Dickmeiss Date: Fri Feb 2 13:43:50 1996 +0000 The public functions simply use char instead of Dict_char to represent search strings. Dict_char is used internally only. commit e4281fc8f4cb007518e0b7fe082e54bc48c02b68 Author: Adam Dickmeiss Date: Thu Feb 1 20:58:51 1996 +0000 Minor changes. commit 8e7391731528f923b94dd2c22875f6c093d489ce Author: Adam Dickmeiss Date: Thu Feb 1 20:53:26 1996 +0000 The temporary per-record keys are compacted a little, and duplication of the per-records keys are avoided when they are saved in the record information buffer. commit a43a80295abc7fd1b2caecb0de0dadd3003cab41 Author: Adam Dickmeiss Date: Thu Feb 1 20:50:04 1996 +0000 Bug fix: zebraIndexUnlock was always called even though zebraIndexLock was never called - happens when no commands are specified. commit 740306b2fbf734d67ab9cd99c11568c576c3c32b Author: Adam Dickmeiss Date: Thu Feb 1 20:48:15 1996 +0000 The total size of records are always checked in rec_cache_insert to reduce memory usage. commit d07818ca27f4e0efc9683148cb5d9891d34b9495 Author: Adam Dickmeiss Date: Thu Feb 1 20:39:52 1996 +0000 Bug fix: insert didn't work on 8-bit characters due to unsigned char compares in dict_strcmp (strcmp) and signed Dict_char. Dict_char is unsigned now. commit b3a6eba6b48be6df19bce22dbf2bc0068df9cfe8 Author: Adam Dickmeiss Date: Wed Jan 31 21:03:59 1996 +0000 Extra options. commit f8ac116fa79dcbdaf11b9ae6f7eedf08b5d7a8ec Author: Sebastian Hammer Date: Mon Jan 29 09:47:11 1996 +0000 Fixed mean little bug in the read-table code. commit 75c2bdd11d775b8a3d661b6663d1a10a5943b783 Author: Sebastian Hammer Date: Mon Jan 22 15:30:36 1996 +0000 Fixed. commit 9f702af8d75a4bdd837abbef43a22d0d1af5f614 Author: Adam Dickmeiss Date: Wed Jan 17 15:01:25 1996 +0000 Prototype changed for reader functions in extract/retrieve. File is identified by 'void *' instead of 'int'. commit 5997f85a9dbeab93bae3492139ed20fea878372c Author: Adam Dickmeiss Date: Wed Jan 17 14:57:48 1996 +0000 Prototype changed for reader functions in extract/retrieve. File is identified by 'void *' instead of 'int. commit 80d4cca6f4fa7b4efbad28a2b43248f6be952f7c Author: Adam Dickmeiss Date: Wed Jan 17 14:54:44 1996 +0000 Function dirs_rmdir uses dict_delete. commit 471ee2c73957a30d2e6a9e97d951fb5def86c5a5 Author: Sebastian Hammer Date: Thu Jan 11 10:15:31 1996 +0000 Alfa 4 release. commit 87153cf0749ab9ecb4a6d652e0842957467ffe4b Author: Sebastian Hammer Date: Wed Jan 10 15:22:27 1996 +0000 Work. commit 217c5cfb7d1bd31236490731116e9274e8c3d522 Author: Sebastian Hammer Date: Wed Jan 10 14:42:21 1996 +0000 Fixes. commit a0f71913f070a5313318b2cfddec99542194329f Author: Adam Dickmeiss Date: Mon Jan 8 19:15:54 1996 +0000 New input filters that works! commit ddb47a9bace6ee7942e358a017bb5426a8135334 Author: Adam Dickmeiss Date: Mon Jan 8 19:15:46 1996 +0000 New input filter that works! commit 55a416d894dd90b1d5f083f6a9a280986f4b9774 Author: Adam Dickmeiss Date: Mon Jan 8 19:15:24 1996 +0000 Allow single $ in expressions. commit 43bca4a3c7c6c6ec3f9010501cd4ba3a5ac58933 Author: Adam Dickmeiss Date: Mon Jan 8 19:15:07 1996 +0000 Minor changes. commit 38eb1db2fc9ffced78bc97db9895b0b0b4d84b63 Author: Adam Dickmeiss Date: Mon Jan 8 09:10:54 1996 +0000 Modified to use new input format. commit 65615b66e805376b23f24a51e7d048f4f58e6525 Author: Adam Dickmeiss Date: Mon Jan 8 09:09:30 1996 +0000 Function dfa_parse got 'const' string argument. commit e27ce02d4d96ac2b8220134c837c53cfef8eba23 Author: Adam Dickmeiss Date: Mon Jan 8 09:09:16 1996 +0000 Function dfa_parse got 'const' string argument. New functions to define char mappings made public. commit 7da4d91df144b6a2d08c87a0a5c111da83f5fd2e Author: Adam Dickmeiss Date: Mon Jan 8 09:07:51 1996 +0000 Minor changes. commit 52d7ca225fcf5324ee05e05cc0e10b01a01a373c Author: Sebastian Hammer Date: Wed Jan 3 16:22:11 1996 +0000 operator->roperator commit 984971653e959ddf069c89853a20e9b38f02d897 Author: Sebastian Hammer Date: Wed Jan 3 16:21:58 1996 +0000 Doc updates commit 91088fbb1b8060142bf603582c91e7508a1625d5 Author: Sebastian Hammer Date: Tue Jan 2 08:59:15 1996 +0000 Work. commit 805db1945539e97bd09b17d91eefc8eeb1652213 Author: Sebastian Hammer Date: Tue Jan 2 08:59:06 1996 +0000 Changed "commit" setting to "shadow". commit d68678feed8f5eea3bcd4def49896aacd1e70761 Author: Sebastian Hammer Date: Tue Jan 2 08:58:45 1996 +0000 *** empty log message *** commit 5291f656329d25596b100e6944792dcfe54ce0d7 Author: Adam Dickmeiss Date: Fri Dec 15 17:19:40 1995 +0000 Updated to new hacked syntax. commit 9c20ae54377da219cda359888e0d69aea6b42a52 Author: Adam Dickmeiss Date: Fri Dec 15 16:20:22 1995 +0000 Added a few sample filters. commit 91ea2ca462df5434d6f549e736b20b6e3534ec46 Author: Adam Dickmeiss Date: Fri Dec 15 14:57:16 1995 +0000 Bug fix. commit 4b7a4c30b843352a948dad6c36053f8dbf99c8f4 Author: Adam Dickmeiss Date: Fri Dec 15 12:37:41 1995 +0000 In addRecordKeyAny: Writes key only when attrSet != -1. commit 614cde384b649a59922033c64db65409e45ab631 Author: Adam Dickmeiss Date: Fri Dec 15 12:36:52 1995 +0000 Moved hash file information to union. Renamed commit files. commit 13b6e86170cf02550bb4abc6e1598d09be7d5bae Author: Adam Dickmeiss Date: Fri Dec 15 10:35:07 1995 +0000 Changed names of commit files. commit 715270b8855b48be6fdbe72696483f4494dd2140 Author: Sebastian Hammer Date: Wed Dec 13 17:14:00 1995 +0000 *** empty log message *** commit 85df66537199c30a492ad54be4fbe25fa77e18c8 Author: Sebastian Hammer Date: Wed Dec 13 13:45:21 1995 +0000 *** empty log message *** commit 4ec5e11d0e4db05000b47db4c681d570431c1818 Author: Adam Dickmeiss Date: Wed Dec 13 08:46:09 1995 +0000 Locking uses F_WRLCK and F_RDLCK again! commit 7e3b091d6944a2ef10f1c6e983181be53b565e34 Author: Adam Dickmeiss Date: Tue Dec 12 16:00:54 1995 +0000 System call sync(2) used after update/commit. Locking (based on fcntl) uses F_EXLCK and F_SHLCK instead of F_WRLCK and F_RDLCK. commit fe8a4ac0e92103284e9888f0c13c141f4711d9a3 Author: Adam Dickmeiss Date: Tue Dec 12 15:57:55 1995 +0000 Implemented mf_unlink. cf_unlink uses mf_unlink. commit c4d2b754d90faad6cf76b0c380113b5a78b1d889 Author: Sebastian Hammer Date: Tue Dec 12 14:12:47 1995 +0000 *** empty log message *** commit facded78072e8ebbe652a6cc94b529fad014b184 Author: Sebastian Hammer Date: Tue Dec 12 14:12:11 1995 +0000 Smallish. commit 5064b5b69eed3aa331817c0d3a6902efe688d2e2 Author: Adam Dickmeiss Date: Mon Dec 11 11:45:55 1995 +0000 Removed commented code. commit 4495fac3b7f760814dd3b41d0f64e5077193eeee Author: Adam Dickmeiss Date: Mon Dec 11 11:43:29 1995 +0000 Locking based on fcntl instead of flock. Setting commitEnable removed. Command line option -n can be used to prevent commit if commit setting is defined in the configuration file. commit 77006d65669383febd8cd4d1541278723c578564 Author: Adam Dickmeiss Date: Mon Dec 11 11:42:39 1995 +0000 Minor changes. commit 7b0a5daa703117cde2dc0d54d5a39941a1c01ce8 Author: Adam Dickmeiss Date: Mon Dec 11 09:15:21 1995 +0000 New set types: sand/sor/snot - ranked versions of and/or/not in ranked/semi-ranked result sets. Note: the snot not finished yet. New rset member: flag. Bug fix: r_delete in rsrel.c did free bad memory block. commit 62f6cad37f14a19d9c1ce763ea54a61b350c7881 Author: Adam Dickmeiss Date: Mon Dec 11 09:12:44 1995 +0000 The rec_get function returns NULL if record doesn't exist - will happen in the server if the result set records have been deleted since the creation of the set (i.e. the search). The server saves a result temporarily if it is 'volatile', i.e. the set is register dependent. commit 6c836c5e8eff1e57360dd0a33197c91301277c2c Author: Adam Dickmeiss Date: Mon Dec 11 09:07:53 1995 +0000 New rset member 'flag', that holds various flags about a result set - currently 'volatile' (set is register dependent) and 'ranked' (set is ranked). New set types sand/sor/snot. They handle and/or/not for ranked and semi-ranked result sets. commit 65752ce7054586c724bd1e972a290594eeae85d0 Author: Adam Dickmeiss Date: Mon Dec 11 09:04:48 1995 +0000 Bug fix: the lookup/scan/lookgrep didn't handle empty dictionary. commit a3c8593ddb43c236e8ce80066abe9a0244f86706 Author: Adam Dickmeiss Date: Mon Dec 11 09:03:51 1995 +0000 New function: cf_unlink. New member of commit file head: state (0) deleted, (1) hash file. commit bf27228e5485151ee52bfd87dd91b025544ab6b2 Author: Adam Dickmeiss Date: Fri Dec 8 16:22:53 1995 +0000 Work on update while servers are running. Three lock files introduced. The servers reload their registers when necessary, but they don't reestablish result sets yet. commit bc1fc7bc062889d184f91a501156c6698011fefb Author: Adam Dickmeiss Date: Fri Dec 8 16:21:13 1995 +0000 Work on commit/update. commit 7e4409ec5466da58a0c5dced6f059e16e289261d Author: Adam Dickmeiss Date: Fri Dec 8 16:20:39 1995 +0000 New commit utilities - used for 'save' update. commit 4e2fc80e64f3d7895a871ea5b08aa80045a59f2c Author: Adam Dickmeiss Date: Thu Dec 7 17:38:45 1995 +0000 Work locking mechanisms for concurrent updates/commit. commit 1209da2618a90d6a811311becdbe2126ffdaa0de Author: Adam Dickmeiss Date: Thu Dec 7 11:48:55 1995 +0000 Insert operation obeys DICT_type = 1 (slack in page). Function dict_open exists if page size or magic aren't right. commit ce87190546091df7893a9211e915a72c67db2d81 Author: Adam Dickmeiss Date: Thu Dec 7 11:47:04 1995 +0000 Default pagesize is 4k instead of 8k. commit f19620ab15ecd101aa2522500d9a3dafd3b34773 Author: Adam Dickmeiss Date: Wed Dec 6 17:49:19 1995 +0000 Uses dict_delete now. commit 6c820cde24f590dcb4d88842af0f4a246a9e7c71 Author: Adam Dickmeiss Date: Wed Dec 6 17:48:30 1995 +0000 Bug fix: delete didn't work. commit e39158d4c6147865c129d2524f1b910e4e7921ed Author: Sebastian Hammer Date: Wed Dec 6 16:16:57 1995 +0000 a3 commit 97416b96f6407c49f583a3aa579c9857b3d3d108 Author: Adam Dickmeiss Date: Wed Dec 6 16:06:42 1995 +0000 Better diagnostics. Work on 'real' dictionary deletion. commit 10dd604b23feab51e04dbf72fe89ed2b3eb82320 Author: Adam Dickmeiss Date: Wed Dec 6 16:05:50 1995 +0000 New version. commit 06cef3aac0230e856f36e61533e2a4e60f299a02 Author: Sebastian Hammer Date: Wed Dec 6 15:48:44 1995 +0000 Fixed update-problem. commit d23f1adde49e76cfda218d7f50ba886c16d1a044 Author: Adam Dickmeiss Date: Wed Dec 6 15:05:28 1995 +0000 More verbose in count_set. commit bfa7f970e514dfdfa067191f1b3fc30a004972bf Author: Adam Dickmeiss Date: Wed Dec 6 14:52:21 1995 +0000 New function: dict_delete. commit fa2e85c18627b18737723d91e08c752d9931f589 Author: Sebastian Hammer Date: Wed Dec 6 14:48:26 1995 +0000 Fixed some strange bugs. commit b7f00ecbe71200814196edcb38c378dcd4acaacc Author: Adam Dickmeiss Date: Wed Dec 6 14:41:13 1995 +0000 New function: dict_delete. commit a69fc6623e847e925bc3f723d2e4a31d00d5650e Author: Adam Dickmeiss Date: Wed Dec 6 13:58:26 1995 +0000 Improved flushing of records - all flushes except the last one don't write the last accessed. Also flush takes place if record info occupy more than about 256k. commit 226fb73f42a86cc30ff4f27eb452ab3f6c19ae01 Author: Adam Dickmeiss Date: Wed Dec 6 12:41:20 1995 +0000 New command 'stat' for the index program. Filenames can be read from stdin by specifying '-'. Bug fix/enhancement of the transformation from terms to regular expressons in the search engine. commit 7ef06055d9fe8e829dfa6401852ae5d843d21c80 Author: Adam Dickmeiss Date: Wed Dec 6 12:24:58 1995 +0000 Removed verbatim mode code. commit fa9ad0cb4b1eade3de0853b91df04bd97c3845fa Author: Sebastian Hammer Date: Wed Dec 6 09:59:45 1995 +0000 Fixed memory-consumption bug in memory.c Added more blocksizes to the default ISAM configuration. commit b357a706446dc6077ed92b8267db6bf5b1ba6d43 Author: Adam Dickmeiss Date: Wed Dec 6 09:09:58 1995 +0000 Work on left and right anchors. commit c1b5bd67e9261f6b38f5b566ece11f464c311a1c Author: Adam Dickmeiss Date: Tue Dec 5 16:57:40 1995 +0000 More work on regular patterns. commit 6024b7c6a621b79c20953aeef15a17b96af92a8b Author: Adam Dickmeiss Date: Tue Dec 5 13:20:18 1995 +0000 Bug fix: file_read sometimes returned early EOF. commit f3f90b5f1606d7d609fcad38cc583eea9da61d98 Author: Sebastian Hammer Date: Tue Dec 5 13:12:37 1995 +0000 Added commit aa840a48cdae439c7dc62642154b1913008d40df Author: Adam Dickmeiss Date: Tue Dec 5 11:43:35 1995 +0000 New feature: make distribution. commit 59fa6cc26da2df4976d18dd6cd33412e3609e3d6 Author: Adam Dickmeiss Date: Tue Dec 5 11:25:45 1995 +0000 Doesn't include math.h. commit f4a5b6f7106d387c241a7fdb023e3a7cb4477c1e Author: Adam Dickmeiss Date: Tue Dec 5 11:25:02 1995 +0000 Include of zebraver.h. commit 4048ec5a22c5217963ca9945722e6ecf2413ee16 Author: Adam Dickmeiss Date: Tue Dec 5 11:24:51 1995 +0000 New version. commit 509e7978771d249c3db43954af1a518ea224b8a4 Author: Adam Dickmeiss Date: Tue Dec 5 11:24:27 1995 +0000 Minor changes. commit a3cd83eab63c8e948346ff16678b9bee898cca71 Author: Sebastian Hammer Date: Tue Dec 5 11:22:09 1995 +0000 *** empty log message *** commit 6d4e6112c30d94d01367397cd39a62134cce2cae Author: Sebastian Hammer Date: Tue Dec 5 11:15:03 1995 +0000 Fixed FILENAME_MAX for some Sun systems, hopefully. commit cd5f1676b56d762e59ebe97fd963026319b8dcc5 Author: Adam Dickmeiss Date: Mon Dec 4 17:59:15 1995 +0000 More work on regular expression conversion. commit ee27bc5fbcda811696062a9ed8bf86b8520391ce Author: Adam Dickmeiss Date: Mon Dec 4 14:22:25 1995 +0000 Extra arg to recType_byName. Started work on new regular expression parsed input to structured records. commit 6a2a73ff2c6ccc7d1ed83423d0ad7a95ea9e35b7 Author: Adam Dickmeiss Date: Mon Dec 4 14:20:54 1995 +0000 Extra arg to recType_byName. commit 4b3ae75b37b6c7476f35496626b94bd5fbe38191 Author: Adam Dickmeiss Date: Mon Dec 4 14:19:59 1995 +0000 Minor changes. commit 25c9afa691b8f62c2a17150cf1febd1f61755b12 Author: Adam Dickmeiss Date: Fri Dec 1 16:24:28 1995 +0000 Commit files use separate meta file area. commit f53f0487ccc739e61f5794198f11d911ba42dcef Author: Adam Dickmeiss Date: Fri Dec 1 11:37:31 1995 +0000 More doc. commit ed679affe3ae7402b38418f6b98fb8744915e19b Author: Adam Dickmeiss Date: Fri Dec 1 11:37:21 1995 +0000 Cached/commit files implemented as meta-files. commit 79a521770393bd301230668a5ce950b754bd39c7 Author: Adam Dickmeiss Date: Thu Nov 30 17:01:38 1995 +0000 New setting commitCache: points to commit directories/files. New command commit: commits at the end of a zebraidx run. commit 90a8309f2165abe2cd76e096837d886cc9fe89fb Author: Adam Dickmeiss Date: Thu Nov 30 17:00:49 1995 +0000 Several bug fixes. Commit system runs now. commit 89ae1c7e70d3554b3e765d83dd32ce2611c3ca48 Author: Adam Dickmeiss Date: Thu Nov 30 17:00:03 1995 +0000 Minor changes. commit e80772c51b80b8e5c9c3cfb037c988308a4014b9 Author: Adam Dickmeiss Date: Thu Nov 30 08:34:27 1995 +0000 Started work on commit facility. Changed a few malloc/free to xmalloc/xfree. commit d75b9accf5a28bd5d8ffd70bbb33b3e8e009d079 Author: Adam Dickmeiss Date: Thu Nov 30 08:33:09 1995 +0000 Started work on commit facility. commit d1eb772bc9be731951f571a0ba2040e59ce80598 Author: Sebastian Hammer Date: Tue Nov 28 17:03:24 1995 +0000 Initial revision commit 6c30845a374999b6ebef57588942c8269d664aa9 Author: Sebastian Hammer Date: Tue Nov 28 16:56:26 1995 +0000 Work. commit 0a783f5cee1529c5f5abd9c58fbf9e6868773d5a Author: Sebastian Hammer Date: Tue Nov 28 16:50:41 1995 +0000 Added commit 9781066994c0f09ced5675e5b4f1ce14dc326de7 Author: Adam Dickmeiss Date: Tue Nov 28 16:47:24 1995 +0000 More work. commit 35d681d543725a7d250eae25b049b09ac950d62d Author: Adam Dickmeiss Date: Tue Nov 28 16:41:48 1995 +0000 More work. commit b9ac6469056f0a8ff7336dbd0b91c2a679329ca3 Author: Sebastian Hammer Date: Tue Nov 28 16:34:43 1995 +0000 Work commit 7da397e09c150338ef440be551be4e8ce1d0909d Author: Sebastian Hammer Date: Tue Nov 28 16:10:45 1995 +0000 Work. commit 6c2da094599c39ef21c0794998d14e0329d53571 Author: Adam Dickmeiss Date: Tue Nov 28 15:59:46 1995 +0000 A few notes about the server. commit 0d90384223b4055ab3c6275ee3aa038c5a7884c7 Author: Adam Dickmeiss Date: Tue Nov 28 14:47:02 1995 +0000 New setting: tempSetPath. Location of temporary result sets. commit 53f42a6fe9676c59ec2de267551157c989400611 Author: Adam Dickmeiss Date: Tue Nov 28 14:26:21 1995 +0000 Bug fix: recordId with constant wasn't right. Bug fix: recordId dictionary entry wasn't deleted when needed. commit 5c743078c8796354d7ff0593cec2e5631d1dc350 Author: Adam Dickmeiss Date: Tue Nov 28 14:25:23 1995 +0000 More doc. commit 162fa86044b5aa303c03fa26f1ecf140b34060d5 Author: Adam Dickmeiss Date: Tue Nov 28 09:09:38 1995 +0000 Zebra config renamed. Use setting 'recordId' to identify record now. Bug fix in recindex.c: rec_release_blocks was invokeded even though the blocks were already released. File traversal properly deletes records when needed. commit 400055a9f298ff9d5689dcf292c84f8cafff4697 Author: Adam Dickmeiss Date: Tue Nov 28 09:06:37 1995 +0000 Fixed potential dangling pointer. commit b3185c05466c7d703b2e54cd36066323bfd3e42f Author: Adam Dickmeiss Date: Mon Nov 27 14:27:39 1995 +0000 Renamed 'update' command to 'dir'. commit 5806efdca75c83500b2c08544b958858d2af64cc Author: Adam Dickmeiss Date: Mon Nov 27 14:23:52 1995 +0000 Added documentation. commit 9340e5624e67366687df9b3a697b22c91387ab56 Author: Adam Dickmeiss Date: Mon Nov 27 14:21:53 1995 +0000 Rename of misc. files. commit 493237735ce44d9216b870542b90a3c5f393a586 Author: Adam Dickmeiss Date: Mon Nov 27 13:58:53 1995 +0000 New option -t. storeStore data implemented in server. commit c31ff54e57a2c28d5e12986f439b08e37aa6891e Author: Adam Dickmeiss Date: Mon Nov 27 13:57:35 1995 +0000 Minor changes. commit 1fb006cb5dd166db6289bebc09cbbcacd6a641e7 Author: Sebastian Hammer Date: Mon Nov 27 10:16:12 1995 +0000 Removed test programs from makefile. commit 34ab09b3a794ced8ef43e047cadf2d56cff24626 Author: Adam Dickmeiss Date: Mon Nov 27 09:56:18 1995 +0000 Record info elements better enumerated. Internal store of records. commit 9b4779254ca63687e44be9f3d2f0efecfff0c1ba Author: Adam Dickmeiss Date: Mon Nov 27 09:28:57 1995 +0000 Bug fixes regarding conversion to regular expressions. commit e76077754edc95fd0760dc2eaf7154b6b54d30a1 Author: Adam Dickmeiss Date: Mon Nov 27 09:23:02 1995 +0000 New berbatim hook in regular expressions. "[]n ..". commit 366f5c2889c8bccb1f645aebf737b6082f200da5 Author: Adam Dickmeiss Date: Sat Nov 25 10:24:05 1995 +0000 More record fields - they are enumerated now. New options: flagStoreData flagStoreKey. commit fa9ed9d37eadc2092f773ccff49c5b6c8b879a9a Author: Sebastian Hammer Date: Fri Nov 24 17:26:11 1995 +0000 Mostly about making some ISAM stuff in the config file optional. commit 94134a7a5eff3cea5c2971836f7da89ac7ba7791 Author: Adam Dickmeiss Date: Fri Nov 24 11:31:35 1995 +0000 Commands add & del read filenames from stdin if source directory is empty. Match criteria supports 'constant' strings. commit dd5f8f31bc5018a7b4a00accdda256ce1eaef14b Author: Adam Dickmeiss Date: Wed Nov 22 17:19:16 1995 +0000 Record management uses the bfile system. commit 0860da7090f3b9aa4403631cb47c2add43b31b5c Author: Adam Dickmeiss Date: Tue Nov 21 15:29:12 1995 +0000 Config file 'base' read by default by both indexer and server. commit 9f9b9eeb79d92c7793ffaba8805537bd401bdfbe Author: Adam Dickmeiss Date: Tue Nov 21 15:01:14 1995 +0000 New general match criteria implemented. New feature: document groups. commit 5bc6d260356c266cce0704d02e6d8878944cd2fa Author: Adam Dickmeiss Date: Tue Nov 21 09:20:30 1995 +0000 Yet more work on record match. commit 90b86ba1637131e670cb30f91f2b9633705bd504 Author: Adam Dickmeiss Date: Mon Nov 20 17:00:18 1995 +0000 Bug fix. commit ea01436a957572aaaa878b59469a4cedce7e5e21 Author: Adam Dickmeiss Date: Mon Nov 20 16:59:44 1995 +0000 New update method: the 'old' keys are saved for each records. commit b5af7db2dbda2c0a8e705c58da25a50f56214265 Author: Adam Dickmeiss Date: Mon Nov 20 11:57:46 1995 +0000 Support for YAZ in standard located directories, such as /usr/local/.. commit 83762ea76e5af65ccb4407c6b38053bc6491a875 Author: Adam Dickmeiss Date: Mon Nov 20 11:56:21 1995 +0000 Work on new traversal. commit 1891a7ab41007b52166ac5027389f0191193f997 Author: Adam Dickmeiss Date: Fri Nov 17 15:54:41 1995 +0000 Started work on virtual directory structure. commit 040a8961a659f7768fac348093bb807c413d785f Author: Adam Dickmeiss Date: Thu Nov 16 17:00:55 1995 +0000 Better logging of rpn query. commit 275c0e8eec44714b41300f6e743dc2e09f353aec Author: Adam Dickmeiss Date: Thu Nov 16 17:00:44 1995 +0000 Changed stupid log. commit 0d1685e5db9bf74ff80a4b483754532a73fcbb74 Author: Adam Dickmeiss Date: Thu Nov 16 15:34:54 1995 +0000 Uses new record management system in both indexer and server. commit f3e73ab63fbc960d863d9c14bab3b9e79c400ffa Author: Adam Dickmeiss Date: Wed Nov 15 19:13:07 1995 +0000 Work on record management. commit 5214040d316f7b5228e46e1749505e3c0c8869d4 Author: Adam Dickmeiss Date: Wed Nov 15 14:46:17 1995 +0000 Started work on better record management system. commit a0339702b54cef36d8be40d563ae9084626ee73f Author: Sebastian Hammer Date: Mon Nov 13 09:32:43 1995 +0000 Comment work. commit 3f06678b9659b778fd57c5c594c78a8477ae56fc Author: Sebastian Hammer Date: Wed Nov 1 16:25:37 1995 +0000 *** empty log message *** commit b7918920dd34b8c4c93e8d3095203e236523f453 Author: Sebastian Hammer Date: Wed Nov 1 13:58:22 1995 +0000 Moving data1 to yaz/retrieval commit 45e6e8beb94a0510a82ebd3046f19946e13f9093 Author: Adam Dickmeiss Date: Mon Oct 30 15:12:38 1995 +0000 Added NETLIB. commit 774c155f12ee6473f38ece849a401dd8426178d3 Author: Adam Dickmeiss Date: Mon Oct 30 15:08:08 1995 +0000 Bug fixes. commit d4b2d9a55eff084aa7db77d1aa98e032f4c7659e Author: Adam Dickmeiss Date: Mon Oct 30 14:10:44 1995 +0000 Replaced cc with $(CC) in CPP definition. commit 3aa589f4d0c8d1c8c1bb3bd28b97d134f06d6d9d Author: Adam Dickmeiss Date: Mon Oct 30 13:42:12 1995 +0000 Added errno.h commit 6617321a09d4d5bf442feaea2d7f1347acd82e3c Author: Adam Dickmeiss Date: Fri Oct 27 14:00:10 1995 +0000 Implemented detection of database availability. commit 9a3fbd4b27ac261b0d68f73d8f9b3a762b2c33e9 Author: Adam Dickmeiss Date: Fri Oct 27 13:59:17 1995 +0000 Function dict_look_grep got extra parameter max_pos that upon return hold length of longest prefix that matches pattern. commit d21266d054a74c1d601b9b593ae7e5ad8f738c2a Author: Adam Dickmeiss Date: Fri Oct 27 13:58:09 1995 +0000 Makes 'Database unavailable' diagnostic. commit 462c4c58fa0f21af1ffa7d44d5f2053aec671e08 Author: Adam Dickmeiss Date: Thu Oct 19 14:57:21 1995 +0000 New feature: grep lookup saves length of longest prefix match. commit 1792fa3c7e03f72170731d6b29010002ce1e4cb3 Author: Adam Dickmeiss Date: Tue Oct 17 18:03:15 1995 +0000 Commented out qsort in is_merge. commit 9fe3bf8d659adc5c0623185779272d933fc51d15 Author: Adam Dickmeiss Date: Tue Oct 17 18:02:07 1995 +0000 New feature: databases. Implemented as prefix to words in dictionary. commit 003edeb05e43971cc5b1a99ca894ff506cd2dd8b Author: Adam Dickmeiss Date: Tue Oct 17 18:01:22 1995 +0000 Userfunc may return non-zero in which case the the grepping stops immediately. commit ae5e5891ad52a6e7c1717afe5954039538f81236 Author: Sebastian Hammer Date: Mon Oct 16 14:03:06 1995 +0000 Changes to support element set names and espec1 commit 04c1e64ee5203e17b2e9618d38ff28a72e0c83d8 Author: Adam Dickmeiss Date: Mon Oct 16 09:32:38 1995 +0000 More work on relational op. commit a825e22395e14761bcb2f88177d1a86f3da2843a Author: Adam Dickmeiss Date: Mon Oct 16 09:31:24 1995 +0000 Bug fix. commit 2c7c2ca460fee75f3bebc0479b9787f0c401db03 Author: Adam Dickmeiss Date: Fri Oct 13 16:01:49 1995 +0000 Work on relations. commit 2038fcec0ea77e3fdb854ff968423d3ef24d53a8 Author: Adam Dickmeiss Date: Fri Oct 13 12:26:43 1995 +0000 Optimization of truncation. commit c12de4a26665bcab5365d45a8ffc62470e71e9aa Author: Adam Dickmeiss Date: Thu Oct 12 17:07:22 1995 +0000 Truncation works. commit 5c7ad71f534d092eaf97f04dd39c5e874e0d45b0 Author: Adam Dickmeiss Date: Thu Oct 12 12:41:55 1995 +0000 Private info (buf) moved from struct rset_control to struct rset. Bug fixes in relevance. commit 817315213374bf6b9a484f7e74fd4913d99c0755 Author: Adam Dickmeiss Date: Thu Oct 12 12:40:54 1995 +0000 Bug fixes in rpn_prox. commit 06f0594e0d2aad96f30e1ac5f82b7d13a79b5966 Author: Adam Dickmeiss Date: Thu Oct 12 12:40:36 1995 +0000 Private info (buf) moved from struct rset_control to struct rset. Member control in rset is statically set in rset_create. commit 3f0b5e7fba46dd6a0ef0217342f86ab3862e073b Author: Adam Dickmeiss Date: Thu Oct 12 12:38:40 1995 +0000 Minor changes. commit 9ee84acdcad18fe55bced224f47e57eb057923f1 Author: Sebastian Hammer Date: Tue Oct 10 16:28:12 1995 +0000 *** empty log message *** commit 6a321a255c783bcdae577495ce1ec05626f29364 Author: Adam Dickmeiss Date: Tue Oct 10 14:03:33 1995 +0000 Removed ksort.c. commit 0245f556af399689056b7810ed0e3de93021ad4a Author: Adam Dickmeiss Date: Tue Oct 10 13:59:23 1995 +0000 Function rset_open changed its wflag parameter to general flags. commit fc7107844c9ec8ea23e680ca4f3231923db4e9c5 Author: Adam Dickmeiss Date: Tue Oct 10 12:24:38 1995 +0000 Temporary sort files are compressed. commit 29357d2be4bc20d412d38bcb29876daedda28637 Author: Adam Dickmeiss Date: Mon Oct 9 16:18:31 1995 +0000 Function dict_lookup_grep got extra client data parameter. commit f735c1e15bdcd56722271befa230cefeeb444436 Author: Adam Dickmeiss Date: Fri Oct 6 16:33:37 1995 +0000 Use attribute mappings. commit a9d1f1c7c6254115b779f46c3d12d6e59c240e0a Author: Adam Dickmeiss Date: Fri Oct 6 15:07:39 1995 +0000 Structure 'local-number' handled. commit 40ca1d08c1d83b92e0b90951d918b252c61c63b2 Author: Adam Dickmeiss Date: Fri Oct 6 14:37:53 1995 +0000 New result set method: r_score. Local no (sysno) and score is transferred to retrieveCtrl. commit 9af45a7f129664e5f802ff1cdfce08fbce8b1adb Author: Adam Dickmeiss Date: Fri Oct 6 13:52:00 1995 +0000 Bug fixes. Handler may abort further scanning. commit a5cd2d2f5db7fde5a699ad3fadc82cce5149b284 Author: Adam Dickmeiss Date: Fri Oct 6 11:06:33 1995 +0000 Scan entries include 'occurrences' now. commit 34191838c4bcf0e1149dde9ea56ceb2a2ff6aebf Author: Adam Dickmeiss Date: Fri Oct 6 11:06:07 1995 +0000 Bug fixes. commit 8c1de7f1c9610a8da280fe93d785054ce86e7330 Author: Adam Dickmeiss Date: Fri Oct 6 10:43:56 1995 +0000 Scan added. 'occurrences' in scan entries not set yet. commit f54b1c2e62e6e70b810b35d8a7f2b5c75076808d Author: Adam Dickmeiss Date: Fri Oct 6 10:43:16 1995 +0000 Minor changes. commit e9486087c1fe029781e78b79b4ef34b0cf680e59 Author: Sebastian Hammer Date: Fri Oct 6 09:08:14 1995 +0000 Removed it commit c33fef40b235c24caf096fa6f1f94419ff7314c2 Author: Adam Dickmeiss Date: Fri Oct 6 09:03:51 1995 +0000 First version of scan. commit f18938b9b18b037c2e6f812715e038429d36d13c Author: Sebastian Hammer Date: Wed Oct 4 17:03:46 1995 +0000 Removed cgcc commit ce68ef0c334af90bc25623957c1f8e72d099979b Author: Adam Dickmeiss Date: Wed Oct 4 16:57:19 1995 +0000 Key input and merge sort in one pass. commit 7e928bc31abe214023a0fc61d77b092f4ee9ba7e Author: Adam Dickmeiss Date: Wed Oct 4 12:55:16 1995 +0000 Bug fix in ranked search. Use=Any keys inserted. commit 3dfdd7ea2aa006fd41a62ac45c58035633248807 Author: Sebastian Hammer Date: Wed Oct 4 09:37:08 1995 +0000 Fixed bug. commit cf2735a03e26ba9a2a3aa18c15a720a5ff0bdf72 Author: Adam Dickmeiss Date: Tue Oct 3 14:28:57 1995 +0000 Buffered read in extract works. commit 98251dc3b5266a8867f72a41d0705e48c8a748c4 Author: Adam Dickmeiss Date: Tue Oct 3 14:28:45 1995 +0000 Work on more effecient read handler in extract. commit f2add93344de52071a9462922152de43bbdb7315 Author: Sebastian Hammer Date: Mon Oct 2 16:43:32 1995 +0000 Set default resulting record type in fetch. commit 435da88a838541759d5f9657000b6edfae37680b Author: Adam Dickmeiss Date: Mon Oct 2 16:24:40 1995 +0000 Use attribute actually used in search requests. commit 5bdf6c8ddbafa8515a82079f631ef172d98e055b Author: Adam Dickmeiss Date: Mon Oct 2 15:42:53 1995 +0000 Extract uses file descriptors instead of FILE pointers. commit b0507b858a53d4fccea867fadb060ba1ef8ecace Author: Adam Dickmeiss Date: Mon Oct 2 15:29:13 1995 +0000 More logging in file_extract. commit 2811f2e2fb2101a75e89e8b3e0358635e86ab71d Author: Adam Dickmeiss Date: Mon Oct 2 15:18:52 1995 +0000 New member in recRetrieveCtrl: diagnostic. commit 7d9731c40c9432d988f921bb999f4a371f904697 Author: Adam Dickmeiss Date: Mon Oct 2 15:18:09 1995 +0000 Minor changes. commit 5093e193a23c52b4a0f28eae09c3195cfe019fe1 Author: Adam Dickmeiss Date: Mon Oct 2 15:17:58 1995 +0000 Bug fix in dfa_delete. commit a5cc2761cdf3455ceb49b73bf3d0933adf3e1451 Author: Sebastian Hammer Date: Mon Oct 2 15:05:26 1995 +0000 Added a few fields. commit a91b23986dd5ad1cbbc05522297b5db770b11c5d Author: Sebastian Hammer Date: Mon Oct 2 14:55:52 1995 +0000 *** empty log message *** commit eca822566cd540ae124eb5e70e60e49068307fd4 Author: Adam Dickmeiss Date: Fri Sep 29 15:51:56 1995 +0000 First work on multi-way read. commit eb4e33573a00795f2b1c0dfebb51ab59ffd5a0d9 Author: Adam Dickmeiss Date: Fri Sep 29 14:01:39 1995 +0000 Bug fixes. commit 3003d747565b03bac252b43eca48bb691d1adbfc Author: Adam Dickmeiss Date: Thu Sep 28 14:22:56 1995 +0000 Sort uses smaller temporary files. commit d8728143be0a28eb22a93d91c4ba7d3ab6c3f6cb Author: Adam Dickmeiss Date: Thu Sep 28 12:10:31 1995 +0000 Bug fixes. Field prefix used in queries. commit c6bd2d13d0764bca640513f465b4ce3627081e28 Author: Adam Dickmeiss Date: Thu Sep 28 09:52:11 1995 +0000 xfree/xmalloc used everywhere. commit ca19a15163ee74ee0c6765bfef4fd9794627e26a Author: Adam Dickmeiss Date: Thu Sep 28 09:19:40 1995 +0000 xfree/xmalloc used everywhere. Extract/retrieve method seems to work for text records. commit cf67c63195045b4ba4d535d8df5129732aab215d Author: Adam Dickmeiss Date: Thu Sep 28 09:18:50 1995 +0000 Removed various preprocessor defines. commit 083d994896c30d9c560580daa19c9ca370901e3a Author: Adam Dickmeiss Date: Wed Sep 27 16:17:29 1995 +0000 More work on retrieve. commit aebdede4bcc1dfe05728dac36b51a1cda85cc70e Author: Adam Dickmeiss Date: Wed Sep 27 12:22:27 1995 +0000 More work on extract in record control. Field name is not in isam keys but in prefix in dictionary words. commit 4f4057606fcc67b92895e575a6f3af2d5165b75c Author: Adam Dickmeiss Date: Wed Sep 27 12:21:25 1995 +0000 New function: recType_byName. commit f0020b866a462f4642727b9c73801cb98314c74f Author: Adam Dickmeiss Date: Wed Sep 27 12:21:04 1995 +0000 Added data1 to sub directories. commit ef672caf3b86de18df0e10b47f672365a998f9dc Author: Adam Dickmeiss Date: Mon Sep 18 14:17:56 1995 +0000 Bug fixes. commit 74fea1da1e215be90a2ffd92443048bf3c684cba Author: Adam Dickmeiss Date: Mon Sep 18 14:17:50 1995 +0000 Minor changes. commit dbad401e961e478286a6427841921c2f19a6f69b Author: Adam Dickmeiss Date: Fri Sep 15 14:45:39 1995 +0000 Bug fixes. commit 1319f46e376da7a32f1af97f93966e72c7c464bc Author: Adam Dickmeiss Date: Fri Sep 15 14:45:21 1995 +0000 Retrieve control. Work on truncation. commit c69a676949b3c1f125a19d117d9fb1e586751746 Author: Adam Dickmeiss Date: Fri Sep 15 14:45:03 1995 +0000 Retrieve control. commit 2406403c9d465b953045c4ad8353ffe220a53c7a Author: Adam Dickmeiss Date: Fri Sep 15 09:32:08 1995 +0000 Deleted regexp.y commit 7c4f8bf9516beb806a1e51467d2e10f86a4c21b7 Author: Adam Dickmeiss Date: Fri Sep 15 09:20:42 1995 +0000 Bug fixes. commit ef9dd3a80ee0fa95abeeb0a0e2d66856b6dd2d05 Author: Adam Dickmeiss Date: Thu Sep 14 11:53:27 1995 +0000 First work on regular expressions/truncations. commit 1dcfe532fcc0447de623e717d70c46ab553329b9 Author: Adam Dickmeiss Date: Thu Sep 14 11:52:59 1995 +0000 Grep handle function parameter info is const now. commit 2d8e1f86f73086330f4e9fd181d98542529ee1f9 Author: Adam Dickmeiss Date: Thu Sep 14 11:52:31 1995 +0000 Minor changes. commit 14afe45ad6934cea6878e243b63635025ff84a7b Author: Adam Dickmeiss Date: Thu Sep 14 07:48:56 1995 +0000 Other score calculation. commit ce20a8a823a2df86ace4862008684c71a4f06cd2 Author: Adam Dickmeiss Date: Thu Sep 14 07:48:13 1995 +0000 Record control management. commit 78391d3ac4af6f8cea3b73d8884b37d472c85c61 Author: Adam Dickmeiss Date: Mon Sep 11 15:23:26 1995 +0000 More work on relevance search. commit 0b7781e8c428a4bca098fff6f074fef83c06e560 Author: Adam Dickmeiss Date: Mon Sep 11 13:09:31 1995 +0000 More work on relevance feedback. commit 7eefa059dbe0c2d4ba24060421940df637d9cca8 Author: Adam Dickmeiss Date: Fri Sep 8 14:52:41 1995 +0000 Work on relevance feedback. commit 9765f689118107e45f5fba7261363980d378f7b3 Author: Adam Dickmeiss Date: Fri Sep 8 14:52:26 1995 +0000 Minor changes. Dictionary is lower case now. commit ddbba72d6ac2d51d596775b72ad64999e5cb0b77 Author: Adam Dickmeiss Date: Fri Sep 8 14:52:09 1995 +0000 Work on relevance sets. commit 9d7f0678da8e15bfc9b04a21aad15656b8cc65f2 Author: Adam Dickmeiss Date: Fri Sep 8 08:54:04 1995 +0000 More efficient and operation. commit 889c4058f1b6330d51f9f26fea7c1fe2148c85e8 Author: Adam Dickmeiss Date: Fri Sep 8 08:53:22 1995 +0000 Record buffer maintained in server_info. commit e16099ccf0ad1aab3ff7930bc4ea542357af0e38 Author: Adam Dickmeiss Date: Thu Sep 7 13:58:36 1995 +0000 New parameter: result-set file descriptor (RSFD) to support multiple positions within the same result-set. Boolean operators: and, or, not implemented. Result-set references. commit a322231bcd4bfed2886c571aa91da5f73cad62a9 Author: Adam Dickmeiss Date: Thu Sep 7 13:58:08 1995 +0000 New parameter: result-set file descriptor (RSFD) to support multiple positions within the same result-set. Boolean operators: and, or, not implemented. commit dcb032cfca41e8de9e9ac76c4aaa3b18ac8b1705 Author: Adam Dickmeiss Date: Wed Sep 6 16:11:41 1995 +0000 Keysize parameter to is_open (if non-zero). commit caa7fe057dd8617129577a6725d2c4e3da066857 Author: Adam Dickmeiss Date: Wed Sep 6 16:11:15 1995 +0000 Option: only one word key per file. commit 42b0747acfaaf94e94fd6c20b4cd97e10ded0ae0 Author: Adam Dickmeiss Date: Wed Sep 6 16:10:57 1995 +0000 More work on boolean sets. commit 1d0ee69119ae254a033b5c9e25aad14b3e627f9e Author: Adam Dickmeiss Date: Wed Sep 6 13:27:15 1995 +0000 New set type: bool. Not finished yet. commit b7ed8922d365e24874e561b7347c2c2ad682d6d8 Author: Adam Dickmeiss Date: Wed Sep 6 10:35:44 1995 +0000 Null set implemented. commit 26cf6c34f07849193e8aa42d90466d7712a2e09c Author: Adam Dickmeiss Date: Wed Sep 6 10:34:44 1995 +0000 Memcpy in clean_page edited to satisfy checkergcc. commit e5652ee69c5a71f19ea16455b48d22a78fb5fcdd Author: Adam Dickmeiss Date: Wed Sep 6 10:33:04 1995 +0000 More work on present. Some log messages removed. commit 3039267ce9021611b94e5ddec8a7b1ecbacdd2fe Author: Adam Dickmeiss Date: Tue Sep 5 16:36:59 1995 +0000 Minor changes. commit fb99bfcb44d29215f411d82646c59f2f74f5a25c Author: Adam Dickmeiss Date: Tue Sep 5 15:28:39 1995 +0000 More work on search engine. commit c50c56ac38c5ec857c0d42143267005048ee96dd Author: Adam Dickmeiss Date: Tue Sep 5 11:43:24 1995 +0000 Complete version of temporary sets. Not tested yet though. commit 2b6d484e350db6e14197e8ca4f6669b9a1bd0ee0 Author: Adam Dickmeiss Date: Mon Sep 4 15:20:22 1995 +0000 Minor changes. commit c427496a1254a039887e02c8bb7ce1d673bb251b Author: Adam Dickmeiss Date: Mon Sep 4 15:20:13 1995 +0000 More work on temp sets. is_open member removed. commit b879b04a092d5b00cc866cf16f755e55053d2e89 Author: Adam Dickmeiss Date: Mon Sep 4 12:33:21 1995 +0000 Various cleanup. YAZ util used instead. commit e12dd8d52a43a7159afd90fd2fa80b0072fd2ce7 Author: Adam Dickmeiss Date: Mon Sep 4 12:32:45 1995 +0000 Various cleanup. Use util of YAZ. commit 022ffce95f68829422f2cdd366b97747f37c9dff Author: Adam Dickmeiss Date: Mon Sep 4 09:10:55 1995 +0000 Minor changes. commit a02c4cf957603c707fe9f4fde94a468f1d030dfb Author: Adam Dickmeiss Date: Mon Sep 4 09:10:34 1995 +0000 More work on index add/del/update. Merge sort implemented. Initial work on z39 server. commit dadb0e77b180e171f43442b172d2a28b72439f17 Author: Adam Dickmeiss Date: Mon Sep 4 09:09:51 1995 +0000 String arg in dict lookup is const. Minor changes. commit 01a352d5e760c05124104d2367a199628decd2a4 Author: Adam Dickmeiss Date: Mon Sep 4 09:09:15 1995 +0000 String arg in lookup is const. commit 51a52e1b014d5237581f74379916b8ce92cafef7 Author: Adam Dickmeiss Date: Fri Sep 1 14:06:35 1995 +0000 Split of work into more files. commit 0e816d23119c75153727b17b418066792d2ce8c8 Author: Adam Dickmeiss Date: Fri Sep 1 10:57:07 1995 +0000 Minor changes. commit ca3782ca347f861af01437fca99d1009e73e6b7b Author: Adam Dickmeiss Date: Fri Sep 1 10:34:51 1995 +0000 Added dir.c commit f710512c0c71901f77629de5674177e8ee82e1ba Author: Adam Dickmeiss Date: Fri Sep 1 10:30:23 1995 +0000 More work on indexing. Not working yet. commit 4cb66a9e7b322dd58c9d52f1a660a271d6c384f4 Author: Adam Dickmeiss Date: Thu Aug 31 14:50:24 1995 +0000 New simple file index tool. commit 11034430cbb2df1afce15b6cac2bd01f6f8e0fbe Author: Adam Dickmeiss Date: Mon Feb 6 10:13:17 1995 +0000 Added dependencies to other libraries in Makefile. commit a4e74639ad8d0c5db0b5d52b9f8412a1a5b3228d Author: Adam Dickmeiss Date: Mon Feb 6 10:12:55 1995 +0000 Unused static function rm_SetElement was removed. commit 2a9e7dce6dcc0b206b3b5df4f7d3e4fb3ade3bfa Author: Adam Dickmeiss Date: Mon Feb 6 10:08:31 1995 +0000 CC inherited to sub Makefiles as CFLAGS. commit 1500f5fe8c94909acf30d8a698636079b123e39a Author: Adam Dickmeiss Date: Wed Jan 25 11:31:04 1995 +0000 Simple error reporting when parsing regular expressions. commit 4461019c0de49358856cb1c84ca162395b247f16 Author: Adam Dickmeiss Date: Wed Jan 25 11:30:50 1995 +0000 Simple error reporting when parsing regular expressions. Memory usage reduced. commit 2368d4bf1b93eaa6c65e7a7a678e290154a75efd Author: Adam Dickmeiss Date: Tue Jan 24 16:40:32 1995 +0000 Bug fix. commit 41194374db152313aa9a6c2d34053dc33aab180e Author: Adam Dickmeiss Date: Tue Jan 24 16:02:52 1995 +0000 New private header file in dfa module (dfap.h). Module no longer uses yacc to parse regular expressions. commit f03a35208f8b0fb19b79708c60153f6e522c1074 Author: Adam Dickmeiss Date: Tue Jan 24 16:01:30 1995 +0000 Added -ansi to CFLAGS. New functions and change of data structures. commit d8a3c1b4e3c628b65d6812348003c55d20056871 Author: Adam Dickmeiss Date: Tue Jan 24 16:01:02 1995 +0000 Added -ansi to CFLAGS. Use new API of dfa module. commit 6f5101be21e854a5125b489a03814cc7509236cc Author: Adam Dickmeiss Date: Tue Jan 24 16:00:20 1995 +0000 Added -ansi to CFLAGS. Some changes to the dfa module. commit f5dc6557f3074640f978efa62616868e0029cf93 Author: Adam Dickmeiss Date: Tue Jan 24 15:59:26 1995 +0000 Added -ansi to CFLAGS. commit 32728b02b69f42acf133a560d4afe8cae60c9a61 Author: Adam Dickmeiss Date: Tue Jan 24 11:25:11 1995 +0000 Removed stupid assertion. commit f513e774d5502d85c456b8a58eaea6d4851f8eaa Author: Sebastian Hammer Date: Wed Dec 14 11:04:15 1994 +0000 Added rset commit f9c392f9951e6e9ad9709999a43ba9d671c4b9c7 Author: Sebastian Hammer Date: Tue Nov 22 13:15:27 1994 +0000 Simple commit a631c2ef0ed672f05a1dfbd94d82ebbd2826d579 Author: Sebastian Hammer Date: Fri Nov 4 14:53:12 1994 +0000 Work commit a3d4af813384321d72efab01bedafdf7af97dac9 Author: Sebastian Hammer Date: Fri Nov 4 14:26:39 1994 +0000 bug-fix. commit affd7e4168d70b94e015b777748b7eca1cd00ec0 Author: Sebastian Hammer Date: Fri Nov 4 13:21:21 1994 +0000 Working. commit a57bdec6c84c3dcd2b657f2e2fd14b67be1b5881 Author: Sebastian Hammer Date: Thu Nov 3 14:13:22 1994 +0000 Result set manipulation commit f76bfc43f1d423a7a5e75cd04b7f198334691191 Author: Adam Dickmeiss Date: Thu Nov 3 14:03:25 1994 +0000 Removed module match.c commit 1be48ad78cce44fb509d90164e5b2723e4110c96 Author: Adam Dickmeiss Date: Tue Nov 1 09:45:51 1994 +0000 New module match. commit 54c25812d73fbe88953c635cca7448dc717a7c16 Author: Sebastian Hammer Date: Thu Oct 20 17:36:06 1994 +0000 Minimal commit add0a7acb2ab87d58b0f92c74a40fb63a631b2e3 Author: Sebastian Hammer Date: Thu Oct 20 17:35:48 1994 +0000 Added str. commit eb2bdda70aee57124ac4bcb3110f9280472d1dbd Author: Sebastian Hammer Date: Thu Oct 20 13:46:36 1994 +0000 String-management system commit 51b46dd90d3b447a4ba4548c0581f2380a35858d Author: Sebastian Hammer Date: Wed Oct 5 16:56:42 1994 +0000 Minor. commit 85b2d441e74a79f043ae9dd840e980a9888690a0 Author: Adam Dickmeiss Date: Wed Oct 5 16:54:52 1994 +0000 Minor changes. commit f4de458d85a4fdbc2f5a1db69007f87728984bef Author: Adam Dickmeiss Date: Wed Oct 5 16:54:25 1994 +0000 Added base in SUBDIR. commit 30bfffa1e13e0ebd1d7eac84518705e2fbcd955b Author: Adam Dickmeiss Date: Wed Oct 5 12:16:48 1994 +0000 Pagesize is a resource now. commit f8d11c9a16e0312c29e31fba8029f85fe0d9085c Author: Adam Dickmeiss Date: Wed Oct 5 10:47:31 1994 +0000 Small bug fix. commit f98085aa3a0c90d03aaef0f5495cb267ef6f2c38 Author: Adam Dickmeiss Date: Wed Oct 5 10:47:15 1994 +0000 Function pr_lru is non-static now. No warning no more. commit ffe8cdd7bafa4d1259beef161677b7dc7fc80431 Author: Adam Dickmeiss Date: Wed Oct 5 10:46:41 1994 +0000 Regexp.c is now deleted after make depend. commit cca64aeab0133fd05b411e2c4e9ee985b8a8c9f9 Author: Adam Dickmeiss Date: Wed Oct 5 10:46:15 1994 +0000 CFLAGS is inherited to make in subdirectories. commit 1b29b77f09ae310c41f9cd0a6eeea2d562b7729e Author: Adam Dickmeiss Date: Tue Oct 4 17:46:43 1994 +0000 Function options now returns arg with error option. commit 35c328bab4365f6404108702ffcbdb23fe5d910e Author: Adam Dickmeiss Date: Tue Oct 4 12:08:19 1994 +0000 Minor changes. commit a15e6ea036010b9e0f9be59e81461c8a4e894db4 Author: Adam Dickmeiss Date: Tue Oct 4 12:08:05 1994 +0000 Some bug fixes and some optimizations. commit e9b13c0966913e073e98f9c5d7c5f4deed7c4c46 Author: Adam Dickmeiss Date: Mon Oct 3 17:23:01 1994 +0000 First version of dictionary lookup with regular expressions and errors. commit c1ecb833ce85c0dc62550a4183975c7397bd4f7c Author: Adam Dickmeiss Date: Mon Oct 3 17:22:17 1994 +0000 Optimization of grepper. commit c9c9df90cf9d66e46b177e62a4402a9def633634 Author: Sebastian Hammer Date: Wed Sep 28 16:58:26 1994 +0000 Small mod. commit 60603b577514c9e6559d37e11b4ce3aa26e51be3 Author: Adam Dickmeiss Date: Wed Sep 28 13:07:08 1994 +0000 Use log_mask_str now. commit 4cffe59757ef27b3764029c39415a13a2756e0a1 Author: Adam Dickmeiss Date: Wed Sep 28 13:06:52 1994 +0000 Minor changes. commit 5b403723fdd074e1b510aa4fbe1e2685fda156e3 Author: Sebastian Hammer Date: Wed Sep 28 12:56:09 1994 +0000 Added access functions (ISPT) commit c2bc863fadfe038670d50483df9a3e80562108a5 Author: Sebastian Hammer Date: Wed Sep 28 12:32:17 1994 +0000 Trivial commit 0e643dd5ce707178394c0e9d82ec2eeb80f330ec Author: Sebastian Hammer Date: Wed Sep 28 11:56:25 1994 +0000 Added sort of input to is_merge commit b9087a03bcec441e67c314db88d87e0b0596b850 Author: Sebastian Hammer Date: Wed Sep 28 11:56:13 1994 +0000 Removed const from input to is_merge commit 260110f86881af35eecd7fe3ac9dfdda5615a365 Author: Sebastian Hammer Date: Wed Sep 28 11:29:28 1994 +0000 Added cmp parameter. commit a5545de18b5d3762a1f29569a4b10ca5017506db Author: Sebastian Hammer Date: Tue Sep 27 20:03:36 1994 +0000 Seems relatively bug-free. commit f5004e23c618ff466c82dda165f6a1c6c34400ec Author: Adam Dickmeiss Date: Tue Sep 27 16:31:40 1994 +0000 Added id-header. commit 25711769a3fb5c6bf0ab3eb9634bf74ba07dc48d Author: Adam Dickmeiss Date: Tue Sep 27 16:31:17 1994 +0000 First version of grepper: grep with error correction. commit 5c1d5fc3fe386e41537259b6268b510a1011c185 Author: Sebastian Hammer Date: Mon Sep 26 17:12:32 1994 +0000 Back again commit 5bcaf79fcb3264b26d896eb2bdda907cf9fb9f5f Author: Sebastian Hammer Date: Mon Sep 26 17:11:29 1994 +0000 Trivial commit 8fa8b7c5d10dd87654e5c219cceebe1a9664544a Author: Sebastian Hammer Date: Mon Sep 26 17:06:34 1994 +0000 Back again... commit 78e91b9656e1f6b9f47db50083b1dda4af66787f Author: Sebastian Hammer Date: Mon Sep 26 17:05:54 1994 +0000 Trivial. commit be5261b7025fd670361de0268978158eefac2a3c Author: Adam Dickmeiss Date: Mon Sep 26 16:31:23 1994 +0000 Minor changes. xmalloc declares xcalloc now. commit 76474239da7b68e6dd05b3cc7528b85cb3d29b84 Author: Adam Dickmeiss Date: Mon Sep 26 16:31:06 1994 +0000 Minor changes. commit f47681a8ea1b2374df333fb2993d8026558efd27 Author: Adam Dickmeiss Date: Mon Sep 26 16:30:55 1994 +0000 Minor changes. imalloc uses xmalloc now. commit 409b64ffe8a4b1a8bad39b49f9b65aabbd88ef6e Author: Sebastian Hammer Date: Mon Sep 26 16:19:25 1994 +0000 Mod to clean: commit 480542aaa179b4633b59d813628d34129c89f98b Author: Sebastian Hammer Date: Mon Sep 26 16:10:27 1994 +0000 Added isam. commit c6c40893444f2288cdea91d30dd92df0f285e67d Author: Sebastian Hammer Date: Mon Sep 26 16:07:52 1994 +0000 Most of the functionality in place. commit 769e5c9b42bf87531296013fac0af819af9228ee Author: Adam Dickmeiss Date: Mon Sep 26 10:17:42 1994 +0000 Dfa-module header files. commit c0e2fc3945dfd829a689f7da49e172c34511b0d0 Author: Adam Dickmeiss Date: Mon Sep 26 10:17:23 1994 +0000 Minor changes. commit ead74d0c3b9d76204494553c61854812eb69bbc7 Author: Adam Dickmeiss Date: Mon Sep 26 10:16:52 1994 +0000 First version of dfa module in alex. This version uses yacc to parse regular expressions. This should be hand-made instead. commit 9a28dfc683cc93e0d9fd1d0b74a59c69364df2ec Author: Adam Dickmeiss Date: Mon Sep 26 10:15:06 1994 +0000 Added dfa in SUBDIR. commit cfecd7d576e8de7cfa19751b8ec7eebf265b2346 Author: Adam Dickmeiss Date: Thu Sep 22 14:43:56 1994 +0000 First functional version of lookup with error correction. A 'range' specified the maximum number of insertions+deletions+substitutions. commit ddfc9499c27bb4b90797bab12868f629afee34e3 Author: Adam Dickmeiss Date: Thu Sep 22 10:45:14 1994 +0000 Facility for two types of depend. tail-type (1) of include-type (2). commit 1e358321d41635c4c8e2087c1953e0d1123d0589 Author: Adam Dickmeiss Date: Thu Sep 22 10:44:47 1994 +0000 Don't remember what changed!! commit 02ac0a77d27046442a63371dbf37ee5c0c452dee Author: Adam Dickmeiss Date: Thu Sep 22 10:43:34 1994 +0000 Two versions of depend. Type 1 is the tail-type compatible with all make programs. Type 2 is the GNU make with include facility. Type 2 is default. depend rule chooses current rule. commit ef495f3c3ac61351628014c7f186adb843d5286b Author: Adam Dickmeiss Date: Thu Sep 22 10:42:45 1994 +0000 Two versions of depend. Type 1 is the tail-type compatible with all make programs. Type 2 is the GNU make with include facility. Type 2 is default. Choose with 'make usedepend1/usedepend2'. commit cf70c27c7785e1936a7b39bf112bf53bb641ab30 Author: Sebastian Hammer Date: Thu Sep 22 10:38:34 1994 +0000 emoved isam commit 65f913b1b012be7e047bedcc318c069e9872d270 Author: Sebastian Hammer Date: Tue Sep 20 09:52:06 1994 +0000 Trivial commit f8a58c40f789bc7f0694ad085b6af815a5ee1fc3 Author: Adam Dickmeiss Date: Tue Sep 20 09:02:49 1994 +0000 Minor changes. commit efbf941bb7e3eae801149c6b50456dd50a2b127a Author: Adam Dickmeiss Date: Tue Sep 20 09:02:30 1994 +0000 Added Make distclean. This cleans up the system and removes dependancy lines in sub-Makefiles. This simplifies preparation of a distribution of alex. commit 7d5a1ac22a7be94fd8d6a65426bd087df4285ccd Author: Adam Dickmeiss Date: Mon Sep 19 16:34:25 1994 +0000 Depend rule change. Minor changes in dicttest.c commit eb2835ce4780c112020defac4b2ac24062858335 Author: Adam Dickmeiss Date: Mon Sep 19 16:34:06 1994 +0000 Depend rule change. commit f587e6f61f53290598daf0ed5fcdcae019811559 Author: Sebastian Hammer Date: Mon Sep 19 14:12:37 1994 +0000 dunno. commit 0035afa7de3e06c18bf2f559649f34913114ab46 Author: Adam Dickmeiss Date: Fri Sep 16 15:39:10 1994 +0000 Initial code of lookup - not tested yet. commit 23d6a0472bacd0b45446fcbb0629032b8b0d4cb6 Author: Sebastian Hammer Date: Fri Sep 16 14:41:12 1994 +0000 Added log warning to res_get_def commit 41fc0486307a3a1dd08282d1d2668fc384dbb201 Author: Sebastian Hammer Date: Fri Sep 16 14:37:12 1994 +0000 added res_get_def commit db1de35edac9f69ab05e4fdf2fc137bb21485488 Author: Adam Dickmeiss Date: Fri Sep 16 12:35:01 1994 +0000 New version of split_page which use clean_page for splitting. commit ec77ed2ec65bab40d8601b955d7f44b2ce6acc34 Author: Sebastian Hammer Date: Wed Sep 14 13:10:35 1994 +0000 Small changes commit 732d842eef3d8cac8e30adc69b53ebe588f4770f Author: Sebastian Hammer Date: Wed Sep 14 13:10:15 1994 +0000 Corrected some bugs in the init-phase commit 19fae05523bb7d129b51ee2f4f137390e68b8fbc Author: Adam Dickmeiss Date: Mon Sep 12 14:36:20 1994 +0000 Bug fix of .depend include. commit 81238bdcd599682ea14080db50622889310017ea Author: Adam Dickmeiss Date: Mon Sep 12 08:06:41 1994 +0000 Futher development of insert.c commit 2fdd6275d8becc9c2317bd2b23daa3c569926392 Author: Sebastian Hammer Date: Mon Sep 12 08:02:07 1994 +0000 Not functional yet commit b6918ef00ac2a731bb22b68e08b2df3b670ec589 Author: Sebastian Hammer Date: Mon Sep 12 08:01:41 1994 +0000 Small commit a91dfbe03b8d58265ea20e06e0e8849e3f9e24b3 Author: Adam Dickmeiss Date: Tue Sep 6 13:05:12 1994 +0000 Further development of insertion. Some special cases are not properly handled yet! assert(0) are put here. The binary search in each page definitely reduce usr CPU. commit 58494fa0c8c5fc858b71c61d363a31d9acf7153c Author: Sebastian Hammer Date: Tue Sep 6 13:02:29 1994 +0000 Removed const from res_get commit 00f6dd34f9327e3a61fc7bf5b33099b73bde65fb Author: Sebastian Hammer Date: Tue Sep 6 13:01:03 1994 +0000 Removed const from declaration of res_get commit 6267fd01b3e62d480be6a36991675ad0b04948ac Author: Sebastian Hammer Date: Fri Sep 2 14:58:38 1994 +0000 Minimal commit fce9be55596777837da1aa577ae66c193f80ff48 Author: Sebastian Hammer Date: Fri Sep 2 14:56:06 1994 +0000 Added -pedantic commit 1be0464201292e60fc8dcd3b922d9c4c4ac52d41 Author: Adam Dickmeiss Date: Thu Sep 1 17:49:36 1994 +0000 Removed stupid line. Work on insertion in dictionary. Not finished yet. commit 07b655993910c9f687c7a114ae8265f76cb8794a Author: Adam Dickmeiss Date: Thu Sep 1 17:45:14 1994 +0000 Work on resource manager. CVS ---------------------------------------------------------------------- commit 0d5f91c2b9df496e9442cfa76c67d1904e6e4fb0 Author: Adam Dickmeiss Date: Thu Sep 1 17:44:40 1994 +0000 Work on insertion in dictionary. Not finished yet. CVS ---------------------------------------------------------------------- commit f9c29149e90d3710b0d6f2d6a7a4cffcba401fe6 Author: Adam Dickmeiss Date: Thu Sep 1 17:43:58 1994 +0000 depend include change. CVS ---------------------------------------------------------------------- commit e350729bba130eb3266687ee563a235e1e0248b3 Author: Adam Dickmeiss Date: Thu Sep 1 17:43:41 1994 +0000 depend rule change. CVS ---------------------------------------------------------------------- commit cabb80a2863faba1804a02c6ba3b8b2a7970f3e6 Author: Sebastian Hammer Date: Thu Sep 1 15:36:43 1994 +0000 Fixed weird problem with subdirectories. commit 9093a8876a4cdc25b8ccdb36940f51d9008aa1a7 Author: Sebastian Hammer Date: Thu Sep 1 14:51:07 1994 +0000 Allowed mf_write to write beyond eof+1. commit a0f051c2259b7c3c2d6619fb400684e6a5028b71 Author: Sebastian Hammer Date: Thu Aug 25 10:15:54 1994 +0000 Trivial commit bae5c11f9676cfe8f6d11c2d6442094d67711e79 Author: Sebastian Hammer Date: Thu Aug 25 08:59:22 1994 +0000 Added -pedantic commit 6a294d61f599405cbf16151b3fb436e454014693 Author: Sebastian Hammer Date: Wed Aug 24 09:37:17 1994 +0000 Changed reaction to read return values. commit f28af032bfde7cf88aaf3d186a4bfd43694f9ec4 Author: Sebastian Hammer Date: Wed Aug 24 08:45:48 1994 +0000 Using mfile. commit 83f7d8e05b21112744575aece533b2bc62610f2a Author: Sebastian Hammer Date: Tue Aug 23 15:03:34 1994 +0000 *** empty log message *** commit 578dd70f12b83f52068e882335c322ddb9ebe2dc Author: Sebastian Hammer Date: Tue Aug 23 14:50:48 1994 +0000 Fixed mf_close(). commit c21b4dfa41fcfac68da13d9133d3cb1d2b1c3dd5 Author: Sebastian Hammer Date: Tue Aug 23 14:41:46 1994 +0000 First functional version of mfile. commit f69ee5ec6b2a86b7ac049992c19b9b0410705404 Author: Sebastian Hammer Date: Tue Aug 23 14:41:32 1994 +0000 First functional version. commit 15cc9ba9f620849435a5096494433b1c4cd9ffe6 Author: Sebastian Hammer Date: Tue Aug 23 14:25:45 1994 +0000 Added O_CREAT because some geek wanted it. Sheesh. commit 55b3403a2c1fea0409facae576925bb17ee85f79 Author: Sebastian Hammer Date: Tue Aug 23 14:21:38 1994 +0000 Fixed call to log commit 1c1b8151931733a9cabfe0a3482c462518e7eea8 Author: Sebastian Hammer Date: Thu Aug 18 14:09:42 1994 +0000 Added common.o commit 2f0932393fb205b2e9b941db50cf5aebfba5c385 Author: Adam Dickmeiss Date: Thu Aug 18 12:40:52 1994 +0000 Some development of dictionary. Not finished at all! commit 5ea84896a9b5edc8675f3646762e8ef906d6a307 Author: Adam Dickmeiss Date: Thu Aug 18 11:02:27 1994 +0000 Implementation of res_write. commit 4f7ad627a0b5b949b051aa603e05c3418de06977 Author: Adam Dickmeiss Date: Thu Aug 18 11:02:08 1994 +0000 For fun: make wc option. commit 04b60639ac0ea45d8e9712014b01703cc3ac69cd Author: Adam Dickmeiss Date: Thu Aug 18 10:02:00 1994 +0000 Module alexpath moved from res.c to alexpath.c. Minor changes in res-test.c commit ceeaeb9e63dfb8d03a084bbbc71e382d63251089 Author: Adam Dickmeiss Date: Thu Aug 18 09:43:49 1994 +0000 Development of resource manager. Only missing is res_write. commit a337047e724401bc134d664c485c91f2c54646f5 Author: Adam Dickmeiss Date: Thu Aug 18 09:43:04 1994 +0000 Added res_trav. Major changes of prototypes. commit ef1c39f21b1b58239428deb8c0fa43a16a37f254 Author: Adam Dickmeiss Date: Thu Aug 18 08:23:26 1994 +0000 Res.c now use handles. xmalloc defines xstrdup. commit dab34f8036ba87c6f16c2b769b3d4f54a9515cf3 Author: Adam Dickmeiss Date: Thu Aug 18 08:22:26 1994 +0000 Res.h modified. xmalloc now declares xstrdup. commit 99040ac4817ccb7520a6b6464b1661215e3c1721 Author: Sebastian Hammer Date: Thu Aug 18 08:21:02 1994 +0000 Tiny mod. commit 9f518dd2725fcb7447e1b38c05c4693e31da850c Author: Sebastian Hammer Date: Thu Aug 18 08:10:08 1994 +0000 Minimal changes commit bcec4e6910fd9deec73600485b5698e47e58522e Author: Adam Dickmeiss Date: Wed Aug 17 15:38:28 1994 +0000 Include of util.h. commit eeeef32ed125d915df0676771e03bf65fd8f5e24 Author: Adam Dickmeiss Date: Wed Aug 17 15:38:03 1994 +0000 Use new version of bf_read, bf_write. commit 146a66bc15816555b4e233e5b9d224ce91ab94ee Author: Adam Dickmeiss Date: Wed Aug 17 15:34:14 1994 +0000 Initial version of resource manager. commit 739c40544bc2451275f046134d096241a6304796 Author: Sebastian Hammer Date: Wed Aug 17 14:27:32 1994 +0000 last mods commit 9f7f4a69fb26c39ff7e721927557908e75baaa9c Author: Sebastian Hammer Date: Wed Aug 17 14:10:41 1994 +0000 *** empty log message *** commit 6b0c8f4e80bf16ab4e610d2541e008472d226990 Author: Sebastian Hammer Date: Wed Aug 17 14:09:47 1994 +0000 Small changes commit 49f85cf78262660f8b923d0d6cff9e58acac0ed9 Author: Sebastian Hammer Date: Wed Aug 17 14:09:32 1994 +0000 Compiles cleanly (still only dummy. commit 461e9d67822f7f6ae72a0522cb6e9960dedae501 Author: Sebastian Hammer Date: Wed Aug 17 13:55:07 1994 +0000 Deleted commit df82693c96b0691db2508139dea6fc4a03766193 Author: Adam Dickmeiss Date: Wed Aug 17 13:37:40 1994 +0000 dictionary internal cache modules. commit d044e3c323529a39ffd00d493cacb5c74f2c544d Author: Adam Dickmeiss Date: Wed Aug 17 13:32:49 1994 +0000 xmalloc in util. commit cf0045decc8edc53834fffc1eadf8a634cf81381 Author: Adam Dickmeiss Date: Wed Aug 17 13:32:18 1994 +0000 Use cache in dict - not in bfile. commit 4186e44a259b3982abc5f11c68973bfb05ea6615 Author: Adam Dickmeiss Date: Wed Aug 17 13:31:32 1994 +0000 No longer in use. commit 7ac32b15aa833b8a65cf56cae6b6d8ba6e0e9b18 Author: Adam Dickmeiss Date: Wed Aug 17 13:31:21 1994 +0000 Minor changes. commit d2997445f8e795379c44a84fd15c721956c66d51 Author: Sebastian Hammer Date: Wed Aug 17 13:23:14 1994 +0000 First version Added log.c commit d85ba8229dd219b347edb30933dad2874ea87eaf Author: Adam Dickmeiss Date: Tue Aug 16 16:33:17 1994 +0000 Added make clean. commit 3c5ad6ec79e41c91b818e9953b08c6217795693d Author: Adam Dickmeiss Date: Tue Aug 16 16:26:37 1994 +0000 Added dict. commit 3dd5f15cf91fe4ee7f957121cb683c57767106f5 Author: Adam Dickmeiss Date: Tue Aug 16 16:21:47 1994 +0000 Added bfile. commit 0a7aae7ab05e08e92b8d3cfd1ff68942f4321fea Author: Adam Dickmeiss Date: Tue Aug 16 16:19:23 1994 +0000 Cached files with fixed block size. commit 69ae704e275bf69059f261e63635c96e9fa6eab1 Author: Adam Dickmeiss Date: Tue Aug 16 16:16:02 1994 +0000 bfile header created. commit 4e6039cb4b7f882945e966bbf988f65047806079 Author: Adam Dickmeiss Date: Tue Aug 16 16:15:48 1994 +0000 Preparing for subdirs. commit 4a3c83ef0b8546dfef27e595f756893e3b082c0e Author: Adam Dickmeiss Date: Tue Aug 16 15:57:21 1994 +0000 The first utility modules. commit 386ab4adf8b562cecc5d4a0156a881e40e8b54d3 Author: Sebastian Hammer Date: Tue Aug 16 15:33:25 1994 +0000 Initial revision idzebra-2.0.44/idzebra-config-2.0.in0000755000175000017500000000510611412332551013654 00000000000000#!/bin/sh version=@VERSION@ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ echo_cflags=no echo_libs=no echo_help=no echo_tab=no echo_source=yes echo_lalibs=no echo_modules=no idzebra_src_root=@IDZEBRA_SRC_ROOT@ idzebra_build_root=@IDZEBRA_BUILD_ROOT@ package_suffix=@PACKAGE_SUFFIX@ extralibs="@YAZLIB@ @TCL_LIB@ @EXPAT_LIBS@ @LIBS@ " extralalibs="@YAZLALIB@ @TCL_LIB@ @EXPAT_LIBS@ @LIBS@" usage() { cat <&2 fi if test "$echo_cflags" = "yes"; then echo $IDZEBRAINC fi if test "$echo_libs" = "yes"; then echo $IDZEBRALIB fi if test "$echo_lalibs" = "yes"; then echo $IDZEBRALALIB fi if test "$echo_tab" = "yes"; then echo $IDZEBRATAB fi if test "$echo_modules" = "yes"; then echo $IDZEBRAMOD fi # Local Variables: # mode:shell-script # sh-indentation: 2 # sh-basic-offset: 4 # End: idzebra-2.0.44/tab/0000755000175000017500000000000011412336534010772 500000000000000idzebra-2.0.44/tab/string.chr0000644000175000017500000000132311412332551012710 00000000000000# Generic character map. # # Define the basic value-set. *Beware* of changing this without re-indexing # your databases. lowercase {0-9}{a-y}üzæäøöå uppercase {0-9}{A-Y}ÜZÆÄØÖÅ # Breaking characters space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~ # Characters to be considered equivalent for searching purposes. # equivalent æä(ae) # equivalent øö(oe) # equivalent å(aa) # equivalent uü # Supplemental mappings #map (ä) ä #map (æ) æ #map (ø) ø #map (å) å #map (ö) ö #map (Ä) Ä #map (&Aelig;) Æ #map (Ø) Ø #map (Å) Å #map (Ö) Ö #map éÉ e #map á a #map ó o #map í i #map (Aa) (AA) #map (aa) a idzebra-2.0.44/tab/refer.flt0000644000175000017500000000137411057500746012534 00000000000000# # Experimental format for the HCI bibliography # BEGIN { begin record meta } /^%T / { end element; begin element title } /^%A / { end element; begin element author } /^%X / { end element; begin element abstract } /^%B / { end element; begin element source } /^%I / { end element; begin element publicationPlace } /^%D / { end element; begin element publicationDate } /^%S / { end element; begin element subject } # /^%K / { end element; begin element subject } /^%Z / { end element; begin element relation } /^%. / { end element } /^$/ { end record } /\n/ { data " " } idzebra-2.0.44/tab/wais.abs0000644000175000017500000000056111412332551012341 00000000000000# WAIS profile # name wais reference WAIS-schema attset bib1.att tagset generic.tag varset var1.var esetname B wais-b.est esetname F @ esetname VARIANT wais-variant.est elm (2,1) Title !:p,!:w elm (2,7) Name !:p,!:w elm (2,8) Date ! elm (1,18) Score - elm (1,14) RecordId Local-number # Tags below this point are unofficial. elm Body BodyOfText ! idzebra-2.0.44/tab/soif.flt0000644000175000017500000000656411057500746012377 00000000000000# Crude input-filter for SOIF records -- one record per file. # Author: Peter Valkenburg / TERENA (valkenburg@terena.nl) # Version 0.2 (09/09/1998). # This sort of follows the Nordic Web Index convention of GILS attribute use. # Modified by Kang-Jin Lee (lee@arco.de) # 07/10/1999 # We'll use GILS structured records. BEGIN { begin record gils } # URL will be GILS' availability/linkage /^@[A-Za-z](-|[.A-Za-z_])* { / BODY /$/ { begin element availability data -element linkage $1 end element } # Type will be GILS' availability/linkageType /^[tT]ype{[0-9]+}:\t/ BODY /$/ { begin element availability data -element linkageType $1 end element } # Last modification time will be Bib-1 Use Attribute 1012 /^[lL]ast-[mM]odification-[tT]ime{[0-9]+}:\t/ BODY /$/ { data -element dateOfLastModification $1 } # The MD5 checksum is used as a unique identifier under Bib-1 Use Attribute 1007 /^[mM][dD]5{[0-9]+}:\t/ BODY /$/ { data -element controlIdentifier $1 } # Description will be Bib-1 Use Attribute 62 /^[dD]escription{[0-9]+}:\t/ BODY /^((-|[._A-Za-z0-9])+{[0-9]+}:\t.*|})$/ { data -element abstract $1 unread 2 } # Author will be Bib-1 Use Attribute 1003 (if gils.abs maps originator to it!!) /^[aA]uthor{[0-9]+}:\t/ BODY /^((-|[._A-Za-z0-9])+{[0-9]+}:\t.*|})$/ { data -element author $1 unread 2 } # Keywords will be GILS' localSubjectIndex/localSubjectTerm /^[kK]eywords{[0-9]+}:\t/ BODY /^((-|[._A-Za-z0-9])+{[0-9]+}:\t.*|})$/ { begin element localSubjectIndex data -element localSubjectTerm $1 unread 2 end element } # File-size will be GILS' supplementalInformation/bytes /^[fF]ile-[sS]ize{[0-9]+}:\t/ BODY /$/ { begin element supplementalInformation data -element bytes $1 unread 2 end element } # Update-Time will be GILS' supplementalInformation/lastChecked /^[uU]pdate-[tT]ime{[0-9]+}:\t/ BODY /$/ { begin element supplementalInformation data -element lastChecked $1 unread 2 end element } # url-references will be GILS' crossReference/linkage /^[uU]rl-[rR]eferences{[0-9]+}:\t/ BODY /^((-|[._A-Za-z0-9])+{[0-9]+}:\t.*|})$/ { begin element crossReference data -element linkage $1 unread 2 end element } # Title will be Bib-1 Use Attribute 4 /^[tT]itle{[0-9]+}:\t/ BODY /^((-|[._A-Za-z0-9])+{[0-9]+}:\t.*|})$/ { data -element Title $1 unread 2 } # Body and Partial-Text will be Bib-1 Use Attribute 1010 # Is Body really commonly used in SOIF? Anyway, Full-Text is used by Harvest. #/^[bB]ody{[0-9]+}:\t/ BODY /^((-|[._A-Za-z0-9])+{[0-9]+}:\t.*|})$/ { # data -element sampleText $1 # unread 2 # } /^[fF]ull-[tT]ext{[0-9]+}:\t/ BODY /^((-|[._A-Za-z0-9])+{[0-9]+}:\t.*|})$/ { data -element sampleText $1 unread 2 } /^[pP]artial-[tT]ext{[0-9]+}:\t/ BODY /^((-|[._A-Za-z0-9])+{[0-9]+}:\t.*|})$/ { data -element sampleText $1 unread 2 } /^(-|[a-zA-Z0-9])+{[0-9]+}:\t/ BODY /^((-|[_A-Za-z0-9])+{[0-9]+}:\t.*|})$/ { unread 2 } END { end record } idzebra-2.0.44/tab/hci.flt0000644000175000017500000000132011057500746012163 00000000000000# # Experimental format for the HCI bibliography # BEGIN { begin record meta } /^%T / { end element; begin element title } /^%A / { end element; begin element author } /^%X / { end element; begin element abstract } /^%B / { end element; begin element source } /^%I / { end element; begin element publicationPlace } /^%D / { end element; begin element publicationDate } /^%S / { end element; begin element subject } /^%K / { end element; begin element subject } /^%Z / { end element; begin element relation } # /./ { data } END { end record } idzebra-2.0.44/tab/gils.att0000644000175000017500000000533411412332551012362 00000000000000name gils reference GILS-attset include bib1.att att 2000 Distributor att 2001 Distributor-Name att 2002 Index-Terms # Subject-Terms-Contr. att 2003 Purpose att 2004 General-Access-Constraints att 2005 Use-Constraints att 2006 Distributor-Organization att 2007 Distributor-Street-Address att 2008 Distributor-City att 2009 Distributor-State-or-Province att 2010 Distributor-Zip-or-Postal-Code att 2011 Distributor-Country att 2012 Distributor-Network-Address att 2013 Distributor-Hours-of-Service att 2014 Distributor-Telephone att 2015 Distributor-Fax att 2016 Resource-Description att 2017 Order-Information att 2018 Technical-Prerequisites att 2019 Available-Time-Structured att 2020 Available-Time-Textual att 2021 Linkage att 2022 Linkage-Type att 2023 Contact-Name att 2024 Contact-Organization att 2025 Contact-Street-Address att 2026 Contact-City att 2027 Contact-State-or-Province att 2028 Contact-Zip-or-Postal-Code att 2029 Contact-Country att 2030 Contact-Network-Address att 2031 Contact-Hours-of-Service att 2032 Contact-Telephone att 2033 Contact-Fax att 2034 Agency-Program att 2035 Sources-of-Data att 2036 Subject-Thesaurus att 2037 Methodology att 2038 West-Bounding-Coordinate att 2039 East-Bounding-Coordinate att 2040 North-Bounding-Coordinate att 2041 South-Bounding-Coordinate att 2042 Place-Keyword att 2043 Place-Keyword-Thesaurus att 2044 Time-Period-Structured att 2045 Time-Period-Textual att 2046 Cross-Reference-Title att 2047 Cross-Reference-Linkage att 2049 Original-Control-Identifier att 2050 Supplemental-Information att 2051 Record-Review-Date att 2052 Originator-Dissemination-Control att 2053 Security-Classification-Control att 2054 Cost att 2055 Cost-Information att 2056 Schedule-Number att 2057 Controlled-Subject-Index att 2058 Uncontrolled-Term att 2059 Spatial-Domain att 2060 Bounding-Coordinates att 2061 Place att 2062 Time-Period att 2063 Availability att 2064 Order-Process att 2065 Available-Time-Period att 2066 Access-Constraints att 2067 Point-of-Contact att 2068 Cross-Reference att 2069 Available-Linkage att 2070 Cross-Reference-Relationship att 2071 Language-of-Record att 2072 Beginning-Date att 2073 Ending-Date att 2074 Controlled-Term idzebra-2.0.44/tab/numeric.chr0000644000175000017500000000035311412332551013046 00000000000000# Numeric character map # # Define the basic value-set. *Beware* of changing this without re-indexing # your databases. lowercase -{0-9}., uppercase -{0-9}., # Breaking characters space {\001-\040}!"#$%&'\()*+/:;<=>?@\[\\]^_`\{|}~ idzebra-2.0.44/tab/words-icu-da.xml0000644000175000017500000000031411412332551013723 00000000000000 idzebra-2.0.44/tab/gils-f.est0000644000175000017500000000002011412332551012573 00000000000000simpleelement ? idzebra-2.0.44/tab/wais-b.est0000644000175000017500000000017111057500746012613 00000000000000# # WAIS eset. # simpleelement (2,1) simpleelement (2,7) simpleelement (1,16) simpleelement (1,18) simpleelement (1,14) idzebra-2.0.44/tab/gils.abs0000644000175000017500000001532411412332551012337 00000000000000# This is the abstract syntax (and most of the top-level profile info) # for GILS version 2. # name gils reference GILS-schema attset gils.att tagset gils.tag varset var1.var maptab gils-usmarc.map maptab gils-summary.map # Element set names esetname VARIANT gils-variant.est # for WAIS-compliance esetname B gils-b.est esetname G gils-g.est esetname W gils-b.est # We don't really do bodyOfDisplay yet. esetname F @ systag sysno none all Any elm (1,1) schemaIdentifier - elm (1,10) rank - elm (1,12) url - elm (1,14) localControlNumber - elm (2,1) title !:w,!:p,!:s elm (4,52) originator author-name-corporate # # Additional structuring of originator non-standard. # elm (4,52)/(2,7) originatorName author-name-corporate elm (4,52)/(2,10) originatorOrganization author-name-corporate elm (4,52)/(4,2) originatorStreetAddress author-name-corporate elm (4,52)/(4,3) originatorCity author-name-corporate elm (4,52)/(4,4) originatorStateOrProvince author-name-corporate elm (4,52)/(4,5) originatorZipOrPostalCode author-name-corporate elm (4,52)/(2,16) originatorCountry author-name-corporate elm (4,52)/(2,12) originatorNetworkAddress author-name-corporate elm (4,52)/(4,6) originatorHoursofService author-name-corporate elm (4,52)/(2,14) originatorTelephone author-name-corporate elm (4,52)/(2,15) originatorFax author-name-corporate elm (2,2) author ! # # Additional structuring of author non-standard. # elm (2,2)/(2,7) authorName author elm (2,2)/(2,10) authorOrganization author elm (2,2)/(4,2) authorStreetAddress author elm (2,2)/(4,3) authorCity author elm (2,2)/(4,4) authorStateOrProvince author elm (2,2)/(4,5) authorZipOrPostalCode author elm (2,2)/(2,16) authorCountry author elm (2,2)/(2,12) authorNetworkAddress author elm (2,2)/(4,6) authorHoursofService author elm (2,2)/(2,14) authorTelephone author elm (2,2)/(2,15) authorFax author elm (2,4) dateOfPublication ! elm (2,3) placeOfPublication place-publication elm (4,32) languageOfResource code-language elm (2,6) abstract ! elm (4,95) controlledSubjectIndex - elm (4,95)/(4,21) subjectThesaurus - elm (4,95)/(4,96) subjectTermsControlled controlled-subject-index elm (4,95)/(4,96)/(4,20) controlledTerm index-terms elm (4,97) subjectTermsUncontrolled uncontrolled-term elm (4,97)/(4,22) uncontrolledTerm uncontrolled-term elm (4,71) spatialDomain ! elm (4,71)/(4,91) boundingCoordinates ! elm (4,71)/(4,91)/(4,9) westBoundingCoordinate !:n elm (4,71)/(4,91)/(4,10) eastBoundingCoordinate !:n elm (4,71)/(4,91)/(4,11) northBoundingCoordinate !:n elm (4,71)/(4,91)/(4,12) southBoundingCoordinate !:n elm (4,71)/(4,92) place ! elm (4,71)/(4,92)/(4,14) placeKeywordThesaurus - elm (4,71)/(4,92)/(4,13) placeKeyword place elm (4,93) timePeriod ! elm (4,93)/(4,16) timePeriodTextual ! elm (4,93)/(4,101) timePeriodStructured ! elm (4,93)/(4,101)/(4,15) beginningDate ! elm (4,93)/(4,101)/(4,36) endingDate ! elm (4,70) availability ! elm (4,70)/(4,33) medium material-type elm (4,70)/(4,90) distributor ! elm (4,70)/(4,90)/(2,7) distributorName ! elm (4,70)/(4,90)/(2,10) distributorOrganization ! elm (4,70)/(4,90)/(4,2) distributorStreetAddress ! elm (4,70)/(4,90)/(4,3) distributorCity ! elm (4,70)/(4,90)/(4,4) distributorStateOrProvince ! elm (4,70)/(4,90)/(4,5) distributorZipOrPostalCode ! elm (4,70)/(4,90)/(2,16) distributorCountry ! elm (4,70)/(4,90)/(2,12) distributorNetworkAddress ! elm (4,70)/(4,90)/(4,6) distributorHoursofService ! elm (4,70)/(4,90)/(2,14) distributorTelephone ! elm (4,70)/(4,90)/(2,15) distributorFax ! elm (4,70)/(4,7) resourceDescription ! elm (4,70)/(4,55) orderProcess ! elm (4,70)/(4,55)/(4,28) orderInformation ! elm (4,70)/(4,55)/(4,29) cost ! elm (4,70)/(4,55)/(4,30) costInformation ! elm (4,70)/(4,8) technicalPrerequisites ! elm (4,70)/(4,93) availableTimePeriod ! elm (4,70)/(4,93)/(4,16) availableTimeTextual ! elm (4,70)/(4,93)/(4,102) availableTimeStructured ! elm (4,70)/(4,93)/(4,102)/(4,15) beginningDate available-time-structured elm (4,70)/(4,93)/(4,102)/(4,36) endingDate available-time-structured elm (4,70)/(4,99) availableLinkage ! elm (4,70)/(4,99)/(4,18) linkageType ! elm (4,70)/(4,99)/(4,17) linkage available-linkage:u,linkage:u elm (4,57) sourcesOfData ! elm (4,58) methodology ! elm (4,53) accessConstraints ! elm (4,53)/(4,25) generalAccessConstraints ! elm (4,53)/(4,26) originatorDisseminationControl ! elm (4,53)/(4,27) securityClassificationControl ! elm (4,54) useConstraints ! elm (4,94) pointOfContact ! elm (4,94)/(2,7) contactName ! elm (4,94)/(2,10) contactOrganization ! elm (4,94)/(4,2) contactStreetAddress ! elm (4,94)/(4,3) contactCity ! elm (4,94)/(4,4) contactStateOrProvince ! elm (4,94)/(4,5) contactZipOrPostalCode ! elm (4,94)/(2,16) contactCountry ! elm (4,94)/(2,12) contactNetworkAddress ! elm (4,94)/(4,6) contactHoursOfService ! elm (4,94)/(2,14) contactTelephone ! elm (4,94)/(2,15) contactFax ! elm (4,59) supplementalInformation - elm (4,51) purpose ! elm (4,56) agencyProgram ! elm (4,98) crossReference ! elm (4,98)/(2,1) crossReferenceTitle ! elm (4,98)/(4,35) crossReferenceRelationship ! elm (4,98)/(4,100) crossReferenceLinkage ! elm (4,98)/(4,100)/(4,18) linkageType - elm (4,98)/(4,100)/(4,17) linkage cross-reference-linkage:u elm (4,31) scheduleNumber ! elm (4,1) controlIdentifier identifier-standard elm (4,23) originalControlIdentifier ! elm (4,19) recordSource ! elm (4,34) languageOfRecord ! elm (1,16) dateOfLastModification date/time-last-modified:w,date/time-last-modified:s elm (4,24) recordReviewDate ! idzebra-2.0.44/tab/gils-g.est0000644000175000017500000000045011412332551012603 00000000000000simpleelement (1,1) simpleelement (1,10) simpleelement (1,12) simpleelement (2,1) simpleelement (1,14) simpleelement (1,16) simpleelement (4,1) simpleelement (4,52) simpleelement (4,98) # # These are not formally required by GILS # simpleelement (4,59) simpleelement (4,70) simpleelement (4,97) idzebra-2.0.44/tab/summary.abs0000644000175000017500000000113311412332551013067 00000000000000# Summary record abstract syntax # name summary tagset summary.tag attset bib1.att reference Summary elm (4,0) title ! elm (4,1) author ! elm (4,2) callNumber - elm (4,3) recordType - elm (4,4) bibliographicLevel - elm (4,5) formats - elm (4,5)/(4,6) format - elm (4,5)/(4,6)/(4,7) format-type - elm (4,5)/(4,6)/(4,8) format-size - elm (4,5)/(4,6)/(4,9) format-bestPosn - elm (4,10) publicationPlace - elm (4,11) publicationDate - elm (4,12) targetSystemKey - elm (4,13) satisfyingElement - elm (4,14) rank - elm (4,15) documentId - elm (4,16) otherInformation - idzebra-2.0.44/tab/generic.tag0000644000175000017500000000015011412332551013012 00000000000000# Generic tags - including tagsetM and tagsetG. # name generic include tagsetm.tag include tagsetg.tag idzebra-2.0.44/tab/meta.tag0000644000175000017500000000007111057500746012336 00000000000000name meta type 4 include tagsetg.tag include tagsetm.tag idzebra-2.0.44/tab/summary.tag0000644000175000017500000000102211412332551013072 00000000000000# Tagset for Summary profile # name summary type 4 tag 0 title string tag 1 author string tag 2 callNumber string tag 3 recordType string tag 4 bibliographicLevel string tag 5 formats structured tag 6 format structured tag 7 type string tag 8 size numeric tag 9 bestPosn numeric tag 10 publicationPlace string tag 11 publicationDate string tag 12 targetSystemKey string tag 13 satisfyingElement string tag 14 rank numeric tag 15 documentId string tag 16 abstract string tag 17 otherInformation structured idzebra-2.0.44/tab/mail.flt0000644000175000017500000000050211412332551012333 00000000000000BEGIN { begin record wais } /^From:/ BODY /$/ { data -element name $1 } /^Subject:/ BODY /$/ { data -element title $1 } /^Date:/ BODY /$/ { data -element date $1 } /^$/ BODY /^From / { data -text -element Body $1 unread 2 end record } idzebra-2.0.44/tab/gils-variant.est0000644000175000017500000000061011057500746014027 00000000000000# # This is the WAIS VARIANT element set description. # The empty variant parameters to the simpleelement statements simply # override the default. # defaultvariantrequest (9,1,@) (6,5,@) # No data; variant list. simpleelement (1,10) variant simpleelement (1,12) variant simpleelement (2,1) variant simpleelement (2,6) simpleelement (1,14) variant simpleelement (4,1) simpleelement (4,52) idzebra-2.0.44/tab/words-icu.xml0000644000175000017500000000031111412332551013336 00000000000000 idzebra-2.0.44/tab/gils-a.est0000644000175000017500000000022011057500746012600 00000000000000simpleelement (1,10) simpleelement (1,12) simpleelement (2,1) simpleelement (1,14) simpleelement (4,1) simpleelement (4,52) simpleelement (2,6) idzebra-2.0.44/tab/usmarc.tag0000644000175000017500000000022411412332551012672 00000000000000# Pseudo-tagset for USMARC # name usmarc type 4 include tagsetm.tag #tag 1 a string #tag 2 b string tag 245 245 string tag 100 100 string idzebra-2.0.44/tab/usmarc-b.est0000644000175000017500000000021211057500746013136 00000000000000simpleelement (3,'001) simpleelement (3,'035) simpleelement (3,'245) simpleelement (3,'100) simpleelement (3,'710) simpleelement (3,'700) idzebra-2.0.44/tab/meta-usmarc.map0000644000175000017500000000105511412332551013623 00000000000000# Meta to USMARC conversion targetname usmarc targetref USmarc map localControlNumber /(3,001) map dateLastModified /(3,005) map subject /(3,653)/(3,a) map title /(3,245)/(3,a) map author /(3,700)/(3,a) map publisher /(3,260)/(3,b) map otheragent /(3,710)/(3,a) map date /(3,260)/(3,c) map identifier /(3,024)/(3,a) # objectType skipped for now map form /(3,538)/(3,a) map relation /(3,787)/(3,a) # complexity here map language /(3,041)/(3,a) map source /(3,786)/(3,a) # coverage skipped for now map abstract /(3,520)/(3,a) idzebra-2.0.44/tab/news.flt0000644000175000017500000000041411412332551012367 00000000000000BEGIN { begin record wais } /^From:/ BODY /$/ { data -element name $1 } /^Subject:/ BODY /$/ { data -element title $1 } /^Date:/ BODY /$/ { data -element dateOfLastModification $1 } /^$/ BODY END { begin element Body data -text $1 end record } idzebra-2.0.44/tab/usmarc.mar0000644000175000017500000000014711412332551012702 00000000000000name usmarc reference USmarc # Defines implementation codes (offset 6..9) #implementation-codes ABCD idzebra-2.0.44/tab/sgml.flt0000644000175000017500000000050711412332551012360 00000000000000BEGIN /\n*\n*/ { begin record $2 } /\n*<[Vv][Aa][Rr][ ]+/ /[^ >]+/ /[ ]+/ /[^ >]+/ /[ ]+/ /[^ >]+/ /[ ]*>/ { begin variant $1 $3 $5 } /\n*\n*/ { begin element $1 } /\n*<\// BODY />\n*/ { end element -record } /[ \n\t]+/ { data " " } idzebra-2.0.44/tab/usmarc.abs0000644000175000017500000000162411412332551012671 00000000000000name usmarc reference USmarc attset bib1.att tagset usmarc.tag marc usmarc.mar esetname B usmarc-b.est esetname F @ all any # All 245 subfields mapped to title (word) and # 245 subfield a mapped to tile (phrase). elm 245 title - elm 245/? title !:w elm 245/?/a title !:w,!:p # 100 mapped to Author-name-personal and Author. elm 100 Author-name-personal - elm 100/? Author-name-personal !:w,!:p,Author:w,Author:p # 110 mapped to Author-name-corporate and Author elm 110 Author-name-corporate - elm 110/? Author-name-corporate !:w,!:p,Author:w,Author:p # 111 mapped to Author-name-conference and Author elm 111 Author-name-conference - elm 111/? Author-name-conference !:w,!:p,Author:w,Author:p # Tag 260 subfield a mapped to Place-publication elm 260 Place-publication - elm 260/? Place-publication - elm 260/?/a Place-publication !:w elm 260/?/b Publisher !:w elm 260/?/c Date !:w idzebra-2.0.44/tab/Makefile.am0000644000175000017500000000133111412332551012737 00000000000000 tabdatadir = $(datadir)/$(PACKAGE)$(PACKAGE_SUFFIX)/tab tabdata_DATA = bib1.att dan1.att danmarc.abs danmarc.mar \ default.idx explain.abs explain.att explain.tag generic.tag gils.abs \ gils-a.est gils.att gils-b.est gils-f.est gils-g.est gils-summary.map \ gils.tag gils-usmarc.map gils-variant.est hci.flt idxpath.att mail.flt \ meta.abs meta-b.est meta.tag meta-usmarc.map news.flt numeric.chr \ nwi.flt refer.flt scan.chr sgml.flt soif.flt string.chr summary.abs \ summary.tag tagsetg.tag tagsetm.tag urx.chr usmarc.abs usmarc-b.est \ usmarc.flt usmarc.mar usmarc.tag var1.var wais.abs wais-b.est \ wais-variant.est marc21.abs words-icu.xml phrases-icu.xml words-icu-da.xml \ icu.idx EXTRA_DIST = $(tabdata_DATA) idzebra-2.0.44/tab/tagsetg.tag0000644000175000017500000000212011412332551013033 00000000000000# TagSet-G Tags name tagsetg reference TagsetG type 2 tag 1 title string tag 2 author string tag 3 publicationPlace string tag 4 publicationDate/date-of-publication string tag 5 documentId string tag 6 abstract string tag 7 name string tag 8 dateTime generalizedtime tag 9 displayObject octetstring tag 10 organization/organisation string tag 11 postalAddress string tag 12 networkAddress string tag 13 eMailAddress string tag 14 phoneNumber/telephone string tag 15 faxNumber/fax string tag 16 country string tag 17 description string tag 18 time intunit tag 19 documentcontent octetstring tag 20 language string tag 21 subject string tag 22 resourceType string tag 23 city string tag 24 stateOrProvince string tag 25 zipOrPostalCode string tag 26 cost string tag 27 format string tag 28 identifier string tag 29 rights string tag 30 relation string tag 31 publisher string tag 32 contributor string tag 33 source string tag 34 coverage string tag 35 private string tag 36 sourceDb string idzebra-2.0.44/tab/meta-b.est0000644000175000017500000000022311057500746012574 00000000000000simpleelement (1,10) simpleelement (1,12) simpleelement (2,1) simpleelement (1,14) simpleelement (4,5) simpleelement (2,3) simpleelement (2,2):all idzebra-2.0.44/tab/phrases-icu.xml0000644000175000017500000000027111412332551013652 00000000000000 idzebra-2.0.44/tab/tagsetm.tag0000644000175000017500000000157411412332551013055 00000000000000# TagSet-M Tags # name tagsetm reference TagsetM type 1 tag 1 schemaIdentifier oid tag 2 elementsOrdered bool tag 3 elementOrdering int tag 4 defaultTagType int tag 5 defaultVariantSetId oid tag 6 defaultVariantSpec structured tag 7 processingInstructions string tag 8 recordUsage int tag 9 restriction string tag 10 rank int tag 11 userMessage string tag 12 url string tag 13 record structured tag 14 local-control-number string tag 15 creation-date generalizedtime tag 16 dateOfLastModification/lastModified generalizedtime tag 17 dateOfLastReview generalizedtime tag 18 score int tag 19 wellKnown string tag 20 recordWrapper structured tag 21 defaultTagSetId oid tag 22 languageOfRecord string tag 23 type string tag 24 scheme string tag 25 costInfo string tag 26 costFlag bool tag 27 termCreatedBy string tag 28 termModifiedBy string idzebra-2.0.44/tab/nwi.flt0000644000175000017500000000323211412332551012211 00000000000000# # Input-filter for the Nordic Web Index record syntax. Output is 'gils-like'. # # // { begin record gils } # Ignore meta tags /.*$/ {} / */ BODY /$/ { data -element title $1 } / */ BODY /$/ { data -element dateOfLastModification $1 } / */ BODY /$/ { data -element controlIdentifier $1 } // { begin element supplementalInformation } / */ BODY /$/ { data -element lastChecked $1 } / */ BODY /$/ { data -element bytes $1 } // { begin element availability } / */ BODY /$/ { data -element linkage $1 } / */ BODY /$/ { data -element linkageType $1 } // { begin element localSubjectIndex } / */ BODY /$/ { data -element localSubjectTerm $1 } # Don't want to have inside of LocalSubjectIndex # Since we end localsubjectindex, we consume the end-tag for that as well. #/[ \n]*/ BODY /<\/ip>[ \n]*<\/lsi>/ { # end element; # data -element sampleText $1 # } /[ \n]*/ BODY /<\/ip>/ { end element; data -element sampleText $1 } // { begin element crossReference } /
  • */ BODY /$/ { data -element linkage $1 } / */ BODY /$/ { data -element title $1 } /<\/nwi>/ { end record } # Generic end-marker /<\/[^>]*>/ { end element } /\n/ { } /./ {} idzebra-2.0.44/tab/usmarc.flt0000644000175000017500000000065011057500746012717 00000000000000# # Rather dummy input-filter for MARC # BEGIN { begin record usmarc } /^00./ / / BODY /\n/ { begin element $0 data -element @ $2 end element } /^.../ / / /../ { begin element $0 } /[$*]/ /./ / / BODY / *[$*\n]/ { data -element $1 $3; unread 4 } /\n/ { end element } /./ { } idzebra-2.0.44/tab/bib1.att0000644000175000017500000000665711412332551012252 00000000000000# Bib-1 Attribute Set name bib1 reference Bib-1 att 1 Personal-name att 2 Corporate-name att 3 Conference-name att 4 Title att 5 Title-series att 6 Title-uniform att 7 ISBN att 8 ISSN att 9 LC-card-number att 10 BNB-card-number att 11 BGF-number att 12 Local-number att 13 Dewey-classification att 14 UDC-classification att 15 Bliss-classification att 16 LC-call-number att 17 NLM-call-number att 18 NAL-call-number att 19 MOS-call-number att 20 Local-classification att 21 Subject-heading att 22 Subject-Rameau att 23 BDI-index-subject att 24 INSPEC-subject att 25 MESH-subject att 26 PA-subject att 27 LC-subject-heading att 28 RVM-subject-heading att 29 Local-subject-index att 30 Date att 31 Date-of-publication att 32 Date-of-acquisition att 33 Title-key att 34 Title-collective att 35 Title-parallel att 36 Title-cover att 37 Title-added-title-page att 38 Title-caption att 39 Title-running att 40 Title-spine att 41 Title-other-variant att 42 Title-former att 43 Title-abbreviated att 44 Title-expanded att 45 Subject-precis att 46 Subject-rswk att 47 Subject-subdivision att 48 Number-natl-biblio att 49 Number-legal-deposit att 50 Number-govt-pub att 51 Number-music-publisher att 52 Number-db att 53 Number-local-call att 54 Code-language att 55 Code-geographic att 56 Code-institution att 57 Name-and-title att 58 Name-geographic att 59 Place-publication att 60 CODEN att 61 Microform-generation att 62 Abstract att 63 Note att 1000 Author-title att 1001 Record-type att 1002 Name att 1003 Author att 1004 Author-name-personal att 1005 Author-name-corporate att 1006 Author-name-conference att 1007 Identifier-standard att 1008 Subject-LC-childrens att 1009 Subject-name-personal att 1010 Body-of-text att 1011 Date/time-added-to-db att 1012 Date/time-last-modified att 1013 Authority/format-id att 1014 Concept-text att 1015 Concept-reference att 1016 Any att 1017 Server-choice att 1018 Publisher att 1019 Record-source att 1020 Editor att 1021 Bib-level att 1022 Geographic-class att 1023 Indexed-by att 1024 Map-scale att 1025 Music-key att 1026 Related-periodical att 1027 Report-number att 1028 Stock-number att 1030 Thematic-number att 1031 Material-type att 1032 Doc-id att 1033 Host-item att 1034 Content-type att 1035 Anywhere att 1036 Author-Title-Subject idzebra-2.0.44/tab/default.idx0000644000175000017500000000205611412332551013042 00000000000000# Zebra indexes as referred to from the *.abs-files. # # Traditional word index # Used if completenss is 'incomplete field' (@attr 6=1) and # structure is word/phrase/word-list/free-form-text/document-text index w completeness 0 position 1 alwaysmatches 1 firstinfield 1 charmap string.chr # Phrase index # Used if completeness is 'complete {sub}field' (@attr 6=2, @attr 6=1) # and structure is word/phrase/word-list/free-form-text/document-text index p completeness 1 charmap string.chr # URX (URL) index # Used if structure=urx (@attr 4=104) index u completeness 0 charmap urx.chr # Numeric index # Used if structure=numeric (@attr 4=109) index n completeness 0 charmap numeric.chr # Null map index (no mapping at all) # Used if structure=key (@attr 4=3) index 0 completeness 0 position 1 charmap @ # Year # Used if structure=year (@attr 4=4) index y completeness 0 charmap @ # Date # Used if structure=date (@attr 4=5) index d completeness 0 charmap @ # Sort register sort s completeness 1 charmap string.chr # Staticrank (uncomment to enable) #staticrank r idzebra-2.0.44/tab/dan1.att0000644000175000017500000000304611057500746012255 00000000000000name dan1 reference 1.2.840.10003.3.15 att 1 Classification-DK5-alfa-subdivision # au Alfabetisk underdeling DK-5 att 2 Subject-controlled # ke Kontrollerede emneord att 3 Subject-DBC # db DBC emneord att 4 Subject-DBC-non-fiction # df DBC-faglitterære emneord att 5 Subject-DBC-fiction # ds DBC-skønlitterære emneord att 6 Subject-DBC-music # me DBC-Musikemneord att 7 Form-as-subject # fm Form betegnelse som emneord att 8 Level-as-subject # nb Niveau-emneord att 9 Shelf-mark # po Opstillingselement att 10 Classification-DK5-number # dk DK5 att 11 Classification-as-shelf-mark # ok Klassifikation som opstilling att 12 Obsolete-shelf-mark # gd Forældet dk-klassemærke att 13 Subject-FUI # fg FUI-Koder att 14 Catalogue-code # kk Katalogkode att 15 LIX-number # ix LIX att 16 Music-notation # nm Musikalsk notation att 17 Item-number # nr Numre att 18 Local-item-number # en Numre på ens materiale att 19 Previous-FAUST-code # tf Tidligere og lokale faustnumre att 20 Title-host-publication # lvx Værtspublikationstitel (uden nummer) idzebra-2.0.44/tab/gils-b.est0000644000175000017500000000030111412332551012571 00000000000000simpleelement (1,1) simpleelement (1,10) simpleelement (1,12) simpleelement (2,1) simpleelement (1,14) simpleelement (1,16) simpleelement (4,1) simpleelement (4,52) simpleelement (4,70)/(4,17) idzebra-2.0.44/tab/danmarc.mar0000644000175000017500000000003711412332551013013 00000000000000name danmarc reference danmarc idzebra-2.0.44/tab/marc21.abs0000644000175000017500000000346311412332551012467 00000000000000 # This is a fairly simple example of a set of MARC21 indexing rules. It # results in a server which provides a passable Bath level 0 and 1 service # (author, title, subject, keyword and exact services). Feel free to # elaborate on it, and if you do, please consider sharing your additions. # NOTE: This is designed to be used with the grs.marcxml input filter # for ISO2709 (ANSI Z39.2) or grs.xml for MARCXML-formatted records. It # won't work for the old grs.marc input filter, which yields a different # internal structure. name marc21 attset bib1.att esetname F @ esetname B @ marc usmarc.mar xpath disable all any melm 100 author,author:p melm 110 author melm 111 author melm 130 title melm 240 title,title:p melm 242 title,title:p melm 243 title,title:p melm 245$c author melm 245 title,title:p melm 246 title,title:p melm 247 title,title:p melm 400$t title,author melm 400 author melm 410$t title,author melm 410 author melm 411$t title,author melm 411 author melm 440$a title,title:p melm 440 title melm 490$a title,title:p melm 490 title melm 600$t title melm 600 subject-heading,subject-heading:p melm 610$t title melm 610 subject-heading melm 611$t title melm 611 subject-heading melm 630 subject-heading melm 650 subject-heading,subject-heading:p melm 651 subject-heading,subject-heading:p melm 653 subject-heading,subject-heading:p melm 654 subject-heading melm 655 subject-heading melm 656 subject-heading melm 657 subject-heading melm 700$t title,author melm 700$a author,author:p melm 700 author melm 710$t title,author melm 710$a author,author:p melm 710 author melm 711$t title,author melm 711 author melm 730 title melm 740 title melm 800$t title,author melm 800 author melm 810$t title,author melm 810 author melm 811$t title,author melm 811 author melm 830 title idzebra-2.0.44/tab/gils-usmarc.map0000644000175000017500000000466211412332551013642 00000000000000# This table maps records in the GILS abstract syntax to the USMARC one targetname usmarc targetref USmarc map rank /(3,999)/(3,r) map localControlNumber /(3,001) map dateLastModified /(3,005) map ControlIdentifier /(3,035)/(3,a) map title /(3,245)/(3,a) map abstract /(3,520)/(3,a) map purpose /(3,500)/(3,a) map originator /(3,710)/(3,a) map accessConstraints /(3,506)/(3,a) map useConstraints /(3,540)/(3,a) map distributor /(3,270):new nodata map distributorName /(3,270)/(3,p) map distributorOrganization /(3,270)/(3,p) map distributorStreetAddress /(3,270)/(3,a) map distributorCity /(3,270)/(3,b) map distributorState /(3,270)/(3,c) map distributorZipCode /(3,270)/(3,e) map distributorCountry /(3,270)/(3,d) map distributorNetworkAddress /(3,270)/(3,m) map distributorHoursOfService /(3,301)/(3,a) map distributorTelephone /(3,270)/(3,k) map distributorFax /(3,270)/(3,l) map resourceDescription /(3,037)/(3,f) map orderProcess /(3,037)/(3,c) map technicalPrerequisite /(3,538)/(3,a) map availableTimePeriodStructured /(3,045)/(3,c) map availableTimePeriodTextual /(3,037)/(3,n) # Unhandled conditional map linkage /(3,856)/(3,u) map linkageType /(3,856)/(3,2) #map pointOfContact /(3,856)/(3,m) # Look into this map pointOfContact /(3,270):new nodata map contactName /(3,270)/(3,p) map contactOrganization /(3,270)/(3,p) map contactStreetAddress /(3,270)/(3,a) map contactCity /(3,270)/(3,b) map contactState /(3,270)/(3,c) map contactZipCode /(3,270)/(3,e) map contactCountry /(3,270)/(3,d) map contactNetworkAddress /(3,270)/(3,m) map contactHoursOfService /(3,301)/(3,a) map contactTelephone /(3,270)/(3,k) map contactFax /(3,270)/(3,l) map recordSource /(3,040)/(3,a) map agencyProgram /(3,500)/(3,a) map sourcesOfData /(3,537)/(3,a) map controlledTerm /(3,650)/(3,a) map thesaurus /(3,650)/(3,2) map localSubjectTerm /(3,653)/(3,a) map methodology /(3,567)/(3,a) map boundingrectangle /(3,034):new nodata map westernMost /(3,034)/(3,d) map easternMost /(3,034)/(3,e) map northernMost /(3,034)/(3,f) map southernMost /(3,034)/(3,g) map geographicKeywordName /(3,651)/(3,a) map geographicKeywordType /(3,655)/(3,z) # Probably incorrect map timeperiodStructured /(3,045)/(3,c) map timeperiodTextual /(3,513)/(3,b) map crossReference /(3,787):new nodata map crossReferenceTitle /(3,787)/(3,t) map crossReferenceLinkage /(3,787)/(3,w) map supplementalInformation /(3,500)/(3,a) idzebra-2.0.44/tab/icu.idx0000644000175000017500000000121111412332551012166 00000000000000# ICU indexing for words and phrases.. Otherwise similar # to default.idx . # Traditional word index # Used if completenss is 'incomplete field' (@attr 6=1) and # structure is word/phrase/word-list/free-form-text/document-text index w completeness 0 position 1 alwaysmatches 1 firstinfield 1 icuchain words-icu.xml # debug 1 # Phrase index # Used if completeness is 'complete {sub}field' (@attr 6=2, @attr 6=1) # and structure is word/phrase/word-list/free-form-text/document-text index p completeness 1 icuchain phrases-icu.xml # debug 1 # Sort register sort s completeness 1 charmap string.chr # Staticrank (uncomment to enable) #staticrank r idzebra-2.0.44/tab/meta.abs0000644000175000017500000000137311412332551012326 00000000000000# This is a simple profile based on the Dublin Core of metadata elements. # name meta attset bib1.att tagset meta.tag varset var1.var esetname F @ esetname B meta-b.est maptab meta-usmarc.map elm (2,1) title Title:w,Title:p elm (2,2) creator Author:w,Author:p elm (2,21) subject Subject-heading elm (2,17) description - elm (2,31) publisher Publisher elm (2,32) contributor - elm (2,4) date Date elm (2,22) type Content-type elm (2,27) format Material-type elm (2,28) identifier - elm (2,33) source - elm (2,20) language Code-language elm (2,30) relation - elm (2,34) coverage - elm (2,29) rights - # These tags are required by Zebra for GRS-1 generation elm (1,10) rank - elm (1,14) localControlNumber Local-number idzebra-2.0.44/tab/var1.var0000644000175000017500000000226611412332551012276 00000000000000# Definition of the variant set Variant-1. # Variant triple syntax is ''. Eg. # or . # name variant-1 reference Variant-1 class 1 variantId type 1 variantId octetstring class 2 body type 1 iana string type 2 z39.50 string type 3 other string class 3 format type 1 characters-per-line int type 2 line-length int # More types here...... class 4 lang type 1 lang string type 2 charset int type 3 charset-id oid type 4 encoding-id oid type 5 private-string string class 5 piece type 1 fragment-wanted int type 2 fragment-returned int type 3 start intunit type 4 end intunit type 5 howmuch intunit type 6 step intunit type 7 targettoken octetstring class 6 metadata-requested type 1 cost intunit type 2 size intunit type 3 hitsvar null type 4 hitsnonvar null type 5 variantlist null type 6 isvariantsupported null type 7 documentdescriptor null type 8 surrogateinformation null type 998 allmetadata null type 999 othermetadata oid class 7 metadata-returned type 1 cost intunit # More... # More classes, too... idzebra-2.0.44/tab/Makefile.in0000644000175000017500000003135511412336425012765 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tab DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(tabdatadir)" DATA = $(tabdata_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ tabdatadir = $(datadir)/$(PACKAGE)$(PACKAGE_SUFFIX)/tab tabdata_DATA = bib1.att dan1.att danmarc.abs danmarc.mar \ default.idx explain.abs explain.att explain.tag generic.tag gils.abs \ gils-a.est gils.att gils-b.est gils-f.est gils-g.est gils-summary.map \ gils.tag gils-usmarc.map gils-variant.est hci.flt idxpath.att mail.flt \ meta.abs meta-b.est meta.tag meta-usmarc.map news.flt numeric.chr \ nwi.flt refer.flt scan.chr sgml.flt soif.flt string.chr summary.abs \ summary.tag tagsetg.tag tagsetm.tag urx.chr usmarc.abs usmarc-b.est \ usmarc.flt usmarc.mar usmarc.tag var1.var wais.abs wais-b.est \ wais-variant.est marc21.abs words-icu.xml phrases-icu.xml words-icu-da.xml \ icu.idx EXTRA_DIST = $(tabdata_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tab/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tab/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-tabdataDATA: $(tabdata_DATA) @$(NORMAL_INSTALL) test -z "$(tabdatadir)" || $(MKDIR_P) "$(DESTDIR)$(tabdatadir)" @list='$(tabdata_DATA)'; test -n "$(tabdatadir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tabdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(tabdatadir)" || exit $$?; \ done uninstall-tabdataDATA: @$(NORMAL_UNINSTALL) @list='$(tabdata_DATA)'; test -n "$(tabdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(tabdatadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(tabdatadir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(tabdatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-tabdataDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-tabdataDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ install-tabdataDATA installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-tabdataDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/tab/gils.tag0000644000175000017500000000536711412332551012353 00000000000000# Tag set for GILS version 2. # name gils type 4 include tagsetm.tag include tagsetg.tag tag 1 controlIdentifier string tag 2 streetAddress string tag 3 city string tag 4 stateOrProvince string tag 5 zipOrPostalCode string tag 6 hoursOfService string tag 7 resourceDescription string tag 8 technicalPrerequisites string tag 9 westBoundingCoordinate intUnit tag 10 eastBoundingCoordinate intUnit tag 11 northBoundingCoordinate intUnit tag 12 southBoundingCoordinate intUnit tag 13 placeKeyword string tag 14 placeKeywordThesaurus string tag 15 beginningDate GeneralizedTime tag 16 timePeriodTextual string tag 17 linkage string tag 18 linkageType string tag 19 recordSource string tag 20 controlledTerm string tag 21 subjectThesaurus string tag 22 uncontrolledTerm string tag 23 originalControlIdentifier string tag 24 recordReviewDate GeneralizedTime tag 25 generalAccessConstraints string tag 26 originatorDisseminationControl string tag 27 securityClassificationControl string tag 28 orderInformation string tag 29 cost bool tag 30 costInformation string tag 31 scheduleNumber string tag 32 languageOfResource string tag 33 medium string tag 34 languageOfRecord string tag 35 relationship string tag 36 endingDate GeneralizedTime tag 51 purpose structured tag 52 originator structured tag 53 accessConstraints structured tag 54 useConstraints structured tag 55 orderProcess structured tag 56 agencyProgram structured tag 57 sourcesOfData structured tag 58 methodology structured tag 59 supplementalInformation structured tag 70 availability structured tag 71 spatialDomain structured tag 90 distributor structured tag 91 boundingCoordinates structured tag 92 place structured tag 93 timePeriod structured tag 94 pointOfContact structured tag 95 controlledSubjectIndex structured tag 96 subjectTermsControlled structured tag 97 subjectTermsUncontrolled structured tag 98 crossReference structured tag 99 availableLinkage structured tag 100 crossReferenceLinkage structured tag 101 timePeriodStructured structured tag 102 availableTimeStructured structured idzebra-2.0.44/tab/explain.abs0000644000175000017500000001747511412332551013052 00000000000000# This Explain schema is used for our internal management and processing of # explain data. On request, records are mapped to the proper Explain ASN.1 # before transmission. # name explain reference Explain-schema attset explain.att tagset explain.tag esetname B @ esetname F @ section rpnCapabilities elm (4,550) rpnOperators - elm (4,550)/(4,551) rpnOperator - elm (4,552) resultSetAsOperandSupported - elm (4,553) restrictionOperandSupported - elm (4,554) proximitySupport - elm (4,554)/(4,555) anySupport - elm (4,554)/(4,556) unitsSupported - elm (4,554)/(4,556)/(4,557) unitSupported - elm (4,554)/(4,556)/(4,557)/(4,558) known - elm (4,554)/(4,556)/(4,557)/(4,559) private - elm (4,554)/(4,556)/(4,557)/(4,559)/(4,558) privateUnit - elm (4,554)/(4,556)/(4,557)/(4,559)/(4,560) description - section accessInfo elm (4,501) queryTypesSupported - elm (4,501)/(4,518) queryTypeDetails - elm (4,501)/(4,518)/(4,519):rpnCapabilities rpnCapabilities - elm (4,501)/(4,518)/(4,520) iso8777Capabilities - elm (4,501)/(4,518)/(4,521) privateCapabilities - elm (4,503) diagnosticSets - elm (4,503)/(4,1000) diagnosticSet - elm (4,505) attributeSetIds - elm (4,505)/(4,1000) attributeSetId - elm (4,507) schemas - elm (4,507)/(4,1000) schema - elm (4,509) recordSyntaxes - elm (4,509)/(4,1000) recordSyntax - elm (4,511) resourceChallenges - elm (4,511)/(4,1000) resourceChallenge - elm (4,513) restrictedAccess - elm (4,514) costInfo - elm (4,515) variantSets - elm (4,515)/(4,1000) variantSets - elm (4,516) elementSetNames - elm (4,516)/(4,1001) elementSetName - elm (4,517) unitSystems - elm (4,517)/(4,1001) unitSystem - section commonInfo elm (4,601) dateAdded ! elm (4,602) dateChanged ! elm (4,603) expiry DateExpired elm (4,604) languageCode HumanStringLanguage section contactInfo elm (4,102) name - elm (4,113) description - elm (4,127) address - elm (4,128) email - elm (4,129) phone - section stringOrNumeric elm (4,1001) string - elm (4,1002) numeric - section attributeSetDetailsValue elm (4,709) attributeValue - elm (4,709)/(4,710):stringOrNumeric value - elm (4,709)/(4,113) description - elm (4,709)/(4,712) subAttributes - elm (4,709)/(4,712)/(4,713):stringOrNumeric subAttribute - elm (4,709)/(4,714) superAttributes - elm (4,709)/(4,714)/(4,715):stringOrNumeric superAttributes - elm (4,709)/(4,711) partialSupport - section attributeSetDetails elm (4,1000) attributeSet - elm (4,702) attributesByType - elm (4,702)/(4,703) attributeTypeDetails - elm (4,702)/(4,703)/(4,704) attributeType - elm (4,702)/(4,703)/(4,705) defaultIfOmitted - elm (4,702)/(4,703)/(4,705)/(4,706):stringOrNumeric defaultValue - elm (4,702)/(4,703)/(4,705)/(4,113) defaultDescription - elm (4,702)/(4,703)/(4,708):attributeSetDetailsValue attributeValues - section attributeCombinations elm (4,1000) attributeSet - elm (4,717) legalCombinations - elm (4,717)/(4,718) legalCombination - elm (4,717)/(4,718)/(4,719) attributeOccurrence - elm (4,717)/(4,718)/(4,719)/(4,1000) attributeSetId - elm (4,717)/(4,718)/(4,719)/(4,704) attributeType - elm (4,717)/(4,718)/(4,719)/(4,720) mustBeSupplied - elm (4,717)/(4,718)/(4,719)/(4,721) anyOrNone - elm (4,717)/(4,718)/(4,719)/(4,722) specific - elm (4,717)/(4,718)/(4,719)/(4,722)/(4,710):stringOrNumeric value - section attributeType elm (4,751) attributeType - elm (4,751)/(4,102) attributeName - elm (4,751)/(4,113) attributeDescription - elm (4,751)/(4,704) type - elm (4,751)/(4,708) attributeValues - elm (4,751)/(4,708)/(4,709) attributeValue - elm (4,751)/(4,708)/(4,709)/(4,102) name - elm (4,751)/(4,708)/(4,709)/(4,113) description - elm (4,751)/(4,708)/(4,709)/(4,710):stringOrNumeric attributeValue - elm (4,751)/(4,708)/(4,709)/(4,752):stringOrNumeric equivalentAttribute - section main # # CategoryList # elm (4,1) categoryList ExplainCategory elm (4,1)/(4,600):commonInfo categoryListCommonInfo - elm (4,1)/(4,300) categories - elm (4,1)/(4,300)/(4,301) category - elm (4,1)/(4,300)/(4,301)/(4,102) categoryName - elm (4,1)/(4,300)/(4,301)/(4,302) originalName - elm (4,1)/(4,300)/(4,301)/(4,113) description - elm (4,1)/(4,300)/(4,301)/(4,303) asn1Module - # # TargetInfo # elm (4,2) targetInfo ExplainCategory elm (4,2)/(4,600):commonInfo targetCommonInfo - elm (4,2)/(4,102) targetName TargetName elm (4,2)/(4,103) recentNews - elm (4,2)/(4,104) icon - elm (4,2)/(4,105) namedResultSets - elm (4,2)/(4,106) multipleDbSearch - elm (4,2)/(4,107) maxResultSets - elm (4,2)/(4,108) maxResultSize - elm (4,2)/(4,109) maxTerms - elm (4,2)/(4,110) timeoutInterval - elm (4,2)/(4,111) welcomeMessage - elm (4,2)/(4,112):contactInfo contactInfo - elm (4,2)/(4,113) description - elm (4,2)/(4,114) nicknames - elm (4,2)/(4,114)/(4,102) nickname - elm (4,2)/(4,115) usageRestrictions - elm (4,2)/(4,116) paymentAddr - elm (4,2)/(4,117) hours - elm (4,2)/(4,118) dbCombinations - elm (4,2)/(4,118)/(4,605) databaseList - elm (4,2)/(4,118)/(4,605)/(4,102) databaseName - elm (4,2)/(4,119) addresses - elm (4,2)/(4,119)/(4,120) internetAddress - elm (4,2)/(4,119)/(4,120)/(4,121) host - elm (4,2)/(4,119)/(4,120)/(4,122) port - elm (4,2)/(4,119)/(4,123) otherAddress - elm (4,2)/(4,119)/(4,123)/(4,124) addressType - elm (4,2)/(4,119)/(4,123)/(4,121) address - elm (4,2)/(4,125) languages - elm (4,2)/(4,125)/(4,126) language - elm (4,2)/(4,500):accessInfo commonAccessInfo - # # DatabaseInfo # elm (4,3) databaseInfo ExplainCategory elm (4,3)/(4,600):commonInfo databaseCommonInfo - elm (4,3)/(4,102) databaseName DatabaseName elm (4,3)/(4,226) explainDatabase - elm (4,3)/(4,114) nicknames - elm (4,3)/(4,114)/(4,102) nickname - elm (4,3)/(4,104) icon - elm (4,3)/(4,201) userFee - elm (4,3)/(4,202) available Availability elm (4,3)/(4,203) titleString - elm (4,3)/(4,227) keywords - elm (4,3)/(4,227)/(4,1000) keyword - elm (4,3)/(4,113) description - elm (4,3)/(4,205) associatedDbs - elm (4,3)/(4,205)/(4,605) databaseList - elm (4,3)/(4,205)/(4,605)/(4,102) databaseName - elm (4,3)/(4,206) subDbs - elm (4,3)/(4,206)/(4,605) databaseList - elm (4,3)/(4,206)/(4,605)/(4,102) databaseName - elm (4,3)/(4,207) disclaimers - elm (4,3)/(4,103) recentNews - elm (4,3)/(4,209) recordCount - elm (4,3)/(4,209)/(4,210) recordCountActual - elm (4,3)/(4,209)/(4,211) recordCountApprox - elm (4,3)/(4,212) defaultOrder - elm (4,3)/(4,213) avRecordSize - elm (4,3)/(4,214) maxRecordSize - elm (4,3)/(4,215) hours - elm (4,3)/(4,216) bestTime - elm (4,3)/(4,217) lastUpdate - elm (4,3)/(4,218) updateInterval - elm (4,3)/(4,219) coverage - elm (4,3)/(4,220) proprietary - elm (4,3)/(4,221) copyrightText - elm (4,3)/(4,222) copyrightNotice - elm (4,3)/(4,223):contactInfo producerContactInfo - elm (4,3)/(4,224):contactInfo supplierContactInfo - elm (4,3)/(4,225):contactInfo submissionContactInfo - elm (4,3)/(4,500):accessInfo databaseAccessInfo - # # AttributeSetInfo # elm (4,7) attributeSetInfo ExplainCategory elm (4,7)/(4,600):commonInfo attributeSetInfoCommonInfo - elm (4,7)/(4,1000) attributeSet AttributeSetOID elm (4,7)/(4,113) description - elm (4,7)/(4,102) name - elm (4,7)/(4,750):attributeType attributes - # # AttributeDetails # elm (4,10) attributeDetails ExplainCategory elm (4,10)/(4,600):commonInfo attributeDetailsCommonInfo - elm (4,10)/(4,102) databaseName DatabaseName elm (4,10)/(4,700) attributesBySet - elm (4,10)/(4,700)/(4,701):attributeSetDetails attributeSetDetails - elm (4,10)/(4,716):attributeCombinations attributeCombinations - idzebra-2.0.44/tab/wais-variant.est0000644000175000017500000000052611057500746014042 00000000000000# # WAIS variant eset. # # # Default is no data, variant-list, please. # simpleelement ?:all variant (9,1,@) (6,5,@) # # Empty variant-requests for the well-known elements to override default. # simpleelement (2,1) variant simpleelement (2,7) variant simpleelement (1,16) variant simpleelement (1,18) variant simpleelement (1,14) variant idzebra-2.0.44/tab/explain.tag0000644000175000017500000001211411412332551013041 00000000000000# Tag set for internal Explain-data management # name explain reference Explain-tagset type 4 include tagsetm.tag # # Explain categories # tag 1 categoryList structured tag 2 targetInfo structured tag 3 databaseInfo structured tag 4 schemaInfo structured tag 5 tagSetInfo structured tag 6 recordSyntaxInfo structured tag 7 attributeSetInfo structured tag 8 termListInfo structured tag 9 extendedServicesInfo structured tag 10 attributeDetails structured tag 11 termListDetails structured tag 12 elementSetDetails structured tag 13 retrievalRecordDetails structured tag 14 sortDetails structured tag 15 processing structured tag 16 variants structured tag 17 units structured # # TargetInfo # tag 102 name string tag 103 recentNews string tag 104 icon structured tag 105 namedResultSets bool tag 106 multipleDbSearch bool tag 107 maxResultSets numeric tag 108 maxResultSize numeric tag 109 maxTerms numeric tag 110 timeoutInterval intunit tag 111 welcomeMessage string tag 112 contactInfo structured tag 113 description string tag 114 nicknames structured tag 115 usageRest string tag 116 paymentAddr string tag 117 hours string tag 118 dbCombinations structured tag 119 addresses structured tag 120 internetAddress structured tag 121 host string tag 122 port numeric tag 123 otherAddress structured tag 124 addressType string tag 125 languages structured tag 126 language string tag 127 address string tag 128 email string tag 129 phone string # # DatabaseInfo # tag 201 userFee bool tag 202 available bool tag 203 titleString string tag 205 associatedDbs structured tag 206 subDbs structured tag 207 disclaimers string tag 209 recordCount structured tag 210 recordCountActual numeric tag 211 recordCountApprox numeric tag 212 defaultOrder string tag 213 avRecordSize numeric tag 214 maxRecordSize numeric tag 215 hours string tag 216 bestTime string tag 217 lastUpdate generalizedtime tag 218 updateInterval intunit tag 219 coverage string tag 220 proprietary bool tag 221 copyrightText string tag 222 copyrightNotice string tag 223 producerContactInfo structured tag 224 supplierContactInfo structured tag 225 submissionContactInfo structured tag 226 explainDatabase null tag 227 keywords string # CategoryList tag 300 categories structured tag 301 category structured tag 302 originalName string tag 303 asn1Module string # # AccessInfo # tag 500 accessinfo structured tag 501 queryTypesSupported structured tag 503 diagnosticSets structured tag 505 attributeSetIds structured tag 507 schemas structured tag 509 recordSyntaxes structured tag 511 resourceChallenges structured tag 513 restrictedAccess structured tag 514 costInfo structured tag 515 variantSets structured tag 516 elementSetNames structured tag 517 unitSystems structured tag 518 queryTypeDetails structured tag 519 rpnCapabilities structured tag 520 Iso8777Capabilities structured tag 521 privateCapabilities structured tag 550 rpnOperators structured tag 551 rpnOperator numeric tag 552 resultSetAsOperandSupported bool tag 553 restrictionOperandSupported bool tag 554 proximitySupport structured tag 555 anySupport bool tag 556 proximityUnitsSupported structured tag 557 proximityUnitSupported structured tag 558 proximityUnitVal numeric tag 559 proximityUnitPrivate structured tag 560 proximityUnitDescription string # CommonInfo tag 600 commonInfo structured tag 601 dateAdded generalizedtime tag 602 dateChanged generalizedtime tag 603 expiry generalizedtime tag 604 languageCode string tag 605 databaseList structured # AttributeDetails, AttributeSetDetails tag 700 attributesBySet structured tag 701 attributeSetDetails structured tag 702 attributesByType structured tag 703 attributeTypeDetails structured tag 704 type numeric tag 705 defaultIfOmitted structured tag 706 defaultValue structured tag 708 attributeValues structured tag 709 attributeValue structured tag 710 value structured tag 711 partialSupport string tag 712 subAttributes structured tag 713 subAttribute structured tag 714 superAttributes structured tag 715 superAttribute structured tag 716 attributeCombinations structured tag 717 legalAttributeCombinations structured tag 718 attributeCombination structured tag 719 attributeOccurrence structured tag 720 mustBeSupplied bool tag 721 anyOrNone string tag 722 specific structured # # AttributeSetInfo # tag 750 attributes structured tag 751 attributeType structured tag 752 equivalentAttribute structured # # General tags for list members, etc. # tag 1000 oid oid tag 1001 string string tag 1002 numeric numeric idzebra-2.0.44/tab/scan.chr0000644000175000017500000000134111412332551012326 00000000000000# Danish/Swedish character map. # # Define the basic value-set. *Beware* of changing this without re-indexing # your databases. lowercase {0-9}{a-y}üzæäøöå uppercase {0-9}{A-Y}ÜZÆÄØÖÅ # Breaking characters space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~ # Characters to be considered equivalent for searching purposes. # equivalent æä(ae) # equivalent øö(oe) # equivalent å(aa) # equivalent uü # Supplemental mappings map (ä) ä map (æ) æ map (ø) ø map (å) å map (ö) ö map (Ä) Ä map (&Aelig;) Æ map (Ø) Ø map (Å) Å map (Ö) Ö map éÉ e map á a map ó o map í i map (Aa) (AA) map (aa) a #qmap (ies) (ie) idzebra-2.0.44/tab/urx.chr0000644000175000017500000000026111412332551012220 00000000000000# URX character map # # Basic character(s) lowercase {0-9}{a-y}üzæäøöå/.~:-,#!?=<;\{|}+ uppercase {0-9}{A-Y}ÜZÆÄØÖÅ/.~:-,#!?=>;\{|}+ # Breaking characters space {\001-\040} idzebra-2.0.44/tab/gils-summary.map0000644000175000017500000000033511057500746014046 00000000000000# # This table maps GILS-records to the Summary (abstract) syntax # targetname summary targetref Summary map title /(4,0) map originator /(4,1) map localControlNumber /(4,12) map rank /(4,14) map abstract /(4,16) idzebra-2.0.44/tab/idxpath.att0000644000175000017500000000034411412332551013061 00000000000000# The Zebra special IDXPATH Attribute Set # name idxpath reference idxpath att 1 _XPATH_BEGIN att 2 _XPATH_END att 3 _XPATH_ATTR_NAME att 1015 _XPATH_ATTR_CDATA att 1016 _XPATH_CDATA idzebra-2.0.44/tab/explain.att0000644000175000017500000000100611412332551013054 00000000000000# The Explain Attribute Set # name explain reference Exp-1 att 1 ExplainCategory att 2 HumanStringLanguage att 3 DatabaseName att 4 Targetname att 5 AttributeSetOID att 6 RecordSyntaxOID att 7 TagSetOID att 8 ExtendedServicesOID att 9 DateAdded att 10 DateChanged att 11 DateExpired att 12 ElementSetName att 13 ProcessingContext att 14 ProcessingName att 15 TermListName att 16 SchemaOID att 17 Producer att 18 Supplier att 19 Availability att 20 Proprietary att 21 UserFee idzebra-2.0.44/tab/danmarc.abs0000644000175000017500000011715111057500746013017 00000000000000name danmarc reference DANmarc attset bib1.att attset dan1.att marc danmarc.mar esetname B @ esetname F @ elm 10 DanBib-ID-nummer - elm 10/? DanBib-ID-nummer Item-number elm 10/?/a DanBib-ID-nummer Item-number elm 10/?/b Dataproducentens-biblioteksnummer - elm 11 ID-nummer-på-hovedmaterialets-post - elm 11/? ID-nummer-på-hovedmaterialets-post - elm 11/?/a ID-nummer-på-hovedmaterialets-post - elm 14 ID-nummer-på-post-på-højere-niveau - elm 14/? ID-nummer-på-post-på-højere-niveau - elm 14/?/a ID-nummer-på-post-på-højere-niveau - elm 14/?/x ID-nummer-på-post-på-højere-niveau Item-number elm 15 ID-nummer-på-post-på-lavere-niveau - elm 15/? ID-nummer-på-post-på-lavere-niveau Item-number elm 15/?/a ID-nummer-på-post-på-lavere-niveau Item-number elm 16 ID-nummer-på-værtspublikation - elm 16/? ID-nummer-på-værtspublikation - elm 16/?/a ID-nummer-på-værtspublikation - elm 17 ID-nummer-på-første-udgave - elm 17/? ID-nummer-på-første-udgave Item-number,Local-item-number elm 17/?/a ID-nummer-på-første-udgave Item-number,Local-item-number elm 18 ID-nummer-på-anden-post-for-samme-materiale - elm 18/? ID-nummer-på-anden-post-for-samme-materiale Item-number,Local-item-number elm 18/?/a ID-nummer-på-anden-post-for-samme-materiale Item-number,Local-item-number elm 20 Nationalbibliografisk-nummer - elm 20/? Nationalbibliografisk-nummer Item-number elm 20/?/a Landekode-for-nationalbibliografi - elm 20/?/b Nationalbibliografisk-nummer Item-number elm 21 ISBN - elm 21/? ISBN ISBN,Identifier-standard,Item-number elm 21/?/a ISBN ISBN,Identifier-standard,Item-number elm 21/?/b Tilføjelse - elm 21/?/c Bindtype - elm 21/?/d Anskaffelsesvilkår/pris - elm 21/?/n Bestillingsnummer Item-number elm 21/?/x Fejltryk-eller-fejlagtigt-anvendt-ISBN ISBN,Identifier-standard,Item-number elm 22 ISSN - elm 22/? ISSN ISBN,Identifier-standard,Item-number elm 22/?/a ISSN ISBN,Identifier-standard,Item-number elm 22/?/b Tilføjelse - elm 22/?/c Bindtype - elm 22/?/d Anskaffelsesvilkår/pris - elm 22/?/z Fejlagtigt-tildelt-ISSN ISBN,Identifier-standard,Item-number elm 28 ISMN - elm 28/? ISMN ISBN,Identifier-standard,Item-number elm 28/?/a ISMN ISBN,Identifier-standard,Item-number elm 28/?/b Tilføjelse - elm 28/?/c Bindtype - elm 28/?/d Anskaffelsesvilkår/pris - elm 28/?/n Bestillingsnummer Item-number elm 30 CODEN - elm 30/? CODEN CODEN,Item-number elm 30/?/a CODEN CODEN,Item-number elm 32 Kode-for-natio-eller-fagbibliografi - elm 32/? Kode-for-natio-eller-fagbibliografi Catalogue-code elm 32/?/a Kode-for-nationalbibliografi Catalogue-code elm 32/?/x Kode-for-fagbibliografi Catalogue-code #elm 34 Kodede-matematiske-oplysninger - #elm 34/? Kodede-matematiske-oplysninger Code-map-scale #elm 34/?/a Målestokstype Code-map-scale #elm 34/?/b Konstant-lineær-vandret-målestok Code-map-scale #elm 34/?/d Koordinater Code-map-scale #elm 34/?/e Koordinater Code-map-scale #elm 34/?/f Koordinater Code-map-scale #elm 34/?/g Koordinater Code-map-scale elm 38 Opstillingskode-for-børnelitteratur - elm 38/? Opstillingskode-for-børnelitteratur - elm 38/?/a Opstillingskode-for-børnelitteratur - elm 39 Opstillingskode-for-musikoptagelser - elm 39/? Opstillingskode-for-musikoptagelser - elm 39/?/a Opstillingskode-for-musikoptagelser - elm 41 Sprogkode - elm 41/? Sprogkode - elm 41/?/a Materialets-sprog Code-language #elm 41/?/b Mellemoriginalens-sprog Code-language-original #elm 41/?/c Originaludgavens-sprog Code-language-original elm 41/?/d Sprog-i-resuméer Code-language elm 41/?/e Sprog-i-mindre-dele-af-materialet Code-language elm 41/?/p Sprog-i-parallel-tekst Code-language elm 41/?/u Sprog-i-undertekster-til-film/video Code-language elm 42 Lix-tal - elm 42/? Lix-tal - elm 42/?/a Samlet-lix-tal LIX-number elm 42/?/b Specifikation-af-lix-tal - elm 43 Kode-for-geografisk-område - elm 43/? Kode-for-geografisk-område - elm 43/?/a Kode-for-geografisk-område - elm 44 Pædagogisk-fagkode - elm 44/? Pædagogisk-fagkode Subject-FUI elm 44/?/a Kode-for-skoleretning Subject-FUI elm 44/?/b Kode-for-fag-og-undervisningsmateriale Subject-FUI elm 50 LC-klassifikation - #elm 50/? LC-klassifikation Classification-LC elm 50/? LC-klassifikation - elm 50/?/a LC-klassifikation - elm 50/?/b Materialenummer - elm 60 NLM-klassifikation - #elm 60/? NLM-klassifikation Classification-NLM elm 60/? NLM-klassifikation - elm 60/?/a NLM-klassifikation - elm 60/?/b Materialenummer - elm 70 NAL-klassifikation - #elm 70/? NAL-klassifikation Classification-NAL elm 70/? NAL-klassifikation - elm 70/?/a Materialenummer - elm 79 DB-klassifikation - elm 79/? DB-klassifikation - #elm 79/? DB-klassifikation Classification-DB elm 79/?/a Systemkode - elm 80 UDK - #elm 80/? UDK Classification-UDC elm 80/? UDK - elm 80/?/a UDK-notation - elm 82 DDC - elm 82/? DDC - #elm 82/? DDC Classification-Dewey elm 82/?/a Basisnummer - elm 82/?/b Udgivelse - elm 82/?/c DDC-udgave - elm 83 Felt-083 - elm 83/? Felt-083 - elm 83/?/a Felt-083 - elm 83/?/b Felt-083 - elm 85 BCM-klassifikation - elm 85/? BCM-klassifikation - #elm 85/? BCM-klassifikation Classification-BCM elm 85/?/a BCM-klassifikation - elm 85/?/b BCM-klassifikation - elm 85/?/c BCM-klassifikation - elm 87 Lokal-klassifikationsnotation-1 - elm 87/? Lokal-klassifikationsnotation-1 - #elm 87/?/a Lokal-klassifikationsnotation-1 Classification-local elm 87/?/b Lokal-klassifikationsnotation-1 - elm 88 Lokal-klassifikationsnotation-2 - elm 88/? Lokal-klassifikationsnotation-2 - #elm 88/?/a Lokal-klassifikationsnotation-2 Classification-local elm 88/?/b Lokal-klassifikationsnotation-2 - elm 88/?/c Lokal-klassifikationsnotation-2 - elm 88/?/d Lokal-klassifikationsnotation-2 - elm 88/?/e Lokal-klassifikationsnotation-2 - elm 88/?/f Lokal-klassifikationsnotation-2 - elm 88/?/n Lokal-klassifikationsnotation-2 - elm 88/?/p Lokal-klassifikationsnotation-2 - elm 88/?/q Lokal-klassifikationsnotation-2 - elm 88/?/t Lokal-klassifikationsnotation-2 - elm 88/?/u Lokal-klassifikationsnotation-2 - elm 89 Lokal-klassifikationsnotation-3 - elm 89/? Lokal-klassifikationsnotation-3 - #elm 89/?/a Lokal-klassifikationsnotation-3 Classification-local elm 89/?/b Lokal-klassifikationsnotation-3 - elm 89/?/c Lokal-klassifikationsnotation-3 - elm 96 Lokal-opstillingssignatur - elm 96/? Lokal-opstillingssignatur - elm 96/?/a Opstilling - elm 96/?/n Lokal-opstillingssignatur - elm 96/?/z Lokaliseringskode - elm 100 Personnavn - elm 100/? Personnavn Personal-name:w,Personal-name:p,Shelf-mark #elm 100/?/a Efternavn/fornavn-alene Personal-name:w,Personal-name:p,Personal-name-personal:w,Personal-name-personal:p,Shelf-mark #elm 100/?/c Fødselsår Personal-name:w,Personal-name:p,Personal-name-personal:w,Personal-name-personal:p,Shelf-mark #elm 100/?/f Tilføjelse Personal-name:w,Personal-name:p,Personal-name-personal:w,Personal-name-personal:p,Shelf-mark #elm 100/?/h Fornavn Personal-name:w,Personal-name:p,Personal-name-personal:w,Personal-name-personal:p,Shelf-mark #elm 100/?/k Fuldt-udskrevet-fornavn Personal-name:w,Personal-name:p,Personal-name-personal:w,Personal-name-personal:p,Shelf-mark elm 110 Korporationsnavn-opstillingselement - elm 110/? Korporationsnavn-opstillingselement Personal-name:w,Personal-name:p,Corporate-name:w,Corporate-name:p,Shelf-mark #elm 110/?/a Korporationsnavn Personal-name:w,Personal-name:p,Personal-name-corporate:w,Personal-name-corporate:p,Shelf-mark #elm 110/?/c Underkorporation Personal-name:w,Personal-name:p,Personal-name-corporate:w,Personal-name-corporate:p,Shelf-mark #elm 110/?/e Tilføjelse Personal-name:w,Personal-name:p,Personal-name-corporate:w,Personal-name-corporate:p,Shelf-mark #elm 110/?/i Nummer-på-konference Personal-name:w,Personal-name:p,Personal-name-corporate:w,Personal-name-corporate:p,Shelf-mark #elm 110/?/j Sted-for-konference Personal-name:w,Personal-name:p,Personal-name-corporate:w,Personal-name-corporate:p,Shelf-mark #elm 110/?/k År-for-konference Personal-name:w,Personal-name:p,Personal-name-corporate:w,Personal-name-corporate:p,Shelf-mark elm 210 Forkortet-nøgletitel - elm 210/? Forkortet-nøgletitel Title-key,Title,Title:p elm 210/?/a Forkortet-nøgletitel Title-key,Title,Title:p elm 210/?/b Forkortet-identificerende-tilføjelse Title-key,Title,Title:p elm 222 Nøgletitel - elm 222/? Nøgletitel Title-key,Title,Title:p elm 222/?/a Nøgletitel Title-key,Title,Title:p elm 222/?/b Identificerende-tilføjelse Title-key,Title,Title:p elm 239 Uniform-titel/standardtitel-opstillingselement - elm 239/? Uniform-titel/standardtitel-opstillingselement Title-uniform,Title,Title:p elm 239/?/t Uniform-titel Title-uniform,Title,Title:p elm 239/?/u Almindeligt-kendt-tilnavn Title-uniform,Title,Title:p elm 239/?/v Uddragstitel Title-uniform,Title,Title:p elm 239/?/Ø Uniform-titel/standardtitel-opstillingselement - elm 239/?/ø Identificerende-tilføjelser Title-uniform,Title elm 240 Uniform-titel-opstillingselement - elm 240/? Uniform-titel-opstillingselement Title-uniform,Title,Title:p elm 240/?/a Uniform-titel Title-uniform,Title,Title:p elm 240/?/j Andet-identificerende-element Title-uniform,Title,Title:p elm 240/?/r Sprog-i-oversættelse/version - elm 240/?/u Udgivelsesår - elm 240/?/ø Identificerende-tilføjelser Title-uniform,Title elm 241 Originaltitel - elm 241/? Originaltitel Title,Title:p elm 241/?/a Originaltitel Title,Title:p elm 241/?/r Sprog - elm 245 Originaltitel-og-ophavsangivelse - elm 245/? Originaltitel-og-ophavsangivelse Title,Title:p elm 245/?/A Originaltitel-og-ophavsangivelse - elm 245/?/G Originaltitel-og-ophavsangivelse - elm 245/?/a Titel Title,Title:p elm 245/?/b Rest-af-titel-eller-alternativ-titel Title,Title:p elm 245/?/c Undertitel-og-anden-titelinformation Title,Title:p elm 245/?/e Ophavsangivelser-opslag - elm 245/?/f Ophavsangivelser - elm 245/?/g Numerisk-eller-alfabetisk-betegnelse-for-bind Title,Title:p elm 245/?/i Anden-primær/sekundær-ophavsangivelse-kun-i-nationalbibliogafien - elm 245/?/j Anden-primær/sekundær-ophavsangivelse-ikke-i-nationalbibliogafien - elm 245/?/o Titel-på-supplement/sektion - elm 245/?/p Paralleltitel Title-parallel,Title,Title:p elm 245/?/s Parallel-undertitel Title-parallel,Title,Title:p elm 245/?/u Markant-undertitel Title,Title:p elm 245/?/x Hovedtitel-på-tilføjet-værk-af-andet-ophav Title,Title:p elm 245/?/y Titel-på-supplement Title,Title:p elm 245/?/Ø Originaltitel-og-ophavsangivelse - elm 245/?/æ Identificerende-ophavsangivelse-til-titel - elm 245/?/ø Identificerende-tilføjelser-til-titel - elm 248 Bindspecifikation - elm 248/? Bindspecifikation Title elm 248/?/a Bindtitel/supplementstitel Title,Title:p elm 248/?/c Undertitel-og-anden-titelinformation Title,Title:p elm 248/?/e Ophavsangivelse - elm 248/?/g Bindnummer/supplementsbetegnelse Title elm 248/?/j Udgivelsesår - elm 248/?/l Generel-note Note elm 248/?/w Udgavebetegnelse - elm 250 Udgavebetegnelse - elm 250/? Udgavebetegnelse - elm 250/?/a Udgavebetegnelse - elm 250/?/b Kort-udgavebetegnelse/sonderingselement - elm 250/?/c Ophavsangivelse-opslag - elm 250/?/d Ophavsangivelse - elm 250/?/x Oplagsbetegnelse - elm 255 Nummereringer-og-dateringer - elm 255/? Nummereringer-og-dateringer - elm 255/?/a Nummereringer-og-dateringer - elm 256 Matematiske-oplysninger-for-kartografiske-materialer - #elm 256/? Matematiske-oplysninger-for-kartografiske-materialer Code-map-scale #elm 256/?/a Målestok Code-map-scale #elm 256/?/c Projektion Code-map-scale elm 260 Publicering/distribution - elm 260/? Publicering/distribution - elm 260/?/a Hjemsted-for-forlag Place-publication elm 260/?/b Navn-på-forlag Publisher elm 260/?/c Udgivelsesår Date-of-Publication elm 260/?/d Adresse-på-forlag - elm 260/?/e Funktionsangivelse-på-forlag - elm 260/?/f Hjemsted-for-distributør Place-publication elm 260/?/g Navn-på-distributør - elm 260/?/k Trykkerioplysninger - elm 260/?/p Navn-på-forlag/distributør-på-andet-sprog/alfabet publisher elm 300 Fysisk-beskrivelse - elm 300/? Fysisk-beskrivelse - elm 300/?/D Fysisk-beskrivelse - elm 300/?/a Omfang-uden-specifik-materialebetegnelse - elm 300/?/b Yderligere-fysisk-beskrivelse - elm 300/?/c Størrelse - elm 300/?/d Bilag - elm 300/?/e Tekniske-oplysninger - elm 300/?/l Spilletid - elm 300/?/n Specifik-materialebetegnelse - elm 440 Seriebetegnelse-i-materialets-form - elm 440/? Seriebetegnelse-i-materialets-form - elm 440/?/A Seriebetegnelse-i-materialets-form - elm 440/?/V Seriebetegnelse-i-materialets-form - elm 440/?/a Seriens-hovedtitel Title,Title-series,Title:p elm 440/?/c Undertitel-eller-anden-titelinformation Title,Title-series,Title:p elm 440/?/e Ophavsangivelse - elm 440/?/n Numerisk/alfabetisk-betegnelse-for-sektion Title,Title-series elm 440/?/o Titel-på-sektion Title,Title-series,Title:p elm 440/?/p Seriens-paralleltitel Title,Title-series,Title:p elm 440/?/v Nummerering-og-datering-i-serien Title,Title-series elm 440/?/y Seriebetegnelse-i-materialets-form - elm 440/?/z Seriens-ISSN ISSN elm 440/?/å Seriebetegnelse-i-materialets-form - elm 440/?/æ Identificerende-ophavsangivelse-til-seriens-titel - elm 440/?/ø Identificerende-tilføjelse-til-seriens-titel Title,Title-series,Title:p elm 500 Periodicums-frekvens - elm 500/? Periodicums-frekvens - elm 500/?/a Periodicums-frekvens - elm 501 Systemkrav/adgangsmåde - elm 501/? Systemkrav Note elm 501/?/a Adgangsmåde Note elm 502 Originaltitel/oversættelse - elm 502/? Originaltitel/oversættelse Note elm 502/?/a Originaltitel/oversættelse Note elm 504 Indholdsbeskrivelse - elm 504/? Indholdsbeskrivelse Note elm 504/?/a Indholdsbeskrivelse Note elm 505 Art/form - elm 505/? Art/form Note elm 505/?/a Art/form Note elm 506 Disputats/afhandling - elm 506/? Disputats/afhandling Note elm 506/?/a Disputats/afhandling Note elm 507 Anledning-til-udgivelse - elm 507/? Anledning-til-udgivelse Note elm 507/?/a Anledning-til-udgivelse Note elm 508 Sprog-og-alfabet - elm 508/? Sprog-og-alfabet Note elm 508/?/a Sprog-og-alfabet Note elm 509 Besætning - elm 509/? Besætning Note elm 509/?/a Besætning Note elm 512 Beskrivelse - elm 512/? Beskrivelse - elm 512/?/a Generel-note-til-beskrivelse Note elm 512/?/b Supplerende-tekst - elm 512/?/e Ophavsangivelse - elm 512/?/i Indledende-tekst - elm 512/?/t Titel Title,Title:p elm 513 Fælles-ophavsangivelse - elm 513/? Fælles-ophavsangivelse - elm 513/?/e Primær-ophavsangivelse - elm 517 Målgruppe-og-anvendelighed - elm 517/? Målgruppe-og-anvendelighed Note elm 517/?/a Målgruppe-og-anvendelighed Note elm 520 Værkets-bibliografiske-historie - elm 520/? Værkets-bibliografiske-historie - elm 520/?/a Værkets-bibliografiske-historie - elm 520/?/b Supplerende-tekst - elm 520/?/i Indledende-tekst - elm 520/?/t Titel Title,Title:p elm 521 Udgavens-oplag - elm 521/? Udgavens-oplag - elm 521/?/a Oplagsbetegnelse - elm 521/?/b Seneste-oplag - elm 521/?/c Oplagets-udgivelsesår Date-of-publication elm 526 Sammenhæng-med-andre-værker - elm 526/? Sammenhæng-med-andre-værker - elm 526/?/a Sammenhæng-med-andre-værker Note elm 526/?/b Supplerende-tekst - elm 526/?/d Ophavsangivelse-foran-titel - elm 526/?/e Ophavsangivelse - elm 526/?/i Indledende-tekst - elm 526/?/t Titel Title,Title:p elm 530 Indholdsnote - elm 530/? Indholdsnote - elm 530/?/a Indholdsnote Note elm 530/?/e Ophavsangivelse - elm 530/?/t Titel Title,Title:p elm 531 Indledende-tekst-til-maskingenereret-indholdsnote - elm 531/? Indledende-tekst-til-maskingenereret-indholdsnote - elm 531/?/a Indledende-tekst-til-maskingenereret-indholdsnote - elm 532 Litteraturhenvisninger-og-registre - elm 532/? Litteraturhenvisninger-og-registre - elm 532/?/a Litteraturhenvisninger-og-registre - elm 534 Partielt-indhold - elm 534/? Partielt-indhold Note elm 534/?/a Partielt-indhold Note elm 538 Numre-der-indgår-i-materialet - elm 538/? Numre-der-indgår-i-materialet Item-number elm 538/?/a Nummer Item-number elm 538/?/b Editionsnummer Item-number elm 538/?/c Pladenummer Item-number elm 538/?/d Editions-og-pladenummer Item-number elm 538/?/f Forlag Publisher elm 538/?/g Forlagsnummer Item-number elm 539 Grundlaget-for-katalogiseringen - elm 539/? Grundlaget-for-katalogiseringen - elm 539/?/a Grundlaget-for-katalogiseringen - elm 557 Periodicum-som-værtspublikation-for-I-analyse - elm 557/? Periodicum-som-værtspublikation-for-I-analyse - elm 557/?/V Periodicum-som-værtspublikation-for-I-analyse - elm 557/?/a Titel - # Title,Title-host-item,Title:p elm 557/?/j Udgivelsesår - elm 557/?/v Nummerering/datering - # Title,Title-host-item,Title:p elm 559 Generel-note - elm 559/? Generel-note - elm 559/?/a Generel-note Note elm 600 Personnavn-emneord - #elm 600/? Personnavn-emneord Subject-controlled,Subject-name-personal,Subject:p #elm 600/?/a Efternavn/fornavn-alene Subject-controlled,Subject-name-personal,Subject:p #elm 600/?/c Fødselsår Subject-controlled,Subject-name-personal,Subject:p #elm 600/?/e Romertal Subject-controlled,Subject-name-personal,Subject:p #elm 600/?/f Tilføjelse Subject-controlled,Subject-name-personal,Subject:p #elm 600/?/h Fornavn Subject-controlled,Subject-name-personal,Subject:p #elm 600/?/k Fuldt-udskrevet-fornavn Subject-controlled,Subject-name-personal,Subject:p #elm 600/?/x Underdeling-emne/art Subject-controlled,Subject-name-personal,Subject:p #elm 600/?/å Personnavn-emneord Subject-controlled,Subject-name-personal,Subject:p elm 610 Korporationsnavn-emneord - #elm 610/? Korporationsnavn-emneord Subject-controlled,Subject-name-corporate,Subject:p #elm 610/?/a Korporationsnavn Subject-controlled,Subject-name-corporate,Subject:p #elm 610/?/c Underkorporation Subject-controlled,Subject-name-corporate,Subject:p #elm 610/?/e Tilføjelse Subject-controlled,Subject-name-corporate,Subject:p #elm 610/?/t Titel Subject-controlled,Subject-name-corporate,Subject:p #elm 610/?/x Underdeling-emne/art Subject-controlled,Subject-name-corporate,Subject:p #elm 610/?/y Underdeling-periode Subject-controlled,Subject-name-corporate,Subject:p elm 621 Emnedata-for-kartografisk-materiale - #elm 621/? Emnedata-for-kartografisk-materiale Subject elm 621/? Emnedata-for-kartografisk-materiale - #elm 621/?/a Stednavn Subject #elm 621/?/b Land/stat Subject elm 630 Kontrolleret-emneord - #elm 630/? Kontrolleret-emneord Subject-controlled,Subject-controlled,Subject:p,Subject-controlled:p #elm 630/?/a Kontrolleret-emneord Subject-controlled,Subject-controlled,Subject:p,Subject-controlled:p #elm 630/?/b Andre-bibliotekers-kontrollerede-emneord Subject-controlled,Subject-controlled,Subject:p,Subject-controlled:p # #elm 631 Ukontrolleret-emneord - #elm 631/? Ukontrolleret-emneord Subject-controlled,Subject-uncontrolled,Subject:p,Subject-uncontrolled:p #elm 631/?/a Ukontrolleret-emneord Subject-controlled,Subject-uncontrolled,Subject:p,Subject-uncontrolled:p #elm 631/?/b Andre-bibliotekers-ukontrollerede-emneord Subject-controlled,Subject-uncontrolled,Subject:p,Subject-uncontrolled:p #elm 631/?/f Ukontrolleret-faglitterært-emneord Subject-controlled,Subject-uncontrolled,Subject:p,Subject-uncontrolled:p # elm 633 Stednavn - #elm 633/? Stednavn Subject-controlled,Subject-controlled,Subject:p,Subject-controlled:p #elm 633/?/a Stednavn Subject-controlled,Subject-controlled,Subject:p,Subject-controlled:p # elm 645 Titel - elm 645/? Titel Subject-controlled,Subject-controlled:p elm 645/?/c Titel Subject-controlled,Subject-controlled:p elm 650 LC-emneord subject-controlled #elm 650/? LC-emneord Subject-controlled #elm 650/?/a LC-emneord Subject-controlled #elm 650/?/v LC-emneord - #elm 650/?/x Underdeling-emne/art Subject-controlled #elm 650/?/y Underdeling-periode Subject #elm 650/?/z Underdeling-lokalitet Subject elm 651 LC-geografisk-emneord subject-controlled #elm 651/? LC-geografisk-emneord Subject #elm 651/?/a LC-geografisk-emneord Subject #elm 651/?/x Underdeling-emne/art Subject #elm 651/?/z Underdeling-lokalitet Subject elm 652 DK5-klassemærke - elm 652/? DK5-klassemærke - elm 652/?/a Efternavn/navn/korporationsnavn-som-alfabetisk-underdeling Classification-DK5-alfa-subdivision elm 652/?/b Andet-som-alfabetisk-underdeling Classification-DK5-alfa-subdivision,Subject-controlled elm 652/?/c Fødselsår Classification-DK5-alfa-subdivision elm 652/?/h Fornavn Classification-DK5-alfa-subdivision,Subject-controlled elm 652/?/i Analytisk-klassemærke Classification-DK5-number elm 652/?/m Opstillings-og-hovedplacering Classification-DK5-number,Classification-as-shelf-mark elm 652/?/n Nationalbibliografisk-hovedplacering Classification-DK5-number elm 652/?/o Opstillingsklassemærkeog-bibliotekshovedplacering Classification-DK5-number elm 652/?/p Biplacering Classification-DK5-number elm 652/?/q Nationalbibliografisk-biplacering Classification-DK5-number elm 652/?/r Biblioteksbiplacering Classification-DK5-number elm 652/?/v Tilføjede-cifre-efter-kolon - elm 652/?/z Tilføjede-cifre-efter-bindestreg - elm 652/?/å Feltnumerator - elm 654 Forældet-DK5-klassemærke - #elm 654/? Forældet-DK5-klassemærke Classification #elm 654/?/p Biplacering Classification elm 660 MeSH-emneord - elm 660/? MeSH-emneord Subject-controlled,Subject-controlled,MESH-Subject elm 660/?/a MeSH-emneord Subject-controlled,Subject-controlled,MESH-Subject elm 660/?/x Generel-underdeling Subject-controlled,Subject-controlled,MESH-Subject elm 661 Europæisk-pædagogisk-tesaurus - elm 661/? Europæisk-pædagogisk-tesaurus Subject-controlled,Subject-controlled elm 661/?/a Kontrolleret-dansk-emneord Subject-controlled,Subject-controlled elm 661/?/b Kontrolleret-engelsk-emneord Subject-controlled,Subject-controlled elm 661/?/c Ukontrolleret-dansk-emneord Subject-controlled,Subject-controlled elm 666 Kontrolleret-DBC-emneord - elm 666/? Kontrolleret-DBC-emneord - elm 666/?/e Stednavn-som-emneord-faglitteratur Subject-DBC,Subject-controlled,Subject-DBC-non-fiction,Subject-controlled elm 666/?/f Kontrolleret-faglitterært-emneord Subject-DBC,Subject-controlled,Subject-DBC-non-fiction,Subject-controlled elm 666/?/i Tidsangivelse Subject-DBC,Subject-controlled,Subject-DBC-non-fiction,Subject-controlled elm 666/?/l Stednavn Subject-DBC,Subject-controlled elm 666/?/m Musikalsk-genre-som-emneord Subject-DBC,Subject-controlled,Subject-DBC-music elm 666/?/n Musikalsk-besætning-som-emneord Subject-DBC,Subject-controlled,Subject-DBC-music elm 666/?/o Formbetegnelse Subject-DBC,Subject-controlled,Form-as-subject elm 666/?/p Periodebetegnelse Subject-DBC,Subject-controlled,Subject-DBC-music elm 666/?/q Stednavn-som-emneord-skønlitteratur Subject-DBC,Subject-controlled,Subject-DBC-fiction,Subject-controlled elm 666/?/s Kontrolleret-skønlitterært-emneord Subject-DBC,Subject-controlled,Subject-DBC-fiction,Subject-controlled elm 666/?/u Niveau/brugerkategori Subject-DBC,Subject-controlled,Level-as-subject elm 666/?/å Kontrolleret-DBC-emneord Subject-DBC,Subject-controlled elm 668 Genrebetegnelse - elm 668/? Genrebetegnelse Subject-controlled elm 668/?/a Genrebetegnelse Subject-controlled elm 668/?/b Underdeling Subject-controlled #elm 670 NAL-emneord - #elm 670/? NAL-emneord Subject-NAL #elm 670/?/a NAL-emneord Subject elm 690 COMPASS-emneord - elm 690/? COMPASS-emneord - # Subject-controlled,Subject-COMPASS elm 690/?/a Enkeltord - # Subject-controlled,Subject-COMPASS elm 690/?/b Flere-ord - # Subject-controlled,Subject-COMPASS elm 690/?/c Forbindende-tekst - elm 690/?/d Underdeling-periode - # Subject-controlled,Subject-COMPASS elm 690/?/h COMPASS-emneord - # Subject-controlled,Subject-COMPASS elm 690/?/i COMPASS-emneord - elm 690/?/m COMPASS-emneord - elm 690/?/v COMPASS-emneord - elm 690/?/w COMPASS-emneord - elm 690/?/x COMPASS-emneord - elm 690/?/y COMPASS-emneord - elm 690/?/z COMPASS-emneord - elm 700 Personnavn - elm 700/? Personnavn Personal-name elm 700/?/A Personnavn Personal-name elm 700/?/a Efternavn/fornavn-alene Personal-name elm 700/?/b Funktionsbetegnelse - elm 700/?/c Fødselsår Personal-name elm 700/?/f Tilføjelse Personal-name elm 700/?/h Fornavn Personal-name elm 700/?/k Fuldt-udskrevet-fornavn Personal-name elm 700/?/å Personnavn - elm 710 Korporationsnavn - elm 710/? Korporationsnavn Personal-name elm 710/?/A Korporationsnavn Personal-name elm 710/?/a Korporationsnavn Personal-name elm 710/?/c Underkorporation Personal-name elm 710/?/e Tilføjelse Personal-name elm 710/?/i Nummer-på-konference Personal-name elm 710/?/j Sted-for-konference Personal-name elm 710/?/k År-for-konference Personal-name elm 710/?/å Korporationsnavn - elm 739 Uniform-titel/standardtitel - elm 739/? Uniform-titel/standardtitel Title-uniform elm 739/?/t Uniform-titel/standardtitel Title-uniform elm 740 Uniform-titel - elm 740/? Uniform-titel Title,Title-uniform elm 740/?/a Uniform-titel Title,Title-uniform elm 740/?/s Titel-på-del-af-værket Title,Title-uniform elm 745 Varianttitel - elm 745/? Varianttitel - elm 745/?/A Varianttitel - elm 745/?/a Titel Title elm 745/?/o Titel-på-afhængig-publikation/supplement - elm 770 Personnavn-analyse - elm 770/? Personnavn-analyse Personal-name elm 770/?/A Personnavn-analyse - elm 770/?/a Efternavn/fornavn-alene Personal-name elm 770/?/c Fødselsår Personal-name elm 770/?/f Tilføjelse Personal-name elm 770/?/h Fornavn Personal-name elm 770/?/å Feltnumerator - elm 780 Korporationsnavn-analyse - elm 780/? Korporationsnavn-analyse Personal-name,Corporate-name elm 780/?/a Korporationsnavn Personal-name,Corporate-name elm 780/?/å Feltnumerator Personal-name,Corporate-name elm 795 Analytisk-titel - elm 795/? Analytisk-titel Title elm 795/?/A Analytisk-titel - elm 795/?/a Analytisk-titel Title elm 795/?/b Rest-af-analytisk-titel/alternativ-titel Title elm 795/?/c Undertitel/anden-titelinformation Title elm 795/?/e Ophavsangivelse-opslag - elm 795/?/i Anden-primær/sekundær-ophavsangivelse - elm 795/?/p Paralleltitel Title elm 795/?/u Almindeligt-kendt-tilnavn Title elm 795/?/v Uddragstitel Title elm 795/?/y Kode - elm 795/?/å Feltnumerator - elm 840 Serietitel - elm 840/? Serietitel - elm 840/?/V Serietitel - elm 840/?/a Seriens-hovedtitel Title,Title-series elm 840/?/v Seriens-nummerering/datering Title,Title-series elm 840/?/z Seriens-ISSN Identifier-standard,ISSN,Item-number elm 840/?/ø Identificerende-tilføjelser-til-seriens-titel Title elm 860 Tidligere-titel - elm 860/? Tidligere-titel - elm 860/?/c Tilføjelse-til-titel Related-periodical,Title-former elm 860/?/t Hovedtitel Title-former elm 860/?/z ISSN Identifier-standard,ISSN,Item-number elm 861 Senere-titel - elm 861/? Senere-titel - elm 861/?/c Tilføjelse-til-titel Related-periodical,Title-added-title-page elm 861/?/i Indledende-tekst - elm 861/?/t Hovedtitel Related-periodical,Title-added-title-page elm 861/?/z ISSN Identifier-standard,ISSN,Item-number elm 863 Udgivet-sammen-med - elm 863/? Udgivet-sammen-med - elm 863/?/t Hovedtitel Title-other-variant elm 863/?/z ISSN Identifier-standard,ISSN,Item-number elm 867 Hovedudgave-på-andet-sprog/andet-indhold - elm 867/? Hovedudgave-på-andet-sprog/andet-indhold - elm 867/?/t Hovedtitel Title-other-variant elm 867/?/z ISSN Identifier-standard,ISSN,Item-number elm 868 Udgave-på-andet-sprog/andet-indhold - elm 868/? Udgave-på-andet-sprog/andet-indhold - elm 868/?/t Hovedtitel Title-other-variant elm 868/?/z ISSN Identifier-standard,ISSN,Item-number elm 870 Hovedpublikation-til-supplement - elm 870/? Hovedpublikation-til-supplement - elm 870/?/t Hovedtitel Title-other-variant elm 870/?/z ISSN Identifier-standard,ISSN,Item-number elm 871 Supplement-til-hovedpublikation - elm 871/? Supplement-til-hovedpublikation - elm 871/?/c Tilføjelse-til-titel - elm 871/?/t Hovedtitel Title-other-variant elm 874 Underserie - elm 874/? Underserie - elm 874/?/t Hovedtitel Title-other-variant elm 874/?/z ISSN Identifier-standard,ISSN,Item-number elm 900 Henvisning-fra-personnavn - elm 900/? Henvisning-fra-personnavn Personal-name elm 900/?/A Henvisning-fra-personnavn - elm 900/?/a Efternavnet/fornavnet-alene Personal-name elm 900/?/c Fødselsår Personal-name elm 900/?/f Tilføjelse Personal-name elm 900/?/h Fornavn Personal-name elm 900/?/k Fuldt-udskrevet-fornavn Personal-name elm 900/?/w Ord-hvortil-der-henvises - elm 900/?/x Forbindende-tekst - elm 900/?/z Felt/delfeltkode-hvortil-der-henvises - elm 900/?/å Feltnumerator - elm 910 Henvisning-fra-korporationsnavn - elm 910/? Henvisning-fra-korporationsnavn Personal-name elm 910/?/A Henvisning-fra-korporationsnavn - elm 910/?/a Korporationsnavn Personal-name elm 910/?/c Underkorporation Personal-name elm 910/?/e Tilføjelse Personal-name elm 910/?/g Resten-af-korporationsnavn Personal-name elm 910/?/h Forbogstaver/fornavnsforkortelser Personal-name elm 910/?/w Ord-hvortil-der-henvises - elm 910/?/x Forbindende-tekst - elm 910/?/z Felt/delfeltkode-hvortil-der-henvises - elm 910/?/å Feltnumerator - elm 945 Henvisning-fra-titel - elm 945/? Henvisning-fra-titel - elm 945/?/a Title Title elm 945/?/w Ord-hvortil-der-henvises - elm 945/?/x Forbindende-tekst - elm 945/?/z Felt/delfeltkode-hvortil-der-henvises - elm 980 Bibliotekets-beholdning-af-et-periodicum - elm 980/? Bibliotekets-beholdning-af-et-periodicum - elm 980/?/d Første-år - elm 980/?/g Kode-for-fuldstændighed - elm s01 felt-s01 - elm s01/? felt-s01 - elm s01/?/a felt-s01 - elm s01/?/b felt-s01 - elm s06 felt-s06 - elm s06/? felt-s06 - elm s06/?/a felt-s06 - elm s06/?/b felt-s06 - elm s10 felt-s10 - elm s10/? felt-s10 - elm s10/?/a felt-s10 - elm s45 felt-s45 - elm s45/? felt-s45 - elm s45/?/a felt-s45 - idzebra-2.0.44/data1/0000755000175000017500000000000011412336534011216 500000000000000idzebra-2.0.44/data1/d1_prtree.c0000644000175000017500000000754111412332551013171 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include static void pr_string (FILE *out, const char *str, int len) { int i; for (i = 0; i126) fprintf (out, "\\x%02x", c & 255); else fputc (c, out); } } static void pr_tree (data1_handle dh, data1_node *n, FILE *out, int level) { fprintf (out, "%*s", level, ""); switch (n->which) { case DATA1N_root: fprintf (out, "root abstract syntax=%s\n", n->u.root.type); break; case DATA1N_tag: fprintf (out, "tag type=%s sel=%d\n", n->u.tag.tag, n->u.tag.node_selected); if (n->u.tag.attributes) { data1_xattr *xattr = n->u.tag.attributes; fprintf (out, "%*s attr", level, ""); for (; xattr; xattr = xattr->next) fprintf (out, " %s=%s ", xattr->name, xattr->value); fprintf (out, "\n"); } break; case DATA1N_data: case DATA1N_comment: if (n->which == DATA1N_data) fprintf (out, "data type="); else fprintf (out, "comment type="); switch (n->u.data.what) { case DATA1I_inctxt: fprintf (out, "inctxt\n"); break; case DATA1I_incbin: fprintf (out, "incbin\n"); break; case DATA1I_text: fprintf (out, "text '"); pr_string (out, n->u.data.data, n->u.data.len); fprintf (out, "'\n"); break; case DATA1I_num: fprintf (out, "num '"); pr_string (out, n->u.data.data, n->u.data.len); fprintf (out, "'\n"); break; case DATA1I_oid: fprintf (out, "oid '"); pr_string (out, n->u.data.data, n->u.data.len); fprintf (out, "'\n"); break; case DATA1I_xmltext: fprintf (out, "xml text '"); pr_string (out, n->u.data.data, n->u.data.len); fprintf (out, "'\n"); break; default: fprintf (out, "unknown(%d)\n", n->u.data.what); break; } break; case DATA1N_preprocess: fprintf (out, "preprocess target=%s\n", n->u.preprocess.target); if (n->u.preprocess.attributes) { data1_xattr *xattr = n->u.preprocess.attributes; fprintf (out, "%*s attr", level, ""); for (; xattr; xattr = xattr->next) fprintf (out, " %s=%s ", xattr->name, xattr->value); fprintf (out, "\n"); } break; case DATA1N_variant: fprintf (out, "variant\n"); #if 0 if (n->u.variant.type->name) fprintf (out, " class=%s type=%d value=%s\n", n->u.variant.type->name, n->u.variant.type->type, n->u.variant.value); #endif break; default: fprintf (out, "unknown(%d)\n", n->which); } if (n->child) pr_tree (dh, n->child, out, level+4); if (n->next) pr_tree (dh, n->next, out, level); else { if (n->parent && n->parent->last_child != n) fprintf(out, "%*sWARNING: last_child=%p != %p\n", level, "", n->parent->last_child, n); } } void data1_pr_tree (data1_handle dh, data1_node *n, FILE *out) { pr_tree (dh, n, out, 0); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/data1/d1_attset.c0000644000175000017500000001067511412332551013176 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include data1_att *data1_getattbyname(data1_handle dh, data1_attset *s, const char *name) { data1_att *r; data1_attset_child *c; /* scan local set */ for (r = s->atts; r; r = r->next) if (!data1_matchstr(r->name, name)) return r; for (c = s->children; c; c = c->next) { assert (c->child); /* scan included sets */ if ((r = data1_getattbyname (dh, c->child, name))) return r; } return 0; } data1_attset *data1_empty_attset(data1_handle dh) { NMEM mem = data1_nmem_get (dh); data1_attset *res = (data1_attset*) nmem_malloc(mem,sizeof(*res)); res->name = 0; res->oid = 0; res->atts = 0; res->children = 0; res->next = 0; return res; } data1_attset *data1_read_attset(data1_handle dh, const char *file) { data1_attset *res = 0; data1_attset_child **childp; data1_att **attp; FILE *f; NMEM mem = data1_nmem_get (dh); int lineno = 0; int argc; char *argv[50], line[512]; if (!(f = data1_path_fopen(dh, file, "r"))) return NULL; res = data1_empty_attset (dh); childp = &res->children; attp = &res->atts; while ((argc = readconf_line(f, &lineno, line, 512, argv, 50))) { char *cmd = argv[0]; if (!strcmp(cmd, "att")) { int num; char *name; char *endptr; data1_att *t; if (argc < 3) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args to att", file, lineno); continue; } if (argc > 3) { yaz_log(YLOG_WARN, "%s:%d: Local attributes not supported", file, lineno); } num = strtol(argv[1], &endptr, 10); if (*endptr != '\0') { yaz_log(YLOG_WARN, "%s:%d: Bad attribute integer %s", file, lineno, argv[1]); continue; } name = argv[2]; t = *attp = (data1_att *)nmem_malloc(mem, sizeof(*t)); t->parent = res; t->name = nmem_strdup(mem, name); t->value = num; t->next = 0; attp = &t->next; } else if (!strcmp(cmd, "name")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args to name", file, lineno); continue; } } else if (!strcmp(cmd, "reference")) { char *name; if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args to reference", file, lineno); continue; } name = argv[1]; res->oid = yaz_string_to_oid_nmem(yaz_oid_std(), CLASS_ATTSET, name, mem); if (!res->oid) { yaz_log(YLOG_WARN, "%s:%d: Unknown reference oid '%s'", file, lineno, name); fclose(f); return 0; } } else if (!strcmp(cmd, "ordinal")) { yaz_log (YLOG_WARN, "%s:%d: Directive ordinal ignored", file, lineno); } else if (!strcmp(cmd, "include")) { char *name; data1_attset *attset; if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args to include", file, lineno); continue; } name = argv[1]; if (!(attset = data1_get_attset (dh, name))) { yaz_log(YLOG_WARN, "%s:%d: Include of attset %s failed", file, lineno, name); continue; } *childp = (data1_attset_child *) nmem_malloc (mem, sizeof(**childp)); (*childp)->child = attset; (*childp)->next = 0; childp = &(*childp)->next; } else { yaz_log(YLOG_WARN, "%s:%d: Unknown directive '%s'", file, lineno, cmd); } } fclose(f); return res; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/data1/d1_write.c0000644000175000017500000001561611412332551013024 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* converts data1 tree to XML record */ #include #include #include #define IDSGML_MARGIN 75 #define PRETTY_FORMAT 0 static int wordlen(char *b, int max) { int l = 0; while (l < max && !d1_isspace(*b)) l++, b++; return l; } static void indent (WRBUF b, int col) { int i; for (i = 0; inext) { wrbuf_putc (b, ' '); if (p->what == DATA1I_xmltext) wrbuf_puts (b, p->name); else wrbuf_xmlputs (b, p->name); if (p->value) { wrbuf_putc (b, '='); wrbuf_putc (b, '"'); if (p->what == DATA1I_text) wrbuf_xmlputs (b, p->value); else wrbuf_puts (b, p->value); wrbuf_putc (b, '"'); } } } static void wrbuf_write_tag(WRBUF b, const char *tag, int opening) { int i, fixup = 0; /* see if we must fix the tag.. The grs.marc filter produces a data1 tree with not well-formed XML */ if (*tag >= '0' && *tag <= '9') fixup = 1; for (i = 0; tag[i]; i++) if (strchr( " <>$,()[]", tag[i])) fixup = 1; if (fixup) { wrbuf_puts(b, "tag"); if (opening) { wrbuf_puts(b, " value=\""); wrbuf_xmlputs(b, tag); wrbuf_puts(b, "\""); } } else wrbuf_puts(b, tag); } static int nodetoidsgml(data1_node *n, int select, WRBUF b, int col, int pretty_format) { data1_node *c; for (c = n->child; c; c = c->next) { char *tag; if (c->which == DATA1N_preprocess) { if (pretty_format) indent (b, col); wrbuf_puts (b, "u.preprocess.target); wrbuf_put_xattr (b, c->u.preprocess.attributes); if (c->child) wrbuf_puts(b, " "); if (nodetoidsgml(c, select, b, (col > 40) ? 40 : col+2, pretty_format) < 0) return -1; wrbuf_puts (b, "?>\n"); } else if (c->which == DATA1N_tag) { if (select && !c->u.tag.node_selected) continue; tag = c->u.tag.tag; if (!data1_matchstr(tag, "wellknown")) /* skip wellknown */ { if (nodetoidsgml(c, select, b, col, pretty_format) < 0) return -1; } else { if (pretty_format) indent (b, col); wrbuf_puts(b, "<"); wrbuf_write_tag(b, tag, 1); wrbuf_put_xattr (b, c->u.tag.attributes); wrbuf_puts(b, ">"); if (pretty_format) wrbuf_puts(b, "\n"); if (nodetoidsgml(c, select, b, (col > 40) ? 40 : col+2, pretty_format) < 0) return -1; if (pretty_format) indent (b, col); wrbuf_puts(b, ""); if (pretty_format) wrbuf_puts (b, "\n"); } } else if (c->which == DATA1N_data || c->which == DATA1N_comment) { char *p = c->u.data.data; int l = c->u.data.len; int first = 1; int lcol = col; if (pretty_format && !c->u.data.formatted_text) indent (b, col); if (c->which == DATA1N_comment) wrbuf_puts (b, ""); if (pretty_format) wrbuf_puts(b, "\n"); } } } return 0; } char *data1_nodetoidsgml (data1_handle dh, data1_node *n, int select, int *len) { WRBUF b = data1_get_wrbuf (dh); wrbuf_rewind(b); if (!data1_is_xmlmode (dh)) { wrbuf_puts (b, "<"); wrbuf_write_tag(b, n->u.root.type, 1); wrbuf_puts (b, ">\n"); } if (nodetoidsgml(n, select, b, 0, 0 /* no pretty format */)) return 0; if (!data1_is_xmlmode (dh)) { wrbuf_puts (b, "u.root.type, 0); wrbuf_puts (b, ">\n"); } *len = wrbuf_len(b); return wrbuf_buf(b); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/data1/d1_map.c0000644000175000017500000002245011412334332012440 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include struct data1_mapunit { int no_data; int no_chop; char *source_element_name; data1_maptag *target_path; struct data1_mapunit *next; }; data1_maptab *data1_read_maptab (data1_handle dh, const char *file) { NMEM mem = data1_nmem_get (dh); data1_maptab *res = (data1_maptab *)nmem_malloc(mem, sizeof(*res)); FILE *f; int lineno = 0; int argc; char *argv[50], line[512]; data1_mapunit **mapp; int local_numeric = 0; if (!(f = data1_path_fopen(dh, file, "r"))) return 0; res->name = 0; res->oid = 0; res->map = 0; mapp = &res->map; res->next = 0; while ((argc = readconf_line(f, &lineno, line, 512, argv, 50))) if (!strcmp(argv[0], "targetref")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # args for targetref", file, lineno); continue; } res->oid = yaz_string_to_oid_nmem(yaz_oid_std(), CLASS_RECSYN, argv[1], mem); if (!res->oid) { yaz_log(YLOG_WARN, "%s:%d: Unknown reference '%s'", file, lineno, argv[1]); continue; } } else if (!strcmp(argv[0], "targetname")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # args for targetname", file, lineno); continue; } res->target_absyn_name = (char *)nmem_malloc(mem, strlen(argv[1])+1); strcpy(res->target_absyn_name, argv[1]); } else if (!yaz_matchstr(argv[0], "localnumeric")) local_numeric = 1; else if (!strcmp(argv[0], "name")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # args for name", file, lineno); continue; } res->name = (char *)nmem_malloc(mem, strlen(argv[1])+1); strcpy(res->name, argv[1]); } else if (!strcmp(argv[0], "map")) { data1_maptag **mtp; char *ep, *path = argv[2]; if (argc < 3) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args for map", file, lineno); continue; } *mapp = (data1_mapunit *)nmem_malloc(mem, sizeof(**mapp)); (*mapp)->next = 0; if (argc > 3 && !data1_matchstr(argv[3], "nodata")) (*mapp)->no_data = 1; else (*mapp)->no_data = 0; if (argc > 3 && !data1_matchstr(argv[3], "nochop")) (*mapp)->no_chop = 1; else (*mapp)->no_chop = 0; (*mapp)->source_element_name = (char *)nmem_malloc(mem, strlen(argv[1])+1); strcpy((*mapp)->source_element_name, argv[1]); mtp = &(*mapp)->target_path; if (*path == '/') path++; for (ep = strchr(path, '/'); path; (void)((path = ep) && (ep = strchr(path, '/')))) { int type, np; char valstr[512], parm[512]; if (ep) ep++; if ((np = sscanf(path, "(%d,%511[^)]):%511[^/]", &type, valstr, parm)) < 2) { yaz_log(YLOG_WARN, "%s:%d: Syntax error in map " "directive: %s", file, lineno, argv[2]); fclose(f); return 0; } *mtp = (data1_maptag *)nmem_malloc(mem, sizeof(**mtp)); (*mtp)->next = 0; (*mtp)->type = type; if (np > 2 && !data1_matchstr(parm, "new")) (*mtp)->new_field = 1; else (*mtp)->new_field = 0; if ((type != 3 || local_numeric) && d1_isdigit(*valstr)) { (*mtp)->which = D1_MAPTAG_numeric; (*mtp)->value.numeric = atoi(valstr); } else { (*mtp)->which = D1_MAPTAG_string; (*mtp)->value.string = (char *)nmem_malloc(mem, strlen(valstr)+1); strcpy((*mtp)->value.string, valstr); } mtp = &(*mtp)->next; } mapp = &(*mapp)->next; } else yaz_log(YLOG_WARN, "%s:%d: Unknown directive '%s'", file, lineno, argv[0]); fclose(f); return res; } /* * See if the node n is equivalent to the tag t. */ static int tagmatch(data1_node *n, data1_maptag *t) { if (n->which != DATA1N_tag) return 0; if (n->u.tag.element) { if (n->u.tag.element->tag->tagset) { if (n->u.tag.element->tag->tagset->type != t->type) return 0; } else if (t->type != 3) return 0; if (n->u.tag.element->tag->which == DATA1T_numeric) { if (t->which != D1_MAPTAG_numeric) return 0; if (n->u.tag.element->tag->value.numeric != t->value.numeric) return 0; } else { if (t->which != D1_MAPTAG_string) return 0; if (data1_matchstr(n->u.tag.element->tag->value.string, t->value.string)) return 0; } } else /* local tag */ { char str[10]; if (t->type != 3) return 0; if (t->which == D1_MAPTAG_numeric) sprintf(str, "%d", t->value.numeric); else strcpy(str, t->value.string); if (data1_matchstr(n->u.tag.tag, str)) return 0; } return 1; } static data1_node *dup_child (data1_handle dh, data1_node *n, data1_node **last, NMEM mem, data1_node *parent) { data1_node *first = 0; data1_node **m = &first; for (; n; n = n->next) { *last = *m = (data1_node *) nmem_malloc (mem, sizeof(**m)); memcpy (*m, n, sizeof(**m)); (*m)->parent = parent; (*m)->root = parent->root; (*m)->child = dup_child(dh, n->child, &(*m)->last_child, mem, *m); m = &(*m)->next; } *m = 0; return first; } static int map_children(data1_handle dh, data1_node *n, data1_maptab *map, data1_node *res, NMEM mem) { data1_node *c; data1_mapunit *m; /* * locate each source element in turn. */ for (c = n->child; c; c = c->next) if (c->which == DATA1N_tag && c->u.tag.element) { for (m = map->map; m; m = m->next) { if (!data1_matchstr(m->source_element_name, c->u.tag.element->name)) { data1_node *pn = res; data1_node *cur = pn->last_child; data1_maptag *mt; /* * process the target path specification. */ for (mt = m->target_path; mt; mt = mt->next) { if (!cur || mt->new_field || !tagmatch(cur, mt)) { if (mt->which == D1_MAPTAG_string) { cur = data1_mk_node2 (dh, mem, DATA1N_tag, pn); cur->u.tag.tag = mt->value.string; } else if (mt->which == D1_MAPTAG_numeric) { data1_tag *tag = data1_gettagbynum( dh, pn->root->u.root.absyn->tagset, mt->type, mt->value.numeric); if (tag && tag->names->name) { cur = data1_mk_tag ( dh, mem, tag->names->name, 0, pn); } } } if (mt->next) pn = cur; else if (!m->no_data) { cur->child = dup_child (dh, c->child, &cur->last_child, mem, cur); if (!m->no_chop) { data1_concat_text(dh, mem, cur->child); data1_chop_text(dh, mem, cur->child); } } } } } if (map_children(dh, c, map, res, mem) < 0) return -1; } return 0; } /* * Create a (possibly lossy) copy of the given record based on the * table. The new copy will refer back to the data of the original record, * which should not be discarded during the lifetime of the copy. */ data1_node *data1_map_record (data1_handle dh, data1_node *n, data1_maptab *map, NMEM m) { data1_node *res1, *res = data1_mk_node2 (dh, m, DATA1N_root, 0); res->which = DATA1N_root; res->u.root.type = map->target_absyn_name; if (!(res->u.root.absyn = data1_get_absyn(dh, map->target_absyn_name, DATA1_XPATH_INDEXING_ENABLE))) { yaz_log(YLOG_WARN, "%s: Failed to load target absyn '%s'", map->name, map->target_absyn_name); } n = n->child; if (!n) return 0; res1 = data1_mk_tag (dh, m, map->target_absyn_name, 0, res); while (n && n->which != DATA1N_tag) n = n->next; if (map_children(dh, n, map, res1, m) < 0) return 0; return res; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/data1/d1_sutrs.c0000644000175000017500000000741311412332551013046 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* converts data1 tree to SUTRS record */ #include #define NTOBUF_INDENT 2 #define NTOBUF_MARGIN 75 static int wordlen(char *b, int i) { int l = 0; while (i && !d1_isspace(*b)) l++, b++, i--; return l; } static int nodetobuf(data1_node *n, int select, WRBUF b, int indent, int col) { data1_node *c; char line[1024]; for (c = n->child; c; c = c->next) { char *tag; if (c->which == DATA1N_tag) { if (select && !c->u.tag.node_selected) continue; if (c->u.tag.element && c->u.tag.element->tag) tag = c->u.tag.element->tag->names->name; /* first name */ else tag = c->u.tag.tag; /* local string tag */ if (data1_matchstr(tag, "wellknown")) /* skip wellknown */ { if (col) wrbuf_putc(b, '\n'); sprintf(line, "%*s%s:", indent * NTOBUF_INDENT, "", tag); wrbuf_write(b, line, strlen(line)); col = strlen(line); } if (nodetobuf(c, select, b, indent+1, col) < 0) return 0; } else if (c->which == DATA1N_data) { char *p = c->u.data.data; int l = c->u.data.len; int first = 0; if ((c->u.data.what == DATA1I_text || c->u.data.what == DATA1I_xmltext) && c->u.data.formatted_text) { wrbuf_putc(b, '\n'); wrbuf_write(b, c->u.data.data, c->u.data.len); sprintf(line, "%*s", indent * NTOBUF_INDENT, ""); wrbuf_write(b, line, strlen(line)); col = indent * NTOBUF_INDENT; } else if (c->u.data.what == DATA1I_text || c->u.data.what == DATA1I_xmltext) { while (l) { int wlen; while (l && d1_isspace(*p)) p++, l--; if (!l) break; /* break if we'll cross margin and word is not too long */ if (col + (wlen = wordlen(p, l)) > NTOBUF_MARGIN && wlen < NTOBUF_MARGIN - indent * NTOBUF_INDENT) { sprintf(line, "\n%*s", indent * NTOBUF_INDENT, ""); wrbuf_write(b, line, strlen(line)); col = indent * NTOBUF_INDENT; first = 1; } if (!first) { wrbuf_putc(b, ' '); col++; } while (l && !d1_isspace(*p)) { if (col > NTOBUF_MARGIN) { wrbuf_putc(b, '='); wrbuf_putc(b, '\n'); sprintf(line, "%*s", indent * NTOBUF_INDENT, ""); wrbuf_write(b, line, strlen(line)); col = indent * NTOBUF_INDENT; } wrbuf_putc(b, *p); p++; l--; col++; } first = 0; } } else if (c->u.data.what == DATA1I_num) { wrbuf_putc(b, ' '); wrbuf_write(b, c->u.data.data, c->u.data.len); } } } return 0; } /* * Return area containing SUTRS-formatted data. Ownership of this data * remains in this module, and the buffer is reused on next call. This may * need changing. */ char *data1_nodetobuf (data1_handle dh, data1_node *n, int select, int *len) { WRBUF b = data1_get_wrbuf (dh); wrbuf_rewind(b); if (nodetobuf(n, select, b, 0, 0)) return 0; wrbuf_putc(b, '\n'); *len = wrbuf_len(b); return wrbuf_buf(b); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/data1/d1_grs.c0000644000175000017500000002632211412332551012461 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* converts data1 tree to GRS-1 record */ #include #include #include #include #include #define D1_VARIANTARRAY 20 /* fixed max length on sup'd variant-list. Lazy me */ static Z_GenericRecord *data1_nodetogr_r(data1_handle dh, data1_node *n, int select, ODR o, int *len, data1_tag *wellknown_tag); static Z_ElementMetaData *get_ElementMetaData(ODR o) { Z_ElementMetaData *r = (Z_ElementMetaData *)odr_malloc(o, sizeof(*r)); r->seriesOrder = 0; r->usageRight = 0; r->num_hits = 0; r->hits = 0; r->displayName = 0; r->num_supportedVariants = 0; r->supportedVariants = 0; r->message = 0; r->elementDescriptor = 0; r->surrogateFor = 0; r->surrogateElement = 0; r->other = 0; return r; } /* * N should point to the *last* (leaf) triple in a sequence. Construct a variant * from each of the triples beginning (ending) with 'n', up to the * nearest parent tag. num should equal the number of triples in the * sequence. */ static Z_Variant *make_variant(data1_node *n, int num, ODR o) { Z_Variant *v = (Z_Variant *)odr_malloc(o, sizeof(*v)); data1_node *p; v->globalVariantSetId = 0; v->num_triples = num; v->triples = (Z_Triple **)odr_malloc(o, sizeof(Z_Triple*) * num); /* * cycle back up through the tree of variants * (traversing exactly 'level' variants). */ for (p = n, num--; p && num >= 0; p = p->parent, num--) { Z_Triple *t; assert(p->which == DATA1N_variant); t = v->triples[num] = (Z_Triple *)odr_malloc(o, sizeof(*t)); t->variantSetId = 0; t->zclass = odr_intdup(o, p->u.variant.type->zclass->zclass); t->type = odr_intdup(o, p->u.variant.type->type); switch (p->u.variant.type->datatype) { case DATA1K_string: t->which = Z_Triple_internationalString; t->value.internationalString = odr_strdup(o, p->u.variant.value); break; default: yaz_log(YLOG_WARN, "Unable to handle value for variant %s", p->u.variant.type->name); return 0; } } return v; } /* * Traverse the variant children of n, constructing a supportedVariant list. */ static int traverse_triples(data1_node *n, int level, Z_ElementMetaData *m, ODR o) { data1_node *c; for (c = n->child; c; c = c->next) if (c->which == DATA1N_data && level) { if (!m->supportedVariants) m->supportedVariants = (Z_Variant **)odr_malloc(o, sizeof(Z_Variant*) * D1_VARIANTARRAY); else if (m->num_supportedVariants >= D1_VARIANTARRAY) { yaz_log(YLOG_WARN, "Too many variants (D1_VARIANTARRAY==%d)", D1_VARIANTARRAY); return -1; } if (!(m->supportedVariants[m->num_supportedVariants++] = make_variant(n, level, o))) return -1; } else if (c->which == DATA1N_variant) if (traverse_triples(c, level+1, m, o) < 0) return -1; return 0; } /* * Locate some data under this node. This routine should handle variants * prettily. */ static char *get_data(data1_node *n, int *len) { char *r; data1_node *np = 0; while (n) { if (n->which == DATA1N_data) { int i; *len = n->u.data.len; for (i = 0; i<*len; i++) if (!d1_isspace(n->u.data.data[i])) break; while (*len && d1_isspace(n->u.data.data[*len - 1])) (*len)--; *len = *len - i; if (*len > 0) return n->u.data.data + i; } if (n->which == DATA1N_tag) np = n->child; n = n->next; if (!n) { n = np; np = 0; } } r = ""; *len = strlen(r); return r; } static Z_ElementData *nodetoelementdata(data1_handle dh, data1_node *n, int select, int leaf, ODR o, int *len, data1_tag *wellknown_tag) { Z_ElementData *res = (Z_ElementData *)odr_malloc(o, sizeof(*res)); if (!n) { res->which = Z_ElementData_elementNotThere; res->u.elementNotThere = odr_nullval(); } else if (n->which == DATA1N_data && leaf) { char str[64], *cp; int toget = n->u.data.len; cp = get_data (n, &toget); switch (n->u.data.what) { case DATA1I_num: res->which = Z_ElementData_numeric; res->u.numeric = odr_intdup(o, atoi_n(cp, toget)); *len += 4; break; case DATA1I_text: case DATA1I_xmltext: res->which = Z_ElementData_string; res->u.string = (char *)odr_malloc(o, toget+1); if (toget) memcpy(res->u.string, cp, toget); res->u.string[toget] = '\0'; *len += toget; break; case DATA1I_oid: res->which = Z_ElementData_oid; if (toget > 63) toget = 63; memcpy (str, cp, toget); str[toget] = '\0'; res->u.oid = odr_getoidbystr(o, str); *len += oid_oidlen(res->u.oid) * sizeof(int); break; default: yaz_log(YLOG_WARN, "Can't handle datatype."); return 0; } } else { res->which = Z_ElementData_subtree; if (!(res->u.subtree = data1_nodetogr_r (dh, n->parent, select, o, len, wellknown_tag ))) return 0; } return res; } static int is_empty_data (data1_node *n) { if (n && n->which == DATA1N_data && (n->u.data.what == DATA1I_text || n->u.data.what == DATA1I_xmltext)) { int i = n->u.data.len; while (i > 0 && d1_isspace(n->u.data.data[i-1])) i--; if (i == 0) return 1; } return 0; } static Z_TaggedElement *nodetotaggedelement(data1_handle dh, data1_node *n, int select, ODR o, int *len, data1_tag *wellknown_tag) { Z_TaggedElement *res = (Z_TaggedElement *)odr_malloc(o, sizeof(*res)); data1_tag *tag = 0; data1_node *data; int leaf = 0; if (n->which == DATA1N_tag) { if (n->u.tag.element) tag = n->u.tag.element->tag; data = n->child; /* skip empty data children */ while (is_empty_data(data)) data = data->next; if (!data) data = n->child; else { /* got one. see if this is the only non-empty one */ data1_node *sub = data->next; while (sub && is_empty_data(sub)) sub = sub->next; if (!sub) leaf = 1; /* all empty. 'data' is the only child */ } } /* * If we're a data element at this point, we need to insert a * wellKnown tag to wrap us up. */ else if (n->which == DATA1N_data || n->which == DATA1N_variant) { tag = wellknown_tag; if (!tag) return 0; data = n; leaf = 1; if (is_empty_data(data)) return 0; } else { yaz_log(YLOG_WARN, "Bad data."); return 0; } res->tagType = odr_intdup(o, (tag && tag->tagset) ? tag->tagset->type : 3); res->tagValue = (Z_StringOrNumeric *)odr_malloc(o, sizeof(Z_StringOrNumeric)); if (tag && tag->which == DATA1T_numeric) { res->tagValue->which = Z_StringOrNumeric_numeric; res->tagValue->u.numeric = odr_intdup(o, tag->value.numeric); } else { char *tagstr; if (n->which == DATA1N_tag) tagstr = n->u.tag.tag; /* tag at node */ else if (tag) tagstr = tag->value.string; /* no take from well-known */ else return 0; res->tagValue->which = Z_StringOrNumeric_string; res->tagValue->u.string = odr_strdup(o, tagstr); } res->tagOccurrence = 0; res->appliedVariant = 0; res->metaData = 0; if (n->which == DATA1N_variant || (data && data->which == DATA1N_variant && data->next == NULL)) { int nvars = 0; res->metaData = get_ElementMetaData(o); if (n->which == DATA1N_tag && n->u.tag.make_variantlist) if (traverse_triples(data, 0, res->metaData, o) < 0) return 0; while (data && data->which == DATA1N_variant) { nvars++; data = data->child; } if (n->which != DATA1N_tag || !n->u.tag.no_data_requested) res->appliedVariant = make_variant(data->parent, nvars-1, o); } if (n->which == DATA1N_tag && n->u.tag.no_data_requested) { res->content = (Z_ElementData *)odr_malloc(o, sizeof(*res->content)); res->content->which = Z_ElementData_noDataRequested; res->content->u.noDataRequested = odr_nullval(); } else if (!(res->content = nodetoelementdata (dh, data, select, leaf, o, len, wellknown_tag))) return 0; *len += 10; return res; } static Z_GenericRecord *data1_nodetogr_r(data1_handle dh, data1_node *n, int select, ODR o, int *len, data1_tag *wellknown_tag) { Z_GenericRecord *res = (Z_GenericRecord *)odr_malloc(o, sizeof(*res)); data1_node *c; int num_children = 0; for (c = n->child; c; c = c->next) num_children++; res->elements = (Z_TaggedElement **) odr_malloc(o, sizeof(Z_TaggedElement *) * num_children); res->num_elements = 0; for (c = n->child; c; c = c->next) { if (c->which == DATA1N_tag && select && !c->u.tag.node_selected) continue; if ((res->elements[res->num_elements] = nodetotaggedelement (dh, c, select, o, len, wellknown_tag))) res->num_elements++; } return res; } Z_GenericRecord *data1_nodetogr(data1_handle dh, data1_node *n, int select, ODR o, int *len) { data1_tag *wellknown_tag = 0; if (n->which == DATA1N_root) n = data1_get_root_tag (dh, n); if (n->root->u.root.absyn && !(wellknown_tag = data1_gettagbyname (dh, n->root->u.root.absyn->tagset, "wellKnown"))) { yaz_log(YLOG_WARN, "Unable to locate tag for 'wellKnown'"); wellknown_tag = odr_malloc(o, sizeof(*wellknown_tag)); wellknown_tag->which = DATA1T_numeric; wellknown_tag->value.numeric = 19; wellknown_tag->next = 0; wellknown_tag->tagset = odr_malloc(o, sizeof(*wellknown_tag->tagset)); wellknown_tag->tagset->type = 1; wellknown_tag->kind = DATA1K_string; } return data1_nodetogr_r(dh, n, select, o, len, wellknown_tag); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/data1/d1_expout.c0000644000175000017500000010753711412332551013222 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* * This module converts data1 tree to Z39.50 Explain records */ #include #include #include #include #include #include #include #include typedef struct { data1_handle dh; ODR o; int select; bool_t *false_value; bool_t *true_value; } ExpHandle; static int is_numeric_tag (ExpHandle *eh, data1_node *c) { if (!c || c->which != DATA1N_tag) return 0; if (!c->u.tag.element) { yaz_log(YLOG_WARN, "Tag %s is local", c->u.tag.tag); return 0; } if (c->u.tag.element->tag->which != DATA1T_numeric) { yaz_log(YLOG_WARN, "Tag %s is not numeric", c->u.tag.tag); return 0; } if (eh->select && !c->u.tag.node_selected) return 0; return c->u.tag.element->tag->value.numeric; } static int is_data_tag (ExpHandle *eh, data1_node *c) { if (!c || c->which != DATA1N_data) return 0; if (eh->select && !c->u.tag.node_selected) return 0; return 1; } static Odr_int *f_integer(ExpHandle *eh, data1_node *c) { char intbuf[64]; c = c->child; if (!is_data_tag (eh, c) || c->u.data.len >= sizeof(intbuf)) return 0; sprintf(intbuf, "%.*s", c->u.data.len, c->u.data.data); return odr_intdup(eh->o, atoi(intbuf)); } static char *f_string(ExpHandle *eh, data1_node *c) { char *r; c = c->child; if (!is_data_tag (eh, c)) return 0; r = (char *)odr_malloc(eh->o, c->u.data.len+1); memcpy(r, c->u.data.data, c->u.data.len); r[c->u.data.len] = '\0'; return r; } static bool_t *f_bool(ExpHandle *eh, data1_node *c) { bool_t *tf; char intbuf[64]; c = c->child; if (!is_data_tag (eh, c) || c->u.data.len > 63) return 0; tf = (int *)odr_malloc (eh->o, sizeof(*tf)); sprintf(intbuf, "%.*s", c->u.data.len, c->u.data.data); *tf = atoi(intbuf); return tf; } static Odr_oid *f_oid(ExpHandle *eh, data1_node *c, oid_class oclass) { char oidstr[64]; c = c->child; if (!is_data_tag (eh, c) || c->u.data.len > 63) return 0; yaz_snprintf(oidstr, sizeof(oidstr)-1, "%.*s", c->u.data.len, c->u.data.data); return yaz_string_to_oid_odr(yaz_oid_std(), CLASS_GENERAL, oidstr, eh->o); } static Z_IntUnit *f_intunit(ExpHandle *eh, data1_node *c) { /* fix */ return 0; } static Z_HumanString *f_humstring(ExpHandle *eh, data1_node *c) { Z_HumanString *r; Z_HumanStringUnit *u; c = c->child; if (!is_data_tag (eh, c)) return 0; r = (Z_HumanString *)odr_malloc(eh->o, sizeof(*r)); r->num_strings = 1; r->strings = (Z_HumanStringUnit **)odr_malloc(eh->o, sizeof(Z_HumanStringUnit*)); r->strings[0] = u = (Z_HumanStringUnit *)odr_malloc(eh->o, sizeof(*u)); u->language = 0; u->text = (char *)odr_malloc(eh->o, c->u.data.len+1); memcpy(u->text, c->u.data.data, c->u.data.len); u->text[c->u.data.len] = '\0'; return r; } static Z_CommonInfo *f_commonInfo(ExpHandle *eh, data1_node *n) { Z_CommonInfo *res = (Z_CommonInfo *)odr_malloc(eh->o, sizeof(*res)); data1_node *c; res->dateAdded = 0; res->dateChanged = 0; res->expiry = 0; res->humanStringLanguage = 0; res->otherInfo = 0; for (c = n->child; c; c = c->next) { switch (is_numeric_tag (eh, c)) { case 601: res->dateAdded = f_string(eh, c); break; case 602: res->dateChanged = f_string(eh, c); break; case 603: res->expiry = f_string(eh, c); break; case 604: res->humanStringLanguage = f_string(eh, c); break; } } return res; } Odr_oid **f_oid_seq (ExpHandle *eh, data1_node *n, int *num, oid_class oclass) { Odr_oid **res; data1_node *c; int i; *num = 0; for (c = n->child ; c; c = c->next) if (is_numeric_tag (eh, c) == 1000) ++(*num); if (!*num) return NULL; res = (Odr_oid **)odr_malloc (eh->o, sizeof(*res) * (*num)); for (c = n->child, i = 0 ; c; c = c->next) if (is_numeric_tag (eh, c) == 1000) res[i++] = f_oid (eh, c, oclass); return res; } char **f_string_seq (ExpHandle *eh, data1_node *n, int *num) { char **res; data1_node *c; int i; *num = 0; for (c = n->child ; c; c = c->next) { if (is_numeric_tag (eh, c) != 1001) continue; ++(*num); } if (!*num) return NULL; res = (char **)odr_malloc (eh->o, sizeof(*res) * (*num)); for (c = n->child, i = 0 ; c; c = c->next) { if (is_numeric_tag (eh, c) != 1001) continue; res[i++] = f_string (eh, c); } return res; } Z_ProximitySupport *f_proximitySupport (ExpHandle *eh, data1_node *n) { Z_ProximitySupport *res = (Z_ProximitySupport *) odr_malloc (eh->o, sizeof(*res)); res->anySupport = eh->false_value; res->num_unitsSupported = 0; res->unitsSupported = 0; return res; } Z_RpnCapabilities *f_rpnCapabilities (ExpHandle *eh, data1_node *n) { Z_RpnCapabilities *res = (Z_RpnCapabilities *) odr_malloc (eh->o, sizeof(*res)); data1_node *c; res->num_operators = 0; res->operators = NULL; res->resultSetAsOperandSupported = eh->false_value; res->restrictionOperandSupported = eh->false_value; res->proximity = NULL; for (c = n->child; c; c = c->next) { int i = 0; switch (is_numeric_tag(eh, c)) { case 550: for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 551) continue; (res->num_operators)++; } if (res->num_operators) res->operators = (Odr_int **) odr_malloc (eh->o, res->num_operators * sizeof(*res->operators)); for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 551) continue; res->operators[i++] = f_integer (eh, n); } break; case 552: res->resultSetAsOperandSupported = f_bool (eh, c); break; case 553: res->restrictionOperandSupported = f_bool (eh, c); break; case 554: res->proximity = f_proximitySupport (eh, c); break; } } return res; } Z_QueryTypeDetails *f_queryTypeDetails (ExpHandle *eh, data1_node *n) { Z_QueryTypeDetails *res = (Z_QueryTypeDetails *) odr_malloc(eh->o, sizeof(*res)); data1_node *c; res->which = Z_QueryTypeDetails_rpn; res->u.rpn = 0; for (c = n->child; c; c = c->next) { switch (is_numeric_tag(eh, c)) { case 519: res->which = Z_QueryTypeDetails_rpn; res->u.rpn = f_rpnCapabilities (eh, c); break; case 520: break; case 521: break; } } return res; } static Z_AccessInfo *f_accessInfo(ExpHandle *eh, data1_node *n) { Z_AccessInfo *res = (Z_AccessInfo *)odr_malloc(eh->o, sizeof(*res)); data1_node *c; res->num_queryTypesSupported = 0; res->queryTypesSupported = 0; res->num_diagnosticsSets = 0; res->diagnosticsSets = 0; res->num_attributeSetIds = 0; res->attributeSetIds = 0; res->num_schemas = 0; res->schemas = 0; res->num_recordSyntaxes = 0; res->recordSyntaxes = 0; res->num_resourceChallenges = 0; res->resourceChallenges = 0; res->restrictedAccess = 0; res->costInfo = 0; res->num_variantSets = 0; res->variantSets = 0; res->num_elementSetNames = 0; res->elementSetNames = 0; res->num_unitSystems = 0; res->unitSystems = 0; for (c = n->child; c; c = c->next) { int i = 0; switch (is_numeric_tag (eh, c)) { case 501: for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 518) continue; (res->num_queryTypesSupported)++; } if (res->num_queryTypesSupported) res->queryTypesSupported = (Z_QueryTypeDetails **) odr_malloc (eh->o, res->num_queryTypesSupported * sizeof(*res->queryTypesSupported)); for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 518) continue; res->queryTypesSupported[i++] = f_queryTypeDetails (eh, n); } break; case 503: res->diagnosticsSets = f_oid_seq(eh, c, &res->num_diagnosticsSets, CLASS_DIAGSET); break; case 505: res->attributeSetIds = f_oid_seq(eh, c, &res->num_attributeSetIds, CLASS_ATTSET); break; case 507: res->schemas = f_oid_seq(eh, c, &res->num_schemas, CLASS_SCHEMA); break; case 509: res->recordSyntaxes = f_oid_seq (eh, c, &res->num_recordSyntaxes, CLASS_RECSYN); break; case 511: res->resourceChallenges = f_oid_seq (eh, c, &res->num_resourceChallenges, CLASS_RESFORM); break; case 513: res->restrictedAccess = NULL; break; /* fix */ case 514: res->costInfo = NULL; break; /* fix */ case 515: res->variantSets = f_oid_seq (eh, c, &res->num_variantSets, CLASS_VARSET); break; case 516: res->elementSetNames = f_string_seq (eh, c, &res->num_elementSetNames); break; case 517: res->unitSystems = f_string_seq (eh, c, &res->num_unitSystems); break; } } return res; } static Odr_int *f_recordCount(ExpHandle *eh, data1_node *c, int *which) { int *wp = which; char intbuf[64]; c = c->child; if (!is_numeric_tag (eh, c)) return 0; if (c->u.tag.element->tag->value.numeric == 210) *wp = Z_DatabaseInfo_actualNumber; else if (c->u.tag.element->tag->value.numeric == 211) *wp = Z_DatabaseInfo_approxNumber; else return 0; if (!c->child || c->child->which != DATA1N_data || c->child->u.data.len >= sizeof(intbuf)) return 0; sprintf(intbuf, "%.*s", c->child->u.data.len, c->child->u.data.data); return odr_intdup(eh->o, atoi(intbuf)); } static Z_ContactInfo *f_contactInfo(ExpHandle *eh, data1_node *n) { Z_ContactInfo *res = (Z_ContactInfo *) odr_malloc (eh->o, sizeof(*res)); data1_node *c; res->name = 0; res->description = 0; res->address = 0; res->email = 0; res->phone = 0; for (c = n->child; c; c = c->next) { switch (is_numeric_tag (eh, c)) { case 102: res->name = f_string (eh, c); break; case 113: res->description = f_humstring (eh, c); break; case 127: res->address = f_humstring (eh, c); break; case 128: res->email = f_string (eh, c); break; case 129: res->phone = f_string (eh, c); break; } } return res; } static Z_DatabaseList *f_databaseList(ExpHandle *eh, data1_node *n) { data1_node *c; Z_DatabaseList *res; int i = 0; for (c = n->child; c; c = c->next) { if (!is_numeric_tag (eh, c) != 102) continue; ++i; } if (!i) return NULL; res = (Z_DatabaseList *)odr_malloc (eh->o, sizeof(*res)); res->num_databases = i; res->databases = (char **)odr_malloc (eh->o, sizeof(*res->databases) * i); i = 0; for (c = n->child; c; c = c->next) { if (!is_numeric_tag (eh, c) != 102) continue; res->databases[i++] = f_string (eh, c); } return res; } static Z_NetworkAddressIA *f_networkAddressIA(ExpHandle *eh, data1_node *n) { Z_NetworkAddressIA *res = (Z_NetworkAddressIA *) odr_malloc (eh->o, sizeof(*res)); data1_node *c; res->hostAddress = 0; res->port = 0; for (c = n->child; c; c = c->next) { switch (is_numeric_tag (eh, c)) { case 121: res->hostAddress = f_string (eh, c); break; case 122: res->port = f_integer (eh, c); break; } } return res; } static Z_NetworkAddressOther *f_networkAddressOther(ExpHandle *eh, data1_node *n) { Z_NetworkAddressOther *res = (Z_NetworkAddressOther *) odr_malloc (eh->o, sizeof(*res)); data1_node *c; res->type = 0; res->address = 0; for (c = n->child; c; c = c->next) { switch (is_numeric_tag (eh, c)) { case 124: res->type = f_string (eh, c); break; case 121: res->address = f_string (eh, c); break; } } return res; } static Z_NetworkAddress **f_networkAddresses(ExpHandle *eh, data1_node *n, int *num) { Z_NetworkAddress **res = NULL; data1_node *c; int i = 0; *num = 0; for (c = n->child; c; c = c->next) { switch (is_numeric_tag (eh, c)) { case 120: case 123: (*num)++; break; } } if (*num) res = (Z_NetworkAddress **) odr_malloc (eh->o, sizeof(*res) * (*num)); for (c = n->child; c; c = c->next) { switch (is_numeric_tag (eh, c)) { case 120: res[i] = (Z_NetworkAddress *) odr_malloc (eh->o, sizeof(**res)); res[i]->which = Z_NetworkAddress_iA; res[i]->u.internetAddress = f_networkAddressIA(eh, c); i++; break; case 123: res[i] = (Z_NetworkAddress *) odr_malloc (eh->o, sizeof(**res)); res[i]->which = Z_NetworkAddress_other; res[i]->u.other = f_networkAddressOther(eh, c); i++; break; } } return res; } static Z_CategoryInfo *f_categoryInfo(ExpHandle *eh, data1_node *n) { Z_CategoryInfo *res = (Z_CategoryInfo *)odr_malloc(eh->o, sizeof(*res)); data1_node *c; res->category = 0; res->originalCategory = 0; res->description = 0; res->asn1Module = 0; for (c = n->child; c; c = c->next) { switch (is_numeric_tag (eh, c)) { case 102: res->category = f_string(eh, c); break; case 302: res->originalCategory = f_string(eh, c); break; case 113: res->description = f_humstring(eh, c); break; case 303: res->asn1Module = f_string (eh, c); break; } } return res; } static Z_CategoryList *f_categoryList(ExpHandle *eh, data1_node *n) { Z_CategoryList *res = (Z_CategoryList *)odr_malloc(eh->o, sizeof(*res)); data1_node *c; res->commonInfo = 0; res->num_categories = 0; res->categories = NULL; for (c = n->child; c; c = c->next) { int i = 0; switch (is_numeric_tag (eh, c)) { case 600: res->commonInfo = f_commonInfo(eh, c); break; case 300: for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 301) continue; (res->num_categories)++; } if (res->num_categories) res->categories = (Z_CategoryInfo **)odr_malloc (eh->o, res->num_categories * sizeof(*res->categories)); for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 301) continue; res->categories[i++] = f_categoryInfo (eh, n); } break; } } assert (res->num_categories && res->categories); return res; } static Z_TargetInfo *f_targetInfo(ExpHandle *eh, data1_node *n) { Z_TargetInfo *res = (Z_TargetInfo *)odr_malloc(eh->o, sizeof(*res)); data1_node *c; res->commonInfo = 0; res->name = 0; res->recentNews = 0; res->icon = 0; res->namedResultSets = 0; res->multipleDBsearch = 0; res->maxResultSets = 0; res->maxResultSize = 0; res->maxTerms = 0; res->timeoutInterval = 0; res->welcomeMessage = 0; res->contactInfo = 0; res->description = 0; res->num_nicknames = 0; res->nicknames = 0; res->usageRest = 0; res->paymentAddr = 0; res->hours = 0; res->num_dbCombinations = 0; res->dbCombinations = 0; res->num_addresses = 0; res->addresses = 0; res->num_languages = 0; res->languages = NULL; res->commonAccessInfo = 0; for (c = n->child; c; c = c->next) { int i = 0; switch (is_numeric_tag (eh, c)) { case 600: res->commonInfo = f_commonInfo(eh, c); break; case 102: res->name = f_string(eh, c); break; case 103: res->recentNews = f_humstring(eh, c); break; case 104: res->icon = NULL; break; /* fix */ case 105: res->namedResultSets = f_bool(eh, c); break; case 106: res->multipleDBsearch = f_bool(eh, c); break; case 107: res->maxResultSets = f_integer(eh, c); break; case 108: res->maxResultSize = f_integer(eh, c); break; case 109: res->maxTerms = f_integer(eh, c); break; case 110: res->timeoutInterval = f_intunit(eh, c); break; case 111: res->welcomeMessage = f_humstring(eh, c); break; case 112: res->contactInfo = f_contactInfo(eh, c); break; case 113: res->description = f_humstring(eh, c); break; case 114: res->num_nicknames = 0; for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 102) continue; (res->num_nicknames)++; } if (res->num_nicknames) res->nicknames = (char **)odr_malloc (eh->o, res->num_nicknames * sizeof(*res->nicknames)); for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 102) continue; res->nicknames[i++] = f_string (eh, n); } break; case 115: res->usageRest = f_humstring(eh, c); break; case 116: res->paymentAddr = f_humstring(eh, c); break; case 117: res->hours = f_humstring(eh, c); break; case 118: res->num_dbCombinations = 0; for (n = c->child; n; n = n->next) { if (!is_numeric_tag(eh, n) != 605) continue; (res->num_dbCombinations)++; } if (res->num_dbCombinations) res->dbCombinations = (Z_DatabaseList **)odr_malloc (eh->o, res->num_dbCombinations * sizeof(*res->dbCombinations)); for (n = c->child; n; n = n->next) { if (!is_numeric_tag(eh, n) != 605) continue; res->dbCombinations[i++] = f_databaseList (eh, n); } break; case 119: res->addresses = f_networkAddresses (eh, c, &res->num_addresses); break; case 125: res->num_languages = 0; for (n = c->child; n; n = n->next) { if (!is_numeric_tag(eh, n) != 126) continue; (res->num_languages)++; } if (res->num_languages) res->languages = (char **) odr_malloc (eh->o, res->num_languages * sizeof(*res->languages)); for (n = c->child; n; n = n->next) { if (!is_numeric_tag(eh, n) != 126) continue; res->languages[i++] = f_string (eh, n); } break; case 500: res->commonAccessInfo = f_accessInfo(eh, c); break; } } if (!res->namedResultSets) res->namedResultSets = eh->false_value; if (!res->multipleDBsearch) res->multipleDBsearch = eh->false_value; return res; } static Z_DatabaseInfo *f_databaseInfo(ExpHandle *eh, data1_node *n) { Z_DatabaseInfo *res = (Z_DatabaseInfo *)odr_malloc(eh->o, sizeof(*res)); data1_node *c; res->commonInfo = 0; res->name = 0; res->explainDatabase = 0; res->num_nicknames = 0; res->nicknames = 0; res->icon = 0; res->userFee = 0; res->available = 0; res->titleString = 0; res->num_keywords = 0; res->keywords = 0; res->description = 0; res->associatedDbs = 0; res->subDbs = 0; res->disclaimers = 0; res->news = 0; res->u.actualNumber = 0; res->defaultOrder = 0; res->avRecordSize = 0; res->maxRecordSize = 0; res->hours = 0; res->bestTime = 0; res->lastUpdate = 0; res->updateInterval = 0; res->coverage = 0; res->proprietary = 0; res->copyrightText = 0; res->copyrightNotice = 0; res->producerContactInfo = 0; res->supplierContactInfo = 0; res->submissionContactInfo = 0; res->accessInfo = 0; for (c = n->child; c; c = c->next) { int i = 0; switch (is_numeric_tag (eh, c)) { case 600: res->commonInfo = f_commonInfo(eh, c); break; case 102: res->name = f_string(eh, c); break; case 226: res->explainDatabase = odr_nullval(); break; case 114: res->num_nicknames = 0; for (n = c->child; n; n = n->next) { if (!is_numeric_tag(eh, n) || n->u.tag.element->tag->value.numeric != 102) continue; (res->num_nicknames)++; } if (res->num_nicknames) res->nicknames = (char **)odr_malloc (eh->o, res->num_nicknames * sizeof(*res->nicknames)); for (n = c->child; n; n = n->next) { if (!is_numeric_tag(eh, n) || n->u.tag.element->tag->value.numeric != 102) continue; res->nicknames[i++] = f_string (eh, n); } break; case 104: res->icon = 0; break; /* fix */ case 201: res->userFee = f_bool(eh, c); break; case 202: res->available = f_bool(eh, c); break; case 203: res->titleString = f_humstring(eh, c); break; case 227: res->num_keywords = 0; for (n = c->child; n; n = n->next) { if (!is_numeric_tag(eh, n) != 1000) continue; (res->num_keywords)++; } if (res->num_keywords) res->keywords = (Z_HumanString **)odr_malloc (eh->o, res->num_keywords * sizeof(*res->keywords)); for (n = c->child; n; n = n->next) { if (!is_numeric_tag(eh, n) != 1000) continue; res->keywords[i++] = f_humstring (eh, n); } break; case 113: res->description = f_humstring(eh, c); break; case 205: res->associatedDbs = f_databaseList (eh, c); break; case 206: res->subDbs = f_databaseList (eh, c); break; case 207: res->disclaimers = f_humstring(eh, c); break; case 103: res->news = f_humstring(eh, c); break; case 209: res->u.actualNumber = f_recordCount(eh, c, &res->which); break; case 212: res->defaultOrder = f_humstring(eh, c); break; case 213: res->avRecordSize = f_integer(eh, c); break; case 214: res->maxRecordSize = f_integer(eh, c); break; case 215: res->hours = f_humstring(eh, c); break; case 216: res->bestTime = f_humstring(eh, c); break; case 217: res->lastUpdate = f_string(eh, c); break; case 218: res->updateInterval = f_intunit(eh, c); break; case 219: res->coverage = f_humstring(eh, c); break; case 220: res->proprietary = f_bool(eh, c); break; case 221: res->copyrightText = f_humstring(eh, c); break; case 222: res->copyrightNotice = f_humstring(eh, c); break; case 223: res->producerContactInfo = f_contactInfo(eh, c); break; case 224: res->supplierContactInfo = f_contactInfo(eh, c); break; case 225: res->submissionContactInfo = f_contactInfo(eh, c); break; case 500: res->accessInfo = f_accessInfo(eh, c); break; } } if (!res->userFee) res->userFee = eh->false_value; if (!res->available) res->available = eh->true_value; return res; } Z_StringOrNumeric *f_stringOrNumeric (ExpHandle *eh, data1_node *n) { Z_StringOrNumeric *res = (Z_StringOrNumeric *) odr_malloc (eh->o, sizeof(*res)); data1_node *c; for (c = n->child; c; c = c->next) { switch (is_numeric_tag (eh, c)) { case 1001: res->which = Z_StringOrNumeric_string; res->u.string = f_string (eh, c); break; case 1002: res->which = Z_StringOrNumeric_numeric; res->u.numeric = f_integer (eh, c); break; } } return res; } Z_AttributeDescription *f_attributeDescription ( ExpHandle *eh, data1_node *n) { Z_AttributeDescription *res = (Z_AttributeDescription *) odr_malloc(eh->o, sizeof(*res)); data1_node *c; int i = 0; res->name = 0; res->description = 0; res->attributeValue = 0; res->num_equivalentAttributes = 0; res->equivalentAttributes = 0; for (c = n->child; c; c = c->next) { switch (is_numeric_tag (eh, c)) { case 102: res->name = f_string (eh, c); break; case 113: res->description = f_humstring (eh, c); break; case 710: res->attributeValue = f_stringOrNumeric (eh, c); break; case 752: (res->num_equivalentAttributes++); break; } } if (res->num_equivalentAttributes) res->equivalentAttributes = (Z_StringOrNumeric **) odr_malloc (eh->o, sizeof(*res->equivalentAttributes) * res->num_equivalentAttributes); for (c = n->child; c; c = c->next) if (is_numeric_tag (eh, c) == 752) res->equivalentAttributes[i++] = f_stringOrNumeric (eh, c); return res; } Z_AttributeType *f_attributeType (ExpHandle *eh, data1_node *n) { Z_AttributeType *res = (Z_AttributeType *) odr_malloc(eh->o, sizeof(*res)); data1_node *c; res->name = 0; res->description = 0; res->attributeType = 0; res->num_attributeValues = 0; res->attributeValues = 0; for (c = n->child; c; c = c->next) { int i = 0; switch (is_numeric_tag (eh, c)) { case 102: res->name = f_string (eh, c); break; case 113: res->description = f_humstring (eh, c); break; case 704: res->attributeType = f_integer (eh, c); break; case 708: for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 709) continue; (res->num_attributeValues)++; } if (res->num_attributeValues) res->attributeValues = (Z_AttributeDescription **) odr_malloc (eh->o, res->num_attributeValues * sizeof(*res->attributeValues)); for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 709) continue; res->attributeValues[i++] = f_attributeDescription (eh, n); } break; } } return res; } Z_AttributeSetInfo *f_attributeSetInfo (ExpHandle *eh, data1_node *n) { Z_AttributeSetInfo *res = (Z_AttributeSetInfo *) odr_malloc(eh->o, sizeof(*res)); data1_node *c; res->commonInfo = 0; res->attributeSet = 0; res->name = 0; res->num_attributes = 0; res->attributes = 0; res->description = 0; for (c = n->child; c; c = c->next) { int i = 0; switch (is_numeric_tag (eh, c)) { case 600: res->commonInfo = f_commonInfo (eh, c); break; case 1000: res->attributeSet = f_oid (eh, c, CLASS_ATTSET); break; case 102: res->name = f_string (eh, c); break; case 750: for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 751) continue; (res->num_attributes)++; } if (res->num_attributes) res->attributes = (Z_AttributeType **) odr_malloc (eh->o, res->num_attributes * sizeof(*res->attributes)); for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 751) continue; res->attributes[i++] = f_attributeType (eh, n); } break; case 113: res->description = f_humstring (eh, c); break; } } return res; } Z_OmittedAttributeInterpretation *f_omittedAttributeInterpretation ( ExpHandle *eh, data1_node *n) { Z_OmittedAttributeInterpretation *res = (Z_OmittedAttributeInterpretation*) odr_malloc (eh->o, sizeof(*res)); data1_node *c; res->defaultValue = 0; res->defaultDescription = 0; for (c = n->child; c; c = c->next) { switch (is_numeric_tag (eh, c)) { case 706: res->defaultValue = f_stringOrNumeric (eh, c); break; case 113: res->defaultDescription = f_humstring(eh, c); break; } } return res; } Z_AttributeValue *f_attributeValue (ExpHandle *eh, data1_node *n) { Z_AttributeValue *res = (Z_AttributeValue *) odr_malloc (eh->o, sizeof(*res)); data1_node *c; res->value = 0; res->description = 0; res->num_subAttributes = 0; res->subAttributes = 0; res->num_superAttributes = 0; res->superAttributes = 0; res->partialSupport = 0; for (c = n->child; c; c = c->next) { int i = 0; switch (is_numeric_tag (eh, c)) { case 710: res->value = f_stringOrNumeric (eh, c); break; case 113: res->description = f_humstring (eh, c); break; case 712: for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 713) continue; (res->num_subAttributes)++; } if (res->num_subAttributes) res->subAttributes = (Z_StringOrNumeric **) odr_malloc (eh->o, res->num_subAttributes * sizeof(*res->subAttributes)); for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 713) continue; res->subAttributes[i++] = f_stringOrNumeric (eh, n); } break; case 714: for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 715) continue; (res->num_superAttributes)++; } if (res->num_superAttributes) res->superAttributes = (Z_StringOrNumeric **) odr_malloc (eh->o, res->num_superAttributes * sizeof(*res->superAttributes)); for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 715) continue; res->superAttributes[i++] = f_stringOrNumeric (eh, n); } break; case 711: res->partialSupport = odr_nullval (); break; } } return res; } Z_AttributeTypeDetails *f_attributeTypeDetails (ExpHandle *eh, data1_node *n) { Z_AttributeTypeDetails *res = (Z_AttributeTypeDetails *) odr_malloc(eh->o, sizeof(*res)); data1_node *c; res->attributeType = 0; res->defaultIfOmitted = 0; res->num_attributeValues = 0; res->attributeValues = 0; for (c = n->child; c; c = c->next) { int i = 0; switch (is_numeric_tag (eh, c)) { case 704: res->attributeType = f_integer (eh, c); break; case 705: res->defaultIfOmitted = f_omittedAttributeInterpretation (eh, c); break; case 708: for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 709) continue; (res->num_attributeValues)++; } if (res->num_attributeValues) res->attributeValues = (Z_AttributeValue **) odr_malloc (eh->o, res->num_attributeValues * sizeof(*res->attributeValues)); for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 709) continue; res->attributeValues[i++] = f_attributeValue (eh, n); } break; } } return res; } Z_AttributeSetDetails *f_attributeSetDetails (ExpHandle *eh, data1_node *n) { Z_AttributeSetDetails *res = (Z_AttributeSetDetails *) odr_malloc(eh->o, sizeof(*res)); data1_node *c; res->attributeSet = 0; res->num_attributesByType = 0; res->attributesByType = 0; for (c = n->child; c; c = c->next) { int i = 0; switch (is_numeric_tag (eh, c)) { case 1000: res->attributeSet = f_oid(eh, c, CLASS_ATTSET); break; case 702: for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 703) continue; (res->num_attributesByType)++; } if (res->num_attributesByType) res->attributesByType = (Z_AttributeTypeDetails **) odr_malloc (eh->o, res->num_attributesByType * sizeof(*res->attributesByType)); for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 703) continue; res->attributesByType[i++] = f_attributeTypeDetails (eh, n); } break; } } return res; } Z_AttributeValueList *f_attributeValueList (ExpHandle *eh, data1_node *n) { Z_AttributeValueList *res = (Z_AttributeValueList *) odr_malloc (eh->o, sizeof(*res)); data1_node *c; int i = 0; res->num_attributes = 0; res->attributes = 0; for (c = n->child; c; c = c->next) if (is_numeric_tag (eh, c) == 710) (res->num_attributes)++; if (res->num_attributes) { res->attributes = (Z_StringOrNumeric **) odr_malloc (eh->o, res->num_attributes * sizeof(*res->attributes)); } for (c = n->child; c; c = c->next) if (is_numeric_tag(eh, c) == 710) res->attributes[i++] = f_stringOrNumeric (eh, c); return res; } Z_AttributeOccurrence *f_attributeOccurrence (ExpHandle *eh, data1_node *n) { Z_AttributeOccurrence *res = (Z_AttributeOccurrence *) odr_malloc (eh->o, sizeof(*res)); data1_node *c; res->attributeSet = 0; res->attributeType = 0; res->mustBeSupplied = 0; res->which = Z_AttributeOcc_any_or_none; res->attributeValues.any_or_none = odr_nullval (); for (c = n->child; c; c = c->next) { switch (is_numeric_tag (eh, c)) { case 1000: res->attributeSet = f_oid (eh, c, CLASS_ATTSET); break; case 704: res->attributeType = f_integer (eh, c); break; case 720: res->mustBeSupplied = odr_nullval (); break; case 721: res->which = Z_AttributeOcc_any_or_none; res->attributeValues.any_or_none = odr_nullval (); break; case 722: res->which = Z_AttributeOcc_specific; res->attributeValues.specific = f_attributeValueList (eh, c); break; } } return res; } Z_AttributeCombination *f_attributeCombination (ExpHandle *eh, data1_node *n) { Z_AttributeCombination *res = (Z_AttributeCombination *) odr_malloc (eh->o, sizeof(*res)); data1_node *c; int i = 0; res->num_occurrences = 0; res->occurrences = 0; for (c = n->child; c; c = c->next) if (is_numeric_tag (eh, c) == 719) (res->num_occurrences)++; if (res->num_occurrences) { res->occurrences = (Z_AttributeOccurrence **) odr_malloc (eh->o, res->num_occurrences * sizeof(*res->occurrences)); } for (c = n->child; c; c = c->next) if (is_numeric_tag(eh, c) == 719) res->occurrences[i++] = f_attributeOccurrence (eh, c); assert (res->num_occurrences); return res; } Z_AttributeCombinations *f_attributeCombinations (ExpHandle *eh, data1_node *n) { Z_AttributeCombinations *res = (Z_AttributeCombinations *) odr_malloc (eh->o, sizeof(*res)); data1_node *c; res->defaultAttributeSet = 0; res->num_legalCombinations = 0; res->legalCombinations = 0; for (c = n->child; c; c = c->next) { int i = 0; switch (is_numeric_tag (eh, c)) { case 1000: res->defaultAttributeSet = f_oid (eh, c, CLASS_ATTSET); break; case 717: for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 718) continue; (res->num_legalCombinations)++; } if (res->num_legalCombinations) res->legalCombinations = (Z_AttributeCombination **) odr_malloc (eh->o, res->num_legalCombinations * sizeof(*res->legalCombinations)); for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 718) continue; res->legalCombinations[i++] = f_attributeCombination (eh, n); } break; } } assert (res->num_legalCombinations); return res; } Z_AttributeDetails *f_attributeDetails (ExpHandle *eh, data1_node *n) { Z_AttributeDetails *res = (Z_AttributeDetails *) odr_malloc(eh->o, sizeof(*res)); data1_node *c; res->commonInfo = 0; res->databaseName = 0; res->num_attributesBySet = 0; res->attributesBySet = NULL; res->attributeCombinations = NULL; for (c = n->child; c; c = c->next) { int i = 0; switch (is_numeric_tag (eh, c)) { case 600: res->commonInfo = f_commonInfo(eh, c); break; case 102: res->databaseName = f_string (eh, c); break; case 700: for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 701) continue; (res->num_attributesBySet)++; } if (res->num_attributesBySet) res->attributesBySet = (Z_AttributeSetDetails **) odr_malloc (eh->o, res->num_attributesBySet * sizeof(*res->attributesBySet)); for (n = c->child; n; n = n->next) { if (is_numeric_tag(eh, n) != 701) continue; res->attributesBySet[i++] = f_attributeSetDetails (eh, n); } break; case 716: res->attributeCombinations = f_attributeCombinations (eh, c); break; } } return res; } Z_ExplainRecord *data1_nodetoexplain (data1_handle dh, data1_node *n, int select, ODR o) { ExpHandle eh; Z_ExplainRecord *res = (Z_ExplainRecord *)odr_malloc(o, sizeof(*res)); eh.dh = dh; eh.select = select; eh.o = o; eh.false_value = (int *)odr_malloc(eh.o, sizeof(eh.false_value)); *eh.false_value = 0; eh.true_value = (int *)odr_malloc(eh.o, sizeof(eh.true_value)); *eh.true_value = 1; assert(n->which == DATA1N_root); if (strcmp(n->u.root.type, "explain")) { yaz_log(YLOG_WARN, "Attempt to convert a non-Explain record"); return 0; } for (n = n->child; n; n = n->next) { switch (is_numeric_tag (&eh, n)) { case 1: res->which = Z_Explain_categoryList; if (!(res->u.categoryList = f_categoryList(&eh, n))) return 0; return res; case 2: res->which = Z_Explain_targetInfo; if (!(res->u.targetInfo = f_targetInfo(&eh, n))) return 0; return res; case 3: res->which = Z_Explain_databaseInfo; if (!(res->u.databaseInfo = f_databaseInfo(&eh, n))) return 0; return res; case 7: res->which = Z_Explain_attributeSetInfo; if (!(res->u.attributeSetInfo = f_attributeSetInfo(&eh, n))) return 0; return res; case 10: res->which = Z_Explain_attributeDetails; if (!(res->u.attributeDetails = f_attributeDetails(&eh, n))) return 0; return res; } } yaz_log(YLOG_WARN, "No category in Explain record"); return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/data1/d1_marc.c0000644000175000017500000002756511412334743012627 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* converts data1 tree to ISO2709/MARC record */ #include #include #include #include #include #include #include #include #include #include data1_marctab *data1_read_marctab (data1_handle dh, const char *file) { FILE *f; NMEM mem = data1_nmem_get (dh); data1_marctab *res = (data1_marctab *)nmem_malloc(mem, sizeof(*res)); char line[512], *argv[50]; int lineno = 0; int argc; if (!(f = data1_path_fopen(dh, file, "r"))) return 0; res->name = 0; res->oid = 0; res->next = 0; res->length_data_entry = 4; res->length_starting = 5; res->length_implementation = 0; strcpy(res->future_use, "4"); strcpy(res->record_status, "n"); strcpy(res->implementation_codes, " "); res->indicator_length = 2; res->identifier_length = 2; res->force_indicator_length = -1; res->force_identifier_length = -1; strcpy(res->user_systems, "z "); while ((argc = readconf_line(f, &lineno, line, 512, argv, 50))) if (!strcmp(*argv, "name")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d:Missing arg for %s", file, lineno, *argv); continue; } res->name = nmem_strdup(mem, argv[1]); } else if (!strcmp(*argv, "reference")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Missing arg for %s", file, lineno, *argv); continue; } res->oid = yaz_string_to_oid_nmem(yaz_oid_std(), CLASS_TAGSET, argv[1], mem); if (!res->oid) { yaz_log(YLOG_WARN, "%s:%d: Unknown tagset reference '%s'", file, lineno, argv[1]); continue; } } else if (!strcmp(*argv, "length-data-entry")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Missing arg for %s", file, lineno, *argv); continue; } res->length_data_entry = atoi(argv[1]); } else if (!strcmp(*argv, "length-starting")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Missing arg for %s", file, lineno, *argv); continue; } res->length_starting = atoi(argv[1]); } else if (!strcmp(*argv, "length-implementation")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Missing arg for %s", file, lineno, *argv); continue; } res->length_implementation = atoi(argv[1]); } else if (!strcmp(*argv, "future-use")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Missing arg for %s", file, lineno, *argv); continue; } strncpy(res->future_use, argv[1], 2); } else if (!strcmp(*argv, "force-indicator-length")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Missing arg for %s", file, lineno, *argv); continue; } res->force_indicator_length = atoi(argv[1]); } else if (!strcmp(*argv, "force-identifier-length")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Missing arg for %s", file, lineno, *argv); continue; } res->force_identifier_length = atoi(argv[1]); } else if (!strcmp(*argv, "implementation-codes")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Missing arg for %s", file, lineno, *argv); continue; } /* up to 4 characters .. space pad */ if (strlen(argv[1]) > 4) yaz_log(YLOG_WARN, "%s:%d: Max 4 characters for " "implementation-codes", file, lineno); else memcpy(res->implementation_codes, argv[1], strlen(argv[1])); } else yaz_log(YLOG_WARN, "%s:%d: Unknown directive '%s'", file, lineno, *argv); fclose(f); return res; } static void get_data2(data1_node *n, int *len, char *dst, size_t max) { *len = 0; while (n) { if (n->which == DATA1N_data) { if (dst && *len < max) { size_t copy_len = max - *len; if (copy_len > n->u.data.len) copy_len = n->u.data.len; memcpy(dst + *len, n->u.data.data, copy_len); } *len += n->u.data.len; } if (n->which == DATA1N_tag && *len == 0) n = n->child; else if (n->which == DATA1N_data) n = n->next; else break; } } static void memint (char *p, int val, int len) { char buf[10]; if (len == 1) *p = val + '0'; else { sprintf (buf, "%08d", val); memcpy (p, buf+8-len, len); } } /* check for indicator. non MARCXML only */ static int is_indicator (data1_marctab *p, data1_node *subf) { if (p->indicator_length != 2 || (subf && subf->which == DATA1N_tag && strlen(subf->u.tag.tag) == 2)) return 1; return 0; } static int nodetomarc(data1_handle dh, data1_marctab *p, data1_node *n, int selected, char **buf, int *size) { char leader[24]; int len = 26; int dlen; int base_address = 25; int entry_p, data_p; char *op; data1_node *field, *subf; #if 0 data1_pr_tree(dh, n, stdout); #endif yaz_log (YLOG_DEBUG, "nodetomarc"); memcpy (leader+5, p->record_status, 1); memcpy (leader+6, p->implementation_codes, 4); memint (leader+10, p->indicator_length, 1); memint (leader+11, p->identifier_length, 1); memcpy (leader+17, p->user_systems, 3); memint (leader+20, p->length_data_entry, 1); memint (leader+21, p->length_starting, 1); memint (leader+22, p->length_implementation, 1); memcpy (leader+23, p->future_use, 1); for (field = n->child; field; field = field->next) { int control_field = 0; /* 00X fields - usually! */ int marc_xml = 0; if (field->which != DATA1N_tag) continue; if (selected && !field->u.tag.node_selected) continue; subf = field->child; if (!subf) continue; if (!yaz_matchstr(field->u.tag.tag, "mc?")) continue; else if (!strcmp(field->u.tag.tag, "leader")) { int dlen = 0; get_data2(subf, &dlen, leader, 24); continue; } else if (!strcmp(field->u.tag.tag, "controlfield")) { control_field = 1; marc_xml = 1; } else if (!strcmp(field->u.tag.tag, "datafield")) { control_field = 0; marc_xml = 1; } else if (subf->which == DATA1N_data) { control_field = 1; marc_xml = 0; } else { control_field = 0; marc_xml = 0; } len += 4 + p->length_data_entry + p->length_starting + p->length_implementation; base_address += 3 + p->length_data_entry + p->length_starting + p->length_implementation; if (!control_field) len += p->indicator_length; /* we'll allow no indicator if length is not 2 */ /* select when old XML format, since indicator is an element */ if (marc_xml == 0 && is_indicator (p, subf)) subf = subf->child; for (; subf; subf = subf->next) { if (!control_field) { if (marc_xml && subf->which != DATA1N_tag) continue; /* we skip comments, cdata .. */ len += p->identifier_length; } get_data2(subf, &dlen, 0, 0); len += dlen; } } if (!*buf) *buf = (char *)xmalloc(*size = len); else if (*size <= len) *buf = (char *)xrealloc(*buf, *size = len); op = *buf; /* we know the base address now */ memint (leader+12, base_address, 5); /* copy temp leader to real output buf op */ memcpy (op, leader, 24); memint (op, len, 5); entry_p = 24; data_p = base_address; for (field = n->child; field; field = field->next) { int control_field = 0; int marc_xml = 0; const char *tag = 0; int data_0 = data_p; char indicator_data[6]; memset (indicator_data, ' ', sizeof(indicator_data)-1); indicator_data[sizeof(indicator_data)-1] = '\0'; if (field->which != DATA1N_tag) continue; if (selected && !field->u.tag.node_selected) continue; subf = field->child; if (!subf) continue; if (!yaz_matchstr(field->u.tag.tag, "mc?")) continue; else if (!strcmp(field->u.tag.tag, "leader")) continue; else if (!strcmp(field->u.tag.tag, "controlfield")) { control_field = 1; marc_xml = 1; } else if (!strcmp(field->u.tag.tag, "datafield")) { control_field = 0; marc_xml = 1; } else if (subf->which == DATA1N_data) { control_field = 1; marc_xml = 0; } else { control_field = 0; marc_xml = 0; } if (marc_xml == 0 && is_indicator (p, subf)) { strncpy(indicator_data, subf->u.tag.tag, sizeof(indicator_data)-1); subf = subf->child; } else if (marc_xml == 1 && !control_field) { data1_xattr *xa; for (xa = field->u.tag.attributes; xa; xa = xa->next) { if (!strcmp(xa->name, "ind1")) indicator_data[0] = xa->value[0]; if (!strcmp(xa->name, "ind2")) indicator_data[1] = xa->value[0]; if (!strcmp(xa->name, "ind3")) indicator_data[2] = xa->value[0]; } } if (!control_field) { memcpy (op + data_p, indicator_data, p->indicator_length); data_p += p->indicator_length; } for (; subf; subf = subf->next) { if (!control_field) { const char *identifier = "a"; if (marc_xml) { data1_xattr *xa; if (subf->which != DATA1N_tag) continue; if (strcmp(subf->u.tag.tag, "subfield")) yaz_log(YLOG_WARN, "Unhandled tag %s", subf->u.tag.tag); for (xa = subf->u.tag.attributes; xa; xa = xa->next) if (!strcmp(xa->name, "code")) identifier = xa->value; } else if (subf->which != DATA1N_tag) yaz_log(YLOG_WARN, "Malformed fields for marc output."); else identifier = subf->u.tag.tag; op[data_p] = ISO2709_IDFS; memcpy (op + data_p+1, identifier, p->identifier_length-1); data_p += p->identifier_length; } get_data2(subf, &dlen, op + data_p, 100000); data_p += dlen; } op[data_p++] = ISO2709_FS; if (marc_xml) { data1_xattr *xa; for (xa = field->u.tag.attributes; xa; xa = xa->next) if (!strcmp(xa->name, "tag")) tag = xa->value; } else tag = field->u.tag.tag; if (!tag || strlen(tag) != 3) tag = "000"; memcpy (op + entry_p, tag, 3); entry_p += 3; memint (op + entry_p, data_p - data_0, p->length_data_entry); entry_p += p->length_data_entry; memint (op + entry_p, data_0 - base_address, p->length_starting); entry_p += p->length_starting; entry_p += p->length_implementation; } op[entry_p++] = ISO2709_FS; assert (entry_p == base_address); op[data_p++] = ISO2709_RS; assert (data_p == len); return len; } char *data1_nodetomarc(data1_handle dh, data1_marctab *p, data1_node *n, int selected, int *len) { int *size; char **buf = data1_get_map_buf (dh, &size); n = data1_get_root_tag (dh, n); if (!n) return 0; *len = nodetomarc(dh, p, n, selected, buf, size); return *buf; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/data1/d1_soif.c0000644000175000017500000000460411412332551012625 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* * This module generates SOIF (Simple Object Interchange Format) records * from d1-nodes. nested elements are flattened out, depth first, by * concatenating the tag names at each level. */ #include #include static int nodetoelement(data1_node *n, int select, char *prefix, WRBUF b) { data1_node *c; char tmp[1024]; for (c = n->child; c; c = c->next) { char *tag; if (c->which == DATA1N_tag) { if (select && !c->u.tag.node_selected) continue; if (c->u.tag.element && c->u.tag.element->tag) tag = c->u.tag.element->tag->names->name; /* first name */ else tag = c->u.tag.tag; /* local string tag */ if (*prefix) sprintf(tmp, "%s-%s", prefix, tag); else strcpy(tmp, tag); if (nodetoelement(c, select, tmp, b) < 0) return 0; } else if (c->which == DATA1N_data) { char *p = c->u.data.data; int l = c->u.data.len; wrbuf_write(b, prefix, strlen(prefix)); sprintf(tmp, "{%d}:\t", l); wrbuf_write(b, tmp, strlen(tmp)); wrbuf_write(b, p, l); wrbuf_putc(b, '\n'); } } return 0; } char *data1_nodetosoif (data1_handle dh, data1_node *n, int select, int *len) { WRBUF b = data1_get_wrbuf (dh); char buf[128]; wrbuf_rewind(b); if (n->which != DATA1N_root) return 0; sprintf(buf, "@%s{\n", n->u.root.type); wrbuf_write(b, buf, strlen(buf)); if (nodetoelement(n, select, "", b)) return 0; wrbuf_write(b, "}\n", 2); *len = wrbuf_len(b); return wrbuf_buf(b); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/data1/d1_varset.c0000644000175000017500000001013111412332551013161 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include data1_vartype *data1_getvartypebyct (data1_handle dh, data1_varset *set, const char *zclass, const char *type) { data1_varclass *c; data1_vartype *t; for (c = set->classes; c; c = c->next) if (!data1_matchstr(c->name, zclass)) { for (t = c->types; t; t = t->next) if (!data1_matchstr(t->name, type)) return t; yaz_log(YLOG_WARN, "Unknown variant type %s in class %s", type, zclass); return 0; } yaz_log(YLOG_WARN, "Unknown variant class %s", zclass); return 0; } data1_vartype *data1_getvartypeby_absyn (data1_handle dh, data1_absyn *absyn, char *zclass, char *type) { return data1_getvartypebyct(dh, absyn->varset, zclass, type); } data1_varset *data1_read_varset (data1_handle dh, const char *file) { NMEM mem = data1_nmem_get (dh); data1_varset *res = (data1_varset *)nmem_malloc(mem, sizeof(*res)); data1_varclass **classp = &res->classes, *zclass = 0; data1_vartype **typep = 0; FILE *f; int lineno = 0; int argc; char *argv[50],line[512]; res->name = 0; res->oid = 0; res->classes = 0; if (!(f = data1_path_fopen(dh, file, "r"))) { yaz_log(YLOG_WARN|YLOG_ERRNO, "%s", file); return 0; } while ((argc = readconf_line(f, &lineno, line, 512, argv, 50))) if (!strcmp(argv[0], "class")) { data1_varclass *r; if (argc != 3) { yaz_log(YLOG_WARN, "%s:%d: Bad # or args to class", file, lineno); continue; } *classp = r = zclass = (data1_varclass *) nmem_malloc(mem, sizeof(*r)); r->set = res; r->zclass = atoi(argv[1]); r->name = nmem_strdup(mem, argv[2]); r->types = 0; typep = &r->types; r->next = 0; classp = &r->next; } else if (!strcmp(argv[0], "type")) { data1_vartype *r; if (!typep) { yaz_log(YLOG_WARN, "%s:%d: Directive class must precede type", file, lineno); continue; } if (argc != 4) { yaz_log(YLOG_WARN, "%s:%d: Bad # or args to type", file, lineno); continue; } *typep = r = (data1_vartype *)nmem_malloc(mem, sizeof(*r)); r->name = nmem_strdup(mem, argv[2]); r->zclass = zclass; r->type = atoi(argv[1]); if (!(r->datatype = data1_maptype (dh, argv[3]))) { yaz_log(YLOG_WARN, "%s:%d: Unknown datatype '%s'", file, lineno, argv[3]); fclose(f); return 0; } r->next = 0; typep = &r->next; } else if (!strcmp(argv[0], "name")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # args for name", file, lineno); continue; } res->name = nmem_strdup(mem, argv[1]); } else if (!strcmp(argv[0], "reference")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # args for reference", file, lineno); continue; } res->oid = yaz_string_to_oid_nmem(yaz_oid_std(), CLASS_VARSET, argv[1], mem); if (!res->oid) { yaz_log(YLOG_WARN, "%s:%d: Unknown reference '%s'", file, lineno, argv[1]); continue; } } else yaz_log(YLOG_WARN, "%s:%d: Unknown directive '%s'", file, lineno, argv[0]); fclose(f); return res; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/data1/d1_espec.c0000644000175000017500000002252511412332551012766 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include static Z_Variant *read_variant(int argc, char **argv, NMEM nmem, const char *file, int lineno) { Z_Variant *r = (Z_Variant *)nmem_malloc(nmem, sizeof(*r)); int i; r->globalVariantSetId = odr_oiddup_nmem(nmem, yaz_oid_varset_variant_1); if (argc) r->triples = (Z_Triple **)nmem_malloc(nmem, sizeof(Z_Triple*) * argc); else r->triples = 0; r->num_triples = argc; for (i = 0; i < argc; i++) { int zclass, type; char value[512]; Z_Triple *t; if (sscanf(argv[i], "(%d,%d,%511[^)])", &zclass, &type, value) < 3) { yaz_log(YLOG_WARN, "%s:%d: Syntax error in variant component '%s'", file, lineno, argv[i]); return 0; } t = r->triples[i] = (Z_Triple *)nmem_malloc(nmem, sizeof(Z_Triple)); t->variantSetId = 0; t->zclass = nmem_intdup(nmem, zclass); t->type = nmem_intdup(nmem, type); /* * This is wrong.. we gotta look up the correct type for the * variant, I guess... damn this stuff. */ if (*value == '@') { t->which = Z_Triple_null; t->value.null = odr_nullval(); } else if (d1_isdigit(*value)) { t->which = Z_Triple_integer; t->value.integer = nmem_intdup(nmem, atoi(value)); } else { t->which = Z_Triple_internationalString; t->value.internationalString = nmem_strdup(nmem, value); } } return r; } static Z_Occurrences *read_occurrences(char *occ, NMEM nmem, const char *file, int lineno) { Z_Occurrences *op = (Z_Occurrences *)nmem_malloc(nmem, sizeof(*op)); char *p; if (!occ) { op->which = Z_Occurrences_values; op->u.values = (Z_OccurValues *) nmem_malloc(nmem, sizeof(Z_OccurValues)); op->u.values->start = nmem_intdup(nmem, 1); op->u.values->howMany = 0; } else if (!strcmp(occ, "all")) { op->which = Z_Occurrences_all; op->u.all = odr_nullval(); } else if (!strcmp(occ, "last")) { op->which = Z_Occurrences_last; op->u.all = odr_nullval(); } else { Z_OccurValues *ov = (Z_OccurValues *)nmem_malloc(nmem, sizeof(*ov)); if (!d1_isdigit(*occ)) { yaz_log(YLOG_WARN, "%s:%d: Bad occurrences-spec %s", file, lineno, occ); return 0; } op->which = Z_Occurrences_values; op->u.values = ov; ov->start = nmem_intdup(nmem, atoi(occ)); if ((p = strchr(occ, '+'))) ov->howMany = nmem_intdup(nmem, atoi(p + 1)); else ov->howMany = 0; } return op; } static Z_ETagUnit *read_tagunit(char *buf, NMEM nmem, const char *file, int lineno) { Z_ETagUnit *u = (Z_ETagUnit *)nmem_malloc(nmem, sizeof(*u)); int terms; int type; char value[512], occ[512]; if (*buf == '*') { u->which = Z_ETagUnit_wildPath; u->u.wildPath = odr_nullval(); } else if (*buf == '?') { u->which = Z_ETagUnit_wildThing; if (buf[1] == ':') u->u.wildThing = read_occurrences(buf+2, nmem, file, lineno); else u->u.wildThing = read_occurrences(0, nmem, file, lineno); } else if ((terms = sscanf(buf, "(%d,%511[^)]):%511[a-zA-Z0-9+]", &type, value, occ)) >= 2) { int numval; Z_SpecificTag *t; char *valp = value; int force_string = 0; if (*valp == '\'') { valp++; force_string = 1; if (*valp && valp[strlen(valp)-1] == '\'') *valp = '\0'; } u->which = Z_ETagUnit_specificTag; u->u.specificTag = t = (Z_SpecificTag *)nmem_malloc(nmem, sizeof(*t)); t->tagType = nmem_intdup(nmem, type); t->tagValue = (Z_StringOrNumeric *) nmem_malloc(nmem, sizeof(*t->tagValue)); if (!force_string && isdigit(*(unsigned char *)valp)) { numval = atoi(valp); t->tagValue->which = Z_StringOrNumeric_numeric; t->tagValue->u.numeric = nmem_intdup(nmem, numval); } else { t->tagValue->which = Z_StringOrNumeric_string; t->tagValue->u.string = nmem_strdup(nmem, valp); } if (terms > 2) /* an occurrences-spec exists */ t->occurrences = read_occurrences(occ, nmem, file, lineno); else t->occurrences = 0; } else if ((terms = sscanf(buf, "%511[^)]", value)) >= 1) { Z_SpecificTag *t; char *valp = value; u->which = Z_ETagUnit_specificTag; u->u.specificTag = t = (Z_SpecificTag *)nmem_malloc(nmem, sizeof(*t)); t->tagType = nmem_intdup(nmem, 3); t->tagValue = (Z_StringOrNumeric *) nmem_malloc(nmem, sizeof(*t->tagValue)); t->tagValue->which = Z_StringOrNumeric_string; t->tagValue->u.string = nmem_strdup(nmem, valp); t->occurrences = read_occurrences("all", nmem, file, lineno); } else { return 0; } return u; } /* * Read an element-set specification from a file. * NOTE: If !o, memory is allocated directly from the heap by nmem_malloc(). */ Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file) { FILE *f; NMEM nmem = data1_nmem_get (dh); int lineno = 0; int argc, size_esn = 0; char *argv[50], line[512]; Z_Espec1 *res = (Z_Espec1 *)nmem_malloc(nmem, sizeof(*res)); if (!(f = data1_path_fopen(dh, file, "r"))) return 0; res->num_elementSetNames = 0; res->elementSetNames = 0; res->defaultVariantSetId = 0; res->defaultVariantRequest = 0; res->defaultTagType = 0; res->num_elements = 0; res->elements = 0; while ((argc = readconf_line(f, &lineno, line, 512, argv, 50))) if (!strcmp(argv[0], "elementsetnames")) { int nnames = argc-1, i; if (!nnames) { yaz_log(YLOG_WARN, "%s:%d: Empty elementsetnames directive", file, lineno); continue; } res->elementSetNames = (char **)nmem_malloc(nmem, sizeof(char**)*nnames); for (i = 0; i < nnames; i++) { res->elementSetNames[i] = nmem_strdup(nmem, argv[i+1]); } res->num_elementSetNames = nnames; } else if (!strcmp(argv[0], "defaultvariantsetid")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args for %s", file, lineno, argv[0]); continue; } if (!(res->defaultVariantSetId = odr_getoidbystr_nmem(nmem, argv[1]))) { yaz_log(YLOG_WARN, "%s:%d: Bad defaultvariantsetid", file, lineno); continue; } } else if (!strcmp(argv[0], "defaulttagtype")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args for %s", file, lineno, argv[0]); continue; } res->defaultTagType = nmem_intdup(nmem, atoi(argv[1])); } else if (!strcmp(argv[0], "defaultvariantrequest")) { if (!(res->defaultVariantRequest = read_variant(argc-1, argv+1, nmem, file, lineno))) { yaz_log(YLOG_WARN, "%s:%d: Bad defaultvariantrequest", file, lineno); continue; } } else if (!strcmp(argv[0], "simpleelement")) { Z_ElementRequest *er; Z_SimpleElement *se; Z_ETagPath *tp; char *path = argv[1]; char *ep; int num, i = 0; if (!res->elements) res->elements = (Z_ElementRequest **) nmem_malloc(nmem, size_esn = 24*sizeof(er)); else if (res->num_elements >= (int) (size_esn/sizeof(er))) { Z_ElementRequest **oe = res->elements; size_esn *= 2; res->elements = (Z_ElementRequest **) nmem_malloc (nmem, size_esn*sizeof(er)); memcpy (res->elements, oe, size_esn/2); } if (argc < 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args for %s", file, lineno, argv[0]); continue; } res->elements[res->num_elements++] = er = (Z_ElementRequest *)nmem_malloc(nmem, sizeof(*er)); er->which = Z_ERequest_simpleElement; er->u.simpleElement = se = (Z_SimpleElement *) nmem_malloc(nmem, sizeof(*se)); se->variantRequest = 0; se->path = tp = (Z_ETagPath *)nmem_malloc(nmem, sizeof(*tp)); tp->num_tags = 0; /* * Parse the element selector. */ for (num = 1, ep = path; (ep = strchr(ep, '/')); num++, ep++) ; tp->tags = (Z_ETagUnit **) nmem_malloc(nmem, sizeof(Z_ETagUnit*)*num); for ((ep = strchr(path, '/')) ; path ; (void)((path = ep) && (ep = strchr(path, '/')))) { Z_ETagUnit *tagunit; if (ep) ep++; assert(itags[tp->num_tags++] = tagunit; } if (argc > 2 && !strcmp(argv[2], "variant")) se->variantRequest= read_variant(argc-3, argv+3, nmem, file, lineno); } else yaz_log(YLOG_WARN, "%s:%d: Unknown directive '%s'", file, lineno, argv[0]); fclose (f); return res; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/data1/Makefile.am0000644000175000017500000000052311412332551013165 00000000000000 noinst_LTLIBRARIES=libidzebra-data1.la libidzebra_data1_la_SOURCES = d1_handle.c d1_read.c d1_attset.c d1_tagset.c \ d1_absyn.c d1_grs.c d1_sutrs.c d1_varset.c d1_espec.c d1_doespec.c d1_map.c \ d1_marc.c d1_write.c d1_expout.c d1_sumout.c d1_soif.c d1_prtree.c d1_if.c \ d1_utils.c AM_CPPFLAGS=-I$(top_srcdir)/include $(YAZINC) idzebra-2.0.44/data1/d1_doespec.c0000644000175000017500000002267311412332551013315 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** \file d1_doespec.c * \brief handle Z39.50 variant-1 specs * * See http://www.loc.gov/z3950/agency/defns/variant1.html */ #include #include #include #include #include #include static int match_children(data1_handle dh, data1_node *n, Z_Espec1 *e, int i, Z_ETagUnit **t, int num, int select_flag); static int match_children_wildpath(data1_handle dh, data1_node *n, Z_Espec1 *e, int i, Z_ETagUnit **t, int num) { return 0; } /* * Locate a specific triple within a variant. * set is the set to look for, universal set is the set that applies to a * triple with an unknown set. */ static Z_Triple *find_triple(Z_Variant *var, const Odr_oid *universal_oid, const Odr_oid *var_oid, int zclass, int type) { int i; for (i = 0; i < var->num_triples; i++) { const Odr_oid *cur_oid = var->triples[i]->variantSetId; if (!cur_oid) cur_oid = var->globalVariantSetId; if (cur_oid && var_oid && !oid_oidcmp(var_oid, cur_oid) && *var->triples[i]->type == type) return var->triples[i]; } return 0; } static void mark_subtree(data1_node *n, int make_variantlist, int no_data, int get_bytes, Z_Variant *vreq, int select_flag) { data1_node *c; #if 1 if (n->which == DATA1N_tag) #else if (n->which == DATA1N_tag && (!n->child || n->child->which != DATA1N_tag)) /* * This seems to cause multi-level elements to fall out when only a * top-level elementRequest has been given... Problem is, I can't figure * out what it was supposed to ACHIEVE.... delete when code has been * verified. */ #endif { n->u.tag.node_selected = select_flag; n->u.tag.make_variantlist = make_variantlist; n->u.tag.no_data_requested = no_data; n->u.tag.get_bytes = get_bytes; } for (c = n->child; c; c = c->next) { if (c->which == DATA1N_tag && (!n->child || n->child->which != DATA1N_tag)) { c->u.tag.node_selected = select_flag; c->u.tag.make_variantlist = make_variantlist; c->u.tag.no_data_requested = no_data; c->u.tag.get_bytes = get_bytes; } mark_subtree(c, make_variantlist, no_data, get_bytes, vreq, select_flag); } } static void match_triple(data1_handle dh, Z_Variant *vreq, const Odr_oid *def_oid, const Odr_oid *var_oid, data1_node *n) { data1_node **c; if (!(n = n->child)) return; if (n->which != DATA1N_variant) return; c = &n->child; while (*c) { int remove_flag = 0; Z_Triple *r; assert ((*c)->which == DATA1N_variant); if ((*c)->u.variant.type->zclass->zclass == 4 && (*c)->u.variant.type->type == 1) { if ((r = find_triple(vreq, def_oid, var_oid, 4, 1)) && (r->which == Z_Triple_internationalString)) { const char *string_value = r->value.internationalString; if (strcmp ((*c)->u.variant.value, string_value)) remove_flag = 1; } } if (remove_flag) { *c = (*c)->next; } else { match_triple(dh, vreq, def_oid, var_oid, *c); c = &(*c)->next; } } } static int match_node_and_attr (data1_node *c, const char *spec) { char predicate[64]; char elem[64]; char attr[64]; char value[64]; char dummy_ch; data1_tag *tag = 0; if (c->u.tag.element) tag = c->u.tag.element->tag; *predicate = '\0'; sscanf(spec, "%63[^[]%c%63[^]]", elem, &dummy_ch, predicate); if (data1_matchstr(elem, tag ? tag->value.string : c->u.tag.tag)) return 0; if (*predicate == '\0') return 1; else if (sscanf(predicate, "@%63[^=]=%63s", attr, value) == 2) { data1_xattr *xa; for (xa = c->u.tag.attributes; xa; xa = xa->next) if (!strcmp(xa->name, attr) && !strcmp(xa->value, value)) return 1; return 0; } else if (sscanf(predicate, "@%63s", attr) == 1) { data1_xattr *xa; for (xa = c->u.tag.attributes; xa; xa = xa->next) if (!strcmp(xa->name, attr)) return 1; } else { yaz_log(YLOG_WARN, "Bad simpleelement component: '%s'", spec); } return 0; } static int match_children_here (data1_handle dh, data1_node *n, Z_Espec1 *e, int i, Z_ETagUnit **t, int num, int select_flag) { int counter = 0, hits = 0; data1_node *c; Z_ETagUnit *tp = *t; Z_Occurrences *occur; for (c = n->child; c ; c = c->next) { data1_tag *tag = 0; if (c->which != DATA1N_tag) continue; if (tp->which == Z_ETagUnit_specificTag) { Z_SpecificTag *want = tp->u.specificTag; occur = want->occurrences; if (c->u.tag.element) tag = c->u.tag.element->tag; if (*want->tagType != ((tag && tag->tagset) ? tag->tagset->type : 3)) continue; if (want->tagValue->which == Z_StringOrNumeric_numeric) { if (!tag || tag->which != DATA1T_numeric) continue; if (*want->tagValue->u.numeric != tag->value.numeric) continue; } else if (want->tagValue->which == Z_StringOrNumeric_string) { const char *str_val = want->tagValue->u.string; if (str_val[0] == '!') { str_val++; select_flag = 0; } if (tag && tag->which != DATA1T_string) continue; #if 1 if (!match_node_and_attr(c, str_val)) continue; #else if (data1_matchstr(str_val, tag ? tag->value.string : c->u.tag.tag)) continue; #endif } else { yaz_log(YLOG_WARN, "Bad SpecificTag type: %d", want->tagValue->which); continue; } } else if (tp->which == Z_ETagUnit_wildThing) occur = tp->u.wildThing; else continue; /* * Ok, so we have a matching tag. Are we within occurrences-range? */ counter++; if (occur && occur->which == Z_Occurrences_last) { yaz_log(YLOG_WARN, "Can't do occurrences=last (yet)"); return 0; } if (!occur || occur->which == Z_Occurrences_all || (occur->which == Z_Occurrences_values && counter >= *occur->u.values->start)) { if (match_children(dh, c, e, i, t + 1, num - 1, select_flag)) { c->u.tag.node_selected = select_flag; /* * Consider the variant specification if this is a complete * match. */ if (num == 1) { int show_variantlist = 0; int no_data = 0; int get_bytes = -1; Z_Variant *vreq = e->elements[i]->u.simpleElement->variantRequest; const Odr_oid *var_oid = yaz_oid_varset_variant_1; if (!vreq) vreq = e->defaultVariantRequest; if (vreq) { Z_Triple *r; /* * 6,5: meta-data requested, variant list. */ if (find_triple(vreq, e->defaultVariantSetId, var_oid, 6, 5)) show_variantlist = 1; /* * 9,1: Miscellaneous, no data requested. */ if (find_triple(vreq, e->defaultVariantSetId, var_oid, 9, 1)) no_data = 1; /* howmuch */ if ((r = find_triple(vreq, e->defaultVariantSetId, var_oid, 5, 5))) if (r->which == Z_Triple_integer) get_bytes = *r->value.integer; if (!show_variantlist) match_triple(dh, vreq, e->defaultVariantSetId, var_oid, c); } mark_subtree(c, show_variantlist, no_data, get_bytes, vreq, select_flag); } hits++; /* * have we looked at enough children? */ if (!occur || (occur->which == Z_Occurrences_values && (!occur->u.values->howMany || counter - *occur->u.values->start >= *occur->u.values->howMany - 1))) return hits; } } } return hits; } static int match_children(data1_handle dh, data1_node *n, Z_Espec1 *e, int i, Z_ETagUnit **t, int num, int select_flag) { int res; if (!num) return 1; switch (t[0]->which) { case Z_ETagUnit_wildThing: case Z_ETagUnit_specificTag: res = match_children_here(dh, n, e, i, t, num, select_flag); break; case Z_ETagUnit_wildPath: res = match_children_wildpath(dh, n, e, i, t, num); break; default: abort(); } return res; } int data1_doespec1 (data1_handle dh, data1_node *n, Z_Espec1 *e) { int i; n = data1_get_root_tag (dh, n); if (n && n->which == DATA1N_tag) n->u.tag.node_selected = 1; for (i = 0; i < e->num_elements; i++) { if (e->elements[i]->which != Z_ERequest_simpleElement) return 100; match_children(dh, n, e, i, e->elements[i]->u.simpleElement->path->tags, e->elements[i]->u.simpleElement->path->num_tags, 1 /* select (include) by default */ ); } return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/data1/d1_utils.c0000644000175000017500000000634011412332551013024 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include void data1_remove_node (data1_handle dh, data1_node *n) { fprintf (stdout, "REMOVE tag %s \n", n->u.tag.tag); /* n is first childen */ if(n->parent->child == n){ n->parent->child = n->next; /* n is the only child */ if(! n->next){ n->parent->last_child = 0; } } /* n is one of the following childrens */ else { data1_node * before; /* need to find sibling before me */ before = n->parent->child; while (before->next != n) before = before->next; before->next = n->next; /* n is last child of many */ if ( n->parent->last_child == n){ n->parent->last_child = before; } } /* break pointers to root, parent and following siblings */ n->parent = 0; n->root = 0; n->next = 0; } void data1_remove_idzebra_subtree (data1_handle dh, data1_node *n) { switch (n->which) { /* case DATA1N_root: break; */ case DATA1N_tag: if (!strcmp(n->u.tag.tag, "idzebra")){ if (n->u.tag.attributes){ data1_xattr *xattr = n->u.tag.attributes; for (; xattr; xattr = xattr->next){ if (!strcmp(xattr->name, "xmlns") & !strcmp(xattr->value, "http://www.indexdata.dk/zebra/")) data1_remove_node (dh, n); } } } break; /* case DATA1N_data: break; case DATA1N_comment: break; case DATA1N_preprocess: break; case DATA1N_variant: break; */ default: break; } if (n->child) data1_remove_idzebra_subtree (dh, n->child); if (n->next) data1_remove_idzebra_subtree (dh, n->next); /* else { if (n->parent && n->parent->last_child != n) fprintf(out, "%*sWARNING: last_child=%p != %p\n", level, "", n->parent->last_child, n); } */ } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/data1/d1_if.c0000644000175000017500000002111611412332551012260 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include /* * Search for a token in the supplied string up to the supplied list of stop characters or EOL * At the end, return the character causing the break and fill pTokenBuffer with the token string so far * After the scan, *pPosInBuffer will point to the next character after the one causing the break and * pTokenBuffer will contain the actual token */ char data1_ScanNextToken(char* pBuffer, char** pPosInBuffer, char* pBreakChars, char* pWhitespaceChars, char* pTokenBuffer) { char* pBuff = pTokenBuffer; *pBuff = '\0'; while ( **pPosInBuffer ) { if ( strchr(pBreakChars,**pPosInBuffer) != NULL ) { /* Current character is a break character */ *pBuff++ = '\0'; return *((*pPosInBuffer)++); } else { if ( strchr(pWhitespaceChars, **pPosInBuffer) != NULL ) (*pPosInBuffer)++; else *pBuff++ = *((*pPosInBuffer)++); } } *pBuff++ = *((*pPosInBuffer)++); return(**pPosInBuffer); } /* * Attempt to find a string value given the specified tagpath * * Need to make this safe by passing in a buffer..... * */ char *data1_getNodeValue(data1_node* node, char* pTagPath) { data1_node* n = NULL; n = data1_LookupNode(node, pTagPath ); if ( n ) { /* n should be a tag node with some data under it.... */ if ( n->child ) { if ( n->child->which == DATA1N_data ) { return n->child->u.data.data; } else { yaz_log(YLOG_WARN,"Attempting to lookup data for tagpath: Child node is not a data node"); } } else { yaz_log(YLOG_WARN,"Found a node matching the tagpath, but it has no child data nodes"); } } else { yaz_log(YLOG_WARN,"Unable to lookup a node on the specified tag path"); } return ""; } /* Max length of a tag */ #define MAX_TAG_SIZE 50 /* * data1_LookupNode : Try and find a node as specified by a tagpath */ data1_node *data1_LookupNode(data1_node* node, char* pTagPath) { /* Node matching the pattern in the tagpath */ data1_node* matched_node = NULL; /* Current Child node as we search for nodes matching the pattern in the tagpath */ data1_node* current_child = node->child; /* Current position in string */ char* pCurrCharInPath = pTagPath; /* Work buffer */ char Buffer[MAX_TAG_SIZE]; /* The tag type of this node */ int iTagType = 0; /* for non string tags, the tag value */ int iTagValue = 0; /* for string tags, the tag value */ char StringTagVal[MAX_TAG_SIZE]; /* Which occurence of that tag under this node */ int iOccurences=0; /* Character causing a break */ char sepchr = '\0'; Buffer[0] = '\0'; StringTagVal[0] = '\0'; sepchr = data1_ScanNextToken(pTagPath, &pCurrCharInPath, ",[(."," ", Buffer); if ( sepchr == '[' ) { /* Next component in node value is [ TagType, TagVal, TagOccurence ] */ sepchr = data1_ScanNextToken(pTagPath, &pCurrCharInPath, ","," ", Buffer); iTagType = atoi(Buffer); /* Occurence is optional... */ sepchr = data1_ScanNextToken(pTagPath, &pCurrCharInPath, ",]."," ", Buffer); if ( iTagType == 3 ) strcpy(StringTagVal,Buffer); else iTagValue = atoi(Buffer); /* If sepchar was a ',' there should be an instance */ if ( sepchr == ',' ) { sepchr = data1_ScanNextToken(pTagPath, &pCurrCharInPath, "]."," ", Buffer); iOccurences = atoi(Buffer); } if ( sepchr == ']' ) { /* See if we can scan the . for the next component or the end of the line... */ sepchr = data1_ScanNextToken(pTagPath, &pCurrCharInPath, "."," ", Buffer); } else { yaz_log(YLOG_FATAL,"Node does not end with a ]"); /* Fatal Error */ return(NULL); } } else { /* We have a TagName so Read up to ( or . or EOL */ iTagType = 3; strcpy(StringTagVal,Buffer); if ( sepchr == '(' ) { /* Read the occurence */ sepchr = data1_ScanNextToken(pTagPath, &pCurrCharInPath, ")"," ", Buffer); iOccurences = atoi(Buffer); /* See if we can find the . at the end of this clause */ sepchr = data1_ScanNextToken(pTagPath, &pCurrCharInPath, "."," ", Buffer); } } yaz_log(YLOG_DEBUG,"search node for child like [%d,%d,%s,%d]",iTagType,iTagValue,StringTagVal,iOccurences); /* OK.. We have extracted tagtype, Value and Occurence, see if we can find a node */ /* Under the current parent matching that description */ while ( ( current_child ) && ( matched_node == NULL ) ) { if ( current_child->which == DATA1N_tag ) { if ( iTagType == 3 ) { if ( ( current_child->u.tag.element == NULL ) && ( strcmp(current_child->u.tag.tag, StringTagVal) == 0 ) ) { if ( iOccurences ) { /* Everything matched, but not yet found the right occurence of the given tag */ iOccurences--; } else { /* We have matched a string tag... Is there more to process? */ matched_node = current_child; } } } else /* Attempt to match real element */ { yaz_log(YLOG_WARN,"Non string tag matching not yet implemented"); } } current_child = current_child->next; } /* If there is more... Continue */ if ( ( sepchr == '.' ) && ( matched_node ) ) { return data1_LookupNode(matched_node, pCurrCharInPath); } else { return matched_node; } } /** \brief Count the number of occurences of the last instance on a tagpath. \param node : The root of the tree we wish to look for occurences in \param pTagPath : The tagpath we want to count the occurences of... */ int data1_CountOccurences(data1_node* node, char* pTagPath) { int iRetVal = 0; data1_node* n = NULL; data1_node* pParent = NULL; n = data1_LookupNode(node, pTagPath ); if ( ( n ) && ( n->which == DATA1N_tag ) && ( n->parent ) ) { data1_node* current_child; pParent = n->parent; for ( current_child = pParent->child; current_child; current_child = current_child->next ) { if ( current_child->which == DATA1N_tag ) { if ( current_child->u.tag.element == NULL ) { if ( ( n->u.tag.tag ) && ( current_child->u.tag.tag ) && ( strcmp(current_child->u.tag.tag, n->u.tag.tag) == 0 ) ) { iRetVal++; } } else if ( current_child->u.tag.element == n->u.tag.element ) { /* Hmmm... Is the above right for non string tags???? */ iRetVal++; } } } } return iRetVal; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/data1/d1_read.c0000644000175000017500000007716311412332551012612 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* * This module reads "loose" SGML and converts it to data1 tree */ #include #include #include #include #include data1_node *data1_get_root_tag (data1_handle dh, data1_node *n) { if (!n) return 0; if (data1_is_xmlmode(dh)) { n = n->child; while (n && n->which != DATA1N_tag) n = n->next; } return n; } /* * get the tag which is the immediate parent of this node (this may mean * traversing intermediate things like variants and stuff. */ data1_node *get_parent_tag (data1_handle dh, data1_node *n) { if (data1_is_xmlmode(dh)) { for (; n && n->which != DATA1N_root; n = n->parent) if (n->which == DATA1N_tag && n->parent && n->parent->which != DATA1N_root) return n; } else { for (; n && n->which != DATA1N_root; n = n->parent) if (n->which == DATA1N_tag) return n; } return 0; } data1_node *data1_mk_node (data1_handle dh, NMEM m) { return data1_mk_node2 (dh, m, DATA1N_root, 0); } data1_node *data1_mk_node_type (data1_handle dh, NMEM m, int type) { return data1_mk_node2 (dh, m, type, 0); } static void data1_init_node (data1_handle dh, data1_node *r, int type) { r->which = type; switch(type) { case DATA1N_tag: r->u.tag.tag = 0; r->u.tag.element = 0; r->u.tag.no_data_requested = 0; r->u.tag.node_selected = 0; r->u.tag.make_variantlist = 0; r->u.tag.get_bytes = -1; r->u.tag.attributes = 0; break; case DATA1N_root: r->u.root.type = 0; r->u.root.absyn = 0; break; case DATA1N_data: r->u.data.data = 0; r->u.data.len = 0; r->u.data.what = 0; r->u.data.formatted_text = 0; break; case DATA1N_comment: r->u.data.data = 0; r->u.data.len = 0; r->u.data.what = 0; r->u.data.formatted_text = 1; break; case DATA1N_variant: r->u.variant.type = 0; r->u.variant.value = 0; break; case DATA1N_preprocess: r->u.preprocess.target = 0; r->u.preprocess.attributes = 0; break; default: yaz_log (YLOG_WARN, "data_mk_node_type. bad type = %d\n", type); } } data1_node *data1_append_node (data1_handle dh, NMEM m, int type, data1_node *parent) { data1_node *r = (data1_node *)nmem_malloc(m, sizeof(*r)); r->next = r->child = r->last_child = 0; r->parent = parent; if (!parent) r->root = r; else { r->root = parent->root; if (!parent->child) parent->child = parent->last_child = r; else parent->last_child->next = r; parent->last_child = r; } data1_init_node(dh, r, type); return r; } data1_node *data1_mk_node2 (data1_handle dh, NMEM m, int type, data1_node *parent) { return data1_append_node (dh, m, type, parent); } data1_node *data1_insert_node (data1_handle dh, NMEM m, int type, data1_node *parent) { data1_node *r = (data1_node *)nmem_malloc(m, sizeof(*r)); r->next = r->child = r->last_child = 0; if (!parent) r->root = r; else { r->root = parent->root; r->parent = parent; if (!parent->child) parent->last_child = r; else r->next = parent->child; parent->child = r; } data1_init_node(dh, r, type); return r; } data1_node *data1_mk_root (data1_handle dh, NMEM nmem, const char *name) { data1_absyn *absyn = data1_get_absyn(dh, name, 1); data1_node *res; if (!absyn) { yaz_log(YLOG_WARN, "Unable to acquire abstract syntax " "for '%s'", name); /* It's now OK for a record not to have an absyn */ } res = data1_mk_node2 (dh, nmem, DATA1N_root, 0); res->u.root.type = data1_insert_string (dh, res, nmem, name); res->u.root.absyn = absyn; return res; } void data1_set_root(data1_handle dh, data1_node *res, NMEM nmem, const char *name) { data1_absyn *absyn = data1_get_absyn( dh, name, DATA1_XPATH_INDEXING_ENABLE); res->u.root.type = data1_insert_string (dh, res, nmem, name); res->u.root.absyn = absyn; } void data1_add_attrs(data1_handle dh, NMEM nmem, const char **attr, data1_xattr **p) { while (*p) p = &(*p)->next; while (attr && *attr) { *p = (data1_xattr*) nmem_malloc (nmem, sizeof(**p)); (*p)->name = nmem_strdup (nmem, *attr++); (*p)->value = nmem_strdup (nmem, *attr++); (*p)->what = DATA1I_text; p = &(*p)->next; } *p = 0; } data1_node *data1_mk_preprocess (data1_handle dh, NMEM nmem, const char *target, const char **attr, data1_node *at) { return data1_mk_preprocess_n (dh, nmem, target, strlen(target), attr, at); } data1_node *data1_mk_preprocess_n (data1_handle dh, NMEM nmem, const char *target, size_t len, const char **attr, data1_node *at) { data1_node *res = data1_mk_node2 (dh, nmem, DATA1N_preprocess, at); res->u.preprocess.target = data1_insert_string_n (dh, res, nmem, target, len); data1_add_attrs(dh, nmem, attr, &res->u.preprocess.attributes); return res; } data1_node *data1_insert_preprocess (data1_handle dh, NMEM nmem, const char *target, const char **attr, data1_node *at) { return data1_insert_preprocess_n (dh, nmem, target, strlen(target), attr, at); } data1_node *data1_insert_preprocess_n (data1_handle dh, NMEM nmem, const char *target, size_t len, const char **attr, data1_node *at) { data1_node *res = data1_insert_node (dh, nmem, DATA1N_preprocess, at); res->u.preprocess.target = data1_insert_string_n (dh, res, nmem, target, len); data1_add_attrs(dh, nmem, attr, &res->u.preprocess.attributes); return res; } data1_node *data1_mk_tag_n (data1_handle dh, NMEM nmem, const char *tag, size_t len, const char **attr, data1_node *at) { data1_node *partag = get_parent_tag(dh, at); data1_node *res = data1_mk_node2 (dh, nmem, DATA1N_tag, at); data1_element *e = 0; res->u.tag.tag = data1_insert_string_n (dh, res, nmem, tag, len); if (!partag) /* top tag? */ e = data1_getelementbytagname (dh, at->root->u.root.absyn, 0 /* index as local */, res->u.tag.tag); else { /* only set element for known tags */ e = partag->u.tag.element; if (e) e = data1_getelementbytagname (dh, at->root->u.root.absyn, e, res->u.tag.tag); } res->u.tag.element = e; data1_add_attrs(dh, nmem, attr, &res->u.tag.attributes); return res; } void data1_tag_add_attr (data1_handle dh, NMEM nmem, data1_node *res, const char **attr) { if (res->which != DATA1N_tag) return; data1_add_attrs(dh, nmem, attr, &res->u.tag.attributes); } data1_node *data1_mk_tag (data1_handle dh, NMEM nmem, const char *tag, const char **attr, data1_node *at) { return data1_mk_tag_n (dh, nmem, tag, strlen(tag), attr, at); } data1_node *data1_search_tag (data1_handle dh, data1_node *n, const char *tag) { if (*tag == '/') { n = data1_get_root_tag (dh, n); if (n) n = n->child; tag++; } for (; n; n = n->next) if (n->which == DATA1N_tag && n->u.tag.tag && !yaz_matchstr (n->u.tag.tag, tag)) { return n; } return 0; } data1_node *data1_mk_tag_uni (data1_handle dh, NMEM nmem, const char *tag, data1_node *at) { data1_node *node = data1_search_tag (dh, at->child, tag); if (!node) node = data1_mk_tag (dh, nmem, tag, 0 /* attr */, at); else node->child = node->last_child = 0; return node; } data1_node *data1_mk_text_n (data1_handle dh, NMEM mem, const char *buf, size_t len, data1_node *parent) { data1_node *res = data1_mk_node2 (dh, mem, DATA1N_data, parent); res->u.data.what = DATA1I_text; res->u.data.len = len; res->u.data.data = data1_insert_string_n (dh, res, mem, buf, len); return res; } data1_node *data1_mk_text_nf (data1_handle dh, NMEM mem, const char *buf, size_t len, data1_node *parent) { data1_node *res = data1_mk_text_n (dh, mem, buf, len, parent); res->u.data.formatted_text = 1; return res; } data1_node *data1_mk_text (data1_handle dh, NMEM mem, const char *buf, data1_node *parent) { return data1_mk_text_n (dh, mem, buf, strlen(buf), parent); } data1_node *data1_mk_comment_n (data1_handle dh, NMEM mem, const char *buf, size_t len, data1_node *parent) { data1_node *res = data1_mk_node2 (dh, mem, DATA1N_comment, parent); res->u.data.what = DATA1I_text; res->u.data.len = len; res->u.data.data = data1_insert_string_n (dh, res, mem, buf, len); return res; } data1_node *data1_mk_comment (data1_handle dh, NMEM mem, const char *buf, data1_node *parent) { return data1_mk_comment_n (dh, mem, buf, strlen(buf), parent); } char *data1_insert_string_n (data1_handle dh, data1_node *res, NMEM m, const char *str, size_t len) { char *b; if (len >= DATA1_LOCALDATA) b = (char *) nmem_malloc (m, len+1); else b = res->lbuf; memcpy (b, str, len); b[len] = 0; return b; } char *data1_insert_string (data1_handle dh, data1_node *res, NMEM m, const char *str) { return data1_insert_string_n (dh, res, m, str, strlen(str)); } static data1_node *data1_add_insert_taggeddata(data1_handle dh, data1_node *at, const char *tagname, NMEM m, int local_allowed, int insert_mode) { data1_node *root = at->root; data1_node *partag = get_parent_tag (dh, at); data1_element *e = NULL; data1_node *datn = 0; data1_node *tagn = 0; if (!partag) e = data1_getelementbytagname (dh, root->u.root.absyn, 0, tagname); else { e = partag->u.tag.element; if (e) e = data1_getelementbytagname (dh, root->u.root.absyn, e, tagname); } if (local_allowed || e) { if (insert_mode) tagn = data1_insert_node (dh, m, DATA1N_tag, at); else tagn = data1_append_node (dh, m, DATA1N_tag, at); tagn->u.tag.tag = data1_insert_string (dh, tagn, m, tagname); tagn->u.tag.element = e; datn = data1_mk_node2 (dh, m, DATA1N_data, tagn); } return datn; } data1_node *data1_mk_tag_data(data1_handle dh, data1_node *at, const char *tagname, NMEM m) { return data1_add_insert_taggeddata (dh, at, tagname, m, 1, 0); } /* * Insert a tagged node into the record root as first child of the node at * which should be root or tag itself). Returns pointer to the data node, * which can then be modified. */ data1_node *data1_mk_tag_data_wd(data1_handle dh, data1_node *at, const char *tagname, NMEM m) { return data1_add_insert_taggeddata (dh, at, tagname, m, 0, 1); } data1_node *data1_insert_taggeddata (data1_handle dh, data1_node *root, data1_node *at, const char *tagname, NMEM m) { return data1_add_insert_taggeddata (dh, at, tagname, m, 0, 1); } data1_node *data1_add_taggeddata (data1_handle dh, data1_node *root, data1_node *at, const char *tagname, NMEM m) { return data1_add_insert_taggeddata (dh, at, tagname, m, 1, 0); } data1_node *data1_mk_tag_data_zint (data1_handle dh, data1_node *at, const char *tag, zint num, NMEM nmem) { data1_node *node_data; node_data = data1_mk_tag_data (dh, at, tag, nmem); if (!node_data) return 0; node_data->u.data.what = DATA1I_num; node_data->u.data.data = node_data->lbuf; sprintf (node_data->u.data.data, ZINT_FORMAT, num); node_data->u.data.len = strlen (node_data->u.data.data); return node_data; } data1_node *data1_mk_tag_data_int (data1_handle dh, data1_node *at, const char *tag, int num, NMEM nmem) { return data1_mk_tag_data_zint(dh, at, tag, num, nmem); } data1_node *data1_mk_tag_data_oid (data1_handle dh, data1_node *at, const char *tag, Odr_oid *oid, NMEM nmem) { data1_node *node_data; char str[128], *p = str; Odr_oid *ii; node_data = data1_mk_tag_data (dh, at, tag, nmem); if (!node_data) return 0; for (ii = oid; *ii >= 0; ii++) { if (ii != oid) *p++ = '.'; sprintf (p, "%d", *ii); p += strlen (p); } node_data->u.data.what = DATA1I_oid; node_data->u.data.len = strlen (str); node_data->u.data.data = data1_insert_string (dh, node_data, nmem, str); return node_data; } data1_node *data1_mk_tag_data_text (data1_handle dh, data1_node *at, const char *tag, const char *str, NMEM nmem) { data1_node *node_data; node_data = data1_mk_tag_data (dh, at, tag, nmem); if (!node_data) return 0; node_data->u.data.what = DATA1I_text; node_data->u.data.len = strlen (str); node_data->u.data.data = data1_insert_string (dh, node_data, nmem, str); return node_data; } data1_node *data1_mk_tag_data_text_uni (data1_handle dh, data1_node *at, const char *tag, const char *str, NMEM nmem) { data1_node *node = data1_search_tag (dh, at->child, tag); if (!node) return data1_mk_tag_data_text (dh, at, tag, str, nmem); else { data1_node *node_data = node->child; node_data->u.data.what = DATA1I_text; node_data->u.data.len = strlen (str); node_data->u.data.data = data1_insert_string (dh, node_data, nmem, str); node_data->child = node_data->last_child = 0; return node_data; } } static int ampr (int (*get_byte)(void *fh), void *fh, int *amp) { #if 1 int c = (*get_byte)(fh); *amp = 0; return c; #else int c = (*get_byte)(fh); *amp = 0; if (c == '&') { char ent[20]; int i = 0; while (1) { c = (*get_byte)(fh); if (c == ';') { ent[i] = 0; c = ' '; if (!strcmp (ent, "quot")) c = '"'; if (!strcmp (ent, "apos")) c = '\''; if (!strcmp (ent, "gt")) c = '>'; if (!strcmp (ent, "lt")) c = '<'; if (!strcmp (ent, "amp")) c = '&'; *amp = 1; break; } else if (c == 0 || d1_isspace(c)) break; if (i < 19) ent[i++] = c; } } return c; #endif } data1_xattr *data1_read_xattr (data1_handle dh, NMEM m, int (*get_byte)(void *fh), void *fh, WRBUF wrbuf, int *ch, int *amp) { data1_xattr *p_first = 0; data1_xattr **pp = &p_first; int c = *ch; for (;;) { data1_xattr *p; while (*amp || (c && d1_isspace(c))) c = ampr (get_byte, fh, amp); if (*amp == 0 && (c == 0 || c == '>' || c == '/')) break; *pp = p = (data1_xattr *) nmem_malloc (m, sizeof(*p)); p->next = 0; pp = &p->next; p->value = 0; p->what = DATA1I_xmltext; wrbuf_rewind(wrbuf); while (c && c != '=' && c != '>' && c != '/' && !d1_isspace(c)) { wrbuf_putc (wrbuf, c); c = ampr (get_byte, fh, amp); } p->name = nmem_strdup (m, wrbuf_cstr(wrbuf)); if (c == '=') { c = ampr (get_byte, fh, amp); if (*amp == 0 && c == '"') { c = ampr (get_byte, fh, amp); wrbuf_rewind(wrbuf); while (*amp || (c && c != '"')) { wrbuf_putc (wrbuf, c); c = ampr (get_byte, fh, amp); } if (c) c = ampr (get_byte, fh, amp); } else if (*amp == 0 && c == '\'') { c = ampr (get_byte, fh, amp); wrbuf_rewind(wrbuf); while (*amp || (c && c != '\'')) { wrbuf_putc (wrbuf, c); c = ampr (get_byte, fh, amp); } if (c) c = ampr (get_byte, fh, amp); } else { wrbuf_rewind(wrbuf); while (*amp || (c && c != '>' && c != '/')) { wrbuf_putc (wrbuf, c); c = ampr (get_byte, fh, amp); } } p->value = nmem_strdup(m, wrbuf_cstr(wrbuf)); } } *ch = c; return p_first; } /* * Ugh. Sometimes functions just grow and grow on you. This one reads a * 'node' and its children. */ data1_node *data1_read_nodex (data1_handle dh, NMEM m, int (*get_byte)(void *fh), void *fh, WRBUF wrbuf) { data1_node *d1_stack[256]; data1_node *res; int c, amp; int level = 0; int line = 1; d1_stack[level] = 0; c = ampr (get_byte, fh, &); while (c != '\0') { data1_node *parent = level ? d1_stack[level-1] : 0; if (amp == 0 && c == '<') /* beginning of tag */ { data1_xattr *xattr; char tag[256]; int null_tag = 0; int end_tag = 0; size_t i = 0; c = ampr (get_byte, fh, &); if (amp == 0 && c == '/') { end_tag = 1; c = ampr (get_byte, fh, &); } else if (amp == 0 && c == '?') { int quote_mode = 0; while ((c = ampr(get_byte, fh, &))) { if (amp) continue; if (quote_mode == 0) { if (c == '"') quote_mode = c; else if (c == '\'') quote_mode = c; else if (c == '>') { c = ampr(get_byte, fh, &); break; } } else { if (amp == 0 && c == quote_mode) quote_mode = 0; } } continue; } else if (amp == 0 && c == '!') { int c0, amp0; wrbuf_rewind(wrbuf); c0 = ampr (get_byte, fh, &0); if (amp0 == 0 && c0 == '\0') break; c = ampr (get_byte, fh, &); if (amp0 == 0 && c0 == '-' && amp == 0 && c == '-') { /* COMMENT: */ int no_dash = 0; c = ampr (get_byte, fh, &); while (amp || c) { if (amp == 0 && c == '-') no_dash++; else if (amp == 0 && c == '>' && no_dash >= 2) { if (level > 0) d1_stack[level] = data1_mk_comment_n ( dh, m, wrbuf_buf(wrbuf), wrbuf_len(wrbuf)-2, d1_stack[level-1]); c = ampr (get_byte, fh, &); /* skip > */ break; } else no_dash = 0; wrbuf_putc (wrbuf, c); c = ampr (get_byte, fh, &); } continue; } else { /* DIRECTIVE: */ int blevel = 0; while (amp || c) { if (amp == 0 && c == '>' && blevel == 0) { c = ampr (get_byte, fh, &); break; } if (amp == 0 && c == '[') blevel++; if (amp == 0 && c == ']' && blevel > 0) blevel--; c = ampr (get_byte, fh, &); } continue; } } while (amp || (c && c != '>' && c != '/' && !d1_isspace(c))) { if (i < (sizeof(tag)-1)) tag[i++] = c; c = ampr (get_byte, fh, &); } tag[i] = '\0'; xattr = data1_read_xattr (dh, m, get_byte, fh, wrbuf, &c, &); if (amp == 0 && c == '/') { /* or */ null_tag = 1; c = ampr (get_byte, fh, &); } if (amp || c != '>') { yaz_log(YLOG_WARN, "d1: %d: Malformed tag", line); return 0; } else c = ampr (get_byte, fh, &); /* End tag? */ if (end_tag) { if (*tag == '\0') --level; /* */ else { /* */ int i = level; while (i > 0) { parent = d1_stack[--i]; if ((parent->which == DATA1N_root && !strcmp(tag, parent->u.root.type)) || (parent->which == DATA1N_tag && !strcmp(tag, parent->u.tag.tag))) { level = i; break; } } if (i != level) { yaz_log (YLOG_WARN, "%d: no begin tag for %s", line, tag); break; } } if (data1_is_xmlmode(dh)) { if (level <= 1) return d1_stack[0]; } else { if (level <= 0) return d1_stack[0]; } continue; } else if (!strcmp(tag, "var") && xattr && xattr->next && xattr->next->next && xattr->value == 0 && xattr->next->value == 0 && xattr->next->next->value == 0) { /* */ const char *tclass = xattr->name; const char *type = xattr->next->name; const char *value = xattr->next->name; data1_vartype *tp; yaz_log(YLOG_LOG, "Variant class=%s type=%s value=%s", tclass, type, value); if (!(tp = data1_getvartypebyct(dh, parent->root->u.root.absyn->varset, tclass, type))) continue; /* * If we're the first variant in this group, create a parent * variant, and insert it before the current variant. */ if (parent->which != DATA1N_variant) { res = data1_mk_node2 (dh, m, DATA1N_variant, parent); } else { /* * now determine if one of our ancestor triples is of * same type. If so, we break here. */ int i; for (i = level-1; d1_stack[i]->which==DATA1N_variant; --i) if (d1_stack[i]->u.variant.type == tp) { level = i; break; } res = data1_mk_node2 (dh, m, DATA1N_variant, parent); res->u.variant.type = tp; res->u.variant.value = data1_insert_string (dh, res, m, value); } } else { /* tag .. acquire our element in the abstract syntax */ if (level == 0) { parent = data1_mk_root (dh, m, tag); res = d1_stack[level] = parent; if (data1_is_xmlmode(dh)) { level++; res = data1_mk_tag (dh, m, tag, 0 /* attr */, parent); res->u.tag.attributes = xattr; } } else { res = data1_mk_tag (dh, m, tag, 0 /* attr */, parent); res->u.tag.attributes = xattr; } } d1_stack[level] = res; d1_stack[level+1] = 0; if (level < 250 && !null_tag) ++level; } else /* != '<'... this is a body of text */ { int len; if (level == 0) { c = ampr (get_byte, fh, &); continue; } res = data1_mk_node2 (dh, m, DATA1N_data, parent); res->u.data.what = DATA1I_xmltext; res->u.data.formatted_text = 0; d1_stack[level] = res; wrbuf_rewind(wrbuf); while (amp || (c && c != '<')) { wrbuf_putc (wrbuf, c); c = ampr (get_byte, fh, &); } len = wrbuf_len(wrbuf); /* use local buffer of nmem if too large */ if (len >= DATA1_LOCALDATA) res->u.data.data = (char*) nmem_malloc (m, len); else res->u.data.data = res->lbuf; if (len) memcpy (res->u.data.data, wrbuf_buf(wrbuf), len); else res->u.data.data = 0; res->u.data.len = len; } } return 0; } int getc_mem (void *fh) { const char **p = (const char **) fh; if (**p) return *(*p)++; return 0; } data1_node *data1_read_node (data1_handle dh, const char **buf, NMEM m) { WRBUF wrbuf = wrbuf_alloc(); data1_node *node; node = data1_read_nodex(dh, m, getc_mem, (void *) (buf), wrbuf); wrbuf_destroy(wrbuf); return node; } /* * Read a record in the native syntax. */ data1_node *data1_read_record(data1_handle dh, int (*rf)(void *, char *, size_t), void *fh, NMEM m) { int *size; char **buf = data1_get_read_buf (dh, &size); const char *bp; int rd = 0, res; if (!*buf) *buf = (char *)xmalloc(*size = 4096); for (;;) { if (rd + 2048 >= *size && !(*buf =(char *)xrealloc(*buf, *size *= 2))) abort(); if ((res = (*rf)(fh, *buf + rd, 2048)) <= 0) { if (!res) { bp = *buf; (*buf)[rd] = '\0'; return data1_read_node(dh, &bp, m); } else return 0; } rd += res; } } data1_node *data1_read_sgml (data1_handle dh, NMEM m, const char *buf) { const char *bp = buf; return data1_read_node (dh, &bp, m); } static int conv_item(NMEM m, yaz_iconv_t t, WRBUF wrbuf, char *inbuf, size_t inlen) { wrbuf_rewind(wrbuf); wrbuf_iconv_write(wrbuf, t, inbuf, inlen); wrbuf_iconv_reset(wrbuf, t); return 0; } static void data1_iconv_s (data1_handle dh, NMEM m, data1_node *n, yaz_iconv_t t, WRBUF wrbuf, const char *tocode) { for (; n; n = n->next) { switch (n->which) { case DATA1N_data: case DATA1N_comment: if (conv_item (m, t, wrbuf, n->u.data.data, n->u.data.len) == 0) { n->u.data.data = data1_insert_string_n (dh, n, m, wrbuf->buf, wrbuf->pos); n->u.data.len = wrbuf->pos; } break; case DATA1N_tag: if (conv_item (m, t, wrbuf, n->u.tag.tag, strlen(n->u.tag.tag)) == 0) { n->u.tag.tag = data1_insert_string_n (dh, n, m, wrbuf->buf, wrbuf->pos); } if (n->u.tag.attributes) { data1_xattr *p; for (p = n->u.tag.attributes; p; p = p->next) { if (p->value && conv_item(m, t, wrbuf, p->value, strlen(p->value)) == 0) { p->value = nmem_strdup(m, wrbuf_cstr(wrbuf)); } } } break; case DATA1N_preprocess: if (strcmp(n->u.preprocess.target, "xml") == 0) { data1_xattr *p = n->u.preprocess.attributes; for (; p; p = p->next) if (strcmp (p->name, "encoding") == 0) p->value = nmem_strdup (m, tocode); } break; } data1_iconv_s (dh, m, n->child, t, wrbuf, tocode); } } const char *data1_get_encoding (data1_handle dh, data1_node *n) { /* see if we have an xml header that specifies encoding */ if (n && n->child && n->child->which == DATA1N_preprocess && strcmp (n->child->u.preprocess.target, "xml") == 0) { data1_xattr *xp = n->child->u.preprocess.attributes; for (; xp; xp = xp->next) if (!strcmp (xp->name, "encoding") == 0) return xp->value; } /* no encoding in header, so see if "encoding" was specified for abs */ if (n && n->which == DATA1N_root && n->u.root.absyn && n->u.root.absyn->encoding) return n->u.root.absyn->encoding; /* none of above, return a hard coded default */ return "ISO-8859-1"; } int data1_iconv (data1_handle dh, NMEM m, data1_node *n, const char *tocode, const char *fromcode) { if (yaz_matchstr (tocode, fromcode)) { WRBUF wrbuf = wrbuf_alloc(); yaz_iconv_t t = yaz_iconv_open(tocode, fromcode); if (!t) { wrbuf_destroy(wrbuf); return -1; } data1_iconv_s(dh, m, n, t, wrbuf, tocode); yaz_iconv_close(t); wrbuf_destroy(wrbuf); } return 0; } void data1_chop_text(data1_handle dh, NMEM m, data1_node *n) { for (; n; n = n->next) { if (n->which == DATA1N_data) { int sz = n->u.data.len; const char *ndata = n->u.data.data; int off = 0; for (off = 0; off < sz; off++) if (!d1_isspace(ndata[off])) break; sz = sz - off; ndata += off; while (sz && d1_isspace(ndata[sz - 1])) sz--; n->u.data.data = nmem_malloc(m, sz); n->u.data.len = sz; memcpy(n->u.data.data, ndata, sz); } data1_chop_text(dh, m, n->child); } } void data1_concat_text(data1_handle dh, NMEM m, data1_node *n) { for (; n; n = n->next) { if (n->which == DATA1N_data && n->next && n->next->which == DATA1N_data) { int sz = 0; int off = 0; char *ndata; data1_node *np; for (np = n; np && np->which == DATA1N_data; np=np->next) sz += np->u.data.len; ndata = nmem_malloc(m, sz); for (np = n; np && np->which == DATA1N_data; np=np->next) { memcpy(ndata+off, np->u.data.data, np->u.data.len); off += np->u.data.len; } n->u.data.data = ndata; n->u.data.len = sz; n->next = np; if (!np && n->parent) n->parent->last_child = n; } data1_concat_text(dh, m, n->child); } } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/data1/d1_sumout.c0000644000175000017500000000664711412332551013232 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include static int *f_integer(data1_node *c, ODR o) { int *r; char intbuf[64]; if (!c->child || c->child->which != DATA1N_data || c->child->u.data.len > 63) return 0; r = (int *)odr_malloc(o, sizeof(*r)); sprintf(intbuf, "%.*s", 63, c->child->u.data.data); *r = atoi(intbuf); return r; } static char *f_string(data1_node *c, ODR o) { char *r; if (!c->child || c->child->which != DATA1N_data) return 0; r = (char *)odr_malloc(o, c->child->u.data.len+1); memcpy(r, c->child->u.data.data, c->child->u.data.len); r[c->child->u.data.len] = '\0'; return r; } Z_BriefBib *data1_nodetosummary (data1_handle dh, data1_node *n, int select, ODR o) { Z_BriefBib *res = (Z_BriefBib *)odr_malloc(o, sizeof(*res)); data1_node *c; assert(n->which == DATA1N_root); if (strcmp(n->u.root.type, "summary")) { yaz_log(YLOG_WARN, "Attempt to convert a non-summary record"); return 0; } res->title = "[UNKNOWN]"; res->author = 0; res->callNumber = 0; res->recordType = 0; res->bibliographicLevel = 0; res->num_format = 0; res->format = 0; res->publicationPlace = 0; res->publicationDate = 0; res->targetSystemKey = 0; res->satisfyingElement = 0; res->rank = 0; res->documentId = 0; res->abstract = 0; res->otherInfo = 0; for (c = n->child; c; c = c->next) { if (c->which != DATA1N_tag || !c->u.tag.element) { yaz_log(YLOG_WARN, "Malformed element in Summary record"); return 0; } if (select && !c->u.tag.node_selected) continue; switch (c->u.tag.element->tag->value.numeric) { case 0: res->title = f_string(c, o); break; case 1: res->author = f_string(c, o); break; case 2: res->callNumber = f_string(c, o); break; case 3: res->recordType = f_string(c, o); break; case 4: res->bibliographicLevel = f_string(c, o); break; case 5: abort(); /* TODO */ case 10: res->publicationPlace = f_string(c, o); break; case 11: res->publicationDate = f_string(c, o); break; case 12: res->targetSystemKey = f_string(c, o); break; case 13: res->satisfyingElement = f_string(c, o); break; case 14: res->rank = f_integer(c, o); break; case 15: res->documentId = f_string(c, o); break; case 16: res->abstract = f_string(c, o); break; case 17: abort(); /* TODO */ default: yaz_log(YLOG_WARN, "Unknown element in Summary record."); } } return res; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/data1/Makefile.in0000644000175000017500000004062611412336424013211 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = data1 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libidzebra_data1_la_LIBADD = am_libidzebra_data1_la_OBJECTS = d1_handle.lo d1_read.lo d1_attset.lo \ d1_tagset.lo d1_absyn.lo d1_grs.lo d1_sutrs.lo d1_varset.lo \ d1_espec.lo d1_doespec.lo d1_map.lo d1_marc.lo d1_write.lo \ d1_expout.lo d1_sumout.lo d1_soif.lo d1_prtree.lo d1_if.lo \ d1_utils.lo libidzebra_data1_la_OBJECTS = $(am_libidzebra_data1_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libidzebra_data1_la_SOURCES) DIST_SOURCES = $(libidzebra_data1_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ noinst_LTLIBRARIES = libidzebra-data1.la libidzebra_data1_la_SOURCES = d1_handle.c d1_read.c d1_attset.c d1_tagset.c \ d1_absyn.c d1_grs.c d1_sutrs.c d1_varset.c d1_espec.c d1_doespec.c d1_map.c \ d1_marc.c d1_write.c d1_expout.c d1_sumout.c d1_soif.c d1_prtree.c d1_if.c \ d1_utils.c AM_CPPFLAGS = -I$(top_srcdir)/include $(YAZINC) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data1/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu data1/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libidzebra-data1.la: $(libidzebra_data1_la_OBJECTS) $(libidzebra_data1_la_DEPENDENCIES) $(LINK) $(libidzebra_data1_la_OBJECTS) $(libidzebra_data1_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d1_absyn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d1_attset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d1_doespec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d1_espec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d1_expout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d1_grs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d1_handle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d1_if.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d1_map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d1_marc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d1_prtree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d1_read.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d1_soif.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d1_sumout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d1_sutrs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d1_tagset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d1_utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d1_varset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d1_write.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/data1/d1_tagset.c0000644000175000017500000001364511412332551013161 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include /* * We'll probably want to add some sort of hashed index to these lookup- * functions eventually. */ data1_datatype data1_maptype (data1_handle dh, char *t) { static struct { char *tname; data1_datatype type; } types[] = { {"structured", DATA1K_structured}, {"string", DATA1K_string}, {"numeric", DATA1K_numeric}, {"oid", DATA1K_oid}, {"bool", DATA1K_bool}, {"generalizedtime", DATA1K_generalizedtime}, {"intunit", DATA1K_intunit}, {"int", DATA1K_int}, {"octetstring", DATA1K_octetstring}, {"null", DATA1K_null}, {NULL, (data1_datatype) -1} }; int i; for (i = 0; types[i].tname; i++) if (!data1_matchstr(types[i].tname, t)) return types[i].type; return DATA1K_unknown; } data1_tag *data1_gettagbynum (data1_handle dh, data1_tagset *s, int type, int value) { data1_tag *r; for (; s; s = s->next) { /* scan local set */ if (type == s->type) for (r = s->tags; r; r = r->next) if (r->which == DATA1T_numeric && r->value.numeric == value) return r; /* scan included sets */ if (s->children && (r = data1_gettagbynum (dh, s->children, type, value))) return r; } return 0; } data1_tag *data1_gettagbyname (data1_handle dh, data1_tagset *s, const char *name) { data1_tag *r; for (; s; s = s->next) { /* scan local set */ for (r = s->tags; r; r = r->next) { data1_name *np; for (np = r->names; np; np = np->next) if (!data1_matchstr(np->name, name)) return r; } /* scan included sets */ if (s->children && (r = data1_gettagbyname (dh, s->children, name))) return r; } return 0; } data1_tagset *data1_empty_tagset (data1_handle dh) { data1_tagset *res = (data1_tagset *) nmem_malloc(data1_nmem_get (dh), sizeof(*res)); res->name = 0; res->oid = 0; res->tags = 0; res->type = 0; res->children = 0; res->next = 0; return res; } data1_tagset *data1_read_tagset (data1_handle dh, const char *file, int type) { NMEM mem = data1_nmem_get (dh); data1_tagset *res = 0; data1_tagset **childp; data1_tag **tagp; FILE *f; int lineno = 0; int argc; char *argv[50], line[512]; if (!(f = data1_path_fopen(dh, file, "r"))) { yaz_log(YLOG_WARN|YLOG_ERRNO, "%s", file); return 0; } res = data1_empty_tagset (dh); res->type = type; childp = &res->children; tagp = &res->tags; while ((argc = readconf_line(f, &lineno, line, 512, argv, 50))) { char *cmd = *argv; if (!strcmp(cmd, "tag")) { int value; char *names, *type, *nm; data1_tag *rr; data1_name **npp; if (argc != 4) { yaz_log(YLOG_WARN, "%s:%d: Bad # args to tag", file, lineno); continue; } value = atoi(argv[1]); names = argv[2]; type = argv[3]; rr = *tagp = (data1_tag *)nmem_malloc(mem, sizeof(*rr)); rr->tagset = res; rr->next = 0; rr->which = DATA1T_numeric; rr->value.numeric = value; /* * how to deal with local numeric tags? */ if (!(rr->kind = data1_maptype(dh, type))) { yaz_log(YLOG_WARN, "%s:%d: Unknown datatype %s", file, lineno, type); fclose(f); return 0; } /* read namelist */ nm = names; npp = &rr->names; do { char *e; *npp = (data1_name *)nmem_malloc(mem, sizeof(**npp)); if ((e = strchr(nm, '/'))) *(e++) = '\0'; (*npp)->name = nmem_strdup(mem, nm); (*npp)->next = 0; npp = &(*npp)->next; nm = e; } while (nm); tagp = &rr->next; } else if (!strcmp(cmd, "name")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # args to name", file, lineno); continue; } res->name = nmem_strdup(mem, argv[1]); } else if (!strcmp(cmd, "reference")) { char *name; if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # args to reference", file, lineno); continue; } name = argv[1]; res->oid = yaz_string_to_oid_nmem(yaz_oid_std(), CLASS_TAGSET, name, mem); if (!res->oid) { yaz_log(YLOG_WARN, "%s:%d: Unknown tagset ref '%s'", file, lineno, name); continue; } } else if (!strcmp(cmd, "type")) { if (argc != 2) { yaz_log (YLOG_WARN, "%s:%d: Bad # args to type", file, lineno); continue; } if (!res->type) res->type = atoi(argv[1]); } else if (!strcmp(cmd, "include")) { char *name; int type = 0; if (argc < 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # args to include", file, lineno); continue; } name = argv[1]; if (argc == 3) type = atoi(argv[2]); *childp = data1_read_tagset (dh, name, type); if (!(*childp)) { yaz_log(YLOG_WARN, "%s:%d: Inclusion failed for tagset %s", file, lineno, name); continue; } childp = &(*childp)->next; } else { yaz_log(YLOG_WARN, "%s:%d: Unknown directive '%s'", file, lineno, cmd); } } fclose(f); return res; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/data1/d1_handle.c0000644000175000017500000000761711412332551013127 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #define DATA1_FLAG_XML 1 struct data1_handle_info { WRBUF wrbuf; char *tab_path; char *tab_root; char *read_buf; int read_len; data1_absyn_cache absyn_cache; data1_attset_cache attset_cache; char *map_buf; int map_len; NMEM mem; }; data1_handle data1_create(void) { data1_handle p = (data1_handle)xmalloc (sizeof(*p)); if (!p) return 0; p->tab_path = NULL; p->tab_root = NULL; p->wrbuf = wrbuf_alloc(); p->read_buf = NULL; p->read_len = 0; p->map_buf = NULL; p->map_len = 0; p->absyn_cache = NULL; p->attset_cache = NULL; p->mem = nmem_create (); return p; } NMEM data1_nmem_get (data1_handle dh) { return dh->mem; } data1_absyn_cache *data1_absyn_cache_get (data1_handle dh) { return &dh->absyn_cache; } data1_attset_cache *data1_attset_cache_get (data1_handle dh) { return &dh->attset_cache; } void data1_destroy (data1_handle dh) { if (!dh) return; /* *ostrich* We need to destroy DFAs, in xp_element (xelm) definitions pop, 2002-12-13 */ data1_absyn_destroy(dh); wrbuf_destroy(dh->wrbuf); if (dh->tab_path) xfree (dh->tab_path); if (dh->tab_root) xfree (dh->tab_root); if (dh->read_buf) xfree (dh->read_buf); if (dh->map_buf) xfree (dh->map_buf); nmem_destroy (dh->mem); xfree (dh); } WRBUF data1_get_wrbuf (data1_handle dp) { return dp->wrbuf; } char **data1_get_read_buf (data1_handle dp, int **lenp) { *lenp = &dp->read_len; yaz_log (YLOG_DEBUG, "data1_get_read_buf lenp=%u", **lenp); return &dp->read_buf; } char **data1_get_map_buf (data1_handle dp, int **lenp) { *lenp = &dp->map_len; yaz_log (YLOG_DEBUG, "data1_get_map_buf lenp=%u", **lenp); return &dp->map_buf; } void data1_set_tabpath (data1_handle dp, const char *p) { xfree (dp->tab_path); dp->tab_path = NULL; if (p) dp->tab_path = xstrdup (p); } void data1_set_tabroot (data1_handle dp, const char *p) { xfree (dp->tab_root); dp->tab_root = NULL; if (p) dp->tab_root = xstrdup (p); } const char *data1_get_tabpath (data1_handle dp) { return dp->tab_path; } const char *data1_get_tabroot (data1_handle dp) { return dp->tab_root; } FILE *data1_path_fopen (data1_handle dh, const char *file, const char *mode) { FILE *f; const char *path = data1_get_tabpath(dh); const char *root = data1_get_tabroot(dh); yaz_log(YLOG_DEBUG, "data1_path_fopen path=%s root=%s " "file=%s mode=%s", path ? path : "NULL", root ? root : "NULL", file, mode); if (!path || !*path) return 0; f = yaz_fopen(path, file, mode, root); if (!f) { yaz_log(YLOG_WARN|YLOG_ERRNO, "Couldn't open %s", file); if (root) yaz_log(YLOG_LOG, "for root=%s", root); if (path) yaz_log(YLOG_LOG, "for profilePath=%s", path); } return f; } int data1_is_xmlmode(data1_handle dh) { return 1; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/data1/d1_absyn.c0000644000175000017500000007167611412332551013016 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include #define D1_MAX_NESTING 128 struct data1_hash_table { NMEM nmem; int size; struct data1_hash_entry **ar; }; struct data1_hash_entry { void *clientData; char *str; struct data1_hash_entry *next; }; unsigned data1_hash_calc(struct data1_hash_table *ht, const char *str) { unsigned v = 0; assert(str); while (*str) { if (*str >= 'a' && *str <= 'z') v = v*65509 + *str -'a'+10; else if (*str >= 'A' && *str <= 'Z') v = v*65509 + *str -'A'+10; else if (*str >= '0' && *str <= '9') v = v*65509 + *str -'0'; str++; } return v % ht->size; } struct data1_hash_table *data1_hash_open(int size, NMEM nmem) { int i; struct data1_hash_table *ht = nmem_malloc(nmem, sizeof(*ht)); ht->nmem = nmem; ht->size = size; if (ht->size <= 0) ht->size = 29; ht->ar = nmem_malloc(nmem, sizeof(*ht->ar) * ht->size); for (i = 0; isize; i++) ht->ar[i] = 0; return ht; } void data1_hash_insert(struct data1_hash_table *ht, const char *str, void *clientData, int copy) { char *dstr = copy ? nmem_strdup(ht->nmem, str) : (char*) str; if (strchr(str, '?') || strchr(str, '.')) { int i; for (i = 0; isize; i++) { struct data1_hash_entry **he = &ht->ar[i]; for (; *he && strcmp(str, (*he)->str); he = &(*he)->next) ; if (!*he) { *he = nmem_malloc(ht->nmem, sizeof(**he)); (*he)->str = dstr; (*he)->next = 0; } (*he)->clientData = clientData; } } else { struct data1_hash_entry **he = &ht->ar[data1_hash_calc(ht, str)]; for (; *he && strcmp(str, (*he)->str); he = &(*he)->next) ; if (!*he) { *he = nmem_malloc(ht->nmem, sizeof(**he)); (*he)->str = dstr; (*he)->next = 0; } (*he)->clientData = clientData; } } void *data1_hash_lookup(struct data1_hash_table *ht, const char *str) { struct data1_hash_entry **he = &ht->ar[data1_hash_calc(ht, str)]; for (; *he && yaz_matchstr(str, (*he)->str); he = &(*he)->next) ; if (*he) return (*he)->clientData; return 0; } struct data1_systag { char *name; char *value; struct data1_systag *next; }; struct data1_absyn_cache_info { char *name; data1_absyn *absyn; data1_absyn_cache next; }; struct data1_attset_cache_info { char *name; data1_attset *attset; data1_attset_cache next; }; data1_element *data1_mk_element(data1_handle dh) { data1_element *e = nmem_malloc(data1_nmem_get(dh), sizeof(*e)); e->name = 0; e->tag = 0; e->termlists = 0; e->next = e->children = 0; e->sub_name = 0; e->hash = 0; return e; } data1_absyn *data1_absyn_search (data1_handle dh, const char *name) { data1_absyn_cache p = *data1_absyn_cache_get (dh); while (p) { if (!yaz_matchstr (name, p->name)) return p->absyn; p = p->next; } return 0; } /* *ostrich* We need to destroy DFAs, in xp_element (xelm) definitions pop, 2002-12-13 */ void data1_absyn_destroy (data1_handle dh) { data1_absyn_cache p = *data1_absyn_cache_get (dh); while (p) { data1_absyn *abs = p->absyn; if (abs) { data1_xpelement *xpe = abs->xp_elements; while (xpe) { yaz_log (YLOG_DEBUG,"Destroy xp element %s",xpe->xpath_expr); if (xpe->dfa) dfa_delete (&xpe->dfa); xpe = xpe->next; } } p = p->next; } } void data1_absyn_trav (data1_handle dh, void *handle, void (*fh)(data1_handle dh, void *h, data1_absyn *a)) { data1_absyn_cache p = *data1_absyn_cache_get (dh); while (p) { (*fh)(dh, handle, p->absyn); p = p->next; } } static data1_absyn *data1_read_absyn(data1_handle dh, const char *file, enum DATA1_XPATH_INDEXING en); static data1_absyn *data1_absyn_add(data1_handle dh, const char *name, enum DATA1_XPATH_INDEXING en) { char fname[512]; NMEM mem = data1_nmem_get (dh); data1_absyn_cache p = (data1_absyn_cache)nmem_malloc (mem, sizeof(*p)); data1_absyn_cache *pp = data1_absyn_cache_get (dh); sprintf(fname, "%.500s.abs", name); p->absyn = data1_read_absyn(dh, fname, en); p->name = nmem_strdup(mem, name); p->next = *pp; *pp = p; return p->absyn; } data1_absyn *data1_get_absyn (data1_handle dh, const char *name, enum DATA1_XPATH_INDEXING en) { data1_absyn *absyn; if (!(absyn = data1_absyn_search (dh, name))) absyn = data1_absyn_add (dh, name, en); return absyn; } data1_attset *data1_attset_search_name (data1_handle dh, const char *name) { data1_attset_cache p = *data1_attset_cache_get (dh); while (p) { if (!yaz_matchstr (name, p->name)) return p->attset; p = p->next; } return 0; } data1_attset *data1_attset_search_id(data1_handle dh, const Odr_oid *oid) { data1_attset_cache p = *data1_attset_cache_get (dh); while (p) { if (p->attset->oid && !oid_oidcmp(oid, p->attset->oid)) return p->attset; p = p->next; } return 0; } data1_attset *data1_attset_add (data1_handle dh, const char *name) { NMEM mem = data1_nmem_get (dh); data1_attset *attset; attset = data1_read_attset (dh, name); if (!attset) yaz_log (YLOG_WARN|YLOG_ERRNO, "Couldn't load attribute set %s", name); else { data1_attset_cache p = (data1_attset_cache) nmem_malloc (mem, sizeof(*p)); data1_attset_cache *pp = data1_attset_cache_get (dh); attset->name = p->name = nmem_strdup(mem, name); p->attset = attset; p->next = *pp; *pp = p; } return attset; } data1_attset *data1_get_attset (data1_handle dh, const char *name) { data1_attset *attset; if (!(attset = data1_attset_search_name (dh, name))) attset = data1_attset_add (dh, name); return attset; } data1_esetname *data1_getesetbyname(data1_handle dh, data1_absyn *a, const char *name) { data1_esetname *r; for (r = a->esetnames; r; r = r->next) if (!data1_matchstr(r->name, name)) return r; return 0; } /* we have multiple versions of data1_getelementbyname */ #define DATA1_GETELEMENTBYTAGNAME_VERSION 1 data1_element *data1_getelementbytagname (data1_handle dh, data1_absyn *abs, data1_element *parent, const char *tagname) { data1_element *r; struct data1_hash_table *ht; /* It's now possible to have a data1 tree with no abstract syntax */ if ( !abs ) return 0; if (!parent) r = abs->main_elements; else r = parent->children; #if DATA1_GETELEMENTBYTAGNAME_VERSION==1 /* using hash search */ if (!r) return 0; ht = r->hash; if (!ht) { /* build hash table (the first time) */ ht = r->hash = data1_hash_open(29, data1_nmem_get(dh)); for (; r; r = r->next) { data1_name *n; for (n = r->tag->names; n; n = n->next) data1_hash_insert(ht, n->name, r, 0); } } return data1_hash_lookup(ht, tagname); #else /* using linear search */ for (; r; r = r->next) { data1_name *n; for (n = r->tag->names; n; n = n->next) if (!data1_matchstr(tagname, n->name)) return r; } return 0; #endif } data1_element *data1_getelementbyname (data1_handle dh, data1_absyn *absyn, const char *name) { data1_element *r; /* It's now possible to have a data1 tree with no abstract syntax */ if ( !absyn ) return 0; for (r = absyn->main_elements; r; r = r->next) if (!data1_matchstr(r->name, name)) return r; return 0; } void fix_element_ref (data1_handle dh, data1_absyn *absyn, data1_element *e) { /* It's now possible to have a data1 tree with no abstract syntax */ if ( !absyn ) return; for (; e; e = e->next) { if (!e->sub_name) { if (e->children) fix_element_ref (dh, absyn, e->children); } else { data1_sub_elements *sub_e = absyn->sub_elements; while (sub_e && strcmp (e->sub_name, sub_e->name)) sub_e = sub_e->next; if (sub_e) e->children = sub_e->elements; else yaz_log (YLOG_WARN, "Unresolved reference to sub-elements %s", e->sub_name); } } } /* *ostrich* New function, a bit dummy now... I've seen it in zrpn.c... We should build more clever regexps... //a -> ^a/.*$ //a/b -> ^b/a/.*$ /a -> ^a/$ /a/b -> ^b/a/$ / -> none pop, 2002-12-13 Now [] predicates are supported pop, 2003-01-17 */ static const char * mk_xpath_regexp (data1_handle dh, const char *expr) { const char *p = expr; int abs = 1; int e = 0; char *stack[32]; char *res_p, *res = 0; size_t res_size = 1; if (*p != '/') return (""); p++; if (*p == '/') { abs =0; p++; } while (*p) { int is_predicate = 0; char *s; int i, j; for (i = 0; *p && !strchr("/",*p); i++, p++) ; res_size += (i+3); /* we'll add / between later .. */ stack[e] = (char *) nmem_malloc(data1_nmem_get(dh), i+1); s = stack[e]; for (j = 0; j < i; j++) { const char *pp = p-i+j; if (*pp == '[') is_predicate=1; else if (*pp == ']') is_predicate=0; else { if (!is_predicate) { if (*pp == '*') *s++ = '.'; *s++ = *pp; } } } *s = 0; e++; if (*p) p++; } res_p = res = nmem_malloc(data1_nmem_get(dh), res_size + 10); if (stack[e-1][0] == '@') /* path/@attr spec (leaf is attribute) */ strcpy(res_p, "/"); else strcpy(res_p, "[^@]*/"); /* path .. (index all cdata below it) */ res_p = res_p + strlen(res_p); while (--e >= 0) { sprintf(res_p, "%s/", stack[e]); res_p += strlen(stack[e]) + 1; } if (!abs) { sprintf(res_p, ".*"); res_p += 2; } sprintf (res_p, "$"); res_p++; yaz_log(YLOG_DEBUG, "Got regexp: %s", res); return res; } static int parse_termlists(data1_handle dh, data1_termlist ***tpp, char *cp, const char *file, int lineno, const char *element_name, data1_absyn *res, int xpelement, data1_attset *attset) { data1_termlist **tp = *tpp; while(1) { char attname[512], structure[512]; char *source; int r, i; int level = 0; structure[0] = '\0'; for (i = 0; cp[i] && inext = 0; if (*attname == '!') { if (!xpelement && element_name) strcpy(attname, element_name); else if (xpelement) strcpy(attname, ZEBRA_XPATH_CDATA); } if (attset) { if (!data1_getattbyname(dh, attset, attname)) { yaz_log(YLOG_WARN, "Index '%s' not found in attset(s)", attname); } } (*tp)->index_name = nmem_strdup(data1_nmem_get(dh), attname); assert (*(*tp)->index_name != '!'); if (r == 2 && (source = strchr(structure, ':'))) *source++ = '\0'; /* cut off structure .. */ else source = "data"; /* ok: default is leaf data */ (*tp)->source = (char *) nmem_strdup (data1_nmem_get (dh), source); if (r < 2) /* is the structure qualified? */ (*tp)->structure = "w"; else (*tp)->structure = (char *) nmem_strdup (data1_nmem_get (dh), structure); tp = &(*tp)->next; } *tpp = tp; return 0; } /* quinn * Converts a 'melm' field[$subfield] pattern to a simple xpath */ static int melm2xpath(char *melm, char *buf) { char *dollar; char *field = melm; char *subfield; char *fieldtype; if ((dollar = strchr(melm, '$'))) { *dollar = '\0'; subfield = ++dollar; } else subfield = ""; if (field[0] == '0' && field[1] == '0') fieldtype = "controlfield"; else fieldtype = "datafield"; sprintf(buf, "/*/%s[@tag=\"%s\"]", fieldtype, field); if (*subfield) sprintf(buf + strlen(buf), "/subfield[@code=\"%s\"]", subfield); else if (field[0] != '0' || field[1] != '0') strcat(buf, "/subfield"); yaz_log(YLOG_DEBUG, "Created xpath: '%s'", buf); return 0; } const char *data1_systag_lookup(data1_absyn *absyn, const char *tag, const char *default_value) { struct data1_systag *p = absyn->systags; for (; p; p = p->next) if (!strcmp(p->name, tag)) return p->value; return default_value; } #define l_isspace(c) ((c) == '\t' || (c) == ' ' || (c) == '\n' || (c) == '\r') int read_absyn_line(FILE *f, int *lineno, char *line, int len, char *argv[], int num) { char *p; int argc; int quoted = 0; while ((p = fgets(line, len, f))) { (*lineno)++; while (*p && l_isspace(*p)) p++; if (*p && *p != '#') break; } if (!p) return 0; for (argc = 0; *p ; argc++) { if (*p == '#') /* trailing comment */ break; argv[argc] = p; while (*p && !(l_isspace(*p) && !quoted)) { if (*p =='"') quoted = 1 - quoted; if (*p =='[') quoted = 1; if (*p ==']') quoted = 0; p++; } if (*p) { *(p++) = '\0'; while (*p && l_isspace(*p)) p++; } } return argc; } data1_marctab *data1_absyn_getmarctab(data1_handle dh, data1_node *root) { if (root->u.root.absyn) return root->u.root.absyn->marc; return 0; } data1_element *data1_absyn_getelements(data1_handle dh, data1_node *root) { if (root->u.root.absyn) return root->u.root.absyn->main_elements; return 0; } static data1_absyn *data1_read_absyn(data1_handle dh, const char *file, enum DATA1_XPATH_INDEXING default_xpath) { data1_sub_elements *cur_elements = NULL; data1_xpelement **cur_xpelement = NULL; data1_attset *attset_list = data1_empty_attset(dh); data1_attset_child **attset_childp = &attset_list->children; data1_absyn *res = 0; FILE *f; data1_element **ppl[D1_MAX_NESTING]; data1_esetname **esetpp; data1_maptab **maptabp; data1_marctab **marcp; data1_termlist *all = 0; data1_tagset **tagset_childp; struct data1_systag **systagsp; int level = 0; int lineno = 0; int argc; char *argv[50], line[512]; f = data1_path_fopen(dh, file, "r"); res = (data1_absyn *) nmem_malloc(data1_nmem_get(dh), sizeof(*res)); res->name = 0; res->oid = 0; res->tagset = 0; res->encoding = 0; res->xpath_indexing = (f ? DATA1_XPATH_INDEXING_DISABLE : default_xpath); res->systags = 0; systagsp = &res->systags; tagset_childp = &res->tagset; res->varset = 0; res->esetnames = 0; esetpp = &res->esetnames; res->maptabs = 0; maptabp = &res->maptabs; res->marc = 0; marcp = &res->marc; res->sub_elements = NULL; res->main_elements = NULL; res->xp_elements = NULL; cur_xpelement = &res->xp_elements; while (f && (argc = read_absyn_line(f, &lineno, line, 512, argv, 50))) { char *cmd = *argv; if (!strcmp(cmd, "elm") || !strcmp(cmd, "element")) { data1_element *new_element; int i; char *p, *sub_p, *path, *name, *termlists; int type, value; data1_termlist **tp; if (argc < 4) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args to elm", file, lineno); continue; } path = argv[1]; name = argv[2]; termlists = argv[3]; if (!cur_elements) { cur_elements = (data1_sub_elements *) nmem_malloc(data1_nmem_get(dh), sizeof(*cur_elements)); cur_elements->next = res->sub_elements; cur_elements->elements = NULL; cur_elements->name = "main"; res->sub_elements = cur_elements; level = 0; ppl[level] = &cur_elements->elements; } p = path; for (i = 1;; i++) { char *e; if ((e = strchr(p, '/'))) p = e+1; else break; } if (i > level+1) { yaz_log(YLOG_WARN, "%s:%d: Bad level increase", file, lineno); fclose(f); return 0; } level = i; new_element = *ppl[level-1] = data1_mk_element(dh); tp = &new_element->termlists; ppl[level-1] = &new_element->next; ppl[level] = &new_element->children; /* consider subtree (if any) ... */ if ((sub_p = strchr (p, ':')) && sub_p[1]) { *sub_p++ = '\0'; new_element->sub_name = nmem_strdup (data1_nmem_get(dh), sub_p); } /* well-defined tag */ if (sscanf(p, "(%d,%d)", &type, &value) == 2) { if (!res->tagset) { yaz_log(YLOG_WARN, "%s:%d: No tagset loaded", file, lineno); fclose(f); return 0; } if (!(new_element->tag = data1_gettagbynum (dh, res->tagset, type, value))) { yaz_log(YLOG_WARN, "%s:%d: Couldn't find tag %s in tagset", file, lineno, p); fclose(f); return 0; } } /* private tag */ else if (*p) { data1_tag *nt = new_element->tag = (data1_tag *) nmem_malloc(data1_nmem_get (dh), sizeof(*new_element->tag)); nt->which = DATA1T_string; nt->value.string = nmem_strdup(data1_nmem_get (dh), p); nt->names = (data1_name *) nmem_malloc(data1_nmem_get(dh), sizeof(*new_element->tag->names)); nt->names->name = nt->value.string; nt->names->next = 0; nt->kind = DATA1K_string; nt->next = 0; nt->tagset = 0; } else { yaz_log(YLOG_WARN, "%s:%d: Bad element", file, lineno); fclose(f); return 0; } /* parse termList definitions */ p = termlists; if (*p != '-') { if (parse_termlists (dh, &tp, p, file, lineno, name, res, 0, attset_list)) { fclose (f); return 0; } *tp = all; /* append any ALL entries to the list */ } new_element->name = nmem_strdup(data1_nmem_get (dh), name); } /* *ostrich* New code to support xelm directive for each xelm a dfa is built. xelms are stored in res->xp_elements maybe we should use a simple sscanf instead of dfa? pop, 2002-12-13 Now [] predicates are supported. regexps and xpath structure is a bit redundant, however it's comfortable later... pop, 2003-01-17 */ else if (!strcmp(cmd, "xelm") || !strcmp(cmd, "melm")) { int i; char *p, *xpath_expr, *termlists; const char *regexp; struct DFA *dfa = 0; data1_termlist **tp; char melm_xpath[128]; data1_xpelement *xp_ele = 0; data1_xpelement *last_match = 0; if (argc != 3) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args to %s", file, lineno, cmd); continue; } if (!strcmp(cmd, "melm")) { if (melm2xpath(argv[1], melm_xpath) < 0) continue; xpath_expr = melm_xpath; } else { xpath_expr = argv[1]; } termlists = argv[2]; regexp = mk_xpath_regexp(dh, xpath_expr); #if OPTIMIZE_MELM /* get last of existing regulars with same regexp */ for (xp_ele = res->xp_elements; xp_ele; xp_ele = xp_ele->next) if (!strcmp(xp_ele->regexp, regexp)) last_match = xp_ele; #endif if (!last_match) { /* new regular expression . Parse + generate */ const char *regexp_ptr = regexp; dfa = dfa_init(); i = dfa_parse (dfa, ®exp_ptr); if (i || *regexp_ptr) { yaz_log(YLOG_WARN, "%s:%d: Bad xpath to xelm", file, lineno); dfa_delete (&dfa); continue; } } *cur_xpelement = (data1_xpelement *) nmem_malloc(data1_nmem_get(dh), sizeof(**cur_xpelement)); (*cur_xpelement)->next = 0; (*cur_xpelement)->match_next = 0; if (last_match) last_match->match_next = *cur_xpelement; #if OPTIMIZE_MELM (*cur_xpelement)->regexp = regexp; #endif (*cur_xpelement)->xpath_expr = nmem_strdup(data1_nmem_get (dh), xpath_expr); if (dfa) dfa_mkstate (dfa); (*cur_xpelement)->dfa = dfa; #ifdef ENHANCED_XELM (*cur_xpelement)->xpath_len = zebra_parse_xpath_str( xpath_expr, (*cur_xpelement)->xpath, XPATH_STEP_COUNT, data1_nmem_get(dh)); #endif (*cur_xpelement)->termlists = 0; tp = &(*cur_xpelement)->termlists; /* parse termList definitions */ p = termlists; if (*p != '-') { if (parse_termlists (dh, &tp, p, file, lineno, xpath_expr, res, 1, attset_list)) { fclose (f); return 0; } *tp = all; /* append any ALL entries to the list */ } cur_xpelement = &(*cur_xpelement)->next; } else if (!strcmp(cmd, "section")) { char *name; if (argc < 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args to section", file, lineno); continue; } name = argv[1]; cur_elements = (data1_sub_elements *) nmem_malloc(data1_nmem_get(dh), sizeof(*cur_elements)); cur_elements->next = res->sub_elements; cur_elements->elements = NULL; cur_elements->name = nmem_strdup (data1_nmem_get(dh), name); res->sub_elements = cur_elements; level = 0; ppl[level] = &cur_elements->elements; } else if (!strcmp(cmd, "xpath")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args to 'xpath' directive", file, lineno); continue; } if (!strcmp(argv[1], "enable")) res->xpath_indexing = DATA1_XPATH_INDEXING_ENABLE; else if (!strcmp (argv[1], "disable")) res->xpath_indexing = DATA1_XPATH_INDEXING_DISABLE; else { yaz_log(YLOG_WARN, "%s:%d: Expecting disable/enable " "after 'xpath' directive", file, lineno); } } else if (!strcmp(cmd, "all")) { data1_termlist **tp = &all; if (all) { yaz_log(YLOG_WARN, "%s:%d: Too many 'all' directives - ignored", file, lineno); continue; } if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args to 'all' directive", file, lineno); continue; } if (parse_termlists (dh, &tp, argv[1], file, lineno, 0, res, 0, attset_list)) { fclose (f); return 0; } } else if (!strcmp(cmd, "name")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args to name directive", file, lineno); continue; } res->name = nmem_strdup(data1_nmem_get(dh), argv[1]); } else if (!strcmp(cmd, "reference")) { char *name; if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args to reference", file, lineno); continue; } name = argv[1]; res->oid = yaz_string_to_oid_nmem(yaz_oid_std(), CLASS_SCHEMA, name, data1_nmem_get(dh)); if (!res->oid) { yaz_log(YLOG_WARN, "%s:%d: Unknown tagset ref '%s'", file, lineno, name); continue; } } else if (!strcmp(cmd, "attset")) { char *name; data1_attset *attset; if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args to attset", file, lineno); continue; } name = argv[1]; if (!(attset = data1_get_attset (dh, name))) { yaz_log(YLOG_WARN, "%s:%d: Couldn't find attset %s", file, lineno, name); continue; } *attset_childp = (data1_attset_child *) nmem_malloc (data1_nmem_get(dh), sizeof(**attset_childp)); (*attset_childp)->child = attset; (*attset_childp)->next = 0; attset_childp = &(*attset_childp)->next; } else if (!strcmp(cmd, "tagset")) { char *name; int type = 0; if (argc < 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args to tagset", file, lineno); continue; } name = argv[1]; if (argc == 3) type = atoi(argv[2]); *tagset_childp = data1_read_tagset (dh, name, type); if (!(*tagset_childp)) { yaz_log(YLOG_WARN, "%s:%d: Couldn't load tagset %s", file, lineno, name); continue; } tagset_childp = &(*tagset_childp)->next; } else if (!strcmp(cmd, "varset")) { char *name; if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args in varset", file, lineno); continue; } name = argv[1]; if (!(res->varset = data1_read_varset (dh, name))) { yaz_log(YLOG_WARN, "%s:%d: Couldn't load Varset %s", file, lineno, name); continue; } } else if (!strcmp(cmd, "esetname")) { char *name, *fname; if (argc != 3) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args in esetname", file, lineno); continue; } name = argv[1]; fname = argv[2]; *esetpp = (data1_esetname *) nmem_malloc(data1_nmem_get(dh), sizeof(**esetpp)); (*esetpp)->name = nmem_strdup(data1_nmem_get(dh), name); (*esetpp)->next = 0; if (*fname == '@') (*esetpp)->spec = 0; else if (!((*esetpp)->spec = data1_read_espec1 (dh, fname))) { yaz_log(YLOG_WARN, "%s:%d: Espec-1 read failed for %s", file, lineno, fname); continue; } esetpp = &(*esetpp)->next; } else if (!strcmp(cmd, "maptab")) { char *name; if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args for maptab", file, lineno); continue; } name = argv[1]; if (!(*maptabp = data1_read_maptab (dh, name))) { yaz_log(YLOG_WARN, "%s:%d: Couldn't load maptab %s", file, lineno, name); continue; } maptabp = &(*maptabp)->next; } else if (!strcmp(cmd, "marc")) { char *name; if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # or args for marc", file, lineno); continue; } name = argv[1]; if (!(*marcp = data1_read_marctab (dh, name))) { yaz_log(YLOG_WARN, "%s:%d: Couldn't read marctab %s", file, lineno, name); continue; } marcp = &(*marcp)->next; } else if (!strcmp(cmd, "encoding")) { if (argc != 2) { yaz_log(YLOG_WARN, "%s:%d: Bad # or args for encoding", file, lineno); continue; } res->encoding = nmem_strdup (data1_nmem_get(dh), argv[1]); } else if (!strcmp(cmd, "systag")) { if (argc != 3) { yaz_log(YLOG_WARN, "%s:%d: Bad # or args for systag", file, lineno); continue; } *systagsp = nmem_malloc (data1_nmem_get(dh), sizeof(**systagsp)); (*systagsp)->name = nmem_strdup(data1_nmem_get(dh), argv[1]); (*systagsp)->value = nmem_strdup(data1_nmem_get(dh), argv[2]); systagsp = &(*systagsp)->next; } else { yaz_log(YLOG_WARN, "%s:%d: Unknown directive '%s'", file, lineno, cmd); continue; } } if (f) fclose(f); for (cur_elements = res->sub_elements; cur_elements; cur_elements = cur_elements->next) { if (!strcmp (cur_elements->name, "main")) res->main_elements = cur_elements->elements; fix_element_ref (dh, res, cur_elements->elements); } *systagsp = 0; return res; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dict/0000755000175000017500000000000011412336534011147 500000000000000idzebra-2.0.44/dict/drdwr.c0000644000175000017500000001406711412332551012360 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #if HAVE_UNISTD_H #include #endif #include #include #include #include #include "dict-p.h" void dict_pr_lru(Dict_BFile bf) { struct Dict_file_block *p; for (p=bf->lru_back; p; p = p->lru_next) { printf(" %d", p->no); } printf("\n"); fflush(stdout); } static struct Dict_file_block *find_block(Dict_BFile bf, int no) { struct Dict_file_block *p; for (p=bf->hash_array[no% bf->hash_size]; p; p=p->h_next) if (p->no == no) break; return p; } static void release_block(Dict_BFile bf, struct Dict_file_block *p) { assert(p); /* remove from lru queue */ if (p->lru_prev) p->lru_prev->lru_next = p->lru_next; else bf->lru_back = p->lru_next; if (p->lru_next) p->lru_next->lru_prev = p->lru_prev; else bf->lru_front = p->lru_prev; /* remove from hash chain */ *p->h_prev = p->h_next; if (p->h_next) p->h_next->h_prev = p->h_prev; /* move to list of free blocks */ p->h_next = bf->free_list; bf->free_list = p; } void dict_bf_flush_blocks(Dict_BFile bf, int no_to_flush) { struct Dict_file_block *p; int i; for (i=0; i != no_to_flush && bf->lru_back; i++) { p = bf->lru_back; if (p->dirty) { if (!bf->compact_flag) bf_write(bf->bf, p->no, 0, 0, p->data); else { int effective_block = p->no / bf->block_size; int effective_offset = p->no - effective_block * bf->block_size; int remain = bf->block_size - effective_offset; if (remain >= p->nbytes) { bf_write(bf->bf, effective_block, effective_offset, p->nbytes, p->data); #if 0 yaz_log(YLOG_LOG, "bf_write no=%d offset=%d size=%d", effective_block, effective_offset, p->nbytes); #endif } else { #if 0 yaz_log(YLOG_LOG, "bf_write1 no=%d offset=%d size=%d", effective_block, effective_offset, remain); #endif bf_write(bf->bf, effective_block, effective_offset, remain, p->data); #if 0 yaz_log(YLOG_LOG, "bf_write2 no=%d offset=%d size=%d", effective_block+1, 0, p->nbytes - remain); #endif bf_write(bf->bf, effective_block+1, 0, p->nbytes - remain, (char*)p->data + remain); } } } release_block(bf, p); } } static struct Dict_file_block *alloc_block(Dict_BFile bf, int no) { struct Dict_file_block *p, **pp; if (!bf->free_list) dict_bf_flush_blocks(bf, 1); assert(bf->free_list); p = bf->free_list; bf->free_list = p->h_next; p->dirty = 0; p->no = no; /* insert at front in lru chain */ p->lru_next = NULL; p->lru_prev = bf->lru_front; if (bf->lru_front) bf->lru_front->lru_next = p; else bf->lru_back = p; bf->lru_front = p; /* insert in hash chain */ pp = bf->hash_array + (no % bf->hash_size); p->h_next = *pp; p->h_prev = pp; if (*pp) (*pp)->h_prev = &p->h_next; *pp = p; return p; } static void move_to_front(Dict_BFile bf, struct Dict_file_block *p) { /* Already at front? */ if (!p->lru_next) return ; /* Remove */ if (p->lru_prev) p->lru_prev->lru_next = p->lru_next; else bf->lru_back = p->lru_next; p->lru_next->lru_prev = p->lru_prev; /* Insert at front */ p->lru_next = NULL; p->lru_prev = bf->lru_front; if (bf->lru_front) bf->lru_front->lru_next = p; else bf->lru_back = p; bf->lru_front = p; } int dict_bf_readp(Dict_BFile bf, int no, void **bufp) { struct Dict_file_block *p; int i; if ((p = find_block(bf, no))) { *bufp = p->data; move_to_front(bf, p); bf->hits++; return 1; } bf->misses++; p = alloc_block(bf, no); if (!bf->compact_flag) i = bf_read(bf->bf, no, 0, 0, p->data); else { int effective_block = no / bf->block_size; int effective_offset = no - effective_block * bf->block_size; i = bf_read(bf->bf, effective_block, effective_offset, bf->block_size - effective_offset, p->data); if (i > 0 && effective_offset > 0) i = bf_read(bf->bf, effective_block+1, 0, effective_offset, (char*) p->data + bf->block_size - effective_offset); i = 1; } if (i > 0) { *bufp = p->data; return i; } release_block(bf, p); *bufp = NULL; return i; } int dict_bf_newp(Dict_BFile dbf, int no, void **bufp, int nbytes) { struct Dict_file_block *p; if (!(p = find_block(dbf, no))) p = alloc_block(dbf, no); else move_to_front(dbf, p); *bufp = p->data; memset(p->data, 0, dbf->block_size); p->dirty = 1; p->nbytes = nbytes; #if 0 printf("bf_newp of %d:", no); dict_pr_lru(dbf); #endif return 1; } int dict_bf_touch(Dict_BFile dbf, int no) { struct Dict_file_block *p; if ((p = find_block(dbf, no))) { p->dirty = 1; return 0; } return -1; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dict/scantest.c0000644000175000017500000001477011412332551013063 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include struct handle_info { int b; int a; int start_cut; int end_cut; char **ar; }; static int handler(char *name, const char *info, int pos, void *client) { struct handle_info *hi = (struct handle_info *) client; int idx; if (pos > 0) idx = hi->a - pos + hi->b; else idx = -pos - 1; yaz_log(YLOG_DEBUG, "pos=%d idx=%d name=%s", pos, idx, name); if (idx < 0) return 0; if (idx < hi->start_cut || idx >= hi->end_cut) { return 1; } hi->ar[idx] = malloc(strlen(name)+1); strcpy(hi->ar[idx], name); return 0; } int do_scan(Dict dict, int before, int after, const char *sterm, char **cmp_strs, int verbose, int start_cut, int end_cut) { struct handle_info hi; char scan_term[1024]; int i; int errors = 0; strcpy(scan_term, sterm); hi.start_cut = start_cut; hi.end_cut = end_cut; hi.a = after; hi.b = before; hi.ar = malloc(sizeof(char*) * (after+before+1)); for (i = 0; i= start_cut && i < end_cut) { if (!hi.ar[i]) { printf ("--> FAIL i=%d hi.ar[i] == NULL\n", i); errors++; } } else { if (hi.ar[i]) { printf ("--> FAIL i=%d hi.ar[i] = %s\n", i, hi.ar[i]); errors++; } } } else { if (i >= start_cut && i < end_cut) { if (!hi.ar[i]) { printf ("--> FAIL i=%d strs == NULL\n", i); errors++; } else if (!cmp_strs[i]) { printf ("--> FAIL i=%d cmp_strs == NULL\n", i); errors++; } else if (strcmp(cmp_strs[i], hi.ar[i])) { printf ("--> FAIL i=%d expected %s\n", i, cmp_strs[i]); errors++; } } else { if (hi.ar[i]) { printf ("--> FAIL i=%d hi.ar[i] != NULL\n", i); errors++; } } } if (verbose || errors) { if (i == hi.b) printf ("* "); else printf (" "); if (hi.ar[i]) printf ("%s", hi.ar[i]); else printf ("NULL"); putchar('\n'); } if (hi.ar[i]) free(hi.ar[i]); } free(hi.ar); return errors; } static void tst(Dict dict, int start, int number) { int i; /* insert again with original value again */ for (i = start; i < number; i += 100) { int v = i; char w[32]; sprintf(w, "%d", i); YAZ_CHECK_EQ(dict_insert(dict, w, sizeof(v), &v), 2); } /* insert again with different value */ for (i = start; i < number; i += 100) { int v = i-1; char w[32]; sprintf(w, "%d", i); YAZ_CHECK_EQ(dict_insert(dict, w, sizeof(v), &v), 1); } /* insert again with original value again */ for (i = start; i < number; i += 100) { int v = i; char w[32]; sprintf(w, "%d", i); YAZ_CHECK_EQ(dict_insert(dict, w, sizeof(v), &v), 1); } { char *cs[] = { "4497", "4498", "4499", "45"}; YAZ_CHECK_EQ(do_scan(dict, 2, 2, "4499", cs, 0, 0, 3), 0); } { char *cs[] = { "4498", "4499", "45", "450"}; YAZ_CHECK_EQ(do_scan(dict, 2, 2, "45", cs, 0, 0, 3), 0); } for (i = 0; i < 20; i++) YAZ_CHECK_EQ(do_scan(dict, 20, 20, "45", 0, 0, 20-i, 20+i), 0); } int main(int argc, char **argv) { BFiles bfs = 0; Dict dict = 0; int i; int ret; int before = 0, after = 0, number = 10000; char scan_term[1024]; char *arg; YAZ_CHECK_INIT(argc, argv); strcpy(scan_term, "1004"); while ((ret = options("b:a:t:n:v:", argv, argc, &arg)) != -2) { switch(ret) { case 0: break; case 'b': before = atoi(arg); break; case 'a': after = atoi(arg); break; case 't': if (strlen(arg) >= sizeof(scan_term)-1) { fprintf(stderr, "scan term too long\n"); exit(1); } strcpy(scan_term, arg); break; case 'n': number = atoi(arg); break; case 'v': yaz_log_init_level(yaz_log_mask_str(arg)); } } bfs = bfs_create(".:100M", 0); YAZ_CHECK(bfs); if (bfs) { bf_reset(bfs); dict = dict_open(bfs, "dict", 10, 1, 0, 0); YAZ_CHECK(dict); } if (dict) { int start = 10; /* Insert "10", "11", "12", .. "99", "100", ... number */ for (i = start; i 0 || before > 0) do_scan(dict, before, after, scan_term, 0, 1, 0, after+1); else tst(dict, start, number); dict_close(dict); } if (bfs) bfs_destroy(bfs); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dict/insert.c0000644000175000017500000003423411412332551012540 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include "dict-p.h" #define CHECK 0 static int dict_ins(Dict dict, const Dict_char *str, Dict_ptr back_ptr, int userlen, void *userinfo); static void clean_page(Dict dict, Dict_ptr ptr, void *p, Dict_char *out, Dict_ptr subptr, char *userinfo); static Dict_ptr new_page(Dict dict, Dict_ptr back_ptr, void **pp) { void *p; Dict_ptr ptr = dict->head.last; if (!dict->head.freelist) { dict_bf_newp(dict->dbf, dict->head.last, &p, dict->head.page_size); (dict->head.last)++; } else { ptr = dict->head.freelist; dict_bf_readp(dict->dbf, ptr, &p); dict->head.freelist = DICT_backptr(p); } assert(p); DICT_type(p) = 0; DICT_backptr(p) = back_ptr; DICT_nodir(p) = 0; DICT_size(p) = DICT_infoffset; DICT_bsize(p) = dict->head.page_size; if (pp) *pp = p; return ptr; } static int split_page(Dict dict, Dict_ptr ptr, void *p) { void *subp; char *info_here; Dict_ptr subptr; int i, j; short *indxp, *best_indxp = NULL; Dict_char best_char = 0; Dict_char prev_char = 0; int best_no = -1, no_current = 1; dict->no_split++; /* determine splitting char... */ indxp = (short*) ((char*) p+DICT_bsize(p)-sizeof(short)); for (i = DICT_nodir(p); --i >= 0; --indxp) { if (*indxp > 0) /* tail string here! */ { Dict_char dc; memcpy(&dc, (char*) p + *indxp, sizeof(dc)); if (best_no < 0) { /* first entry met */ best_char = prev_char = dc; best_no = 1; best_indxp = indxp; } else if (prev_char == dc) { /* same char prefix. update */ if (++no_current > best_no) { /* best entry so far */ best_no = no_current; best_char = dc; best_indxp = indxp; } } else { /* new char prefix. restore */ prev_char = dc; no_current = 1; } } } assert(best_no >= 0); /* we didn't find any tail string entry at all! */ j = best_indxp - (short*) p; subptr = new_page(dict, ptr, &subp); /* scan entries to see if there is a string with */ /* length 1. info_here indicates if such entry exist */ info_here = NULL; for (i=0; i 1); if (slen == 2) { assert(!info_here); info_here = info+slen*sizeof(Dict_char); } else { info1 = info+slen*sizeof(Dict_char); /* info start */ dict_ins(dict, (Dict_char*) (info+sizeof(Dict_char)), subptr, *info1, info1+1); dict_bf_readp(dict->dbf, ptr, &p); } } /* now clean the page ... */ clean_page(dict, ptr, p, &best_char, subptr, info_here); return 0; } static void clean_page(Dict dict, Dict_ptr ptr, void *p, Dict_char *out, Dict_ptr subptr, char *userinfo) { char *np = (char *) xmalloc(dict->head.page_size); int i, slen, no = 0; short *indxp1, *indxp2; char *info1, *info2; DICT_bsize(np) = dict->head.page_size; indxp1 = (short*) ((char*) p+DICT_bsize(p)-sizeof(short)); indxp2 = (short*) ((char*) np+DICT_bsize(np)); info2 = (char*) np + DICT_infoffset; for (i = DICT_nodir(p); --i >= 0; --indxp1) { if (*indxp1 > 0) /* tail string here! */ { /* string (Dict_char *) DICT_EOS terminated */ /* unsigned char length of information */ /* char * information */ info1 = (char*) p + *indxp1; if (out && memcmp(out, info1, sizeof(Dict_char)) == 0) { if (subptr == 0) continue; *--indxp2 = -(info2 - np); memcpy(info2, &subptr, sizeof(Dict_ptr)); info2 += sizeof(Dict_ptr); memcpy(info2, out, sizeof(Dict_char)); info2 += sizeof(Dict_char); if (userinfo) { memcpy(info2, userinfo, *userinfo+1); info2 += *userinfo + 1; } else *info2++ = 0; subptr = 0; ++no; continue; } *--indxp2 = info2 - np; slen = (dict_strlen((Dict_char*) info1)+1)*sizeof(Dict_char); memcpy(info2, info1, slen); info1 += slen; info2 += slen; } else { /* Dict_ptr subptr */ /* Dict_char sub char */ /* unsigned char length of information */ /* char * information */ assert(*indxp1 < 0); *--indxp2 = -(info2 - np); info1 = (char*) p - *indxp1; memcpy(info2, info1, sizeof(Dict_ptr)+sizeof(Dict_char)); info1 += sizeof(Dict_ptr)+sizeof(Dict_char); info2 += sizeof(Dict_ptr)+sizeof(Dict_char); } slen = *info1+1; memcpy(info2, info1, slen); info2 += slen; ++no; } #if 1 memcpy((char*)p+DICT_infoffset, (char*)np+DICT_infoffset, info2 - ((char*)np+DICT_infoffset)); memcpy((char*)p + ((char*)indxp2 - (char*)np), indxp2, ((char*) np+DICT_bsize(p)) - (char*)indxp2); #else memcpy((char*)p+DICT_infoffset, (char*)np+DICT_infoffset, DICT_pagesize(dict)-DICT_infoffset); #endif DICT_size(p) = info2 - np; DICT_type(p) = 0; DICT_nodir(p) = no; xfree(np); dict_bf_touch(dict->dbf, ptr); } /* return 0 if new */ /* return 1 if before but change of info */ /* return 2 if same as before */ static int dict_ins(Dict dict, const Dict_char *str, Dict_ptr ptr, int userlen, void *userinfo) { int hi, lo, mid, slen, cmp = 1; short *indxp; char *info; void *p; dict_bf_readp(dict->dbf, ptr, &p); assert(p); assert(ptr); mid = lo = 0; hi = DICT_nodir(p)-1; indxp = (short*) ((char*) p+DICT_bsize(p)-sizeof(short)); while (lo <= hi) { mid = (lo+hi)/2; if (indxp[-mid] > 0) { /* string (Dict_char *) DICT_EOS terminated */ /* unsigned char length of information */ /* char * information */ info = (char*)p + indxp[-mid]; cmp = dict_strcmp((Dict_char*) info, str); if (!cmp) { info += (dict_strlen((Dict_char*) info)+1)*sizeof(Dict_char); /* consider change of userinfo length... */ if (*info == userlen) { /* change of userinfo ? */ if (memcmp(info+1, userinfo, userlen)) { dict_bf_touch(dict->dbf, ptr); memcpy(info+1, userinfo, userlen); return 1; } /* same userinfo */ return 2; } else if (*info > userlen) { /* room for new userinfo */ DICT_type(p) = 1; *info = userlen; dict_bf_touch(dict->dbf, ptr); memcpy(info+1, userinfo, userlen); return 1; } break; } } else { Dict_char dc; Dict_ptr subptr; /* Dict_ptr subptr */ /* Dict_char sub char */ /* unsigned char length of information */ /* char * information */ info = (char*)p - indxp[-mid]; memcpy(&dc, info+sizeof(Dict_ptr), sizeof(Dict_char)); cmp = dc- *str; if (!cmp) { memcpy(&subptr, info, sizeof(Dict_ptr)); if (*++str == DICT_EOS) { /* finish of string. Store userinfo here... */ int xlen = info[sizeof(Dict_ptr)+sizeof(Dict_char)]; if (xlen == userlen) { if (memcmp(info+sizeof(Dict_ptr)+sizeof(Dict_char)+1, userinfo, userlen)) { dict_bf_touch(dict->dbf, ptr); memcpy(info+sizeof(Dict_ptr)+sizeof(Dict_char)+1, userinfo, userlen); return 1; } return 2; } else if (xlen > userlen) { DICT_type(p) = 1; info[sizeof(Dict_ptr)+sizeof(Dict_char)] = userlen; memcpy(info+sizeof(Dict_ptr)+sizeof(Dict_char)+1, userinfo, userlen); dict_bf_touch(dict->dbf, ptr); return 1; } /* xlen < userlen, expanding needed ... */ if (DICT_size(p)+sizeof(Dict_char)+sizeof(Dict_ptr)+ userlen >= DICT_bsize(p) - (1+DICT_nodir(p))*sizeof(short)) { /* not enough room - split needed ... */ if (DICT_type(p) == 1) { clean_page(dict, ptr, p, NULL, 0, NULL); return dict_ins(dict, str-1, ptr, userlen, userinfo); } if (split_page(dict, ptr, p)) { yaz_log(YLOG_FATAL, "Unable to split page %d\n", ptr); assert(0); } return dict_ins(dict, str-1, ptr, userlen, userinfo); } else { /* enough room - no split needed ... */ info = (char*)p + DICT_size(p); memcpy(info, &subptr, sizeof(subptr)); memcpy(info+sizeof(Dict_ptr), &dc, sizeof(Dict_char)); info[sizeof(Dict_char)+sizeof(Dict_ptr)] = userlen; memcpy(info+sizeof(Dict_char)+sizeof(Dict_ptr)+1, userinfo, userlen); indxp[-mid] = -DICT_size(p); DICT_size(p) += sizeof(Dict_char)+sizeof(Dict_ptr) +1+userlen; DICT_type(p) = 1; dict_bf_touch(dict->dbf, ptr); } if (xlen) return 1; return 0; } else { if (subptr == 0) { subptr = new_page(dict, ptr, NULL); memcpy(info, &subptr, sizeof(subptr)); dict_bf_touch(dict->dbf, ptr); } return dict_ins(dict, str, subptr, userlen, userinfo); } } } if (cmp < 0) lo = mid+1; else hi = mid-1; } indxp = indxp-mid; if (lo>hi && cmp < 0) --indxp; slen = (dict_strlen(str)+1)*sizeof(Dict_char); if (DICT_size(p)+slen+userlen >= (int)(DICT_bsize(p) - (1+DICT_nodir(p))*sizeof(short)))/* overflow? */ { if (DICT_type(p)) { clean_page(dict, ptr, p, NULL, 0, NULL); return dict_ins(dict, str, ptr, userlen, userinfo); } split_page(dict, ptr, p); return dict_ins(dict, str, ptr, userlen, userinfo); } if (cmp) { short *indxp1; (DICT_nodir(p))++; indxp1 = (short*)((char*) p + DICT_bsize(p) - DICT_nodir(p)*sizeof(short)); for (; indxp1 != indxp; indxp1++) indxp1[0] = indxp1[1]; #if CHECK indxp1 = (short*) ((char*) p+DICT_pagesize(dict)-sizeof(short)); for (i = DICT_nodir (p); --i >= 0; --indxp1) { if (*indxp1 < 0) { info = (char*)p - *indxp1; assert (info[sizeof(Dict_ptr)] > ' '); } } #endif } else DICT_type(p) = 1; info = (char*)p + DICT_size(p); memcpy(info, str, slen); info += slen; *info++ = userlen; memcpy(info, userinfo, userlen); info += userlen; *indxp = DICT_size(p); DICT_size(p) = info- (char*) p; dict_bf_touch(dict->dbf, ptr); if (cmp) return 0; return 1; } int dict_insert(Dict dict, const char *str, int userlen, void *userinfo) { if (!dict->rw) return -1; dict->no_insert++; if (!dict->head.root) { void *p; dict->head.root = new_page(dict, 0, &p); if (!dict->head.root) return -1; } return dict_ins(dict, (const Dict_char *) str, dict->head.root, userlen, userinfo); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dict/lookup.c0000644000175000017500000000631211412332551012541 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include "dict-p.h" static char *dict_look(Dict dict, const Dict_char *str, Dict_ptr ptr) { int mid, lo, hi; int cmp; void *p; short *indxp; char *info; dict_bf_readp(dict->dbf, ptr, &p); mid = lo = 0; hi = DICT_nodir(p)-1; indxp = (short*) ((char*) p+DICT_bsize(p)-sizeof(short)); while (lo <= hi) { mid = (lo+hi)/2; if (indxp[-mid] > 0) { /* string (Dict_char *) DICT_EOS terminated */ /* unsigned char length of information */ /* char * information */ info = (char*)p + indxp[-mid]; cmp = dict_strcmp((Dict_char*) info, str); if (!cmp) return info+(dict_strlen ((Dict_char*) info)+1) *sizeof(Dict_char); } else { Dict_char dc; Dict_ptr subptr; /* Dict_ptr subptr */ /* Dict_char sub char */ /* unsigned char length of information */ /* char * information */ info = (char*)p - indxp[-mid]; memcpy(&dc, info+sizeof(Dict_ptr), sizeof(Dict_char)); cmp = dc- *str; if (!cmp) { memcpy(&subptr, info, sizeof(Dict_ptr)); if (*++str == DICT_EOS) { if (info[sizeof(Dict_ptr)+sizeof(Dict_char)]) return info+sizeof(Dict_ptr)+sizeof(Dict_char); return NULL; } else { if (subptr == 0) return NULL; ptr = subptr; dict_bf_readp(dict->dbf, ptr, &p); mid = lo = 0; hi = DICT_nodir(p)-1; indxp = (short*) ((char*) p+DICT_bsize(p)-sizeof(short)); continue; } } } if (cmp < 0) lo = mid+1; else hi = mid-1; } return NULL; } char *dict_lookup(Dict dict, const char *p) { dict->no_lookup++; if (!dict->head.root) return NULL; return dict_look(dict, (const Dict_char *) p, dict->head.root); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dict/dclose.c0000644000175000017500000000226511412332551012504 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include "dict-p.h" int dict_bf_close(Dict_BFile dbf) { dict_bf_flush_blocks(dbf, -1); xfree(dbf->all_blocks); xfree(dbf->all_data); xfree(dbf->hash_array); bf_close(dbf->bf); xfree(dbf); return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dict/lookgrep.c0000644000175000017500000003324111412332551013053 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include "dict-p.h" typedef unsigned MatchWord; #define WORD_BITS 32 #define MAX_LENGTH 1024 /* This code is based * Sun Wu and Udi Manber: Fast Text Searching Allowing Errors. * Communications of the ACM, pp. 83-91, Vol. 35, No. 10, Oct. 1992, USA. * PostScript version of the paper in its submitted form: agrep1.ps) * recommended reading to understand AGREP ! * * http://www.tgries.de/agrep/#AGREP1PS * http://www.tgries.de/agrep/doc/agrep1ps.zip */ typedef struct { int n; /* no of MatchWord needed */ int range; /* max no. of errors */ int fact; /* (range+1)*n */ MatchWord *match_mask; /* match_mask */ } MatchContext; #define INLINE static INLINE void set_bit(MatchContext *mc, MatchWord *m, int ch, int state) { int off = state & (WORD_BITS-1); int wno = state / WORD_BITS; m[mc->n * ch + wno] |= 1<n * ch + wno] & (1<n = (dfa->no_states+WORD_BITS) / WORD_BITS; mc->range = range; mc->fact = (range+1)*mc->n; mc->match_mask = (MatchWord *) xcalloc(mc->n, sizeof(*mc->match_mask)); for (s = 0; sno_states; s++) if (dfa->states[s]->rule_no) set_bit(mc, mc->match_mask, 0, s); return mc; } static void rm_MatchContext(MatchContext **mc) { xfree((*mc)->match_mask); xfree(*mc); *mc = NULL; } static void mask_shift(MatchContext *mc, MatchWord *Rdst, MatchWord *Rsrc, struct DFA *dfa, int ch) { int j, s = 0; MatchWord *Rsrc_p = Rsrc, mask; for (j = 0; jn; j++) Rdst[j] = 0; while (1) { mask = *Rsrc_p++; for (j = 0; jstates[s]; int i = state->tran_no; while (--i >= 0) if (ch >= state->trans[i].ch[0] && ch <= state->trans[i].ch[1]) set_bit(mc, Rdst, 0, state->trans[i].to); } if (mask & 2) { struct DFA_state *state = dfa->states[s+1]; int i = state->tran_no; while (--i >= 0) if (ch >= state->trans[i].ch[0] && ch <= state->trans[i].ch[1]) set_bit(mc, Rdst, 0, state->trans[i].to); } if (mask & 4) { struct DFA_state *state = dfa->states[s+2]; int i = state->tran_no; while (--i >= 0) if (ch >= state->trans[i].ch[0] && ch <= state->trans[i].ch[1]) set_bit(mc, Rdst, 0, state->trans[i].to); } if (mask & 8) { struct DFA_state *state = dfa->states[s+3]; int i = state->tran_no; while (--i >= 0) if (ch >= state->trans[i].ch[0] && ch <= state->trans[i].ch[1]) set_bit(mc, Rdst, 0, state->trans[i].to); } } s += 4; if (s >= dfa->no_states) return; mask >>= 4; } } } static void shift(MatchContext *mc, MatchWord *Rdst, MatchWord *Rsrc, struct DFA *dfa) { int j, s = 0; MatchWord *Rsrc_p = Rsrc, mask; for (j = 0; jn; j++) Rdst[j] = 0; while (1) { mask = *Rsrc_p++; for (j = 0; jstates[s]; int i = state->tran_no; while (--i >= 0) set_bit(mc, Rdst, 0, state->trans[i].to); } if (mask & 2) { struct DFA_state *state = dfa->states[s+1]; int i = state->tran_no; while (--i >= 0) set_bit(mc, Rdst, 0, state->trans[i].to); } if (mask & 4) { struct DFA_state *state = dfa->states[s+2]; int i = state->tran_no; while (--i >= 0) set_bit(mc, Rdst, 0, state->trans[i].to); } if (mask & 8) { struct DFA_state *state = dfa->states[s+3]; int i = state->tran_no; while (--i >= 0) set_bit(mc, Rdst, 0, state->trans[i].to); } } s += 4; if (s >= dfa->no_states) return; mask >>= 4; } } } static void or(MatchContext *mc, MatchWord *Rdst, MatchWord *Rsrc1, MatchWord *Rsrc2) { int i; for (i = 0; in; i++) Rdst[i] = Rsrc1[i] | Rsrc2[i]; } static INLINE int move(MatchContext *mc, MatchWord *Rj1, MatchWord *Rj, Dict_char ch, struct DFA *dfa, MatchWord *Rtmp, int range) { int d; MatchWord *Rtmp_2 = Rtmp + mc->n; mask_shift(mc, Rj1, Rj, dfa, ch); for (d = 1; d <= mc->range; d++) { or(mc, Rtmp, Rj, Rj1); /* 2,3 */ shift(mc, Rtmp_2, Rtmp, dfa); mask_shift(mc, Rtmp, Rj+mc->n, dfa, ch); /* 1 */ or(mc, Rtmp, Rtmp_2, Rtmp); /* 1,2,3*/ Rj1 += mc->n; or(mc, Rj1, Rtmp, Rj); /* 1,2,3,4 */ Rj += mc->n; } return 1; } static int grep(Dict dict, Dict_ptr ptr, MatchContext *mc, MatchWord *Rj, int pos, void *client, int (*userfunc)(char *, const char *, void *), Dict_char *prefix, struct DFA *dfa, int *max_pos, int init_pos) { int lo, hi, d; void *p; short *indxp; char *info; dict_bf_readp(dict->dbf, ptr, &p); lo = 0; hi = DICT_nodir(p)-1; indxp = (short*) ((char*) p+DICT_bsize(p)-sizeof(short)); while (lo <= hi) { if (indxp[-lo] > 0) { /* string (Dict_char *) DICT_EOS terminated */ /* unsigned char length of information */ /* char * information */ int j; int was_match = 0; info = (char*)p + indxp[-lo]; for (j=0; ; j++) { Dict_char ch; MatchWord *Rj0 = Rj + j *mc->fact; MatchWord *Rj1 = Rj + (j+1)*mc->fact; MatchWord *Rj_tmp = Rj + (j+2)*mc->fact; int range; memcpy(&ch, info+j*sizeof(Dict_char), sizeof(Dict_char)); prefix[pos+j] = ch; if (pos+j > *max_pos) *max_pos = pos+j; if (ch == DICT_EOS) { if (was_match) { int ret = userfunc((char*) prefix, info+(j+1)*sizeof(Dict_char), client); if (ret) return ret; } break; } if (pos+j >= init_pos) range = mc->range; else range = 0; move(mc, Rj1, Rj0, ch, dfa, Rj_tmp, range); for (d = mc->n; --d >= 0; ) if (Rj1[range*mc->n + d]) break; if (d < 0) break; was_match = 0; for (d = mc->n; --d >= 0; ) if (Rj1[range*mc->n + d] & mc->match_mask[d]) { was_match = 1; break; } } } else { MatchWord *Rj1 = Rj+ mc->fact; MatchWord *Rj_tmp = Rj+2*mc->fact; Dict_char ch; int range; /* Dict_ptr subptr */ /* Dict_char sub char */ /* unsigned char length of information */ /* char * information */ info = (char*)p - indxp[-lo]; memcpy(&ch, info+sizeof(Dict_ptr), sizeof(Dict_char)); prefix[pos] = ch; if (pos > *max_pos) *max_pos = pos; if (pos >= init_pos) range = mc->range; else range = 0; move(mc, Rj1, Rj, ch, dfa, Rj_tmp, range); for (d = mc->n; --d >= 0; ) if (Rj1[range*mc->n + d]) break; if (d >= 0) { Dict_ptr subptr; if (info[sizeof(Dict_ptr)+sizeof(Dict_char)]) { for (d = mc->n; --d >= 0; ) if (Rj1[range*mc->n + d] & mc->match_mask[d]) { int ret; prefix[pos+1] = DICT_EOS; ret = userfunc((char*) prefix, info+sizeof(Dict_ptr)+ sizeof(Dict_char), client); if (ret) return ret; break; } } memcpy(&subptr, info, sizeof(Dict_ptr)); if (subptr) { int ret = grep(dict, subptr, mc, Rj1, pos+1, client, userfunc, prefix, dfa, max_pos, init_pos); if (ret) return ret; dict_bf_readp(dict->dbf, ptr, &p); indxp = (short*) ((char*) p+DICT_bsize(p)-sizeof(short)); } } } lo++; } return 0; } int dict_lookup_grep(Dict dict, const char *pattern, int range, void *client, int *max_pos, int init_pos, int (*userfunc)(char *name, const char *info, void *client)) { MatchWord *Rj; Dict_char prefix[MAX_LENGTH+1]; const char *this_pattern = pattern; MatchContext *mc; struct DFA *dfa = dfa_init(); int i, d, ret = 0; #if 0 debug_dfa_trav = 1; debug_dfa_tran = 1; debug_dfa_followpos = 1; dfa_verbose = 1; #endif dfa_anyset_includes_nl(dfa); yaz_log(YLOG_DEBUG, "dict_lookup_grep range=%d", range); for (i = 0; pattern[i]; i++) { yaz_log(YLOG_DEBUG, " %2d %3d %c", i, pattern[i], (pattern[i] > ' ' && pattern[i] < 127) ? pattern[i] : '?'); } dfa_set_cmap(dfa, dict->grep_cmap_data, dict->grep_cmap); i = dfa_parse(dfa, &this_pattern); if (i || *this_pattern) { yaz_log(YLOG_WARN, "dfa_parse fail=%d", i); dfa_delete(&dfa); return -1; } dfa_mkstate(dfa); mc = mk_MatchContext(dfa, range); Rj = (MatchWord *) xcalloc((MAX_LENGTH+1) * mc->n, sizeof(*Rj)); set_bit (mc, Rj, 0, 0); for (d = 1; d<=mc->range; d++) { int s; memcpy(Rj + mc->n * d, Rj + mc->n * (d-1), mc->n * sizeof(*Rj)); for (s = 0; s < dfa->no_states; s++) { if (get_bit(mc, Rj, d-1, s)) { struct DFA_state *state = dfa->states[s]; int i = state->tran_no; while (--i >= 0) set_bit(mc, Rj, d, state->trans[i].to); } } } *max_pos = 0; if (dict->head.root) ret = grep(dict, dict->head.root, mc, Rj, 0, client, userfunc, prefix, dfa, max_pos, init_pos); yaz_log(YLOG_DEBUG, "max_pos = %d", *max_pos); dfa_delete(&dfa); xfree(Rj); rm_MatchContext(&mc); return ret; } void dict_grep_cmap(Dict dict, void *vp, const char **(*cmap)(void *vp, const char **from, int len)) { dict->grep_cmap = cmap; dict->grep_cmap_data = vp; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dict/lookupec.c0000644000175000017500000001220711412332551013051 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include "dict-p.h" typedef unsigned MatchWord; typedef struct { MatchWord *s; int m; } MatchInfo; #define SH(x) (((x)<<1)+1) static int lookup_ec(Dict dict, Dict_ptr ptr, MatchInfo *mi, MatchWord *ri_base, int pos, int (*userfunc)(char *), int range, Dict_char *prefix) { int lo, hi; void *p; short *indxp; char *info; MatchWord match_mask = 1<<(mi->m-1); dict_bf_readp(dict->dbf, ptr, &p); lo = 0; hi = DICT_nodir(p)-1; indxp = (short*) ((char*) p+DICT_bsize(p)-sizeof(short)); while (lo <= hi) { if (indxp[-lo] > 0) { /* string (Dict_char *) DICT_EOS terminated */ /* unsigned char length of information */ /* char * information */ MatchWord *ri = ri_base, sc; int i, j; info = (char*)p + indxp[-lo]; for (j=0; ; j++) { Dict_char ch; memcpy(&ch, info+j*sizeof(Dict_char), sizeof(Dict_char)); prefix[pos+j] = ch; if (ch == DICT_EOS) { if (ri[range] & match_mask) (*userfunc)((char*) prefix); break; } if (j+pos >= mi->m+range) break; sc = mi->s[ch & 255]; ri[1+range] = SH(ri[0]) & sc; for (i=1; i<=range; i++) ri[i+1+range] = (SH(ri[i]) & sc) | SH(ri[i-1]) | SH(ri[i+range]) | ri[i-1]; ri += 1+range; if (!(ri[range] & (1<<(pos+j)))) break; } } else { Dict_char ch; MatchWord *ri = ri_base, sc; int i; /* Dict_ptr subptr */ /* Dict_char sub char */ /* unsigned char length of information */ /* char * information */ info = (char*)p - indxp[-lo]; memcpy(&ch, info+sizeof(Dict_ptr), sizeof(Dict_char)); prefix[pos] = ch; sc = mi->s[ch & 255]; ri[1+range] = SH(ri[0]) & sc; for (i=1; i<=range; i++) ri[i+1+range] = (SH(ri[i]) & sc) | SH(ri[i-1]) | SH(ri[i+range]) | ri[i-1]; ri += 1+range; if (ri[range] & (1<dbf, ptr, &p); indxp = (short*) ((char*) p + DICT_bsize(p)-sizeof(short)); } } } lo++; } return 0; } static MatchInfo *prepare_match(Dict_char *pattern) { int i; MatchWord *s; MatchInfo *mi; mi = (MatchInfo *) xmalloc(sizeof(*mi)); mi->m = dict_strlen(pattern); mi->s = s = (MatchWord *) xmalloc(sizeof(*s)*256); /* 256 !!! */ for (i = 0; i < 256; i++) s[i] = 0; for (i = 0; pattern[i]; i++) s[pattern[i]&255] += 1<head.root) return 0; mi = prepare_match((Dict_char*) pattern); ri = (MatchWord *) xmalloc((dict_strlen((Dict_char*) pattern)+range+2) * (range+1)*sizeof(*ri)); for (i = 0; i <= range; i++) ri[i] = (2<head.root, mi, ri, 0, userfunc, range, prefix); xfree(ri); return ret; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dict/dopen.c0000644000175000017500000000506111412332551012335 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #if HAVE_UNISTD_H #include #endif #include #include #include "dict-p.h" static void common_init(Dict_BFile bf, int block_size, int cache) { int i; bf->block_size = block_size; bf->compact_flag = 0; bf->cache = cache; bf->hash_size = 31; bf->hits = bf->misses = 0; /* Allocate all blocks in one chunk. */ bf->all_data = xmalloc(block_size * cache); /* Allocate and initialize hash array (as empty) */ bf->hash_array = (struct Dict_file_block **) xmalloc(sizeof(*bf->hash_array) * bf->hash_size); for (i=bf->hash_size; --i >= 0; ) bf->hash_array[i] = NULL; /* Allocate all block descriptors in one chunk */ bf->all_blocks = (struct Dict_file_block *) xmalloc(sizeof(*bf->all_blocks) * cache); /* Initialize the free list */ bf->free_list = bf->all_blocks; for (i=0; iall_blocks[i].h_next = bf->all_blocks+(i+1); bf->all_blocks[i].h_next = NULL; /* Initialize the data for each block. Will never be moved again */ for (i=0; iall_blocks[i].data = (char*) bf->all_data + i*block_size; /* Initialize lru queue */ bf->lru_back = NULL; bf->lru_front = NULL; } Dict_BFile dict_bf_open(BFiles bfs, const char *name, int block_size, int cache, int rw) { Dict_BFile dbf; dbf = (Dict_BFile) xmalloc(sizeof(*dbf)); dbf->bf = bf_open(bfs, name, block_size, rw); if (!dbf->bf) { xfree(dbf); return 0; } common_init(dbf, block_size, cache); return dbf; } void dict_bf_compact(Dict_BFile dbf) { dbf->compact_flag = 1; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dict/dict-p.h0000644000175000017500000000701711412332551012420 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef DICT_P_H #define DICT_P_H #include #include #include YAZ_BEGIN_CDECL #define DICT_MAGIC "dict01" #define DICT_DEFAULT_PAGESIZE 4096 typedef unsigned char Dict_char; typedef unsigned Dict_ptr; struct Dict_head { char magic_str[8]; int page_size; int compact_flag; Dict_ptr root, last, freelist; }; struct Dict_file_block { struct Dict_file_block *h_next, **h_prev; struct Dict_file_block *lru_next, *lru_prev; void *data; int dirty; int no; int nbytes; }; typedef struct Dict_file_struct { int cache; BFile bf; struct Dict_file_block *all_blocks; struct Dict_file_block *free_list; struct Dict_file_block **hash_array; struct Dict_file_block *lru_back, *lru_front; int hash_size; void *all_data; int block_size; int hits; int misses; int compact_flag; } *Dict_BFile; struct Dict_struct { int rw; Dict_BFile dbf; const char **(*grep_cmap)(void *vp, const char **from, int len); void *grep_cmap_data; /** number of split page operations, since dict_open */ zint no_split; /** number of insert operations, since dict_open */ zint no_insert; /** number of lookup operations, since dict_open */ zint no_lookup; struct Dict_head head; }; int dict_bf_readp (Dict_BFile bf, int no, void **bufp); int dict_bf_newp (Dict_BFile bf, int no, void **bufp, int nbytes); int dict_bf_touch (Dict_BFile bf, int no); void dict_bf_flush_blocks (Dict_BFile bf, int no_to_flush); Dict_BFile dict_bf_open (BFiles bfs, const char *name, int block_size, int cache, int rw); int dict_bf_close (Dict_BFile dbf); void dict_bf_compact (Dict_BFile dbf); int dict_strcmp (const Dict_char *s1, const Dict_char *s2); int dict_strncmp (const Dict_char *s1, const Dict_char *s2, size_t n); int dict_strlen (const Dict_char *s); #define DICT_EOS 0 #define DICT_type(x) 0[(Dict_ptr*) x] #define DICT_backptr(x) 1[(Dict_ptr*) x] #define DICT_bsize(x) 2[(short*)((char*)(x)+2*sizeof(Dict_ptr))] #define DICT_nodir(x) 0[(short*)((char*)(x)+2*sizeof(Dict_ptr))] #define DICT_size(x) 1[(short*)((char*)(x)+2*sizeof(Dict_ptr))] #define DICT_infoffset (2*sizeof(Dict_ptr)+3*sizeof(short)) #define DICT_xxxxpagesize(x) ((x)->head.page_size) #define DICT_to_str(x) sizeof(Dict_info)+sizeof(Dict_ptr) /* type type of page backptr pointer to parent nextptr pointer to next page (if any) nodir no of words size size of strings,info,ptr entries dir[0..nodir-1] ptr,info,string */ YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dict/Makefile.am0000644000175000017500000000115111412332551013114 00000000000000 noinst_LTLIBRARIES = libidzebra-dict.la noinst_PROGRAMS = dicttest dictext check_PROGRAMS = scantest TESTS = $(check_PROGRAMS) AM_CPPFLAGS = -I$(srcdir)/../include $(YAZINC) LDADD = libidzebra-dict.la \ ../bfile/libidzebra-bfile.la \ ../dfa/libidzebra-dfa.la \ ../util/libidzebra-util.la \ $(YAZLALIB) libidzebra_dict_la_SOURCES = dopen.c dclose.c drdwr.c open.c close.c \ insert.c lookup.c lookupec.c lookgrep.c delete.c scan.c dcompact.c \ dict-p.h dicttest_SOURCES = dicttest.c dictext_SOURCES = dictext.c scantest_SOURCES = scantest.c clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf idzebra-2.0.44/dict/dcompact.c0000644000175000017500000001055711412332551013030 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include "dict-p.h" static void dict_copy_page(Dict dict, char *to_p, char *from_p, int *map) { int i, slen, no = 0; short *from_indxp, *to_indxp; char *from_info, *to_info; from_indxp = (short*) ((char*) from_p+DICT_bsize(from_p)); to_indxp = (short*) ((char*) to_p+DICT_bsize(to_p)); to_info = (char*) to_p + DICT_infoffset; for (i = DICT_nodir(from_p); --i >= 0; ) { if (*--from_indxp > 0) /* tail string here! */ { /* string (Dict_char *) DICT_EOS terminated */ /* unsigned char length of information */ /* char * information */ from_info = (char*) from_p + *from_indxp; *--to_indxp = to_info - to_p; slen = (dict_strlen((Dict_char*) from_info)+1)*sizeof(Dict_char); memcpy(to_info, from_info, slen); from_info += slen; to_info += slen; } else { Dict_ptr subptr; Dict_char subchar; /* Dict_ptr subptr */ /* Dict_char sub char */ /* unsigned char length of information */ /* char * information */ *--to_indxp = -(to_info - to_p); from_info = (char*) from_p - *from_indxp; memcpy(&subptr, from_info, sizeof(subptr)); subptr = map[subptr]; from_info += sizeof(Dict_ptr); memcpy(&subchar, from_info, sizeof(subchar)); from_info += sizeof(Dict_char); memcpy(to_info, &subptr, sizeof(Dict_ptr)); to_info += sizeof(Dict_ptr); memcpy(to_info, &subchar, sizeof(Dict_char)); to_info += sizeof(Dict_char); } assert(to_info < (char*) to_indxp); slen = *from_info+1; memcpy(to_info, from_info, slen); to_info += slen; ++no; } DICT_size(to_p) = to_info - to_p; DICT_type(to_p) = 0; DICT_nodir(to_p) = no; } int dict_copy_compact(BFiles bfs, const char *from_name, const char *to_name) { int no_dir = 0; Dict dict_from, dict_to; int *map, i; dict_from = dict_open(bfs, from_name, 0, 0, 0, 4096); if (!dict_from) return -1; map = (int *) xmalloc((dict_from->head.last+1) * sizeof(*map)); for (i = 0; i <= (int)(dict_from->head.last); i++) map[i] = -1; dict_to = dict_open(bfs, to_name, 0, 1, 1, 4096); if (!dict_to) return -1; map[0] = 0; map[1] = dict_from->head.page_size; for (i = 1; i < (int) (dict_from->head.last); i++) { void *buf; int size; #if 0 yaz_log(YLOG_LOG, "map[%d] = %d", i, map[i]); #endif dict_bf_readp(dict_from->dbf, i, &buf); size = ((DICT_size(buf)+sizeof(short)-1)/sizeof(short) + DICT_nodir(buf))*sizeof(short); map[i+1] = map[i] + size; no_dir += DICT_nodir(buf); } #if 0 yaz_log(YLOG_LOG, "map[%d] = %d", i, map[i]); yaz_log(YLOG_LOG, "nodir = %d", no_dir); #endif dict_to->head.root = map[1]; dict_to->head.last = map[i]; for (i = 1; i< (int) (dict_from->head.last); i++) { void *old_p, *new_p; dict_bf_readp(dict_from->dbf, i, &old_p); yaz_log(YLOG_LOG, "dict_bf_newp no=%d size=%d", map[i], map[i+1] - map[i]); dict_bf_newp(dict_to->dbf, map[i], &new_p, map[i+1] - map[i]); DICT_type(new_p) = 0; DICT_backptr(new_p) = map[i-1]; DICT_bsize(new_p) = map[i+1] - map[i]; dict_copy_page(dict_from, (char*) new_p, (char*) old_p, map); } dict_close(dict_from); dict_close(dict_to); return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dict/open.c0000644000175000017500000000704711412332551012177 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include "dict-p.h" void dict_clean(Dict dict) { int page_size = dict->head.page_size; void *head_buf; int compact_flag = dict->head.compact_flag; memset(dict->head.magic_str, 0, sizeof(dict->head.magic_str)); strcpy(dict->head.magic_str, DICT_MAGIC); dict->head.last = 1; dict->head.root = 0; dict->head.freelist = 0; dict->head.page_size = page_size; dict->head.compact_flag = compact_flag; /* create header with information (page 0) */ if (dict->rw) dict_bf_newp(dict->dbf, 0, &head_buf, page_size); } Dict dict_open(BFiles bfs, const char *name, int cache, int rw, int compact_flag, int page_size) { Dict dict; void *head_buf; dict = (Dict) xmalloc(sizeof(*dict)); if (cache < 5) cache = 5; dict->grep_cmap = NULL; page_size = DICT_DEFAULT_PAGESIZE; if (page_size < 2048) { yaz_log(YLOG_WARN, "Page size for dict %s %d<2048. Set to 2048", name, page_size); page_size = 2048; } dict->dbf = dict_bf_open(bfs, name, page_size, cache, rw); dict->rw = rw; dict->no_split = 0; dict->no_insert = 0; dict->no_lookup = 0; if(!dict->dbf) { yaz_log(YLOG_WARN, "Cannot open `%s'", name); xfree(dict); return NULL; } if (dict_bf_readp(dict->dbf, 0, &head_buf) <= 0) { dict->head.page_size = page_size; dict->head.compact_flag = compact_flag; dict_clean(dict); } else /* header was there, check magic and page size */ { memcpy(&dict->head, head_buf, sizeof(dict->head)); if (strcmp(dict->head.magic_str, DICT_MAGIC)) { yaz_log(YLOG_WARN, "Bad magic of `%s'", name); dict_bf_close(dict->dbf); xfree(dict); return 0; } if (dict->head.page_size != page_size) { yaz_log(YLOG_WARN, "Page size for existing dict %s is %d. Current is %d", name, dict->head.page_size, page_size); } } if (dict->head.compact_flag) dict_bf_compact(dict->dbf); return dict; } int dict_strcmp(const Dict_char *s1, const Dict_char *s2) { return strcmp((const char *) s1, (const char *) s2); } int dict_strncmp(const Dict_char *s1, const Dict_char *s2, size_t n) { return strncmp((const char *) s1, (const char *) s2, n); } int dict_strlen(const Dict_char *s) { return strlen((const char *) s); } zint dict_get_no_lookup(Dict dict) { return dict->no_lookup; } zint dict_get_no_insert(Dict dict) { return dict->no_insert; } zint dict_get_no_split(Dict dict) { return dict->no_split; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dict/close.c0000644000175000017500000000244311412332551012336 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include "dict-p.h" int dict_close(Dict dict) { if (!dict) return 0; if (dict->rw) { void *head_buf; dict_bf_readp(dict->dbf, 0, &head_buf); memcpy(head_buf, &dict->head, sizeof(dict->head)); dict_bf_touch(dict->dbf, 0); } dict_bf_close(dict->dbf); xfree(dict); return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dict/scan.c0000644000175000017500000001700411412332551012154 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include "dict-p.h" static void scan_direction(Dict dict, Dict_ptr ptr, int pos, Dict_char *str, int start, int *count, void *client, int (*userfunc)(char *, const char *, int, void *), int dir) { int lo, hi, j; void *p; short *indxp; char *info; dict_bf_readp(dict->dbf, ptr, &p); hi = DICT_nodir(p)-1; if (start != -1) lo = start; else { if (dir == -1) lo = hi; else lo = 0; } indxp = (short*) ((char*) p+DICT_bsize(p)-sizeof(short)); while (lo <= hi && lo >= 0 && *count > 0) { if (indxp[-lo] > 0) { /* string (Dict_char *) DICT_EOS terminated */ /* unsigned char length of information */ /* char * information */ info = (char*)p + indxp[-lo]; for (j = 0; info[j] != DICT_EOS; j++) str[pos+j] = info[j]; str[pos+j] = DICT_EOS; if ((*userfunc)((char*) str, info+(j+1)*sizeof(Dict_char), *count * dir, client)) { *count = 0; } else --(*count); } else { Dict_char dc; Dict_ptr subptr; /* Dict_ptr subptr */ /* Dict_char sub char */ /* unsigned char length of information */ /* char * information */ info = (char*)p - indxp[-lo]; memcpy(&dc, info+sizeof(Dict_ptr), sizeof(Dict_char)); str[pos] = dc; memcpy(&subptr, info, sizeof(Dict_ptr)); if (dir>0 && info[sizeof(Dict_ptr)+sizeof(Dict_char)]) { str[pos+1] = DICT_EOS; if ((*userfunc)((char*) str, info+sizeof(Dict_ptr)+sizeof(Dict_char), *count * dir, client)) { *count = 0; } else --(*count); } if (*count>0 && subptr) { scan_direction(dict, subptr, pos+1, str, -1, count, client, userfunc, dir); dict_bf_readp(dict->dbf, ptr, &p); indxp = (short*) ((char*) p+DICT_bsize(p)-sizeof(short)); } if (*count>0 && dir<0 && info[sizeof(Dict_ptr)+sizeof(Dict_char)]) { str[pos+1] = DICT_EOS; if ((*userfunc)((char*) str, info+sizeof(Dict_ptr)+sizeof(Dict_char), *count * dir, client)) { *count = 0; } else --(*count); } } lo += dir; } } void dict_scan_r(Dict dict, Dict_ptr ptr, int pos, Dict_char *str, int *before, int *after, void *client, int (*userfunc)(char *, const char *, int, void *)) { int cmp = 0, mid, lo, hi; void *p; short *indxp; char *info; dict_bf_readp(dict->dbf, ptr, &p); if (!p) return; mid = lo = 0; hi = DICT_nodir(p)-1; indxp = (short*) ((char*) p+DICT_bsize(p)-sizeof(short)); while (lo <= hi) { mid = (lo+hi)/2; if (indxp[-mid] > 0) { /* string (Dict_char *) DICT_EOS terminated */ /* unsigned char length of information */ /* char * information */ info = (char*)p + indxp[-mid]; cmp = dict_strcmp((Dict_char*) info, str + pos); if (!cmp) { if (*after) { if ((*userfunc)((char *) str, info+ (dict_strlen((Dict_char*) info)+1) *sizeof(Dict_char), *after, client)) { *after = 0; } else --(*after); } break; } } else { Dict_char dc; Dict_ptr subptr; /* Dict_ptr subptr */ /* Dict_char sub char */ /* unsigned char length of information */ /* char * information */ info = (char*)p - indxp[-mid]; memcpy(&dc, info+sizeof(Dict_ptr), sizeof(Dict_char)); cmp = dc - str[pos]; if (!cmp) { memcpy(&subptr, info, sizeof(Dict_ptr)); if (str[pos+1] == DICT_EOS) { if (info[sizeof(Dict_ptr)+sizeof(Dict_char)]) { if (*after) { if ((*userfunc)((char*) str, info+sizeof(Dict_ptr)+ sizeof(Dict_char), *after, client)) { *after = 0; } else --(*after); } } if (*after && subptr) scan_direction(dict, subptr, pos+1, str, -1, after, client, userfunc, 1); } else if (subptr) { dict_scan_r(dict, subptr, pos+1, str, before, after, client, userfunc); } break; } } if (cmp < 0) lo = mid+1; else hi = mid-1; } if (lo>hi && cmp < 0) ++mid; if (*after) scan_direction(dict, ptr, pos, str, cmp ? mid : mid+1, after, client, userfunc, 1); if (*before && mid > 0) scan_direction(dict, ptr, pos, str, mid-1, before, client, userfunc, -1); } int dict_scan(Dict dict, char *str, int *before, int *after, void *client, int (*f)(char *name, const char *info, int pos, void *client)) { int i; yaz_log(YLOG_DEBUG, "dict_scan"); for (i = 0; str[i]; i++) { yaz_log(YLOG_DEBUG, "start_term pos %d %3d %c", i, str[i], (str[i] > ' ' && str[i] < 127) ? str[i] : '?'); } if (!dict->head.root) return 0; dict_scan_r(dict, dict->head.root, 0, (Dict_char *) str, before, after, client, f); return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dict/delete.c0000644000175000017500000001663711412332551012505 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include "dict-p.h" static void dict_del_subtree(Dict dict, Dict_ptr ptr, void *client, int (*f)(const char *, void *)) { void *p = 0; short *indxp; int i, hi; if (!ptr) return; dict_bf_readp(dict->dbf, ptr, &p); indxp = (short*) ((char*) p+DICT_bsize(p)-sizeof(short)); hi = DICT_nodir(p)-1; for (i = 0; i <= hi; i++) { if (indxp[-i] > 0) { /* string (Dict_char *) DICT_EOS terminated */ /* unsigned char length of information */ /* char * information */ char *info = (char*)p + indxp[-i]; if (f) (*f)(info + (dict_strlen((Dict_char*) info)+1) *sizeof(Dict_char), client); } else { Dict_ptr subptr; /* Dict_ptr subptr */ /* Dict_char sub char */ /* unsigned char length of information */ /* char * information */ char *info = (char*)p - indxp[-i]; memcpy(&subptr, info, sizeof(Dict_ptr)); if (info[sizeof(Dict_ptr)+sizeof(Dict_char)]) { if (f) (*f)(info+sizeof(Dict_ptr)+sizeof(Dict_char), client); } if (subptr) { dict_del_subtree(dict, subptr, client, f); /* page may be gone. reread it .. */ dict_bf_readp(dict->dbf, ptr, &p); indxp = (short*) ((char*) p+DICT_bsize(p)-sizeof(short)); } } } DICT_backptr(p) = dict->head.freelist; dict->head.freelist = ptr; dict_bf_touch(dict->dbf, ptr); } static int dict_del_string(Dict dict, const Dict_char *str, Dict_ptr ptr, int sub_flag, void *client, int (*f)(const char *, void *)) { int mid, lo, hi; int cmp; void *p; short *indxp; char *info; int r = 0; Dict_ptr subptr = 0; if (!ptr) return 0; dict_bf_readp(dict->dbf, ptr, &p); mid = lo = 0; hi = DICT_nodir(p)-1; indxp = (short*) ((char*) p+DICT_bsize(p)-sizeof(short)); while (lo <= hi) { mid = (lo+hi)/2; if (indxp[-mid] > 0) { /* string (Dict_char *) DICT_EOS terminated */ /* unsigned char length of information */ /* char * information */ info = (char*)p + indxp[-mid]; cmp = dict_strcmp((Dict_char*) info, str); if (sub_flag) { /* determine if prefix match */ if (!dict_strncmp(str, (Dict_char*) info, dict_strlen(str))) { if (f) (*f)(info + (dict_strlen((Dict_char*) info)+1) *sizeof(Dict_char), client); hi = DICT_nodir(p)-1; while (mid < hi) { indxp[-mid] = indxp[-mid-1]; mid++; } DICT_type(p) = 1; (DICT_nodir(p))--; dict_bf_touch(dict->dbf, ptr); --hi; mid = lo = 0; r = 1; /* signal deleted */ /* start again (may not be the most efficient way to go)*/ continue; } } else { /* normal delete: delete if equal */ if (!cmp) { hi = DICT_nodir(p)-1; while (mid < hi) { indxp[-mid] = indxp[-mid-1]; mid++; } DICT_type(p) = 1; (DICT_nodir(p))--; dict_bf_touch(dict->dbf, ptr); r = 1; break; } } } else { Dict_char dc; /* Dict_ptr subptr */ /* Dict_char sub char */ /* unsigned char length of information */ /* char * information */ info = (char*)p - indxp[-mid]; memcpy(&dc, info+sizeof(Dict_ptr), sizeof(Dict_char)); cmp = dc- *str; if (!cmp) { memcpy(&subptr, info, sizeof(Dict_ptr)); if (*++str == DICT_EOS) { if (info[sizeof(Dict_ptr)+sizeof(Dict_char)]) { /* entry does exist. Wipe it out */ info[sizeof(Dict_ptr)+sizeof(Dict_char)] = 0; DICT_type(p) = 1; dict_bf_touch(dict->dbf, ptr); if (f) (*f)(info+sizeof(Dict_ptr)+sizeof(Dict_char), client); r = 1; } if (sub_flag) { /* must delete all suffixes (subtrees) as well */ hi = DICT_nodir(p)-1; while (mid < hi) { indxp[-mid] = indxp[-mid-1]; mid++; } (DICT_nodir(p))--; DICT_type(p) = 1; dict_bf_touch(dict->dbf, ptr); } } else { /* subptr may be 0 */ r = dict_del_string(dict, str, subptr, sub_flag, client, f); /* recover */ dict_bf_readp(dict->dbf, ptr, &p); indxp = (short*) ((char*) p+DICT_bsize(p)-sizeof(short)); info = (char*)p - indxp[-mid]; if (r == 2) { /* subptr page is empty and already removed */ hi = DICT_nodir(p)-1; while (mid < hi) { indxp[-mid] = indxp[-mid-1]; mid++; } (DICT_nodir(p))--; dict_bf_touch(dict->dbf, ptr); r = 1; } subptr = 0; /* prevent dict_del_subtree (below) */ } break; } } if (cmp < 0) lo = mid+1; else hi = mid-1; } if (DICT_nodir(p) == 0 && ptr != dict->head.root) { DICT_backptr(p) = dict->head.freelist; dict->head.freelist = ptr; dict_bf_touch(dict->dbf, ptr); r = 2; } if (subptr && sub_flag) dict_del_subtree(dict, subptr, client, f); return r; } int dict_delete(Dict dict, const char *p) { return dict_del_string(dict, (const Dict_char*) p, dict->head.root, 0, 0, 0); } int dict_delete_subtree(Dict dict, const char *p, void *client, int (*f)(const char *info, void *client)) { return dict_del_string(dict, (const Dict_char*) p, dict->head.root, 1, client, f); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dict/Makefile.in0000644000175000017500000005213011412336424013133 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = dicttest$(EXEEXT) dictext$(EXEEXT) check_PROGRAMS = scantest$(EXEEXT) subdir = dict DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libidzebra_dict_la_LIBADD = am_libidzebra_dict_la_OBJECTS = dopen.lo dclose.lo drdwr.lo open.lo \ close.lo insert.lo lookup.lo lookupec.lo lookgrep.lo delete.lo \ scan.lo dcompact.lo libidzebra_dict_la_OBJECTS = $(am_libidzebra_dict_la_OBJECTS) PROGRAMS = $(noinst_PROGRAMS) am_dictext_OBJECTS = dictext.$(OBJEXT) dictext_OBJECTS = $(am_dictext_OBJECTS) dictext_LDADD = $(LDADD) am__DEPENDENCIES_1 = dictext_DEPENDENCIES = libidzebra-dict.la ../bfile/libidzebra-bfile.la \ ../dfa/libidzebra-dfa.la ../util/libidzebra-util.la \ $(am__DEPENDENCIES_1) am_dicttest_OBJECTS = dicttest.$(OBJEXT) dicttest_OBJECTS = $(am_dicttest_OBJECTS) dicttest_LDADD = $(LDADD) dicttest_DEPENDENCIES = libidzebra-dict.la \ ../bfile/libidzebra-bfile.la ../dfa/libidzebra-dfa.la \ ../util/libidzebra-util.la $(am__DEPENDENCIES_1) am_scantest_OBJECTS = scantest.$(OBJEXT) scantest_OBJECTS = $(am_scantest_OBJECTS) scantest_LDADD = $(LDADD) scantest_DEPENDENCIES = libidzebra-dict.la \ ../bfile/libidzebra-bfile.la ../dfa/libidzebra-dfa.la \ ../util/libidzebra-util.la $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libidzebra_dict_la_SOURCES) $(dictext_SOURCES) \ $(dicttest_SOURCES) $(scantest_SOURCES) DIST_SOURCES = $(libidzebra_dict_la_SOURCES) $(dictext_SOURCES) \ $(dicttest_SOURCES) $(scantest_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ noinst_LTLIBRARIES = libidzebra-dict.la TESTS = $(check_PROGRAMS) AM_CPPFLAGS = -I$(srcdir)/../include $(YAZINC) LDADD = libidzebra-dict.la \ ../bfile/libidzebra-bfile.la \ ../dfa/libidzebra-dfa.la \ ../util/libidzebra-util.la \ $(YAZLALIB) libidzebra_dict_la_SOURCES = dopen.c dclose.c drdwr.c open.c close.c \ insert.c lookup.c lookupec.c lookgrep.c delete.c scan.c dcompact.c \ dict-p.h dicttest_SOURCES = dicttest.c dictext_SOURCES = dictext.c scantest_SOURCES = scantest.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu dict/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu dict/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libidzebra-dict.la: $(libidzebra_dict_la_OBJECTS) $(libidzebra_dict_la_DEPENDENCIES) $(LINK) $(libidzebra_dict_la_OBJECTS) $(libidzebra_dict_la_LIBADD) $(LIBS) clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list dictext$(EXEEXT): $(dictext_OBJECTS) $(dictext_DEPENDENCIES) @rm -f dictext$(EXEEXT) $(LINK) $(dictext_OBJECTS) $(dictext_LDADD) $(LIBS) dicttest$(EXEEXT): $(dicttest_OBJECTS) $(dicttest_DEPENDENCIES) @rm -f dicttest$(EXEEXT) $(LINK) $(dicttest_OBJECTS) $(dicttest_LDADD) $(LIBS) scantest$(EXEEXT): $(scantest_OBJECTS) $(scantest_DEPENDENCIES) @rm -f scantest$(EXEEXT) $(LINK) $(scantest_OBJECTS) $(scantest_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dclose.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dcompact.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delete.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dictext.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dicttest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dopen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drdwr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/insert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lookgrep.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lookup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lookupec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scantest.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ clean-noinstLTLIBRARIES clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/dict/dicttest.c0000644000175000017500000002267711412332551013067 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include char *prog; static Dict dict; static int look_hits; static int grep_handler (char *name, const char *info, void *client) { look_hits++; printf ("%s\n", name); return 0; } static int scan_handler (char *name, const char *info, int pos, void *client) { printf ("%s\n", name); return 0; } int main (int argc, char **argv) { Res my_resource = 0; BFiles bfs; const char *name = NULL; const char *inputfile = NULL; const char *config = NULL; const char *delete_term = NULL; int scan_the_thing = 0; int do_delete = 0; int range = -1; int srange = 0; int rw = 0; int infosize = 4; int cache = 10; int ret; int unique = 0; char *grep_pattern = NULL; char *arg; int no_of_iterations = 0; int no_of_new = 0, no_of_same = 0, no_of_change = 0; int no_of_hits = 0, no_of_misses = 0, no_not_found = 0, no_of_deleted = 0; int max_pos; prog = argv[0]; if (argc < 2) { fprintf (stderr, "usage:\n " " %s [-d] [-D t] [-S] [-r n] [-p n] [-u] [-g pat] [-s n] " "[-v n] [-i f] [-w] [-c n] config file\n\n", prog); fprintf (stderr, " -d delete instead of insert\n"); fprintf (stderr, " -D t delete subtree instead of insert\n"); fprintf (stderr, " -r n set regular match range\n"); fprintf (stderr, " -p n set regular match start range\n"); fprintf (stderr, " -u report if keys change during insert\n"); fprintf (stderr, " -g p try pattern n (see -r)\n"); fprintf (stderr, " -s n set info size to n (instead of 4)\n"); fprintf (stderr, " -v n set logging level\n"); fprintf (stderr, " -i f read file with words\n"); fprintf (stderr, " -w insert/delete instead of lookup\n"); fprintf (stderr, " -c n cache size (number of pages)\n"); fprintf (stderr, " -S scan the dictionary\n"); exit (1); } while ((ret = options ("D:Sdr:p:ug:s:v:i:wc:", argv, argc, &arg)) != -2) { if (ret == 0) { if (!config) config = arg; else if (!name) name = arg; else { yaz_log (YLOG_FATAL, "too many files specified\n"); exit (1); } } else if (ret == 'D') { delete_term = arg; } else if (ret == 'd') do_delete = 1; else if (ret == 'g') { grep_pattern = arg; } else if (ret == 'r') { range = atoi (arg); } else if (ret == 'p') { srange = atoi (arg); } else if (ret == 'u') { unique = 1; } else if (ret == 'c') { cache = atoi(arg); if (cache<2) cache = 2; } else if (ret == 'w') rw = 1; else if (ret == 'i') inputfile = arg; else if (ret == 'S') scan_the_thing = 1; else if (ret == 's') { infosize = atoi(arg); } else if (ret == 'v') { yaz_log_init (yaz_log_mask_str(arg), prog, NULL); } else { yaz_log (YLOG_FATAL, "Unknown option '-%s'", arg); exit (1); } } if (!config || !name) { yaz_log (YLOG_FATAL, "no config and/or dictionary specified"); exit (1); } my_resource = res_open(0, 0); if (!my_resource) { yaz_log (YLOG_FATAL, "cannot open resource `%s'", config); exit (1); } res_read_file(my_resource, config); bfs = bfs_create (res_get(my_resource, "register"), 0); if (!bfs) { yaz_log (YLOG_FATAL, "bfs_create fail"); exit (1); } dict = dict_open (bfs, name, cache, rw, 0, 4096); if (!dict) { yaz_log (YLOG_FATAL, "dict_open fail of `%s'", name); exit (1); } if (inputfile) { FILE *ipf; char ipf_buf[1024]; int line = 1; char infobytes[120]; memset (infobytes, 0, 120); if (!(ipf = fopen(inputfile, "r"))) { yaz_log (YLOG_FATAL|YLOG_ERRNO, "cannot open %s", inputfile); exit (1); } while (fgets (ipf_buf, 1023, ipf)) { char *ipf_ptr = ipf_buf; sprintf (infobytes, "%d", line); for (;*ipf_ptr && *ipf_ptr != '\n';ipf_ptr++) { if (isalpha(*ipf_ptr) || *ipf_ptr == '_') { int i = 1; while (ipf_ptr[i] && (isalnum(ipf_ptr[i]) || ipf_ptr[i] == '_')) i++; if (ipf_ptr[i]) ipf_ptr[i++] = '\0'; if (rw) { if (do_delete) switch (dict_delete (dict, ipf_ptr)) { case 0: no_not_found++; break; case 1: no_of_deleted++; } else switch(dict_insert (dict, ipf_ptr, infosize, infobytes)) { case 0: no_of_new++; break; case 1: no_of_change++; if (unique) yaz_log (YLOG_LOG, "%s change\n", ipf_ptr); break; case 2: if (unique) yaz_log (YLOG_LOG, "%s duplicate\n", ipf_ptr); no_of_same++; break; } } else if(range < 0) { char *cp; cp = dict_lookup (dict, ipf_ptr); if (cp && *cp) no_of_hits++; else no_of_misses++; } else { look_hits = 0; dict_lookup_grep (dict, ipf_ptr, range, NULL, &max_pos, srange, grep_handler); if (look_hits) no_of_hits++; else no_of_misses++; } ++no_of_iterations; if ((no_of_iterations % 10000) == 0) { printf ("."); fflush(stdout); } ipf_ptr += (i-1); } } ++line; } fclose (ipf); } if (rw && delete_term) { yaz_log (YLOG_LOG, "dict_delete_subtree %s", delete_term); dict_delete_subtree (dict, delete_term, 0, 0); } if (grep_pattern) { if (range < 0) range = 0; yaz_log (YLOG_LOG, "Grepping '%s'", grep_pattern); dict_lookup_grep (dict, grep_pattern, range, NULL, &max_pos, srange, grep_handler); } if (rw) { yaz_log (YLOG_LOG, "Iterations.... %d", no_of_iterations); if (do_delete) { yaz_log (YLOG_LOG, "No of deleted. %d", no_of_deleted); yaz_log (YLOG_LOG, "No not found.. %d", no_not_found); } else { yaz_log (YLOG_LOG, "No of new..... %d", no_of_new); yaz_log (YLOG_LOG, "No of change.. %d", no_of_change); } } else { yaz_log (YLOG_LOG, "Lookups....... %d", no_of_iterations); yaz_log (YLOG_LOG, "No of hits.... %d", no_of_hits); yaz_log (YLOG_LOG, "No of misses.. %d", no_of_misses); } if (scan_the_thing) { char term_dict[1024]; int before = 1000000; int after = 1000000; yaz_log (YLOG_LOG, "dict_scan"); term_dict[0] = 1; term_dict[1] = 0; dict_scan (dict, term_dict, &before, &after, 0, scan_handler); } dict_close (dict); bfs_destroy (bfs); res_close (my_resource); return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dict/dictext.c0000644000175000017500000000555311412332551012702 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include char *prog; int main(int argc, char **argv) { char *arg; int ret; int use8 = 0; char *inputfile = NULL; FILE *ipf = stdin; char ipf_buf[1024]; prog = *argv; while ((ret = options("8vh", argv, argc, &arg)) != -2) { if (ret == 0) { if (!inputfile) inputfile = arg; else { yaz_log(YLOG_FATAL, "too many files specified\n"); exit(1); } } else if (ret == 'v') { yaz_log_init(yaz_log_mask_str(arg), prog, NULL); } else if (ret == 'h') { fprintf(stderr, "usage:\n" " %s [-8] [-h] [-v n] [file]\n", prog); exit(1); } else if (ret == '8') use8 = 1; else { yaz_log(YLOG_FATAL, "Unknown option '-%s'", arg); exit(1); } } if (inputfile) { ipf = fopen(inputfile, "r"); if (!ipf) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "cannot open '%s'", inputfile); exit(1); } } while (fgets(ipf_buf, 1023, ipf)) { char *ipf_ptr = ipf_buf; for (;*ipf_ptr && *ipf_ptr != '\n';ipf_ptr++) { if ((use8 && *ipf_ptr<0) || (*ipf_ptr > 0 && isalpha(*ipf_ptr)) || *ipf_ptr == '_') { int i = 1; while (ipf_ptr[i] && ((use8 && ipf_ptr[i] < 0) || (ipf_ptr[i]>0 && isalnum(ipf_ptr[i])) || ipf_ptr[i] == '_')) i++; if (ipf_ptr[i]) ipf_ptr[i++] = '\0'; printf("%s\n", ipf_ptr); ipf_ptr += (i-1); } } } return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/configure.ac0000644000175000017500000002627411412336353012444 00000000000000dnl This file is part of the Zebra server. dnl Copyright (C) 1994-2009 Index Data dnl AC_PREREQ(2.60) AC_INIT([idzebra],[2.0.44],[zebra-help@indexdata.dk]) AC_CONFIG_SRCDIR(configure.ac) AC_CONFIG_AUX_DIR(config) AM_INIT_AUTOMAKE([1.9]) PACKAGE_SUFFIX="-2.0" AC_SUBST(PACKAGE_SUFFIX) dnl http://www.gnu.org/software/libtool/manual.html#Versioning ZEBRALIBS_VERSION_INFO=0:1:0 AC_SUBST(ZEBRALIBS_VERSION_INFO) main_zebralib=index/libidzebra${PACKAGE_SUFFIX}.la AC_SUBST(main_zebralib) dnl ------ Substitutions AC_SUBST(TCL_INCLUDE) AC_SUBST(TCL_LIB) AC_SUBST(READLINE_LIBS) AC_SUBST(ZEBRA_CFLAGS) dnl dnl ------ Checking programs AC_PROG_CC AC_PROG_CPP AM_PROG_LIBTOOL AC_DEFINE_UNQUOTED(HOST_TRIPLET,"${host}") dnl dnl ------ headers AC_CHECK_HEADERS([sys/resource.h sys/time.h sys/wait.h sys/utsname.h unistd.h]) dnl ------ crypt AC_CHECK_LIB([crypt],[crypt]) if test "$ac_cv_lib_crypt_crypt" = "yes"; then AC_CHECK_HEADERS(crypt.h) fi dnl dnl ------ YAZ YAZ_INIT([server icu],[3.0.17]) if test "$YAZVERSION" = "NONE"; then AC_MSG_ERROR([YAZ development libraries required]) fi YAZ_DOC dnl ------ Look for Tcl dnl See if user has specified location of tclConfig.sh; otherwise dnl see if tclConfig.sh exists in same prefix lcoation as tclsh; otherwise dnl disable Tcl. TCL_LIB="" TCL_INCLUDE="" tclconfig=NONE AC_ARG_WITH(tclconfig, [ --with-tclconfig=DIR tclConfig.sh in DIR], [tclconfig=$withval]) if test "x$tclconfig" = xNONE; then saveprefix=${prefix} AC_PREFIX_PROGRAM(tclsh) tclconfig=${prefix}/lib prefix=${saveprefix} if test ! -r ${tclconfig}/tclConfig.sh; then # Not found, try search for Tcl on Debian systems. for d in /usr/lib/tcl*; do if test -f $d/tclConfig.sh; then tclconfig=$d fi done fi fi AC_MSG_CHECKING(for Tcl) if test -r ${tclconfig}/tclConfig.sh; then . ${tclconfig}/tclConfig.sh if test -r ${tclconfig}/../generic/tcl.h; then TCL_INCLUDE=-I${tclconfig}/../generic TCL_LIB="$TCL_BUILD_LIB_SPEC $TCL_LIBS" elif test -d ${TCL_PREFIX}/include/tcl${TCL_VERSION}; then TCL_INCLUDE=-I${TCL_PREFIX}/include/tcl${TCL_VERSION} TCL_LIB="$TCL_LIB_SPEC $TCL_LIBS" else TCL_INCLUDE=-I${TCL_PREFIX}/include TCL_LIB="$TCL_LIB_SPEC $TCL_LIBS" fi TCL_LIB=`echo $TCL_LIB|sed 's%-L/usr/lib%%g'` SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS SHLIB_LD=$TCL_SHLIB_LD SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX SHLIB_VERSION=$TCL_SHLIB_VERSION AC_MSG_RESULT($TCL_VERSION) old_CPPFLAGS=$CPPFLAGS CPPFLAGS="${TCL_INCLUDE} $CPPFLAGS" AC_CHECK_HEADERS(tcl.h) CPPFLAGS=${old_CPPFLAGS} # The Mac OSX -framework causes problems with Libtool # and dependancy libs.. so apply Tcl libs everywhere bug #461 case $host in *-*-darwin*) LIBS="$LIBS $TCL_LIB"; ;; esac else AC_MSG_RESULT(Not found) AC_DEFINE(HAVE_TCL_H,0) fi dnl dnl ------ various functions AC_CHECK_FUNCS(mkstemp atoll) dnl dnl ------ GNU Readline READLINE_SHARED_LIBADD="" AC_CHECK_LIB(ncurses, tgetent, [READLINE_SHARED_LIBADD="-lncurses"], AC_CHECK_LIB(termcap, tgetent, [READLINE_SHARED_LIBADD="-ltermcap"]) ) READLINE_LIBS="" AC_CHECK_LIB(readline, readline, [READLINE_LIBS="$READLINE_LIBS -lreadline $READLINE_SHARED_LIBADD"],,$READLINE_SHARED_LIBADD) AC_CHECK_LIB(history, add_history, [READLINE_LIBS="$READLINE_LIBS -lhistory"]) if test "$ac_cv_lib_readline_readline" = "yes"; then AC_CHECK_HEADERS(readline/readline.h readline/history.h) xLIBS=$LIBS LIBS="$LIBS $READLINE_LIBS" AC_TRY_LINK([ #include #include ],[ rl_attempted_completion_over = 0; ],AC_DEFINE(HAVE_READLINE_COMPLETION_OVER)) AC_TRY_LINK([ #include #include ],[ rl_completion_matches (0, 0); ],AC_DEFINE(HAVE_READLINE_RL_COMPLETION_MATCHES)) LIBS=$xLIBS fi dnl dnl ------ iconv AC_ARG_WITH(iconv, [ --with-iconv[=DIR] iconv library in DIR]) if test "$with_iconv" != "no"; then AC_MSG_CHECKING(for iconv) oldLIBS="$LIBS" oldCPPFLAGS="${CPPFLAGS}" if test "$with_iconv" != "yes" -a "$with_iconv" != ""; then LIBS="$LIBS -L${with_iconv}/lib" CPPFLAGS="${CPPFLAGS} -I${with_iconv}/include" fi AC_TRY_LINK([ #include ],[ iconv_t t = iconv_open("", ""); ],[ AC_DEFINE(HAVE_ICONV_H) AC_MSG_RESULT(yes) ],[ LIBS="$LIBS -liconv" AC_TRY_LINK([ #include ],[ iconv_t t = iconv_open("", ""); ],[ AC_DEFINE(HAVE_ICONV_H) AC_MSG_RESULT(yes) ],[ LIBS="$oldLIBS" CPPFLAGS="$oldCPPFLAGS" AC_MSG_RESULT(no) ]) ]) fi dnl dnl ------- BZIP2 AC_CHECK_LIB(bz2,bzCompressInit) if test "$ac_cv_lib_bz2_bzCompressInit" = "yes"; then AC_CHECK_HEADERS(bzlib.h) else AC_CHECK_LIB(bz2,BZ2_bzCompressInit) if test "$ac_cv_lib_bz2_BZ2_bzCompressInit" = "yes"; then AC_CHECK_HEADERS(bzlib.h) fi fi dnl dnl ------- zlib AC_CHECK_LIB([z],[compress2]) if test "$ac_cv_lib_z_compress2" = "yes"; then AC_CHECK_HEADERS([zlib.h]) fi dnl ------ -lm AC_CHECK_LIB(m,sqrt) dnl ------ -ldl AC_CHECK_LIB(dl,dlopen) dnl dnl ------ EXPAT expat=yes AC_SUBST(EXPAT_LIBS) AC_ARG_WITH(expat, [ --with-expat[=DIR] EXPAT library in DIR],[expat=$withval]) if test "$expat" != "no"; then xLIBS="$LIBS"; xCFLAGS="$CFLAGS"; if test "$expat" != "yes"; then EXPAT_CFLAGS="-I$expat/include" EXPAT_LIBS="-L$expat/lib" CFLAGS="$EXPAT_CFLAGS $CFLAGS" LIBS="$EXPAT_LIBS $LIBS" fi AC_CHECK_LIB(expat,XML_ParserCreate,[EXPAT_LIBS="$EXPAT_LIBS -lexpat"]) if test "$ac_cv_lib_expat_XML_ParserCreate" = "yes"; then AC_CHECK_HEADERS(expat.h) fi LIBS="$xLIBS" CFLAGS="$xCFLAGS" fi dnl dnl ------- 64 bit files AC_SYS_LARGEFILE AC_CHECK_TYPES([long long]) if test "${ac_cv_type_long_long}" = "yes"; then ZINT_VALUE=1 else ZINT_VALUE=0 fi ZEBRA_CFLAGS="-DZEBRA_ZINT=${ZINT_VALUE}" AC_DEFINE_UNQUOTED(ZEBRA_ZINT,${ZINT_VALUE}) dnl ------ Modules AC_SUBST(SHARED_MODULE_LA) SHARED_MODULE_LA="" AC_SUBST(STATIC_MODULE_OBJ) STATIC_MODULE_OBJ="" AC_SUBST(STATIC_MODULE_LADD) STATIC_MODULE_LADD="" AC_DEFUN([ZEBRA_MODULE],[ AC_ARG_ENABLE(mod-$1,[$3],[myen=$enableval],[myen=$2]) AC_MSG_CHECKING([for module $1]) if test "$myen" = "yes"; then myen="shared" fi if test "$enable_shared" != "yes"; then if test "$myen" = "shared"; then myen="static" fi fi m=`echo $1|tr .- __` if test "$myen" = "no" -o "$myen" = "disabled"; then AC_MSG_RESULT([disabled]) elif test "$2" = "disabled"; then AC_MSG_RESULT([disabled]) AC_MSG_ERROR([Cannot enable mod-$1 because of missing libs (XML, etc)]) elif test "$myen" = "shared"; then AC_MSG_RESULT([shared]) SHARED_MODULE_LA="${SHARED_MODULE_LA} mod-$1.la" elif test "$myen" = "static"; then AC_MSG_RESULT([static]) STATIC_MODULE_OBJ="${STATIC_MODULE_OBJ} \$(mod_${m}_la_OBJECTS)" STATIC_MODULE_LADD="${STATIC_MODULE_LADD} \$(mod_${m}_la_LADD)" modcpp=`echo $1|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_` AC_DEFINE_UNQUOTED([IDZEBRA_STATIC_$modcpp]) else AC_MSG_RESULT([$myen]) AC_MSG_ERROR([invalid --enable-mod-$1 value. Use on,off,static or shared]) fi ]) AC_DEFINE(IDZEBRA_STATIC_GRS_SGML) ZEBRA_MODULE(text,shared, [ --enable-mod-text Text filter]) ZEBRA_MODULE(grs-regx,shared,[ --enable-mod-grs-regx REGX/TCL filter]) ZEBRA_MODULE(grs-marc,shared,[ --enable-mod-grs-marc MARC filter]) if test "$ac_cv_header_expat_h" = "yes"; then def="shared" else def="disabled" fi ZEBRA_MODULE(grs-xml,[$def], [ --enable-mod-grs-xml XML filter (Expat based)]) oldCPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $YAZINC" AC_PREPROC_IFELSE( [AC_LANG_PROGRAM([[ #if YAZ_HAVE_XML2 #include #include #include #include #include #include #else #error Libxml2 not available #endif ]],[[ #if LIBXML_VERSION < 20615 #error Libxml2 version < 2.6.15. xmlreader not reliable/present #endif ]])], [def="shared"], [def="disabled"]) CPPFLAGS=$oldCPPFLAGS ZEBRA_MODULE(dom,[$def], [ --enable-mod-dom XML/XSLT filter (Requires libxslt)]) ZEBRA_MODULE(alvis,[$def], [ --enable-mod-alvis ALVIS filter (Requires libxslt)]) ZEBRA_MODULE(safari,shared,[ --enable-mod-safari Safari filter (DBC)]) dnl ------ ANSI C Header files AC_STDC_HEADERS if test "$ac_cv_header_stdc" = "no"; then AC_MSG_WARN([Your system does not seem to support ANSI C]) fi AC_SUBST(IDZEBRA_SRC_ROOT) AC_SUBST(IDZEBRA_BUILD_ROOT) IDZEBRA_SRC_ROOT=`cd ${srcdir}; pwd` IDZEBRA_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);}'` AC_SUBST([WIN_FILEVERSION]) VERSION_HEX=`echo $PACKAGE_VERSION | $AWK 'BEGIN { FS = "."; } { printf("%x", ($1 * 256 + $2) * 256 + $3);}'` AC_SUBST([VERSION_HEX]) if test -d ${srcdir}/.git; then VERSION_SHA1=`git show --pretty=format:%H|head -1` else VERSION_SHA1=`head -1 ${srcdir}/ChangeLog|awk '{print $2}'` fi AC_SUBST([VERSION_SHA1]) dnl dnl ------ Create Makefiles dnl AC_OUTPUT([ Makefile util/Makefile bfile/Makefile dfa/Makefile dict/Makefile isamb/Makefile isams/Makefile isamc/Makefile rset/Makefile data1/Makefile index/Makefile include/Makefile include/idzebra/Makefile tab/Makefile doc/Makefile doc/local.ent doc/common/Makefile doc/common/print.dsl test/Makefile test/gils/Makefile test/usmarc/Makefile test/api/Makefile test/xslt/Makefile test/xpath/Makefile test/rusmarc/Makefile test/cddb/Makefile test/malxml/Makefile test/mbox/Makefile test/config/Makefile test/xelm/Makefile test/dmoz/Makefile test/zsh/Makefile test/marcxml/Makefile test/charmap/Makefile test/codec/Makefile test/espec/Makefile test/filters/Makefile examples/Makefile examples/gils/Makefile examples/marc21/Makefile examples/marcxml/Makefile examples/oai-pmh/Makefile examples/zthes/Makefile idzebra.spec idzebra-config-2.0 Doxyfile win/version.nsi include/idzebra/version.h ],[sed s%echo_source=yes%echo_source=no%g < idzebra-config-2.0 > util/idzebra-config-2.0 && chmod +x idzebra-config-2.0 util/idzebra-config-2.0]) echo \ "------------------------------------------------------------------------ ZEBRA Package: ${PACKAGE} ZEBRA Version: ${VERSION} Source code location: ${srcdir} C Preprocessor: ${CPP} C Preprocessor flags: ${CPPFLAGS} C Compiler: ${CC} C Compiler flags: ${CFLAGS} Linker flags: ${LDFLAGS} Linked libs: ${LIBS} Host System Type: ${host} Install path: ${prefix} Automake: ${AUTOMAKE} Archiver: ${AR} Ranlib: ${RANLIB} YAZ Version: ${YAZVERSION} YAZ Include: ${YAZINC} YAZ La Lib: ${YAZLALIB} YAZ Lib: ${YAZLIB} Bugreport: ${PACKAGE_BUGREPORT} ------------------------------------------------------------------------" dnl Local Variables: dnl mode:shell-script dnl sh-indentation:2 dnl sh-basic-offset: 4 dnl End: idzebra-2.0.44/doc/0000755000175000017500000000000011412336551010770 500000000000000idzebra-2.0.44/doc/grs-conf.html0000644000175000017500000010442211412336551013317 000000000000003. GRS-1 Record Model Configuration

    3. GRS-1 Record Model Configuration

    The following sections describe the configuration files that govern the internal management of grs records. The system searches for the files in the directories specified by the profilePath setting in the zebra.cfg file.

    3.1. The Abstract Syntax

    The abstract syntax definition (also known as an Abstract Record Structure, or ARS) is the focal point of the record schema description. For a given schema, the ABS file may state any or all of the following:

    • The object identifier of the Z39.50 schema associated with the ARS, so that it can be referred to by the client.

    • The attribute set (which can possibly be a compound of multiple sets) which applies in the profile. This is used when indexing and searching the records belonging to the given profile.

    • The tag set (again, this can consist of several different sets). This is used when reading the records from a file, to recognize the different tags, and when transmitting the record to the client - mapping the tags to their numerical representation, if they are known.

    • The variant set which is used in the profile. This provides a vocabulary for specifying the forms of data that appear inside the records.

    • Element set names, which are a shorthand way for the client to ask for a subset of the data elements contained in a record. Element set names, in the retrieval module, are mapped to element specifications, which contain information equivalent to the Espec-1 syntax of Z39.50.

    • Map tables, which may specify mappings to other database profiles, if desired.

    • Possibly, a set of rules describing the mapping of elements to a MARC representation.

    • A list of element descriptions (this is the actual ARS of the schema, in Z39.50 terms), which lists the ways in which the various tags can be used and organized hierarchically.

    Several of the entries above simply refer to other files, which describe the given objects.

    3.2. The Configuration Files

    This section describes the syntax and use of the various tables which are used by the retrieval module.

    The number of different file types may appear daunting at first, but each type corresponds fairly clearly to a single aspect of the Z39.50 retrieval facilities. Further, the average database administrator, who is simply reusing an existing profile for which tables already exist, shouldn't have to worry too much about the contents of these tables.

    Generally, the files are simple ASCII files, which can be maintained using any text editor. Blank lines, and lines beginning with a (#) are ignored. Any characters on a line followed by a (#) are also ignored. All other lines contain directives, which provide some setting or value to the system. Generally, settings are characterized by a single keyword, identifying the setting, followed by a number of parameters. Some settings are repeatable (r), while others may occur only once in a file. Some settings are optional (o), while others again are mandatory (m).

    3.3. The Abstract Syntax (.abs) Files

    The name of this file type is slightly misleading in Z39.50 terms, since, apart from the actual abstract syntax of the profile, it also includes most of the other definitions that go into a database profile.

    When a record in the canonical, SGML-like format is read from a file or from the database, the first tag of the file should reference the profile that governs the layout of the record. If the first tag of the record is, say, <gils>, the system will look for the profile definition in the file gils.abs. Profile definitions are cached, so they only have to be read once during the lifespan of the current process.

    When writing your own input filters, the record-begin command introduces the profile, and should always be called first thing when introducing a new record.

    The file may contain the following directives:

    name symbolic-name

    (m) This provides a shorthand name or description for the profile. Mostly useful for diagnostic purposes.

    reference OID-name

    (m) The reference name of the OID for the profile. The reference names can be found in the util module of YAZ.

    attset filename

    (m) The attribute set that is used for indexing and searching records belonging to this profile.

    tagset filename

    (o) The tag set (if any) that describe that fields of the records.

    varset filename

    (o) The variant set used in the profile.

    maptab filename

    (o,r) This points to a conversion table that might be used if the client asks for the record in a different schema from the native one.

    marc filename

    (o) Points to a file containing parameters for representing the record contents in the ISO2709 syntax. Read the description of the MARC representation facility below.

    esetname name filename

    (o,r) Associates the given element set name with an element selection file. If an (@) is given in place of the filename, this corresponds to a null mapping for the given element set name.

    all tags

    (o) This directive specifies a list of attributes which should be appended to the attribute list given for each element. The effect is to make every single element in the abstract syntax searchable by way of the given attributes. This directive provides an efficient way of supporting free-text searching across all elements. However, it does increase the size of the index significantly. The attributes can be qualified with a structure, as in the elm directive below.

    elm path name attributes

    (o,r) Adds an element to the abstract record syntax of the schema. The path follows the syntax which is suggested by the Z39.50 document - that is, a sequence of tags separated by slashes (/). Each tag is given as a comma-separated pair of tag type and -value surrounded by parenthesis. The name is the name of the element, and the attributes specifies which attributes to use when indexing the element in a comma-separated list. A ! in place of the attribute name is equivalent to specifying an attribute name identical to the element name. A - in place of the attribute name specifies that no indexing is to take place for the given element. The attributes can be qualified with field types to specify which character set should govern the indexing procedure for that field. The same data element may be indexed into several different fields, using different character set definitions. See the Chapter 10, Field Structure and Character Sets . The default field type is w for word.

    xelm xpath attributes

    Specifies indexing for record nodes given by xpath. Unlike directive elm, this directive allows you to index attribute contents. The xpath uses a syntax similar to XPath. The attributes have same syntax and meaning as directive elm, except that operator ! refers to the nodes selected by xpath.

    melm field$subfield attributes

    This directive is specifically for MARC-formatted records, ingested either in the form of MARCXML documents, or in the ISO2709/Z39.2 format using the grs.marcxml input filter. You can specify indexing rules for any subfield, or you can leave off the $subfield part and specify default rules for all subfields of the given field (note: default rules should come after any subfield-specific rules in the configuration file). The attributes have the same syntax and meaning as for the 'elm' directive above.

    encoding encodingname

    This directive specifies character encoding for external records. For records such as XML that specifies encoding within the file via a header this directive is ignored. If neither this directive is given, nor an encoding is set within external records, ISO-8859-1 encoding is assumed.

    xpath enable/disable

    If this directive is followed by enable, then extra indexing is performed to allow for XPath-like queries. If this directive is not specified - equivalent to disable - no extra XPath-indexing is performed.

    systag systemTag actualTag

    Specifies what information, if any, Zebra should automatically include in retrieval records for the ``system fields'' that it supports. systemTag may be any of the following:

    rank

    An integer indicating the relevance-ranking score assigned to the record.

    sysno

    An automatically generated identifier for the record, unique within this database. It is represented by the <localControlNumber> element in XML and the (1,14) tag in GRS-1.

    size

    The size, in bytes, of the retrieved record.

    The actualTag parameter may be none to indicate that the named element should be omitted from retrieval records.

    Note

    The mechanism for controlling indexing is not adequate for complex databases, and will probably be moved into a separate configuration table eventually.

    The following is an excerpt from the abstract syntax file for the GILS profile.

          name gils
          reference GILS-schema
          attset gils.att
          tagset gils.tag
          varset var1.var
    
          maptab gils-usmarc.map
    
          # Element set names
    
          esetname VARIANT gils-variant.est  # for WAIS-compliance
          esetname B gils-b.est
          esetname G gils-g.est
          esetname F @
    
          elm (1,10)               rank                        -
          elm (1,12)               url                         -
          elm (1,14)               localControlNumber     Local-number
          elm (1,16)               dateOfLastModification Date/time-last-modified
          elm (2,1)                title                       w:!,p:!
          elm (4,1)                controlIdentifier      Identifier-standard
          elm (2,6)                abstract               Abstract
          elm (4,51)               purpose                     !
          elm (4,52)               originator                  - 
          elm (4,53)               accessConstraints           !
          elm (4,54)               useConstraints              !
          elm (4,70)               availability                -
          elm (4,70)/(4,90)        distributor                 -
          elm (4,70)/(4,90)/(2,7)  distributorName             !
          elm (4,70)/(4,90)/(2,10) distributorOrganization     !
          elm (4,70)/(4,90)/(4,2)  distributorStreetAddress    !
          elm (4,70)/(4,90)/(4,3)  distributorCity             !
         

    3.4. The Attribute Set (.att) Files

    This file type describes the Use elements of an attribute set. It contains the following directives.

    name symbolic-name

    (m) This provides a shorthand name or description for the attribute set. Mostly useful for diagnostic purposes.

    reference OID-name

    (m) The reference name of the OID for the attribute set. The reference names can be found in the util module of YAZ.

    include filename

    (o,r) This directive is used to include another attribute set as a part of the current one. This is used when a new attribute set is defined as an extension to another set. For instance, many new attribute sets are defined as extensions to the bib-1 set. This is an important feature of the retrieval system of Z39.50, as it ensures the highest possible level of interoperability, as those access points of your database which are derived from the external set (say, bib-1) can be used even by clients who are unaware of the new set.

    att att-value att-name [local-value]

    (o,r) This repeatable directive introduces a new attribute to the set. The attribute value is stored in the index (unless a local-value is given, in which case this is stored). The name is used to refer to the attribute from the abstract syntax.

    This is an excerpt from the GILS attribute set definition. Notice how the file describing the bib-1 attribute set is referenced.

          name gils
          reference GILS-attset
          include bib1.att
    
          att 2001		distributorName
          att 2002		indextermsControlled
          att 2003		purpose
          att 2004		accessConstraints
          att 2005		useConstraints
         

    3.5. The Tag Set (.tag) Files

    This file type defines the tagset of the profile, possibly by referencing other tag sets (most tag sets, for instance, will include tagsetG and tagsetM from the Z39.50 specification. The file may contain the following directives.

    name symbolic-name

    (m) This provides a shorthand name or description for the tag set. Mostly useful for diagnostic purposes.

    reference OID-name

    (o) The reference name of the OID for the tag set. The reference names can be found in the util module of YAZ. The directive is optional, since not all tag sets are registered outside of their schema.

    type integer

    (m) The type number of the tagset within the schema profile (note: this specification really should belong to the .abs file. This will be fixed in a future release).

    include filename

    (o,r) This directive is used to include the definitions of other tag sets into the current one.

    tag number names type

    (o,r) Introduces a new tag to the set. The number is the tag number as used in the protocol (there is currently no mechanism for specifying string tags at this point, but this would be quick work to add). The names parameter is a list of names by which the tag should be recognized in the input file format. The names should be separated by slashes (/). The type is the recommended data type of the tag. It should be one of the following:

    • structured

    • string

    • numeric

    • bool

    • oid

    • generalizedtime

    • intunit

    • int

    • octetstring

    • null

    The following is an excerpt from the TagsetG definition file.

          name tagsetg
          reference TagsetG
          type 2
    
          tag	1	title		string
          tag	2	author		string
          tag	3	publicationPlace string
          tag	4	publicationDate	string
          tag	5	documentId	string
          tag	6	abstract	string
          tag	7	name		string
          tag	8	date		generalizedtime
          tag	9	bodyOfDisplay	string
          tag	10	organization	string
         

    3.6. The Variant Set (.var) Files

    The variant set file is a straightforward representation of the variant set definitions associated with the protocol. At present, only the Variant-1 set is known.

    These are the directives allowed in the file.

    name symbolic-name

    (m) This provides a shorthand name or description for the variant set. Mostly useful for diagnostic purposes.

    reference OID-name

    (o) The reference name of the OID for the variant set, if one is required. The reference names can be found in the util module of YAZ.

    class integer class-name

    (m,r) Introduces a new class to the variant set.

    type integer type-name datatype

    (m,r) Addes a new type to the current class (the one introduced by the most recent class directive). The type names belong to the same name space as the one used in the tag set definition file.

    The following is an excerpt from the file describing the variant set Variant-1.

          name variant-1
          reference Variant-1
    
          class 1 variantId
    
          type	1	variantId		octetstring
    
          class 2 body
    
          type	1	iana			string
          type	2	z39.50			string
          type	3	other			string
         

    3.7. The Element Set (.est) Files

    The element set specification files describe a selection of a subset of the elements of a database record. The element selection mechanism is equivalent to the one supplied by the Espec-1 syntax of the Z39.50 specification. In fact, the internal representation of an element set specification is identical to the Espec-1 structure, and we'll refer you to the description of that structure for most of the detailed semantics of the directives below.

    Note

    Not all of the Espec-1 functionality has been implemented yet. The fields that are mentioned below all work as expected, unless otherwise is noted.

    The directives available in the element set file are as follows:

    defaultVariantSetId OID-name

    (o) If variants are used in the following, this should provide the name of the variantset used (it's not currently possible to specify a different set in the individual variant request). In almost all cases (certainly all profiles known to us), the name Variant-1 should be given here.

    defaultVariantRequest variant-request

    (o) This directive provides a default variant request for use when the individual element requests (see below) do not contain a variant request. Variant requests consist of a blank-separated list of variant components. A variant component is a comma-separated, parenthesized triple of variant class, type, and value (the two former values being represented as integers). The value can currently only be entered as a string (this will change to depend on the definition of the variant in question). The special value (@) is interpreted as a null value, however.

    simpleElement path ['variant' variant-request]

    (o,r) This corresponds to a simple element request in Espec-1. The path consists of a sequence of tag-selectors, where each of these can consist of either:

    • A simple tag, consisting of a comma-separated type-value pair in parenthesis, possibly followed by a colon (:) followed by an occurrences-specification (see below). The tag-value can be a number or a string. If the first character is an apostrophe ('), this forces the value to be interpreted as a string, even if it appears to be numerical.

    • A WildThing, represented as a question mark (?), possibly followed by a colon (:) followed by an occurrences specification (see below).

    • A WildPath, represented as an asterisk (*). Note that the last element of the path should not be a wildPath (wildpaths don't work in this version).

    The occurrences-specification can be either the string all, the string last, or an explicit value-range. The value-range is represented as an integer (the starting point), possibly followed by a plus (+) and a second integer (the number of elements, default being one).

    The variant-request has the same syntax as the defaultVariantRequest above. Note that it may sometimes be useful to give an empty variant request, simply to disable the default for a specific set of fields (we aren't certain if this is proper Espec-1, but it works in this implementation).

    The following is an example of an element specification belonging to the GILS profile.

          simpleelement (1,10)
          simpleelement (1,12)
          simpleelement (2,1)
          simpleelement (1,14)
          simpleelement (4,1)
          simpleelement (4,52)
         

    3.8. The Schema Mapping (.map) Files

    Sometimes, the client might want to receive a database record in a schema that differs from the native schema of the record. For instance, a client might only know how to process WAIS records, while the database record is represented in a more specific schema, such as GILS. In this module, a mapping of data to one of the MARC formats is also thought of as a schema mapping (mapping the elements of the record into fields consistent with the given MARC specification, prior to actually converting the data to the ISO2709). This use of the object identifier for USMARC as a schema identifier represents an overloading of the OID which might not be entirely proper. However, it represents the dual role of schema and record syntax which is assumed by the MARC family in Z39.50.

    These are the directives of the schema mapping file format:

    targetName name

    (m) A symbolic name for the target schema of the table. Useful mostly for diagnostic purposes.

    targetRef OID-name

    (m) An OID name for the target schema. This is used, for instance, by a server receiving a request to present a record in a different schema from the native one. The name, again, is found in the oid module of YAZ.

    map element-name target-path

    (o,r) Adds an element mapping rule to the table.

    3.9. The MARC (ISO2709) Representation (.mar) Files

    This file provides rules for representing a record in the ISO2709 format. The rules pertain mostly to the values of the constant-length header of the record.

    idzebra-2.0.44/doc/introduction-support.html0000644000175000017500000000625511412336551016041 000000000000004. Support

    4. Support

    You can get support for Zebra from at least three sources.

    First, there's the Zebra web site at http://www.indexdata.com/zebra/, which always has the most recent version available for download. If you have a problem with Zebra, the first thing to do is see whether it's fixed in the current release.

    Second, there's the Zebra mailing list. Its home page at http://lists.indexdata.dk/cgi-bin/mailman/listinfo/zebralist includes a complete archive of all messages that have ever been posted on the list. The Zebra mailing list is used both for announcements from the authors (new releases, bug fixes, etc.) and general discussion. You are welcome to seek support there. Join by filling the form on the list home page.

    Third, it's possible to buy a commercial support contract, with well defined service levels and response times, from Index Data. See http://www.indexdata.com/support/ for details.

    idzebra-2.0.44/doc/indexdata.html0000644000175000017500000000645511412336551013551 00000000000000Appendix C. About Index Data and the Zebra Server

    Appendix C. About Index Data and the Zebra Server

    Index Data is a consulting and software-development enterprise that specializes in library and information management systems. Our interests and expertise span a broad range of related fields, and one of our primary, long-term objectives is the development of a powerful information management system with open network interfaces and hyper-media capabilities.

    We make this software available free of charge, on a fairly unrestrictive license; as a service to the networking community, and to further the development of quality software for open network communication.

    We'll be happy to answer questions about the software, and about ourselves in general.


        Index Data ApS
        Købmagergade 43, 2.
        1150 Copenhagen K
        Denmark
        Phone +45 3341 0100
        Fax +45 3341 0101
        Email 
        
         http://www.indexdata.com/
        

       

    The Random House College Dictionary, 1975 edition offers this definition of the word "Zebra":

    Zebra, n., any of several horselike, African mammals of the genus Equus, having a characteristic pattern of black or dark-brown stripes on a whitish background.

    idzebra-2.0.44/doc/tutorial-oai-sru-pqf.html0000644000175000017500000001024611412336551015605 000000000000002. Searching the OAI database by web service

    2. Searching the OAI database by web service

    Zebra has a build-in web service, which is close to the SRU standard web service. We use it to access our new database using any XML enabled web browser. This service is using the PQF query language. In a later section we show how to run a fully compliant SRU server, including support for the query language CQL

    Searching and retrieving XML records is easy. For example, you can point your browser to one of the following URLs to search for the term the. Just point your browser at this link: http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the

    Warning

    These URLs won't work unless you have indexed the example data and started an Zebra server as outlined in the previous section.

    In case we actually want to retrieve one record, we need to alter our URL to the following http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=dc

    This way we can page through our result set in chunks of records, for example, we access the 6th to the 10th record using the URL http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=6&maximumRecords=5&recordSchema=dc

    idzebra-2.0.44/doc/field-structure.xml0000644000175000017500000004635211412332551014561 00000000000000 Field Structure and Character Sets In order to provide a flexible approach to national character set handling, &zebra; allows the administrator to configure the set up the system to handle any 8-bit character set — including sets that require multi-octet diacritics or other multi-octet characters. The definition of a character set includes a specification of the permissible values, their sort order (this affects the display in the SCAN function), and relationships between upper- and lowercase characters. Finally, the definition includes the specification of space characters for the set. The operator can define different character sets for different fields, typical examples being standard text fields, numerical fields, and special-purpose fields such as WWW-style linkages (URx). Zebra 1.3 and Zebra versions 2.0.18 and earlier required that the field type is a single character, e.g. w (for word), and p for phrase. Zebra 2.0.20 and later allow field types to be any string. This allows for greater flexibility - in particular per-locale (language) fields can be defined. Version 2.1 of Zebra can also be configured - per field - to use the ICU library to perform tokenization and normalization of strings. This is an alternative to the "charmap" files which has been part of Zebra since its first release.
    The default.idx file The field types, and hence character sets, are associated with data elements by the indexing rules (say title:w) in the various filters. Fields are defined in a field definition file which, by default, is called default.idx. This file provides the association between field type codes and the character map files (with the .chr suffix). The format of the .idx file is as follows index field type code This directive introduces a new search index code. The argument is a one-character code to be used in the .abs files to select this particular index type. An index, roughly, corresponds to a particular structure attribute during search. Refer to . sort field code type This directive introduces a sort index. The argument is a one-character code to be used in the .abs fie to select this particular index type. The corresponding use attribute must be used in the sort request to refer to this particular sort index. The corresponding character map (see below) is used in the sort process. completeness boolean This directive enables or disables complete field indexing. The value of the boolean should be 0 (disable) or 1. If completeness is enabled, the index entry will contain the complete contents of the field (up to a limit), with words (non-space characters) separated by single space characters (normalized to " " on display). When completeness is disabled, each word is indexed as a separate entry. Complete subfield indexing is most useful for fields which are typically browsed (e.g., titles, authors, or subjects), or instances where a match on a complete subfield is essential (e.g., exact title searching). For fields where completeness is disabled, the search engine will interpret a search containing space characters as a word proximity search. firstinfield boolean This directive enables or disables first-in-field indexing. The value of the boolean should be 0 (disable) or 1. alwaysmatches boolean This directive enables or disables alwaysmatches indexing. The value of the boolean should be 0 (disable) or 1. charmap filename This is the filename of the character map to be used for this index for field type. See for details. icuchain filename Specifies the filename with ICU tokenization and normalization rules. See for details. Using icuchain for a field type is an alternative to charmap. It does not make sense to define both icuchain and charmap for the same field type. Field types Following are three excerpts of the standard tab/default.idx configuration file. Notice that the index and sort are grouping directives, which bind all other following directives to them: # Traditional word index # Used if completeness is 'incomplete field' (@attr 6=1) and # structure is word/phrase/word-list/free-form-text/document-text index w completeness 0 position 1 alwaysmatches 1 firstinfield 1 charmap string.chr ... # Null map index (no mapping at all) # Used if structure=key (@attr 4=3) index 0 completeness 0 position 1 charmap @ ... # Sort register sort s completeness 1 charmap string.chr
    Charmap Files The character map files are used to define the word tokenization and character normalization performed before inserting text into the inverse indexes. &zebra; ships with the predefined character map files tab/*.chr. Users are allowed to add and/or modify maps according to their needs. Character maps predefined in &zebra; File name Intended type Description numeric.chr :n Numeric digit tokenization and normalization map. All characters not in the set -{0-9}., will be suppressed. Note that floating point numbers are processed fine, but scientific exponential numbers are trashed. scan.chr :w or :p Word tokenization char map for Scandinavian languages. This one resembles the generic word tokenization character map tab/string.chr, the main differences are sorting of the special characters üzæäøöå and equivalence maps according to Scandinavian language rules. string.chr :w or :p General word tokenization and normalization character map, mostly useful for English texts. Use this to derive your own language tokenization and normalization derivatives. urx.chr :u URL parsing and tokenization character map. @ :0 Do-nothing character map used for literal binary indexing. There is no existing file associated to it, and there is no normalization or tokenization performed at all.
    The contents of the character map files are structured as follows: encoding encoding-name This directive must be at the very beginning of the file, and it specifies the character encoding used in the entire file. If omitted, the encoding ISO-8859-1 is assumed. For example, one of the test files found at test/rusmarc/tab/string.chr contains the following encoding directive: encoding koi8-r and the test file test/charmap/string.utf8.chr is encoded in UTF-8: encoding utf-8 lowercase value-set This directive introduces the basic value set of the field type. The format is an ordered list (without spaces) of the characters which may occur in "words" of the given type. The order of the entries in the list determines the sort order of the index. In addition to single characters, the following combinations are legal: Backslashes may be used to introduce three-digit octal, or two-digit hex representations of single characters (preceded by x). In addition, the combinations \\, \\r, \\n, \\t, \\s (space — remember that real space-characters may not occur in the value definition), and \\ are recognized, with their usual interpretation. Curly braces {} may be used to enclose ranges of single characters (possibly using the escape convention described in the preceding point), e.g., {a-z} to introduce the standard range of ASCII characters. Note that the interpretation of such a range depends on the concrete representation in your local, physical character set. parentheses () may be used to enclose multi-byte characters - e.g., diacritics or special national combinations (e.g., Spanish "ll"). When found in the input stream (or a search term), these characters are viewed and sorted as a single character, with a sorting value depending on the position of the group in the value statement. For example, scan.chr contains the following lowercase normalization and sorting order: lowercase {0-9}{a-y}üzæäøöå uppercase value-set This directive introduces the upper-case equivalences to the value set (if any). The number and order of the entries in the list should be the same as in the lowercase directive. For example, scan.chr contains the following uppercase equivalent: uppercase {0-9}{A-Y}ÜZÆÄØÖÅ space value-set This directive introduces the character which separate words in the input stream. Depending on the completeness mode of the field in question, these characters either terminate an index entry, or delimit individual "words" in the input stream. The order of the elements is not significant — otherwise the representation is the same as for the uppercase and lowercase directives. For example, scan.chr contains the following space instruction: ?@\[\\]^_`\{|}~ ]]> map value-set target This directive introduces a mapping between each of the members of the value-set on the left to the character on the right. The character on the right must occur in the value set (the lowercase directive) of the character set, but it may be a parenthesis-enclosed multi-octet character. This directive may be used to map diacritics to their base characters, or to map HTML-style character-representations to their natural form, etc. The map directive can also be used to ignore leading articles in searching and/or sorting, and to perform other special transformations. For example, scan.chr contains the following map instructions among others, to make sure that HTML entity encoded Danish special characters are mapped to the equivalent Latin-1 characters: In addition to specifying sort orders, space (blank) handling, and upper/lowercase folding, you can also use the character map files to make &zebra; ignore leading articles in sorting records, or when doing complete field searching. This is done using the map directive in the character map file. In a nutshell, what you do is map certain sequences of characters, when they occur in the beginning of a field, to a space. Assuming that the character "@" is defined as a space character in your file, you can do: map (^The\s) @ map (^the\s) @ The effect of these directives is to map either 'the' or 'The', followed by a space character, to a space. The hat ^ character denotes beginning-of-field only when complete-subfield indexing or sort indexing is taking place; otherwise, it is treated just as any other character. Because the default.idx file can be used to associate different character maps with different indexing types -- and you can create additional indexing types, should the need arise -- it is possible to specify that leading articles should be ignored either in sorting, in complete-field searching, or both. If you ignore certain prefixes in sorting, then these will be eliminated from the index, and sorting will take place as if they weren't there. However, if you set the system up to ignore certain prefixes in searching, then these are deleted both from the indexes and from query terms, when the client specifies complete-field searching. This has the effect that a search for 'the science journal' and 'science journal' would both produce the same results. equivalent value-set This directive introduces equivalence classes of characters and/or strings for sorting purposes only. It resembles the map directive, but does not affect search and retrieval indexing, but only sorting order under present requests. For example, scan.chr contains the following equivalent sorting instructions, which can be uncommented:
    ICU Chain Files The ICU chain files defines a chain of rules which specify the conversion process to be carried out for each record string for indexing. Both searching and sorting is based on the sort normalization that ICU provides. This means that scan and sort will return terms in the sort order given by ICU. Zebra is using YAZ' ICU wrapper. Refer to the yaz-icu man page for documentation about the ICU chain rules. Use the yaz-icu program to test your icuchain rules. Indexing Greek text Consider a system where all "regular" text is to be indexed using as Greek (locale: EL). We would have to change our index type file - to read # Index greek words index w completeness 0 position 1 alwaysmatches 1 firstinfield 1 icuahain greek.xml .. The ICU chain file greek.xml could look as follows: ]]> Zebra is shipped with a field types file icu.idx which is an ICU chain version of default.idx. MARCXML indexing using ICU The directory examples/marcxml includes a complete sample with MARCXML records that are DOM XML indexed using ICU chain rules. Study the README in the marcxml directory for details.
    idzebra-2.0.44/doc/special-retrieval.html0000644000175000017500000002123511412336551015214 000000000000004. Retrieval of Zebra internal record data

    4. Retrieval of Zebra internal record data

    Starting with Zebra version 2.0.5 or newer, it is possible to use a special element set which has the prefix zebra::.

    Using this element will, regardless of record type, return Zebra's internal index structure/data for a record. In particular, the regular record filters are not invoked when these are in use. This can in some cases make the retrieval faster than regular retrieval operations (for MARC, XML etc).

    Table 4.1. Special Retrieval Elements

    Element SetDescriptionSyntax
    zebra::meta::sysnoGet Zebra record system IDXML and SUTRS
    zebra::dataGet raw recordall
    zebra::metaGet Zebra record internal metadataXML and SUTRS
    zebra::indexGet all indexed keys for recordXML and SUTRS
    zebra::index::f Get indexed keys for field f for record XML and SUTRS
    zebra::index::f:t Get indexed keys for field f and type t for record XML and SUTRS
    zebra::snippet Get snippet for record for one or more indexes (f1,f2,..). This includes a phrase from the original record at the point where a match occurs (for a query). By default give terms before - and after are included in the snippet. The matching terms are enclosed within element <s>. The snippet facility requires Zebra 2.0.16 or later. XML and SUTRS
    zebra::facet::f1:t1,f2:t2,.. Get facet of a result set. The facet result is returned as if it was a normal record, while in reality is a recap of most "important" terms in a result set for the fields given. The facet facility first appeared in Zebra 2.0.20. XML

    For example, to fetch the raw binary record data stored in the zebra internal storage, or on the filesystem, the following commands can be issued:

          Z> f @attr 1=title my
          Z> format xml
          Z> elements zebra::data
          Z> s 1+1
          Z> format sutrs
          Z> s 1+1
          Z> format usmarc
          Z> s 1+1
        

    The special zebra::data element set name is defined for any record syntax, but will always fetch the raw record data in exactly the original form. No record syntax specific transformations will be applied to the raw record data.

    Also, Zebra internal metadata about the record can be accessed:

          Z> f @attr 1=title my
          Z> format xml
          Z> elements zebra::meta::sysno
          Z> s 1+1
        

    displays in XML record syntax only internal record system number, whereas

          Z> f @attr 1=title my
          Z> format xml
          Z> elements zebra::meta
          Z> s 1+1
        

    displays all available metadata on the record. These include system number, database name, indexed filename, filter used for indexing, score and static ranking information and finally bytesize of record.

    Sometimes, it is very hard to figure out what exactly has been indexed how and in which indexes. Using the indexing stylesheet of the Alvis filter, one can at least see which portion of the record went into which index, but a similar aid does not exist for all other indexing filters.

    The special zebra::index element set names are provided to access information on per record indexed fields. For example, the queries

          Z> f @attr 1=title my
          Z> format sutrs
          Z> elements zebra::index
          Z> s 1+1
        

    will display all indexed tokens from all indexed fields of the first record, and it will display in SUTRS record syntax, whereas

          Z> f @attr 1=title my
          Z> format xml
          Z> elements zebra::index::title
          Z> s 1+1
          Z> elements zebra::index::title:p
          Z> s 1+1
        

    displays in XML record syntax only the content of the zebra string index title, or even only the type p phrase indexed part of it.

    Note

    Trying to access numeric BIB-1 use attributes or trying to access non-existent zebra intern string access points will result in a Diagnostic 25: Specified element set 'name not valid for specified database.

    idzebra-2.0.44/doc/gpl.html0000644000175000017500000001567611412336551012377 00000000000000Appendix B. GNU General Public License

    Appendix B. GNU General Public License

    Version 2, June 1991

    Free Software Foundation, Inc.
              51 Franklin Street, Fifth Floor,
              BostonMA 02110-1301
              USA
            

    Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

    Version 2, June 1991

    1. Preamble

    The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software - to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.

    When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.

    To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.

    For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

    We protect your rights with two steps:

    1. copyright the software, and

    2. offer you this license which gives you legal permission to copy, distribute and/or modify the software.

    Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.

    Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.

    The precise terms and conditions for copying, distribution and modification follow.

    idzebra-2.0.44/doc/domfilter.png0000644000175000017500000011427511412336537013421 00000000000000‰PNG  IHDRXPcÝ,sBIT|dˆ pHYs°°ç,'¦tEXtSoftwarewww.inkscape.org›î< IDATxœìÝw|MçÀñÏɘ1k…ÚÕZÑ*‰™A´1ªVÚ ågÖžU»F•(¥¢jGm±+AŠÚJh؉DÌŒç÷ǽ¹n"HâÆMø¾_¯óÊ=ç<ç9Ï9®{¿÷YGSJ!„B!LÇÂÜB!„xÛH€%„Bab` !„B˜˜XB!„&&–B!„‰I€%„Bab` !„B˜˜•¹ DF¦iZ-ÀP@$p¸­”Š}ÅqÙ€òÀ‡@p øG%š˜NÓ´Ê€~5\)õw¢ý¥ÂúÕ§J©/8ŸPY¿ª”úç×ñH)uPÓ´¼úòÅûK)uß(½ àd´ÿŒRê¦~_mt?Þž+ïËhšö ý»ÿUJý«iš-°\¿m‘RêOMÓr‹ôÛ~VJù%÷œiEÓ´r@>ýê ¥ÔYçßh ÜWJ}õ’tU¡úÕÿ)¥.™²Bˆ—PJÉ"‹,©\€‡è‚+ã%8 x&‘Þè „'q\ P1QúFûï9ŒöiÀ£ý7_RNkà/}º;@~£}=Œòè«ßÖ4QÙ'ʯs¢ýíö=ÑoÛ•Â{œÄ=‰_ÆéÓd3ÚÖ_¿­ Ñ¶nFùþ&¼á÷„pÕ¨L!ipŽYú¼ï¾"ÝgF娬ßö¾þ¾ü |™†÷á¸þãßäý—E–ô²H¡¦ñÝÊ-t5A¾š¦ý’(ÝwÀÏ@Nà20XÄŽÀMÓŠ¼àÙ€ŽFëõ€²É)œR*è€.øÉ£?/𦕦ê“3_EOMÓ,Ö{'缩 üh¹®ß÷è¤_¶¾"Ÿ¢è‚‰Ÿ£«Éèƒîßέ”Úñ’òwÐÿ½„.€É«ß¶Ï(ï2MtÁÑ9tM¯G·0º÷`9}ºÿ€%ÀI`,ÏÞ.F÷`tׯSJ]Óç7°¶(¥Vè·Åç Äí”R_è÷WE÷þÝœ `šRê!B˜›¹«Ðd‘%#/DT§9XêÓ%h"äù¦Ýø%FŸÞ5Ú¡ÿ ´6*¿º€&q>KÐz/ºÿ•€vFëåŒòŒÒo›b´->ÝatMï ]?Ðq<û?ÿ~þ°3÷gƒ,²H¡i@)ŒîCt5Y û•/©NÏgô³¡k^Il–þo/ýbü‚®Ù,¹åŠEW›ò˜g£ˆ·+¥¼_rØjtMtn𦹣 ¾"ÐiÁØh©‚ãÿALDê××ê×+£»ïýÐÕD4rÿÓ¯Ð4íÓ$ò, OÓ] ü"-Ìú×è—økò|Á1åÑÕZºË4MkŽ.Ø TGפÜ]@m,3º÷Mà'ý¶²è‚œ¤øMŒÖÇ¢»/Ÿè×g¢ Xï¡«9Ëü†®µcަivš¦Y‹ÑÕPÝE÷Ã!·þ:6 «ñªŒ.`Ýû'þþŸ{A¹^¥ °ð†êkƒ'¡ë‡øðP Ý¿yi`\*Ï#„ÉH¡铖Ķeè¾T¡«¹ˆEWC2)…y2¯kš–I)õôéŸêÏ3Ý—œ%ð+ºŒ´‹®™ÉX²Ï¥”z Ó4-~$ç¥Ô±øýš¦¹è_†µõK|s–ÔAWcblRje2NßQÿ÷”Rꄦip ]Ÿ¬ö<il©Rj€Qùæí¬”Š¿k_pÎAJ©Sú¦½^úmEÑ jH@)¦iÚ£MWŒï ÏšCÑ5¡Â³¦Ö\èj î¢«é]³êoú×á¼ê<™m7®Œè\I¸%ö¢{Ð4‰²æ}I^B¼` a•5M;¨iÚ5àÏj£(ýÈ4¥ÔEt£Û@WƒuLÓ´Ùš¦­àYðò$¾àã)݈«O€jJ©€”Pߪ‡~ušÒMJÚÝt–Àoš¦%þ246Ýä¢]^’ÆØ'š¦%Z:§¤Ì¯)¾†ð3MÓhš?ÅtµpùÑ÷yÒ4­‰¦iCÐõª”Òé›ã¬3@ëDËEý¾Ïýœ¥<ëWç£iÚOš¦õÔ4m•~ÔÜkQJ…ò¬/TMÓæhš?"uþo]MÓfhšÖPÓ´/4M› \Ñ•gSd4Ð4m‡¦ißhšö½Ñ=†g÷ßSÿ§è×O¥™©iÚ<û’\þ< ²¦jšö­¦iu5Më¢iÚFt?$„0/s÷²—E–Œ¼ðâ‰FOM’Ho®ŸLdÇ¥7Œ"|I–ñŠQ„èšö®èÓlŒö¹òl4Ö ý6ãQ„µ_ge£4I"Ljù’2Æ"¼ý’4)™hÔ ¸`´ï‰Ñ¾^è!$._ú‘m"LÆûÀÅ(Iìk´ß„£]“HßÝ4¯Ex×è˜Ò}¡ßöÜD£úíß ›³-~ß>ývKtÍ¿1Iœû–ÑñÐYÏ"4JS1Ú÷Èhß›Å³ÿKI"•Ä=ªÈ³‘·ÆKº©4Ìþù Ë»½ÄB¤Â •sK)õÒæ}ó  •sR%zÄŽÑ£r"U¢yˆŒÒ|ˆ®6æeÊÉϳZµ JW a¼¿ ºà%Ø‹n^£øGåUI4‘éûÍTѯ&õ¨œ¤\RJ=׿L\ü£r^v–è‚Ãuhš– ÝH;€sJ©ë‰Ž)â”R{Œ¶çª¡k2½.RúÎþú‘jÅ”Rþ/¸§Ž(¥"íÏͳ&àÐ5“Å?ºè˜Òχ–è˜lúë2žë°R*VßßˈVJí7JÿïqJ)u[Ó´<<¬”Š2Êß]m¡”:j´¯º€ÍÝÈÅ3èÞ ¾0ôïOãy°ö(¥Â¥ù]«”ګߦõõ÷ì RêˆÑÿ¥ËJWÛ‹¦iÎúl’|ßèßÕÑеA7ƒ~Pü{Qs’K!„ÂĤ–B!„‰I€%„Bab` !„B˜˜XB!„&&–B!„‰I€%„Bab` !„B˜˜XB!„&&–B!„‰I€%„Bab` !„B˜˜XB!„&&–B!„‰I€%„Bab` !„B˜˜XB!„&&–B!„‰I€%„Bab` !„B˜˜XB!„&&–B!„‰I€%„Bab` !„B˜˜XB!„&&–B!„‰Y™»"å4M«dccãkee•.ÿýâââ¬eaacî²!DZRJY*¥,,,,¢Í]–¤ÄÆÆÆ>~üø+¥Ô>s—å]“.¿ Å+e~òäIñyóæ™»Iš5k ä‹/¾0wQ„"MùùùqäȾûî;s%I^^^1@6s—ã]$VÖ±cGs!IëÖ­£lÙ²é¶|Ba*÷îÝ#444Ý~Þýïÿ‹}øð¡¹‹ñN’>XB!„&&–B!„‰I€%„Bab` !„B˜˜XB!„&&–B!„‰I€%„Bab` !„B˜˜XB!„&&–B!„‰I€%„Bab` !„B˜X²ö¬išà’†eIoö)¥î˜»B!„Èx’`Åßüùó?J«Â¤7oÞÌŒ.˜ô7sQ„B‘¥$ÀàÆ™Ó¢ éI¦L™â¢££Í] !„BdPÒK!„ÂÄR\ƒ%„éA«V­Ì]„óööÆÎÎÎÜÅB¼` !2¤+Vðå—_R @så•>|È/¿üÂŒ3$Àâ!–"ÃêÛ·/ŽŽŽæ.Æ+ݸqƒ_~ùÅÜÅB¼AÒK!„ÂÄ$ÀB!„01i"BdhJ)V¯^M`` –––xxxàâò.͉,„H$ÀBdh-[¶$""‚îÝ»“3gN.\HéÒ¥±··7wÑ„ï0 °„Ö±cÇØ³gׯ_ÇÂB×ãÁÍÍ €ðË/¿°eËœœœðòò"_¾|Lž<Ö¯_­­-sçÎeÔ¨Q\½z•P¿~}Ž9‚¯¯/!!!ü÷ß :”+W®ðÇP§NÆŽ ÀñãÇùé§Ÿ¸}û6íÚµ£yóæ>>ÔªU‹íÛ·³aÃ._¾üænŠ"]Hq€5~üx¶lÙ’äz½zõ˜={¶aß­[·pqqaíÚµ >œ¿ÿþû…yÇÅÅ1qâDÜÜÜptt¤wïÞüûï¿üùçŸ)-ªâ¶~ýzºt邵µ5]ºtIð¹ÕªU+lmm Ÿ5Å‹§páÂDEEñôéS@WV¤HJ–,I¾|ùøú믱¶¶ÆÉɉÇséÒ%²fÍJåʕɓ'-[¶dýúõ)R„† bccC­Zµ6Ë=B˜OЬ:ð¿ÿý°°0öíÛÇæÍ›qwwàСC,_¾œ¸¸8@÷ 244”«W¯pòäIîÝ»÷¼׭[ÇñãÇÙ¸q#0T«_ºt)É+:::A~=ÿê{÷îñäÉ“$ÏaxýäÉbbb^uùBˆt¤\¹rlذÁð™c,Ož<†Ï‡û÷ï“#Gþ¬Y³`eeE¶lÙ Û-,,ˆMÀÚÚš,Y²`iiILL vvvDEEÒÜ»wXEŠaРAtïÞsçαbÅ ,--Ð4 vìØ»»;k×®åóÏ?OvÞ/^$[¶lXYYaaaAÕªU˜;w.ÁÁÁ´jÕŠ®]»È¡C‡¸yó&;v¤jÕªL™2…èèh,--™>}:öööôë×ÐÐP}(Z´(uëÖeÀ€TªT‰ž={âããï¿þ @`` ™2eâàÁƒ4oÞœ‰'Rºti|}}Y¼x1ÇgúôéDFFÒ²eKÂÂÂÈ;7‘‘‘Œ1‚òåËãééÉÉ“'Ù¶m7ndùòå)¾š¦ 4`;ð·RJ¥8!Dª¬ZµŠeË–±wï^¬­­éܹ3öööØÛÛS¼xqV¯^M‡pvvàóÏ?§xñâ.\8Aàååå…µµ5%J”à³Ï>3lïÕ«—áuíÚµ µ[›6mbÕªUãïïOž·¯råÊT®\9Á6ãZõÂ… S¸paÃz|`T¼xqC ¬Zµj^ÛØØÐ®]»ù[YY%°œ¹qãFJ/K‘Á¥8Àºví“&MâÀ¬ZµŠ¾}û²xñâiÚ¶mËܹs©Q£FЬx9rä C‡Ì;—þù[[[CÇÓx666º °²âÃ?dîܹ,Xа?**Š¥K—râÄ ªW¯nøi<âHÓ4C'è&-L)¥Ô `†¦i97Àü¦iÚ t5[~À¥ÔóÅ„Rxx89räHð"„ŠNî]»veâĉäΛnݺqõêU6oÞœ Í×_ÍáÇ“<þ§Ÿ~¢oß¾ôíÛ—%K–$Ø7bĺtéÂìÙ³éÑ£U«V¥J•*;vŒQ£F%9 ±wïÞ|õÕWÌœ9“I“&ñóÏ?“-[6lll˜|¨”RêáÇjÓ¦MêĉêÂ… êîÝ»J)¥ Ç…„„¨;wî(¥”zðà:~ü¸²¶¶Žœ“{o’yÿ¬€šÀX ]³âM`)Ð(˜‚¼uÿtéÓ矮lîbˆ· Š+¦"""T÷îÝÕ¬Y³”RJ?~\}üñÇÊÅÅÅÖÝÝ]U«VMíß¿_)¥TáÂ…UTTÔ ó;v¬š6mšRJ©»wïªÉ“'«>ø@=zôH…‡‡«|ùò)¥”R÷îÝS7V?þø£RJ©þýû«Úµk«Ÿ~úI)¥û trrRÀsŸ["ãûñÇU:uÌ]ŒÊ™3çc 2á÷™,É[RÜDß_)^Þ¼yÉ›7/5kÖ|.}±bÅ ¯ãû=½ˆ••U’y€n˜tü¨Â¤ØØØÐ¨Q£Û2gÎŒ‡‡Çsi ¯K”(ax%K*T¨ðÒ2¦–R*ا_F¾ 9ñ$º¦DiN¸¸$' M®æÍ›ãáá••U‚þ“Y³f¥hÑ¢œ>}²gÏŽ•Uê\‘;wnúõëÇäÉ“9tè—/_¦xñâÔ©S;;;ºvíʈ#èÛ·/Íš5cõêÕxyy±xñbZ´hA```ª¯S‘ñÈ£rÌD)uX£_Ð4­º`Ë]s¢¦i{yÖKF'Š·NÍš5 ?žªV­Ê§Ÿ~šàGÙ«899ñã?âããCâ÷:°xñblllhß¾=ÞÞÞ©.§¥¥%NNN\»v+W®<÷CÓÉÉ)Ab¶lÙxÿý÷9qâ›6mbÁ‚©>·"c’Gå¤J© J©Ÿ•Rž@ .ph 74M[ªiZ{ ¯‹*„ÉT­Z•={ö0uêTZ¶lIñâÅ)T¨GMÖñ'NdÖ¬YŒ?>Á¤Ÿ ½·gÏ6oÞLÆ _«œ±±±R¸paìíퟫ |.0ìС]ºt¡zõêX[[¿Öù…XéR*F)µO)5J)å„. úxŒ6ôïߟmÛ¶%9ƒ½éU\\GŽaÊ”)ܾ};Á¾lÙ²±páÂç¦Vx‘‚ âååE×®]4hP‚}š¦Ñ½{wÃãrR+,,ŒéÓ§“'OªV­Š‡‡.\`ïÞ½€nž½ о}ûÇ9;;S¾|yºuë–ês !2®4m"ܶm¾¾¾iyŠ4«ý4Mk•‚â•R½Ó¢øÀÜÅH–øç]¾knß¾ÍîÝ» Õ… (Y²$®®®LŸ>Þ{ï½$;J)üýýÉœ93ŽŽŽ´oߞ… £”âðáÃ)R„¿þú ²fÍ @PP%K–äСC¸ººú˜æSºyó&="sæÌøûûóÉ'ŸP¬X1ªW¯ÎÒ¥K©U«VŠæk2—ððpüýý Í~gΜ¡pḹ¹1fÌÜÜܰ··7w13¥·nÝâÊ•+ܺu‹|ùòQ¤HòçÏ/MèB °Dª¼¬9ñàÁƒ:tˆ+W®ðÉ'Ÿɼyó¸qãË–-{íŽógΜÁÇLJM›6ñé§Ÿ2pà@ÆGïÞ½ùôÓOiذ!õêÕ£\¹rôë×cÇŽ‘%Kš5kFµjÕ¨V­cÆŒaÑ¢E”+WŽV­Zñï¿ÿº·sçÎѾ}{dïÞ½†f¿£G’3gN\\\èÝ»7®®®f>±ôF)…ŸŸkÖ¬áÏ?ÿäÖ­[dÊ”+ÐàÈ IDAT‰¼yórçΞ>}JÞ¼yiÒ¤ Íš5£Q£Fl ñŽ“K¼¶Ä£5j„ Ù³ggçΆtëÖ­£^½z¬_¿žÜ¹s§ø<›7of„ (P€6mÚ0jÔ(lll’L…··7vvvܼy“€€6lÈÓ§O?~<åÊ•ãý÷ßgÕªU”+W.É}º!íÊ•+±°°`×®]€®–áÎ;/Ì{Ê”)-ZGGGJ—.MÛ¶m¹páBÚ^ 22’£GR©R%:wîÌÏ?ÿÌÁƒ9xð`ªFúÕ«W;v0yòdNžüðC\]]Y°`ÎÎÎòü;# , téÒ&ùÿùðáC¦NÊ”)Sppp`ß¾}T«V-Õù-Z”%K–Я_?C?A!Ä»#]XE‹eàÀ4iÒ€iÓ¦öÙÚÚòá‡räÈÞ{ï=,,,Rýå–+W.z÷îͤI“Ø·oõêÕÃÍÍ *ަiüöÛoÜðÚÒÒ’Õ«Wsÿþ}²gÏnØÞ¬Y37nŒR*A¿®úõëS¿~}ÃzË–-MZþ»wï²sçÎI.Z´(nnnLš4 777y|Ñ ìÛ·R²dI† BŸ>}RÌÇÆÆ²xñbFŒAŽ9ðññÁÓÓÓdåtpp`ûöílÙ²Åð£NñöKq€uáÂJ•*eò‚Ô¯_Ÿž={2oÞ<,--ìëС‹/&þü´k׎+V¤ú<š¦Q³fM®]»Fpp0yòäaæÌ™T©R…;wî°ÿ~*W®Ì¬Y³^ëš4mÚ”²eËÒ§OŸt5%€qpϳ”/[¶ŒqãÆáââÂÀqss3t¨/W£F 8ÀêÕ«2dsæÌaüøñ´k×.Ù}â¶lÙ Aƒ¸uë£F¢[·nXY¥ÍïΆ ¦I¾Bˆô)%}°®ÚØØìÿàƒTëÖ­cNŸ>mÒ‚tëÖiÓ¦1eÊîÝ»—`Ÿ““ÁÁÁ¬]»–Ï>ûìµÎ£”bß¾}.\˜cÇŽ%AV¶lYNž<ÉáÇ©\¹òkGèDGG3uêTJ”(Aûöí9~üxšœçرcŒ;ö•éâ§b06mÚ4öïßèÂ7©{÷îܼy“+VЭ[7 ®R¡E‹œ>}šÒ¿*UªÄĉ_Ø7ïÚµküüóÏÔªU‹-ZàééÉ… øæ›oÒ,¸B¼{’ýi¢”ºÔÔ4­†¯¯ï˜+V¸zzzÆŽ5ʪR¥J¯Uˆ_ý•ܹsÓ»wo¬­­éׯ¿þúk‚4ß|ó wïÞ}­þ<ñ}°lmm©Y³&¥K—¦sç΀®™àèÑ£8::bkkËôéÓ ó½+bbbxüø1=âÑ£G†×Im{Ùë£GòÏ?ÿpöìYà ïÑÑÑøøøàããC£Føý÷ß £üL¡H‘"4nÜ8UÇ^ºtÉ0?TÏž=MV¦ägû™†µµ5½{÷¦}ûöüôÓO¬X±‚!C†`ooOÑ¢E)P wïÞåÊ•+\ºt‰’%KÒ´iSV¬X‘îù$„x;¤øçšRj?PWÓ´*›7o³nݺ†1£F²þôÓOS\€«W¯2yòd8è~ѯZµŠ-[¶$hŠl×®Ý ópqq14+öêÕ‹.]º$Ø?oÞ<Ö¯_ÏÝ»w©Zµ*Û¶m#K–,/^œêÕ«S¿~}bbbðòòÂÖÖGGGJ”(››ï½÷NNN|ûí·)¾¶ÔÒt3Ú™þ¿® °bÅŠ?¯Úÿ¢þRÖÖÖdΜ™Ì™3ckkkxý¢mVVVØÙÙQ¹re>l|]|ñÅL˜0!ÕÁ•ŸŸ‡âÈ‘#(¥qâÄ—æk*š¦}l$a •ôì™:Oõ ß}÷Ý+ƒ÷Þ{ï¹mÉ ’Œ·%î÷*žžž”-[–Q£F‚Ý:uê0eÊR„»yó& ,àÀ<}ú”ÆsâÄ """8sæ çÎãöíÛ¬[·ú÷ïϪU«X¶l!!!øúúâïïψ#X´hQ‚üã§p ãçŸæðáÃdÉ’ggg>ûì3ÂÂÂûì³$› EúrüøqªT©Â®]» ¢ÿþ&¸Š—7o^vîÜIHH-[¶$:ZzD!tÒM Vdd$ƒ 2w1R%44”¸¸8 MÓæ¥à°ß”RiV(3Љ‰áèÑ£888pêÔ)7nLóæÍùé§ŸÈ‘#[¶lIõ¨°Š+¾2ÍëÎö/ÒÞìÙ³4híÚµcÆŒº£xþüùÙµkuêÔ¡M›6,_¾<ÅS›!Þ>é&Àzøð!ÞÞÞ´iÓ&à }.T¨ݺu³º''ýï¿ÿ¼UÖ¡C‡ðöö6Œ¬8p ›7o¦P¡B\½z•… âëëËëÎü/2®Û·oÓ©S'8ÀÒ¥KiÞ¼¹¹‹d… b×®]Ô®]›¯¾úŠ¥K—&ûyˆBˆ·Sº °â}ÿý÷+VÌÜÅHS[·n}eîb˜Ddd$K—.eþüù†ÚªO?ý”Úµk3|øpC:{{{‚‚‚’U%ÞN~~~tèÐ2eÊð÷ßS¤HsɤŠ)b¨Éúúë¯Y´hQ†kòB˜ŽüÄ©rðàA:wîLÁ‚™M“&MÌV[õý÷ß“'Ož7zÎÔÚ»w/µjÕ2w1Ì*<<œnݺáç燷·7mÛ¶5w‘Ì¢|ùòlß¾WWW2eÊĤI“Ì]$!Ä$V „‡‡“9sætùøS9xð ÞÞÞ¬X±‚÷Þ{.]ºðõ×_›­¶ª{÷d ÌL7jÕªEíÚµÍ] ³Ù³gíÚµ£páÂ=zôŸÌÁÁ???êÖ­‹ cÇŽ5w‘„oÈ[`­_¿OOO6mÚDÆ 3f cÆŒáÚµk† á—_~¡wïÞ\»vÍP32uêTfÍšE¡B…Èœ93½{÷¦Y³f†|ûôéC¾|ù°´´$_¾|¬_¿Þ<™""" }«Ì][•ؼy)™ZL¼I'Nœ`ùòå|ÿý÷ÄÄÄ0vìX&NœÈ Aƒ=z4VVoÕÇKªU©R…-[¶àîîN¦L™Œ®ŽŽÆÚÚÚŒ¥B¤•·î°FüöÛo4lØ¥Û¶mKðÈ€E‹Ñ©S'~ÿýw¾ýö[ÃöîÝ»3lØ0BBBhРM›6åÂ… téÒ…;wR¡B‚‚‚Þè5¥•   æÏŸŸnj«DÆ2lØ06mÚDÅŠ™9s&W¯^eÇŽït Þ‹899~øeÊ”‰Aƒ1pà@Ê•+—à1LBˆ·Ç[7ô«D‰„‡‡ÎîÝ»©^½z‚_Ò§OŸÆÆÆ†ádzxñâ$ó°¶¶æÞ½{ÄÅű|ùrÜÜÜ Á¡GBEDD0gÎ*UªD­Zµ¸wïkÖ¬!$$„aÆIp%’%00 6Gß¾})V¬ÿý·W/Q»vmÖ¯_ÏèÑ£iÛ¶-S§NeÍš5æ.–"¼uÀ—_~ÉòåËùõ×_Ÿ{àoü¶Â… “7o^þúë/þ… R«V-*T¨À‚ °´´äßÿ¥fÍšoúL.((ˆ¯¿þšB… 1uêTZ¶lÉåË—Y»v- 40{S ÈX†jx}ãÆ ?~L®\¹ÌX¢ŒÁÕÕ•-Z°lÙ2¶oßÎýû÷Í\*!DZx+¿U¿øâ ~ûí7.]º”`rËèèh|||عs'=zô 22’_ýÕ°¿C‡lذþýûóÇP¬X1öíÛ÷ƯÁ’ª­Z»v­ÔV‰×âç燿¿‚m›6mbÆ æ)P¡”¢[·nøøø¶=yò„Í›7›±TBˆ´òÖõÁÈž=;Íš5{nÓÆ©Zµ*½zõ ..ŽÖ­[3mÚ4¬¬¬È™3'#FŒÀÉÉ ZµjE58qâD‚>Xé¹™0((oooV®\É{ï½G×®]éÔ©“TÂ$|}}ùꫯøðà KÉ’%¥Sû+hšF—.]È’% +W®äƬY³†/¿üÒÌ¥B˜Zš"ž9sÆÒÏÏww÷´>Uƒ znÛ¯¿þJÏž=GÎÎά]»6A:MÓ7n#GŽdÏž=x{{Ó A .œnGFDDàããÃüùó9sæ Ÿ}ök×®ÅÝÝ]ž‡&Ljîܹæ.B†U­Z5ªU«ÆôéÓÙ½{7Ë–-ÃÏÏÇ¿ÕÓ¿ñ.ÒÒòYY𦶴´­”êX±bÅØqãÆÙ4nÜ8É´7nÜ `Á‚\ºt)Ý>ìùîÝ»dÍšõµ?‹+öð¿ÿþóRJ-NÍñš¦9J)™?>+W®$þü†‘€ x­2¾OOOÊ–-ËĉÍV!2Š'Ož ”’+ƒš1cëÖ­{®Ù<½È•+ד{÷îy*¥¶š»,ïš4탥”ºÓ5..®ø‰'xzzF—+WîÉš5k2äCPóäÉ“^>³îáɵk×&22ÒзjèСf ®„)ccc“^>W„&ôF:¹+¥®ÆÄÄôŠ-röìÙŸZµjõäƒ>xòÇ—ªcš¦9iš¶ØЪU+®\¹Âš5k¨_¿¾4 !„éÄE¨”º; &&¦pHHÈ´:<Ì;÷Ó¶mÛÆ$îõ* .d„ ¬]»ggg¦OŸžF¥N(..ooï7r.MÓrjšÖKÓ´ãÀ 0Ú*!„"2˰¥Ô]`˜¦i#""ÜW®\ÙhÍš5Ÿ)z¢ï矎——×®]ÃÑÑ‘~ýúpóæM/^LhÙ²%™3gtµ^K—.%**Š®]»RªT)îܹÃo¿ý†­[·&kÖ¬„„„pêÔ)®^½JDDC† áÀ¬]»Öðø€û÷ï³lÙ2Ž=JñâÅ|x‚TS¦L!gΜ <˜³gÏšè®$phìR±Óš0©àà`fÍšõÖÌ–¾{÷nŠ+&–\üÀ+s—ãu(¥LÞÇ&CO\3uêT¼½½¹pá‚áù€«W¯ÆÁÁk×®aiiÉùóç cùòå <777Ãñ›6m¢^½zxzz°téR.^¼@åÊ•éÑ£ãÇgĈT­Z•¬Y³²ÿ~@×9õÀ|üñÇ4hÐÀä×§ªvš![¶lDFFâááÁÔ©SéÛ·/÷ïßçܹs|òÉ'lß¾=Aþ,Z´ˆqãÆ±dÉÃöóçÏãææ†››...„††R¼xñ7}ùB3™9sf†hòï¿ÿ¦éÃ¥?~L©R¥?~|šÃV®\Ihh¨¹‹!2  `/^œ>>Ìœ9“=zðÍ7ßFÑ¢EY¸p!DFFÒ®];>|ȨQ£¨U«'N¤W¯^dÉ’…Å‹£i¹sç¦L™2†¼;uêÄÌ™3©W¯M›6¥Zµj¬X±???råÊE³fÍ$¸B¼ÓòæÍ›&Ý%Ì騱c`‰TɰVçάW©R…*UªÐ¬Y³£ý,--iÛ¶-mÛ¶M°½aÆ4lØð…ydÍš•¡C‡2tèÐé†ÎðáÃ_ûZ„BñvÉpÒ„¦uìØ1ž}úü¦nG†òÖMû¦„††ráÂsC¼@HH}ô‘‘‘ìØ±ƒ:uê ”bÔ¨QX[[sýú³i/?ÿüs *@PPÐsÝv«T©ü1”/_ž~øÁdµð¦”aû` ñ.»|ù2K—.Å××—>ø€6mÚÎÀÙ¶mJ)4hÀ¾}ûèÔ©...(P€o¿ý–­[·booOÙ²e™3gEŠ`ÕªU,^¼˜   4McôèÑ*Tˆ+W®Ð¹sgüüüˆŒŒÄËË‹7R¼xqnß¾M¾|ùÈŸ??Ë–-ÃÒÒ€ýû÷³mÛ6¦OŸÎ?ÿüCóæÍiÛ¶-E‹5Û½{“Ξ=KÙ²e ë7oÞ$gÎœØØØpáÂ6nÜHãÆóèÑ£$§~xøð!qqqdË–-Ét‰Ï•‘ݺu‹ï¿ÿž™3g&¹ÿèÑ£ü÷ß”*Uê —L$GÉ’%ùæ›oèׯ3fÌ OŸ>¬_¿Þð¼ÜêÕ«ãããàAƒ¸qãQQQ)>Ǻuë(Z´(gÏžeàÀܽ{×ðœà§OŸ€“““áÿKüö;w’%KjÔ¨•UÚ†@Rƒ%Dsÿþ}J•*ÅØ´iK—.ÅÃÃÃðañçŸÇ!C:t(QQQìÞ½›\¹r1{ölj֬ɸñã±··O2ÿ9rЦMÇáÖ­[iÙ²%^^^;vŒÈÈHÖ¯_OãÆ #góåË—d^VVV4jÔˆeË–±aÃüýý)Uª÷ïßOƒ;“>\¼x‘±cÇâàà`xné©S§pqqaàÀ4nܘ°°0æÎËŽ;hÕªüûï¿4mÚ”-ZàááÁñãÇh׮͚5£aÆìܹ“-[¶Ð¬Y3ÚµkG‡xôèóæÍÃÁÁ±cÇ&LNbccÙ²e 'NœtÁÑÝ»wÙ¸q£atÞÕ«WÙ·oŸá˜cÇŽáïï¿¿?/^äÖ­[\ºt‰#Gް{÷nªT©‚‡‡‡!ýÇñóó3ÌitóæÍ÷ <<œÓ§OÖÿùçþúë/ÃzTT‹-z«ß—oš——/^¤AƒtïÞ’%Kö5nܘ 6°dÉÚ´i“êó”-[–¾}û¦P:xð 5jÔ 88˜úõëjí·oߎ³³3§NbÇŽ\¾|ù5®.y$À"ƒÉž=;—/_ÆÕÕÕðE»yófbbbÝd¸ü1£GfôèÑìÚµ‹:uê°víZªW¯ÎîÝ» ùiš†ñ“˜ììì 5PçÏŸgùòåüþûïüùçŸdÊ”‰Ç“/_>伯,,,äæM›hÓ¦ _|ñ 4àòåËoÝLâ?fþüù¸¸¸Ð»woJ–,ÉþýûùñÇX³£ ™ IDATf ­[·fÉ’%l߾ܹsÓ³gOêÖ­ËòåË©S§‹-¢I“&lÚ´‰>}ú0kÖ,Cþ~ø!|þùçŒ;–%K–°fÍÊ–-khfœ1cûöí£D‰xyyáììÌüùóÓt"Å—9zô(ÿûßÿppp`Ó¦M†Éš½¼¼hÓ¦ ÇŽãÁƒxyy1aÂpvv&&&†ëׯóèÑ#Ξ=ËíÛ·Ù¹s'7föìÙ„……áççÇÂ… ݜܹsó÷ß3räH:wîL… رc...,X=zæ´··gÑ¢E4oÞ<Áù¼½½™0a­[·¦oß¾üöÛo”*U MÓ8þpü{ØCÜEq!jÝ­þœ(âÂÙÖW­Û÷µEk‹w]­ÖÖõZ«ÕŠZ­Õ.Wµ¬ˆ ,nëÀŠ[¬ $’ç÷’W[G €÷çºr™äœœsŸ€ÉÍ3îçŒ7Žƒ2tèP¶nÝJ­Zµž(Í#žÝùóç eôèÑ„„„<±½W¯^ 4ˆªU«âââòRçÚ³g ÀÞޞÇS¥J*V¬hþ,:tèU«V}©ód{{ûtË•e¤F@ê›7o¦[bçi-G5kÖ|â¹””:ÄܹsÍÏ•.]Hý_ºt)T©R… ðÓO?qñâEóùŠ)bþ£áqϼôÙåË—ùôÓO)^¼8Å‹§X±b/^ÜÜj÷ªQJѯ_?fΜI@@Mš4aûöíéÖ~ã7¨Q£ýû÷©s:uŠÙ³g›×lÖ¬;wî4·"7iÒ€–-[²uëVÚµk÷Rç{’` ‘K<šÈ¸¹¹Ñ»woz÷îm~îý÷ß7ß/X° |ðîîîé ð>š`AêRQŽwIãêêJ¿~ýÒý-\¸0}ûöÍ0¦WAƒ hРƒ 6ðÕW_ñùçŸ3cÆ ”RäÉ“‡7nP¹re\]] b„ æÁÿC‡娱clܸ‘aÆ=q|{{{zôèÁ›o¾IëÖ­‰‹‹£zõêæåÂêÕ«ÇèÑ£­º&ê[o½Å[o½Å‰'X¾|9cÇŽ¥^½z„„„˜[±llR;O5j„_|ñ…y ¡ÉdâÁƒ$$$¤;nF¿Kvvv4jÔˆwß}ל´™L& µ+°N:\½zÕüÿ uëÖ|óÍ7,X°À| “ÉDRRŸ~ú)6l råÊôìÙ“™3g¢iÓ¦MûÇk6 lÛ¶¸¸8®^½Ê;wpvv6'[&^?—Û± àååe®ê¿xñbÚ·oÏþýûŸØ0#L³gÏžt‹Áÿúë¯+V,Ý>:tÀd2‘’’Â;ï¼Ã!C€ÔÄzÈ!¬Y³“Éd^º)88˜1cưdÉôz=sæÌI·bKfKˆ\Îh4ùB­—/_&)) ooo¢££ñõõ}éæüW£££9Ñ€Ô.Â}ûöaooOxx8yóæRsù„ºuëR¿~}ZµjÅÛo¿ý· j?ž)S¦`ccƒN§ÃÏÏ¡C‡âææF:uزe ‹-R[;uêD@@… æÒ¥K,[¶ŒB… Q®\9vîÜùB‹w—-[–°°0ócNgN¶ÒþM»üøqóýG±Œ¯ÇïçË—ï¹c³†   ‚‚‚ÌË—/ožd0qâÄ'öwvv6Ox¨[·n†¿+:räÈS·yyyñÓO?=1˶|ùò|ÿý÷ܽ{{{û,ù“ë """زe 'Nœ0\¼xÑg£×ëm .œìéé©y{{;4jÔȶeË–é> …°6ƒÁÀìÙ³_(ÁÚ²e qqqŒ;–Å‹3jÔ¨W¦Ä‚%)R$üöööæ1Fš˜5oÞ<Ý>•*Uzâuyóæ}b9°ìJÓ4üüüÌ÷îÝ›n{Ïž=éÙ³'7nÜÀÃÃÃÜ’õx‰†®]»šï÷èÑÃ|¿fÍšüôÓO~q._¾ü‰x† Â!C¸~ý: 4·¦=zü—åì쌷·÷?¤Öét&aW¯^åèÑ£æûiݘ...ÏÔ"ö¢‰˜¦i3€0¥Ô¯/t€läi‰rV&©’`ý­[·2cÆ Cxx¸­ÉdJ±··×ét¿qoºóçÏ=þ|±}ûöyÿðíu:]‰òåË'öíÛ×yÀ€ZÚ_ªBd¶„„Î;gžåç燦i8::š™^½z£ÑÈ¥K—puu¥Zµj鎱ÿ~ ,˜áCPP… "))‰?þøƒ püøqš5k–®KêêÕ«œ={–† fîç/Ó‚xåÊôz=eË–Íõ-ˆO+õñ¬ž÷‹³páÂ/u>Kpvv¦lÙ²éJd$11ñ©-bG5ß4KK¶ìþš¦U®>¼ÅW•R7Õ†hšö¬”²Ì¯(I°2°aÃÆ¯?~ü¸Rj±ÑhüØœœœüO¯Õ4­Ü™3gZMœ8qð”)S<‡jÿᇒ?þ,ˆ\¼ÊbcciÓ¦ 6ÄËË‹ñãÇŽN§£oß¾=z”5kÖ0þ|Z´hÁÍ›7quuåË/¿äÞ½{têÔ‰FqõêUÜÜÜøì³ÏÒذaÌ›7777Ú´iC“&M¨P¡#FŒàèÑ£ØØØŒN§ÃËË‹1cưmÛ6«ŽÊ^¦qóæÍæÄÐÐPBBBðòòÊ„(­¯cÇŽæšEÏ#::š­[·2zôh>ýôSš4i’®U07pqqyæDìñ$lÿþý pZÅÞòhš–ÀÃdëá¿iS=»-4M¦”ZbÉk1™Lÿؘ•ÒŠœjšö<á¦?F¬‡L&?ÿü3ãÆÓÿù矚Rê £ÑøÙófðJ©?¹š¦ÍÞž>}úäéÓ§—4hí°aôìðW“Ƚ ß~û-ï¾û.»wï¦V­ZéöñññaÆŒ@êl®ÄÄD6lØ@½zõÌ3zÿ¶~’N§cÙ²eØÛÛsúôi8@… ˆŠŠ2IÞ¼y“-[¶dé¬kÊìÄ÷Þ{Â… ?s bƒ rÔ$ƒGÇì<{÷îqöìY u¦Øãƒ¡3[BB‚y`½µ¹¸¸P®\¹tî'Mš”b0¦+¥6§=§iš+PŒÔd+íßÀ£_PùPMÓ|”ROÖYxA111v{gñϱ¯pçŸvzå,£ÑȪU«?~¼þÒ¥K*%%e–Rj¦RêÖËW)eVkšö=Ðñ‹/¾˜‘`U¬XÑ|¿L™2ÄÄİoß>þüóOóôõÚµkÿíÐ>>>æ2EŠáêÕ«§x5”,Y’uëÖ‘˜˜h®£äææ–n9>üðCL&“¹ûÈÖÖ–Ù³g“’’B||¼yF×£ED·nÝj¾¿oß>óýÙ³g›ïwëÖnݺqóæMòåË÷DµñÜîСCÏÕ‚xúôéW®111‘ääd¸sçN†-;VWOÛçîݻԮ]›ñãÇ›·¹»»?ÑŠ•ÆÙÙÙüÚÙÙ‘’’‚““ùóçO—„¾HÝ«¿cccCõêÕ©^½º¹˜ï©S§Ì ׈#¸xñ"åÊ•£Q£F4lØFeÉÚx"ke»µ•R)J©ez½Þ;11±ç¬Y³Îxzz¦ 6L]»ví¹—˜˜È¬Y³ðôô4 >üúõëׇ †J©ÖH®„Èlš¦¥[/#öööŽÍ±³³{ééòÚJñª%Wð¿DJ•*•áÚg4nܘÆ3dÈs ¢³³3-[¶¤[·néêF=«G[ßyçš5kÆž={,qYe2™˜8q"»víbáÂ…´mÛö‰}>ÌŠ+X³f¹°]»vìØ±ƒß~ûðÛo¿=÷BÖnnnÔ®]›yóæÏ©S§8yò¤¥.í©|||èß¿?+V¬àÂ… œ?žñãÇcccÃÔ©S)[¶,žžžtëÖ pâĉlÙú(žO¶iÁzÜíUš¦­:|ùå—SfÏžíóúë¯'µk×ΩE‹TªTé‰>ÜäädbccÙ¶m¿üòKRxx¸¦i×õzý`™R*É —#D¦«Zµ*ëׯÿÛ}˜EѼš<==Y¿~}ºÄÍ›7¡Ä-[þ×ð“[Ë•+Ço¼ÁÆYµjåË—Ò/ÑÔ¹sgâãã¹xñ";wîDÓ4œœœˆŠŠ2¯±Y¹re\\\(S¦ íÛ· mÛ¶æt¯nݺæ„eéÒ¥ìØ±ƒ àáá‘n9©¬âååE=ÌSÿúë/víÚEDD ,`àÀäÏŸŸ ˜»«W¯þRƒñEÖ˶ Vš‡ƒÄ×k4M{}ß¾}-9ÒaôèÑÕ”R6yòäI*T¨PŠׯ_·½wR —?u:Ýϧ¦îÊì{BÏÞ‚˜K¶ fgíÚµ{bðý£ ‘ ƒ zâuyóæ¥OŸ>ôéÓÇü\™2eÌãµ3<Þ£u±lllhÖ¬Yº…‡-Á`0àààðB¥1Š)’ni¥;wî°{÷n"""X½z5!!!899Q¿~}sÂU§N7 ïU“íºÿŽRj¿RjRBBBM¥”;PùÁƒ­Ï;×ÿÌ™3îÞ½ÛN)U (˜PÞd2…(¥vHr%„ÈlUªTaÆ »ÏÀ3\ÄùUáààÀ€þvŸòåËÓ¦M›,ŠÈrfÍš…··7“&MââÅ‹/u,www™>}:‘‘‘ÄÇdzfÍ^ýu¶nÝJóæÍÉ—/Mš4aüøñ„……=±8vN‡7nÜRkÁÕ©S‡äädfÍš… 111æý{öìiþæÔ©SÔ«Wïo߸qc^{í5jÖ¬‰¯¯/}ôQ–½W9*Áz”Rê¾Rê„Rj»Rê[¥Ô2¥ÔV¥ÔÑ—­a%„Âòþ± hùò埫ÖPvñÞ{ï1bÄÖ¯_O™2ehÑ¢«W¯Æ`0¼ô±]]]iÖ¬'NdÇŽܹs‡°°0Z´hAtt4o¾ù&îîîÔ­[—ádzaÃâã-Zq(Ó+VŒ±cÇ„Á` ÿþ|ýõ׿VÞ† ²téR µ¨ì•+Wž»ë{ÅŠüðCó¶””ÂÂÂÌ o?úüÖ­[ùí·ßHJz±‘E96ÁB!² www‚‚‚ˆŽŽæÐ¡Cøøø0pà@Š/Î|À‘#G,v.êׯϨQ£Ø´i·oß&**Š.]ºpöìYúöíK¨V­:Îhø°h¶Ô½{wŒF#þþþtêÔ)Ý ~~~„‡‡c2™Xµj•¹õE”+WŽádzbÅ L&üño¼ñQQQ´oßžo¾ùHãØ°aC<Èîݻӵ =I°„B zíµ×˜3gW¯^eþüùÄÄÄP³fMjժŗ_~ùDkÉ˲µµ¥fÍšóóÏ?sýúuŽ?΀PJi@ NÓ´MÓ¾Ö4­§¦i¥-ƒÉd²ùùçŸ_¸4H›6mØ·oÿùÏÒ=occC“&M cåÊ•téÒå¥â¬Y³&vvvܺu‹ï¿ÿž>ø€1cÆðí·ß²páB µàù¤I“9r$ãǧJ•*/t®l?È]ñ?ÉÉɼH¹’ì(%E†FŠÜÍÁÁÎ;Ó¹sg.]ºÄÒ¥KùüóÏ:t(:u¢oß¾4mÚÔâkFjš†¯¯/¾¾¾Œ929))©phôð6(§iÚ% âám—Rê©5+4MË”QJÎ`óIMÓfuéÒå½¢E‹ÚŽ1±OŸ>ÿ8Ù#Í_ýÅçŸÎÔ©S}úлwoJ•*•içWJÎË4M+4$5ázX iÚM`ÿKºŽ<,™ЀÔõu»)¥Ö?vì»ÀPMÓ&\ºtéßÇ9zôhAƒÙ¿ÿþûÿø™Ä„ èÒ¥ üüóÏtêÔɼ½bÅŠÔ¯_ŸŽ_®ÐüŸþÉgŸ}F÷îÝͳIwîÜI­Zµ8|ø0µjÕBÓ4Ú´iï¿þJÏž=_ê|’` ‘CôêÕ‹:X; ‹Ê—/ŸµCx)þù§Å»{2Ë•+W¬‚ µu©iÓ¦4mÚ”;wî°råJBCC™8q"þþþôë×öíÛgú"ÝJ©8àû‡74MËOjÕè|$hš¶‡Ô¤«àJjɤáJ©™ó>0KÓ´¹z½þ­Ù³g™>}ºo•*Uô5kÖtªR¥ŠMÞ¼yÓ½æ»ï¾0wý}õÕW4mڔƧÛoæÌ'NÀÑ£G©^½ºùñ÷ߟnÉ*Hãegg‡^¯çí·ßfĈüë_ÿâÃ?¤mÛ¶$''›W xï½÷9r$?ýô)))Lš4‰ZµjýÃ;ú$MªÅæ<š¦Õöeן]‡ðññaÚ´iÖEˆLqþüysí¥œ&..Ž¢E-?ÞyÚ´i,\¸Î;[üØÖ‰““›7oÎpûìÙ³Y»v-ááá/už#GŽÊŠ+€Ô¤ oß¾é|¿Ã;w:<¬ ùÌ4MËÔãÝŠÀ£K,þS¤‡ßWummm_svv®¥Óé*FGN—m{N[Þêq÷îÝÃÖÖ6]YˆJ•*x(¥þñ/+iÁBˆçäåå…N§³v/$³¾Ô|}}yýõ×9þ|¦ßZŠ-š®…$³T«V9sæ0}útÖ­[ÇâÅ‹©Y³&Õ«W§_¿~tëÖ ww÷L#Rê° ئiš3p÷±]úš¦õUó×¾R*ˆL{¬iZ%àD&„üž¶åã­mÏK,!„xNiK·ˆÿɨ:»x~ŽŽŽéÆ/Y²$KÆÿƒº¤V8ìI»)¥.½À±²g×K&K!D–‹‹‹cïÞ½ìÛ·}ûöѯ_?úöíkí°²•’%K2~üxÆÇo¿ýFhh(+VŒÞ½{Ó§OJ–,™¡Ü¶jYň#8zô¨µN@bb"ŽŽŽØØØlpqqùÇiÐ’` !Ò™5këׯgÇŽÖEäBS§N嫯¾âÂ… æç (@×®]­Uö¦išyýDk ŒWJÝÌ”?‡ýû÷ãääDݺu­GÓ¦M!u2À?’K‘ŽÉdÂÆFjgwkÖ¬áôéÓŒ9ÒÚ¡<—nݺ=1#làÀO#ÒswwgÀ€ 0À<0>((ˆ   ‹ ŒÏ®Z¶l™nïìN>E…éFI°r{{{¦L™ÂíÛ·­Ês)R¤:tÀÎ.õï{'''hå¨r¦´ñiãO:EÍš5©]»v¦TŒÏG>E…éH VÎЦMJ—.ͼyó¬Ê3»|ù2 6dÇŽ|ôÑGôìÙ“Â… [9²œ-m`ü–-[8wîíÚµã³Ï>£X±b$&&ÚÕ´,/$ÁB|8sçÎÍ%#öîÝK:uðððà÷ßgìØ±ôïߟ¡C‡Z;´\¥T©RŒ?žØØX~ùå—´§'g5M§iZ–ŒŠ’` !# VÎÑ­[7Yºt©µCù[‹/ÆÏÏnݺñ믿š×“[°`ÁU·…e¤ ŒwqqIæ•Ù;ç5MÛ¬iZgMÓ¬eî&Ÿ¢Bˆt¤‹0ç°··gðàÁ|þùçFk‡ó„”” Äûï¿Ï×_ÍŒ3°µµ5o—^«,“ ”úR)U ¨ Ä󫚦ÍÑ4í5놗;ɧ¨"iÁÊYþóŸÿpûöm~úé'k‡’έ[·`Íš5DDDУGk‡$¥Ô¥Ô@q` àÒ4-ZÓ´ MÓ²®\üKX´h/^4?^·n %%… &°gÏó¶;wî0aÂŽ9À²e˸víÚS}üøq&L˜ÀäÉ“Y¼x1‡~¡åST‘Ž´`å,nnn1}útk‡bvìØ1êÔ©ƒ^¯'::š:uêX;$ñ¥”A)µZ)Õ(¬Fqš¦­Ð4­ivïééIŸ>}PJqúôiÆŒƒ)))̘1ƒ)S¦˜÷]¹r%óæÍ3'JË–-#..»« IDAT©Ç>~ü8ÑÑÑÔªU‹óçÏÓ£G*‚+Ÿ¢Bˆt¤+çùðÃ9~ü8Û·o·v(üôÓOÔ«W???ÂÃÃ3eaiaYJ©‹J©I€7Hjn°‘l<0¾U«V”)S†¹sçÒ¯_?¾üòKó¢Ìyòä!oÞ¼æu1W¯^ýÜË8•,Y’Ö­[3yòd:ÄÚµk R'lôèу.]º˜Ÿ§gÏžøûû3gÎ)4*„HOZ°rž"EŠÐ«W/¦OŸN³fͬƒRŠ &0uêTf̘Á Aƒ¬‡xqmÞl×4̓ÔÁñ} š¦mBµJ©$+†i6sæLÊ–-KçÎiÔ¨Qºm=zô`Ù²etêÔ‰R¥JáææöÂç±³³£mÛ¶:t???úöíËÆqtt$ €¨¨(L&ï¿ÿ>6l L™2ܸqCZ°„éI VÎ4lØ0ÂÂÂ^x¼ÈËxðà:ubÞ¼ylÙ²E’«\@)¯”š÷p`|-,<0~ùòå$%½\ž‰‡‡111OlkÙ²%›7ofñâÅôêÕë¥Îó¨={öP³fMÊ–-‹§§'Í›7gëÖ­¬_¿žÀÀ@Ê”)@¡B…$ÁB¤š9s&Æ ãÊ•+˜L&ÆŽË´iÓ¬–xFåË—§C‡æ±X±±±œ;w.ÓÏ{öìYêÖ­Kll,ÑÑÑøùùeú9EÖRJ~l`|%^|`üy`Üûï¿_¬X1Ã'Ÿ|¢^d5‚{÷îÌ–-[(Q¢ .L·ÝÎÎŽzõê±aÆ´õ_XJJ 6l FäÏŸŸ»wݽ{—üùóS¸panݺ•îu’` !€ÔjÐ3fÌ`õêÕüøã|üñÇܼiõ5^Ås áðáüýöÛT¨P!ÿì-),,Œ×_J•*±wï^J—.©çÖõÈÀøRÆo u`üÕg¯”Ò+¥¦$%%»}ûö€É“'Ÿ-^¼xÊÀ±±±Ï˰aÃ0`eÊ”aÖ¬YÌœ93ݬB€‰'‘a‹|xx8k×®eíÚµæÙ…ºté›6mbܸqÔ¨Qƒ:àïïO•*U¸rå ß~û-kÖ¬!22’† Ò¬Y3öîÝ˲eË8sæ »ví’K‘ª_¿~+VÌü8Ož<„„„X1"ñ<¶mÛÆèÑ£9yò$?þø#F£''§L;ßìÙ³iݺ5ƒæûï¿70¯†‡ã'’:0¾-Ï90þa²ª×ë+ †v¡¡¡{Ë•+§<==umÚ´I3f ß}÷GåÂ… éZîÝ»G… ÌkXzxx°xñbNœ8Æ RgØ–(QHí2¬^½:½zõâîÝ»>|˜Ã‡séÒ¥t±U©R…ÚµksàÀJ—.ÍòåË 5oßµk÷ïßçÂ… ìÝ»;;;ìì숊Š"%%…™3g’˜˜˜:0Qn9ëÔMýýÌžÚ·o¯BBB¬†x3fÌP€ÔèÑ£­ŽxF)))jðàÁæŸ]Ú-**ÊâçÒëõªwïÞÊÍÍM­[·ÎâÇÏifÍš¥7nlí0žÊÝÝ]´TYóÝäAjâÀlÞžñõ>@àS—0ggç¿Ò~—]]]³fÍÊì·Ë¢¤KaöÞ{ïQ¨P!òåËgþ+Pd¶¶¶Ìœ9“o¿ýgggóó™Ñ‚õᇲ{÷n"##Ÿ{ê»ÈÝTÆãÚ…8ûññš¦ykš6ù‘ןRJ-WJ…$$$ø'&&ò¥4M;•×b ’` !Ì\\\2dƒ6¯'rŽnݺ¥ • ÖG}Äþýûñõõµø±EïKêÀøßŒÏGj ˆ±š¦}ð7ǹ§”ºô´íÙ™ÔÁB¤3pàÀ´æz‘U¯^èèhºté’®5ËR§'Ä?QJ€ÕÀjMÓJ}Hÿ9pçán³5M»¡”úÎJaf iÁB¤ãææFÞ¼y­†x  `óæÍ’ ‰lE¥?’ÔÖ- X¦iZ€Õ‚Ë’` !D.dkk‹tRˆìG¥6‘7~ìi{àgMÓj[!¤L!ÿû„B‘e4M³NC€kÀ_ÿ½¦”zþª£Ù”$XBds?üðC¶XÄ7+4jÔˆnݺY; !D&RJ™€qÖŽ#³I‚%D6·gÏÂÂÂð÷÷·v(™jÇŽ¯l‚U´hQîܹóÏ;æPÕªU#**ÊÚa‘e$Á"¨]»6 ,°v™ªwïÞÖÁªôz=3gΤfÍšÖÅâÖ¬YÖ-[¬†YJ,!„È&|}}©[·®µÃ°¸Ã‡[;!,B)ÅùóçILL¤B… ØÛÛ?u_I°„B!2°k×.¢££9vì˜éÀ†Ó§OÛ ;[[[S™2e 5jÔ°¯V­š]µjÕÀÁÁKˆ\cÕªUÔ«W//¯gÚË–-œ?žwß}÷¹ÎIDD#FŒx‘0…"[3 ¬\¹’iÓ¦Ξ=kãìì|R§Ó4G?ÞFcå?ÿü³òÙ³g«lÚ´©vrrrU777»!C†8¾÷Þ{’` ‘[¬ZµŠbÅŠ=s‚uóæÍ'V‘ÞÞÞ™R!\<›û÷ï3}útvîÜIrr2mÛ¶eôèÑ:tˆû÷ïÓ¨Q#k‡(DŽtëÖ-æÏŸÏ¬Y³’ ÃL¥Ô—÷ïßZéˆÝohšæxëÖ­w¦L™2zâĉ^RhTˆ\¨K—.Ìš5‹† 2zôhRRR8}ú4=zô uëÖéÆÅܼy“?þ˜Ö­[3}út¸pá½{÷Æh4’œœL=¸téçÏŸç·ß~`òäÉÌ›7f͚ѳgO.^¼ÀíÛ·5j~~~Ìœ9“dý›K}õÕW$%%±}ûv"""hÑ¢$""â‰ýu:]†Ç¹ÿ>z½€»wïšï?Ê`0”””áëŸv\!2K|||¦÷Ì™3™Š/ž2uêÔ?oß¾ýž^¯/j2™¦âããIHH víÚäË—:`4ùå—_ضmAAA=z”5kÖ©‰×öíÛ9xð £FÊð\={öÄÉÉ "##Ø´iýúõÃÎÎŽ=zdÍE¿"† BTT%K–dàÀÄÆÆbccûï¾KçÎYµjUªTaΜ9³qãFYºt©ù~~~„……Q¿~}¦NÊêÕ«ùöÛo‰‰‰!..“ÉÄÌ™3‰ˆˆ """Ýâß“&MbÞ¼yüôÓOøùùñý÷ß[á]¯ƒÁb2™JM›6¥GL˜0Áü8Íìٳٹs'NNNœ?žÈÈHÊ—/O¹råÌ¿õêÕR»h:dža0(W®\f^®fJ©KÀ0MÓ&]¾|ù߯ 1räH>}úØ×¬YS«\¹2¾¾¾æÏ1€¤¤$NŸ>ÍüÁ±cÇX²d‰þæÍ›F£Ñ8Ïd2Í1 W3+^I°„xE8::âããÃŒ3¨V­k×®¥}ûöhšFçΙ:u*ƒ B¯×s÷î]5jD¯^½X²d ýõÝ»wgëÖ­Ït®nݺL¿~ýX±bš¦eòÕ½z *Ä|ÀgŸ}Æ7prrJ7^ªjÕªÄÄÄPµjUNœ8AõêÕÍÛœœœ€Ô/Ÿ¯¾úŠ?þøüýý1T¬X‘ØØXóþÇŽ£qãÆxxxP²dI–/_Ž››[Ö]¬PJÝfjšö_àí ´wpp¨¥ÓéJ+¥ìŠ-ª¯P¡‚váÂÓÅ‹•Rš³³ó£ÑxÐ`0l–*¥dvœ’` ‘KtéÒ…Ò¥Kl~¾f͚ܿ€•+WòÍ7ßÁ¼yó̃ßÇÏþýûY±bvvvtíÚ•?þøƒqãÆQ­Z5nܸÁ™3g(W®¼ùæ›”,Y€|ùòѧO:wîLõêÕÙºu+]»ve×®]Yò¼ þýïãââBùòåÙ½{75¢H‘"4mÚ”©S§booO=èÛ·/¤M›6¬Y³†Y³f=q,òçÏϧŸ~ʹsçøë¯¿€ÔÌîÝ»@¾|ù¸r効EtÀ€¼ýöÛ´mÛ–øøxJ•*EÏž=³ô=@)•|÷ð†¦iö@Ÿ¸¸×âââ*cÀ Ï×—hÚ£}ë"gÐ4­.°/»þì:tè€Ó¦M³v(¹Bpp0×®]cÕªUÖå™:uŠ#GŽ`ggÇÿû_ÆŒC@@Àß¾¦wïÞ899åú%žÆÝݵk×Ò¤I“¿ÝO§Ó±wï^nß¾MíÚµ)S¦Lºm‡¢R¥JxxxðàÁöíÛG£FpttR«ªWªTÉüØ`0ðÛo¿Q¢D òæÍ‹««+… àúõëèõz† Æ„ ðõõ 11‘mÛ¶‘'O6lhN¾žfÁ‚,X° WVtŸ={6k×®%<<ÜÚ¡dÈÃÃÃpçÎJ©ÍÖŽåU#-XB‹+\¸0·o߯h4òÝwßQ¼xqk‡”k8;;Ó¬Y³§nû¿ÿû?óãMxx8‘‘‘\¹r%ÝlÁAƒÑ¡C† BçÎ‰ŽŽN÷Ú'NpðàÁtÏ;vŒ#GŽ¼Ðµ ‘ÛH‚%DÖ¢E 6nÜHDDñññ :Ô<æØ±cìÛ·“'O©]C¿ÿþ;ÇŽàòåËæÚHQJqòäI~ýõW&OžŒ»»; 6äСC,]º”Ï?ÿœI“&±iÓ&iÛ¶-:xúÌ™3,Z´È|¼¯¿þš¸¸8nÞ¼™oE®äììÌĉY·nš0 8WWWöîÝKË–-ùî»ïÌûO˜0–-[róæMŒFã?¶2MŸ>ÿþ÷¿¬\¹’fÍšQ­Z5öïßo>÷š5kxûí·‰ŽŽæ?ÿùæäí£>Âßߟ{÷î©]-[¶dèС™ñV‘ãH‚%DfkkKhh( ((ˆ¡C‡šCjª´úG¡¡¡ôêÕë¹Ïáä䄯¯/£F¢k×®L:€O?ý”Q£FQ¿~} ,È´iÓ8yò¤¹€©««+^^^œ8q‚ääd"##©_¿þË_ô+fÑ¢E„„„pùòe‚‚‚ ÅÖÖ€€€óØ<½^ÏÑ£G)[¶ìs¿{÷îü÷¿ÿåÔ©SŒ=šýë_$''ÁŠ+ˆeêÔ©:t'''¾øâ ókýýýÍu°Ö­['?_!! –9œ¯¿þ:'OžäßÿþwºmMš4a×®]$&&õÒ_€üùçŸFΞ=›n|¦i˜[Èà Þ† hÕª•”kxžžžŒ9’5jЭ[·tc¡ÜÝÝ)P gÏžeÍš5´k×î¥ÎÕ±cGnݺEll,[¶l¡M›6é°wìØ‘7šwîܙիW°lÙ2ºwïþRç"7‘KˆîôéÓüþûï899=1æFÓ4š6mjž®ÿ² ÎÙ³gqwwÇÖÖWW×' \ž;wŽüùó›§%x_ýµTt š¦ñàÁ|||žØÖ³gO–-[f‘ÇÑÑOOOîܹC||<ÞÞÞé¶{{{§[ÇÝÝ‚ ²cÇ”R”(Qâ¥Î/Dn" –9˜Éd¢_¿~|ñÅ„††ôÄ"¼½zõbóæÍ/]«())É<¨R»‡~þùgóö¸¸8Ž=JÆ ÍÏišF`` ¶¶¶éÊ ˆgwõêU¦NÊÞ½{9rä Þ°nÝ:lll^z¶æÙ³g9uêÞÞÞT¬X‘Í›ÓÏìß¼y3•+WN÷\Ïž=éÖ­›´^ ñ)Ó D6kÖ,jÔ¨AãÆÔb£ãÆãóÏ?7ïS¾|yâââ¸xñbº×oٲŀÏ>ûŒÀÀ@¢¢¢¨Zµ*Ë–-cîܹ)R„7n˜1fÌË_ø+¤ÿþ|òÉ'Ô¨Qƒ!C†̲eËÌÛmmm™1c†¹vÕ£”RܹsÇüØÕÕÕ¼üMš¤¤$nß¾ÍÖ­[Y´hAAA*Tˆ^½zñé§Ÿ2þ|úôéCXXß|ó ?þøcº×0aÂ:vìȉ',|õBä\’` ‘ƒ5hЀ   óã#F˜™úé§xyy¥Û¿Zµjæ2:u¢jÕªæm‹´··gãÆhšFþüùY¼xqºåQJ—.ÍÁƒ‰ŠŠâöíÛ›×*twwgÅŠOÄ;bÄ (ð’WýêˆŠŠ¢B… têÔ HM¶öïßÏÉ“')X° ¹ËÐßßßüš×_4M£jÕªæE½&NœhNÆ!uüÞ‚ Xºt)%K–dÀ€æs¹»»³gÏÆÏ’%K(\¸0Ë—/§V­ZT®\lmmÍkº¹¹™+ÿ ñª“Jî9TrµäÄJî/B*¹?[%÷œH*¹[Tr·ƒ%„Baa’` !„BX˜$XB!„& –B!„…I‚%„Baa’` !„BX˜ÔÁB¼4ƒÁÀõë×¹qãñññ¸»»S¸pa .Œ£££µÃBˆ,' –â¹]¸p°°0vïÞÍ®]»8{ö¬y›««+‰‰‰¤Õióöö¦aÆ4lØÿ'ŠŸŠì+%%…ƒrèÐ!nܸÁÍ›7IHH @,X%JP¿~}J•*eíP…Èv¤‹PñLL&7n¤uëÖ”)S†iÓ¦¡”bäÈ‘:tˆ¸¸8’’’xðàIIIÄÅÅqøðaÆŒƒ¦iL›62eÊкuk6mÚ„Éd²ö%‰ Ü¿Ÿ/¾ø‚V­Z‘?~4hÀ¼yóصkñññ888Ëúõë5j^^^”)SƼœŽ"•´` !þÖ­[· eþüùüõ×_¼óÎ;:tèo—D±³³£hÑ¢-Z”jժѷo_Ž9¼yóxûí·)Z´(AAAôíÛ—üùógÕ刧ˆeîܹ„††R´hQºtéÂðáé[·....O}Ý•+Wˆˆˆ ,,Œ:àååŇ~H÷îÝÿöuBävÒ‚%„ÈPtt4}úôÁÓÓ“E‹ñÁpåÊ.\øÂëÍU«V… råÊ ÄÂ… ñôô¤_¿~\¸pÁÂW žÅŽ;hß¾=*Tà?þ`åÊ•œ:uЉ'Ò´iÓL’J”(A×®]Y¼x1—/_¦OŸ>|üñÇ”,Y’‘#GréÒ¥,º!²I°„ÈöìÙâE‹HLLÌÔó ¾ùæÞxã Þxã nݺźuë8}ú4ÁÁÁ¸»»[ä<îîîsúôiÖ®]Ë7ˆˆˆ°È±s²¬ê6Õëõ„††R­Z5Ú´iC‘"E8rä[·n¥M›6hšöBÇuwwgذaÄÆÆòÕW_±{÷n¼½½™9s¦…¯@ˆìO,!²¹úöíËøñã)Q¢ƒæÌ™3=Ç… 9r$žžž :???ó8›€€€þÂý'š¦Àúõë‰åí·ßΔóäžžžtêÔ‰aÆqþüùL9G\\ãÆ£T©RŒ?ž.]ºpéÒ%.\HåÊ•-v[[[Þzë-vïÞMdd$o¼ñ;¾9$XBdsÅŠcâĉ\¼x‘ pàÀ*V¬HË–-Ù°aà ·z(¥Øºu+íÛ·ÇÛÛ›ððpf̘ÁåË—™6mZ–Ïöóòò¢Y³fYzÎìäÈ‘#,Y²„ßÿråÊñæ›oZ¬U/::š=zàååÅÖ­[™3gçÏŸgÔ¨Q(PÀ"çxšZµj±|ùr¶oßž©ç"»‘KˆÂÞÞžýë_DDDpäÈJ—.M×®])[¶,C‡eݺuܺuëoqçÎ6nÜHHH+V¤}ûö(P€ýû÷IÏž=¥n••ØÚÚÒ±cGvîÜItt4nnnP³fM–-[†Á`x®ã¥¤¤ðã?Ò AêÕ«Grr2;wî$**Š®]»bg—µsœÜÜܲô|BX›–V«F䚦Õöeן]‡ðññaÚ´iÖ%×»wï+V¬`Ë–-ìÙ³‡Û·oSºtiŠ+F‘"EÈŸ??ñññüõ×_\»vsçΑ7o^êׯ¿¿?={ö”|ÙØõë×Y°`óçÏçÁƒüßÿý7¦nݺ”(Q‚¢E‹’/_>î߿ϵk׸zõ*QQQDDD°gÏ4M£ÿþ 8’%KZûrr¥Ù³g³víZÂÃíJ†<<< wîÜé ”ÚlíX^5’`å@’`‰Œ(¥8yò$Ççúõë\¿~øøxòåËg®ª^¹re*W®Œ4^ç$IIIìÙ³‡ððps+”^¯R[¾ŒF#ÔªU‹ÆÓ¤I5j„³³³5CÏõ$ÁO#u°„È%4MÃ××___k‡",ÌÁÁ???üüüÌÏݽ{—›7orçÎòæÍKÁ‚qww¦ ±±±xzzÊÀs!2‘$XBˆ %''£ÓéÈ›7¯µCÈ—/ùòå{¡×Ž=š&MšðÞ{ïY8*!Dé'BdhãÆ¼öÚkÖCX؉'øá‡˜:u*IIIÖGˆ\K,!„x…Lš4 “ÉÄÅ‹ µv8BäZ’` !Ä+"­õ*´b ‘y$ÁBˆWDZëUiÅ"óÈ w!„x¤¤¤P¿~}êÖ­Ë®]»(R¤*TÈôJîB¼ª$ÁBˆW€ƒ `íÚµÔ©S‡àà`+G%Dî%]„B!„& –B!„…I‚%„Baa’` !„BX˜$XB!„& –B!„…I‚%„Baa’` !„BX˜ÍÁΟ?oí2”˜˜ÈÝ»w³m|âÙ\¿~””ù9æBz½žøøxùÙZÀíÛ·ÑëõÙö½4™LšµcxUiJ)kÇ ž“¦iu}ÖŽC!DŽÐJ)µÙÚA¼j$ÁÊ4M³ܬ‡ÈõÚS׬ˆ°¸_€0`¶µYâR*ÅÚA¼j¤‹0RJ;ÖŽCänš¦%&¥”ü®å2š¦¥zùÙ ‘yd»B!„…I‚%„Baa’` !„BX˜$XB!„& –B!„…I‚%„Baa’` !„BX˜$XB!„& –B!„…I‚%„Baa’` !„BX˜$XB!„& –B!„…I‚%„Baa’` !„BX˜$XB!„& –B!„…I‚%„Baa’` !„BX˜$XB!„& –B!„…I‚%„Baa’` !„BX˜$XB!„& –B!„…I‚%„Baa’` !„BX˜$XB!„& –B!„…I‚%„Baa’` !„BX˜$XBñ Ð4ÍNÓ´hMÓ®¾À`MÓ®išö¥µc"7’K!^J©`)P(~x›oŰ„ȵ$ÁB¤£iš«¦iišûÛµc/mpå‘Ç?+¥ŽY+!r3I°„û¬&µ+)8ä±bL”R`ZÚC`¢Ã"W“Kñ¸¯€k=7[)uÇÁ‹KkÅ’Ö+M3v IDAT!2‘¦”²v BˆlFÓ´``ÖÇwÒ’`嚦 vI‚%Dæ‘KñMÓœX (0Q)5Áº KÒ4MSòá/D¦’.B!Ä”R:àSR[¯f[9aa’\ ‘ùdVâi¾tÒ5(„ÏOº…B!,Lº…B!,L,!„B “1XB‘Khšf ”&uö§ó#7—Ç;&@$>ü÷ñ[pA)õxM4!Ä3K!rMÓJ>@y ¼‹‹KÀÇÆÆ¦„Éd²µµµUF'''£“““rqqQ®®®ÊÕÕUsuuÕòäÉc“’’¢ÔƒL‰‰‰$&&j:NKLL´1 ¶III6J)ÍÁÁAçèèx!99ù„Á`8Äg€“J©»V|„ÈÖd»¯ ‡u® ’Ú²á¸fpß 0Ú‘Hj‹Fâco+¥duü¯MÓ<€¦¶¶¶­u:§³³sŠ··w’¯¯¯}¥J•ì+T¨@ùòå©P¡îîî9ï•+W8sæ 111ÄÄÄpâÄ ÃÉ“'M—/_v4š³³ó‰‰‰€0`ÏÃ¥x„H‚%D®õHwQ ‚¦i]\\^3™Låu:]!@KÛ×ÞÞÞèèèhtrr2999)gggåèèHRR‰‰‰èõz½^o“””d›œœlûè熓“S¼­­íŸz½þ˜Ñh}šÓ§O›Ž?n8}ú´M||¼£ÉÉÉépbbâz`+°_)e̤ËÏñ&Äþ=”Rìììì7n¬ZµjåЬY3*W®líŸ*))‰ÈÈH¶oßÎÆu‡rttt¼®×ë—*¥¾SJµvŒBd5I°„ÈÁ4M+4wpph¥iZ‹¤¤¤|¯½öš¾M›6ÎÍš5£Zµj(P Ëãºÿ>Çç·ß~cãÆúýû÷;ØØØèíììvètº_€­J©Ø,,›y˜×·µµ}ÇÖÖ¶«¦i®íÛ·§{÷îv-Z´ÀÁÁÁÚ!¾Û·oóÃ?°lÙ2Cdd¤£““S¬N§[|§”:kíø„È ’` ‘ÃhšVø—‹‹Ë¿«xzzêÛ´iã`ãç燇‡‡µC|BBBááálÛ¶MýòË/†³gÏ:9;;_Ðét‹•¯Ú—®¦i55MëâèèØ3%%¥PóæÍSzôèáЮ];\]]­žE]¾|™U«V±dÉý‰'œœêtºeÀ÷J©ËÖŽOˆÌ" –9€¦in@'—¾:®AéÒ¥“úöíëÔµkWÊ–-kíðžÛåË—ùñÇYºt©þÈ‘#Ž...G«•R×­_fÒ4í5àHž>>Ö+K¬]»–Ï>ûŒ¨¨(ÜKII±Ìh|!þ¿½»Šêº8þ½»°,H¤ &ƒÆ¡*‰/1T oâcAð ð…¤¦êŒŽ&6¶4mÓǘ¤ÓÑ6ÑFj"Jy5Р0°˜ˆL *­ ¢$U¡"ò²‹ûrž?|ØJ4I“ »Áó™ù wwïÝóÛsG÷7gï=ÇÉK’씢( R«Õ>c4ÿÇÃÃòtéRMBB‚âïïoëôúÌÙ³gÉÌÌ$%%ÅÐÐРÑjµ¥z½~''„h·u~}MQ”ñÀ‰ßüæ7äääP__ÏŒ3HHH 66¶Ïî´õõõdff’™™IMM AAAŒ7Ž;v´ †þõa%é²À’$;åèèø¥Åby800Püú׿VEEE¡RõïÅÊËËÙ¸q£ÐétÂh4š-Ëó"¤oÐS`éõz´Z-•••dff’MKK ‘‘‘ÄÇÇó³Ÿý ggg[§û½\¾|™ììl233©¨¨Àßߟøøxâââxøá‡),,$&&æš^¯·¿ß³%©ÈK’씋‹KsTTÔપ*gÑ¢EDGG÷«ëtL&EEE¤§§³oß>xàBBBHOOGñßßÞø#ñÕ«‡‚ÒÒR233ÉÉÉ¡««‹   BCC a„ v[`wuuQVVFII :Ž“'OâããC\\ñññøøøôÚ_XÒýÀ>ÿµJ’„¢(–¸¸8êêê(++cäÈ‘<ÿüó<ôÐC,Z´ˆƒb2™læ÷V^^ÎêÕ«ñôôdáÂ…888ðá‡ráÂ^|ñE[§wÏ)ŠÂôéÓÙ¾};—/_F§ÓD~~>“'OfðàÁÌ;—wß}—3gÎ`±Xl–kwwwÏh#ÁÁÁ¸»»3þ|NŸ>Í3Ï<éS§¨©©áÕW_½­¸’¤û…Á’$;5`À€¦ôôôçÌ™c}®g´'--}ûö¡Õj !<<œ°°0›N>ùm®\¹‚N§£¸¸˜ââbšššˆˆˆ`ñâÅDEEáââbÝ÷äÉ“L˜0á¾Áú&>|N‡N§ãÔ©S899áíím½½çoÏg?”Ùl¦¡¡¡×Lî=Û_~ù%jµš'Ÿ|’ÐÐPBCC ÄÁá¿[}MŽ`I÷Y`I’ºSu«ŽŽŠŠŠ¬K}}=>>>„……Npp0¼ÇYÿGww7GŽ¡¸¸˜¢¢"ª««ñôô´æÎàÁƒïx¬,°¾Ù¿ÿýoNŸ>M]]5jkk9{ö,¨T*œ­ÉöÄ­- ]]]èõzkÜúØ`0 „`ðàÁÖî«ÅÜ­Eñw! ,é~ {–¤)WWWbcc‰àܹsÖb&11‘öövFŒAÏÌí·þ:thŸåÑÜÜÌ™3g¬£=ÛgÏžÅÁÁiÓ¦±téRÂÂÂxì±Çú¬ÝûÙ Aƒxê©§xê©§n{íÒ¥K466òÿ 8ÓÙÙiݾ5Ôj5..._®®®xyyõ»»%é^‘–$õ#GŽdÅŠ¬X±³ÙLuu5555ÖÂçðáÃÔÕÕÑÞÞŽ««+îîî½¾P Ðk[«ÕÒÝÝ}Û—ô­Ûmmm´µµ¡ÕjñööÆÇLJQ£F…¯¯/O<ñNNN¶îšûÊСCû´€–$éû‘–$õCjµî4_Vcc#µµµ477÷úIè«Ûh4† ‚——×fòððàÑGeøðáv{‡›$I’-ÈK’î3žžžxzzÚ: I’¤~MX’$I÷ˆ¢(îÀJ€7ZﺋeìØ±w<¦¬¬ŒcÇŽ±nݺ>É¡²²’üü|Z[[ñ÷÷·^¯÷¯ý‹1cÆôI’$Éy°$I’î¥nà À¸qã:t(þóŸqttüÚZ[[ihhè“Æ?ûì3ž{î9¦L™B\\---ÔÔÔðÚk¯õI’$Ý$G°$ÉÎ(Š2Xåèè8 ++‹“'O°`Á‚¯a8tèŸþ9«W¯þÁí×××sâÄ æÍ›÷_Cnnîn»¿Bt)Šò1ÀÌ™3™={6ÉÉÉŒ=¸ywîÜ ÀÊ•+  ¥¥… `0X·nÁÁÁœ9s†÷ߟ˗/ÓÑÑArr2+W®¤½½1cÆðË_þ’áÇ÷j¿  €ÈÈHÂÃØÎÍÍÅl6“””Äï~÷;ÚÚÚ¬çqúôéüô§?eèСQZZ À”)S?~<Š¢àèèÈ;ï¼CTTÛ·o§¸¸ø¶6GŒAMM /¼ðUUUøúú¢×ëoÛoÿþý,[¶ FCbb":ÎúZ||<îîî(ŠBKK kÖ¬!::šššŠŠŠ0™L|öÙgÌš5 .\h=6''‡ãdzuëV,‹ÛWý)IöFþD(Iv,99™ˆˆ¢££¸pá7n$??ƒÁÀìÙ³©¨¨@§ÓY ®ÈÈHª««ikkãwÞ¡¼¼???ºººØµk$77—­[·²iÓ¦¯mÿüùó”––²oß>ªªªxã7ÈÊÊâÃ?¤¶¶–¢¢"vìØA{{;ÕÕÕìܹ“¬¬,ZZZHHH ¬¬ŒU«V1oÞ<Þ~ûm¶lÙ‘#Ghnn楗^¢  ³ÙLdd$Ÿ~ú)ýë_yâ‰'Ø·oÀÀp7ûØؽ{w¯©-ÜÜÜ ä·¿ý-6lÀÝÝ¢¢"ÚÚÚ¬û]»v www, ƒ ²>¿gÏ:::ÈËËãâÅ‹LŸ>ýŽ«T*¬QZZЇ‡BügUAƒqíÚ5ôz=®®ÿ©q=<<¬Ûëׯ筷ÞbìØ±¼þúëtvvâàà€F£Á`0 Õjijj²îÿ“Ÿü„U«VqúôiJJJ f³9ôûu¡$Ù?Y`I’2™LμòÊ+ÖçöîÝ‹ÙlæW¿úW¯^µŽ =ýôÓÖkn(//nŽ~ôÌ ®V«ùãÿHee%*•Š .|c°páBÜÜÜæ¿ø`õêÕ8::²dÉ^}õU>øà:;;­w¼544P__Ï#<š5k áïÿ;®®®ddd`±XHJJàúõë9r„   –/_ÞÓüP!DíìJ»¡(Ê``3@ii©õâöÑ£G͆ ˜2e 'N¤¢¢‚Ù³gpüøqÒÓÓqvvæóÏ?ÇßߟÊÊÊ^ï­V«¹xñ"ÕÕÕlݺE¹}•¡ŒŒ ŒF#þþþÖ÷§NŠ¢(ÔÔÔpèÐ!ÆŒCLL o½õîîîìÞ½›¨¨¨¯ýLgΜáÒ¥Kdggܼ+rùòå„……‘Íã?@bb"›6mbêÔ©ˆ›Ë MöýÐ~•${$ ,I²CŠ¢LS©TÎk×®íõEéææÆäÉ“yñÅ›£|ùå—wå¸zõj¯‡ôôt, û÷ïçìÙ³ßøÅÙ£gôB¥Ra6››£­­­´··c±X¬ù…††òì³ÏZóëeÉËË#00ÒÒRƇ››¼üòËÖ¶ÜÝÝqrrb÷îÝL™2 OQ”9ý¨Èrö+ª««­Ó4xxxàëëKEE{÷îeóæÍ<öØc8;;ãëëË®]»¨¯¯§««‹Ã‡£( Æ cþüùÖ7ž;w.z½ž´´4V®\É„ nk|Ò¤IdggsôèQüüü(..¶®'˜ššJII ...DDD0lØ0²²²˜;w.!!!Ìš5‹GyÄú~ÉÉɤ¤¤ V«INN¦»»€×^{£GR]]Mtt4nnn,_¾œ'Ÿ|’M›6a±X4À•»ÐÇ’dl}˜ 2zà 49::¶'%%‰ÜÜ\‘››+êêêÄõë×…¯¯¯ÈÎÎuuub÷îÝ¢³³SìÙ³G<ôÐC"++Kdgg‹ñãÇ !„(--K–,=RRRÄÏþsQUU%ŨQ£ÄWÝz‘ûË/¿,RSS­¯õ\Ì®ÓéÄŒ3Dyy¹X¹r¥2dˆBˆ‹/Š1cƈ¼¼ˆ··7Gåƒ>`óæÍŒ;FƒŸŸ)))ÔÔÔ`4ùä“Oðòò²þl€Éd"##ƒµk×òé§ŸÞÖ¸···uІ3fôºÎçùçŸ $$www233‰‹‹Ã×׸¹Þ'Ÿ|BVVEEE`41™Lüá@£ÑžžNEEþþþTTT““ÃæÍ›ñó󳮃˜‘‘ÑÓäF!D]Ÿö®t× >œªª*Hii©uK’î'ŠâÛ÷’$éž0`@SzzúƒsæÌ±u*÷ÜÉ“'™0aâæu:ýŠ¢(ãz½­Vkëtl¢°°˜˜˜kz½ÞÝÖ¹HÒÝ"§i$I’$Iêc²À’$I’$Iêc²À’$I’$Iêc²À’$I²ži.îGW®ÈÙ¤þOX’$I÷V«F£¹4|øpKDDDwzz:¶Îé®ûâ‹/xóÍ7ñõõ5$&&"„8nëœ$én’–$Ù1£Ñhël¢gBÓþHñÅ76›ÍSu:Ý{Ë–-k4hyÞ¼yƼ¼<ëdýAss3Û¶m#00°{Ĉüþ÷¿?[[[û¿ÀHƒÁbëü$én’Ó4H’Òjµ•&“iBhh¨)11Qmu»?2›Í”””ššjÜ»w/&“éºÑhlë¼î6EQÔÀÓŽŽŽ‹¹F3þ|U\\œzÚ´i8;;Û:ÅïäÊ•+ò·¿ýíÆ¡C‡œœœ. †]BˆL!Ä)[ç'I÷Š,°$ÉŽ)Šò¤ƒƒÃR•JµH¥R¹ÄÆÆ²dɇÐÐPë2+?vÇŽ#--Í’––flooŠ¢|h4S¢ÿeÝ¢(N@¤V«]b±XfZ,§I“&###µ!!!Lœ8µZmë4{éèèàðáÔ””ˆêêꜵZmÓ7ö˜Íæt!D…­s”$[–$ý(ŠâDh4šD‹ÅíêêÊâÅ‹âããU“&M²»/ÝoóÏþ“œœvîÜ©¿té’“££cIwww °OÑeëüìÁÿl=„0`¶Á`˜¨ÑhDpp°%""ÂéñÇÇÇLJaÆÝqaç»Áh4rîÜ9jkk©¬¬äàÁƒúãÇ;©Õj½Z­þØ`0äfa,gß—î{²À’¤EQ\X­Vûì7¦9;;›CCCEdd¤&<<œ#FØ:ÅÛ\¾|NGAA©°°Ð|õêUV«=i0vÙBˆf[çhïEq¦*ŠêââyãÆ‘F£ÑY£Ñ˜¼¼¼nøùù9Œ=ZÓSt9;;ãâ₳³³5z÷Œ~vww£×ë­ÑÕÕeÝîèèàüùóÔÕÕqêÔ)ÃéÓ§Ecc£Öb±(Z­öš¢(Ÿéõúƒ€¨ºßF%éÛüÃeëq*æIEND®B`‚idzebra-2.0.44/doc/zebrasrv-virtual.xml0000644000175000017500000001646011412332551014757 00000000000000 The Virtual hosts mechanism allows a &yaz; frontend server to support multiple backends. A backend is selected on the basis of the TCP/IP binding (port+listening address) and/or the virtual host. A backend can be configured to execute in a particular working directory. Or the &yaz; frontend may perform &acro.cql; to &acro.rpn; conversion, thus allowing traditional &acro.z3950; backends to be offered as a &acro.sru; service. &acro.sru; Explain information for a particular backend may also be specified. For the HTTP protocol, the virtual host is specified in the Host header. For the &acro.z3950; protocol, the virtual host is specified as in the Initialize Request in the OtherInfo, OID 1.2.840.10003.10.1000.81.1. Not all &acro.z3950; clients allows the VHOST information to be set. For those the selection of the backend must rely on the TCP/IP information alone (port and address). The &yaz; frontend server uses &acro.xml; to describe the backend configurations. Command-line option -f specifies filename of the &acro.xml; configuration. The configuration uses the root element yazgfs. This element includes a list of listen elements, followed by one or more server elements. The listen describes listener (transport end point), such as TCP/IP, Unix file socket or SSL server. Content for a listener: CDATA (required) The CDATA for the listen element holds the listener string, such as tcp:@:210, tcp:server1:2100, etc. attribute id (optional) identifier for this listener. This may be referred to from server sections. We expect more information to be added for the listen section in a future version, such as CERT file for SSL servers. The server describes a server and the parameters for this server type. Content for a server: attribute id (optional) Identifier for this server. Currently not used for anything, but it might be for logging purposes. attribute listenref (optional) Specifies listener for this server. If this attribute is not given, the server is accessible from all listener. In order for the server to be used for real, however, the virtual host must match (if specified in the configuration). element config (optional) Specifies the server configuration. This is equivalent to the config specified using command line option -c. element directory (optional) Specifies a working directory for this backend server. If specified, the &yaz; frontend changes current working directory to this directory whenever a backend of this type is started (backend handler bend_start), stopped (backend handler hand_stop) and initialized (bend_init). element host (optional) Specifies the virtual host for this server. If this is specified a client must specify this host string in order to use this backend. element cql2rpn (optional) Specifies a filename that includes &acro.cql; to &acro.rpn; conversion for this backend server. See &acro.cql; section in &yaz; manual. If given, the backend server will only "see" a Type-1/&acro.rpn; query. element explain (optional) Specifies &acro.sru; ZeeRex content for this server - copied verbatim to the client. As things are now, some of the Explain content seems redundant because host information, etc. is also stored elsewhere. The format of the Explain record is described in detail, with examples, on the file at the ZeeRex web-site. The &acro.xml; below configures a server that accepts connections from two ports, TCP/IP port 9900 and a local UNIX file socket. We name the TCP/IP server public and the other server internal. tcp:@:9900 unix:/var/tmp/socket server1.mydomain /var/www/s1 config.cfg server2.mydomain /var/www/s2 config.cfg ../etc/pqf.properties server2.mydomain 9900 a /var/www/s3 config.cfg ]]> There are three configured backend servers. The first two servers, "server1" and "server2", can be reached by both listener addresses - since no listenref attribute is specified. In order to distinguish between the two a virtual host has been specified for each of server in the host elements. For "server2" elements for &acro.cql; to &acro.rpn; conversion is supported and explain information has been added (a short one here to keep the example small). The third server, "server3" can only be reached via listener "internal". idzebra-2.0.44/doc/zebra.xml0000644000175000017500000000525011412332551012533 00000000000000 %local; %entities; %idcommon; ]> &zebra; - User's Guide and Reference &adam; &heikki; &marccromme; &mike; &sebastian; &version; ©right-year; Index Data &zebra; is a free, fast, friendly information management system. It can index records in &acro.xml;, &acro.sgml;, &acro.marc;, e-mail archives and many other formats, and quickly find them using a combination of boolean searching and relevance ranking. Search-and-retrieve applications can be written using &acro.api;s in a wide variety of languages, communicating with the &zebra; server using industry-standard information-retrieval protocols or web services. This manual explains how to build and install &zebra;, configure it appropriately for your application, add data and set up a running information service. It describes version &version; of &zebra;. &chap-introduction; &chap-installation; &chap-tutorial; &chap-architecture; &chap-querymodel; &chap-administration; &chap-recordmodel-domxml; &chap-recordmodel-alvisxslt; &chap-recordmodel-grs; &chap-field-structure; Reference The material in this chapter is drawn directly from the individual manual entries. &manref; &app-license; &gpl2; &app-indexdata; idzebra-2.0.44/doc/zebrasrv-options.xml0000644000175000017500000002401311412332551014755 00000000000000 -a file Specify a file for dumping PDUs (for diagnostic purposes). The special name - (dash) sends output to stderr. -S Don't fork or make threads on connection requests. This is good for debugging, but not recommended for real operation: Although the server is asynchronous and non-blocking, it can be nice to keep a software malfunction (okay then, a crash) from affecting all current users. The server can only accept a single connection in this mode. -1 Like -S but after one session the server exits. This mode is for debugging only. -T Operate the server in threaded mode. The server creates a thread for each connection rather than a fork a process. Only available on UNIX systems that offers POSIX threads. -s Use the SR protocol (obsolete). -z Use the &acro.z3950; protocol (default). This option and -s complement each other. You can use both multiple times on the same command line, between listener-specifications (see below). This way, you can set up the server to listen for connections in both protocols concurrently, on different local ports. -l file Specify an output file for the diagnostic messages. The default is to write this information to stderr -c config-file Read configuration information from config-file. The default configuration is ./zebra.cfg -f vconfig This specifies an &acro.xml; file that describes one or more &yaz; frontend virtual servers. See section VIRTUAL HOSTS for details. -C fname Sets SSL certificate file name for server (PEM). -v level The log level. Use a comma-separated list of members of the set {fatal,debug,warn,log,malloc,all,none}. -u uid Set user ID. Sets the real UID of the server process to that of the given user. It's useful if you aren't comfortable with having the server run as root, but you need to start it as such to bind a privileged port. -w working-directory The server changes to this working directory during before listening on incoming connections. This option is useful when the server is operating from the inetd daemon (see -i). -p pidfile Specifies that the server should write its Process ID to file given by pidfile. A typical location would be /var/run/zebrasrv.pid. -i Use this to make the the server run from the inetd server (UNIX only). Make sure you use the logfile option -l in conjunction with this mode and specify the -l option before any other options. -D Use this to make the server put itself in the background and run as a daemon. If neither -i nor -D is given, the server starts in the foreground. -install Use this to install the server as an NT service (Windows NT/2000/XP only). Control the server by going to the Services in the Control Panel. -installa Use this to install and activate the server as an NT service (Windows NT/2000/XP only). Control the server by going to the Services in the Control Panel. -remove Use this to remove the server from the NT services (Windows NT/2000/XP only). -t minutes Idle session timeout, in minutes. Default is 60 minutes. -k size Maximum record size/message size, in kilobytes. Default is 1024 KB (1 MB). -d daemon Set name of daemon to be used in hosts access file. See hosts_access 5 and tcpd 8 . A listener-address consists of an optional transport mode followed by a colon (:) followed by a listener address. The transport mode is either a file system socket unix, a SSL TCP/IP socket ssl, or a plain TCP/IP socket tcp (default). For TCP, an address has the form hostname | IP-number [: portnumber] The port number defaults to 210 (standard &acro.z3950; port) for privileged users (root), and 9999 for normal users. The special hostname "@" is mapped to the address INADDR_ANY, which causes the server to listen on any local interface. The default behavior for zebrasrv - if started as non-privileged user - is to establish a single TCP/IP listener, for the &acro.z3950; protocol, on port 9999. zebrasrv @ zebrasrv tcp:some.server.name.org:1234 zebrasrv ssl:@:3000 To start the server listening on the registered port for &acro.z3950;, or on a filesystem socket, and to drop root privileges once the ports are bound, execute the server like this from a root shell: zebrasrv -u daemon @ zebrasrv -u daemon tcp:@:210 zebrasrv -u daemon unix:/some/file/system/socket Here daemon is an existing user account, and the unix socket /some/file/system/socket is readable and writable for the daemon account. idzebra-2.0.44/doc/administration-extended-services.html0000644000175000017500000004317311412336551020252 0000000000000010. Extended Services: Remote Insert, Update and Delete

    10. Extended Services: Remote Insert, Update and Delete

    Note

    Extended services are only supported when accessing the Zebra server using the Z39.50 protocol. The SRU protocol does not support extended services.

    The extended services are not enabled by default in zebra - due to the fact that they modify the system. Zebra can be configured to allow anybody to search, and to allow only updates for a particular admin user in the main zebra configuration file zebra.cfg. For user admin, you could use:

         perm.anonymous: r
         perm.admin: rw
         passwd: passwordfile
        

    And in the password file passwordfile, you have to specify users and encrypted passwords as colon separated strings. Use a tool like htpasswd to maintain the encrypted passwords.

     
         admin:secret
        

    It is essential to configure Zebra to store records internally, and to support modifications and deletion of records:

         storeData: 1
         storeKeys: 1
        

    The general record type should be set to any record filter which is able to parse XML records, you may use any of the two declarations (but not both simultaneously!)

        
         recordType: dom.filter_dom_conf.xml
         # recordType: grs.xml
        

    Notice the difference to the specific instructions

        
         recordType.xml: dom.filter_dom_conf.xml
         # recordType.xml: grs.xml
        

    which only work when indexing XML files from the filesystem using the *.xml naming convention.

    To enable transaction safe shadow indexing, which is extra important for this kind of operation, set

         shadow: directoryname: size (e.g. 1000M)
        

    See Section 2, “The Zebra Configuration File” for additional information on these configuration options.

    Note

    It is not possible to carry information about record types or similar to Zebra when using extended services, due to limitations of the Z39.50 protocol. Therefore, indexing filters can not be chosen on a per-record basis. One and only one general XML indexing filter must be defined.

    10.1. Extended services in the Z39.50 protocol

    The Z39.50 standard allows servers to accept special binary extended services protocol packages, which may be used to insert, update and delete records into servers. These carry control and update information to the servers, which are encoded in seven package fields:

    Table 6.1. Extended services Z39.50 Package Fields

    ParameterValueNotes
    type'update'Must be set to trigger extended services
    actionstring Extended service action type with one of four possible values: recordInsert, recordReplace, recordDelete, and specialUpdate
    recordXML stringAn XML formatted string containing the record
    syntax'xml'XML/SUTRS/MARC. GRS-1 not supported. The default filter (record type) as given by recordType in zebra.cfg is used to parse the record.
    recordIdOpaquestring Optional client-supplied, opaque record identifier used under insert operations.
    recordIdNumber positive numberZebra's internal system number, not allowed for recordInsert or specialUpdate actions which result in fresh record inserts.
    databaseNamedatabase identifier The name of the database to which the extended services should be applied.

    The action parameter can be any of recordInsert (will fail if the record already exists), recordReplace (will fail if the record does not exist), recordDelete (will fail if the record does not exist), and specialUpdate (will insert or update the record as needed, record deletion is not possible).

    During all actions, the usual rules for internal record ID generation apply, unless an optional recordIdNumber Zebra internal ID or a recordIdOpaque string identifier is assigned. The default ID generation is configured using the recordId: from zebra.cfg. See Section 2, “The Zebra Configuration File”.

    Setting of the recordIdNumber parameter, which must be an existing Zebra internal system ID number, is not allowed during any recordInsert or specialUpdate action resulting in fresh record inserts.

    When retrieving existing records indexed with GRS-1 indexing filters, the Zebra internal ID number is returned in the field /*/id:idzebra/localnumber in the namespace xmlns:id="http://www.indexdata.dk/zebra/", where it can be picked up for later record updates or deletes.

    A new element set for retrieval of internal record data has been added, which can be used to access minimal records containing only the recordIdNumber Zebra internal ID, or the recordIdOpaque string identifier. This works for any indexing filter used. See Section 4, “Retrieval of Zebra internal record data”.

    The recordIdOpaque string parameter is an client-supplied, opaque record identifier, which may be used under insert, update and delete operations. The client software is responsible for assigning these to records. This identifier will replace zebra's own automagic identifier generation with a unique mapping from recordIdOpaque to the Zebra internal recordIdNumber. The opaque recordIdOpaque string identifiers are not visible in retrieval records, nor are searchable, so the value of this parameter is questionable. It serves mostly as a convenient mapping from application domain string identifiers to Zebra internal ID's.

    10.2. Extended services from yaz-client

    We can now start a yaz-client admin session and create a database:

        
         $ yaz-client localhost:9999 -u admin/secret
         Z> adm-create
         
       

    Now the Default database was created, we can insert an XML file (esdd0006.grs from example/gils/records) and index it:

      
        
         Z> update insert id1234 esdd0006.grs
         
       

    The 3rd parameter - id1234 here - is the recordIdOpaque package field.

    Actually, we should have a way to specify "no opaque record id" for yaz-client's update command.. We'll fix that.

    The newly inserted record can be searched as usual:

        
         Z> f utah
         Sent searchRequest.
         Received SearchResponse.
         Search was a success.
         Number of hits: 1, setno 1
         SearchResult-1: term=utah cnt=1
         records returned: 0
         Elapsed: 0.014179
         
        

    Let's delete the beast, using the same recordIdOpaque string parameter:

        
         Z> update delete id1234
         No last record (update ignored)
         Z> update delete 1 esdd0006.grs
         Got extended services response
         Status: done
         Elapsed: 0.072441
         Z> f utah
         Sent searchRequest.
         Received SearchResponse.
         Search was a success.
         Number of hits: 0, setno 2
         SearchResult-1: term=utah cnt=0
         records returned: 0
         Elapsed: 0.013610
         
         

    If shadow register is enabled in your zebra.cfg, you must run the adm-commit command

        
         Z> adm-commit
         
        

    after each update session in order write your changes from the shadow to the life register space.

    10.3. Extended services from yaz-php

    Extended services are also available from the YAZ PHP client layer. An example of an YAZ-PHP extended service transaction is given here:

        
         $record = '<record><title>A fine specimen of a record</title></record>';
    
         $options = array('action' => 'recordInsert',
                          'syntax' => 'xml',
                          'record' => $record,
                          'databaseName' => 'mydatabase'
                         );
    
         yaz_es($yaz, 'update', $options);
         yaz_es($yaz, 'commit', array());
         yaz_wait();
    
         if ($error = yaz_error($yaz))
           echo "$error";
         
        

    10.4. Extended services debugging guide

    When debugging ES over PHP we recommend the following order of tests:

    • Make sure you have a nice record on your filesystem, which you can index from the filesystem by use of the zebraidx command. Do it exactly as you planned, using one of the GRS-1 filters, or the DOMXML filter. When this works, proceed.

    • Check that your server setup is OK before you even coded one single line PHP using ES. Take the same record form the file system, and send as ES via yaz-client like described in Section 10.2, “Extended services from yaz-client”, and remember the -a option which tells you what goes over the wire! Notice also the section on permissions: try

              perm.anonymous: rw
             

      in zebra.cfg to make sure you do not run into permission problems (but never expose such an insecure setup on the internet!!!). Then, make sure to set the general recordType instruction, pointing correctly to the GRS-1 filters, or the DOMXML filters.

    • If you insist on using the sysno in the recordIdNumber setting, please make sure you do only updates and deletes. Zebra's internal system number is not allowed for recordInsert or specialUpdate actions which result in fresh record inserts.

    • If shadow register is enabled in your zebra.cfg, you must remember running the

              Z> adm-commit
             

      command as well.

    • If this works, then proceed to do the same thing in your PHP script.

    idzebra-2.0.44/doc/grs-extended-marc-indexing.html0000644000175000017500000002603711412336551016722 000000000000005. Extended indexing of MARC records

    5. Extended indexing of MARC records

    Extended indexing of MARC records will help you if you need index a combination of subfields, or index only a part of the whole field, or use during indexing process embedded fields of MARC record.

    Extended indexing of MARC records additionally allows:

    • to index data in LEADER of MARC record

    • to index data in control fields (with fixed length)

    • to use during indexing the values of indicators

    • to index linked fields for UNIMARC based formats

    Note

    In compare with simple indexing process the extended indexing may increase (about 2-3 times) the time of indexing process for MARC records.

    5.1. The index-formula

    At the beginning, we have to define the term index-formula for MARC records. This term helps to understand the notation of extended indexing of MARC records by Zebra. Our definition is based on the document "The table of conformity for Z39.50 use attributes and RUSMARC fields". The document is available only in Russian language.

    The index-formula is the combination of subfields presented in such way:

         71-00$a, $g, $h ($c){.$b ($c)} , (1)
        

    We know that Zebra supports a BIB-1 attribute - right truncation. In this case, the index-formula (1) consists from forms, defined in the same way as (1)

         71-00$a, $g, $h
         71-00$a, $g
         71-00$a
        

    Note

    The original MARC record may be without some elements, which included in index-formula.

    This notation includes such operands as:

    #

    It means whitespace character.

    -

    The position may contain any value, defined by MARC format. For example, index-formula

    	 70-#1$a, $g , (2)
    	

    includes

    	 700#1$a, $g
    	 701#1$a, $g
    	 702#1$a, $g
    	
    {...}

    The repeatable elements are defined in figure-brackets {}. For example, index-formula

    	 71-00$a, $g, $h ($c){.$b ($c)} , (3)
    	

    includes

    	 71-00$a, $g, $h ($c). $b ($c)
    	 71-00$a, $g, $h ($c). $b ($c). $b ($c)
    	 71-00$a, $g, $h ($c). $b ($c). $b ($c). $b ($c)
    	

    Note

    All another operands are the same as accepted in MARC world.

    5.2. Notation of index-formula for Zebra

    Extended indexing overloads path of elm definition in abstract syntax file of Zebra (.abs file). It means that names beginning with "mc-" are interpreted by Zebra as index-formula. The database index is created and linked with access point (BIB-1 use attribute) according to this formula.

    For example, index-formula

         71-00$a, $g, $h ($c){.$b ($c)} , (4)
        

    in .abs file looks like:

         mc-71.00_$a,_$g,_$h_(_$c_){.$b_(_$c_)}
        

    The notation of index-formula uses the operands:

    _

    It means whitespace character.

    .

    The position may contain any value, defined by MARC format. For example, index-formula

    	 70-#1$a, $g , (5)
    	

    matches mc-70._1_$a,_$g_ and includes

    	 700_1_$a,_$g_
    	 701_1_$a,_$g_
    	 702_1_$a,_$g_
    	
    {...}

    The repeatable elements are defined in figure-brackets {}. For example, index-formula

    	 71#00$a, $g, $h ($c) {.$b ($c)} , (6)
    	

    matches mc-71.00_$a,_$g,_$h_(_$c_){.$b_(_$c_)} and includes

    	 71.00_$a,_$g,_$h_(_$c_).$b_(_$c_)
    	 71.00_$a,_$g,_$h_(_$c_).$b_(_$c_).$b_(_$c_)
    	 71.00_$a,_$g,_$h_(_$c_).$b_(_$c_).$b_(_$c_).$b_(_$c_)
    	
    <...>

    Embedded index-formula (for linked fields) is between <>. For example, index-formula

    	 4--#-$170-#1$a, $g ($c) , (7)
    	

    matches mc-4.._._$1<70._1_$a,_$g_(_$c_)>_ and includes

    	 463_._$1<70._1_$a,_$g_(_$c_)>_
    	

    Note

    All another operands are the same as accepted in MARC world.

    5.2.1. Examples

    1. indexing LEADER

      You need to use keyword "ldr" to index leader. For example, indexing data from 6th and 7th position of LEADER

      	 elm mc-ldr[6] Record-type !
      	 elm mc-ldr[7] Bib-level   !
      	
    2. indexing data from control fields

      indexing date (the time added to database)

      	 elm mc-008[0-5] Date/time-added-to-db !	
      	

      or for RUSMARC (this data included in 100th field)

      	 elm mc-100___$a[0-7]_ Date/time-added-to-db !
      	
    3. using indicators while indexing

      For RUSMARC index-formula 70-#1$a, $g matches

      	 elm 70._1_$a,_$g_ Author !:w,!:p
      	

      When Zebra finds a field according to "70." pattern it checks the indicators. In this case the value of first indicator doesn't mater, but the value of second one must be whitespace, in another case a field is not indexed.

    4. indexing embedded (linked) fields for UNIMARC based formats

      For RUSMARC index-formula 4--#-$170-#1$a, $g ($c) matches

      	 elm mc-4.._._$1<70._1_$a,_$g_(_$c_)>_ Author !:w,!:p
      	 

      Data are extracted from record if the field matches to "4.._." pattern and data in linked field match to embedded index-formula 70._1_$a,_$g_(_$c_).

    idzebra-2.0.44/doc/installation.xml0000644000175000017500000004125111412332551014132 00000000000000 Installation &zebra; is written in &acro.ansi; C and was implemented with portability in mind. We primarily use GCC on UNIX and Microsoft Visual C++ on Windows. The software is regularly tested on Debian GNU/Linux, Red Hat Linux, Gentoo Linux, SuSE Linux, FreeBSD (i386), MAC OSX, SunOS 5.9 (sparc), Windows 2000. &zebra; can be configured to use the following utilities (most of which are optional): &yaz; (required) &zebra; uses &yaz; to support &acro.z3950; / &acro.sru;. Zebra also uses a lot of other utilities (not related to networking), such as memory management and XML support. For the DOM XML / ALVIS record filters, &yaz; must be compiled with Libxml2 and Libxslt support and Libxml2 must be version 2.6.15 or later. iconv (optional) Character set conversion. This is required if you're going to use any other character set than UTF-8 and ISO-8859-1 for records. Note that some Unixes has iconv built-in. Expat (optional) &acro.xml; parser. If you're going to index real &acro.xml; you should install this (filter grs.xml). On most systems you should be able to find binary Expat packages. Tcl (optional) Tcl is required if you need to use the Tcl record filter for &zebra;. You can find binary packages for Tcl for many Unices and Windows. Autoconf, Automake (optional) GNU Automake and Autoconf are only required if you're using the CVS version of &zebra;. You do not need these if you have fetched a &zebra; tar. Docbook and friends (optional) These tools are only required if you're writing documentation for &zebra;. You need the following Debian packages: docbook, docbook-xml, docbook-xsl, docbook-utils, xsltproc.
    UNIX On Unix, GCC works fine, but any native C compiler should be possible to use as long as it is &acro.ansi; C compliant. Unpack the distribution archive. The configure shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a Makefile in each directory of &zebra;. To run the configure script type: ./configure The configure script attempts to use C compiler specified by the CC environment variable. If this is not set, cc or GNU C will be used. The CFLAGS environment variable holds options to be passed to the C compiler. If you're using a Bourne-shell compatible shell you may pass something like this: CC=/opt/ccs/bin/cc CFLAGS=-O ./configure The configure script support various options: you can see what they are with ./configure --help Once the build environment is configured, build the software by typing: make If the build is successful, two executables are created in the sub-directory index: zebrasrv The &acro.z3950; server and search engine. zebraidx The administrative indexing tool. index/*.so The .so-files are &zebra; record filter modules. There are modules for reading &acro.marc; (mod-grs-marc.so), &acro.xml; (mod-grs-xml.so) , etc. Using configure option --disable-shared builds &zebra; statically and links "in" &zebra; filter code statically, i.e. no .so-files are generated You can now use &zebra;. If you wish to install it system-wide, then as root type make install By default this will install the &zebra; executables in /usr/local/bin, and the standard configuration files in /usr/local/share/idzebra-2.0. If shared modules are built, these are installed in /usr/local/lib/idzebra-2.0/modules. You can override this with the --prefix option to configure.
    GNU/Debian
    GNU/Debian Linux on i686 Platform Index Data provides pre-compiled GNU/Debian i686 Linux packages at our Debian package archive, both for the Sarge and the Etch release. To install these packages, you need to add two lines to your /etc/apt/sources.list configuration file, either the Sarge sources found at deb http://ftp.indexdata.dk/debian sarge main deb-src http://ftp.indexdata.dk/debian sarge main or the Etch sources from deb http://ftp.indexdata.dk/debian etch main deb-src http://ftp.indexdata.dk/debian etch main After refreshing the package cache with the command apt-get update as root, the &zebra; indexer is easily installed issuing apt-get install idzebra-2.0 idzebra-2.0-doc
    Ubuntu/Debian and GNU/Debian on other platforms These &zebra; packages are specifically compiled for GNU/Debian Linux systems. Installation on other GNU/Debian systems is possible by re-compilation the Debian way: you need to add only the deb-src sources lines to the /etc/apt/sources.list configuration file, that is either the Sarge sources deb-src http://ftp.indexdata.dk/debian sarge main or the Etch sources deb-src http://ftp.indexdata.dk/debian etch main After refreshing the package cache with the command apt-get update apt-get build-dep idzebra-2.0 as root, the &zebra; indexer is recompiled and installed issuing fakeroot apt-get source --compile idzebra-2.0 as normal user. The compiled GNU/Debian packages can then be installed as root issuing dpkg -i install idzebra-2.0*.deb libidzebra-2.0*.deb
    WIN32 The easiest way to install &zebra; on Windows is by downloading an installer from here. The installer comes with source too - in case you wish to compile &zebra; with different Compiler options. &zebra; is shipped with "makefiles" for the NMAKE tool that comes with Microsoft Visual C++. Version 2003 and 2005 has been tested. We expect that zebra compiles with version 6 as well. Start a command prompt and switch the sub directory WIN where the file makefile is located. Customize the installation by editing the makefile file (for example by using notepad). The following summarizes the most important settings in that file: DEBUG If set to 1, the software is compiled with debugging libraries (code generation is multi-threaded debug DLL). If set to 0, the software is compiled with release libraries (code generation is multi-threaded DLL). YAZDIR Directory of &yaz; source. &zebra;'s makefile expects to find yaz.lib, yaz.dll in yazdir/lib and yazdir/bin respectively. HAVE_EXPAT, EXPAT_DIR If HAVE_EXPAT is set to 1, &zebra; is compiled with Expat support. In this configuration, set ZEBRA_DIR to the Expat source directory. Windows version of Expat can be downloaded from SourceForge. HAVE_ICONV, ICONV_DIR If HAVE_ICONV is set to 1, &zebra; is compiled with iconv support. In this configuration, set ICONV_DIR to the iconv source directory. Iconv binaries can be downloaded from this site. BZIP2INCLUDE, BZIP2LIB, BZIP2DEF Define these symbols if &zebra; is to be compiled with BZIP2 record compression support. The DEBUG setting in the makefile for &zebra; must be set to the same value as DEBUG setting in the makefile for &yaz;. If not, the &zebra; server/indexer will crash. When satisfied with the settings in the makefile, type nmake If the nmake command is not found on your system you probably haven't defined the environment variables required to use that tool. To fix that, find and run the batch file vcvars32.bat. You need to run it from within the command prompt or set the environment variables "globally"; otherwise it doesn't work. If you wish to recompile &zebra; - for example if you modify settings in the makefile you can delete object files, etc by running. nmake clean The following files are generated upon successful compilation: bin/zebraidx.exe The &zebra; indexer. bin/zebrasrv.exe The &zebra; server.
    Upgrading from &zebra; version 1.3.x &zebra;'s installation directories have changed a bit. In addition, the new loadable modules must be defined in the master zebra.cfg configuration file. The old version 1.3.x configuration options # profilePath - where to look for config files profilePath: some/local/path:/usr/share/idzebra/tab must be changed to # profilePath - where to look for config files profilePath: some/local/path:/usr/share/idzebra-2.0/tab # modulePath - where to look for loadable zebra modules modulePath: /usr/lib/idzebra-2.0/modules The internal binary register structures have changed; all &zebra; databases must be re-indexed after upgrade. The attribute set definition files may no longer contain redirection to other fields. For example the following snippet of a custom custom/bib1.att &acro.bib1; attribute set definition file is no longer supported: att 1016 Any 1016,4,1005,62 and should be changed to att 1016 Any Similar behaviour can be expressed in the new release by defining a new index Any:w in all &acro.grs1; *.abs record indexing configuration files. The above example configuration needs to make the changes from version 1.3.x indexing instructions xelm /*/alternative Body-of-text:w,Title:s,Title:w xelm /*/title Body-of-text:w,Title:s,Title:w to version 2.0.0 indexing instructions xelm /*/alternative Any:w,Body-of-text:w,Title:s,Title:w xelm /*/title Any:w,Body-of-text:w,Title:s,Title:w It is also possible to map the numerical attribute value @attr 1=1016 onto another already existing huge index, in this example, one could for example use the mapping att 1016 Body-of-text with equivalent outcome without editing all &acro.grs1; *.abs record indexing configuration files. Server installations which use the special &acro.idxpath; attribute set must add the following line to the zebra.cfg configuration file: attset: idxpath.att
    idzebra-2.0.44/doc/recordmodel-domxml.xml0000644000175000017500000010541111412332551015225 00000000000000 &acro.dom; &acro.xml; Record Model and Filter Module The record model described in this chapter applies to the fundamental, structured &acro.xml; record type &acro.dom;, introduced in . The &acro.dom; &acro.xml; record model is experimental, and its inner workings might change in future releases of the &zebra; Information Server.
    &acro.dom; Record Filter Architecture The &acro.dom; &acro.xml; filter uses a standard &acro.dom; &acro.xml; structure as internal data model, and can therefore parse, index, and display any &acro.xml; document type. It is well suited to work on standardized &acro.xml;-based formats such as Dublin Core, MODS, METS, MARCXML, OAI-PMH, RSS, and performs equally well on any other non-standard &acro.xml; format. A parser for binary &acro.marc; records based on the ISO2709 library standard is provided, it transforms these to the internal &acro.marcxml; &acro.dom; representation. Other binary document parsers are planned to follow. The &acro.dom; filter architecture consists of four different pipelines, each being a chain of arbitrarily many successive &acro.xslt; transformations of the internal &acro.dom; &acro.xml; representations of documents.
    &acro.dom; &acro.xml; filter architecture [Here there should be a diagram showing the &acro.dom; &acro.xml; filter architecture, but is seems that your tool chain has not been able to include the diagram in this document.]
    &acro.dom; &acro.xml; filter pipelines overview Name When Description Input Output input first input parsing and initial transformations to common &acro.xml; format Input raw &acro.xml; record buffers, &acro.xml; streams and binary &acro.marc; buffers Common &acro.xml; &acro.dom; extract second indexing term extraction transformations Common &acro.xml; &acro.dom; Indexing &acro.xml; &acro.dom; store second transformations before internal document storage Common &acro.xml; &acro.dom; Storage &acro.xml; &acro.dom; retrieve third multiple document retrieve transformations from storage to different output formats are possible Storage &acro.xml; &acro.dom; Output &acro.xml; syntax in requested formats
    The &acro.dom; &acro.xml; filter pipelines use &acro.xslt; (and if supported on your platform, even &acro.exslt;), it brings thus full &acro.xpath; support to the indexing, storage and display rules of not only &acro.xml; documents, but also binary &acro.marc; records.
    &acro.dom; &acro.xml; filter pipeline configuration The experimental, loadable &acro.dom; &acro.xml;/&acro.xslt; filter module mod-dom.so is invoked by the zebra.cfg configuration statement recordtype.xml: dom.db/filter_dom_conf.xml In this example the &acro.dom; &acro.xml; filter is configured to work on all data files with suffix *.xml, where the configuration file is found in the path db/filter_dom_conf.xml. The &acro.dom; &acro.xslt; filter configuration file must be valid &acro.xml;. It might look like this: ]]> The root &acro.xml; element <dom> and all other &acro.dom; &acro.xml; filter elements are residing in the namespace xmlns="http://indexdata.com/zebra-2.0". All pipeline definition elements - i.e. the <input>, <extract>, <store>, and <retrieve> elements - are optional. Missing pipeline definitions are just interpreted do-nothing identity pipelines. All pipeline definition elements may contain zero or more ]]> &acro.xslt; transformation instructions, which are performed sequentially from top to bottom. The paths in the stylesheet attributes are relative to zebras working directory, or absolute to the file system root.
    Input pipeline The <input> pipeline definition element may contain either one &acro.xml; Reader definition ]]>, used to split an &acro.xml; collection input stream into individual &acro.xml; &acro.dom; documents at the prescribed element level, or one &acro.marc; binary parsing instruction ]]>, which defines a conversion to &acro.marcxml; format &acro.dom; trees. The allowed values of the inputcharset attribute depend on your local iconv set-up. Both input parsers deliver individual &acro.dom; &acro.xml; documents to the following chain of zero or more ]]> &acro.xslt; transformations. At the end of this pipeline, the documents are in the common format, used to feed both the <extract> and <store> pipelines.
    Extract pipeline The <extract> pipeline takes documents from any common &acro.dom; &acro.xml; format to the &zebra; specific indexing &acro.dom; &acro.xml; format. It may consist of zero ore more ]]> &acro.xslt; transformations, and the outcome is handled to the &zebra; core to drive the process of building the inverted indexes. See for details.
    Store pipeline The <store> pipeline takes documents from any common &acro.dom; &acro.xml; format to the &zebra; specific storage &acro.dom; &acro.xml; format. It may consist of zero ore more ]]> &acro.xslt; transformations, and the outcome is handled to the &zebra; core for deposition into the internal storage system.
    Retrieve pipeline Finally, there may be one or more <retrieve> pipeline definitions, each of them again consisting of zero or more ]]> &acro.xslt; transformations. These are used for document presentation after search, and take the internal storage &acro.dom; &acro.xml; to the requested output formats during record present requests. The possible multiple <retrieve> pipeline definitions are distinguished by their unique name attributes, these are the literal schema or element set names used in &acro.srw;, &acro.sru; and &acro.z3950; protocol queries.
    Canonical Indexing Format &acro.dom; &acro.xml; indexing comes in two flavors: pure processing-instruction governed plain &acro.xml; documents, and - very similar to the Alvis filter indexing format - &acro.xml; documents containing &acro.xml; <record> and <index> instructions from the magic namespace xmlns:z="http://indexdata.com/zebra-2.0".
    Processing-instruction governed indexing format The output of the processing instruction driven indexing &acro.xslt; stylesheets must contain processing instructions named zebra-2.0. The output of the &acro.xslt; indexing transformation is then parsed using &acro.dom; methods, and the contained instructions are performed on the elements and their subtrees directly following the processing instructions. For example, the output of the command xsltproc dom-index-pi.xsl marc-one.xml might look like this: 11224466 How to program a computer ]]>
    Magic element governed indexing format The output of the indexing &acro.xslt; stylesheets must contain certain elements in the magic xmlns:z="http://indexdata.com/zebra-2.0" namespace. The output of the &acro.xslt; indexing transformation is then parsed using &acro.dom; methods, and the contained instructions are performed on the magic elements and their subtrees. For example, the output of the command xsltproc dom-index-element.xsl marc-one.xml might look like this: 11224466 How to program a computer ]]>
    Semantics of the indexing formats Both indexing formats are defined with equal semantics and behavior in mind: &zebra; specific instructions are either processing instructions named zebra-2.0 or elements contained in the namespace xmlns:z="http://indexdata.com/zebra-2.0". There must be exactly one record instruction, which sets the scope for the following, possibly nested index instructions. The unique record instruction may have additional attributes id, rank and type. Attribute id is the value of the opaque ID and may be any string not containing the whitespace character ' '. The rank attribute value must be a non-negative integer. See . The type attribute specifies how the record is to be treated. The following values may be given for type: insert The record is inserted. If the record already exists, it is skipped (i.e. not replaced). replace The record is replaced. If the record does not already exist, it is skipped (i.e. not inserted). delete The record is deleted. If the record does not already exist, it is skipped (i.e. nothing is deleted). update The record is inserted or replaced depending on whether the record exists or not. This is the default behavior but may be effectively changed by "outside" the scope of the DOM filter by zebraidx commands or extended services updates. Note that the value of type is only used to determine the action if and only if the Zebra indexer is running in "update" mode (i.e zebraidx update) or if the specialUpdate action of the Extended Service Update is used. For this reason a specialUpdate may end up deleting records! Multiple and possible nested index instructions must contain at least one indexname:indextype pair, and may contain multiple such pairs separated by the whitespace character ' '. In each index pair, the name and the type of the index is separated by a colon character ':'. Any index name consisting of ASCII letters, and following the standard &zebra; rules will do, see . Index types are restricted to the values defined in the standard configuration file default.idx, see and for details. &acro.dom; input documents which are not resulting in both one unique valid record instruction and one or more valid index instructions can not be searched and found. Therefore, invalid document processing is aborted, and any content of the <extract> and <store> pipelines is discarded. A warning is issued in the logs. The examples work as follows: From the original &acro.xml; file marc-one.xml (or from the &acro.xml; record &acro.dom; of the same form coming from an <input> pipeline), the indexing pipeline <extract> produces an indexing &acro.xml; record, which is defined by the record instruction &zebra; uses the content of z:id="11224466" or id=11224466 as internal record ID, and - in case static ranking is set - the content of rank=42 or z:rank="42" as static rank. In these examples, the following literal indexes are constructed: any:w control:0 title:w title:p title:s where the indexing type is defined after the literal ':' character. Any value from the standard configuration file default.idx will do. Finally, any text() node content recursively contained inside the <z:index> element, or any element following a index processing instruction, will be filtered through the appropriate char map for character normalization, and will be inserted in the named indexes. Finally, this example configuration can be queried using &acro.pqf; queries, either transported by &acro.z3950;, (here using a yaz-client) open localhost:9999 Z> elem dc Z> form xml Z> Z> find @attr 1=control @attr 4=3 11224466 Z> scan @attr 1=control @attr 4=3 "" Z> Z> find @attr 1=title program Z> scan @attr 1=title "" Z> Z> find @attr 1=title @attr 4=2 "How to program a computer" Z> scan @attr 1=title @attr 4=2 "" ]]> or the proprietary extensions x-pquery and x-pScanClause to &acro.sru;, and &acro.srw; See for more information on &acro.sru;/&acro.srw; configuration, and or the &yaz; &acro.cql; section for the details or the &yaz; frontend server. Notice that there are no *.abs, *.est, *.map, or other &acro.grs1; filter configuration files involves in this process, and that the literal index names are used during search and retrieval. In case that we want to support the usual bib-1 &acro.z3950; numeric access points, it is a good idea to choose string index names defined in the default configuration file tab/bib1.att, see
    &acro.dom; Record Model Configuration
    &acro.dom; Indexing Configuration As mentioned above, there can be only one indexing pipeline, and configuration of the indexing process is a synonym of writing an &acro.xslt; stylesheet which produces &acro.xml; output containing the magic processing instructions or elements discussed in . Obviously, there are million of different ways to accomplish this task, and some comments and code snippets are in order to enlighten the wary. Stylesheets can be written in the pull or the push style: pull means that the output &acro.xml; structure is taken as starting point of the internal structure of the &acro.xslt; stylesheet, and portions of the input &acro.xml; are pulled out and inserted into the right spots of the output &acro.xml; structure. On the other side, push &acro.xslt; stylesheets are recursively calling their template definitions, a process which is commanded by the input &acro.xml; structure, and is triggered to produce some output &acro.xml; whenever some special conditions in the input stylesheets are met. The pull type is well-suited for input &acro.xml; with strong and well-defined structure and semantics, like the following &acro.oai; indexing example, whereas the push type might be the only possible way to sort out deeply recursive input &acro.xml; formats. A pull stylesheet example used to index &acro.oai; harvested records could use some of the following template definitions: ]]>
    &acro.dom; Indexing &acro.marcxml; The &acro.dom; filter allows indexing of both binary &acro.marc; records and &acro.marcxml; records, depending on its configuration. A typical &acro.marcxml; record might look like this: 42 00366nam 22001698a 4500 11224466 DLC 00000000000000.0 910710c19910701nju 00010 eng 11224466 DLC DLC 123-xyz Jack Collins How to program a computer Penguin 8710 p. cm. ]]> It is easily possible to make string manipulation in the &acro.dom; filter. For example, if you want to drop some leading articles in the indexing of sort fields, you might want to pick out the &acro.marcxml; indicator attributes to chop of leading substrings. If the above &acro.xml; example would have an indicator ind2="8" in the title field 245, i.e. How to program a computer ]]> one could write a template taking into account this information to chop the first 8 characters from the sorting index title:s like this: 0 ]]> The output of the above &acro.marcxml; and &acro.xslt; excerpt would then be: How to program a computer program a computer ]]> and the record would be sorted in the title index under 'P', not 'H'.
    &acro.dom; Indexing Wizardry The names and types of the indexes can be defined in the indexing &acro.xslt; stylesheet dynamically according to content in the original &acro.xml; records, which has opportunities for great power and wizardry as well as grande disaster. The following excerpt of a push stylesheet might be a good idea according to your strict control of the &acro.xml; input format (due to rigorous checking against well-defined and tight RelaxNG or &acro.xml; Schema's, for example): ]]> This template creates indexes which have the name of the working node of any input &acro.xml; file, and assigns a '1' to the index. The example query find @attr 1=xyz 1 finds all files which contain at least one xyz &acro.xml; element. In case you can not control which element names the input files contain, you might ask for disaster and bad karma using this technique. One variation over the theme dynamically created indexes will definitely be unwise: ]]> Don't be tempted to play too smart tricks with the power of &acro.xslt;, the above example will create zillions of indexes with unpredictable names, resulting in severe &zebra; index pollution..
    Debuggig &acro.dom; Filter Configurations It can be very hard to debug a &acro.dom; filter setup due to the many successive &acro.marc; syntax translations, &acro.xml; stream splitting and &acro.xslt; transformations involved. As an aid, you have always the power of the -s command line switch to the zebraidz indexing command at your hand: zebraidx -s -c zebra.cfg update some_record_stream.xml This command line simulates indexing and dumps a lot of debug information in the logs, telling exactly which transformations have been applied, how the documents look like after each transformation, and which record ids and terms are send to the indexer.
    idzebra-2.0.44/doc/marc_indexing.xml0000644000175000017500000001725211412332551014244 00000000000000 Indexing of &acro.marc; records by &zebra; &zebra; is suitable for distribution of &acro.marc; records via &acro.z3950;. We have a several possibilities to describe the indexing process of &acro.marc; records. This document shows these possibilities. Simple indexing of &acro.marc; records Simple indexing is not described yet. Extended indexing of &acro.marc; records Extended indexing of &acro.marc; records will help you if you need index a combination of subfields, or index only a part of the whole field, or use during indexing process embedded fields of &acro.marc; record. Extended indexing of &acro.marc; records additionally allows: to index data in LEADER of &acro.marc; record to index data in control fields (with fixed length) to use during indexing the values of indicators to index linked fields for UNI&acro.marc; based formats In compare with simple indexing process the extended indexing may increase (about 2-3 times) the time of indexing process for &acro.marc; records. The index-formula At the beginning, we have to define the term index-formula for &acro.marc; records. This term helps to understand the notation of extended indexing of MARC records by &zebra;. Our definition is based on the document "The table of conformity for &acro.z3950; use attributes and R&acro.usmarc; fields". The document is available only in Russian language. The index-formula is the combination of subfields presented in such way: 71-00$a, $g, $h ($c){.$b ($c)} , (1) We know that &zebra; supports a &acro.bib1; attribute - right truncation. In this case, the index-formula (1) consists from forms, defined in the same way as (1) 71-00$a, $g, $h 71-00$a, $g 71-00$a The original &acro.marc; record may be without some elements, which included in index-formula. This notation includes such operands as: # It means whitespace character. - The position may contain any value, defined by &acro.marc; format. For example, index-formula 70-#1$a, $g , (2) includes 700#1$a, $g 701#1$a, $g 702#1$a, $g {...} The repeatable elements are defined in figure-brackets {}. For example, index-formula 71-00$a, $g, $h ($c){.$b ($c)} , (3) includes 71-00$a, $g, $h ($c). $b ($c) 71-00$a, $g, $h ($c). $b ($c). $b ($c) 71-00$a, $g, $h ($c). $b ($c). $b ($c). $b ($c) All another operands are the same as accepted in &acro.marc; world. Notation of <emphasis>index-formula</emphasis> for &zebra; Extended indexing overloads path of elm definition in abstract syntax file of &zebra; (.abs file). It means that names beginning with "mc-" are interpreted by &zebra; as index-formula. The database index is created and linked with access point (&acro.bib1; use attribute) according to this formula. For example, index-formula 71-00$a, $g, $h ($c){.$b ($c)} , (4) in .abs file looks like: mc-71.00_$a,_$g,_$h_(_$c_){.$b_(_$c_)} The notation of index-formula uses the operands: _ It means whitespace character. . The position may contain any value, defined by &acro.marc; format. For example, index-formula 70-#1$a, $g , (5) matches mc-70._1_$a,_$g_ and includes 700_1_$a,_$g_ 701_1_$a,_$g_ 702_1_$a,_$g_ {...} The repeatable elements are defined in figure-brackets {}. For example, index-formula 71#00$a, $g, $h ($c) {.$b ($c)} , (6) matches mc-71.00_$a,_$g,_$h_(_$c_){.$b_(_$c_)} and includes 71.00_$a,_$g,_$h_(_$c_).$b_(_$c_) 71.00_$a,_$g,_$h_(_$c_).$b_(_$c_).$b_(_$c_) 71.00_$a,_$g,_$h_(_$c_).$b_(_$c_).$b_(_$c_).$b_(_$c_) <...> Embedded index-formula (for linked fields) is between <>. For example, index-formula 4--#-$170-#1$a, $g ($c) , (7) matches mc-4.._._$1<70._1_$a,_$g_(_$c_)>_ and includes 463_._$1<70._1_$a,_$g_(_$c_)>_ All another operands are the same as accepted in &acro.marc; world. Examples indexing LEADER You need to use keyword "ldr" to index leader. For example, indexing data from 6th and 7th position of LEADER elm mc-ldr[6] Record-type ! elm mc-ldr[7] Bib-level ! indexing data from control fields indexing date (the time added to database) elm mc-008[0-5] Date/time-added-to-db ! or for R&acro.usmarc; (this data included in 100th field) elm mc-100___$a[0-7]_ Date/time-added-to-db ! using indicators while indexing For R&acro.usmarc; index-formula 70-#1$a, $g matches elm 70._1_$a,_$g_ Author !:w,!:p When &zebra; finds a field according to "70." pattern it checks the indicators. In this case the value of first indicator doesn't mater, but the value of second one must be whitespace, in another case a field is not indexed. indexing embedded (linked) fields for UNI&acro.marc; based formats For R&acro.usmarc; index-formula 4--#-$170-#1$a, $g ($c) matches elm mc-4.._._$1<70._1_$a,_$g_(_$c_)>_ Author !:w,!:p Data are extracted from record if the field matches to "4.._." pattern and data in linked field match to embedded index-formula 70._1_$a,_$g_(_$c_). idzebra-2.0.44/doc/grs.html0000644000175000017500000006531511412336551012403 00000000000000Chapter 9. GRS-1 Record Model and Filter Modules

    Chapter 9. GRS-1 Record Model and Filter Modules

    Note

    The functionality of this record model has been improved and replaced by the DOM XML record model. See Chapter 7, DOM XML Record Model and Filter Module.

    The record model described in this chapter applies to the fundamental, structured record type grs, introduced in Section 2.5.3, “GRS-1 Record Model and Filter Modules”.

    1. GRS-1 Record Filters

    Many basic subtypes of the grs type are currently available:

    grs.sgml

    This is the canonical input format described Section 1.1, “GRS-1 Canonical Input Format”. It is using simple SGML-like syntax.

    grs.marc.type

    This allows Zebra to read records in the ISO2709 (MARC) encoding standard. Last parameter type names the .abs file (see below) which describes the specific MARC structure of the input record as well as the indexing rules.

    The grs.marc uses an internal representation which is not XML conformant. In particular MARC tags are presented as elements with the same name. And XML elements may not start with digits. Therefore this filter is only suitable for systems returning GRS-1 and MARC records. For XML use grs.marcxml filter instead (see below).

    The loadable grs.marc filter module is packaged in the GNU/Debian package libidzebra2.0-mod-grs-marc

    grs.marcxml.type

    This allows Zebra to read ISO2709 encoded records. Last parameter type names the .abs file (see below) which describes the specific MARC structure of the input record as well as the indexing rules.

    The internal representation for grs.marcxml is the same as for MARCXML. It slightly more complicated to work with than grs.marc but XML conformant.

    The loadable grs.marcxml filter module is also contained in the GNU/Debian package libidzebra2.0-mod-grs-marc

    grs.xml

    This filter reads XML records and uses Expat to parse them and convert them into IDZebra's internal grs record model. Only one record per file is supported, due to the fact XML does not allow two documents to "follow" each other (there is no way to know when a document is finished). This filter is only available if Zebra is compiled with EXPAT support.

    The loadable grs.xml filter module is packaged in the GNU/Debian package libidzebra2.0-mod-grs-xml

    grs.regx.filter

    This enables a user-supplied Regular Expressions input filter described in Section 1.2, “GRS-1 REGX And TCL Input Filters”.

    The loadable grs.regx filter module is packaged in the GNU/Debian package libidzebra2.0-mod-grs-regx

    grs.tcl.filter

    Similar to grs.regx but using Tcl for rules, described in Section 1.2, “GRS-1 REGX And TCL Input Filters”.

    The loadable grs.tcl filter module is also packaged in the GNU/Debian package libidzebra2.0-mod-grs-regx

    1.1. GRS-1 Canonical Input Format

    Although input data can take any form, it is sometimes useful to describe the record processing capabilities of the system in terms of a single, canonical input format that gives access to the full spectrum of structure and flexibility in the system. In Zebra, this canonical format is an "SGML-like" syntax.

    To use the canonical format specify grs.sgml as the record type.

    Consider a record describing an information resource (such a record is sometimes known as a locator record). It might contain a field describing the distributor of the information resource, which might in turn be partitioned into various fields providing details about the distributor, like this:

          <Distributor>
            <Name> USGS/WRD </Name>
            <Organization> USGS/WRD </Organization>
            <Street-Address>
              U.S. GEOLOGICAL SURVEY, 505 MARQUETTE, NW
            </Street-Address>
            <City> ALBUQUERQUE </City>
            <State> NM </State>
            <Zip-Code> 87102 </Zip-Code>
            <Country> USA </Country>
            <Telephone> (505) 766-5560 </Telephone>
          </Distributor>
         

    The keywords surrounded by <...> are tags, while the sections of text in between are the data elements. A data element is characterized by its location in the tree that is made up by the nested elements. Each element is terminated by a closing tag - beginning with </, and containing the same symbolic tag-name as the corresponding opening tag. The general closing tag - </> - terminates the element started by the last opening tag. The structuring of elements is significant. The element Telephone, for instance, may be indexed and presented to the client differently, depending on whether it appears inside the Distributor element, or some other, structured data element such a Supplier element.

    1.1.1. Record Root

    The first tag in a record describes the root node of the tree that makes up the total record. In the canonical input format, the root tag should contain the name of the schema that lends context to the elements of the record (see Section 2, “GRS-1 Internal Record Representation”). The following is a GILS record that contains only a single element (strictly speaking, that makes it an illegal GILS record, since the GILS profile includes several mandatory elements - Zebra does not validate the contents of a record against the Z39.50 profile, however - it merely attempts to match up elements of a local representation with the given schema):

           <gils>
              <title>Zen and the Art of Motorcycle Maintenance</title>
           </gils>
          

    1.1.2. Variants

    Zebra allows you to provide individual data elements in a number of variant forms. Examples of variant forms are textual data elements which might appear in different languages, and images which may appear in different formats or layouts. The variant system in Zebra is essentially a representation of the variant mechanism of Z39.50-1995.

    The following is an example of a title element which occurs in two different languages.

           <title>
           <var lang lang "eng">
           Zen and the Art of Motorcycle Maintenance</>
           <var lang lang "dan">
           Zen og Kunsten at Vedligeholde en Motorcykel</>
           </title>
          

    The syntax of the variant element is <var class type value>. The available values for the class and type fields are given by the variant set that is associated with the current schema (see Section 1.1.2, “Variants”).

    Variant elements are terminated by the general end-tag </>, by the variant end-tag </var>, by the appearance of another variant tag with the same class and value settings, or by the appearance of another, normal tag. In other words, the end-tags for the variants used in the example above could have been omitted.

    Variant elements can be nested. The element

           <title>
           <var lang lang "eng"><var body iana "text/plain">
           Zen and the Art of Motorcycle Maintenance
           </title>
          

    Associates two variant components to the variant list for the title element.

    Given the nesting rules described above, we could write

           <title>
           <var body iana "text/plain>
           <var lang lang "eng">
           Zen and the Art of Motorcycle Maintenance
           <var lang lang "dan">
           Zen og Kunsten at Vedligeholde en Motorcykel
           </title>
          

    The title element above comes in two variants. Both have the IANA body type "text/plain", but one is in English, and the other in Danish. The client, using the element selection mechanism of Z39.50, can retrieve information about the available variant forms of data elements, or it can select specific variants based on the requirements of the end-user.

    1.2. GRS-1 REGX And TCL Input Filters

    In order to handle general input formats, Zebra allows the operator to define filters which read individual records in their native format and produce an internal representation that the system can work with.

    Input filters are ASCII files, generally with the suffix .flt. The system looks for the files in the directories given in the profilePath setting in the zebra.cfg files. The record type for the filter is grs.regx.filter-filename (fundamental type grs, file read type regx, argument filter-filename).

    Generally, an input filter consists of a sequence of rules, where each rule consists of a sequence of expressions, followed by an action. The expressions are evaluated against the contents of the input record, and the actions normally contribute to the generation of an internal representation of the record.

    An expression can be either of the following:

    INIT

    The action associated with this expression is evaluated exactly once in the lifetime of the application, before any records are read. It can be used in conjunction with an action that initializes tables or other resources that are used in the processing of input records.

    BEGIN

    Matches the beginning of the record. It can be used to initialize variables, etc. Typically, the BEGIN rule is also used to establish the root node of the record.

    END

    Matches the end of the record - when all of the contents of the record has been processed.

    /reg/

    Matches regular expression pattern reg from the input record. The operators supported are the same as for regular expression queries. Refer to Section 3.6, “Zebra Regular Expressions in Truncation Attribute (type = 5)”.

    BODY

    This keyword may only be used between two patterns. It matches everything between (not including) those patterns.

    FINISH

    The expression associated with this pattern is evaluated once, before the application terminates. It can be used to release system resources - typically ones allocated in the INIT step.

    An action is surrounded by curly braces ({...}), and consists of a sequence of statements. Statements may be separated by newlines or semicolons (;). Within actions, the strings that matched the expressions immediately preceding the action can be referred to as $0, $1, $2, etc.

    The available statements are:

    begin type [parameter ... ]

    Begin a new data element. The type is one of the following:

    record

    Begin a new record. The following parameter should be the name of the schema that describes the structure of the record, e.g., gils or wais (see below). The begin record call should precede any other use of the begin statement.

    element

    Begin a new tagged element. The parameter is the name of the tag. If the tag is not matched anywhere in the tagsets referenced by the current schema, it is treated as a local string tag.

    variant

    Begin a new node in a variant tree. The parameters are class type value.

    data parameter

    Create a data element. The concatenated arguments make up the value of the data element. The option -text signals that the layout (whitespace) of the data should be retained for transmission. The option -element tag wraps the data up in the tag. The use of the -element option is equivalent to preceding the command with a begin element command, and following it with the end command.

    end [type]

    Close a tagged element. If no parameter is given, the last element on the stack is terminated. The first parameter, if any, is a type name, similar to the begin statement. For the element type, a tag name can be provided to terminate a specific tag.

    unread no

    Move the input pointer to the offset of first character that match rule given by no. The first rule from left-to-right is numbered zero, the second rule is named 1 and so on.

    The following input filter reads a Usenet news file, producing a record in the WAIS schema. Note that the body of a news posting is separated from the list of headers by a blank line (or rather a sequence of two newline characters.

          BEGIN                { begin record wais }
    
          /^From:/ BODY /$/    { data -element name $1 }
          /^Subject:/ BODY /$/ { data -element title $1 }
          /^Date:/ BODY /$/    { data -element lastModified $1 }
          /\n\n/ BODY END      {
             begin element bodyOfDisplay
             begin variant body iana "text/plain"
             data -text $1
             end record
          }
         

    If Zebra is compiled with support for Tcl enabled, the statements described above are supplemented with a complete scripting environment, including control structures (conditional expressions and loop constructs), and powerful string manipulation mechanisms for modifying the elements of a record.

    idzebra-2.0.44/doc/tutorial.xml0000644000175000017500000005076511412332551013306 00000000000000 Tutorial A first &acro.oai; indexing example In this section, we will test the system by indexing a small set of sample &acro.oai; records that are included with the &zebra; distribution, running a &zebra; server against the newly created database, and searching the indexes with a client that connects to that server. Go to the examples/oai-pmh subdirectory of the distribution archive, or make a deep copy of the Debian installation directory /usr/share/idzebra-2.0.-examples/oai-pmh. An XML file containing multiple &acro.oai; records is located in the sub directory examples/oai-pmh/data. Additional OAI test records can be downloaded by running a shell script (you may want to abort the script when you have waited longer than your coffee brews ..). cd data ./fetch_OAI_data.sh cd ../ To index these &acro.oai; records, type: zebraidx-2.0 -c conf/zebra.cfg init zebraidx-2.0 -c conf/zebra.cfg update data zebraidx-2.0 -c conf/zebra.cfg commit In case you have not installed zebra yet but have compiled the binaries from this tarball, use the following command form: ../../index/zebraidx -c conf/zebra.cfg this and that On some systems the &zebra; binaries are installed under the generic names, you need to use the following command form: zebraidx -c conf/zebra.cfg this and that In this command, the word update is followed by the name of a directory: zebraidx updates all files in the hierarchy rooted at data. The command option -c conf/zebra.cfg points to the proper configuration file. You might ask yourself how &acro.xml; content is indexed using &acro.xslt; stylesheets: to satisfy your curiosity, you might want to run the indexing transformation on an example debugging &acro.oai; record. xsltproc conf/oai2index.xsl data/debug-record.xml Here you see the &acro.oai; record transformed into the indexing &acro.xml; format. &zebra; is creating several inverted indexes, and their name and type are clearly visible in the indexing &acro.xml; format. If your indexing command was successful, you are now ready to fire up a server. To start a server on port 9999, type: zebrasrv-2.0 -c conf/zebra.cfg @:9999 The &zebra; index that you have just created has a single database named Default. The database contains several &acro.oai; records, and the server will return records in the &acro.xml; format only. The indexing machine did the splitting into individual records just behind the scenes. Searching the &acro.oai; database by web service &zebra; has a build-in web service, which is close to the &acro.sru; standard web service. We use it to access our new database using any &acro.xml; enabled web browser. This service is using the &acro.pqf; query language. In a later section we show how to run a fully compliant &acro.sru; server, including support for the query language &acro.cql; Searching and retrieving &acro.xml; records is easy. For example, you can point your browser to one of the following URLs to search for the term the. Just point your browser at this link: http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the These URLs won't work unless you have indexed the example data and started an &zebra; server as outlined in the previous section. In case we actually want to retrieve one record, we need to alter our URL to the following http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=dc This way we can page through our result set in chunks of records, for example, we access the 6th to the 10th record using the URL http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=6&maximumRecords=5&recordSchema=dc Presenting search results in different formats &zebra; uses &acro.xslt; stylesheets for both &acro.xml;record indexing and display retrieval. In this example installation, they are two retrieval schema's defined in conf/dom-conf.xml: the dc schema implemented in conf/oai2dc.xsl, and the zebra schema implemented in conf/oai2zebra.xsl. The URLs for accessing both are the same, except for the different value of the recordSchema parameter: http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=dc and http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra For the curious, one can see that the &acro.xslt; transformations really do the magic. xsltproc conf/oai2dc.xsl data/debug-record.xml xsltproc conf/oai2zebra.xsl data/debug-record.xml Notice also that the &zebra; specific parameters are injected by the engine when retrieving data, therefore some of the attributes in the zebra retrieval schema are not filled when running the transformation from the command line. In addition to the user defined retrieval schema's one can always choose from many build-in schema's. In case one is only interested in the &zebra; internal metadata about a certain record, one uses the zebra::meta schema. http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::meta The zebra::data schema is used to retrieve the original stored &acro.oai; &acro.xml; record. http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::data More interesting searches The &acro.oai; indexing example defines many different index names, a study of the conf/oai2index.xsl stylesheet reveals the following word type indexes (i.e. those with suffix :w): any:w title:w author:w subject:w description:w contributor:w publisher:w language:w rights:w By default, searches do access the any:w index, but we can direct searches to any access point by constructing the correct &acro.pqf; query. For example, to search in titles only, we use http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=@attr 1=title the&startRecord=1&maximumRecords=1&recordSchema=dc Similar we can direct searches to the other indexes defined. Or we can create boolean combinations of searches on different indexes. In this case we search for the in title and for fish in description using the query @and @attr 1=title the @attr 1=description fish. http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=@and @attr 1=title the @attr 1=description fish&startRecord=1&maximumRecords=1&recordSchema=dc Investigating the content of the indexes How does the magic work? What is inside the indexes? Why is a certain record found by a search, and another not?. The answer is in the inverted indexes. You can easily investigate them using the special &zebra; schema zebra::index::fieldname. In this example you can see that the title index has both word (type :w) and phrase (type :p) indexed fields, http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::index::title But where in the indexes did the term match for the query occur? Easily answered with the special &zebra; schema zebra::snippet. The matching terms are encapsulated by <s> tags. http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::snippet How can I refine my search? Which interesting search terms are found inside my hit set? Try the special &zebra; schema zebra::facet::fieldname:type. In this case, we investigate additional search terms for the title:w index. http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::facet::title:w One can ask for multiple facets. Here, we want them from phrase indexes of type :p. http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::facet::publisher:p,title:p Setting up a correct &acro.sru; web service The &acro.sru; specification mandates that the &acro.cql; query language is supported and properly configure. Also, the server needs to be able to emit a proper &acro.explain; &acro.xml; record, which is used to determine the capabilities of the specific server instance. In this example configuration we exploit the similarities between the &acro.explain; record and the &acro.cql; query language configuration, we generate the later from the former using an &acro.xslt; transformation. xsltproc conf/explain2cqlpqftxt.xsl conf/explain.xml > conf/cql2pqf.txt We are all set to start the &acro.sru;/acro.z3950; server including &acro.pqf; and &acro.cql; query configuration. It uses the &yaz; frontend server configuration - just type zebrasrv -f conf/yazserver.xml First, we'd like to be sure that we can see the &acro.explain; &acro.xml; response correctly. You might use either of these equivalent requests: http://localhost:9999 http://localhost:9999/?version=1.1&operation=explain Now we can issue true &acro.sru; requests. For example, dc.title=the and dc.description=fish results in the following page http://localhost:9999/?version=1.1&operation=searchRetrieve&query=dc.title=the and dc.description=fish &startRecord=1&maximumRecords=1&recordSchema=dc Scan of indexes is a part of the &acro.sru; server business. For example, scanning the dc.title index gives us an idea what search terms are found there http://localhost:9999/?version=1.1&operation=scan&scanClause=dc.title=fish , whereas http://localhost:9999/?version=1.1&operation=scan&scanClause=dc.identifier=fish accesses the indexed identifiers. In addition, all &zebra; internal special element sets or record schema's of the form zebra:: just work right out of the box http://localhost:9999/?version=1.1&operation=searchRetrieve&query=dc.title=the and dc.description=fish &startRecord=1&maximumRecords=1&recordSchema=zebra::snippet Searching the &acro.oai; database by &acro.z3950; protocol In this section we repeat the searches and presents we have done so far using the binary &acro.z3950; protocol, you can use any &acro.z3950; client. For instance, you can use the demo command-line client that comes with &yaz;. Connecting to the server is done by the command yaz-client localhost:9999 When the client has connected, you can type: Z> format xml Z> querytype prefix Z> elements oai Z> find the Z> show 1+1 &acro.z3950; presents using presentation stylesheets: Z> elements dc Z> show 2+1 Z> elements zebra Z> show 3+1 &acro.z3950; buildin Zebra presents (in this configuration only if started without yaz-frontendserver): Z> elements zebra::meta Z> show 4+1 Z> elements zebra::meta::sysno Z> show 5+1 Z> format sutrs Z> show 5+1 Z> format xml Z> elements zebra::index Z> show 6+1 Z> elements zebra::snippet Z> show 7+1 Z> elements zebra::facet::any:w Z> show 1+1 Z> elements zebra::facet::publisher:p,title:p Z> show 1+1 &acro.z3950; searches targeted at specific indexes and boolean combinations of these can be issued as well. Z> elements dc Z> find @attr 1=oai_identifier @attr 4=3 oai:caltechcstr.library.caltech.edu:4 Z> show 1+1 Z> find @attr 1=oai_datestamp @attr 4=3 2001-04-20 Z> show 1+1 Z> find @attr 1=oai_setspec @attr 4=3 7374617475733D756E707562 Z> show 1+1 Z> find @attr 1=title communication Z> show 1+1 Z> find @attr 1=identifier @attr 4=3 http://resolver.caltech.edu/CaltechCSTR:1986.5228-tr-86 Z> show 1+1 etc, etc. &acro.z3950; scan: yaz-client localhost:9999 Z> format xml Z> querytype prefix Z> scan @attr 1=oai_identifier @attr 4=3 oai Z> scan @attr 1=oai_datestamp @attr 4=3 1 Z> scan @attr 1=oai_setspec @attr 4=3 2000 Z> Z> scan @attr 1=title communication Z> scan @attr 1=identifier @attr 4=3 a &acro.z3950; search using server-side CQL conversion: Z> format xml Z> querytype cql Z> elements dc Z> Z> find harry Z> Z> find dc.creator = the Z> find dc.creator = the Z> find dc.title = the Z> Z> find dc.description < the Z> find dc.title > some Z> Z> find dc.identifier="http://resolver.caltech.edu/CaltechCSTR:1978.2276-tr-78" Z> find dc.relation = something &acro.z3950; scan using server side CQL conversion - unfortunately, this will _never_ work as it is not supported by the &acro.z3950; standard. If you want to use scan using server side CQL conversion, you need to make an SRW connection using yaz-client, or a SRU connection using REST Web Services - any browser will do. All indexes defined by 'type="0"' in the indexing style sheet must be searched using the '@attr 4=3' structure attribute instruction. Notice that searching and scan on indexes contributor, language, rights, and source might fail, simply because none of the records in the small example set have these fields set, and consequently, these indexes might not been created. idzebra-2.0.44/doc/architecture-maincomponents.html0000644000175000017500000004730711412336551017323 000000000000002. Main Components

    2. Main Components

    The Zebra system is designed to support a wide range of data management applications. The system can be configured to handle virtually any kind of structured data. Each record in the system is associated with a record schema which lends context to the data elements of the record. Any number of record schemas can coexist in the system. Although it may be wise to use only a single schema within one database, the system poses no such restrictions.

    The Zebra indexer and information retrieval server consists of the following main applications: the zebraidx indexing maintenance utility, and the zebrasrv information query and retrieval server. Both are using some of the same main components, which are presented here.

    The virtual Debian package idzebra-2.0 installs all the necessary packages to start working with Zebra - including utility programs, development libraries, documentation and modules.

    2.1. Core Zebra Libraries Containing Common Functionality

    The core Zebra module is the meat of the zebraidx indexing maintenance utility, and the zebrasrv information query and retrieval server binaries. Shortly, the core libraries are responsible for

    Dynamic Loading

    of external filter modules, in case the application is not compiled statically. These filter modules define indexing, search and retrieval capabilities of the various input formats.

    Index Maintenance

    Zebra maintains Term Dictionaries and ISAM index entries in inverted index structures kept on disk. These are optimized for fast inset, update and delete, as well as good search performance.

    Search Evaluation

    by execution of search requests expressed in PQF/RPN data structures, which are handed over from the YAZ server frontend API. Search evaluation includes construction of hit lists according to boolean combinations of simpler searches. Fast performance is achieved by careful use of index structures, and by evaluation specific index hit lists in correct order.

    Ranking and Sorting

    components call resorting/re-ranking algorithms on the hit sets. These might also be pre-sorted not only using the assigned document ID's, but also using assigned static rank information.

    Record Presentation

    returns - possibly ranked - result sets, hit numbers, and the like internal data to the YAZ server backend API for shipping to the client. Each individual filter module implements it's own specific presentation formats.

    The Debian package libidzebra-2.0 contains all run-time libraries for Zebra, the documentation in PDF and HTML is found in idzebra-2.0-doc, and idzebra-2.0-common includes common essential Zebra configuration files.

    2.2. Zebra Indexer

    The zebraidx indexing maintenance utility loads external filter modules used for indexing data records of different type, and creates, updates and drops databases and indexes according to the rules defined in the filter modules.

    The Debian package idzebra-2.0-utils contains the zebraidx utility.

    2.3. Zebra Searcher/Retriever

    This is the executable which runs the Z39.50/SRU/SRW server and glues together the core libraries and the filter modules to one great Information Retrieval server application.

    The Debian package idzebra-2.0-utils contains the zebrasrv utility.

    2.4. YAZ Server Frontend

    The YAZ server frontend is a full fledged stateful Z39.50 server taking client connections, and forwarding search and scan requests to the Zebra core indexer.

    In addition to Z39.50 requests, the YAZ server frontend acts as HTTP server, honoring SRU SOAP requests, and SRU REST requests. Moreover, it can translate incoming CQL queries to PQF queries, if correctly configured.

    YAZ is an Open Source toolkit that allows you to develop software using the ANSI Z39.50/ISO23950 standard for information retrieval. It is packaged in the Debian packages yaz and libyaz.

    2.5. Record Models and Filter Modules

    The hard work of knowing what to index, how to do it, and which part of the records to send in a search/retrieve response is implemented in various filter modules. It is their responsibility to define the exact indexing and record display filtering rules.

    The virtual Debian package libidzebra-2.0-modules installs all base filter modules.

    2.5.1. DOM XML Record Model and Filter Module

    The DOM XML filter uses a standard DOM XML structure as internal data model, and can thus parse, index, and display any XML document.

    A parser for binary MARC records based on the ISO2709 library standard is provided, it transforms these to the internal MARCXML DOM representation.

    The internal DOM XML representation can be fed into four different pipelines, consisting of arbitrarily many successive XSLT transformations; these are for

    • input parsing and initial transformations,

    • indexing term extraction transformations

    • transformations before internal document storage, and

    • retrieve transformations from storage to output format

    The DOM XML filter pipelines use XSLT (and if supported on your platform, even EXSLT), it brings thus full XPATH support to the indexing, storage and display rules of not only XML documents, but also binary MARC records.

    Finally, the DOM XML filter allows for static ranking at index time, and to to sort hit lists according to predefined static ranks.

    Details on the experimental DOM XML filter are found in Chapter 7, DOM XML Record Model and Filter Module.

    The Debian package libidzebra-2.0-mod-dom contains the DOM filter module.

    2.5.2. ALVIS XML Record Model and Filter Module

    Note

    The functionality of this record model has been improved and replaced by the DOM XML record model. See Section 2.5.1, “DOM XML Record Model and Filter Module”.

    The Alvis filter for XML files is an XSLT based input filter. It indexes element and attribute content of any thinkable XML format using full XPATH support, a feature which the standard Zebra GRS-1 SGML and XML filters lacked. The indexed documents are parsed into a standard XML DOM tree, which restricts record size according to availability of memory.

    The Alvis filter uses XSLT display stylesheets, which let the Zebra DB administrator associate multiple, different views on the same XML document type. These views are chosen on-the-fly in search time.

    In addition, the Alvis filter configuration is not bound to the arcane BIB-1 Z39.50 library catalogue indexing traditions and folklore, and is therefore easier to understand.

    Finally, the Alvis filter allows for static ranking at index time, and to to sort hit lists according to predefined static ranks. This imposes no overhead at all, both search and indexing perform still O(1) irrespectively of document collection size. This feature resembles Google's pre-ranking using their PageRank algorithm.

    Details on the experimental Alvis XSLT filter are found in Chapter 8, ALVIS XML Record Model and Filter Module.

    The Debian package libidzebra-2.0-mod-alvis contains the Alvis filter module.

    2.5.3. GRS-1 Record Model and Filter Modules

    Note

    The functionality of this record model has been improved and replaced by the DOM XML record model. See Section 2.5.1, “DOM XML Record Model and Filter Module”.

    The GRS-1 filter modules described in Chapter 9, GRS-1 Record Model and Filter Modules are all based on the Z39.50 specifications, and it is absolutely mandatory to have the reference pages on BIB-1 attribute sets on you hand when configuring GRS-1 filters. The GRS filters come in different flavors, and a short introduction is needed here. GRS-1 filters of various kind have also been called ABS filters due to the *.abs configuration file suffix.

    The grs.marc and grs.marcxml filters are suited to parse and index binary and XML versions of traditional library MARC records based on the ISO2709 standard. The Debian package for both filters is libidzebra-2.0-mod-grs-marc.

    GRS-1 TCL scriptable filters for extensive user configuration come in two flavors: a regular expression filter grs.regx using TCL regular expressions, and a general scriptable TCL filter called grs.tcl are both included in the libidzebra-2.0-mod-grs-regx Debian package.

    A general purpose SGML filter is called grs.sgml. This filter is not yet packaged, but planned to be in the libidzebra-2.0-mod-grs-sgml Debian package.

    The Debian package libidzebra-2.0-mod-grs-xml includes the grs.xml filter which uses Expat to parse records in XML and turn them into IDZebra's internal GRS-1 node trees. Have also a look at the Alvis XML/XSLT filter described in the next session.

    2.5.4. TEXT Record Model and Filter Module

    Plain ASCII text filter. TODO: add information here.

    idzebra-2.0.44/doc/administration.xml0000644000175000017500000021001011412332551014445 00000000000000 Administrating &zebra; Unlike many simpler retrieval systems, &zebra; supports safe, incremental updates to an existing index. Normally, when &zebra; modifies the index it reads a number of records that you specify. Depending on your specifications and on the contents of each record one the following events take place for each record: Insert The record is indexed as if it never occurred before. Either the &zebra; system doesn't know how to identify the record or &zebra; can identify the record but didn't find it to be already indexed. Modify The record has already been indexed. In this case either the contents of the record or the location (file) of the record indicates that it has been indexed before. Delete The record is deleted from the index. As in the update-case it must be able to identify the record. Please note that in both the modify- and delete- case the &zebra; indexer must be able to generate a unique key that identifies the record in question (more on this below). To administrate the &zebra; retrieval system, you run the zebraidx program. This program supports a number of options which are preceded by a dash, and a few commands (not preceded by dash). Both the &zebra; administrative tool and the &acro.z3950; server share a set of index files and a global configuration file. The name of the configuration file defaults to zebra.cfg. The configuration file includes specifications on how to index various kinds of records and where the other configuration files are located. zebrasrv and zebraidx must be run in the directory where the configuration file lives unless you indicate the location of the configuration file by option -c. Record Types Indexing is a per-record process, in which either insert/modify/delete will occur. Before a record is indexed search keys are extracted from whatever might be the layout the original record (sgml,html,text, etc..). The &zebra; system currently supports two fundamental types of records: structured and simple text. To specify a particular extraction process, use either the command line option -t or specify a recordType setting in the configuration file. The &zebra; Configuration File The &zebra; configuration file, read by zebraidx and zebrasrv defaults to zebra.cfg unless specified by -c option. You can edit the configuration file with a normal text editor. parameter names and values are separated by colons in the file. Lines starting with a hash sign (#) are treated as comments. If you manage different sets of records that share common characteristics, you can organize the configuration settings for each type into "groups". When zebraidx is run and you wish to address a given group you specify the group name with the -g option. In this case settings that have the group name as their prefix will be used by zebraidx. If no -g option is specified, the settings without prefix are used. In the configuration file, the group name is placed before the option name itself, separated by a dot (.). For instance, to set the record type for group public to grs.sgml (the &acro.sgml;-like format for structured records) you would write: public.recordType: grs.sgml To set the default value of the record type to text write: recordType: text The available configuration settings are summarized below. They will be explained further in the following sections. group .recordType[.name]: type Specifies how records with the file extension name should be handled by the indexer. This option may also be specified as a command line option (-t). Note that if you do not specify a name, the setting applies to all files. In general, the record type specifier consists of the elements (each element separated by dot), fundamental-type, file-read-type and arguments. Currently, two fundamental types exist, text and grs. group.recordId: record-id-spec Specifies how the records are to be identified when updated. See . group.database: database Specifies the &acro.z3950; database name. group.storeKeys: boolean Specifies whether key information should be saved for a given group of records. If you plan to update/delete this type of records later this should be specified as 1; otherwise it should be 0 (default), to save register space. See . group.storeData: boolean Specifies whether the records should be stored internally in the &zebra; system files. If you want to maintain the raw records yourself, this option should be false (0). If you want &zebra; to take care of the records for you, it should be true(1). register: register-location Specifies the location of the various register files that &zebra; uses to represent your databases. See . shadow: register-location Enables the safe update facility of &zebra;, and tells the system where to place the required, temporary files. See . lockDir: directory Directory in which various lock files are stored. keyTmpDir: directory Directory in which temporary files used during zebraidx's update phase are stored. setTmpDir: directory Specifies the directory that the server uses for temporary result sets. If not specified /tmp will be used. profilePath: path Specifies a path of profile specification files. The path is composed of one or more directories separated by colon. Similar to PATH for UNIX systems. modulePath: path Specifies a path of record filter modules. The path is composed of one or more directories separated by colon. Similar to PATH for UNIX systems. The 'make install' procedure typically puts modules in /usr/local/lib/idzebra-2.0/modules. index: filename Defines the filename which holds fields structure definitions. If omitted, the file default.idx is read. Refer to for more information. sortmax: integer Specifies the maximum number of records that will be sorted in a result set. If the result set contains more than integer records, records after the limit will not be sorted. If omitted, the default value is 1,000. staticrank: integer Enables whether static ranking is to be enabled (1) or disabled (0). If omitted, it is disabled - corresponding to a value of 0. Refer to . estimatehits:: integer Controls whether &zebra; should calculate approximate hit counts and at which hit count it is to be enabled. A value of 0 disables approximate hit counts. For a positive value approximate hit count is enabled if it is known to be larger than integer. Approximate hit counts can also be triggered by a particular attribute in a query. Refer to . attset: filename Specifies the filename(s) of attribute set files for use in searching. In many configurations bib1.att is used, but that is not required. If Classic Explain attributes is to be used for searching, explain.att must be given. The path to att-files in general can be given using profilePath setting. See also . memMax: size Specifies size of internal memory to use for the zebraidx program. The amount is given in megabytes - default is 4 (4 MB). The more memory, the faster large updates happen, up to about half the free memory available on the computer. tempfiles: Yes/Auto/No Tells zebra if it should use temporary files when indexing. The default is Auto, in which case zebra uses temporary files only if it would need more that memMax megabytes of memory. This should be good for most uses. root: dir Specifies a directory base for &zebra;. All relative paths given (in profilePath, register, shadow) are based on this directory. This setting is useful if your &zebra; server is running in a different directory from where zebra.cfg is located. passwd: file Specifies a file with description of user accounts for &zebra;. The format is similar to that known to Apache's htpasswd files and UNIX' passwd files. Non-empty lines not beginning with # are considered account lines. There is one account per-line. A line consists of fields separate by a single colon character. First field is username, second is password. passwd.c: file Specifies a file with description of user accounts for &zebra;. File format is similar to that used by the passwd directive except that the password are encrypted. Use Apache's htpasswd or similar for maintenance. perm.user: permstring Specifies permissions (privilege) for a user that are allowed to access &zebra; via the passwd system. There are two kinds of permissions currently: read (r) and write(w). By default users not listed in a permission directive are given the read privilege. To specify permissions for a user with no username, or &acro.z3950; anonymous style use anonymous. The permstring consists of a sequence of characters. Include character w for write/update access, r for read access and a to allow anonymous access through this account. dbaccess accessfile Names a file which lists database subscriptions for individual users. The access file should consists of lines of the form username: dbnames, where dbnames is a list of database names, separated by '+'. No whitespace is allowed in the database list. encoding charsetname Tells Zebra to interpret the terms in Z39.50 queries as having been encoded using the specified character encoding. The default is ISO-8859-1; one useful alternative is UTF-8. Locating Records The default behavior of the &zebra; system is to reference the records from their original location, i.e. where they were found when you run zebraidx. That is, when a client wishes to retrieve a record following a search operation, the files are accessed from the place where you originally put them - if you remove the files (without running zebraidx again, the server will return diagnostic number 14 (``System error in presenting records'') to the client. If your input files are not permanent - for example if you retrieve your records from an outside source, or if they were temporarily mounted on a CD-ROM drive, you may want &zebra; to make an internal copy of them. To do this, you specify 1 (true) in the storeData setting. When the &acro.z3950; server retrieves the records they will be read from the internal file structures of the system. Indexing with no Record IDs (Simple Indexing) If you have a set of records that are not expected to change over time you may can build your database without record IDs. This indexing method uses less space than the other methods and is simple to use. To use this method, you simply omit the recordId entry for the group of files that you index. To add a set of records you use zebraidx with the update command. The update command will always add all of the records that it encounters to the index - whether they have already been indexed or not. If the set of indexed files change, you should delete all of the index files, and build a new index from scratch. Consider a system in which you have a group of text files called simple. That group of records should belong to a &acro.z3950; database called textbase. The following zebra.cfg file will suffice: profilePath: /usr/local/idzebra/tab attset: bib1.att simple.recordType: text simple.database: textbase Since the existing records in an index can not be addressed by their IDs, it is impossible to delete or modify records when using this method. Indexing with File Record IDs If you have a set of files that regularly change over time: Old files are deleted, new ones are added, or existing files are modified, you can benefit from using the file ID indexing methodology. Examples of this type of database might include an index of WWW resources, or a USENET news spool area. Briefly speaking, the file key methodology uses the directory paths of the individual records as a unique identifier for each record. To perform indexing of a directory with file keys, again, you specify the top-level directory after the update command. The command will recursively traverse the directories and compare each one with whatever have been indexed before in that same directory. If a file is new (not in the previous version of the directory) it is inserted into the registers; if a file was already indexed and it has been modified since the last update, the index is also modified; if a file has been removed since the last visit, it is deleted from the index. The resulting system is easy to administrate. To delete a record you simply have to delete the corresponding file (say, with the rm command). And to add records you create new files (or directories with files). For your changes to take effect in the register you must run zebraidx update with the same directory root again. This mode of operation requires more disk space than simpler indexing methods, but it makes it easier for you to keep the index in sync with a frequently changing set of data. If you combine this system with the safe update facility (see below), you never have to take your server off-line for maintenance or register updating purposes. To enable indexing with pathname IDs, you must specify file as the value of recordId in the configuration file. In addition, you should set storeKeys to 1, since the &zebra; indexer must save additional information about the contents of each record in order to modify the indexes correctly at a later time. For example, to update records of group esdd located below /data1/records/ you should type: $ zebraidx -g esdd update /data1/records The corresponding configuration file includes: esdd.recordId: file esdd.recordType: grs.sgml esdd.storeKeys: 1 You cannot start out with a group of records with simple indexing (no record IDs as in the previous section) and then later enable file record Ids. &zebra; must know from the first time that you index the group that the files should be indexed with file record IDs. You cannot explicitly delete records when using this method (using the delete command to zebraidx. Instead you have to delete the files from the file system (or move them to a different location) and then run zebraidx with the update command. Indexing with General Record IDs When using this method you construct an (almost) arbitrary, internal record key based on the contents of the record itself and other system information. If you have a group of records that explicitly associates an ID with each record, this method is convenient. For example, the record format may contain a title or a ID-number - unique within the group. In either case you specify the &acro.z3950; attribute set and use-attribute location in which this information is stored, and the system looks at that field to determine the identity of the record. As before, the record ID is defined by the recordId setting in the configuration file. The value of the record ID specification consists of one or more tokens separated by whitespace. The resulting ID is represented in the index by concatenating the tokens and separating them by ASCII value (1). There are three kinds of tokens: Internal record info The token refers to a key that is extracted from the record. The syntax of this token is ( set , use ), where set is the attribute set name use is the name or value of the attribute. System variable The system variables are preceded by $ and immediately followed by the system variable name, which may one of group Group name. database Current database specified. type Record type. Constant string A string used as part of the ID — surrounded by single- or double quotes. For instance, the sample GILS records that come with the &zebra; distribution contain a unique ID in the data tagged Control-Identifier. The data is mapped to the &acro.bib1; use attribute Identifier-standard (code 1007). To use this field as a record id, specify (bib1,Identifier-standard) as the value of the recordId in the configuration file. If you have other record types that uses the same field for a different purpose, you might add the record type (or group or database name) to the record id of the gils records as well, to prevent matches with other types of records. In this case the recordId might be set like this: gils.recordId: $type (bib1,Identifier-standard) (see for details of how the mapping between elements of your records and searchable attributes is established). As for the file record ID case described in the previous section, updating your system is simply a matter of running zebraidx with the update command. However, the update with general keys is considerably slower than with file record IDs, since all files visited must be (re)read to discover their IDs. As you might expect, when using the general record IDs method, you can only add or modify existing records with the update command. If you wish to delete records, you must use the, delete command, with a directory as a parameter. This will remove all records that match the files below that root directory. Register Location Normally, the index files that form dictionaries, inverted files, record info, etc., are stored in the directory where you run zebraidx. If you wish to store these, possibly large, files somewhere else, you must add the register entry to the zebra.cfg file. Furthermore, the &zebra; system allows its file structures to span multiple file systems, which is useful for managing very large databases. The value of the register setting is a sequence of tokens. Each token takes the form: dir:size The dir specifies a directory in which index files will be stored and the size specifies the maximum size of all files in that directory. The &zebra; indexer system fills each directory in the order specified and use the next specified directories as needed. The size is an integer followed by a qualifier code, b for bytes, k for kilobytes. M for megabytes, G for gigabytes. Specifying a negative value disables the checking (it still needs the unit, use -1b). For instance, if you have allocated three disks for your register, and the first disk is mounted on /d1 and has 2GB of free space, the second, mounted on /d2 has 3.6 GB, and the third, on which you have more space than you bother to worry about, mounted on /d3 you could put this entry in your configuration file: register: /d1:2G /d2:3600M /d3:-1b Note that &zebra; does not verify that the amount of space specified is actually available on the directory (file system) specified - it is your responsibility to ensure that enough space is available, and that other applications do not attempt to use the free space. In a large production system, it is recommended that you allocate one or more file system exclusively to the &zebra; register files. Safe Updating - Using Shadow Registers Description The &zebra; server supports updating of the index structures. That is, you can add, modify, or remove records from databases managed by &zebra; without rebuilding the entire index. Since this process involves modifying structured files with various references between blocks of data in the files, the update process is inherently sensitive to system crashes, or to process interruptions: Anything but a successfully completed update process will leave the register files in an unknown state, and you will essentially have no recourse but to re-index everything, or to restore the register files from a backup medium. Further, while the update process is active, users cannot be allowed to access the system, as the contents of the register files may change unpredictably. You can solve these problems by enabling the shadow register system in &zebra;. During the updating procedure, zebraidx will temporarily write changes to the involved files in a set of "shadow files", without modifying the files that are accessed by the active server processes. If the update procedure is interrupted by a system crash or a signal, you simply repeat the procedure - the register files have not been changed or damaged, and the partially written shadow files are automatically deleted before the new updating procedure commences. At the end of the updating procedure (or in a separate operation, if you so desire), the system enters a "commit mode". First, any active server processes are forced to access those blocks that have been changed from the shadow files rather than from the main register files; the unmodified blocks are still accessed at their normal location (the shadow files are not a complete copy of the register files - they only contain those parts that have actually been modified). If the commit process is interrupted at any point during the commit process, the server processes will continue to access the shadow files until you can repeat the commit procedure and complete the writing of data to the main register files. You can perform multiple update operations to the registers before you commit the changes to the system files, or you can execute the commit operation at the end of each update operation. When the commit phase has completed successfully, any running server processes are instructed to switch their operations to the new, operational register, and the temporary shadow files are deleted. How to Use Shadow Register Files The first step is to allocate space on your system for the shadow files. You do this by adding a shadow entry to the zebra.cfg file. The syntax of the shadow entry is exactly the same as for the register entry (see ). The location of the shadow area should be different from the location of the main register area (if you have specified one - remember that if you provide no register setting, the default register area is the working directory of the server and indexing processes). The following excerpt from a zebra.cfg file shows one example of a setup that configures both the main register location and the shadow file area. Note that two directories or partitions have been set aside for the shadow file area. You can specify any number of directories for each of the file areas, but remember that there should be no overlaps between the directories used for the main registers and the shadow files, respectively. register: /d1:500M shadow: /scratch1:100M /scratch2:200M When shadow files are enabled, an extra command is available at the zebraidx command line. In order to make changes to the system take effect for the users, you'll have to submit a "commit" command after a (sequence of) update operation(s). $ zebraidx update /d1/records $ zebraidx commit Or you can execute multiple updates before committing the changes: $ zebraidx -g books update /d1/records /d2/more-records $ zebraidx -g fun update /d3/fun-records $ zebraidx commit If one of the update operations above had been interrupted, the commit operation on the last line would fail: zebraidx will not let you commit changes that would destroy the running register. You'll have to rerun all of the update operations since your last commit operation, before you can commit the new changes. Similarly, if the commit operation fails, zebraidx will not let you start a new update operation before you have successfully repeated the commit operation. The server processes will keep accessing the shadow files rather than the (possibly damaged) blocks of the main register files until the commit operation has successfully completed. You should be aware that update operations may take slightly longer when the shadow register system is enabled, since more file access operations are involved. Further, while the disk space required for the shadow register data is modest for a small update operation, you may prefer to disable the system if you are adding a very large number of records to an already very large database (we use the terms large and modest very loosely here, since every application will have a different perception of size). To update the system without the use of the the shadow files, simply run zebraidx with the -n option (note that you do not have to execute the commit command of zebraidx when you temporarily disable the use of the shadow registers in this fashion. Note also that, just as when the shadow registers are not enabled, server processes will be barred from accessing the main register while the update procedure takes place. Relevance Ranking and Sorting of Result Sets Overview The default ordering of a result set is left up to the server, which inside &zebra; means sorting in ascending document ID order. This is not always the order humans want to browse the sometimes quite large hit sets. Ranking and sorting comes to the rescue. In cases where a good presentation ordering can be computed at indexing time, we can use a fixed static ranking scheme, which is provided for the alvis indexing filter. This defines a fixed ordering of hit lists, independently of the query issued. There are cases, however, where relevance of hit set documents is highly dependent on the query processed. Simply put, dynamic relevance ranking sorts a set of retrieved records such that those most likely to be relevant to your request are retrieved first. Internally, &zebra; retrieves all documents that satisfy your query, and re-orders the hit list to arrange them based on a measurement of similarity between your query and the content of each record. Finally, there are situations where hit sets of documents should be sorted during query time according to the lexicographical ordering of certain sort indexes created at indexing time. Static Ranking &zebra; uses internally inverted indexes to look up term frequencies in documents. Multiple queries from different indexes can be combined by the binary boolean operations AND, OR and/or NOT (which is in fact a binary AND NOT operation). To ensure fast query execution speed, all indexes have to be sorted in the same order. The indexes are normally sorted according to document ID in ascending order, and any query which does not invoke a special re-ranking function will therefore retrieve the result set in document ID order. If one defines the staticrank: 1 directive in the main core &zebra; configuration file, the internal document keys used for ordering are augmented by a preceding integer, which contains the static rank of a given document, and the index lists are ordered first by ascending static rank, then by ascending document ID. Zero is the ``best'' rank, as it occurs at the beginning of the list; higher numbers represent worse scores. The experimental alvis filter provides a directive to fetch static rank information out of the indexed &acro.xml; records, thus making all hit sets ordered after ascending static rank, and for those doc's which have the same static rank, ordered after ascending doc ID. See for the gory details. Dynamic Ranking In order to fiddle with the static rank order, it is necessary to invoke additional re-ranking/re-ordering using dynamic ranking or score functions. These functions return positive integer scores, where highest score is ``best''; hit sets are sorted according to descending scores (in contrary to the index lists which are sorted according to ascending rank number and document ID). Dynamic ranking is enabled by a directive like one of the following in the zebra configuration file (use only one of these a time!): rank: rank-1 # default TDF-IDF like rank: rank-static # dummy do-nothing Dynamic ranking is done at query time rather than indexing time (this is why we call it ``dynamic ranking'' in the first place ...) It is invoked by adding the &acro.bib1; relation attribute with value ``relevance'' to the &acro.pqf; query (that is, @attr 2=102, see also The &acro.bib1; Attribute Set Semantics, also in HTML). To find all articles with the word Eoraptor in the title, and present them relevance ranked, issue the &acro.pqf; query: @attr 2=102 @attr 1=4 Eoraptor Dynamically ranking using &acro.pqf; queries with the 'rank-1' algorithm The default rank-1 ranking module implements a TF/IDF (Term Frequecy over Inverse Document Frequency) like algorithm. In contrast to the usual definition of TF/IDF algorithms, which only considers searching in one full-text index, this one works on multiple indexes at the same time. More precisely, &zebra; does boolean queries and searches in specific addressed indexes (there are inverted indexes pointing from terms in the dictionary to documents and term positions inside documents). It works like this: Query Components First, the boolean query is dismantled into its principal components, i.e. atomic queries where one term is looked up in one index. For example, the query @attr 2=102 @and @attr 1=1010 Utah @attr 1=1018 Springer is a boolean AND between the atomic parts @attr 2=102 @attr 1=1010 Utah and @attr 2=102 @attr 1=1018 Springer which gets processed each for itself. Atomic hit lists Second, for each atomic query, the hit list of documents is computed. In this example, two hit lists for each index @attr 1=1010 and @attr 1=1018 are computed. Atomic scores Third, each document in the hit list is assigned a score (_if_ ranking is enabled and requested in the query) using a TF/IDF scheme. In this example, both atomic parts of the query assign the magic @attr 2=102 relevance attribute, and are to be used in the relevance ranking functions. It is possible to apply dynamic ranking on only parts of the &acro.pqf; query: @and @attr 2=102 @attr 1=1010 Utah @attr 1=1018 Springer searches for all documents which have the term 'Utah' on the body of text, and which have the term 'Springer' in the publisher field, and sort them in the order of the relevance ranking made on the body-of-text index only. Hit list merging Fourth, the atomic hit lists are merged according to the boolean conditions to a final hit list of documents to be returned. This step is always performed, independently of the fact that dynamic ranking is enabled or not. Document score computation Fifth, the total score of a document is computed as a linear combination of the atomic scores of the atomic hit lists Ranking weights may be used to pass a value to a ranking algorithm, using the non-standard &acro.bib1; attribute type 9. This allows one branch of a query to use one value while another branch uses a different one. For example, we can search for utah in the @attr 1=4 index with weight 30, as well as in the @attr 1=1010 index with weight 20: @attr 2=102 @or @attr 9=30 @attr 1=4 utah @attr 9=20 @attr 1=1010 city The default weight is sqrt(1000) ~ 34 , as the &acro.z3950; standard prescribes that the top score is 1000 and the bottom score is 0, encoded in integers. The ranking-weight feature is experimental. It may change in future releases of zebra. Re-sorting of hit list Finally, the final hit list is re-ordered according to scores. The rank-1 algorithm does not use the static rank information in the list keys, and will produce the same ordering with or without static ranking enabled. Dynamic ranking is not compatible with estimated hit sizes, as all documents in a hit set must be accessed to compute the correct placing in a ranking sorted list. Therefore the use attribute setting @attr 2=102 clashes with @attr 9=integer. Dynamically ranking &acro.cql; queries Dynamic ranking can be enabled during sever side &acro.cql; query expansion by adding @attr 2=102 chunks to the &acro.cql; config file. For example relationModifier.relevant = 2=102 invokes dynamic ranking each time a &acro.cql; query of the form Z> querytype cql Z> f alvis.text =/relevant house is issued. Dynamic ranking can also be automatically used on specific &acro.cql; indexes by (for example) setting index.alvis.text = 1=text 2=102 which then invokes dynamic ranking each time a &acro.cql; query of the form Z> querytype cql Z> f alvis.text = house is issued. Sorting &zebra; sorts efficiently using special sorting indexes (type=s; so each sortable index must be known at indexing time, specified in the configuration of record indexing. For example, to enable sorting according to the &acro.bib1; Date/time-added-to-db field, one could add the line xelm /*/@created Date/time-added-to-db:s to any .abs record-indexing configuration file. Similarly, one could add an indexing element of the form ]]> to any alvis-filter indexing stylesheet. Indexing can be specified at searching time using a query term carrying the non-standard &acro.bib1; attribute-type 7. This removes the need to send a &acro.z3950; Sort Request separately, and can dramatically improve latency when the client and server are on separate networks. The sorting part of the query is separate from the rest of the query - the actual search specification - and must be combined with it using OR. A sorting subquery needs two attributes: an index (such as a &acro.bib1; type-1 attribute) specifying which index to sort on, and a type-7 attribute whose value is be 1 for ascending sorting, or 2 for descending. The term associated with the sorting attribute is the priority of the sort key, where 0 specifies the primary sort key, 1 the secondary sort key, and so on. For example, a search for water, sort by title (ascending), is expressed by the &acro.pqf; query @or @attr 1=1016 water @attr 7=1 @attr 1=4 0 whereas a search for water, sort by title ascending, then date descending would be @or @or @attr 1=1016 water @attr 7=1 @attr 1=4 0 @attr 7=2 @attr 1=30 1 Notice the fundamental differences between dynamic ranking and sorting: there can be only one ranking function defined and configured; but multiple sorting indexes can be specified dynamically at search time. Ranking does not need to use specific indexes, so dynamic ranking can be enabled and disabled without re-indexing; whereas, sorting indexes need to be defined before indexing. Extended Services: Remote Insert, Update and Delete Extended services are only supported when accessing the &zebra; server using the &acro.z3950; protocol. The &acro.sru; protocol does not support extended services. The extended services are not enabled by default in zebra - due to the fact that they modify the system. &zebra; can be configured to allow anybody to search, and to allow only updates for a particular admin user in the main zebra configuration file zebra.cfg. For user admin, you could use: perm.anonymous: r perm.admin: rw passwd: passwordfile And in the password file passwordfile, you have to specify users and encrypted passwords as colon separated strings. Use a tool like htpasswd to maintain the encrypted passwords. admin:secret It is essential to configure &zebra; to store records internally, and to support modifications and deletion of records: storeData: 1 storeKeys: 1 The general record type should be set to any record filter which is able to parse &acro.xml; records, you may use any of the two declarations (but not both simultaneously!) recordType: dom.filter_dom_conf.xml # recordType: grs.xml Notice the difference to the specific instructions recordType.xml: dom.filter_dom_conf.xml # recordType.xml: grs.xml which only work when indexing XML files from the filesystem using the *.xml naming convention. To enable transaction safe shadow indexing, which is extra important for this kind of operation, set shadow: directoryname: size (e.g. 1000M) See for additional information on these configuration options. It is not possible to carry information about record types or similar to &zebra; when using extended services, due to limitations of the &acro.z3950; protocol. Therefore, indexing filters can not be chosen on a per-record basis. One and only one general &acro.xml; indexing filter must be defined. Extended services in the &acro.z3950; protocol The &acro.z3950; standard allows servers to accept special binary extended services protocol packages, which may be used to insert, update and delete records into servers. These carry control and update information to the servers, which are encoded in seven package fields: Extended services &acro.z3950; Package Fields Parameter Value Notes type 'update' Must be set to trigger extended services action string Extended service action type with one of four possible values: recordInsert, recordReplace, recordDelete, and specialUpdate record &acro.xml; string An &acro.xml; formatted string containing the record syntax 'xml' XML/SUTRS/MARC. GRS-1 not supported. The default filter (record type) as given by recordType in zebra.cfg is used to parse the record. recordIdOpaque string Optional client-supplied, opaque record identifier used under insert operations. recordIdNumber positive number &zebra;'s internal system number, not allowed for recordInsert or specialUpdate actions which result in fresh record inserts. databaseName database identifier The name of the database to which the extended services should be applied.
    The action parameter can be any of recordInsert (will fail if the record already exists), recordReplace (will fail if the record does not exist), recordDelete (will fail if the record does not exist), and specialUpdate (will insert or update the record as needed, record deletion is not possible). During all actions, the usual rules for internal record ID generation apply, unless an optional recordIdNumber &zebra; internal ID or a recordIdOpaque string identifier is assigned. The default ID generation is configured using the recordId: from zebra.cfg. See . Setting of the recordIdNumber parameter, which must be an existing &zebra; internal system ID number, is not allowed during any recordInsert or specialUpdate action resulting in fresh record inserts. When retrieving existing records indexed with &acro.grs1; indexing filters, the &zebra; internal ID number is returned in the field /*/id:idzebra/localnumber in the namespace xmlns:id="http://www.indexdata.dk/zebra/", where it can be picked up for later record updates or deletes. A new element set for retrieval of internal record data has been added, which can be used to access minimal records containing only the recordIdNumber &zebra; internal ID, or the recordIdOpaque string identifier. This works for any indexing filter used. See . The recordIdOpaque string parameter is an client-supplied, opaque record identifier, which may be used under insert, update and delete operations. The client software is responsible for assigning these to records. This identifier will replace zebra's own automagic identifier generation with a unique mapping from recordIdOpaque to the &zebra; internal recordIdNumber. The opaque recordIdOpaque string identifiers are not visible in retrieval records, nor are searchable, so the value of this parameter is questionable. It serves mostly as a convenient mapping from application domain string identifiers to &zebra; internal ID's.
    Extended services from yaz-client We can now start a yaz-client admin session and create a database: adm-create ]]> Now the Default database was created, we can insert an &acro.xml; file (esdd0006.grs from example/gils/records) and index it: update insert id1234 esdd0006.grs ]]> The 3rd parameter - id1234 here - is the recordIdOpaque package field. Actually, we should have a way to specify "no opaque record id" for yaz-client's update command.. We'll fix that. The newly inserted record can be searched as usual: f utah Sent searchRequest. Received SearchResponse. Search was a success. Number of hits: 1, setno 1 SearchResult-1: term=utah cnt=1 records returned: 0 Elapsed: 0.014179 ]]> Let's delete the beast, using the same recordIdOpaque string parameter: update delete id1234 No last record (update ignored) Z> update delete 1 esdd0006.grs Got extended services response Status: done Elapsed: 0.072441 Z> f utah Sent searchRequest. Received SearchResponse. Search was a success. Number of hits: 0, setno 2 SearchResult-1: term=utah cnt=0 records returned: 0 Elapsed: 0.013610 ]]> If shadow register is enabled in your zebra.cfg, you must run the adm-commit command adm-commit ]]> after each update session in order write your changes from the shadow to the life register space. Extended services from yaz-php Extended services are also available from the &yaz; &acro.php; client layer. An example of an &yaz;-&acro.php; extended service transaction is given here: A fine specimen of a record'; $options = array('action' => 'recordInsert', 'syntax' => 'xml', 'record' => $record, 'databaseName' => 'mydatabase' ); yaz_es($yaz, 'update', $options); yaz_es($yaz, 'commit', array()); yaz_wait(); if ($error = yaz_error($yaz)) echo "$error"; ]]> Extended services debugging guide When debugging ES over PHP we recommend the following order of tests: Make sure you have a nice record on your filesystem, which you can index from the filesystem by use of the zebraidx command. Do it exactly as you planned, using one of the GRS-1 filters, or the DOMXML filter. When this works, proceed. Check that your server setup is OK before you even coded one single line PHP using ES. Take the same record form the file system, and send as ES via yaz-client like described in , and remember the -a option which tells you what goes over the wire! Notice also the section on permissions: try perm.anonymous: rw in zebra.cfg to make sure you do not run into permission problems (but never expose such an insecure setup on the internet!!!). Then, make sure to set the general recordType instruction, pointing correctly to the GRS-1 filters, or the DOMXML filters. If you insist on using the sysno in the recordIdNumber setting, please make sure you do only updates and deletes. Zebra's internal system number is not allowed for recordInsert or specialUpdate actions which result in fresh record inserts. If shadow register is enabled in your zebra.cfg, you must remember running the Z> adm-commit command as well. If this works, then proceed to do the same thing in your PHP script.
    idzebra-2.0.44/doc/record-model-domxml-pipeline.html0000644000175000017500000005704011412336551017261 000000000000002. DOM XML filter pipeline configuration

    2. DOM XML filter pipeline configuration

    The experimental, loadable DOM XML/XSLT filter module mod-dom.so is invoked by the zebra.cfg configuration statement

         recordtype.xml: dom.db/filter_dom_conf.xml
        

    In this example the DOM XML filter is configured to work on all data files with suffix *.xml, where the configuration file is found in the path db/filter_dom_conf.xml.

    The DOM XSLT filter configuration file must be valid XML. It might look like this:

     
        
        <?xml version="1.0" encoding="UTF8"?>
        <dom xmlns="http://indexdata.com/zebra-2.0">
          <input>
            <xmlreader level="1"/>
            <!-- <marc inputcharset="marc-8"/> -->
          </input>
          <extract>
             <xslt stylesheet="common2index.xsl"/>
          </extract>
          <store>
             <xslt stylesheet="common2store.xsl"/>
          </store>
          <retrieve name="dc">
            <xslt stylesheet="store2dc.xsl"/>
          </retrieve>
          <retrieve name="mods">
            <xslt stylesheet="store2mods.xsl"/>
          </retrieve>
        </dom>
        
        

    The root XML element <dom> and all other DOM XML filter elements are residing in the namespace xmlns="http://indexdata.com/zebra-2.0".

    All pipeline definition elements - i.e. the <input>, <extract>, <store>, and <retrieve> elements - are optional. Missing pipeline definitions are just interpreted do-nothing identity pipelines.

    All pipeline definition elements may contain zero or more <xslt stylesheet="path/file.xsl"/> XSLT transformation instructions, which are performed sequentially from top to bottom. The paths in the stylesheet attributes are relative to zebras working directory, or absolute to the file system root.

    2.1. Input pipeline

    The <input> pipeline definition element may contain either one XML Reader definition <xmlreader level="1"/>, used to split an XML collection input stream into individual XML DOM documents at the prescribed element level, or one MARC binary parsing instruction <marc inputcharset="marc-8"/>, which defines a conversion to MARCXML format DOM trees. The allowed values of the inputcharset attribute depend on your local iconv™ set-up.

    Both input parsers deliver individual DOM XML documents to the following chain of zero or more <xslt stylesheet="path/file.xsl"/> XSLT transformations. At the end of this pipeline, the documents are in the common format, used to feed both the <extract> and <store> pipelines.

    2.2. Extract pipeline

    The <extract> pipeline takes documents from any common DOM XML format to the Zebra specific indexing DOM XML format. It may consist of zero ore more <xslt stylesheet="path/file.xsl"/> XSLT transformations, and the outcome is handled to the Zebra core to drive the process of building the inverted indexes. See Section 2.5, “Canonical Indexing Format” for details.

    2.3. Store pipeline

    The <store> pipeline takes documents from any common DOMXML format to the Zebra specific storage DOMXML format. It may consist of zero ore more <xslt stylesheet="path/file.xsl"/>XSLT transformations, and the outcome is handled to the Zebra core for deposition into the internal storage system.

    2.4. Retrieve pipeline

    Finally, there may be one or more <retrieve> pipeline definitions, each of them again consisting of zero or more <xslt stylesheet="path/file.xsl"/> XSLT transformations. These are used for document presentation after search, and take the internal storage DOM XML to the requested output formats during record present requests.

    The possible multiple <retrieve> pipeline definitions are distinguished by their unique name attributes, these are the literal schema or element set names used in SRW, SRU and Z39.50 protocol queries.

    2.5. Canonical Indexing Format

    DOM XML indexing comes in two flavors: pure processing-instruction governed plain XML documents, and - very similar to the Alvis filter indexing format - XML documents containing XML <record> and <index> instructions from the magic namespace xmlns:z="http://indexdata.com/zebra-2.0".

    2.5.1. Processing-instruction governed indexing format

    The output of the processing instruction driven indexing XSLT stylesheets must contain processing instructions named zebra-2.0. The output of the XSLT indexing transformation is then parsed using DOM methods, and the contained instructions are performed on the elements and their subtrees directly following the processing instructions.

    For example, the output of the command

      
           xsltproc dom-index-pi.xsl marc-one.xml
         

    might look like this:

          
          <?xml version="1.0" encoding="UTF-8"?>
          <?zebra-2.0 record id=11224466 rank=42?>
          <record>
            <?zebra-2.0 index control:0?>
            <control>11224466</control>
            <?zebra-2.0 index any:w title:w title:p title:s?>
            <title>How to program a computer</title>
          </record>
          
         

    2.5.2. Magic element governed indexing format

    The output of the indexing XSLT stylesheets must contain certain elements in the magic xmlns:z="http://indexdata.com/zebra-2.0" namespace. The output of the XSLT indexing transformation is then parsed using DOM methods, and the contained instructions are performed on the magic elements and their subtrees.

    For example, the output of the command

       
          xsltproc dom-index-element.xsl marc-one.xml 
         

    might look like this:

          
          <?xml version="1.0" encoding="UTF-8"?>
          <z:record xmlns:z="http://indexdata.com/zebra-2.0" 
                    z:id="11224466" z:rank="42">
              <z:index name="control:0">11224466</z:index>
              <z:index name="any:w title:w title:p title:s">
                        How to program a computer</z:index>
          </z:record>
          
         

    2.5.3. Semantics of the indexing formats

    Both indexing formats are defined with equal semantics and behavior in mind:

    • Zebra specific instructions are either processing instructions named zebra-2.0 or elements contained in the namespace xmlns:z="http://indexdata.com/zebra-2.0".

    • There must be exactly one record instruction, which sets the scope for the following, possibly nested index instructions.

    • The unique record instruction may have additional attributes id, rank and type. Attribute id is the value of the opaque ID and may be any string not containing the whitespace character ' '. The rank attribute value must be a non-negative integer. See Section 9, “Relevance Ranking and Sorting of Result Sets” . The type attribute specifies how the record is to be treated. The following values may be given for type:

      insert

      The record is inserted. If the record already exists, it is skipped (i.e. not replaced).

      replace

      The record is replaced. If the record does not already exist, it is skipped (i.e. not inserted).

      delete

      The record is deleted. If the record does not already exist, it is skipped (i.e. nothing is deleted).

      update

      The record is inserted or replaced depending on whether the record exists or not. This is the default behavior but may be effectively changed by "outside" the scope of the DOM filter by zebraidx commands or extended services updates.

      Note that the value of type is only used to determine the action if and only if the Zebra indexer is running in "update" mode (i.e zebraidx update) or if the specialUpdate action of the Extended Service Update is used. For this reason a specialUpdate may end up deleting records!

    • Multiple and possible nested index instructions must contain at least one indexname:indextype pair, and may contain multiple such pairs separated by the whitespace character ' '. In each index pair, the name and the type of the index is separated by a colon character ':'.

    • Any index name consisting of ASCII letters, and following the standard Zebra rules will do, see Section 3.5.1, “Mapping of PQF APT access points”.

    • Index types are restricted to the values defined in the standard configuration file default.idx, see Section 2.3, “BIB-1 Attribute Set” and Chapter 10, Field Structure and Character Sets for details.

    • DOM input documents which are not resulting in both one unique valid record instruction and one or more valid index instructions can not be searched and found. Therefore, invalid document processing is aborted, and any content of the <extract> and <store> pipelines is discarded. A warning is issued in the logs.

    The examples work as follows: From the original XML file marc-one.xml (or from the XML record DOM of the same form coming from an <input> pipeline), the indexing pipeline <extract> produces an indexing XML record, which is defined by the record instruction Zebra uses the content of z:id="11224466" or id=11224466 as internal record ID, and - in case static ranking is set - the content of rank=42 or z:rank="42" as static rank.

    In these examples, the following literal indexes are constructed:

           any:w
           control:0
           title:w
           title:p
           title:s
         

    where the indexing type is defined after the literal ':' character. Any value from the standard configuration file default.idx will do. Finally, any text() node content recursively contained inside the <z:index> element, or any element following a index processing instruction, will be filtered through the appropriate char map for character normalization, and will be inserted in the named indexes.

    Finally, this example configuration can be queried using PQF queries, either transported by Z39.50, (here using a yaz-client)

          
          Z> open localhost:9999
          Z> elem dc
          Z> form xml
          Z>
          Z> find @attr 1=control @attr 4=3 11224466
          Z> scan @attr 1=control @attr 4=3 ""
          Z>
          Z> find @attr 1=title program
          Z> scan @attr 1=title ""
          Z>
          Z> find @attr 1=title @attr 4=2 "How to program a computer"
          Z> scan @attr 1=title @attr 4=2 ""
          
         

    or the proprietary extensions x-pquery and x-pScanClause to SRU, and SRW

          
          http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=@attr 1=title program
          http://localhost:9999/?version=1.1&operation=scan&x-pScanClause=@attr 1=title ""
          
         

    See the section called “The SRU Server” for more information on SRU/SRW configuration, and the section called “YAZ server virtual hosts” or the YAZ CQL section for the details or the YAZ frontend server.

    Notice that there are no *.abs, *.est, *.map, or other GRS-1 filter configuration files involves in this process, and that the literal index names are used during search and retrieval.

    In case that we want to support the usual bib-1 Z39.50 numeric access points, it is a good idea to choose string index names defined in the default configuration file tab/bib1.att, see Section 3.4, “The Attribute Set (.att) Files”

    idzebra-2.0.44/doc/indexdata.xml0000644000175000017500000000351211412332551013370 00000000000000 About Index Data and the &zebra; Server Index Data is a consulting and software-development enterprise that specializes in library and information management systems. Our interests and expertise span a broad range of related fields, and one of our primary, long-term objectives is the development of a powerful information management system with open network interfaces and hyper-media capabilities. We make this software available free of charge, on a fairly unrestrictive license; as a service to the networking community, and to further the development of quality software for open network communication. We'll be happy to answer questions about the software, and about ourselves in general.
    Index Data ApS Købmagergade 43, 2. 1150 Copenhagen K Denmark Phone +45 3341 0100 Fax +45 3341 0101 Email info@indexdata.dk
    The Random House College Dictionary, 1975 edition offers this definition of the word "Zebra": Zebra, n., any of several horselike, African mammals of the genus Equus, having a characteristic pattern of black or dark-brown stripes on a whitish background.
    idzebra-2.0.44/doc/tutorial-oai-sru-yazfrontend.html0000644000175000017500000001346411412336551017367 000000000000006. Setting up a correct SRU web service

    6. Setting up a correct SRU web service

    The SRU specification mandates that the CQL query language is supported and properly configure. Also, the server needs to be able to emit a proper Explain XML record, which is used to determine the capabilities of the specific server instance.

    In this example configuration we exploit the similarities between the Explain record and the CQL query language configuration, we generate the later from the former using an XSLT transformation.

         xsltproc conf/explain2cqlpqftxt.xsl conf/explain.xml > conf/cql2pqf.txt
        

    We are all set to start the SRU/acro.z3950; server including PQF and CQL query configuration. It uses the YAZ frontend server configuration - just type

         zebrasrv -f conf/yazserver.xml
        

    First, we'd like to be sure that we can see the Explain XML response correctly. You might use either of these equivalent requests: http://localhost:9999 http://localhost:9999/?version=1.1&operation=explain

    Now we can issue true SRU requests. For example, dc.title=the and dc.description=fish results in the following page http://localhost:9999/?version=1.1&operation=searchRetrieve&query=dc.title=the and dc.description=fish &startRecord=1&maximumRecords=1&recordSchema=dc

    Scan of indexes is a part of the SRU server business. For example, scanning the dc.title index gives us an idea what search terms are found there http://localhost:9999/?version=1.1&operation=scan&scanClause=dc.title=fish , whereas http://localhost:9999/?version=1.1&operation=scan&scanClause=dc.identifier=fish accesses the indexed identifiers.

    In addition, all Zebra internal special element sets or record schema's of the form zebra:: just work right out of the box http://localhost:9999/?version=1.1&operation=searchRetrieve&query=dc.title=the and dc.description=fish &startRecord=1&maximumRecords=1&recordSchema=zebra::snippet

    idzebra-2.0.44/doc/register-location.html0000644000175000017500000001065711412336551015241 000000000000007. Register Location

    7. Register Location

    Normally, the index files that form dictionaries, inverted files, record info, etc., are stored in the directory where you run zebraidx. If you wish to store these, possibly large, files somewhere else, you must add the register entry to the zebra.cfg file. Furthermore, the Zebra system allows its file structures to span multiple file systems, which is useful for managing very large databases.

    The value of the register setting is a sequence of tokens. Each token takes the form:

        dir:size 
       

    The dir specifies a directory in which index files will be stored and the size specifies the maximum size of all files in that directory. The Zebra indexer system fills each directory in the order specified and use the next specified directories as needed. The size is an integer followed by a qualifier code, b for bytes, k for kilobytes. M for megabytes, G for gigabytes. Specifying a negative value disables the checking (it still needs the unit, use -1b).

    For instance, if you have allocated three disks for your register, and the first disk is mounted on /d1 and has 2GB of free space, the second, mounted on /d2 has 3.6 GB, and the third, on which you have more space than you bother to worry about, mounted on /d3 you could put this entry in your configuration file:

        register: /d1:2G /d2:3600M /d3:-1b
       

    Note that Zebra does not verify that the amount of space specified is actually available on the directory (file system) specified - it is your responsibility to ensure that enough space is available, and that other applications do not attempt to use the free space. In a large production system, it is recommended that you allocate one or more file system exclusively to the Zebra register files.

    idzebra-2.0.44/doc/architecture-workflow.html0000644000175000017500000000672311412336551016140 000000000000003. Indexing and Retrieval Workflow

    3. Indexing and Retrieval Workflow

    Records pass through three different states during processing in the system.

    • When records are accessed by the system, they are represented in their local, or native format. This might be SGML or HTML files, News or Mail archives, MARC records. If the system doesn't already know how to read the type of data you need to store, you can set up an input filter by preparing conversion rules based on regular expressions and possibly augmented by a flexible scripting language (Tcl). The input filter produces as output an internal representation, a tree structure.

    • When records are processed by the system, they are represented in a tree-structure, constructed by tagged data elements hanging off a root node. The tagged elements may contain data or yet more tagged elements in a recursive structure. The system performs various actions on this tree structure (indexing, element selection, schema mapping, etc.),

    • Before transmitting records to the client, they are first converted from the internal structure to a form suitable for exchange over the network - according to the Z39.50 standard.

    idzebra-2.0.44/doc/introduction.html0000644000175000017500000002143411412336551014323 00000000000000Chapter 1. Introduction

    Chapter 1. Introduction

    1. Overview

    Zebra is a free, fast, friendly information management system. It can index records in XML/SGML, MARC, e-mail archives and many other formats, and quickly find them using a combination of boolean searching and relevance ranking. Search-and-retrieve applications can be written using APIs in a wide variety of languages, communicating with the Zebra server using industry-standard information-retrieval protocols or web services.

    Zebra is licensed Open Source, and can be deployed by anyone for any purpose without license fees. The C source code is open to anybody to read and change under the GPL license.

    Zebra is a networked component which acts as a reliable Z39.50 server for both record/document search, presentation, insert, update and delete operations. In addition, it understands the SRU family of webservices, which exist in REST GET/POST and truly SOAP flavors.

    Zebra is available as MS Windows 2003 Server (32 bit) self-extracting package as well as GNU/Debian Linux (32 bit and 64 bit) precompiled packages. It has been deployed successfully on other Unix systems, including Sun Sparc, HP Unix, and many variants of Linux and BSD based systems.

    http://www.indexdata.com/zebra/ http://ftp.indexdata.dk/pub/zebra/win32/ http://ftp.indexdata.dk/pub/zebra/debian/

    Zebra is a high-performance, general-purpose structured text indexing and retrieval engine. It reads records in a variety of input formats (e.g. email, XML, MARC) and provides access to them through a powerful combination of boolean search expressions and relevance-ranked free-text queries.

    Zebra supports large databases (tens of millions of records, tens of gigabytes of data). It allows safe, incremental database updates on live systems. Because Zebra supports the industry-standard information retrieval protocol, Z39.50, you can search Zebra databases using an enormous variety of programs and toolkits, both commercial and free, which understand this protocol. Application libraries are available to allow bespoke clients to be written in Perl, C, C++, Java, Tcl, Visual Basic, Python, PHP and more - see the ZOOM web site for more information on some of these client toolkits.

    This document is an introduction to the Zebra system. It explains how to compile the software, how to prepare your first database, and how to configure the server to give you the functionality that you need.

    idzebra-2.0.44/doc/gpl-2.html0000644000175000017500000004354711412336551012534 000000000000002. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

    2. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

    2.1. Section 0

    This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The Program, below, refers to any such program or work, and a work based on the Program means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term modification.) Each licensee is addressed as you.

    Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.

    2.2. Section 1

    You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.

    You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.

    2.3. Section 2

    You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:

    1. You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.

    2. You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.

    3. If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: If the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)

    These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.

    Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.

    In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.

    2.4. Section 3

    You may copy and distribute the Program (or a work based on it, under Section 2 in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:

    1. Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

    2. Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

    3. Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)

    The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.

    If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.

    2.5. Section 4

    You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

    2.6. Section 5

    You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.

    2.7. Section 6

    Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.

    2.8. Section 7

    If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.

    If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.

    It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.

    This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.

    2.9. Section 8

    If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.

    2.10. Section 9

    The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

    Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and any later version, you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.

    2.11. Section 10

    If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.

    2.12. NO WARRANTY Section 11

    BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

    2.13. Section 12

    IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

    END OF TERMS AND CONDITIONS

    idzebra-2.0.44/doc/zebrasrv.html0000644000175000017500000012172211412336551013441 00000000000000zebrasrv

    Name

    zebrasrv — Zebra Server

    Synopsis

    zebrasrv [-install] [-installa] [-remove] [-a file] [-v level] [-l file] [-u uid] [-c config] [-f vconfig] [-C fname] [-t minutes] [-k kilobytes] [-d daemon] [-w dir] [-p pidfile] [-ziDST1] [listener-spec...]

    DESCRIPTION

    Zebra is a high-performance, general-purpose structured text indexing and retrieval engine. It reads structured records in a variety of input formats (e.g. email, XML, MARC) and allows access to them through exact boolean search expressions and relevance-ranked free-text queries.

    zebrasrv is the Z39.50 and SRU frontend server for the Zebra search engine and indexer.

    On Unix you can run the zebrasrv server from the command line - and put it in the background. It may also operate under the inet daemon. On WIN32 you can run the server as a console application or as a WIN32 Service.

    OPTIONS

    The options for zebrasrv are the same as those for YAZ' yaz-ztest. Option -c specifies a Zebra configuration file - if omitted zebra.cfg is read.

    -a file

    Specify a file for dumping PDUs (for diagnostic purposes). The special name - (dash) sends output to stderr.

    -S

    Don't fork or make threads on connection requests. This is good for debugging, but not recommended for real operation: Although the server is asynchronous and non-blocking, it can be nice to keep a software malfunction (okay then, a crash) from affecting all current users. The server can only accept a single connection in this mode.

    -1

    Like -S but after one session the server exits. This mode is for debugging only.

    -T

    Operate the server in threaded mode. The server creates a thread for each connection rather than a fork a process. Only available on UNIX systems that offers POSIX threads.

    -s

    Use the SR protocol (obsolete).

    -z

    Use the Z39.50 protocol (default). This option and -s complement each other. You can use both multiple times on the same command line, between listener-specifications (see below). This way, you can set up the server to listen for connections in both protocols concurrently, on different local ports.

    -l file

    Specify an output file for the diagnostic messages. The default is to write this information to stderr

    -c config-file

    Read configuration information from config-file. The default configuration is ./zebra.cfg

    -f vconfig

    This specifies an XML file that describes one or more YAZ frontend virtual servers. See section VIRTUAL HOSTS for details.

    -C fname

    Sets SSL certificate file name for server (PEM).

    -v level

    The log level. Use a comma-separated list of members of the set {fatal,debug,warn,log,malloc,all,none}.

    -u uid

    Set user ID. Sets the real UID of the server process to that of the given user. It's useful if you aren't comfortable with having the server run as root, but you need to start it as such to bind a privileged port.

    -w working-directory

    The server changes to this working directory during before listening on incoming connections. This option is useful when the server is operating from the inetd daemon (see -i).

    -p pidfile

    Specifies that the server should write its Process ID to file given by pidfile. A typical location would be /var/run/zebrasrv.pid.

    -i

    Use this to make the the server run from the inetd server (UNIX only). Make sure you use the logfile option -l in conjunction with this mode and specify the -l option before any other options.

    -D

    Use this to make the server put itself in the background and run as a daemon. If neither -i nor -D is given, the server starts in the foreground.

    -install

    Use this to install the server as an NT service (Windows NT/2000/XP only). Control the server by going to the Services in the Control Panel.

    -installa

    Use this to install and activate the server as an NT service (Windows NT/2000/XP only). Control the server by going to the Services in the Control Panel.

    -remove

    Use this to remove the server from the NT services (Windows NT/2000/XP only).

    -t minutes

    Idle session timeout, in minutes. Default is 60 minutes.

    -k size

    Maximum record size/message size, in kilobytes. Default is 1024 KB (1 MB).

    -d daemon

    Set name of daemon to be used in hosts access file. See hosts_access(5) and tcpd(8).

    A listener-address consists of an optional transport mode followed by a colon (:) followed by a listener address. The transport mode is either a file system socket unix, a SSL TCP/IP socket ssl, or a plain TCP/IP socket tcp (default).

    For TCP, an address has the form

        hostname | IP-number [: portnumber]
       

    The port number defaults to 210 (standard Z39.50 port) for privileged users (root), and 9999 for normal users. The special hostname "@" is mapped to the address INADDR_ANY, which causes the server to listen on any local interface.

    The default behavior for zebrasrv - if started as non-privileged user - is to establish a single TCP/IP listener, for the Z39.50 protocol, on port 9999.

        zebrasrv @
        zebrasrv tcp:some.server.name.org:1234
        zebrasrv ssl:@:3000
       

    To start the server listening on the registered port for Z39.50, or on a filesystem socket, and to drop root privileges once the ports are bound, execute the server like this from a root shell:

        zebrasrv -u daemon @
        zebrasrv -u daemon tcp:@:210
        zebrasrv -u daemon unix:/some/file/system/socket
       

    Here daemon is an existing user account, and the unix socket /some/file/system/socket is readable and writable for the daemon account.

    Z39.50 Protocol Support and Behavior

    Z39.50 Initialization

    During initialization, the server will negotiate to version 3 of the Z39.50 protocol, and the option bits for Search, Present, Scan, NamedResultSets, and concurrentOperations will be set, if requested by the client. The maximum PDU size is negotiated down to a maximum of 1 MB by default.

    Z39.50 Search

    The supported query type are 1 and 101. All operators are currently supported with the restriction that only proximity units of type "word" are supported for the proximity operator. Queries can be arbitrarily complex. Named result sets are supported, and result sets can be used as operands without limitations. Searches may span multiple databases.

    The server has full support for piggy-backed retrieval (see also the following section).

    Z39.50 Present

    The present facility is supported in a standard fashion. The requested record syntax is matched against the ones supported by the profile of each record retrieved. If no record syntax is given, SUTRS is the default. The requested element set name, again, is matched against any provided by the relevant record profiles.

    Z39.50 Scan

    The attribute combinations provided with the termListAndStartPoint are processed in the same way as operands in a query (see above). Currently, only the term and the globalOccurrences are returned with the termInfo structure.

    Z39.50 Sort

    Z39.50 specifies three different types of sort criteria. Of these Zebra supports the attribute specification type in which case the use attribute specifies the "Sort register". Sort registers are created for those fields that are of type "sort" in the default.idx file. The corresponding character mapping file in default.idx specifies the ordinal of each character used in the actual sort.

    Z39.50 allows the client to specify sorting on one or more input result sets and one output result set. Zebra supports sorting on one result set only which may or may not be the same as the output result set.

    Z39.50 Close

    If a Close PDU is received, the server will respond with a Close PDU with reason=FINISHED, no matter which protocol version was negotiated during initialization. If the protocol version is 3 or more, the server will generate a Close PDU under certain circumstances, including a session timeout (60 minutes by default), and certain kinds of protocol errors. Once a Close PDU has been sent, the protocol association is considered broken, and the transport connection will be closed immediately upon receipt of further data, or following a short timeout.

    Z39.50 Explain

    Zebra maintains a "classic" Z39.50 Explain database on the side. This database is called IR-Explain-1 and can be searched using the attribute set exp-1.

    The records in the explain database are of type grs.sgml. The root element for the Explain grs.sgml records is explain, thus explain.abs is used for indexing.

    Note

    Zebra must be able to locate explain.abs in order to index the Explain records properly. Zebra will work without it but the information will not be searchable.

    The SRU Server

    In addition to Z39.50, Zebra supports the more recent and web-friendly IR protocol SRU. SRU can be carried over SOAP or a REST-like protocol that uses HTTP GET or POST to request search responses. The request itself is made of parameters such as query, startRecord, maximumRecords and recordSchema; the response is an XML document containing hit-count, result-set records, diagnostics, etc. SRU can be thought of as a re-casting of Z39.50 semantics in web-friendly terms; or as a standardisation of the ad-hoc query parameters used by search engines such as Google and AltaVista; or as a superset of A9's OpenSearch (which it predates).

    Zebra supports Z39.50, SRU GET, SRU POST, SRU SOAP (SRW) - on the same port, recognising what protocol is used by each incoming requests and handling them accordingly. This is a achieved through the use of Deep Magic; civilians are warned not to stand too close.

    Running zebrasrv as an SRU Server

    Because Zebra supports all protocols on one port, it would seem to follow that the SRU server is run in the same way as the Z39.50 server, as described above. This is true, but only in an uninterestingly vacuous way: a Zebra server run in this manner will indeed recognise and accept SRU requests; but since it doesn't know how to handle the CQL queries that these protocols use, all it can do is send failure responses.

    Note

    It is possible to cheat, by having SRU search Zebra with a PQF query instead of CQL, using the x-pquery parameter instead of query. This is a non-standard extension of CQL, and a very naughty thing to do, but it does give you a way to see Zebra serving SRU ``right out of the box''. If you start your favourite Zebra server in the usual way, on port 9999, then you can send your web browser to:

        http://localhost:9999/Default?version=1.1
         &operation=searchRetrieve
         &x-pquery=mineral
         &startRecord=1
         &maximumRecords=1
       

    This will display the XML-formatted SRU response that includes the first record in the result-set found by the query mineral. (For clarity, the SRU URL is shown here broken across lines, but the lines should be joined together to make single-line URL for the browser to submit.)

    In order to turn on Zebra's support for CQL queries, it's necessary to have the YAZ generic front-end (which Zebra uses) translate them into the Z39.50 Type-1 query format that is used internally. And to do this, the generic front-end's own configuration file must be used. See the section called “YAZ server virtual hosts”; the salient point for SRU support is that zebrasrv must be started with the -f frontendConfigFile option rather than the -c zebraConfigFile option, and that the front-end configuration file must include both a reference to the Zebra configuration file and the CQL-to-PQF translator configuration file.

    A minimal front-end configuration file that does this would read as follows:

    
    	<yazgfs>
    	  <server>
    	    <config>zebra.cfg</config>
    	    <cql2rpn>../../tab/pqf.properties</cql2rpn>
    	  </server>
    	</yazgfs>
    

    The <config> element contains the name of the Zebra configuration file that was previously specified by the -c command-line argument, and the <cql2rpn> element contains the name of the CQL properties file specifying how various CQL indexes, relations, etc. are translated into Type-1 queries.

    A zebra server running with such a configuration can then be queried using proper, conformant SRU URLs with CQL queries:

       http://localhost:9999/Default?version=1.1
        &operation=searchRetrieve
        &query=title=utah and description=epicent*
        &startRecord=1
        &maximumRecords=1
       

    SRU Protocol Support and Behavior

    Zebra running as an SRU server supports SRU version 1.1, including CQL version 1.1. In particular, it provides support for the following elements of the protocol.

    SRU Search and Retrieval

    Zebra supports the SRU searchRetrieve operation.

    One of the great strengths of SRU is that it mandates a standard query language, CQL, and that all conforming implementations can therefore be trusted to correctly interpret the same queries. It is with some shame, then, that we admit that Zebra also supports an additional query language, our own Prefix Query Format (PQF). A PQF query is submitted by using the extension parameter x-pquery, in which case the query parameter must be omitted, which makes the request not valid SRU. Please feel free to use this facility within your own applications; but be aware that it is not only non-standard SRU but not even syntactically valid, since it omits the mandatory query parameter.

    SRU Scan

    Zebra supports SRU scan operation. Scanning using CQL syntax is the default, where the standard scanClause parameter is used.

    In addition, a mutant form of SRU scan is supported, using the non-standard x-pScanClause parameter in place of the standard scanClause to scan on a PQF query clause.

    SRU Explain

    Zebra supports SRU explain.

    The ZeeRex record explaining a database may be requested either with a fully fledged SRU request (with operation=explain and version-number specified) or with a simple HTTP GET at the server's basename. The ZeeRex record returned in response is the one embedded in the YAZ Frontend Server configuration file that is described in the the section called “YAZ server virtual hosts”.

    Unfortunately, the data found in the CQL-to-PQF text file must be added by hand-craft into the explain section of the YAZ Frontend Server configuration file to be able to provide a suitable explain record. Too bad, but this is all extreme new alpha stuff, and a lot of work has yet to be done ..

    There is no linkage whatsoever between the Z39.50 explain model and the SRU explain response (well, at least not implemented in Zebra, that is ..). Zebra does not provide a means using Z39.50 to obtain the ZeeRex record.

    Other SRU operations

    In the Z39.50 protocol, Initialization, Present, Sort and Close are separate operations. In SRU, however, these operations do not exist.

    • SRU has no explicit initialization handshake phase, but commences immediately with searching, scanning and explain operations.

    • Neither does SRU have a close operation, since the protocol is stateless and each request is self-contained. (It is true that multiple SRU request/response pairs may be implemented as multiple HTTP request/response pairs over a single persistent TCP/IP connection; but the closure of that connection is not a protocol-level operation.)

    • Retrieval in SRU is part of the searchRetrieve operation, in which a search is submitted and the response includes a subset of the records in the result set. There is no direct analogue of Z39.50's Present operation which requests records from an established result set. In SRU, this is achieved by sending a subsequent searchRetrieve request with the query cql.resultSetId=id where id is the identifier of the previously generated result-set.

    • Sorting in CQL is done within the searchRetrieve operation - in v1.1, by an explicit sort parameter, but the forthcoming v1.2 or v2.0 will most likely use an extension of the query language, CQL sorting.

    It can be seen, then, that while Zebra operating as an SRU server does not provide the same set of operations as when operating as a Z39.50 server, it does provide equivalent functionality.

    SRU Examples

    Surf into http://localhost:9999 to get an explain response, or use

         http://localhost:9999/?version=1.1&operation=explain
         

    See number of hits for a query

         http://localhost:9999/?version=1.1&operation=searchRetrieve
         &query=text=(plant%20and%20soil)
         

    Fetch record 5-7 in Dublin Core format

         http://localhost:9999/?version=1.1&operation=searchRetrieve
                           &query=text=(plant%20and%20soil)
                           &startRecord=5&maximumRecords=2&recordSchema=dc
         

    Even search using PQF queries using the extended naughty parameter x-pquery

          http://localhost:9999/?version=1.1&operation=searchRetrieve
                           &x-pquery=@attr%201=text%20@and%20plant%20soil
         

    Or scan indexes using the extended extremely naughty parameter x-pScanClause

          http://localhost:9999/?version=1.1&operation=scan
                           &x-pScanClause=@attr%201=text%20something
         

    Don't do this in production code! But it's a great fast debugging aid.

    YAZ server virtual hosts

    The Virtual hosts mechanism allows a YAZ frontend server to support multiple backends. A backend is selected on the basis of the TCP/IP binding (port+listening address) and/or the virtual host.

    A backend can be configured to execute in a particular working directory. Or the YAZ frontend may perform CQL to RPN conversion, thus allowing traditional Z39.50 backends to be offered as a SRU service. SRU Explain information for a particular backend may also be specified.

    For the HTTP protocol, the virtual host is specified in the Host header. For the Z39.50 protocol, the virtual host is specified as in the Initialize Request in the OtherInfo, OID 1.2.840.10003.10.1000.81.1.

    Note

    Not all Z39.50 clients allows the VHOST information to be set. For those the selection of the backend must rely on the TCP/IP information alone (port and address).

    The YAZ frontend server uses XML to describe the backend configurations. Command-line option -f specifies filename of the XML configuration.

    The configuration uses the root element yazgfs. This element includes a list of listen elements, followed by one or more server elements.

    The listen describes listener (transport end point), such as TCP/IP, Unix file socket or SSL server. Content for a listener:

    CDATA (required)

    The CDATA for the listen element holds the listener string, such as tcp:@:210, tcp:server1:2100, etc.

    attribute id (optional)

    identifier for this listener. This may be referred to from server sections.

    Note

    We expect more information to be added for the listen section in a future version, such as CERT file for SSL servers.

    The server describes a server and the parameters for this server type. Content for a server:

    attribute id (optional)

    Identifier for this server. Currently not used for anything, but it might be for logging purposes.

    attribute listenref (optional)

    Specifies listener for this server. If this attribute is not given, the server is accessible from all listener. In order for the server to be used for real, however, the virtual host must match (if specified in the configuration).

    element config (optional)

    Specifies the server configuration. This is equivalent to the config specified using command line option -c.

    element directory (optional)

    Specifies a working directory for this backend server. If specified, the YAZ frontend changes current working directory to this directory whenever a backend of this type is started (backend handler bend_start), stopped (backend handler hand_stop) and initialized (bend_init).

    element host (optional)

    Specifies the virtual host for this server. If this is specified a client must specify this host string in order to use this backend.

    element cql2rpn (optional)

    Specifies a filename that includes CQL to RPN conversion for this backend server. See CQL section in YAZ manual. If given, the backend server will only "see" a Type-1/RPN query.

    element explain (optional)

    Specifies SRU ZeeRex content for this server - copied verbatim to the client. As things are now, some of the Explain content seems redundant because host information, etc. is also stored elsewhere.

    The format of the Explain record is described in detail, with examples, on the file at the ZeeRex web-site.

    The XML below configures a server that accepts connections from two ports, TCP/IP port 9900 and a local UNIX file socket. We name the TCP/IP server public and the other server internal.

      
     <yazgfs>
      <listen id="public">tcp:@:9900</listen>
      <listen id="internal">unix:/var/tmp/socket</listen>
      <server id="server1">
        <host>server1.mydomain</host>
        <directory>/var/www/s1</directory>
        <config>config.cfg</config>
      </server>
      <server id="server2">
        <host>server2.mydomain</host>
        <directory>/var/www/s2</directory>
        <config>config.cfg</config>
        <cql2rpn>../etc/pqf.properties</cql2rpn>
        <explain xmlns="http://explain.z3950.org/dtd/2.0/">
          <serverInfo>
            <host>server2.mydomain</host>
            <port>9900</port>
            <database>a</database>
          </serverInfo>
        </explain>
      </server>
      <server id="server3" listenref="internal">
        <directory>/var/www/s3</directory>
        <config>config.cfg</config>
      </server>
     </yazgfs>
    
     

    There are three configured backend servers. The first two servers, "server1" and "server2", can be reached by both listener addresses - since no listenref attribute is specified. In order to distinguish between the two a virtual host has been specified for each of server in the host elements.

    For "server2" elements for CQL to RPN conversion is supported and explain information has been added (a short one here to keep the example small).

    The third server, "server3" can only be reached via listener "internal".

    SEE ALSO

    zebraidx(1)

    idzebra-2.0.44/doc/simple-indexing.html0000644000175000017500000000646311412336551014703 000000000000004. Indexing with no Record IDs (Simple Indexing)

    4. Indexing with no Record IDs (Simple Indexing)

    If you have a set of records that are not expected to change over time you may can build your database without record IDs. This indexing method uses less space than the other methods and is simple to use.

    To use this method, you simply omit the recordId entry for the group of files that you index. To add a set of records you use zebraidx with the update command. The update command will always add all of the records that it encounters to the index - whether they have already been indexed or not. If the set of indexed files change, you should delete all of the index files, and build a new index from scratch.

    Consider a system in which you have a group of text files called simple. That group of records should belong to a Z39.50 database called textbase. The following zebra.cfg file will suffice:

        profilePath: /usr/local/idzebra/tab
        attset: bib1.att
        simple.recordType: text
        simple.database: textbase
       

    Since the existing records in an index can not be addressed by their IDs, it is impossible to delete or modify records when using this method.

    idzebra-2.0.44/doc/zebrasrv-synopsis.xml0000644000175000017500000000321211412332551015147 00000000000000 &gfs-synopsis-app; listener-spec idzebra-2.0.44/doc/tutorial-oai-sru-present.html0000644000175000017500000001214711412336551016501 000000000000003. Presenting search results in different formats

    3. Presenting search results in different formats

    Zebra uses XSLT stylesheets for both XMLrecord indexing and display retrieval. In this example installation, they are two retrieval schema's defined in conf/dom-conf.xml: the dc schema implemented in conf/oai2dc.xsl, and the zebra schema implemented in conf/oai2zebra.xsl. The URLs for accessing both are the same, except for the different value of the recordSchema parameter: http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=dc and http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra For the curious, one can see that the XSLT transformations really do the magic.

         xsltproc conf/oai2dc.xsl data/debug-record.xml
         xsltproc conf/oai2zebra.xsl data/debug-record.xml
        

    Notice also that the Zebra specific parameters are injected by the engine when retrieving data, therefore some of the attributes in the zebra retrieval schema are not filled when running the transformation from the command line.

    In addition to the user defined retrieval schema's one can always choose from many build-in schema's. In case one is only interested in the Zebra internal metadata about a certain record, one uses the zebra::meta schema. http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::meta

    The zebra::data schema is used to retrieve the original stored OAI XML record. http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::data

    idzebra-2.0.44/doc/querymodel-zebra.html0000644000175000017500000012065111412336551015072 000000000000003. Extended Zebra RPN Features

    3. Extended Zebra RPN Features

    The Zebra internal query engine has been extended to specific needs not covered by the bib-1 attribute set query model. These extensions are non-standard and non-portable: most functional extensions are modeled over the bib-1 attribute set, defining type 7 and higher values. There are also the special string type index names for the idxpath attribute set.

    3.1. Zebra specific retrieval of all records

    Zebra defines a hardwired string index name called _ALLRECORDS. It matches any record contained in the database, if used in conjunction with the relation attribute AlwaysMatches (103).

    The _ALLRECORDS index name is used for total database export. The search term is ignored, it may be empty.

          Z> find @attr 1=_ALLRECORDS @attr 2=103 ""
         

    Combination with other index types can be made. For example, to find all records which are not indexed in the Title register, issue one of the two equivalent queries:

          Z> find @not @attr 1=_ALLRECORDS @attr 2=103 "" @attr 1=Title @attr 2=103 ""
          Z> find @not @attr 1=_ALLRECORDS @attr 2=103 "" @attr 1=4 @attr 2=103 ""
         

    Warning

    The special string index _ALLRECORDS is experimental, and the provided functionality and syntax may very well change in future releases of Zebra.

    3.2. Zebra specific Search Extensions to all Attribute Sets

    Zebra extends the BIB-1 attribute types, and these extensions are recognized regardless of attribute set used in a search operation query.

    Table 5.9. Zebra Search Attribute Extensions

    NameValueOperationZebra version
    Embedded Sort7search1.1
    Term Set8search1.1
    Rank Weight9search1.1
    Term Reference10search1.4
    Local Approx Limit11search1.4
    Global Approx Limit12search2.0.8
    Maximum number of truncated terms (truncmax)13search2.0.10
    Specifies whether un-indexed fields should be ignored. A zero value (default) throws a diagnostic when an un-indexed field is specified. A non-zero value makes it return 0 hits. 14search2.0.16

    3.2.1. Zebra Extension Embedded Sort Attribute (type 7)

    The embedded sort is a way to specify sort within a query - thus removing the need to send a Sort Request separately. It is both faster and does not require clients to deal with the Sort Facility.

    All ordering operations are based on a lexicographical ordering, except when the structure attribute numeric (109) is used. In this case, ordering is numerical. See Section 2.4.3, “Structure Attributes (type 4)”.

    The possible values after attribute type 7 are 1 ascending and 2 descending. The attributes+term (APT) node is separate from the rest and must be @or'ed. The term associated with APT is the sorting level in integers, where 0 means primary sort, 1 means secondary sort, and so forth. See also Section 9, “Relevance Ranking and Sorting of Result Sets”.

    For example, searching for water, sort by title (ascending)

           Z> find @or @attr 1=1016 water @attr 7=1 @attr 1=4 0
          

    Or, searching for water, sort by title ascending, then date descending

           Z> find @or @or @attr 1=1016 water @attr 7=1 @attr 1=4 0 @attr 7=2 @attr 1=30 1
          

    3.2.2. Zebra Extension Rank Weight Attribute (type 9)

    Rank weight is a way to pass a value to a ranking algorithm - so that one APT has one value - while another as a different one. See also Section 9, “Relevance Ranking and Sorting of Result Sets”.

    For example, searching for utah in title with weight 30 as well as any with weight 20:

      
           Z> find @attr 2=102 @or @attr 9=30 @attr 1=4 utah @attr 9=20 utah
          

    3.2.3. Zebra Extension Term Reference Attribute (type 10)

    Zebra supports the searchResult-1 facility. If the Term Reference Attribute (type 10) is given, that specifies a subqueryId value returned as part of the search result. It is a way for a client to name an APT part of a query.

    Warning

    Experimental. Do not use in production code.

    3.2.4. Local Approximative Limit Attribute (type 11)

    Zebra computes - unless otherwise configured - the exact hit count for every APT (leaf) in the query tree. These hit counts are returned as part of the searchResult-1 facility in the binary encoded Z39.50 search response packages.

    By setting an estimation limit size of the resultset of the APT leaves, Zebra stops processing the result set when the limit length is reached. Hit counts under this limit are still precise, but hit counts over it are estimated using the statistics gathered from the chopped result set.

    Specifying a limit of 0 results in exact hit counts.

    For example, we might be interested in exact hit count for a, but for b we allow hit count estimates for 1000 and higher.

           Z> find @and a @attr 11=1000 b
          

    Note

    The estimated hit count facility makes searches faster, as one only needs to process large hit lists partially. It is mostly used in huge databases, where you you want trade exactness of hit counts against speed of execution.

    Warning

    Do not use approximative hit count limits in conjunction with relevance ranking, as re-sorting of the result set only works when the entire result set has been processed.

    3.2.5. Global Approximative Limit Attribute (type 12)

    By default Zebra computes precise hit counts for a query as a whole. Setting attribute 12 makes it perform approximative hit counts instead. It has the same semantics as estimatehits for the Section 2, “The Zebra Configuration File”.

    The attribute (12) can occur anywhere in the query tree. Unlike regular attributes it does not relate to the leaf (APT) - but to the whole query.

    Warning

    Do not use approximative hit count limits in conjunction with relevance ranking, as re-sorting of the result set only works when the entire result set has been processed.

    3.3. Zebra specific Scan Extensions to all Attribute Sets

    Zebra extends the Bib1 attribute types, and these extensions are recognized regardless of attribute set used in a scan operation query.

    Table 5.10. Zebra Scan Attribute Extensions

    NameTypeOperationZebra version
    Result Set Narrow8scan1.3
    Approximative Limit12scan2.0.20

    3.3.1. Zebra Extension Result Set Narrow (type 8)

    If attribute Result Set Narrow (type 8) is given for scan, the value is the name of a result set. Each hit count in scan is @and'ed with the result set given.

    Consider for example the case of scanning all title fields around the scanterm mozart, then refining the scan by issuing a filtering query for amadeus to restrict the scan to the result set of the query:

          Z> scan @attr 1=4 mozart 
          ...
          * mozart (43)
            mozartforskningen (1)
            mozartiana (1)
            mozarts (16)
          ...
          Z> f @attr 1=4 amadeus   
          ...
          Number of hits: 15, setno 2
          ...
          Z> scan @attr 1=4 @attr 8=2 mozart
          ...
          * mozart (14)
            mozartforskningen (0)
            mozartiana (0)
            mozarts (1)
          ...
          

    Zebra 2.0.2 and later is able to skip 0 hit counts. This, however, is known not to scale if the number of terms to skip is high. This most likely will happen if the result set is small (and result in many 0 hits).

    3.3.2. Zebra Extension Approximative Limit (type 12)

    The Zebra Extension Approximative Limit (type 12) is a way to enable approximate hit counts for scan hit counts, in the same way as for search hit counts.

    3.4. Zebra special IDXPATH Attribute Set for GRS-1 indexing

    The attribute-set idxpath consists of a single Use (type 1) attribute. All non-use attributes behave as normal.

    This feature is enabled when defining the xpath enable option in the GRS-1 filter *.abs configuration files. If one wants to use the special idxpath numeric attribute set, the main Zebra configuration file zebra.cfg directive attset: idxpath.att must be enabled.

    Warning

    The idxpath is deprecated, may not be supported in future Zebra versions, and should definitely not be used in production code.

    3.4.1. IDXPATH Use Attributes (type = 1)

    This attribute set allows one to search GRS-1 filter indexed records by XPATH like structured index names.

    Warning

    The idxpath option defines hard-coded index names, which might clash with your own index names.

    Table 5.11. Zebra specific IDXPATH Use Attributes (type 1)

    IDXPATHValueString IndexNotes
    XPATH Begin1_XPATH_BEGINdeprecated
    XPATH End2_XPATH_ENDdeprecated
    XPATH CData1016_XPATH_CDATAdeprecated
    XPATH Attribute Name3_XPATH_ATTR_NAMEdeprecated
    XPATH Attribute CData1015_XPATH_ATTR_CDATAdeprecated

    See tab/idxpath.att for more information.

    Search for all documents starting with root element /root (either using the numeric or the string use attributes):

           Z> find @attrset idxpath @attr 1=1 @attr 4=3 root/ 
           Z> find @attr idxpath 1=1 @attr 4=3 root/ 
           Z> find @attr 1=_XPATH_BEGIN @attr 4=3 root/ 
          

    Search for all documents where specific nested XPATH /c1/c2/../cn exists. Notice the very counter-intuitive reverse notation!

           Z> find @attrset idxpath @attr 1=1 @attr 4=3 cn/cn-1/../c1/ 
           Z> find @attr 1=_XPATH_BEGIN @attr 4=3 cn/cn-1/../c1/ 
          

    Search for CDATA string text in any element

           Z> find @attrset idxpath @attr 1=1016 text
           Z> find @attr 1=_XPATH_CDATA text
          

    Search for CDATA string anothertext in any attribute:

     
           Z> find @attrset idxpath @attr 1=1015 anothertext
           Z> find @attr 1=_XPATH_ATTR_CDATA anothertext
          

    Search for all documents with have an XML element node including an XML attribute named creator

     
           Z> find @attrset idxpath @attr 1=3 @attr 4=3 creator 
           Z> find @attr 1=_XPATH_ATTR_NAME @attr 4=3 creator 
          

    Combining usual bib-1 attribute set searches with idxpath attribute set searches:

           Z> find @and @attr idxpath 1=1 @attr 4=3 link/ @attr 1=4 mozart
           Z> find @and @attr 1=_XPATH_BEGIN @attr 4=3 link/ @attr 1=_XPATH_CDATA mozart
          

    Scanning is supported on all idxpath indexes, both specified as numeric use attributes, or as string index names.

           Z> scan  @attrset idxpath @attr 1=1016 text
           Z> scan  @attr 1=_XPATH_ATTR_CDATA anothertext
           Z> scan  @attrset idxpath @attr 1=3 @attr 4=3 ''
          

    3.5. Mapping from PQF atomic APT queries to Zebra internal register indexes

    The rules for PQF APT mapping are rather tricky to grasp in the first place. We deal first with the rules for deciding which internal register or string index to use, according to the use attribute or access point specified in the query. Thereafter we deal with the rules for determining the correct structure type of the named register.

    3.5.1. Mapping of PQF APT access points

    Zebra understands four fundamental different types of access points, of which only the numeric use attribute type access points are defined by the Z39.50 standard. All other access point types are Zebra specific, and non-portable.

    Table 5.12. Access point name mapping

    Access PointTypeGrammarNotes
    Use attributenumeric[1-9][1-9]*directly mapped to string index name
    String index namestring[a-zA-Z](\-?[a-zA-Z0-9])*normalized name is used as internal string index name
    Zebra internal index namezebra_[a-zA-Z](_?[a-zA-Z0-9])*hardwired internal string index name
    XPATH special indexXPath/.*special xpath search for GRS-1 indexed records

    Attribute set names and string index names are normalizes according to the following rules: all single hyphens '-' are stripped, and all upper case letters are folded to lower case.

    Numeric use attributes are mapped to the Zebra internal string index according to the attribute set definition in use. The default attribute set is BIB-1, and may be omitted in the PQF query.

    According to normalization and numeric use attribute mapping, it follows that the following PQF queries are considered equivalent (assuming the default configuration has not been altered):

          Z> find  @attr 1=Body-of-text serenade
          Z> find  @attr 1=bodyoftext serenade
          Z> find  @attr 1=BodyOfText serenade
          Z> find  @attr 1=bO-d-Y-of-tE-x-t serenade
          Z> find  @attr 1=1010 serenade
          Z> find  @attrset BIB-1 @attr 1=1010 serenade
          Z> find  @attrset bib1 @attr 1=1010 serenade
          Z> find  @attrset Bib1 @attr 1=1010 serenade
          Z> find  @attrset b-I-b-1 @attr 1=1010 serenade
         

    The numerical use attributes (type 1) are interpreted according to the attribute sets which have been loaded in the zebra.cfg file, and are matched against specific fields as specified in the .abs file which describes the profile of the records which have been loaded. If no use attribute is provided, a default of BIB-1 Use Any (1016) is assumed. The predefined use attribute sets can be reconfigured by tweaking the configuration files tab/*.att, and new attribute sets can be defined by adding similar files in the configuration path profilePath of the server.

    String indexes can be accessed directly, independently which attribute set is in use. These are just ignored. The above mentioned name normalization applies. String index names are defined in the used indexing filter configuration files, for example in the GRS-1 *.abs configuration files, or in the alvis filter XSLT indexing stylesheets.

    Zebra internal indexes can be accessed directly, according to the same rules as the user defined string indexes. The only difference is that Zebra internal index names are hardwired, all uppercase and must start with the character '_'.

    Finally, XPATH access points are only available using the GRS-1 filter for indexing. These access point names must start with the character '/', they are not normalized, but passed unaltered to the Zebra internal XPATH engine. See Section 2.1.6, “Zebra's special access point of type 'XPath' for GRS-1 filters”.

    3.5.2. Mapping of PQF APT structure and completeness to register type

    Internally Zebra has in its default configuration several different types of registers or indexes, whose tokenization and character normalization rules differ. This reflects the fact that searching fundamental different tokens like dates, numbers, bitfields and string based text needs different rule sets.

    Table 5.13. Structure and completeness mapping to register types

    StructureCompletenessRegister typeNotes
    phrase (@attr 4=1), word (@attr 4=2), word-list (@attr 4=6), free-form-text (@attr 4=105), or document-text (@attr 4=106) Incomplete field (@attr 6=1)Word ('w')Traditional tokenized and character normalized word index
    phrase (@attr 4=1), word (@attr 4=2), word-list (@attr 4=6), free-form-text (@attr 4=105), or document-text (@attr 4=106) complete field' (@attr 6=3)Phrase ('p')Character normalized, but not tokenized index for phrase matches
    urx (@attr 4=104)ignoredURX/URL ('u')Special index for URL web addresses
    numeric (@attr 4=109)ignoredNumeric ('n')Special index for digital numbers
    key (@attr 4=3)ignoredNull bitmap ('0')Used for non-tokenized and non-normalized bit sequences
    year (@attr 4=4)ignoredYear ('y')Non-tokenized and non-normalized 4 digit numbers
    date (@attr 4=5)ignoredDate ('d')Non-tokenized and non-normalized ISO date strings
    ignoredignoredSort ('s')Used with special sort attribute set (@attr 7=1, @attr 7=2)
    overruledoverruledspecialInternal record ID register, used whenever Relation Always Matches (@attr 2=103) is specified

    If a Structure attribute of Phrase is used in conjunction with a Completeness attribute of Complete (Sub)field, the term is matched against the contents of the phrase (long word) register, if one exists for the given Use attribute. A phrase register is created for those fields in the GRS-1 *.abs file that contains a p-specifier.

           Z> scan @attr 1=Title @attr 4=1 @attr 6=3 beethoven 
           ...
           bayreuther festspiele (1)
           * beethoven bibliography database (1)
           benny carter (1)
           ...
           Z> find @attr 1=Title @attr 4=1 @attr 6=3 "beethoven bibliography" 
           ...
           Number of hits: 0, setno 5
           ...
           Z> find @attr 1=Title @attr 4=1 @attr 6=3 "beethoven bibliography database" 
           ...
           Number of hits: 1, setno 6
           

    If Structure=Phrase is used in conjunction with Incomplete Field - the default value for Completeness, the search is directed against the normal word registers, but if the term contains multiple words, the term will only match if all of the words are found immediately adjacent, and in the given order. The word search is performed on those fields that are indexed as type w in the GRS-1 *.abs file.

           Z> scan @attr 1=Title @attr 4=1 @attr 6=1 beethoven 
           ...
             beefheart (1)
           * beethoven (18)
             beethovens (7)
           ...
           Z> find @attr 1=Title @attr 4=1 @attr 6=1 beethoven 
           ...
           Number of hits: 18, setno 1
           ...
           Z> find @attr 1=Title @attr 4=1 @attr 6=1 "beethoven  bibliography"
           ...
           Number of hits: 2, setno 2
           ...
         

    If the Structure attribute is Word List, Free-form Text, or Document Text, the term is treated as a natural-language, relevance-ranked query. This search type uses the word register, i.e. those fields that are indexed as type w in the GRS-1 *.abs file.

    If the Structure attribute is Numeric String the term is treated as an integer. The search is performed on those fields that are indexed as type n in the GRS-1 *.abs file.

    If the Structure attribute is URX the term is treated as a URX (URL) entity. The search is performed on those fields that are indexed as type u in the *.abs file.

    If the Structure attribute is Local Number the term is treated as native Zebra Record Identifier.

    If the Relation attribute is Equals (default), the term is matched in a normal fashion (modulo truncation and processing of individual words, if required). If Relation is Less Than, Less Than or Equal, Greater than, or Greater than or Equal, the term is assumed to be numerical, and a standard regular expression is constructed to match the given expression. If Relation is Relevance, the standard natural-language query processor is invoked.

    For the Truncation attribute, No Truncation is the default. Left Truncation is not supported. Process # in search term is supported, as is Regxp-1. Regxp-2 enables the fault-tolerant (fuzzy) search. As a default, a single error (deletion, insertion, replacement) is accepted when terms are matched against the register contents.

    3.6. Zebra Regular Expressions in Truncation Attribute (type = 5)

    Each term in a query is interpreted as a regular expression if the truncation value is either Regxp-1 (@attr 5=102) or Regxp-2 (@attr 5=103). Both query types follow the same syntax with the operands:

    Table 5.14. Regular Expression Operands

    xMatches the character x.
    .Matches any character.
    [ .. ]Matches the set of characters specified; such as [abc] or [a-c].

    The above operands can be combined with the following operators:

    Table 5.15. Regular Expression Operators

    x*Matches x zero or more times. Priority: high.
    x+Matches x one or more times. Priority: high.
    x? Matches x zero or once. Priority: high.
    xy Matches x, then y. Priority: medium.
    x|y Matches either x or y. Priority: low.
    ( )The order of evaluation may be changed by using parentheses.

    If the first character of the Regxp-2 query is a plus character (+) it marks the beginning of a section with non-standard specifiers. The next plus character marks the end of the section. Currently Zebra only supports one specifier, the error tolerance, which consists one digit.

    Since the plus operator is normally a suffix operator the addition to the query syntax doesn't violate the syntax for standard regular expressions.

    For example, a phrase search with regular expressions in the title-register is performed like this:

          Z> find @attr 1=4 @attr 5=102 "informat.* retrieval"
         

    Combinations with other attributes are possible. For example, a ranked search with a regular expression:

          Z> find @attr 1=4 @attr 5=102 @attr 2=102 "informat.* retrieval"
         

    idzebra-2.0.44/doc/domfilter.svg0000644000175000017500000003470611146471444013435 00000000000000 XML Stream XML Doc MARC Records DOM XML Filter Architecture Common XML DOM Indexing XML DOM Storage XML DOM <input> pipeline <extract> pipeline <retrieve> pipeline <store> pipeline XML Doc XML Doc XML Doc Zebra Indexes Zebra Storage idzebra-2.0.44/doc/querymodel-rpn.html0000644000175000017500000014443711412336551014576 000000000000002. RPN queries and semantics

    2. RPN queries and semantics

    The PQF grammar is documented in the YAZ manual, and shall not be repeated here. This textual PQF representation is not transmitted to Zebra during search, but it is in the client mapped to the equivalent Z39.50 binary query parse tree.

    2.1. RPN tree structure

    The RPN parse tree - or the equivalent textual representation in PQF - may start with one specification of the attribute set used. Following is a query tree, which consists of atomic query parts (APT) or named result sets, eventually paired by boolean binary operators, and finally recursively combined into complex query trees.

    2.1.1. Attribute sets

    Attribute sets define the exact meaning and semantics of queries issued. Zebra comes with some predefined attribute set definitions, others can easily be defined and added to the configuration.

    Table 5.1. Attribute sets predefined in Zebra

    Attribute setPQF notation (Short hand)StatusNotes
    Explainexp-1Special attribute set used on the special automagic IR-Explain-1 database to gain information on server capabilities, database names, and database and semantics.predefined
    BIB-1bib-1Standard PQF query language attribute set which defines the semantics of Z39.50 searching. In addition, all of the non-use attributes (types 2-14) define the hard-wired Zebra internal query processing.default
    GILSgilsExtension to the BIB-1 attribute set.predefined

    The use attributes (type 1) mappings the predefined attribute sets are found in the attribute set configuration files tab/*.att.

    Note

    The Zebra internal query processing is modeled after the BIB-1 attribute set, and the non-use attributes type 2-6 are hard-wired in. It is therefore essential to be familiar with Section 2.4, “Zebra general Bib1 Non-Use Attributes (type 2-6)”.

    2.1.2. Boolean operators

    A pair of sub query trees, or of atomic queries, is combined using the standard boolean operators into new query trees. Thus, boolean operators are always internal nodes in the query tree.

    Table 5.2. Boolean operators

    KeywordOperatorDescription
    @andbinary AND operatorSet intersection of two atomic queries hit sets
    @orbinary OR operatorSet union of two atomic queries hit sets
    @notbinary AND NOT operatorSet complement of two atomic queries hit sets
    @proxbinary PROXIMITY operatorSet intersection of two atomic queries hit sets. In addition, the intersection set is purged for all documents which do not satisfy the requested query term proximity. Usually a proper subset of the AND operation.

    For example, we can combine the terms information and retrieval into different searches in the default index of the default attribute set as follows. Querying for the union of all documents containing the terms information OR retrieval:

           Z> find @or information retrieval
          

    Querying for the intersection of all documents containing the terms information AND retrieval: The hit set is a subset of the corresponding OR query.

           Z> find @and information retrieval
          

    Querying for the intersection of all documents containing the terms information AND retrieval, taking proximity into account: The hit set is a subset of the corresponding AND query (see the PQF grammar for details on the proximity operator):

           Z> find @prox 0 3 0 2 k 2 information retrieval
          

    Querying for the intersection of all documents containing the terms information AND retrieval, in the same order and near each other as described in the term list. The hit set is a subset of the corresponding PROXIMITY query.

           Z> find "information retrieval"
          

    2.1.3. Atomic queries (APT)

    Atomic queries are the query parts which work on one access point only. These consist of an attribute list followed by a single term or a quoted term list, and are often called Attributes-Plus-Terms (APT) queries.

    Atomic (APT) queries are always leaf nodes in the PQF query tree. UN-supplied non-use attributes types 2-12 are either inherited from higher nodes in the query tree, or are set to Zebra's default values. See Section 2.3, “BIB-1 Attribute Set” for details.

    Table 5.3. Atomic queries (APT)

    NameTypeNotes
    attribute listList of orthogonal attributesAny of the orthogonal attribute types may be omitted, these are inherited from higher query tree nodes, or if not inherited, are set to the default Zebra configuration values.
    termsingle term or quoted term list Here the search terms or list of search terms is added to the query

    Querying for the term information in the default index using the default attribute set, the server choice of access point/index, and the default non-use attributes.

           Z> find information
          

    Equivalent query fully specified including all default values:

           Z> find @attrset bib-1 @attr 1=1017 @attr 2=3 @attr 3=3 @attr 4=1 @attr 5=100 @attr 6=1 information
          

    Finding all documents which have the term debussy in the title field.

           Z> find @attr 1=4 debussy
          

    The scan operation is only supported with atomic APT queries, as it is bound to one access point at a time. Boolean query trees are not allowed during scan.

    For example, we might want to scan the title index, starting with the term debussy, and displaying this and the following terms in lexicographic order:

           Z> scan @attr 1=4 debussy
          

    2.1.4. Named Result Sets

    Named result sets are supported in Zebra, and result sets can be used as operands without limitations. It follows that named result sets are leaf nodes in the PQF query tree, exactly as atomic APT queries are.

    After the execution of a search, the result set is available at the server, such that the client can use it for subsequent searches or retrieval requests. The Z30.50 standard actually stresses the fact that result sets are volatile. It may cease to exist at any time point after search, and the server will send a diagnostic to the effect that the requested result set does not exist any more.

    Defining a named result set and re-using it in the next query, using yaz-client. Notice that the client, not the server, assigns the string '1' to the named result set.

           Z> f @attr 1=4 mozart
           ...
           Number of hits: 43, setno 1
           ...
           Z> f @and @set 1 @attr 1=4 amadeus
           ...
           Number of hits: 14, setno 2
          

    Note

    Named result sets are only supported by the Z39.50 protocol. The SRU web service is stateless, and therefore the notion of named result sets does not exist when accessing a Zebra server by the SRU protocol.

    2.1.5. Zebra's special access point of type 'string'

    The numeric use (type 1) attribute is usually referred to from a given attribute set. In addition, Zebra let you use any internal index name defined in your configuration as use attribute value. This is a great feature for debugging, and when you do not need the complexity of defined use attribute values. It is the preferred way of accessing Zebra indexes directly.

    Finding all documents which have the term list "information retrieval" in an Zebra index, using its internal full string name. Scanning the same index.

           Z> find @attr 1=sometext "information retrieval"
           Z> scan @attr 1=sometext aterm
          

    Searching or scanning the bib-1 use attribute 54 using its string name:

           Z> find @attr 1=Code-language eng
           Z> scan @attr 1=Code-language ""
          

    It is possible to search in any silly string index - if it's defined in your indexing rules and can be parsed by the PQF parser. This is definitely not the recommended use of this facility, as it might confuse your users with some very unexpected results.

           Z> find @attr 1=silly/xpath/alike[@index]/name "information retrieval"
          

    See also Section 3.5, “Mapping from PQF atomic APT queries to Zebra internal register indexes” for details, and the section called “The SRU Server” for the SRU PQF query extension using string names as a fast debugging facility.

    2.1.6. Zebra's special access point of type 'XPath' for GRS-1 filters

    As we have seen above, it is possible (albeit seldom a great idea) to emulate XPath 1.0 based search by defining use (type 1) string attributes which in appearance resemble XPath queries. There are two problems with this approach: first, the XPath-look-alike has to be defined at indexing time, no new undefined XPath queries can entered at search time, and second, it might confuse users very much that an XPath-alike index name in fact gets populated from a possible entirely different XML element than it pretends to access.

    When using the GRS-1 Record Model (see Chapter 9, GRS-1 Record Model and Filter Modules), we have the possibility to embed life XPath expressions in the PQF queries, which are here called use (type 1) xpath attributes. You must enable the xpath enable directive in your .abs configuration files.

    Note

    Only a very restricted subset of the XPath 1.0 standard is supported as the GRS-1 record model is simpler than a full XML DOM structure. See the following examples for possibilities.

    Finding all documents which have the term "content" inside a text node found in a specific XML DOM subtree, whose starting element is addressed by XPath.

           Z> find @attr 1=/root content 
           Z> find @attr 1=/root/first content
          

    Notice that the XPath must be absolute, i.e., must start with '/', and that the XPath descendant-or-self axis followed by a text node selection text() is implicitly appended to the stated XPath. It follows that the above searches are interpreted as:

           Z> find @attr 1=/root//text() content 
           Z> find @attr 1=/root/first//text() content
          

    Searching inside attribute strings is possible:

           Z> find @attr 1=/link/@creator morten 
          

    Filter the addressing XPath by a predicate working on exact string values in attributes (in the XML sense) can be done: return all those docs which have the term "english" contained in one of all text sub nodes of the subtree defined by the XPath /record/title[@lang='en']. And similar predicate filtering.

           Z> find @attr 1=/record/title[@lang='en'] english
           Z> find @attr 1=/link[@creator='sisse'] sibelius
           Z> find @attr 1=/link[@creator='sisse']/description[@xml:lang='da'] sibelius 
          

    Combining numeric indexes, boolean expressions, and xpath based searches is possible:

           Z> find @attr 1=/record/title @and foo bar
           Z> find @and @attr 1=/record/title foo @attr 1=4 bar
          

    Escaping PQF keywords and other non-parseable XPath constructs with '{ }' to prevent client-side PQF parsing syntax errors:

           Z> find @attr {1=/root/first[@attr='danish']} content
           Z> find @attr {1=/record/@set} oai
          

    Warning

    It is worth mentioning that these dynamic performed XPath queries are a performance bottleneck, as no optimized specialized indexes can be used. Therefore, avoid the use of this facility when speed is essential, and the database content size is medium to large.

    2.2. Explain Attribute Set

    The Z39.50 standard defines the Explain attribute set Exp-1, which is used to discover information about a server's search semantics and functional capabilities Zebra exposes a "classic" Explain database by base name IR-Explain-1, which is populated with system internal information.

    The attribute-set exp-1 consists of a single use attribute (type 1).

    In addition, the non-Use BIB-1 attributes, that is, the types Relation, Position, Structure, Truncation, and Completeness are imported from the BIB-1 attribute set, and may be used within any explain query.

    2.2.1. Use Attributes (type = 1)

    The following Explain search attributes are supported: ExplainCategory (@attr 1=1), DatabaseName (@attr 1=3), DateAdded (@attr 1=9), DateChanged(@attr 1=10).

    A search in the use attribute ExplainCategory supports only these predefined values: CategoryList, TargetInfo, DatabaseInfo, AttributeDetails.

    See tab/explain.att and the Z39.50 standard for more information.

    2.2.2. Explain searches with yaz-client

    Classic Explain only defines retrieval of Explain information via ASN.1. Practically no Z39.50 clients supports this. Fortunately they don't have to - Zebra allows retrieval of this information in other formats: SUTRS, XML, GRS-1 and ASN.1 Explain.

    List supported categories to find out which explain commands are supported:

           Z> base IR-Explain-1
           Z> find @attr exp1 1=1 categorylist
           Z> form sutrs
           Z> show 1+2
          

    Get target info, that is, investigate which databases exist at this server endpoint:

           Z> base IR-Explain-1
           Z> find @attr exp1 1=1 targetinfo
           Z> form xml
           Z> show 1+1
           Z> form grs-1
           Z> show 1+1
           Z> form sutrs
           Z> show 1+1
          

    List all supported databases, the number of hits is the number of databases found, which most commonly are the following two: the Default and the IR-Explain-1 databases.

           Z> base IR-Explain-1
           Z> find @attr exp1 1=1 databaseinfo
           Z> form sutrs
           Z> show 1+2
          

    Get database info record for database Default.

           Z> base IR-Explain-1
           Z> find @and @attr exp1 1=1 databaseinfo @attr exp1 1=3 Default
          

    Identical query with explicitly specified attribute set:

           Z> base IR-Explain-1
           Z> find @attrset exp1 @and @attr 1=1 databaseinfo @attr 1=3 Default
          

    Get attribute details record for database Default. This query is very useful to study the internal Zebra indexes. If records have been indexed using the alvis XSLT filter, the string representation names of the known indexes can be found.

           Z> base IR-Explain-1
           Z> find @and @attr exp1 1=1 attributedetails @attr exp1 1=3 Default
          

    Identical query with explicitly specified attribute set:

           Z> base IR-Explain-1
           Z> find @attrset exp1 @and @attr 1=1 attributedetails @attr 1=3 Default
          

    2.3. BIB-1 Attribute Set

    Most of the information contained in this section is an excerpt of the ATTRIBUTE SET BIB-1 (Z39.50-1995) SEMANTICS found at . The BIB-1 Attribute Set Semantics from 1995, also in an updated BIB-1 Attribute Set version from 2003. Index Data is not the copyright holder of this information, except for the configuration details, the listing of Zebra's capabilities, and the example queries.

    2.3.1. Use Attributes (type 1)

    A use attribute specifies an access point for any atomic query. These access points are highly dependent on the attribute set used in the query, and are user configurable using the following default configuration files: tab/bib1.att, tab/dan1.att, tab/explain.att, and tab/gils.att.

    For example, some few BIB-1 use attributes from the tab/bib1.att are:

           att 1               Personal-name
           att 2               Corporate-name
           att 3               Conference-name
           att 4               Title
           ...
           att 1009            Subject-name-personal
           att 1010            Body-of-text
           att 1011            Date/time-added-to-db
           ...
           att 1016            Any
           att 1017            Server-choice
           att 1018            Publisher
           ...
           att 1035            Anywhere
           att 1036            Author-Title-Subject
          

    New attribute sets can be added by adding new tab/*.att configuration files, which need to be sourced in the main configuration zebra.cfg.

    In addition, Zebra allows the access of internal index names and dynamic XPath as use attributes; see Section 2.1.5, “Zebra's special access point of type 'string'” and Section 2.1.6, “Zebra's special access point of type 'XPath' for GRS-1 filters”.

    Phrase search for information retrieval in the title-register, scanning the same register afterwards:

          Z> find @attr 1=4 "information retrieval"
          Z> scan @attr 1=4 information
         

    2.4. Zebra general Bib1 Non-Use Attributes (type 2-6)

    2.4.1. Relation Attributes (type 2)

    Relation attributes describe the relationship of the access point (left side of the relation) to the search term as qualified by the attributes (right side of the relation), e.g., Date-publication <= 1975.

    Table 5.4. Relation Attributes (type 2)

    RelationValueNotes
    Less than1supported
    Less than or equal2supported
    Equal3default
    Greater or equal4supported
    Greater than5supported
    Not equal6unsupported
    Phonetic100unsupported
    Stem101unsupported
    Relevance102supported
    AlwaysMatches103supported *

    Note

    AlwaysMatches searches are only supported if alwaysmatches indexing has been enabled. See Section 1, “The default.idx file”

    The relation attributes 1-5 are supported and work exactly as expected. All ordering operations are based on a lexicographical ordering, except when the structure attribute numeric (109) is used. In this case, ordering is numerical. See Section 2.4.3, “Structure Attributes (type 4)”.

           Z> find @attr 1=Title @attr 2=1 music
           ...
           Number of hits: 11745, setno 1
           ...
           Z> find @attr 1=Title @attr 2=2 music
           ...
           Number of hits: 11771, setno 2
           ...
           Z> find @attr 1=Title @attr 2=3 music
           ...
           Number of hits: 532, setno 3
           ...
           Z> find @attr 1=Title @attr 2=4 music
           ...
           Number of hits: 11463, setno 4
           ...
           Z> find @attr 1=Title @attr 2=5 music
           ...
           Number of hits: 11419, setno 5
          

    The relation attribute Relevance (102) is supported, see Section 9, “Relevance Ranking and Sorting of Result Sets” for full information.

    Ranked search for information retrieval in the title-register:

           Z> find @attr 1=4 @attr 2=102 "information retrieval"
          

    The relation attribute AlwaysMatches (103) is in the default configuration supported in conjecture with structure attribute Phrase (1) (which may be omitted by default). It can be configured to work with other structure attributes, see the configuration file tab/default.idx and Section 3.5, “Mapping from PQF atomic APT queries to Zebra internal register indexes”.

    AlwaysMatches (103) is a great way to discover how many documents have been indexed in a given field. The search term is ignored, but needed for correct PQF syntax. An empty search term may be supplied.

           Z> find @attr 1=Title  @attr 2=103  ""
           Z> find @attr 1=Title  @attr 2=103  @attr 4=1 ""
          

    2.4.2. Position Attributes (type 3)

    The position attribute specifies the location of the search term within the field or subfield in which it appears.

    Table 5.5. Position Attributes (type 3)

    PositionValueNotes
    First in field 1supported *
    First in subfield2supported *
    Any position in field3default

    Note

    Zebra only supports first-in-field seaches if the firstinfield is enabled for the index Refer to Section 1, “The default.idx file”. Zebra does not distinguish between first in field and first in subfield. They result in the same hit count. Searching for first position in (sub)field in only supported in Zebra 2.0.2 and later.

    2.4.3. Structure Attributes (type 4)

    The structure attribute specifies the type of search term. This causes the search to be mapped on different Zebra internal indexes, which must have been defined at index time.

    The possible values of the structure attribute (type 4) can be defined using the configuration file tab/default.idx. The default configuration is summarized in this table.

    Table 5.6. Structure Attributes (type 4)

    StructureValueNotes
    Phrase 1default
    Word2supported
    Key3supported
    Year4supported
    Date (normalized)5supported
    Word list6supported
    Date (un-normalized)100unsupported
    Name (normalized) 101unsupported
    Name (un-normalized) 102unsupported
    Structure103unsupported
    Urx104supported
    Free-form-text105supported
    Document-text106supported
    Local-number107supported
    String108unsupported
    Numeric string109supported

    The structure attribute values Word list (6) is supported, and maps to the boolean AND combination of words supplied. The word list is useful when Google-like bag-of-word queries need to be translated from a GUI query language to PQF. For example, the following queries are equivalent:

          Z> find @attr 1=Title @attr 4=6 "mozart amadeus"
          Z> find @attr 1=Title  @and mozart amadeus
         

    The structure attribute value Free-form-text (105) and Document-text (106) are supported, and map both to the boolean OR combination of words supplied. The following queries are equivalent:

          Z> find @attr 1=Body-of-text @attr 4=105 "bach salieri teleman"
          Z> find @attr 1=Body-of-text @attr 4=106 "bach salieri teleman"
          Z> find @attr 1=Body-of-text @or bach @or salieri teleman 
         

    This OR list of terms is very useful in combination with relevance ranking:

          Z> find @attr 1=Body-of-text @attr 2=102 @attr 4=105 "bach salieri teleman"
         

    The structure attribute value Local number (107) is supported, and maps always to the Zebra internal document ID, irrespectively which use attribute is specified. The following queries have exactly the same unique record in the hit set:

          Z> find @attr 4=107 10
          Z> find @attr 1=4 @attr 4=107 10
          Z> find @attr 1=1010 @attr 4=107 10
         

    In the GILS schema (gils.abs), the west-bounding-coordinate is indexed as type n, and is therefore searched by specifying structure=Numeric String. To match all those records with west-bounding-coordinate greater than -114 we use the following query:

          Z> find @attr 4=109 @attr 2=5 @attr gils 1=2038 -114
         

    Note

    The exact mapping between PQF queries and Zebra internal indexes and index types is explained in Section 3.5, “Mapping from PQF atomic APT queries to Zebra internal register indexes”.

    2.4.4. Truncation Attributes (type = 5)

    The truncation attribute specifies whether variations of one or more characters are allowed between search term and hit terms, or not. Using non-default truncation attributes will broaden the document hit set of a search query.

    Table 5.7. Truncation Attributes (type 5)

    TruncationValueNotes
    Right truncation 1supported
    Left truncation2supported
    Left and right truncation3supported
    Do not truncate100default
    Process # in search term101supported
    RegExpr-1 102supported
    RegExpr-2103supported

    The truncation attribute values 1-3 perform the obvious way:

           Z> scan @attr 1=Body-of-text  schnittke
           ...
           * schnittke (81)
           schnittkes (31)
           schnittstelle (1)
           ...
           Z> find @attr 1=Body-of-text  @attr 5=1 schnittke
           ...
           Number of hits: 95, setno 7
           ...
           Z> find @attr 1=Body-of-text  @attr 5=2 schnittke
           ...
           Number of hits: 81, setno 6
           ...
           Z> find @attr 1=Body-of-text  @attr 5=3 schnittke
           ...
           Number of hits: 95, setno 8
          

    The truncation attribute value Process # in search term (101) is a poor-man's regular expression search. It maps each # to .*, and performs then a Regexp-1 (102) regular expression search. The following two queries are equivalent:

           Z> find @attr 1=Body-of-text  @attr 5=101 schnit#ke
           Z> find @attr 1=Body-of-text  @attr 5=102 schnit.*ke
           ...
           Number of hits: 89, setno 10
          

    The truncation attribute value Regexp-1 (102) is a normal regular search, see Section 3.6, “Zebra Regular Expressions in Truncation Attribute (type = 5)” for details.

           Z> find @attr 1=Body-of-text  @attr 5=102 schnit+ke
           Z> find @attr 1=Body-of-text  @attr 5=102 schni[a-t]+ke
          

    The truncation attribute value Regexp-2 (103) is a Zebra specific extension which allows fuzzy matches. One single error in spelling of search terms is allowed, i.e., a document is hit if it includes a term which can be mapped to the used search term by one character substitution, addition, deletion or change of position.

           Z> find @attr 1=Body-of-text  @attr 5=100 schnittke
           ...
           Number of hits: 81, setno 14
           ...
           Z> find @attr 1=Body-of-text  @attr 5=103 schnittke
           ...
           Number of hits: 103, setno 15
           ...
          

    2.4.5. Completeness Attributes (type = 6)

    The Completeness Attributes (type = 6) is used to specify that a given search term or term list is either part of the terms of a given index/field (Incomplete subfield (1)), or is what literally is found in the entire field's index (Complete field (3)).

    Table 5.8. Completeness Attributes (type = 6)

    CompletenessValueNotes
    Incomplete subfield1default
    Complete subfield2deprecated
    Complete field3supported

    The Completeness Attributes (type = 6) is only partially and conditionally supported in the sense that it is ignored if the hit index is not of structure type="w" or type="p".

    Incomplete subfield (1) is the default, and makes Zebra use register type="w", whereas Complete field (3) triggers search and scan in index type="p".

    The Complete subfield (2) is a reminiscent from the happy MARC binary format days. Zebra does not support it, but maps silently to Complete field (3).

    Note

    The exact mapping between PQF queries and Zebra internal indexes and index types is explained in Section 3.5, “Mapping from PQF atomic APT queries to Zebra internal register indexes”.

    idzebra-2.0.44/doc/fields-and-charsets.html0000644000175000017500000002141511412336551015421 00000000000000Chapter 10. Field Structure and Character Sets

    Chapter 10. Field Structure and Character Sets

    In order to provide a flexible approach to national character set handling, Zebra allows the administrator to configure the set up the system to handle any 8-bit character set — including sets that require multi-octet diacritics or other multi-octet characters. The definition of a character set includes a specification of the permissible values, their sort order (this affects the display in the SCAN function), and relationships between upper- and lowercase characters. Finally, the definition includes the specification of space characters for the set.

    The operator can define different character sets for different fields, typical examples being standard text fields, numerical fields, and special-purpose fields such as WWW-style linkages (URx).

    Zebra 1.3 and Zebra versions 2.0.18 and earlier required that the field type is a single character, e.g. w (for word), and p for phrase. Zebra 2.0.20 and later allow field types to be any string. This allows for greater flexibility - in particular per-locale (language) fields can be defined.

    Version 2.1 of Zebra can also be configured - per field - to use the ICU library to perform tokenization and normalization of strings. This is an alternative to the "charmap" files which has been part of Zebra since its first release.

    1. The default.idx file

    The field types, and hence character sets, are associated with data elements by the indexing rules (say title:w) in the various filters. Fields are defined in a field definition file which, by default, is called default.idx. This file provides the association between field type codes and the character map files (with the .chr suffix). The format of the .idx file is as follows

    index field type code

    This directive introduces a new search index code. The argument is a one-character code to be used in the .abs files to select this particular index type. An index, roughly, corresponds to a particular structure attribute during search. Refer to the section called “Z39.50 Search”.

    sort field code type

    This directive introduces a sort index. The argument is a one-character code to be used in the .abs fie to select this particular index type. The corresponding use attribute must be used in the sort request to refer to this particular sort index. The corresponding character map (see below) is used in the sort process.

    completeness boolean

    This directive enables or disables complete field indexing. The value of the boolean should be 0 (disable) or 1. If completeness is enabled, the index entry will contain the complete contents of the field (up to a limit), with words (non-space characters) separated by single space characters (normalized to " " on display). When completeness is disabled, each word is indexed as a separate entry. Complete subfield indexing is most useful for fields which are typically browsed (e.g., titles, authors, or subjects), or instances where a match on a complete subfield is essential (e.g., exact title searching). For fields where completeness is disabled, the search engine will interpret a search containing space characters as a word proximity search.

    firstinfield boolean

    This directive enables or disables first-in-field indexing. The value of the boolean should be 0 (disable) or 1.

    alwaysmatches boolean

    This directive enables or disables alwaysmatches indexing. The value of the boolean should be 0 (disable) or 1.

    charmap filename

    This is the filename of the character map to be used for this index for field type. See Section 2, “Charmap Files” for details.

    icuchain filename

    Specifies the filename with ICU tokenization and normalization rules. See Section 3, “ICU Chain Files” for details. Using icuchain for a field type is an alternative to charmap. It does not make sense to define both icuchain and charmap for the same field type.

    Example 10.1. Field types

    Following are three excerpts of the standard tab/default.idx configuration file. Notice that the index and sort are grouping directives, which bind all other following directives to them:

         # Traditional word index
         # Used if completeness is 'incomplete field' (@attr 6=1) and
         # structure is word/phrase/word-list/free-form-text/document-text
         index w
         completeness 0
         position 1
         alwaysmatches 1
         firstinfield 1
         charmap string.chr
    
         ...
    
         # Null map index (no mapping at all)
         # Used if structure=key (@attr 4=3)
         index 0
         completeness 0
         position 1
         charmap @
    
         ...
    
         # Sort register
         sort s
         completeness 1
         charmap string.chr
         


    idzebra-2.0.44/doc/installation-upgrade.html0000644000175000017500000001141711412336551015730 000000000000004. Upgrading from Zebra version 1.3.x

    4. Upgrading from Zebra version 1.3.x

    Zebra's installation directories have changed a bit. In addition, the new loadable modules must be defined in the master zebra.cfg configuration file. The old version 1.3.x configuration options

         # profilePath - where to look for config files
         profilePath: some/local/path:/usr/share/idzebra/tab
        

    must be changed to

         # profilePath - where to look for config files
         profilePath: some/local/path:/usr/share/idzebra-2.0/tab
    
         # modulePath - where to look for loadable zebra modules
         modulePath: /usr/lib/idzebra-2.0/modules
        

    Note

    The internal binary register structures have changed; all Zebra databases must be re-indexed after upgrade.

    The attribute set definition files may no longer contain redirection to other fields. For example the following snippet of a custom custom/bib1.att BIB-1 attribute set definition file is no longer supported:

         att 1016            Any 		1016,4,1005,62
        

    and should be changed to

         att 1016            Any
        

    Similar behaviour can be expressed in the new release by defining a new index Any:w in all GRS-1 *.abs record indexing configuration files. The above example configuration needs to make the changes from version 1.3.x indexing instructions

         xelm /*/alternative  Body-of-text:w,Title:s,Title:w
         xelm /*/title        Body-of-text:w,Title:s,Title:w
        

    to version 2.0.0 indexing instructions

         xelm /*/alternative  Any:w,Body-of-text:w,Title:s,Title:w
         xelm /*/title        Any:w,Body-of-text:w,Title:s,Title:w
        

    It is also possible to map the numerical attribute value @attr 1=1016 onto another already existing huge index, in this example, one could for example use the mapping

         att 1016            Body-of-text
        

    with equivalent outcome without editing all GRS-1 *.abs record indexing configuration files.

    Server installations which use the special IDXPATH attribute set must add the following line to the zebra.cfg configuration file:

         attset: idxpath.att
        

    idzebra-2.0.44/doc/tutorial.html0000644000175000017500000001520511412336551013444 00000000000000Chapter 3. Tutorial

    Chapter 3. Tutorial

    1. A first OAI indexing example

    In this section, we will test the system by indexing a small set of sample OAI records that are included with the Zebra distribution, running a Zebra server against the newly created database, and searching the indexes with a client that connects to that server.

    Go to the examples/oai-pmh subdirectory of the distribution archive, or make a deep copy of the Debian installation directory /usr/share/idzebra-2.0.-examples/oai-pmh. An XML file containing multiple OAI records is located in the sub directory examples/oai-pmh/data.

    Additional OAI test records can be downloaded by running a shell script (you may want to abort the script when you have waited longer than your coffee brews ..).

         cd data
         ./fetch_OAI_data.sh
         cd ../
        

    To index these OAI records, type:

         zebraidx-2.0 -c conf/zebra.cfg init
         zebraidx-2.0 -c conf/zebra.cfg update data
         zebraidx-2.0 -c conf/zebra.cfg commit
        

    In case you have not installed zebra yet but have compiled the binaries from this tarball, use the following command form:

         ../../index/zebraidx -c conf/zebra.cfg this and that 
        

    On some systems the Zebra binaries are installed under the generic names, you need to use the following command form:

         zebraidx -c conf/zebra.cfg this and that 
        

    In this command, the word update is followed by the name of a directory: zebraidx updates all files in the hierarchy rooted at data. The command option -c conf/zebra.cfg points to the proper configuration file.

    You might ask yourself how XML content is indexed using XSLT stylesheets: to satisfy your curiosity, you might want to run the indexing transformation on an example debugging OAI record.

         xsltproc conf/oai2index.xsl data/debug-record.xml
        

    Here you see the OAI record transformed into the indexing XML format. Zebra is creating several inverted indexes, and their name and type are clearly visible in the indexing XML format.

    If your indexing command was successful, you are now ready to fire up a server. To start a server on port 9999, type:

         zebrasrv-2.0 -c conf/zebra.cfg  @:9999
        

    The Zebra index that you have just created has a single database named Default. The database contains several OAI records, and the server will return records in the XML format only. The indexing machine did the splitting into individual records just behind the scenes.

    idzebra-2.0.44/doc/gpl-2.0.xml0000644000175000017500000005414611412332551012517 00000000000000 GNU General Public License Version 2, June 1991 1989, 1991 Free Software Foundation, Inc.
    Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
    Version 2, June 1991
    GNU General Public License
    Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software - to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: copyright the software, and offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow.
    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
    Section 0 This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The Program, below, refers to any such program or work, and a work based on the Program means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term modification.) Each licensee is addressed as you. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
    Section 1 You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
    Section 2 You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: If the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
    Section 3 You may copy and distribute the Program (or a work based on it, under Section 2 in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
    Section 4 You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
    Section 5 You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
    Section 6 Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
    Section 7 If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
    Section 8 If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
    Section 9 The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and any later version, you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
    Section 10 If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
    NO WARRANTY Section 11 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
    Section 12 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS
    How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the copyright line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type show w. This is free software, and you are welcome to redistribute it under certain conditions; type show c for details. The hypothetical commands show w and show c should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than show w and show c; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a copyright disclaimer for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program Gnomovision (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.
    idzebra-2.0.44/doc/zebra.png0000644000175000017500000000432311146471444012530 00000000000000‰PNG  IHDRÒ¨èNXv PLTEÿÿÿÿÿÿŽôÃìtRNS@æØfbKGDˆH pHYs  ÒÝ~ütIMEÓ ',íŒ>=CIDATxœÅšËn¤:†;x"…÷±¼ŠŽD4ø)Z³œ½Ñ¤W½qÔ®§0e‘pLÙ# ]ª#$(”‡²¸ÞÑbR?y!àµÐJ‹äû…§Lt>D Áu”igÀç[¡ •¨£”¹`´²ÚÙDQæ©nÒ3‡-S@);p¬³j¦€G ‰€ºoûT£ýèˆr™ÒJû ×*LîË/ÊÃã¿}ëÑ Ú/F"aÎnEqG¹¬(£¿L³P ¢Â…KÇ€b´Âjå`¡‚Há‚"™RG)\}u£=ßQ¾ Z'½W]«ÁÌ(*tÇ&åk”K®±?‚»”]éƒÆ4[¡t¢0ôùY =sÉÄÎÔFQš1EDIy¢TÆDµ”’¦; ³S3¦yEùÜ„kˆKQ<ôB‡ÇB±‘ø®Ñ¾´TabgFç‘Ñ$` $-Ga´W±/Çÿc¡”ó~M‘Q¼VÑ@Ãí!DÌùìüˆÞDŠº×ÊùTõΈ䈉®ï&l5HSRaTqh†e”U…6 e°Y%½-„H1ÐFÆBÞ¦Z,/åµ›TˆÕl¢kÖkn"&­t^öÒzbÄÛ’ÒÜr¢[PPIõ€šhÙ3}Ü[Ä­Å«¯‚ú´(^¯ÏÇ´½ŠnYXŽtßœ§Æöå˜ ì“e×4„¸”‹™v©€šM Æ},ƒø®&i)õk M”\ÐÔÓ8ÀF d)“ ¨›~$ÊGýh·q {Ò¯šWFcÒÎ e‚ì·8Jq&S:oˆϨÉeä‹–“`,öáñ‘©—Oƒ´ÃåY†?ʪ(ÝÅRôæ{¢>BQ1eó—ÔKÔ< åµg/í\Ìïi)ê| 6u¼y›’›„¢tqì…ZH²Y(c&ÌRáØ; ¡Na X¨a º5œÑ9ÅQç²2´¥ˆ•“)3ŒX–n$6""z FY•$ÈØpf=8ª0$SøB»ªJl_±.çYkìl†)AÀ%=qÜ‹¥æTÍ_³Ó³/©Bò.”UYP/˜bãƒ6LQÆ"Å!ôëª,©É¢x? ë€Þ³kåRÔ2å=RÛ£®µës©äZF-Ÿ2…q×`UÜÂlLǤ¬Jt3í/ZÍÃdÔ  ç+JD¿T%9‘(=O¸ËVõL”á0p8Íy.õ[RFæ7voÏIÖ«KT\,URÈ w¡ñ—Ì*dpU`™š‡a@#é—Ž’ìÌW¦è{¹¹œ©IkNCCNÝRá!õ9 £VnÞD);û(CZú¦*×”¼¦°á`º¢2ÀÁœ5 £‰¯[º^¡¼YÎZA‰®B¢p#ÂbŽ-•¯rÂ*•˜ÏÔ8ú!5}gFÊ.º_(õ *‰ jÊC®„´¤`µ]æa?f\¨ ›"ÕØšòw^"Žo—s¹‡¹t±Ô`’/ ÕMÔŠÒù± ¨; [Ò…2FŠ;›P¡ ’Š@Í Äj¦>%”Û¤*·ºB“óB¥i*S‹J‹…&#i¡´¿ð‹XdaóÆR4_ÊîàJ„¿u/'˜âO] µCѼí×T,±]jâó½Ìr}DQíñЛ¨°Tó&õ ÆÛØÚx·P¡¨æ-ªÁ©Ê8“6?ލ•ºÔÛT Ö8Ùdï y;2›"eY,_ÇxÒïÇ&Ua‘̉âЇ<$îPž¨$)J@È¥2oSÚ!Rú¼nŽ›7±¸¤4SPòv@MV™eî85‘†í;U ]ZÄ„‘Š/²ƒÐ&r@A¤¦»Í8nS-:àE±Ûpþæv(šÂɧ(ºÊÚÕöMÚ3ÆýÔÆ žÄhË{¹Û¡¨TN°h¯qyˆÔöݾžû²+“#€V;kµ@÷$\y²a—ªg˜9 ÕSuá±CU¼ûöPt×W }õ9îݶãP½”w ¦:¿Gut‡¨+ïXõV½¸}JßPíQ5Gô÷1õºº§*Ô|H5+ŠòP¿ïR-Uœ}üZÿeö)Œ|ëK ߺÔ Ç”g´Aý¨îRº£òëR—JÇo+ªjú½I½ÞS5S“‚y“êR) ú?¢ºÕéiÊÿåö©·; ¯zÖêáLm‹£§6xCQ+|é©vµW±_ûT§6©'4TL=ˆ|Ûí= ú')#ç>UßW _†?O5ÿåï)Þ6w©žºÃcêHQŠ|E]dÞ¤^ù±êJÒ¿w)ŽÆcÊć€g)ý˜ªÎÏQÝ7©uä{ðtzÿ,ÅÁëweöpGÅ™aŸºÞRN;7OQ4ÃÒé°çi£.³Ì¥LÔîîðÆÔò±µ*Ýßxt8©¯Â˜"µ=´ÕLµ%Õ˜©ÍçÜ­—nSPbÓ’{Ž>< T¤6µâ´zK9½ö›T-Múbª¬ãÌvy rçNÓ7ý/ˆ÷Ч–=Ý ¶(üåwMÉüËÖlÓBz¦—)º8ÉÏ˵|þ© è—ú˜*t6<õWÚÕªâ!é°IEND®B`‚idzebra-2.0.44/doc/grs-exchange-formats.html0000644000175000017500000001262611412336551015631 000000000000004. GRS-1 Exchange Formats

    4. GRS-1 Exchange Formats

    Converting records from the internal structure to an exchange format is largely an automatic process. Currently, the following exchange formats are supported:

    • GRS-1. The internal representation is based on GRS-1/XML, so the conversion here is straightforward. The system will create applied variant and supported variant lists as required, if a record contains variant information.

    • XML. The internal representation is based on GRS-1/XML so the mapping is trivial. Note that XML schemas, preprocessing instructions and comments are not part of the internal representation and therefore will never be part of a generated XML record. Future versions of the Zebra will support that.

    • SUTRS. Again, the mapping is fairly straightforward. Indentation is used to show the hierarchical structure of the record. All "GRS-1" type records support both the GRS-1 and SUTRS representations.

    • ISO2709-based formats (USMARC, etc.). Only records with a two-level structure (corresponding to fields and subfields) can be directly mapped to ISO2709. For records with a different structuring (e.g., GILS), the representation in a structure like USMARC involves a schema-mapping (see Section 3.8, “The Schema Mapping (.map) Files”), to an "implied" USMARC schema (implied, because there is no formal schema which specifies the use of the USMARC fields outside of ISO2709). The resultant, two-level record is then mapped directly from the internal representation to ISO2709. See the GILS schema definition files for a detailed example of this approach.

    • Explain. This representation is only available for records belonging to the Explain schema.

    • Summary. This ASN-1 based structure is only available for records belonging to the Summary schema - or schema which provide a mapping to this schema (see the description of the schema mapping facility above).

    • SOIF. Support for this syntax is experimental, and is currently keyed to a private Index Data OID (1.2.840.10003.5.1000.81.2). All abstract syntaxes can be mapped to the SOIF format, although nested elements are represented by concatenation of the tag names at each level.

    idzebra-2.0.44/doc/recordmodel-grs.xml0000644000175000017500000021372511412332551014530 00000000000000 &acro.grs1; Record Model and Filter Modules The functionality of this record model has been improved and replaced by the DOM &acro.xml; record model. See . The record model described in this chapter applies to the fundamental, structured record type grs, introduced in .
    &acro.grs1; Record Filters Many basic subtypes of the grs type are currently available: grs.sgml This is the canonical input format described . It is using simple &acro.sgml;-like syntax. grs.marc.type This allows &zebra; to read records in the ISO2709 (&acro.marc;) encoding standard. Last parameter type names the .abs file (see below) which describes the specific &acro.marc; structure of the input record as well as the indexing rules. The grs.marc uses an internal representation which is not &acro.xml; conformant. In particular &acro.marc; tags are presented as elements with the same name. And &acro.xml; elements may not start with digits. Therefore this filter is only suitable for systems returning &acro.grs1; and &acro.marc; records. For &acro.xml; use grs.marcxml filter instead (see below). The loadable grs.marc filter module is packaged in the GNU/Debian package libidzebra2.0-mod-grs-marc grs.marcxml.type This allows &zebra; to read ISO2709 encoded records. Last parameter type names the .abs file (see below) which describes the specific &acro.marc; structure of the input record as well as the indexing rules. The internal representation for grs.marcxml is the same as for &acro.marcxml;. It slightly more complicated to work with than grs.marc but &acro.xml; conformant. The loadable grs.marcxml filter module is also contained in the GNU/Debian package libidzebra2.0-mod-grs-marc grs.xml This filter reads &acro.xml; records and uses Expat to parse them and convert them into ID&zebra;'s internal grs record model. Only one record per file is supported, due to the fact &acro.xml; does not allow two documents to "follow" each other (there is no way to know when a document is finished). This filter is only available if &zebra; is compiled with EXPAT support. The loadable grs.xml filter module is packaged in the GNU/Debian package libidzebra2.0-mod-grs-xml grs.regx.filter This enables a user-supplied Regular Expressions input filter described in . The loadable grs.regx filter module is packaged in the GNU/Debian package libidzebra2.0-mod-grs-regx grs.tcl.filter Similar to grs.regx but using Tcl for rules, described in . The loadable grs.tcl filter module is also packaged in the GNU/Debian package libidzebra2.0-mod-grs-regx
    &acro.grs1; Canonical Input Format Although input data can take any form, it is sometimes useful to describe the record processing capabilities of the system in terms of a single, canonical input format that gives access to the full spectrum of structure and flexibility in the system. In &zebra;, this canonical format is an "&acro.sgml;-like" syntax. To use the canonical format specify grs.sgml as the record type. Consider a record describing an information resource (such a record is sometimes known as a locator record). It might contain a field describing the distributor of the information resource, which might in turn be partitioned into various fields providing details about the distributor, like this: <Distributor> <Name> USGS/WRD </Name> <Organization> USGS/WRD </Organization> <Street-Address> U.S. GEOLOGICAL SURVEY, 505 MARQUETTE, NW </Street-Address> <City> ALBUQUERQUE </City> <State> NM </State> <Zip-Code> 87102 </Zip-Code> <Country> USA </Country> <Telephone> (505) 766-5560 </Telephone> </Distributor> The keywords surrounded by <...> are tags, while the sections of text in between are the data elements. A data element is characterized by its location in the tree that is made up by the nested elements. Each element is terminated by a closing tag - beginning with </, and containing the same symbolic tag-name as the corresponding opening tag. The general closing tag - </> - terminates the element started by the last opening tag. The structuring of elements is significant. The element Telephone, for instance, may be indexed and presented to the client differently, depending on whether it appears inside the Distributor element, or some other, structured data element such a Supplier element.
    Record Root The first tag in a record describes the root node of the tree that makes up the total record. In the canonical input format, the root tag should contain the name of the schema that lends context to the elements of the record (see ). The following is a GILS record that contains only a single element (strictly speaking, that makes it an illegal GILS record, since the GILS profile includes several mandatory elements - &zebra; does not validate the contents of a record against the &acro.z3950; profile, however - it merely attempts to match up elements of a local representation with the given schema): <gils> <title>Zen and the Art of Motorcycle Maintenance</title> </gils>
    Variants &zebra; allows you to provide individual data elements in a number of variant forms. Examples of variant forms are textual data elements which might appear in different languages, and images which may appear in different formats or layouts. The variant system in &zebra; is essentially a representation of the variant mechanism of &acro.z3950;-1995. The following is an example of a title element which occurs in two different languages. <title> <var lang lang "eng"> Zen and the Art of Motorcycle Maintenance</> <var lang lang "dan"> Zen og Kunsten at Vedligeholde en Motorcykel</> </title> The syntax of the variant element is <var class type value>. The available values for the class and type fields are given by the variant set that is associated with the current schema (see ). Variant elements are terminated by the general end-tag </>, by the variant end-tag </var>, by the appearance of another variant tag with the same class and value settings, or by the appearance of another, normal tag. In other words, the end-tags for the variants used in the example above could have been omitted. Variant elements can be nested. The element <title> <var lang lang "eng"><var body iana "text/plain"> Zen and the Art of Motorcycle Maintenance </title> Associates two variant components to the variant list for the title element. Given the nesting rules described above, we could write <title> <var body iana "text/plain> <var lang lang "eng"> Zen and the Art of Motorcycle Maintenance <var lang lang "dan"> Zen og Kunsten at Vedligeholde en Motorcykel </title> The title element above comes in two variants. Both have the IANA body type "text/plain", but one is in English, and the other in Danish. The client, using the element selection mechanism of &acro.z3950;, can retrieve information about the available variant forms of data elements, or it can select specific variants based on the requirements of the end-user.
    &acro.grs1; REGX And TCL Input Filters In order to handle general input formats, &zebra; allows the operator to define filters which read individual records in their native format and produce an internal representation that the system can work with. Input filters are ASCII files, generally with the suffix .flt. The system looks for the files in the directories given in the profilePath setting in the zebra.cfg files. The record type for the filter is grs.regx.filter-filename (fundamental type grs, file read type regx, argument filter-filename). Generally, an input filter consists of a sequence of rules, where each rule consists of a sequence of expressions, followed by an action. The expressions are evaluated against the contents of the input record, and the actions normally contribute to the generation of an internal representation of the record. An expression can be either of the following: INIT The action associated with this expression is evaluated exactly once in the lifetime of the application, before any records are read. It can be used in conjunction with an action that initializes tables or other resources that are used in the processing of input records. BEGIN Matches the beginning of the record. It can be used to initialize variables, etc. Typically, the BEGIN rule is also used to establish the root node of the record. END Matches the end of the record - when all of the contents of the record has been processed. /reg/ Matches regular expression pattern reg from the input record. The operators supported are the same as for regular expression queries. Refer to . BODY This keyword may only be used between two patterns. It matches everything between (not including) those patterns. FINISH The expression associated with this pattern is evaluated once, before the application terminates. It can be used to release system resources - typically ones allocated in the INIT step. An action is surrounded by curly braces ({...}), and consists of a sequence of statements. Statements may be separated by newlines or semicolons (;). Within actions, the strings that matched the expressions immediately preceding the action can be referred to as $0, $1, $2, etc. The available statements are: begin type [parameter ... ] Begin a new data element. The type is one of the following: record Begin a new record. The following parameter should be the name of the schema that describes the structure of the record, e.g., gils or wais (see below). The begin record call should precede any other use of the begin statement. element Begin a new tagged element. The parameter is the name of the tag. If the tag is not matched anywhere in the tagsets referenced by the current schema, it is treated as a local string tag. variant Begin a new node in a variant tree. The parameters are class type value. data parameter Create a data element. The concatenated arguments make up the value of the data element. The option -text signals that the layout (whitespace) of the data should be retained for transmission. The option -element tag wraps the data up in the tag. The use of the -element option is equivalent to preceding the command with a begin element command, and following it with the end command. end [type] Close a tagged element. If no parameter is given, the last element on the stack is terminated. The first parameter, if any, is a type name, similar to the begin statement. For the element type, a tag name can be provided to terminate a specific tag. unread no Move the input pointer to the offset of first character that match rule given by no. The first rule from left-to-right is numbered zero, the second rule is named 1 and so on. The following input filter reads a Usenet news file, producing a record in the WAIS schema. Note that the body of a news posting is separated from the list of headers by a blank line (or rather a sequence of two newline characters. BEGIN { begin record wais } /^From:/ BODY /$/ { data -element name $1 } /^Subject:/ BODY /$/ { data -element title $1 } /^Date:/ BODY /$/ { data -element lastModified $1 } /\n\n/ BODY END { begin element bodyOfDisplay begin variant body iana "text/plain" data -text $1 end record } If &zebra; is compiled with support for Tcl enabled, the statements described above are supplemented with a complete scripting environment, including control structures (conditional expressions and loop constructs), and powerful string manipulation mechanisms for modifying the elements of a record.
    &acro.grs1; Internal Record Representation When records are manipulated by the system, they're represented in a tree-structure, with data elements at the leaf nodes, and tags or variant components at the non-leaf nodes. The root-node identifies the schema that lends context to the tagging and structuring of the record. Imagine a simple record, consisting of a 'title' element and an 'author' element: ROOT TITLE "Zen and the Art of Motorcycle Maintenance" AUTHOR "Robert Pirsig" A slightly more complex record would have the author element consist of two elements, a surname and a first name: ROOT TITLE "Zen and the Art of Motorcycle Maintenance" AUTHOR FIRST-NAME "Robert" SURNAME "Pirsig" The root of the record will refer to the record schema that describes the structuring of this particular record. The schema defines the element tags (TITLE, FIRST-NAME, etc.) that may occur in the record, as well as the structuring (SURNAME should appear below AUTHOR, etc.). In addition, the schema establishes element set names that are used by the client to request a subset of the elements of a given record. The schema may also establish rules for converting the record to a different schema, by stating, for each element, a mapping to a different tag path.
    Tagged Elements A data element is characterized by its tag, and its position in the structure of the record. For instance, while the tag "telephone number" may be used different places in a record, we may need to distinguish between these occurrences, both for searching and presentation purposes. For instance, while the phone numbers for the "customer" and the "service provider" are both representatives for the same type of resource (a telephone number), it is essential that they be kept separate. The record schema provides the structure of the record, and names each data element (defined by the sequence of tags - the tag path - by which the element can be reached from the root of the record).
    Variants The children of a tag node may be either more tag nodes, a data node (possibly accompanied by tag nodes), or a tree of variant nodes. The children of variant nodes are either more variant nodes or a data node (possibly accompanied by more variant nodes). Each leaf node, which is normally a data node, corresponds to a variant form of the tagged element identified by the tag which parents the variant tree. The following title element occurs in two different languages: VARIANT LANG=ENG "War and Peace" TITLE VARIANT LANG=DAN "Krig og Fred" Which of the two elements are transmitted to the client by the server depends on the specifications provided by the client, if any. In practice, each variant node is associated with a triple of class, type, value, corresponding to the variant mechanism of &acro.z3950;.
    Data Elements Data nodes have no children (they are always leaf nodes in the record tree).
    &acro.grs1; Record Model Configuration The following sections describe the configuration files that govern the internal management of grs records. The system searches for the files in the directories specified by the profilePath setting in the zebra.cfg file.
    The Abstract Syntax The abstract syntax definition (also known as an Abstract Record Structure, or ARS) is the focal point of the record schema description. For a given schema, the ABS file may state any or all of the following: The object identifier of the &acro.z3950; schema associated with the ARS, so that it can be referred to by the client. The attribute set (which can possibly be a compound of multiple sets) which applies in the profile. This is used when indexing and searching the records belonging to the given profile. The tag set (again, this can consist of several different sets). This is used when reading the records from a file, to recognize the different tags, and when transmitting the record to the client - mapping the tags to their numerical representation, if they are known. The variant set which is used in the profile. This provides a vocabulary for specifying the forms of data that appear inside the records. Element set names, which are a shorthand way for the client to ask for a subset of the data elements contained in a record. Element set names, in the retrieval module, are mapped to element specifications, which contain information equivalent to the Espec-1 syntax of &acro.z3950;. Map tables, which may specify mappings to other database profiles, if desired. Possibly, a set of rules describing the mapping of elements to a &acro.marc; representation. A list of element descriptions (this is the actual ARS of the schema, in &acro.z3950; terms), which lists the ways in which the various tags can be used and organized hierarchically. Several of the entries above simply refer to other files, which describe the given objects.
    The Configuration Files This section describes the syntax and use of the various tables which are used by the retrieval module. The number of different file types may appear daunting at first, but each type corresponds fairly clearly to a single aspect of the &acro.z3950; retrieval facilities. Further, the average database administrator, who is simply reusing an existing profile for which tables already exist, shouldn't have to worry too much about the contents of these tables. Generally, the files are simple ASCII files, which can be maintained using any text editor. Blank lines, and lines beginning with a (#) are ignored. Any characters on a line followed by a (#) are also ignored. All other lines contain directives, which provide some setting or value to the system. Generally, settings are characterized by a single keyword, identifying the setting, followed by a number of parameters. Some settings are repeatable (r), while others may occur only once in a file. Some settings are optional (o), while others again are mandatory (m).
    The Abstract Syntax (.abs) Files The name of this file type is slightly misleading in &acro.z3950; terms, since, apart from the actual abstract syntax of the profile, it also includes most of the other definitions that go into a database profile. When a record in the canonical, &acro.sgml;-like format is read from a file or from the database, the first tag of the file should reference the profile that governs the layout of the record. If the first tag of the record is, say, <gils>, the system will look for the profile definition in the file gils.abs. Profile definitions are cached, so they only have to be read once during the lifespan of the current process. When writing your own input filters, the record-begin command introduces the profile, and should always be called first thing when introducing a new record. The file may contain the following directives: name symbolic-name (m) This provides a shorthand name or description for the profile. Mostly useful for diagnostic purposes. reference OID-name (m) The reference name of the OID for the profile. The reference names can be found in the util module of &yaz;. attset filename (m) The attribute set that is used for indexing and searching records belonging to this profile. tagset filename (o) The tag set (if any) that describe that fields of the records. varset filename (o) The variant set used in the profile. maptab filename (o,r) This points to a conversion table that might be used if the client asks for the record in a different schema from the native one. marc filename (o) Points to a file containing parameters for representing the record contents in the ISO2709 syntax. Read the description of the &acro.marc; representation facility below. esetname name filename (o,r) Associates the given element set name with an element selection file. If an (@) is given in place of the filename, this corresponds to a null mapping for the given element set name. all tags (o) This directive specifies a list of attributes which should be appended to the attribute list given for each element. The effect is to make every single element in the abstract syntax searchable by way of the given attributes. This directive provides an efficient way of supporting free-text searching across all elements. However, it does increase the size of the index significantly. The attributes can be qualified with a structure, as in the elm directive below. elm path name attributes (o,r) Adds an element to the abstract record syntax of the schema. The path follows the syntax which is suggested by the &acro.z3950; document - that is, a sequence of tags separated by slashes (/). Each tag is given as a comma-separated pair of tag type and -value surrounded by parenthesis. The name is the name of the element, and the attributes specifies which attributes to use when indexing the element in a comma-separated list. A ! in place of the attribute name is equivalent to specifying an attribute name identical to the element name. A - in place of the attribute name specifies that no indexing is to take place for the given element. The attributes can be qualified with field types to specify which character set should govern the indexing procedure for that field. The same data element may be indexed into several different fields, using different character set definitions. See the . The default field type is w for word. xelm xpath attributes Specifies indexing for record nodes given by xpath. Unlike directive elm, this directive allows you to index attribute contents. The xpath uses a syntax similar to XPath. The attributes have same syntax and meaning as directive elm, except that operator ! refers to the nodes selected by xpath. melm field$subfield attributes This directive is specifically for &acro.marc;-formatted records, ingested either in the form of &acro.marcxml; documents, or in the ISO2709/Z39.2 format using the grs.marcxml input filter. You can specify indexing rules for any subfield, or you can leave off the $subfield part and specify default rules for all subfields of the given field (note: default rules should come after any subfield-specific rules in the configuration file). The attributes have the same syntax and meaning as for the 'elm' directive above. encoding encodingname This directive specifies character encoding for external records. For records such as &acro.xml; that specifies encoding within the file via a header this directive is ignored. If neither this directive is given, nor an encoding is set within external records, ISO-8859-1 encoding is assumed. xpath enable/disable If this directive is followed by enable, then extra indexing is performed to allow for XPath-like queries. If this directive is not specified - equivalent to disable - no extra XPath-indexing is performed. systag systemTag actualTag Specifies what information, if any, &zebra; should automatically include in retrieval records for the ``system fields'' that it supports. systemTag may be any of the following: rank An integer indicating the relevance-ranking score assigned to the record. sysno An automatically generated identifier for the record, unique within this database. It is represented by the <localControlNumber> element in &acro.xml; and the (1,14) tag in &acro.grs1;. size The size, in bytes, of the retrieved record. The actualTag parameter may be none to indicate that the named element should be omitted from retrieval records. The mechanism for controlling indexing is not adequate for complex databases, and will probably be moved into a separate configuration table eventually. The following is an excerpt from the abstract syntax file for the GILS profile. name gils reference GILS-schema attset gils.att tagset gils.tag varset var1.var maptab gils-usmarc.map # Element set names esetname VARIANT gils-variant.est # for WAIS-compliance esetname B gils-b.est esetname G gils-g.est esetname F @ elm (1,10) rank - elm (1,12) url - elm (1,14) localControlNumber Local-number elm (1,16) dateOfLastModification Date/time-last-modified elm (2,1) title w:!,p:! elm (4,1) controlIdentifier Identifier-standard elm (2,6) abstract Abstract elm (4,51) purpose ! elm (4,52) originator - elm (4,53) accessConstraints ! elm (4,54) useConstraints ! elm (4,70) availability - elm (4,70)/(4,90) distributor - elm (4,70)/(4,90)/(2,7) distributorName ! elm (4,70)/(4,90)/(2,10) distributorOrganization ! elm (4,70)/(4,90)/(4,2) distributorStreetAddress ! elm (4,70)/(4,90)/(4,3) distributorCity !
    The Attribute Set (.att) Files This file type describes the Use elements of an attribute set. It contains the following directives. name symbolic-name (m) This provides a shorthand name or description for the attribute set. Mostly useful for diagnostic purposes. reference OID-name (m) The reference name of the OID for the attribute set. The reference names can be found in the util module of &yaz;. include filename (o,r) This directive is used to include another attribute set as a part of the current one. This is used when a new attribute set is defined as an extension to another set. For instance, many new attribute sets are defined as extensions to the bib-1 set. This is an important feature of the retrieval system of &acro.z3950;, as it ensures the highest possible level of interoperability, as those access points of your database which are derived from the external set (say, bib-1) can be used even by clients who are unaware of the new set. att att-value att-name [local-value] (o,r) This repeatable directive introduces a new attribute to the set. The attribute value is stored in the index (unless a local-value is given, in which case this is stored). The name is used to refer to the attribute from the abstract syntax. This is an excerpt from the GILS attribute set definition. Notice how the file describing the bib-1 attribute set is referenced. name gils reference GILS-attset include bib1.att att 2001 distributorName att 2002 indextermsControlled att 2003 purpose att 2004 accessConstraints att 2005 useConstraints
    The Tag Set (.tag) Files This file type defines the tagset of the profile, possibly by referencing other tag sets (most tag sets, for instance, will include tagsetG and tagsetM from the &acro.z3950; specification. The file may contain the following directives. name symbolic-name (m) This provides a shorthand name or description for the tag set. Mostly useful for diagnostic purposes. reference OID-name (o) The reference name of the OID for the tag set. The reference names can be found in the util module of &yaz;. The directive is optional, since not all tag sets are registered outside of their schema. type integer (m) The type number of the tagset within the schema profile (note: this specification really should belong to the .abs file. This will be fixed in a future release). include filename (o,r) This directive is used to include the definitions of other tag sets into the current one. tag number names type (o,r) Introduces a new tag to the set. The number is the tag number as used in the protocol (there is currently no mechanism for specifying string tags at this point, but this would be quick work to add). The names parameter is a list of names by which the tag should be recognized in the input file format. The names should be separated by slashes (/). The type is the recommended data type of the tag. It should be one of the following: structured string numeric bool oid generalizedtime intunit int octetstring null The following is an excerpt from the TagsetG definition file. name tagsetg reference TagsetG type 2 tag 1 title string tag 2 author string tag 3 publicationPlace string tag 4 publicationDate string tag 5 documentId string tag 6 abstract string tag 7 name string tag 8 date generalizedtime tag 9 bodyOfDisplay string tag 10 organization string
    The Variant Set (.var) Files The variant set file is a straightforward representation of the variant set definitions associated with the protocol. At present, only the Variant-1 set is known. These are the directives allowed in the file. name symbolic-name (m) This provides a shorthand name or description for the variant set. Mostly useful for diagnostic purposes. reference OID-name (o) The reference name of the OID for the variant set, if one is required. The reference names can be found in the util module of &yaz;. class integer class-name (m,r) Introduces a new class to the variant set. type integer type-name datatype (m,r) Addes a new type to the current class (the one introduced by the most recent class directive). The type names belong to the same name space as the one used in the tag set definition file. The following is an excerpt from the file describing the variant set Variant-1. name variant-1 reference Variant-1 class 1 variantId type 1 variantId octetstring class 2 body type 1 iana string type 2 z39.50 string type 3 other string
    The Element Set (.est) Files The element set specification files describe a selection of a subset of the elements of a database record. The element selection mechanism is equivalent to the one supplied by the Espec-1 syntax of the &acro.z3950; specification. In fact, the internal representation of an element set specification is identical to the Espec-1 structure, and we'll refer you to the description of that structure for most of the detailed semantics of the directives below. Not all of the Espec-1 functionality has been implemented yet. The fields that are mentioned below all work as expected, unless otherwise is noted. The directives available in the element set file are as follows: defaultVariantSetId OID-name (o) If variants are used in the following, this should provide the name of the variantset used (it's not currently possible to specify a different set in the individual variant request). In almost all cases (certainly all profiles known to us), the name Variant-1 should be given here. defaultVariantRequest variant-request (o) This directive provides a default variant request for use when the individual element requests (see below) do not contain a variant request. Variant requests consist of a blank-separated list of variant components. A variant component is a comma-separated, parenthesized triple of variant class, type, and value (the two former values being represented as integers). The value can currently only be entered as a string (this will change to depend on the definition of the variant in question). The special value (@) is interpreted as a null value, however. simpleElement path ['variant' variant-request] (o,r) This corresponds to a simple element request in Espec-1. The path consists of a sequence of tag-selectors, where each of these can consist of either: A simple tag, consisting of a comma-separated type-value pair in parenthesis, possibly followed by a colon (:) followed by an occurrences-specification (see below). The tag-value can be a number or a string. If the first character is an apostrophe ('), this forces the value to be interpreted as a string, even if it appears to be numerical. A WildThing, represented as a question mark (?), possibly followed by a colon (:) followed by an occurrences specification (see below). A WildPath, represented as an asterisk (*). Note that the last element of the path should not be a wildPath (wildpaths don't work in this version). The occurrences-specification can be either the string all, the string last, or an explicit value-range. The value-range is represented as an integer (the starting point), possibly followed by a plus (+) and a second integer (the number of elements, default being one). The variant-request has the same syntax as the defaultVariantRequest above. Note that it may sometimes be useful to give an empty variant request, simply to disable the default for a specific set of fields (we aren't certain if this is proper Espec-1, but it works in this implementation). The following is an example of an element specification belonging to the GILS profile. simpleelement (1,10) simpleelement (1,12) simpleelement (2,1) simpleelement (1,14) simpleelement (4,1) simpleelement (4,52)
    The Schema Mapping (.map) Files Sometimes, the client might want to receive a database record in a schema that differs from the native schema of the record. For instance, a client might only know how to process WAIS records, while the database record is represented in a more specific schema, such as GILS. In this module, a mapping of data to one of the &acro.marc; formats is also thought of as a schema mapping (mapping the elements of the record into fields consistent with the given &acro.marc; specification, prior to actually converting the data to the ISO2709). This use of the object identifier for &acro.usmarc; as a schema identifier represents an overloading of the OID which might not be entirely proper. However, it represents the dual role of schema and record syntax which is assumed by the &acro.marc; family in &acro.z3950;. These are the directives of the schema mapping file format: targetName name (m) A symbolic name for the target schema of the table. Useful mostly for diagnostic purposes. targetRef OID-name (m) An OID name for the target schema. This is used, for instance, by a server receiving a request to present a record in a different schema from the native one. The name, again, is found in the oid module of &yaz;. map element-name target-path (o,r) Adds an element mapping rule to the table.
    The &acro.marc; (ISO2709) Representation (.mar) Files This file provides rules for representing a record in the ISO2709 format. The rules pertain mostly to the values of the constant-length header of the record.
    &acro.grs1; Exchange Formats Converting records from the internal structure to an exchange format is largely an automatic process. Currently, the following exchange formats are supported: &acro.grs1;. The internal representation is based on &acro.grs1;/&acro.xml;, so the conversion here is straightforward. The system will create applied variant and supported variant lists as required, if a record contains variant information. &acro.xml;. The internal representation is based on &acro.grs1;/&acro.xml; so the mapping is trivial. Note that &acro.xml; schemas, preprocessing instructions and comments are not part of the internal representation and therefore will never be part of a generated &acro.xml; record. Future versions of the &zebra; will support that. &acro.sutrs;. Again, the mapping is fairly straightforward. Indentation is used to show the hierarchical structure of the record. All "&acro.grs1;" type records support both the &acro.grs1; and &acro.sutrs; representations. ISO2709-based formats (&acro.usmarc;, etc.). Only records with a two-level structure (corresponding to fields and subfields) can be directly mapped to ISO2709. For records with a different structuring (e.g., GILS), the representation in a structure like &acro.usmarc; involves a schema-mapping (see ), to an "implied" &acro.usmarc; schema (implied, because there is no formal schema which specifies the use of the &acro.usmarc; fields outside of ISO2709). The resultant, two-level record is then mapped directly from the internal representation to ISO2709. See the GILS schema definition files for a detailed example of this approach. Explain. This representation is only available for records belonging to the Explain schema. Summary. This ASN-1 based structure is only available for records belonging to the Summary schema - or schema which provide a mapping to this schema (see the description of the schema mapping facility above). SOIF. Support for this syntax is experimental, and is currently keyed to a private Index Data OID (1.2.840.10003.5.1000.81.2). All abstract syntaxes can be mapped to the SOIF format, although nested elements are represented by concatenation of the tag names at each level.
    Extended indexing of &acro.marc; records Extended indexing of &acro.marc; records will help you if you need index a combination of subfields, or index only a part of the whole field, or use during indexing process embedded fields of &acro.marc; record. Extended indexing of &acro.marc; records additionally allows: to index data in LEADER of &acro.marc; record to index data in control fields (with fixed length) to use during indexing the values of indicators to index linked fields for UNI&acro.marc; based formats In compare with simple indexing process the extended indexing may increase (about 2-3 times) the time of indexing process for &acro.marc; records.
    The index-formula At the beginning, we have to define the term index-formula for &acro.marc; records. This term helps to understand the notation of extended indexing of &acro.marc; records by &zebra;. Our definition is based on the document "The table of conformity for &acro.z3950; use attributes and R&acro.usmarc; fields". The document is available only in Russian language. The index-formula is the combination of subfields presented in such way: 71-00$a, $g, $h ($c){.$b ($c)} , (1) We know that &zebra; supports a &acro.bib1; attribute - right truncation. In this case, the index-formula (1) consists from forms, defined in the same way as (1) 71-00$a, $g, $h 71-00$a, $g 71-00$a The original &acro.marc; record may be without some elements, which included in index-formula. This notation includes such operands as: # It means whitespace character. - The position may contain any value, defined by &acro.marc; format. For example, index-formula 70-#1$a, $g , (2) includes 700#1$a, $g 701#1$a, $g 702#1$a, $g {...} The repeatable elements are defined in figure-brackets {}. For example, index-formula 71-00$a, $g, $h ($c){.$b ($c)} , (3) includes 71-00$a, $g, $h ($c). $b ($c) 71-00$a, $g, $h ($c). $b ($c). $b ($c) 71-00$a, $g, $h ($c). $b ($c). $b ($c). $b ($c) All another operands are the same as accepted in &acro.marc; world.
    Notation of <emphasis>index-formula</emphasis> for &zebra; Extended indexing overloads path of elm definition in abstract syntax file of &zebra; (.abs file). It means that names beginning with "mc-" are interpreted by &zebra; as index-formula. The database index is created and linked with access point (&acro.bib1; use attribute) according to this formula. For example, index-formula 71-00$a, $g, $h ($c){.$b ($c)} , (4) in .abs file looks like: mc-71.00_$a,_$g,_$h_(_$c_){.$b_(_$c_)} The notation of index-formula uses the operands: _ It means whitespace character. . The position may contain any value, defined by &acro.marc; format. For example, index-formula 70-#1$a, $g , (5) matches mc-70._1_$a,_$g_ and includes 700_1_$a,_$g_ 701_1_$a,_$g_ 702_1_$a,_$g_ {...} The repeatable elements are defined in figure-brackets {}. For example, index-formula 71#00$a, $g, $h ($c) {.$b ($c)} , (6) matches mc-71.00_$a,_$g,_$h_(_$c_){.$b_(_$c_)} and includes 71.00_$a,_$g,_$h_(_$c_).$b_(_$c_) 71.00_$a,_$g,_$h_(_$c_).$b_(_$c_).$b_(_$c_) 71.00_$a,_$g,_$h_(_$c_).$b_(_$c_).$b_(_$c_).$b_(_$c_) <...> Embedded index-formula (for linked fields) is between <>. For example, index-formula 4--#-$170-#1$a, $g ($c) , (7) matches mc-4.._._$1<70._1_$a,_$g_(_$c_)>_ and includes 463_._$1<70._1_$a,_$g_(_$c_)>_ All another operands are the same as accepted in &acro.marc; world.
    Examples indexing LEADER You need to use keyword "ldr" to index leader. For example, indexing data from 6th and 7th position of LEADER elm mc-ldr[6] Record-type ! elm mc-ldr[7] Bib-level ! indexing data from control fields indexing date (the time added to database) elm mc-008[0-5] Date/time-added-to-db ! or for R&acro.usmarc; (this data included in 100th field) elm mc-100___$a[0-7]_ Date/time-added-to-db ! using indicators while indexing For R&acro.usmarc; index-formula 70-#1$a, $g matches elm 70._1_$a,_$g_ Author !:w,!:p When &zebra; finds a field according to "70." pattern it checks the indicators. In this case the value of first indicator doesn't mater, but the value of second one must be whitespace, in another case a field is not indexed. indexing embedded (linked) fields for UNI&acro.marc; based formats For R&acro.usmarc; index-formula 4--#-$170-#1$a, $g ($c) matches _ Author !:w,!:p ]]> Data are extracted from record if the field matches to "4.._." pattern and data in linked field match to embedded index-formula 70._1_$a,_$g_(_$c_).
    idzebra-2.0.44/doc/querymodel.html0000644000175000017500000004163511412336551013775 00000000000000Chapter 5. Query Model

    Chapter 5. Query Model

    Table of Contents

    1. Query Model Overview
    1.1. Query Languages
    1.1.1. Prefix Query Format (PQF)
    1.1.2. Common Query Language (CQL)
    1.2. Operation types
    1.2.1. Explain Operation
    1.2.2. Search Operation
    1.2.3. Scan Operation
    2. RPN queries and semantics
    2.1. RPN tree structure
    2.1.1. Attribute sets
    2.1.2. Boolean operators
    2.1.3. Atomic queries (APT)
    2.1.4. Named Result Sets
    2.1.5. Zebra's special access point of type 'string'
    2.1.6. Zebra's special access point of type 'XPath' for GRS-1 filters
    2.2. Explain Attribute Set
    2.2.1. Use Attributes (type = 1)
    2.2.2. Explain searches with yaz-client
    2.3. BIB-1 Attribute Set
    2.3.1. Use Attributes (type 1)
    2.4. Zebra general Bib1 Non-Use Attributes (type 2-6)
    2.4.1. Relation Attributes (type 2)
    2.4.2. Position Attributes (type 3)
    2.4.3. Structure Attributes (type 4)
    2.4.4. Truncation Attributes (type = 5)
    2.4.5. Completeness Attributes (type = 6)
    3. Extended Zebra RPN Features
    3.1. Zebra specific retrieval of all records
    3.2. Zebra specific Search Extensions to all Attribute Sets
    3.2.1. Zebra Extension Embedded Sort Attribute (type 7)
    3.2.2. Zebra Extension Rank Weight Attribute (type 9)
    3.2.3. Zebra Extension Term Reference Attribute (type 10)
    3.2.4. Local Approximative Limit Attribute (type 11)
    3.2.5. Global Approximative Limit Attribute (type 12)
    3.3. Zebra specific Scan Extensions to all Attribute Sets
    3.3.1. Zebra Extension Result Set Narrow (type 8)
    3.3.2. Zebra Extension Approximative Limit (type 12)
    3.4. Zebra special IDXPATH Attribute Set for GRS-1 indexing
    3.4.1. IDXPATH Use Attributes (type = 1)
    3.5. Mapping from PQF atomic APT queries to Zebra internal register indexes
    3.5.1. Mapping of PQF APT access points
    3.5.2. Mapping of PQF APT structure and completeness to register type
    3.6. Zebra Regular Expressions in Truncation Attribute (type = 5)
    4. Server Side CQL to PQF Query Translation

    1. Query Model Overview

    1.1. Query Languages

    Zebra is born as a networking Information Retrieval engine adhering to the international standards Z39.50 and SRU, and implement the type-1 Reverse Polish Notation (RPN) query model defined there. Unfortunately, this model has only defined a binary encoded representation, which is used as transport packaging in the Z39.50 protocol layer. This representation is not human readable, nor defines any convenient way to specify queries.

    Since the type-1 (RPN) query structure has no direct, useful string representation, every client application needs to provide some form of mapping from a local query notation or representation to it.

    1.1.1. Prefix Query Format (PQF)

    Index Data has defined a textual representation in the Prefix Query Format, short PQF, which maps one-to-one to binary encoded type-1 RPN queries. PQF has been adopted by other parties developing Z39.50 software, and is often referred to as Prefix Query Notation, or in short PQN. See Section 2, “RPN queries and semantics” for further explanations and descriptions of Zebra's capabilities.

    1.1.2. Common Query Language (CQL)

    The query model of the type-1 RPN, expressed in PQF/PQN is natively supported. On the other hand, the default SRU web services Common Query Language CQL is not natively supported.

    Zebra can be configured to understand and map CQL to PQF. See Section 4, “Server Side CQL to PQF Query Translation”.

    1.2. Operation types

    Zebra supports all of the three different Z39.50/SRU operations defined in the standards: explain, search, and scan. A short description of the functionality and purpose of each is quite in order here.

    1.2.1. Explain Operation

    The syntax of Z39.50/SRU queries is well known to any client, but the specific semantics - taking into account a particular servers functionalities and abilities - must be discovered from case to case. Enters the explain operation, which provides the means for learning which fields (also called indexes or access points) are provided, which default parameter the server uses, which retrieve document formats are defined, and which specific parts of the general query model are supported.

    The Z39.50 embeds the explain operation by performing a search in the magic IR-Explain-1 database; see Section 2.2, “Explain Attribute Set”.

    In SRU, explain is an entirely separate operation, which returns an ZeeRex XML record according to the structure defined by the protocol.

    In both cases, the information gathered through explain operations can be used to auto-configure a client user interface to the servers capabilities.

    1.2.2. Search Operation

    Search and retrieve interactions are the raison d'être. They are used to query the remote database and return search result documents. Search queries span from simple free text searches to nested complex boolean queries, targeting specific indexes, and possibly enhanced with many query semantic specifications. Search interactions are the heart and soul of Z39.50/SRU servers.

    1.2.3. Scan Operation

    The scan operation is a helper functionality, which operates on one index or access point a time.

    It provides the means to investigate the content of specific indexes. Scanning an index returns a handful of terms actually found in the indexes, and in addition the scan operation returns the number of documents indexed by each term. A search client can use this information to propose proper spelling of search terms, to auto-fill search boxes, or to display controlled vocabularies.

    idzebra-2.0.44/doc/license.xml0000644000175000017500000000232111412332551013046 00000000000000 License &zebra; Server, Copyright © ©right-year; Index Data ApS. &zebra; is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. &zebra; is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with &zebra;; see the file LICENSE.zebra. If not, write to the Free Software Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA idzebra-2.0.44/doc/architecture.xml0000644000175000017500000005462311412332551014122 00000000000000 Overview of &zebra; Architecture
    Local Representation As mentioned earlier, &zebra; places few restrictions on the type of data that you can index and manage. Generally, whatever the form of the data, it is parsed by an input filter specific to that format, and turned into an internal structure that &zebra; knows how to handle. This process takes place whenever the record is accessed - for indexing and retrieval. The RecordType parameter in the zebra.cfg file, or the -t option to the indexer tells &zebra; how to process input records. Two basic types of processing are available - raw text and structured data. Raw text is just that, and it is selected by providing the argument text to &zebra;. Structured records are all handled internally using the basic mechanisms described in the subsequent sections. &zebra; can read structured records in many different formats.
    Main Components The &zebra; system is designed to support a wide range of data management applications. The system can be configured to handle virtually any kind of structured data. Each record in the system is associated with a record schema which lends context to the data elements of the record. Any number of record schemas can coexist in the system. Although it may be wise to use only a single schema within one database, the system poses no such restrictions. The &zebra; indexer and information retrieval server consists of the following main applications: the zebraidx indexing maintenance utility, and the zebrasrv information query and retrieval server. Both are using some of the same main components, which are presented here. The virtual Debian package idzebra-2.0 installs all the necessary packages to start working with &zebra; - including utility programs, development libraries, documentation and modules.
    Core &zebra; Libraries Containing Common Functionality The core &zebra; module is the meat of the zebraidx indexing maintenance utility, and the zebrasrv information query and retrieval server binaries. Shortly, the core libraries are responsible for Dynamic Loading of external filter modules, in case the application is not compiled statically. These filter modules define indexing, search and retrieval capabilities of the various input formats. Index Maintenance &zebra; maintains Term Dictionaries and ISAM index entries in inverted index structures kept on disk. These are optimized for fast inset, update and delete, as well as good search performance. Search Evaluation by execution of search requests expressed in &acro.pqf;/&acro.rpn; data structures, which are handed over from the &yaz; server frontend &acro.api;. Search evaluation includes construction of hit lists according to boolean combinations of simpler searches. Fast performance is achieved by careful use of index structures, and by evaluation specific index hit lists in correct order. Ranking and Sorting components call resorting/re-ranking algorithms on the hit sets. These might also be pre-sorted not only using the assigned document ID's, but also using assigned static rank information. Record Presentation returns - possibly ranked - result sets, hit numbers, and the like internal data to the &yaz; server backend &acro.api; for shipping to the client. Each individual filter module implements it's own specific presentation formats. The Debian package libidzebra-2.0 contains all run-time libraries for &zebra;, the documentation in PDF and HTML is found in idzebra-2.0-doc, and idzebra-2.0-common includes common essential &zebra; configuration files.
    &zebra; Indexer The zebraidx indexing maintenance utility loads external filter modules used for indexing data records of different type, and creates, updates and drops databases and indexes according to the rules defined in the filter modules. The Debian package idzebra-2.0-utils contains the zebraidx utility.
    &zebra; Searcher/Retriever This is the executable which runs the &acro.z3950;/&acro.sru;/&acro.srw; server and glues together the core libraries and the filter modules to one great Information Retrieval server application. The Debian package idzebra-2.0-utils contains the zebrasrv utility.
    &yaz; Server Frontend The &yaz; server frontend is a full fledged stateful &acro.z3950; server taking client connections, and forwarding search and scan requests to the &zebra; core indexer. In addition to &acro.z3950; requests, the &yaz; server frontend acts as HTTP server, honoring &acro.sru; &acro.soap; requests, and &acro.sru; &acro.rest; requests. Moreover, it can translate incoming &acro.cql; queries to &acro.pqf; queries, if correctly configured. &yaz; is an Open Source toolkit that allows you to develop software using the &acro.ansi; &acro.z3950;/ISO23950 standard for information retrieval. It is packaged in the Debian packages yaz and libyaz.
    Record Models and Filter Modules The hard work of knowing what to index, how to do it, and which part of the records to send in a search/retrieve response is implemented in various filter modules. It is their responsibility to define the exact indexing and record display filtering rules. The virtual Debian package libidzebra-2.0-modules installs all base filter modules.
    &acro.dom; &acro.xml; Record Model and Filter Module The &acro.dom; &acro.xml; filter uses a standard &acro.dom; &acro.xml; structure as internal data model, and can thus parse, index, and display any &acro.xml; document. A parser for binary &acro.marc; records based on the ISO2709 library standard is provided, it transforms these to the internal &acro.marcxml; &acro.dom; representation. The internal &acro.dom; &acro.xml; representation can be fed into four different pipelines, consisting of arbitrarily many successive &acro.xslt; transformations; these are for input parsing and initial transformations, indexing term extraction transformations transformations before internal document storage, and retrieve transformations from storage to output format The &acro.dom; &acro.xml; filter pipelines use &acro.xslt; (and if supported on your platform, even &acro.exslt;), it brings thus full &acro.xpath; support to the indexing, storage and display rules of not only &acro.xml; documents, but also binary &acro.marc; records. Finally, the &acro.dom; &acro.xml; filter allows for static ranking at index time, and to to sort hit lists according to predefined static ranks. Details on the experimental &acro.dom; &acro.xml; filter are found in . The Debian package libidzebra-2.0-mod-dom contains the &acro.dom; filter module.
    ALVIS &acro.xml; Record Model and Filter Module The functionality of this record model has been improved and replaced by the &acro.dom; &acro.xml; record model. See . The Alvis filter for &acro.xml; files is an &acro.xslt; based input filter. It indexes element and attribute content of any thinkable &acro.xml; format using full &acro.xpath; support, a feature which the standard &zebra; &acro.grs1; &acro.sgml; and &acro.xml; filters lacked. The indexed documents are parsed into a standard &acro.xml; &acro.dom; tree, which restricts record size according to availability of memory. The Alvis filter uses &acro.xslt; display stylesheets, which let the &zebra; DB administrator associate multiple, different views on the same &acro.xml; document type. These views are chosen on-the-fly in search time. In addition, the Alvis filter configuration is not bound to the arcane &acro.bib1; &acro.z3950; library catalogue indexing traditions and folklore, and is therefore easier to understand. Finally, the Alvis filter allows for static ranking at index time, and to to sort hit lists according to predefined static ranks. This imposes no overhead at all, both search and indexing perform still O(1) irrespectively of document collection size. This feature resembles Google's pre-ranking using their PageRank algorithm. Details on the experimental Alvis &acro.xslt; filter are found in . The Debian package libidzebra-2.0-mod-alvis contains the Alvis filter module.
    &acro.grs1; Record Model and Filter Modules The functionality of this record model has been improved and replaced by the &acro.dom; &acro.xml; record model. See . The &acro.grs1; filter modules described in are all based on the &acro.z3950; specifications, and it is absolutely mandatory to have the reference pages on &acro.bib1; attribute sets on you hand when configuring &acro.grs1; filters. The GRS filters come in different flavors, and a short introduction is needed here. &acro.grs1; filters of various kind have also been called ABS filters due to the *.abs configuration file suffix. The grs.marc and grs.marcxml filters are suited to parse and index binary and &acro.xml; versions of traditional library &acro.marc; records based on the ISO2709 standard. The Debian package for both filters is libidzebra-2.0-mod-grs-marc. &acro.grs1; TCL scriptable filters for extensive user configuration come in two flavors: a regular expression filter grs.regx using TCL regular expressions, and a general scriptable TCL filter called grs.tcl are both included in the libidzebra-2.0-mod-grs-regx Debian package. A general purpose &acro.sgml; filter is called grs.sgml. This filter is not yet packaged, but planned to be in the libidzebra-2.0-mod-grs-sgml Debian package. The Debian package libidzebra-2.0-mod-grs-xml includes the grs.xml filter which uses Expat to parse records in &acro.xml; and turn them into ID&zebra;'s internal &acro.grs1; node trees. Have also a look at the Alvis &acro.xml;/&acro.xslt; filter described in the next session.
    TEXT Record Model and Filter Module Plain ASCII text filter. TODO: add information here.
    Indexing and Retrieval Workflow Records pass through three different states during processing in the system. When records are accessed by the system, they are represented in their local, or native format. This might be &acro.sgml; or HTML files, News or Mail archives, &acro.marc; records. If the system doesn't already know how to read the type of data you need to store, you can set up an input filter by preparing conversion rules based on regular expressions and possibly augmented by a flexible scripting language (Tcl). The input filter produces as output an internal representation, a tree structure. When records are processed by the system, they are represented in a tree-structure, constructed by tagged data elements hanging off a root node. The tagged elements may contain data or yet more tagged elements in a recursive structure. The system performs various actions on this tree structure (indexing, element selection, schema mapping, etc.), Before transmitting records to the client, they are first converted from the internal structure to a form suitable for exchange over the network - according to the &acro.z3950; standard.
    Retrieval of &zebra; internal record data Starting with &zebra; version 2.0.5 or newer, it is possible to use a special element set which has the prefix zebra::. Using this element will, regardless of record type, return &zebra;'s internal index structure/data for a record. In particular, the regular record filters are not invoked when these are in use. This can in some cases make the retrieval faster than regular retrieval operations (for &acro.marc;, &acro.xml; etc). Special Retrieval Elements Element Set Description Syntax zebra::meta::sysno Get &zebra; record system ID &acro.xml; and &acro.sutrs; zebra::data Get raw record all zebra::meta Get &zebra; record internal metadata &acro.xml; and &acro.sutrs; zebra::index Get all indexed keys for record &acro.xml; and &acro.sutrs; zebra::index::f Get indexed keys for field f for record &acro.xml; and &acro.sutrs; zebra::index::f:t Get indexed keys for field f and type t for record &acro.xml; and &acro.sutrs; zebra::snippet Get snippet for record for one or more indexes (f1,f2,..). This includes a phrase from the original record at the point where a match occurs (for a query). By default give terms before - and after are included in the snippet. The matching terms are enclosed within element <s>. The snippet facility requires Zebra 2.0.16 or later. &acro.xml; and &acro.sutrs; zebra::facet::f1:t1,f2:t2,.. Get facet of a result set. The facet result is returned as if it was a normal record, while in reality is a recap of most "important" terms in a result set for the fields given. The facet facility first appeared in Zebra 2.0.20. &acro.xml;
    For example, to fetch the raw binary record data stored in the zebra internal storage, or on the filesystem, the following commands can be issued: Z> f @attr 1=title my Z> format xml Z> elements zebra::data Z> s 1+1 Z> format sutrs Z> s 1+1 Z> format usmarc Z> s 1+1 The special zebra::data element set name is defined for any record syntax, but will always fetch the raw record data in exactly the original form. No record syntax specific transformations will be applied to the raw record data. Also, &zebra; internal metadata about the record can be accessed: Z> f @attr 1=title my Z> format xml Z> elements zebra::meta::sysno Z> s 1+1 displays in &acro.xml; record syntax only internal record system number, whereas Z> f @attr 1=title my Z> format xml Z> elements zebra::meta Z> s 1+1 displays all available metadata on the record. These include system number, database name, indexed filename, filter used for indexing, score and static ranking information and finally bytesize of record. Sometimes, it is very hard to figure out what exactly has been indexed how and in which indexes. Using the indexing stylesheet of the Alvis filter, one can at least see which portion of the record went into which index, but a similar aid does not exist for all other indexing filters. The special zebra::index element set names are provided to access information on per record indexed fields. For example, the queries Z> f @attr 1=title my Z> format sutrs Z> elements zebra::index Z> s 1+1 will display all indexed tokens from all indexed fields of the first record, and it will display in &acro.sutrs; record syntax, whereas Z> f @attr 1=title my Z> format xml Z> elements zebra::index::title Z> s 1+1 Z> elements zebra::index::title:p Z> s 1+1 displays in &acro.xml; record syntax only the content of the zebra string index title, or even only the type p phrase indexed part of it. Trying to access numeric &acro.bib1; use attributes or trying to access non-existent zebra intern string access points will result in a Diagnostic 25: Specified element set 'name not valid for specified database.
    idzebra-2.0.44/doc/gpl-3.html0000644000175000017500000001274511412336551012531 000000000000003. How to Apply These Terms to Your New Programs

    3. How to Apply These Terms to Your New Programs

    If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

    To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the copyright line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author>

    This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

    Also add information on how to contact you by electronic and paper mail.

    If the program is interactive, make it output a short notice like this when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type show w. This is free software, and you are welcome to redistribute it under certain conditions; type show c for details.

    The hypothetical commands show w and show c should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than show w and show c; they could even be mouse-clicks or menu items--whatever suits your program.

    You should also get your employer (if you work as a programmer) or your school, if any, to sign a copyright disclaimer for the program, if necessary. Here is a sample; alter the names:

    Yoyodyne, Inc., hereby disclaims all copyright interest in the program Gnomovision (which makes passes at compilers) written by James Hacker.

    <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice

    This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.

    idzebra-2.0.44/doc/zebrasrv-2.0.80000644000175000017500000006523411412336537013152 00000000000000'\" t .\" Title: zebrasrv .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 06/29/2010 .\" Manual: [FIXME: manual] .\" Source: zebra 2.0.44 .\" Language: English .\" .TH "ZEBRASRV" "8" "06/29/2010" "zebra 2.0.44" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zebrasrv \- Zebra Server .SH "SYNOPSIS" .HP \w'\fBzebrasrv\fR\ 'u \fBzebrasrv\fR [\fB\-install\fR] [\fB\-installa\fR] [\fB\-remove\fR] [\fB\-a\ \fR\fB\fIfile\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-l\ \fR\fB\fIfile\fR\fR] [\fB\-u\ \fR\fB\fIuid\fR\fR] [\fB\-c\ \fR\fB\fIconfig\fR\fR] [\fB\-f\ \fR\fB\fIvconfig\fR\fR] [\fB\-C\ \fR\fB\fIfname\fR\fR] [\fB\-t\ \fR\fB\fIminutes\fR\fR] [\fB\-k\ \fR\fB\fIkilobytes\fR\fR] [\fB\-d\ \fR\fB\fIdaemon\fR\fR] [\fB\-w\ \fR\fB\fIdir\fR\fR] [\fB\-p\ \fR\fB\fIpidfile\fR\fR] [\fB\-ziDST1\fR] [listener\-spec...] .SH "DESCRIPTION" .PP Zebra is a high\-performance, general\-purpose structured text indexing and retrieval engine\&. It reads structured records in a variety of input formats (e\&.g\&. email, XML, MARC) and allows access to them through exact boolean search expressions and relevance\-ranked free\-text queries\&. .PP \fBzebrasrv\fR is the Z39\&.50 and SRU frontend server for the \fBZebra\fR search engine and indexer\&. .PP On Unix you can run the \fBzebrasrv\fR server from the command line \- and put it in the background\&. It may also operate under the inet daemon\&. On WIN32 you can run the server as a console application or as a WIN32 Service\&. .SH "OPTIONS" .PP The options for \fBzebrasrv\fR are the same as those for YAZ\*(Aq \fByaz\-ztest\fR\&. Option \-c specifies a Zebra configuration file \- if omitted zebra\&.cfg is read\&. .PP \-a \fIfile\fR .RS 4 Specify a file for dumping PDUs (for diagnostic purposes)\&. The special name \- (dash) sends output to stderr\&. .RE .PP \-S .RS 4 Don\*(Aqt fork or make threads on connection requests\&. This is good for debugging, but not recommended for real operation: Although the server is asynchronous and non\-blocking, it can be nice to keep a software malfunction (okay then, a crash) from affecting all current users\&. The server can only accept a single connection in this mode\&. .RE .PP \-1 .RS 4 Like \-S but after one session the server exits\&. This mode is for debugging \fIonly\fR\&. .RE .PP \-T .RS 4 Operate the server in threaded mode\&. The server creates a thread for each connection rather than a fork a process\&. Only available on UNIX systems that offers POSIX threads\&. .RE .PP \-s .RS 4 Use the SR protocol (obsolete)\&. .RE .PP \-z .RS 4 Use the Z39\&.50 protocol (default)\&. This option and \-s complement each other\&. You can use both multiple times on the same command line, between listener\-specifications (see below)\&. This way, you can set up the server to listen for connections in both protocols concurrently, on different local ports\&. .RE .PP \-l \fIfile\fR .RS 4 Specify an output file for the diagnostic messages\&. The default is to write this information to stderr .RE .PP \-c \fIconfig\-file\fR .RS 4 Read configuration information from \fIconfig\-file\fR\&. The default configuration is \&./zebra\&.cfg .RE .PP \-f \fIvconfig\fR .RS 4 This specifies an XML file that describes one or more YAZ frontend virtual servers\&. See section VIRTUAL HOSTS for details\&. .RE .PP \-C \fIfname\fR .RS 4 Sets SSL certificate file name for server (PEM)\&. .RE .PP \-v \fIlevel\fR .RS 4 The log level\&. Use a comma\-separated list of members of the set {fatal,debug,warn,log,malloc,all,none}\&. .RE .PP \-u \fIuid\fR .RS 4 Set user ID\&. Sets the real UID of the server process to that of the given user\&. It\*(Aqs useful if you aren\*(Aqt comfortable with having the server run as root, but you need to start it as such to bind a privileged port\&. .RE .PP \-w \fIworking\-directory\fR .RS 4 The server changes to this working directory during before listening on incoming connections\&. This option is useful when the server is operating from the inetd daemon (see \-i)\&. .RE .PP \-p \fIpidfile\fR .RS 4 Specifies that the server should write its Process ID to file given by \fIpidfile\fR\&. A typical location would be /var/run/zebrasrv\&.pid\&. .RE .PP \-i .RS 4 Use this to make the the server run from the inetd server (UNIX only)\&. Make sure you use the logfile option \-l in conjunction with this mode and specify the \-l option before any other options\&. .RE .PP \-D .RS 4 Use this to make the server put itself in the background and run as a daemon\&. If neither \-i nor \-D is given, the server starts in the foreground\&. .RE .PP \-install .RS 4 Use this to install the server as an NT service (Windows NT/2000/XP only)\&. Control the server by going to the Services in the Control Panel\&. .RE .PP \-installa .RS 4 Use this to install and activate the server as an NT service (Windows NT/2000/XP only)\&. Control the server by going to the Services in the Control Panel\&. .RE .PP \-remove .RS 4 Use this to remove the server from the NT services (Windows NT/2000/XP only)\&. .RE .PP \-t \fIminutes\fR .RS 4 Idle session timeout, in minutes\&. Default is 60 minutes\&. .RE .PP \-k \fIsize\fR .RS 4 Maximum record size/message size, in kilobytes\&. Default is 1024 KB (1 MB)\&. .RE .PP \-d \fIdaemon\fR .RS 4 Set name of daemon to be used in hosts access file\&. See \fBhosts_access\fR(5) and \fBtcpd\fR(8)\&. .RE .PP A \fIlistener\-address\fR consists of an optional transport mode followed by a colon (:) followed by a listener address\&. The transport mode is either a file system socket unix, a SSL TCP/IP socket ssl, or a plain TCP/IP socket tcp (default)\&. .PP For TCP, an address has the form .sp .if n \{\ .RS 4 .\} .nf hostname | IP\-number [: portnumber] .fi .if n \{\ .RE .\} .sp The port number defaults to 210 (standard Z39\&.50 port) for privileged users (root), and 9999 for normal users\&. The special hostname "@" is mapped to the address INADDR_ANY, which causes the server to listen on any local interface\&. .PP The default behavior for zebrasrv \- if started as non\-privileged user \- is to establish a single TCP/IP listener, for the Z39\&.50 protocol, on port 9999\&. .sp .if n \{\ .RS 4 .\} .nf zebrasrv @ zebrasrv tcp:some\&.server\&.name\&.org:1234 zebrasrv ssl:@:3000 .fi .if n \{\ .RE .\} .PP To start the server listening on the registered port for Z39\&.50, or on a filesystem socket, and to drop root privileges once the ports are bound, execute the server like this from a root shell: .sp .if n \{\ .RS 4 .\} .nf zebrasrv \-u daemon @ zebrasrv \-u daemon tcp:@:210 zebrasrv \-u daemon unix:/some/file/system/socket .fi .if n \{\ .RE .\} .sp Here daemon is an existing user account, and the unix socket /some/file/system/socket is readable and writable for the daemon account\&. .SH "Z39\&.50 PROTOCOL SUPPORT AND BEHAVIOR" .SS "Z39\&.50 Initialization" .PP During initialization, the server will negotiate to version 3 of the Z39\&.50 protocol, and the option bits for Search, Present, Scan, NamedResultSets, and concurrentOperations will be set, if requested by the client\&. The maximum PDU size is negotiated down to a maximum of 1 MB by default\&. .SS "Z39\&.50 Search" .PP The supported query type are 1 and 101\&. All operators are currently supported with the restriction that only proximity units of type "word" are supported for the proximity operator\&. Queries can be arbitrarily complex\&. Named result sets are supported, and result sets can be used as operands without limitations\&. Searches may span multiple databases\&. .PP The server has full support for piggy\-backed retrieval (see also the following section)\&. .SS "Z39\&.50 Present" .PP The present facility is supported in a standard fashion\&. The requested record syntax is matched against the ones supported by the profile of each record retrieved\&. If no record syntax is given, SUTRS is the default\&. The requested element set name, again, is matched against any provided by the relevant record profiles\&. .SS "Z39\&.50 Scan" .PP The attribute combinations provided with the termListAndStartPoint are processed in the same way as operands in a query (see above)\&. Currently, only the term and the globalOccurrences are returned with the termInfo structure\&. .SS "Z39\&.50 Sort" .PP Z39\&.50 specifies three different types of sort criteria\&. Of these Zebra supports the attribute specification type in which case the use attribute specifies the "Sort register"\&. Sort registers are created for those fields that are of type "sort" in the default\&.idx file\&. The corresponding character mapping file in default\&.idx specifies the ordinal of each character used in the actual sort\&. .PP Z39\&.50 allows the client to specify sorting on one or more input result sets and one output result set\&. Zebra supports sorting on one result set only which may or may not be the same as the output result set\&. .SS "Z39\&.50 Close" .PP If a Close PDU is received, the server will respond with a Close PDU with reason=FINISHED, no matter which protocol version was negotiated during initialization\&. If the protocol version is 3 or more, the server will generate a Close PDU under certain circumstances, including a session timeout (60 minutes by default), and certain kinds of protocol errors\&. Once a Close PDU has been sent, the protocol association is considered broken, and the transport connection will be closed immediately upon receipt of further data, or following a short timeout\&. .SS "Z39\&.50 Explain" .PP Zebra maintains a "classic" \m[blue]\fBZ39\&.50 Explain\fR\m[]\&\s-2\u[1]\d\s+2 database on the side\&. This database is called IR\-Explain\-1 and can be searched using the attribute set exp\-1\&. .PP The records in the explain database are of type grs\&.sgml\&. The root element for the Explain grs\&.sgml records is explain, thus explain\&.abs is used for indexing\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .PP Zebra \fImust\fR be able to locate explain\&.abs in order to index the Explain records properly\&. Zebra will work without it but the information will not be searchable\&. .sp .5v .RE .SH "THE SRU SERVER" .PP In addition to Z39\&.50, Zebra supports the more recent and web\-friendly IR protocol \m[blue]\fBSRU\fR\m[]\&\s-2\u[2]\d\s+2\&. SRU can be carried over SOAP or a REST\-like protocol that uses HTTP GET or POST to request search responses\&. The request itself is made of parameters such as query, startRecord, maximumRecords and recordSchema; the response is an XML document containing hit\-count, result\-set records, diagnostics, etc\&. SRU can be thought of as a re\-casting of Z39\&.50 semantics in web\-friendly terms; or as a standardisation of the ad\-hoc query parameters used by search engines such as Google and AltaVista; or as a superset of A9\*(Aqs OpenSearch (which it predates)\&. .PP Zebra supports Z39\&.50, SRU GET, SRU POST, SRU SOAP (SRW) \- on the same port, recognising what protocol is used by each incoming requests and handling them accordingly\&. This is a achieved through the use of Deep Magic; civilians are warned not to stand too close\&. .SS "Running zebrasrv as an SRU Server" .PP Because Zebra supports all protocols on one port, it would seem to follow that the SRU server is run in the same way as the Z39\&.50 server, as described above\&. This is true, but only in an uninterestingly vacuous way: a Zebra server run in this manner will indeed recognise and accept SRU requests; but since it doesn\*(Aqt know how to handle the CQL queries that these protocols use, all it can do is send failure responses\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .PP It is possible to cheat, by having SRU search Zebra with a PQF query instead of CQL, using the x\-pquery parameter instead of query\&. This is a \fBnon\-standard extension\fR of CQL, and a \fBvery naughty\fR thing to do, but it does give you a way to see Zebra serving SRU ``right out of the box\*(Aq\*(Aq\&. If you start your favourite Zebra server in the usual way, on port 9999, then you can send your web browser to: .sp .if n \{\ .RS 4 .\} .nf http://localhost:9999/Default?version=1\&.1 &operation=searchRetrieve &x\-pquery=mineral &startRecord=1 &maximumRecords=1 .fi .if n \{\ .RE .\} .PP This will display the XML\-formatted SRU response that includes the first record in the result\-set found by the query mineral\&. (For clarity, the SRU URL is shown here broken across lines, but the lines should be joined together to make single\-line URL for the browser to submit\&.) .sp .5v .RE .PP In order to turn on Zebra\*(Aqs support for CQL queries, it\*(Aqs necessary to have the YAZ generic front\-end (which Zebra uses) translate them into the Z39\&.50 Type\-1 query format that is used internally\&. And to do this, the generic front\-end\*(Aqs own configuration file must be used\&. See the section called \(lqYAZ SERVER VIRTUAL HOSTS\(rq; the salient point for SRU support is that \fBzebrasrv\fR must be started with the \-f\ \&frontendConfigFile option rather than the \-c\ \&zebraConfigFile option, and that the front\-end configuration file must include both a reference to the Zebra configuration file and the CQL\-to\-PQF translator configuration file\&. .PP A minimal front\-end configuration file that does this would read as follows: .sp .if n \{\ .RS 4 .\} .nf zebra\&.cfg \&.\&./\&.\&./tab/pqf\&.properties .fi .if n \{\ .RE .\} .PP The element contains the name of the Zebra configuration file that was previously specified by the \-c command\-line argument, and the element contains the name of the CQL properties file specifying how various CQL indexes, relations, etc\&. are translated into Type\-1 queries\&. .PP A zebra server running with such a configuration can then be queried using proper, conformant SRU URLs with CQL queries: .sp .if n \{\ .RS 4 .\} .nf http://localhost:9999/Default?version=1\&.1 &operation=searchRetrieve &query=title=utah and description=epicent* &startRecord=1 &maximumRecords=1 .fi .if n \{\ .RE .\} .SH "SRU PROTOCOL SUPPORT AND BEHAVIOR" .PP Zebra running as an SRU server supports SRU version 1\&.1, including CQL version 1\&.1\&. In particular, it provides support for the following elements of the protocol\&. .SS "SRU Search and Retrieval" .PP Zebra supports the \m[blue]\fBSRU searchRetrieve\fR\m[]\&\s-2\u[3]\d\s+2 operation\&. .PP One of the great strengths of SRU is that it mandates a standard query language, CQL, and that all conforming implementations can therefore be trusted to correctly interpret the same queries\&. It is with some shame, then, that we admit that Zebra also supports an additional query language, our own Prefix Query Format (\m[blue]\fBPQF\fR\m[]\&\s-2\u[4]\d\s+2)\&. A PQF query is submitted by using the extension parameter x\-pquery, in which case the query parameter must be omitted, which makes the request not valid SRU\&. Please feel free to use this facility within your own applications; but be aware that it is not only non\-standard SRU but not even syntactically valid, since it omits the mandatory query parameter\&. .SS "SRU Scan" .PP Zebra supports \m[blue]\fBSRU scan\fR\m[]\&\s-2\u[5]\d\s+2 operation\&. Scanning using CQL syntax is the default, where the standard scanClause parameter is used\&. .PP In addition, a mutant form of SRU scan is supported, using the non\-standard x\-pScanClause parameter in place of the standard scanClause to scan on a PQF query clause\&. .SS "SRU Explain" .PP Zebra supports \m[blue]\fBSRU explain\fR\m[]\&\s-2\u[6]\d\s+2\&. .PP The ZeeRex record explaining a database may be requested either with a fully fledged SRU request (with operation=explain and version\-number specified) or with a simple HTTP GET at the server\*(Aqs basename\&. The ZeeRex record returned in response is the one embedded in the YAZ Frontend Server configuration file that is described in the the section called \(lqYAZ SERVER VIRTUAL HOSTS\(rq\&. .PP Unfortunately, the data found in the CQL\-to\-PQF text file must be added by hand\-craft into the explain section of the YAZ Frontend Server configuration file to be able to provide a suitable explain record\&. Too bad, but this is all extreme new alpha stuff, and a lot of work has yet to be done \&.\&. .PP There is no linkage whatsoever between the Z39\&.50 explain model and the SRU explain response (well, at least not implemented in Zebra, that is \&.\&.)\&. Zebra does not provide a means using Z39\&.50 to obtain the ZeeRex record\&. .SS "Other SRU operations" .PP In the Z39\&.50 protocol, Initialization, Present, Sort and Close are separate operations\&. In SRU, however, these operations do not exist\&. .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} SRU has no explicit initialization handshake phase, but commences immediately with searching, scanning and explain operations\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Neither does SRU have a close operation, since the protocol is stateless and each request is self\-contained\&. (It is true that multiple SRU request/response pairs may be implemented as multiple HTTP request/response pairs over a single persistent TCP/IP connection; but the closure of that connection is not a protocol\-level operation\&.) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Retrieval in SRU is part of the searchRetrieve operation, in which a search is submitted and the response includes a subset of the records in the result set\&. There is no direct analogue of Z39\&.50\*(Aqs Present operation which requests records from an established result set\&. In SRU, this is achieved by sending a subsequent searchRetrieve request with the query cql\&.resultSetId=\fIid\fR where \fIid\fR is the identifier of the previously generated result\-set\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Sorting in CQL is done within the searchRetrieve operation \- in v1\&.1, by an explicit sort parameter, but the forthcoming v1\&.2 or v2\&.0 will most likely use an extension of the query language, \m[blue]\fBCQL sorting\fR\m[]\&\s-2\u[7]\d\s+2\&. .RE .PP It can be seen, then, that while Zebra operating as an SRU server does not provide the same set of operations as when operating as a Z39\&.50 server, it does provide equivalent functionality\&. .SH "SRU EXAMPLES" .PP Surf into http://localhost:9999 to get an explain response, or use .sp .if n \{\ .RS 4 .\} .nf http://localhost:9999/?version=1\&.1&operation=explain .fi .if n \{\ .RE .\} .PP See number of hits for a query .sp .if n \{\ .RS 4 .\} .nf http://localhost:9999/?version=1\&.1&operation=searchRetrieve &query=text=(plant%20and%20soil) .fi .if n \{\ .RE .\} .PP Fetch record 5\-7 in Dublin Core format .sp .if n \{\ .RS 4 .\} .nf http://localhost:9999/?version=1\&.1&operation=searchRetrieve &query=text=(plant%20and%20soil) &startRecord=5&maximumRecords=2&recordSchema=dc .fi .if n \{\ .RE .\} .PP Even search using PQF queries using the \fIextended naughty parameter\fR x\-pquery .sp .if n \{\ .RS 4 .\} .nf http://localhost:9999/?version=1\&.1&operation=searchRetrieve &x\-pquery=@attr%201=text%20@and%20plant%20soil .fi .if n \{\ .RE .\} .PP Or scan indexes using the \fIextended extremely naughty parameter\fR x\-pScanClause .sp .if n \{\ .RS 4 .\} .nf http://localhost:9999/?version=1\&.1&operation=scan &x\-pScanClause=@attr%201=text%20something .fi .if n \{\ .RE .\} .sp \fIDon\*(Aqt do this in production code!\fR But it\*(Aqs a great fast debugging aid\&. .SH "YAZ SERVER VIRTUAL HOSTS" .PP The Virtual hosts mechanism allows a YAZ frontend server to support multiple backends\&. A backend is selected on the basis of the TCP/IP binding (port+listening address) and/or the virtual host\&. .PP A backend can be configured to execute in a particular working directory\&. Or the YAZ frontend may perform \m[blue]\fBCQL\fR\m[]\&\s-2\u[8]\d\s+2 to RPN conversion, thus allowing traditional Z39\&.50 backends to be offered as a \m[blue]\fBSRU\fR\m[]\&\s-2\u[2]\d\s+2 service\&. SRU Explain information for a particular backend may also be specified\&. .PP For the HTTP protocol, the virtual host is specified in the Host header\&. For the Z39\&.50 protocol, the virtual host is specified as in the Initialize Request in the OtherInfo, OID 1\&.2\&.840\&.10003\&.10\&.1000\&.81\&.1\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .PP Not all Z39\&.50 clients allows the VHOST information to be set\&. For those the selection of the backend must rely on the TCP/IP information alone (port and address)\&. .sp .5v .RE .PP The YAZ frontend server uses XML to describe the backend configurations\&. Command\-line option \-f specifies filename of the XML configuration\&. .PP The configuration uses the root element yazgfs\&. This element includes a list of listen elements, followed by one or more server elements\&. .PP The listen describes listener (transport end point), such as TCP/IP, Unix file socket or SSL server\&. Content for a listener: .PP CDATA (required) .RS 4 The CDATA for the listen element holds the listener string, such as tcp:@:210, tcp:server1:2100, etc\&. .RE .PP attribute id (optional) .RS 4 identifier for this listener\&. This may be referred to from server sections\&. .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .PP We expect more information to be added for the listen section in a future version, such as CERT file for SSL servers\&. .sp .5v .RE .PP The server describes a server and the parameters for this server type\&. Content for a server: .PP attribute id (optional) .RS 4 Identifier for this server\&. Currently not used for anything, but it might be for logging purposes\&. .RE .PP attribute listenref (optional) .RS 4 Specifies listener for this server\&. If this attribute is not given, the server is accessible from all listener\&. In order for the server to be used for real, however, the virtual host must match (if specified in the configuration)\&. .RE .PP element config (optional) .RS 4 Specifies the server configuration\&. This is equivalent to the config specified using command line option \-c\&. .RE .PP element directory (optional) .RS 4 Specifies a working directory for this backend server\&. If specified, the YAZ frontend changes current working directory to this directory whenever a backend of this type is started (backend handler bend_start), stopped (backend handler hand_stop) and initialized (bend_init)\&. .RE .PP element host (optional) .RS 4 Specifies the virtual host for this server\&. If this is specified a client \fImust\fR specify this host string in order to use this backend\&. .RE .PP element cql2rpn (optional) .RS 4 Specifies a filename that includes \m[blue]\fBCQL\fR\m[]\&\s-2\u[8]\d\s+2 to RPN conversion for this backend server\&. See \m[blue]\fBCQL\fR\m[]\&\s-2\u[8]\d\s+2 section in YAZ manual\&. If given, the backend server will only "see" a Type\-1/RPN query\&. .RE .PP element explain (optional) .RS 4 Specifies \m[blue]\fBSRU\fR\m[]\&\s-2\u[2]\d\s+2 ZeeRex content for this server \- copied verbatim to the client\&. As things are now, some of the Explain content seems redundant because host information, etc\&. is also stored elsewhere\&. .sp The format of the Explain record is described in detail, with examples, on the file at the \m[blue]\fBZeeRex\fR\m[]\&\s-2\u[9]\d\s+2 web\-site\&. .RE .PP The XML below configures a server that accepts connections from two ports, TCP/IP port 9900 and a local UNIX file socket\&. We name the TCP/IP server public and the other server internal\&. .sp .if n \{\ .RS 4 .\} .nf tcp:@:9900 unix:/var/tmp/socket server1\&.mydomain /var/www/s1 config\&.cfg server2\&.mydomain /var/www/s2 config\&.cfg \&.\&./etc/pqf\&.properties server2\&.mydomain 9900 a /var/www/s3 config\&.cfg .fi .if n \{\ .RE .\} .PP There are three configured backend servers\&. The first two servers, "server1" and "server2", can be reached by both listener addresses \- since no listenref attribute is specified\&. In order to distinguish between the two a virtual host has been specified for each of server in the host elements\&. .PP For "server2" elements for \m[blue]\fBCQL\fR\m[]\&\s-2\u[8]\d\s+2 to RPN conversion is supported and explain information has been added (a short one here to keep the example small)\&. .PP The third server, "server3" can only be reached via listener "internal"\&. .SH "SEE ALSO" .PP \fBzebraidx\fR(1) .SH "NOTES" .IP " 1." 4 Z39.50 Explain .RS 4 \%http://www.loc.gov/z3950/agency/markup/07.html .RE .IP " 2." 4 SRU .RS 4 \%http://www.loc.gov/standards/sru/ .RE .IP " 3." 4 SRU searchRetrieve .RS 4 \%http://www.loc.gov/standards/sru/specs/search-retrieve.html .RE .IP " 4." 4 PQF .RS 4 \%http://www.indexdata.com/yaz/doc/tools.html#PQF .RE .IP " 5." 4 SRU scan .RS 4 \%http://www.loc.gov/standards/sru/specs/scan.html/ .RE .IP " 6." 4 SRU explain .RS 4 \%http://www.loc.gov/standards/sru/specs/explain.html .RE .IP " 7." 4 CQL sorting .RS 4 \%http://zing.z3950.org/cql/sorting.html .RE .IP " 8." 4 CQL .RS 4 \%http://www.loc.gov/standards/sru/specs/cql.html .RE .IP " 9." 4 ZeeRex .RS 4 \%http://explain.z3950.org/ .RE idzebra-2.0.44/doc/installation-debian.html0000644000175000017500000001123211412336551015516 000000000000002. GNU/Debian

    2. GNU/Debian

    2.1. GNU/Debian Linux on i686 Platform

    Index Data provides pre-compiled GNU/Debian i686 Linux packages at our Debian package archive, both for the Sarge and the Etch release.

    To install these packages, you need to add two lines to your /etc/apt/sources.list configuration file, either the Sarge sources found at

          deb http://ftp.indexdata.dk/debian sarge main
          deb-src http://ftp.indexdata.dk/debian sarge main
         

    or the Etch sources from

          deb http://ftp.indexdata.dk/debian etch main
          deb-src http://ftp.indexdata.dk/debian etch main
         

    After refreshing the package cache with the command

          apt-get update
         

    as root, the Zebra indexer is easily installed issuing

          apt-get install idzebra-2.0 idzebra-2.0-doc
         

    2.2. Ubuntu/Debian and GNU/Debian on other platforms

    These Zebra packages are specifically compiled for GNU/Debian Linux systems. Installation on other GNU/Debian systems is possible by re-compilation the Debian way: you need to add only the deb-src sources lines to the /etc/apt/sources.list configuration file, that is either the Sarge sources

          deb-src http://ftp.indexdata.dk/debian sarge main
         

    or the Etch sources

          deb-src http://ftp.indexdata.dk/debian etch main
         

    After refreshing the package cache with the command

          apt-get update
          apt-get build-dep idzebra-2.0
         

    as root, the Zebra indexer is recompiled and installed issuing

          fakeroot apt-get source --compile idzebra-2.0
         

    as normal user. The compiled GNU/Debian packages can then be installed as root issuing

          dpkg -i install idzebra-2.0*.deb libidzebra-2.0*.deb
         

    idzebra-2.0.44/doc/grs-internal-representation.html0000644000175000017500000001361311412336551017247 000000000000002. GRS-1 Internal Record Representation

    2. GRS-1 Internal Record Representation

    When records are manipulated by the system, they're represented in a tree-structure, with data elements at the leaf nodes, and tags or variant components at the non-leaf nodes. The root-node identifies the schema that lends context to the tagging and structuring of the record. Imagine a simple record, consisting of a 'title' element and an 'author' element:

         ROOT 
            TITLE     "Zen and the Art of Motorcycle Maintenance"
            AUTHOR    "Robert Pirsig"
        

    A slightly more complex record would have the author element consist of two elements, a surname and a first name:

         ROOT  
            TITLE  "Zen and the Art of Motorcycle Maintenance"
            AUTHOR
               FIRST-NAME "Robert"
               SURNAME    "Pirsig"
        

    The root of the record will refer to the record schema that describes the structuring of this particular record. The schema defines the element tags (TITLE, FIRST-NAME, etc.) that may occur in the record, as well as the structuring (SURNAME should appear below AUTHOR, etc.). In addition, the schema establishes element set names that are used by the client to request a subset of the elements of a given record. The schema may also establish rules for converting the record to a different schema, by stating, for each element, a mapping to a different tag path.

    2.1. Tagged Elements

    A data element is characterized by its tag, and its position in the structure of the record. For instance, while the tag "telephone number" may be used different places in a record, we may need to distinguish between these occurrences, both for searching and presentation purposes. For instance, while the phone numbers for the "customer" and the "service provider" are both representatives for the same type of resource (a telephone number), it is essential that they be kept separate. The record schema provides the structure of the record, and names each data element (defined by the sequence of tags - the tag path - by which the element can be reached from the root of the record).

    2.2. Variants

    The children of a tag node may be either more tag nodes, a data node (possibly accompanied by tag nodes), or a tree of variant nodes. The children of variant nodes are either more variant nodes or a data node (possibly accompanied by more variant nodes). Each leaf node, which is normally a data node, corresponds to a variant form of the tagged element identified by the tag which parents the variant tree. The following title element occurs in two different languages:

          VARIANT LANG=ENG  "War and Peace"
          TITLE
          VARIANT LANG=DAN  "Krig og Fred"
         

    Which of the two elements are transmitted to the client by the server depends on the specifications provided by the client, if any.

    In practice, each variant node is associated with a triple of class, type, value, corresponding to the variant mechanism of Z39.50.

    2.3. Data Elements

    Data nodes have no children (they are always leaf nodes in the record tree).

    idzebra-2.0.44/doc/record-model-alvisxslt-conf.html0000644000175000017500000003071511412336551017132 000000000000002. ALVIS Record Model Configuration

    2. ALVIS Record Model Configuration

    2.1. ALVIS Indexing Configuration

    As mentioned above, there can be only one indexing stylesheet, and configuration of the indexing process is a synonym of writing an XSLT stylesheet which produces XML output containing the magic elements discussed in Section 1.1, “ALVIS Internal Record Representation”. Obviously, there are million of different ways to accomplish this task, and some comments and code snippets are in order to lead our Padawan's on the right track to the good side of the force.

    Stylesheets can be written in the pull or the push style: pull means that the output XML structure is taken as starting point of the internal structure of the XSLT stylesheet, and portions of the input XML are pulled out and inserted into the right spots of the output XML structure. On the other side, push XSLT stylesheets are recursively calling their template definitions, a process which is commanded by the input XML structure, and are triggered to produce some output XML whenever some special conditions in the input stylesheets are met. The pull type is well-suited for input XML with strong and well-defined structure and semantics, like the following OAI indexing example, whereas the push type might be the only possible way to sort out deeply recursive input XML formats.

    A pull stylesheet example used to index OAI harvested records could use some of the following template definitions:

          
          <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
           xmlns:z="http://indexdata.dk/zebra/xslt/1"
           xmlns:oai="http://www.openarchives.org/&acro.oai;/2.0/" 
           xmlns:oai_dc="http://www.openarchives.org/&acro.oai;/2.0/oai_dc/" 
           xmlns:dc="http://purl.org/dc/elements/1.1/"
           version="1.0">
    
           <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
    
            <!-- disable all default text node output -->
            <xsl:template match="text()"/>
    
             <!-- match on oai xml record root -->
             <xsl:template match="/">    
              <z:record z:id="{normalize-space(oai:record/oai:header/oai:identifier)}">
               <!-- you might want to use z:rank="{some &acro.xslt; function here}" --> 
               <xsl:apply-templates/>
              </z:record>
             </xsl:template>
    
             <!-- &acro.oai; indexing templates -->
             <xsl:template match="oai:record/oai:header/oai:identifier">
              <z:index name="oai_identifier" type="0">
               <xsl:value-of select="."/>
              </z:index>    
             </xsl:template>
    
             <!-- etc, etc -->
    
             <!-- DC specific indexing templates -->
             <xsl:template match="oai:record/oai:metadata/oai_dc:dc/dc:title">
              <z:index name="dc_title" type="w">
               <xsl:value-of select="."/>
              </z:index>
             </xsl:template>
    
             <!-- etc, etc -->
     
          </xsl:stylesheet>
          
         

    Notice also, that the names and types of the indexes can be defined in the indexing XSLT stylesheet dynamically according to content in the original XML records, which has opportunities for great power and wizardry as well as grande disaster.

    The following excerpt of a push stylesheet might be a good idea according to your strict control of the XML input format (due to rigorous checking against well-defined and tight RelaxNG or XML Schema's, for example):

          
          <xsl:template name="element-name-indexes">     
           <z:index name="{name()}" type="w">
            <xsl:value-of select="'1'"/>
           </z:index>
          </xsl:template>
          
         

    This template creates indexes which have the name of the working node of any input XML file, and assigns a '1' to the index. The example query find @attr 1=xyz 1 finds all files which contain at least one xyz XML element. In case you can not control which element names the input files contain, you might ask for disaster and bad karma using this technique.

    One variation over the theme dynamically created indexes will definitely be unwise:

            
          <!-- match on oai xml record root -->
          <xsl:template match="/">    
           <z:record>
          
            <!-- create dynamic index name from input content --> 
            <xsl:variable name="dynamic_content">
             <xsl:value-of select="oai:record/oai:header/oai:identifier"/>
            </xsl:variable>
            
            <!-- create zillions of indexes with unknown names -->
            <z:index name="{$dynamic_content}" type="w">
             <xsl:value-of select="oai:record/oai:metadata/oai_dc:dc"/>
            </z:index>          
           </z:record>
           
          </xsl:template>
          
         

    Don't be tempted to cross the line to the dark side of the force, Padawan; this leads to suffering and pain, and universal disintegration of your project schedule.

    2.2. ALVIS Exchange Formats

    An exchange format can be anything which can be the outcome of an XSLT transformation, as far as the stylesheet is registered in the main Alvis XSLT filter configuration file, see Section 1, “ALVIS Record Filter”. In principle anything that can be expressed in XML, HTML, and TEXT can be the output of a schema or element set directive during search, as long as the information comes from the original input record XML DOM tree (and not the transformed and indexed XML!!).

    In addition, internal administrative information from the Zebra indexer can be accessed during record retrieval. The following example is a summary of the possibilities:

            
          <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
           xmlns:z="http://indexdata.dk/zebra/xslt/1"
           version="1.0">
    
           <!-- register internal zebra parameters -->       
           <xsl:param name="id" select="''"/>
           <xsl:param name="filename" select="''"/>
           <xsl:param name="score" select="''"/>
           <xsl:param name="schema" select="''"/>
               
           <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
    
           <!-- use then for display of internal information -->
           <xsl:template match="/">
             <z:zebra>
               <id><xsl:value-of select="$id"/></id>
               <filename><xsl:value-of select="$filename"/></filename>
               <score><xsl:value-of select="$score"/></score>
               <schema><xsl:value-of select="$schema"/></schema>
             </z:zebra>
           </xsl:template>
    
          </xsl:stylesheet>
          
         

    2.3. ALVIS Filter OAI Indexing Example

    The source code tarball contains a working Alvis filter example in the directory examples/alvis-oai/, which should get you started.

    More example data can be harvested from any OAI compliant server, see details at the OAI http://www.openarchives.org/ web site, and the community links at http://www.openarchives.org/community/index.html. There is a tutorial found at http://www.oaforum.org/tutorial/.

    idzebra-2.0.44/doc/locating-records.html0000644000175000017500000000566311412336551015047 000000000000003. Locating Records

    3. Locating Records

    The default behavior of the Zebra system is to reference the records from their original location, i.e. where they were found when you run zebraidx. That is, when a client wishes to retrieve a record following a search operation, the files are accessed from the place where you originally put them - if you remove the files (without running zebraidx again, the server will return diagnostic number 14 (``System error in presenting records'') to the client.

    If your input files are not permanent - for example if you retrieve your records from an outside source, or if they were temporarily mounted on a CD-ROM drive, you may want Zebra to make an internal copy of them. To do this, you specify 1 (true) in the storeData setting. When the Z39.50 server retrieves the records they will be read from the internal file structures of the system.

    idzebra-2.0.44/doc/Makefile.am0000644000175000017500000000575711412332551012756 00000000000000SUBDIRS = common docdir=$(datadir)/doc/$(PACKAGE)$(PACKAGE_SUFFIX) XMLMAN = zebraidx.xml zebrasrv.xml idzebra-config.xml XMLFILES = \ administration.xml \ architecture.xml \ field-structure.xml \ gpl-2.0.xml \ indexdata.xml \ installation.xml \ introduction.xml \ license.xml \ marc_indexing.xml \ querymodel.xml \ recordmodel-domxml.xml \ recordmodel-alvisxslt.xml \ recordmodel-grs.xml \ manref.xml \ tutorial.xml \ zebra.xml \ zebrasrv-options.xml \ zebrasrv-synopsis.xml \ zebrasrv-virtual.xml #examples.xml #quickstart.xml HTMLFILES = index.html PNGFILES = zebra.png domfilter.png EPSFILES = zebra.eps domfilter.eps PDFFILES = zebra.pdf domfilter.pdf MANFILES=zebraidx$(PACKAGE_SUFFIX).1 \ zebrasrv$(PACKAGE_SUFFIX).8 \ idzebra-config$(PACKAGE_SUFFIX).1 doc_DATA = $(HTMLFILES) $(PNGFILES) man_MANS = $(MANFILES) EXTRA_DIST = $(XMLFILES) $(XMLMAN) \ $(doc_DATA) zebra.eps $(man_MANS) \ marc_indexing.xml entities.ent local.ent.in domfilter.svg zebraidx$(PACKAGE_SUFFIX).1: zebraidx.xml $(MAN_COMPILE) $(srcdir)/zebraidx.xml mv zebraidx.1 zebraidx$(PACKAGE_SUFFIX).1 zebrasrv$(PACKAGE_SUFFIX).8: zebrasrv.xml zebrasrv-options.xml \ zebrasrv-synopsis.xml zebrasrv-virtual.xml $(MAN_COMPILE) $(srcdir)/zebrasrv.xml mv zebrasrv.8 zebrasrv$(PACKAGE_SUFFIX).8 idzebra-config$(PACKAGE_SUFFIX).1: idzebra-config.xml $(MAN_COMPILE) $(srcdir)/idzebra-config.xml mv idzebra-config.1 idzebra-config$(PACKAGE_SUFFIX).1 $(HTMLFILES): $(XMLFILES) $(PNGFILES) rm -f *.html $(HTML_COMPILE) $(srcdir)/zebra.xml index.tkl: $(XMLFILES) rm -f *.tkl $(TKL_COMPILE) $(srcdir)/zebra.xml zebra.pdf: $(XMLFILES) domfilter.pdf for i in $(PNGFILES); do \ if test ! -f $$i; then cp $(srcdir)/$$i .; fi; \ done $(PDF_COMPILE) $(srcdir)/zebra.xml manref.xml: $(XMLMAN) $(srcdir)/common/ref2dbinc.xsl rm -f manref.xml for i in $(XMLMAN); do \ xsltproc $(srcdir)/common/stripref.xsl $(srcdir)/$$i | sed 1d >> manref.xml; \ done gils.txt: gils.sgml sgml2txt -f gils.sgml gils.ps: gils.sgml sgml2latex -o ps -p a4 gils.sgml gils.html: gils.sgml sgml2html gils.sgml clean-data-hook: rm -f [0-9]* *.bak dist-hook: if test -f index.html; then d=.; else d="$(srcdir)"; fi; \ for p in $$d/*.html; do \ cp $$p $(distdir); \ done install-data-hook: cd $(DESTDIR)$(man1dir) && ln -sf zebraidx$(PACKAGE_SUFFIX).1 zebraidx.1 cd $(DESTDIR)$(man8dir) && ln -sf zebrasrv$(PACKAGE_SUFFIX).8 zebrasrv.8 cd $(DESTDIR)$(man1dir) && ln -sf idzebra-config$(PACKAGE_SUFFIX).1 idzebra-config.1 if test -f index.html; then d=.; else d="$(srcdir)"; fi; \ for p in $$d/*.html; do \ $(INSTALL_DATA) $$p $(DESTDIR)$(docdir); \ done uninstall-hook: rm -r $(DESTDIR)$(docdir) domfilter.png: domfilter.svg unset DISPLAY; inkscape --export-png=$@ --export-width=600 $? domfilter.eps: domfilter.svg unset DISPLAY; inkscape --export-eps=$@ --export-bbox-page $? doc-clean: rm -f manref.xml *.html *.pdf *.[0-9] domfilter.png domfilter.eps .eps.pdf: epstopdf -hires $? idzebra-2.0.44/doc/administration.html0000644000175000017500000002011311412336551014620 00000000000000Chapter 6. Administrating Zebra

    Chapter 6. Administrating Zebra

    Unlike many simpler retrieval systems, Zebra supports safe, incremental updates to an existing index.

    Normally, when Zebra modifies the index it reads a number of records that you specify. Depending on your specifications and on the contents of each record one the following events take place for each record:

    Insert

    The record is indexed as if it never occurred before. Either the Zebra system doesn't know how to identify the record or Zebra can identify the record but didn't find it to be already indexed.

    Modify

    The record has already been indexed. In this case either the contents of the record or the location (file) of the record indicates that it has been indexed before.

    Delete

    The record is deleted from the index. As in the update-case it must be able to identify the record.

    Please note that in both the modify- and delete- case the Zebra indexer must be able to generate a unique key that identifies the record in question (more on this below).

    To administrate the Zebra retrieval system, you run the zebraidx program. This program supports a number of options which are preceded by a dash, and a few commands (not preceded by dash).

    Both the Zebra administrative tool and the Z39.50 server share a set of index files and a global configuration file. The name of the configuration file defaults to zebra.cfg. The configuration file includes specifications on how to index various kinds of records and where the other configuration files are located. zebrasrv and zebraidx must be run in the directory where the configuration file lives unless you indicate the location of the configuration file by option -c.

    1. Record Types

    Indexing is a per-record process, in which either insert/modify/delete will occur. Before a record is indexed search keys are extracted from whatever might be the layout the original record (sgml,html,text, etc..). The Zebra system currently supports two fundamental types of records: structured and simple text. To specify a particular extraction process, use either the command line option -t or specify a recordType setting in the configuration file.

    idzebra-2.0.44/doc/zebraidx.html0000644000175000017500000002203211412336551013405 00000000000000zebraidx

    Name

    zebraidx — Zebra Administrative Tool

    Synopsis

    zebraidx [-t type] [-c config] [-g group] [-d database] [-m mbytes] [-n] [-s] [-v level] [-l file] [-L] [-f number] [-v] {command} [file...]

    DESCRIPTION

    zebraidx allows you to insert, delete or updates records in Zebra. zebraidx accepts a set options (see below) and exactly one command (mandatory).

    COMMANDS

    update directory

    Update the register with the files contained in directory. If no directory is provided, a list of files is read from stdin. See Administration in the Zebra Manual.

    delete directory

    Remove the records corresponding to the files found under directory from the register.

    adelete directory

    Remove the records corresponding to the files found under directory from the register. Unlike command delete this command does not fail if a record does not exist (but which is attempted deleted).

    commit

    Write the changes resulting from the last update commands to the register. This command is only available if the use of shadow register files is enabled (see Shadow Registers in the Zebra Manual).

    clean

    Clean shadow files and "forget" changes.

    create database

    Create database.

    drop database

    Drop database (delete database).

    init

    Deletes an entire register (all files in shadow+register areas).

    OPTIONS

    -t type

    Update all files as type. Currently, the types supported are text, alvis and grs.subtype. Generally, it is probably advisable to specify the record types in the zebra.cfg file (see Record Types in the Zebra manual), to avoid confusion at subsequent updates.

    -c config-file

    Read the configuration file config-file instead of zebra.cfg.

    -g group

    Update the files according to the group settings for group (see Zebra Configuration File in the Zebra manual).

    -d database

    The records located should be associated with the database name database for access through the Z39.50 server.

    -l file

    Write log messages to file instead of stderr.

    -m mbytes

    Use mbytes of memory before flushing keys to background storage. This setting affects performance when updating large databases.

    -L

    Makes zebraidx skip symbolic links. By default, zebraidx follows them.

    -n

    Disable the use of shadow registers for this operation (see Shadow Registers in the Zebra manual).

    -s

    Show analysis of the indexing process. The maintenance program works in a read-only mode and doesn't change the state of the index. This options is very useful when you wish to test a new profile.

    -V

    Show Zebra version.

    -v level

    Set the log level to level. level should be one of none, debug, and all.

    FILES

    zebra.cfg

    SEE ALSO

    zebrasrv(8)

    idzebra-2.0.44/doc/common/0000755000175000017500000000000011412336551012260 500000000000000idzebra-2.0.44/doc/common/style1.css0000644000175000017500000000150611060232401014121 00000000000000 .table table { border-collapse; border: 1px solid black; border-spacing: 0; width: 94%; margin-left: auto; margin-right: 0; } .author { font-style: italic; } .TITLEPAGE, .LOT, .TOC { font-family: sans-serif; } .TITLEPAGE .abstract { margin: 0 150px 1em 0; font-style: oblique; } .TITLEPAGE .inlinemediaobject { position: absolute; top: 60px; right: 0; width: 140px; } .table th { padding: 3px 6px; border: 1px solid black; } .table td { text-align: left; padding: 3px 6px; } h1, h3, h4 { font-family: sans-serif; } h2 { font-style: italic; font-family: sans-serif; } .figure b, .table b, .example b { font-style: italic; } .example , .figure { margin-left: 3%; } .screen, .synopsis, .programlisting { margin-left: 6%; padding: 4px; border-style: solid; border-width: 1px; border-color: #bbbbbb; } idzebra-2.0.44/doc/common/id.eps0000644000175000017500000004137711060232401013305 00000000000000%!PS-Adobe-3.0 EPSF-3.0 %%Creator: GIMP PostScript file plugin V 1.12 by Peter Kirchgessner %%Title: /home/adam/ID.eps %%CreationDate: Wed May 1 13:27:33 2002 %%DocumentData: Clean7Bit %%LanguageLevel: 2 %%Pages: 1 %%BoundingBox: 14 14 135 172 %%EndComments %%BeginProlog % Use own dictionary to avoid conflicts 10 dict begin %%EndProlog %%Page: 1 1 % Translate for offset 14.173228 14.173228 translate % Translate to begin of first scanline 0.000000 157.000000 translate 120.000000 -157.000000 scale % Image geometry 120 157 8 % Transformation matrix [ 120 0 0 157 0 0 ] % Strings to hold RGB-samples per scanline /rstr 120 string def /gstr 120 string def /bstr 120 string def {currentfile /ASCII85Decode filter /RunLengthDecode filter rstr readstring pop} {currentfile /ASCII85Decode filter /RunLengthDecode filter gstr readstring pop} {currentfile /ASCII85Decode filter /RunLengthDecode filter bstr readstring pop} true 3 %%BeginData: 16148 ASCII Bytes colorimage mf*=@B(7YXB%aEgJ,~> mf*=\g%!8eg%DTLJ,~> mf*=IN:CK\N8h)AJ,~> n,EBom5"aKZ2]=~> n,ECSmE>RsZ2]=~> n,EC-m:H@ nG`OP5j^?.5j,HQJ,~> nG`OacgApWchOgGJ,~> nG`OVE:%6 nG`KIlSAO"ZN#F~> nG`LJlc]@gZN#F~> nG`KflXg-rZN#F~> nG`K#lSANQZN#F~> nG`LAlc]@^ZN#F~> nG`KIlXg-UZN#F~> nG`K#lSANQZN#F~> nG`LAlc]@^ZN#F~> nG`KIlXg-UZN#F~> nG`K#lSANQZN#F~> nG`LAlc]@^ZN#F~> nG`KIlXg-UZN#F~> nG`K#lSANQZN#F~> nG`LAlc]@^ZN#F~> nG`KIlXg-UZN#F~> nG`K#lSANQZN#F~> nG`LAlc]@^ZN#F~> nG`KIlXg-UZN#F~> nG`K#lSANQZN#F~> nG`LAlc]@^ZN#F~> nG`KIlXg-UZN#F~> nG`K#lSANQZN#F~> nG`LAlc]@^ZN#F~> nG`KIlXg-UZN#F~> nG`K#lSANQZN#F~> nG`LAlc]@^ZN#F~> nG`KIlXg-UZN#F~> nG`K#lSANQZN#F~> nG`LAlc]@^ZN#F~> nG`KIlXg-UZN#F~> nG`K#lSANQZN#F~> nG`LAlc]@^ZN#F~> nG`KIlXg-UZN#F~> nG`K#lSANQZN#F~> nG`LAlc]@^ZN#F~> nG`KIlXg-UZN#F~> nG`K#lSANQZN#F~> nG`LAlc]@^ZN#F~> nG`KIlXg-UZN#F~> nG`K#lSANQZN#F~> nG`LAlc]@^ZN#F~> nG`KIlXg-UZN#F~> nG`K#lSANQZN#F~> nG`LAlc]@^ZN#F~> nG`KIlXg-UZN#F~> nG`K#lSANQZN#F~> nG`LAlc]@^ZN#F~> nG`KIlXg-UZN#F~> nG`K=lSANkZN#F~> nG`LGlc]@dZN#F~> nG`K\lXg-hZN#F~> nG`L4lSAObZN#F~> nG`LZlc]A"ZN#F~> nG`LAlXg.MZN#F~> n,EB n,ECFmE>RfZ2]=~> n,EB[m:H?jZ2]=~> mf*9TmkXs3YlB4~> mf*:Ln&tdoYlB4~> mf*9nmq)R+YlB4~> mJd4X^[mio^[eT.J,~> mJd4bn+5ZBn,0BhJ,~> mJd4[ch"IDch4LAJ,~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> M>r)~> fDr35J,~> fDr5$J,~> fJBgFJ,~> fDr35J,~> fDr5$J,~> fJBgFJ,~> fDr35J,~> fDr5$J,~> fJBgFJ,~> fDr35J,~> fDr5$J,~> fJBgFJ,~> fDr35J,~> fDr5$J,~> fJBgFJ,~> pAk3,oDel[rk8OC!%5LpAGcH*1B= pAk3,oDel[rk8OH!%5LpAGcH*bQ-o,ncA4:o$%%&!9s4$!n-Z+rQG?-o$[0S!oNS"pWS-~> pG;floJ6KNrlYI,1K2K?KD[P'AcTLCf`BEknn.gQ!5/#;!dWJ=rFQ,Dfm34%!h\.upL\p~> pAk3moDem*rr3.P!!*'!JG]EF1C)/(bfoYXk?7F5!WV?^bQ+O51C(\pN&*82s1e.]!h'(#pG7=~> pAk3moDem*rr3.P!!*'!JG]EFbQm_=o()_Ypt#)]!WVronc7qIbQmV:iloX%s6oR'!p9O9pWS-~> pG;gKoJ6Kjrr3.i1Gf(2RJ\l=Ad@#hg"H&um=Y%C!WVQdf`8\XAd?Z^WFfb.s3L:K!jhocpL\p~> pAk3moDem*rr3/b$3:,+JG]EF1BG`"r\FV7s6'#1!WSSX1C$29nl\]Xk pAk3moDem*rr3/s%flY0JG]EFbQ7;7rlbH's7l61!WV pG;gKoJ6Kjrr3/h4#?p:RJ\l=Ac^Tbral52s6]Gj!WTLrAd<;Jon.P_m;VZ/!jhocpL\p~> pAk3moDem*rVm"N!<<(LquHXN!R1TB1BOo_JFt]!s-`@4"_Refbl;;G1BO!EB(n*3~> pAk3moDem*rVm"N!<<(LquHZ=!V69hbQ@/2ht>1os5rgp"kiqKo)ID6bQ?r,g%W^@~> pG;gKoJ6KjrVm"g1]RKCr%n7_!SRMOAcg!PTCldss0M3,"cWK@g&I$%Acf==N;$q7~> pAk3moDf33s1[Cjk6h7hJG]EF1BG`"rA+Les-`O9!WV?^bQ(f;1BXNSs-`C5!h'(#pG7=~> pAk3moDf33s1[Cjp^dE)JG]EFbQ7;7rQG>rs5s!u!WVronc784bQI,0s5rjq!p9O9pWS-~> pG;gKoJ6fss3'R)m5t@JRJ\l=Ac^TbrFQ+is0MB1!WVQdf`6ZrAco^Gs0M6-!jhocpL\p~> pAk3moDf33s1W%Ds+(.LJG]EF1BG`"rA+Les-`O9!WV?^bQ(f;1BX'Fs-`C5!h'(#pG7=~> pAk3moDf33s1W%Ds+(.LJG]EFbQ7;7rQG>rs5s!u!WVronc784bQI#-s5rjq!p9O9pWS-~> pG;gKoJ6fss3$&ps-`oeRJ\l=Ac^TbrFQ+is0MB1!WVQdf`6ZrAcoC>s0M6-!jhocpL\p~> pAk3moDf33s1SKjs6'F^JG]EF1BG`"rA+Lrs-`O9!WSSW1Bgq]bif"/nhU?8s(;!]J,~> pAk3moDf33s1SKjs7lWoJG]EFbQ7;7rQG>us5s!u!WV pG;gKoJ6fss3!4\s6]jdRJ\l=Ac^TbrFQ+ss0MB1!WTLqAd*heg$Sflnn%s0s,?\aJ,~> pAk3moDf$.s5*ferVlkJquHXN!R1TB1BQ80=nOQOs-`C5#=.JC9kOFg5k?c5RK$mn1Oo~> pAk3moDf$.s5*ferVlkJquHZ=!V69hbQ@J;f(I5fs5rjq#LE2Cdb4Zqch#?^k5X-/b^]~> pG;gKoJ6Wns5l+irVlkcr%n7_!SRMOAcgulKCrgWs0M6-#B9)'H&VdjE:[ZCZi?!YAq0~> pAk3moDf'/s8N'!huR!WTM*AcQ!,1C(8dN&*8es/,BD!h'(#pG7=~> pAk3moDf'/s8N'!hu pG;gKoJ6Zos8Ol2k5PA\RJ\l=Ad@#hN/XCgs2O\C!WU1=Mu\M'Ad??UWFfbTs1Ir8!jhocpL\p~> pAk3moDf'/s8N'!AH)T/JG]EF1B>YtrrM\Yo/$=E!6k-m!d"Ccr\FXAg&H-c1BO!EB(n*3~> pAk3moDf'/s8N'!AH)T/JG]EFbQ.54rrN&[o?@.4!:oj-!o3hHrlbJjp&Eh>bQ?r,g%W^@~> pG;gKoJ6Zos8Ol2KDtlNRJ\l=AcUN_rrMf!o4Iq#!87'X!g`l>ral7Oir>>:Acf==N;$q7~> pAk1ZoDeq?6:1YOr^$T4quHXN!*T;5!*ShJr+5q3p+lbQAjH;N!_m90oJ6PCAjH)HJ,~> pAk1ZoDeq?6:1YOr^$T4quHZ=!7q/&!7p\ar7M)$p<3Thg!BW@!n,cQoZRBbg!BE:J,~> pG;e]oJ6PIB4q3"rau40r%n7_!/(90!/'fRr/:W.p1=AYN,\`-!dT`WoO\/MN,\N'J,~> fDr35J,~> fDr5$J,~> fJBgFJ,~> fDr35J,~> fDr5$J,~> fJBgFJ,~> fDr35J,~> fDr5$J,~> fJBgFJ,~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> qD/DFs7/E21M6ZTr%n6N!5AF3!oKGWq>gCK!1Ecb!+tp\!iH!cr\FUYs4R!"s31'j!h')4r\FUf s(;*`J,~> qTK6-s8:3ebh<$Yr65'=!5AF3!oKGWq>gE:!9X4Z!87(i!pTaIrlbGps7Q!-s75d*!p9ORrlbGs s4R7mJ,~> qIU#>s7L>CArQbrr+>j_!6b?@!p6\=qD8"\!42V'!0$V`!keQ>ral4as5NW^s4R!U!jhp[ral4j s,?edJ,~> qD/DFs8SKC1M6ZTr%n6N!5A=0!1Ncbq_J;As0M]m!) qTK6-s8V6*bh<$Yr65'=!5A=0!1Ncbqof-(s6TaI!7LSb#g`;Gf$)A2s46ecs75d*#j20ehos qIU#>s8TE;ArQbrr+>j_!6b6=!3c8Uqdoo9s2P&E!."9M#]T22K4\`Ts+BoTs4R!U#daR2T4V\o s,?edJ,~> qD/DFs75_G1M6ZTr%n6N"ht$:6:..?rr?U-!;ePRRK$mh1BqIkfg)G7N:Je)bk!UrRK)I51G`YC B)4<6~> qTK6-s8;f@bh<$Yr65'="ht$:6:..?rr?U-!;jtAk5X-)bQcc#p!;n&ipt=no(1'2k5Y5Obfnc? g%rpC~> qIU#>s7Q&(ArQbrr+>j_"j?rGB4nFIrr@]L1](bcZi?!SAd44oic)R1WUa[$g%/e]ZiBF[AnI#% N;@.:~> qD/DFs-`nn1M6ZTr%n6N!l"^7rW!%Ns8Th2!;ePRRK$mg1Ba-Gbl>oW1]P\j1C0EKJH)#nB)cK> 1Oo~> qTK6-s5s@Jbh<$Yr65'=!l"^7rW!%Ns8Th2!;jtAk5X-(bQR).o)J:Nbl@8*bR!A2huDi_g&Kb% b^]~> qIU#>s0MaFArQbrr+>j_!mCWDr\FYEs8U:?1](bcZi?!RAd#I?g&KaqB)gQUAdGaCTDu60N;nk5 Aq0~> qD/DFs(8V;9kOEnr%n6N!l"^7rW!$es8Th2!;ePRRK(t>bjmOlg&LV.nMC3ho.pZ?s"i@!5\C%. qD3X~> qTK6-s4Qc=db4Z_r65'=!l"^7rW!$es8Th2!;jtAk5Y,Ro((!,p&Fs9n]_%(o?7L&s3106ce8?O qTOH~> qIU#>s,=ttH&Vd0r+>j_!mCWDr\FXhs8U:?1](bcZiB%ag%&_WirA[jnRhgSo4A97s(:9`E/agU qIY6~> qD/DFs(5"*b\$mCr%n6N!l"^7rW!$es8Th2!;ePRRK(t>bk!Un5k=sTB(7\Wbk!UrRK#'Ts-[L! B)4<6~> qTK6-s4Pj#o%F'*r65'=!l"^7rW!$es8Th2!;jtAk5Y,Ro(1'.ci!hCg%!;do(1'2k5WZYs5r#7 g%rpC~> qIU#>s,;7'fo5s;r+>j_!mCWDr\FXhs8U:?1](bcZiB%ag%/eYE:s82N:CN[g%/e]Zi=Wrs0I[a N;@.:~> qD/DFs(4'Ts-`nTr%n6N!l"^7rW!%Ns8Th2!;ePRRK$mg1BkPnN;r'+nh^ qTK6-s4PWYs5s@Dr65'=!l"^7rW!%Ns8Th2!;jtAk5X-(bQ[J8irAf"o$%.)o?7L&s3/^Xs53k0 qTOH~> qIU#>s,:Qrs0Ma3r+>j_!mCWDr\FYEs8U:?1](bcZi?!RAd-N\WW2@)nn.pTo4A97s(5lrs.B=M qIY6~> qD/DFs(4&Po()gKr%n6N"ht$:!%3 qTK6-s4PWBr;?TWr65'="ht$:!%3 qIU#>s,:Q/p%A?kr+>j_"j?rG1K0_@rr@]L1](bcZi?!SAd577]OnMMcgk]Jg%/e]Zi=WLH2m:3 N;@.:~> qD/DFs(4&CRK*;Tr%n6N!5A=0!1Ncbq_J;As0M]m!) qTK6-s4PW?k5YJDr65'=!5A=0!1Ncbqof-(s6TaI!7LSb#hJqKccjW+s53Fls75d*!TsF]bQI53 s4R7mJ,~> qIU#>s,:Q%ZiC'3r+>j_!6b6=!3c8Uqdoo9s2P&E!."9M#_Vg;E+W_As.Amps4R!U!OMh*Acp'Q s,?edJ,~> qD/2@s(;6d!pBTOr%n6N!5AC2!PW+@!;ePPRJd'bB(e"^g&G[`1BUABnkJa4s31'j!L`ue1BTo5 s(;*`J,~> qTK$'s4RCq!r2fXr65'=!5AC2!PW+@!;jt?k5>5Zg%NVkp&E_EbQH;kr6k5]s75d*!TsF]bQH2h s4R7mJ,~> qITf8s,?qh!q$#or+>j_!6bOom-1As4R!U!OMh*Acm#F s,?edJ,~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> qD/,>rVloOJGM)!!!'b1rr@TH!;nVSg&G[`1BP>kF7_6iB)e:j1]RITRJnuCbl@Am!6kEA!SMPh 1Oo~> qTJs%rVlokhtkRo!!'b1rr@TH!;t%Bp&E_EbQ@85h"8elg&L4+bl@\Ck5NR*o)JF-!:p*g!VP7C b^]~> qIT`6rVloXTDE0s1B>VqrrAJa1]1hdir=u:AcgN!TKF? Aq0~> qD/AEs,;#ekPqmc1]%.P^AIp1JGT?E1C%(_kVo; VYN#u~> qTK3,s5Mhrq#B^XbkhA?^AIp1JGT?EbQl`!ps71>s6oR'!nmV9o?@46"ObN qITu=s/DRJSf qD/DFs(4&C5hZ0fr%n3M"2=g86MCKW1Brg<^J4:^5k?c5B)e:j1C*sCs0FL;bl@Am!R1TC1BTo* s&o1SJ,~> qTK6-s4PW?ch7=qr65$<"2=g86MCKWbQd),n'_./ch#?^g&L4+bQn1Cs6RtRo)JF-!V69ibQH2d s47%jJ,~> qIU#>s,:Q%E8pnir+>g^"3^`EBD44ZAd577c[#3NE:[ZCN;p6UAdAA's2JY_g&LbX!SRMPAcm#> s+C/[J,~> qD/2@s(;6d!_r^0r%n3M"2=g8AH"mq$Msi"1Bbr%kPo/b1BM1gRI`3>s3.hL=Yn;%p+l`ns8=_T F8r-61Oo~> qTK$'s4RCq!n.,;r65$<"2=g8AH"mq&,QA'bQRM:q#B% qITf8s,?qh!dXglr+>g^"3^`EKDoK`48Ui1Ad$femJi.9AcdqkZh%c6s4PElK4`g:p1=?Ys8?O2 QN+VoAq0~> qD/2@s(;3c!WUCA1]%.P^AIp16MgcZ1BUAOs/, qTK$'s4R@p!WV`gbkhA?^AIp16MgcZbQH;ns69't!nmV9o?7I>o$[I,bjtf-bQ7;7rQG>hs76$1 J,~> qITf8s,?ng!WUjNB)=@abPV;>BDXL]Acm>Ys1Il6!f[/co4A7-fm38DB%d4XAc^TbrFQ+Ms4R6\ J,~> qD/2@s(;3c!WUCA1]%.S^An5jrk8@[qZ-IK"I];inj)b%!bVJ#o.pXObVP[eB$C;K1BG`"rA+L? s31 qTK$'s4R@p!WV`gbkhAB^An5jrk8@[qZ-K:"Qoaar6OrX!nmV9o?7I>o$$7rg%,1:bQ7;7rQG>h s76$1J,~> qITf8s,?ng!WUjNB)=@dbQ%V)rlY:?q_S(\"LJ..ol0J6!f[/co4A7-fk.SjN7n7)Ac^TbrFQ+M s4R6\J,~> qD/2@s(;6d!a5Q0r%n3M"2=g86MCKW1Bgq]b`)S:nhU>Zs-`I7#QN"(5k qTK$'s4RCq!nRD qITf8s,?qh!e^Nmr+>g^"3^`EBD44ZAd*hefr>"tnn%r^s0M qD/DFs(4&C5hZ0Lr%n3M"2=g8AH"mq-i3oA1C$2.nkCpas,?P*!bVJ#o.pOLbVM&6rr;[J!R1TC 1BUeNs%W>GJ,~> qTK6-s4PW?ch7=kr65$<"2=g8AH"mq-i3oAbQlJhr6ig[s5NXo!nmV9o?7@;o$#>;rr;]9!V69i bQHGos3gbfJ,~> qIU#>s,:Q%E8pnVr+>g^"3^`EKDoK`;u8BKAd<;Bom(0&s/GU%!f[/co4A.*fk+iqrr;\(!SRMP Acm\Ys*=HQJ,~> qD/AEs0J-;o)H&n1]%.P^AIp1JGT?E1C1>eN&*7ao(#rU1BM1gRI`38s31Hu!pBU`p+lrts-]b. s8RWF1Oo~> qTK3,s6Sn=r;Z-\bkhA?^AIp1JGT?EbR!S8iloWpr;>. qITu=s2MCup&E&/B)=@abPV;>RJSf qD/,>rr3&D^LmYurrUEN B)"04~> qTJs%rr3&jn(IQ]qZ$W1qu6YHqZ-T=!o3hHrQG>us7Q$.!nmV9o?778o)?i7h#IEJbQ.55rrVcX g%`dA~> qIT`6rr3&Qc]%^4q_J5qqu6Yaq_S1_!g`l>rFQ+ss5NZ_!f[/co4A%'g&>RbQN.!YAcUN`rrUln N;."8~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> q(i"9r+5q'q_S-M#q&&+-NF,o6:*'t!;SDO9kNuQ!^L@0rA+Id:%gCAAcPQr1B9] q9/ibr7M(uqons<#q&&+-NF,o6:*'t!;Xh>db469!mfQQrQG;qde:o`f`9IkbQ,uef`9Irb^]~> q.9VGr/:W$qe#a^#ubJL;_p4.B4k0@1\kV`H&V?,!cX*WrFQ(hH1kkKMu\.oAcQfJMu\/!Aq0~> q(i"_r;Qbbq_S-M$%W'UhZ*Z6s8PF`!;SDORK)k7"(qT5B)XRes-`R:r;Qf\B(RkZB)MZ/RJAXh~> q9/ilr;QcZqons<$%W'UhZ*Z6s8PF`!;Xh>k5Y%s"53_Sg&B1rs5s%!r;Qfmg% q.9Vcr;Qc'qe#a^$(:hnjtegUs8Qa01\kV`ZiBW/"-!9[N;dDis0ME2r;QfbN:^]^N;W\UZh\3`~> q(i(as0M]:!)<>HqZ$lYs8QV?s8Th1!;SDORK)k7"(qT5g& q9/ons6Tak5Y%s"53_Sp& q.9\es2P%s!."HRq_JK>s8R_(s8U:>1\kV`ZiBW/"-!9[ir3Njs0ME2#QMf&N3i3WQM"hkN;omV Mu\/!Aq0~> q(i(as-`U;qZ$jfs8V!6s5td,!;SDORK)k7#\O+\s*um]s-`R:!WSSe1BL_ZkOgV4B)cK91Oo~> q9/ons5s("qZ$jfs8V!6s7du=!;Xh>k5Y%s#hf7Ks52&Es5s%!!WV<]bQ?Aqq";i4g&Kaub^]~> q.9\es0MH3q_JIis8V6Ds6Wb^1\kV`ZiBW/#`Sf:s. q(i(as0M]:!'pE;q>^N0rVlkJq>g=I!L`uZ1C.UmB'8>51]Nm:1BINDrA+M]s(:s\!bVIkratp] J,~> q9/ons6Ta^N0rVlkJq>g?8!TsFRbQuo%g%b?dbl?i!bQ7b+rQG?0s4R+i!nmV5rn7(j J,~> q.9\es2P%s!-%gIqD/,prVlkcqD7qZ!OMgtAdF@qN:$"EB)f42Ac_q q(i"_r;Qb/q_S'K!%7aFq#L4H!L`uZ1C.UmAq9oL1]Nm:1BINDrA+MCs(:s\!+u0/pbRF~> q9/ilr;QcMqonm:!%7aFq#L67!TsFRbQuo%g#)hlbl?i!bQ7b+rQG?*s4R+i!87;Mprn6~> q.9Vcr;QbUqe#[\!)rjrq(qhY!OMgtAdF@qN1^-VB)f42Ac_q q(i(as0M]:!'pE;q>^N0rVlkJq>g=I!L`uZ1C.UmAi%[%5l[8G1BINDrA+MCs(:s\!bVIkratp] J,~> q9/ons6Ta^N0rVlkJq>g?8!TsFRbQuo%g!'$bci q.9\es2P%s!-%gIqD/,prVlkcqD7qZ!OMgtAdF@qN+Uc9E q(i(as-`U;qZ$^bs8V!Urr=GD!;SDORK)k7#\O*K1M6Zas-`R:!WSSd1BQ805kZu8B)cK91Oo~> q9/ons5s("qZ$^bs8V!Urr=GD!;Xh>k5Y%s#hf72bh<$\s5s%!!WV<\bQ@J;ch>Qag&Kaub^]~> q.9\es0MH3q_J=es8V6\rr?!p1\kV`ZiBW/#`SeBArQc&s0ME2!WTM)AcgulE;!lFN;nk0Aq0~> q(i(as-`U;qu@!0huE^CRfEE%qZ-FJ!L`uZ1C.UmAhu6Xs8SM\1C*rJ1G_;&s0MAS!bVIEoeV*~> q9/ons5s("qu@!5huE^CRfEE%qZ-H9!TsFRbQuo%g!%\/s8V6TbQn11bfnE"s6TF&!nmV,ouqp~> q.9\es0MH3r%eU?k5YHoYQ+XGq_S%[!OMgtAdF@qN+Q\Js8TG!AdA@BAnH#%s2O_D!f[/ q(i(as6'C*!.ar&qu?nhs8Te5-iX,G6MpiZ1BEpDo.pYas(4&C:&k6]p+lsRkKM0Ms3*b$1BM1g g&B1qJGD!O~> q9/ons7lTa!8m[tqu?nhs8Te5-iX,G6MpiZbQ6l+o?7Kns4PW?df9@0p<3dAq"""Us74M/bQ?Jt p&=L^htbKH~> q.9\es6]g=!2'.#r%eM[s8U7u;uZdsBDaR]Ac]7 q(i"Rr6,.kq_S0N!"/_>"t'BNAA5dHquHOK!J&Dc1BL_'=oL2YREU3T1]>MuVK;>b!*T6D!.al$ J,~> q9/iir:0jFqoo!=!"](C"t'BNAA5dHquHQ:!T3J>bQ?Adf)Ekpk47F'bl.)5l.kmS!7q)=!8mUr J,~> q.9VZr7M(Bqe#d_!'C2'##d<6K?MHAr%n.\!MA':AcdV lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> lne#/Z87"~> m*+hsZHRh~> lt5W@Z=\U~> M)0Y~> M9LJ~> M.V8~> M)0Y~> M9LJ~> M.V8~> M)0Y~> M9LJ~> M.V8~> M)0Y~> M9LJ~> M.V8~> M)0Y~> M9LJ~> M.V8~> M)0Y~> M9LJ~> M.V8~> M)0Y~> M9LJ~> M.V8~> qD/2'R8*Z:!^N0(j>-c\r#,S\0(Uk!0)cah0(^q",PrAZ,P3bl0)cah0).5Q~> qTK#uk0j7Q!mg#djNIU^r+?%g\F[oE\Gg+@\FduFMu.,eMtG3n\Gg+@\G49u~> qITf$Z[)O^!cYK qD/1os31Hu!l+bcj>-cSqZ$X()Y>fc)ZB^:%.l=U%/U#)%.l=U)ZB^:%/;W/~> qTK#rs7605!q60HjNIU:qZ$X-BCsCJBDql21%`Zi1&CqN1%`ZiBDql21&/tC~> qITeps4RB`!mgn=jCSBdq_J77:%W#t:&ZpK5P/Of5Pm5:5P/Of:&ZpK5PSi@~> q(i5is,8aTs1dSM"W@@@"q1_8!!!r11B7XX!!"YE1C"U&"onW-$l&=i!!`B%!&"('J,~> q90'3s5M8Xs6o!l"_Rf8)DN00!!$[)bQ&R[!!'P%bQh!")?9aU0i@Se!#ke9!4_jKJ,~> q.9iWs/BUrs3K_;"\gd/3BoP'1B:/BAcOji1B:kVAd:gj3AWHO5=b?X!'1!6!+G\8J,~> q(i4?kPo/bk q90&hq#B%Fps8!E$"j5 q.9hMmJi. pbMn^rr2t1i\LZT!!!r:1BRsa!&""%"r%%;/cYkUo.pIe!!!r/1BnNn!%n6O#5L'*~> pri`krr2uOilhL;!!$[2bQA@U!4_dI##P@#\,ZLIo?7;L!!$['bQ^oE!4W"/)YqU-~> pgsMbrr2tWiar9e1G_c)Ack+N1L^#i#"LI*@5B]"o4A)!1G_bsAd1a]1LW'q3Vd9;~> pG2m(s6&>s!u_.>)ZDMp$ig8PpbN1.!!!]h,6.]goJ6Rf!!!r01C,T5!#.46!!"8?1Oo~> pWN^3s7kQs"(qT6BE$*W0`V33prj#R!!#m?MZ pLXKds6\cW"&1R-:&\`,5;P)rpgse?1G_O5<\lO4oO\2"1G_btAdDg$1Il%X1G`).Aq0~> pbN&@s6'EMi\LZT!!!r:1BRg]!&"%&![@[FrXAf,!#5&]!u_.>)Y>fe,6.`C%0$;-'`'V9~> prim's7lWVilhL;!!$[2bQAa`!4_gJ!fI$Yr\=EQ!)`C4"(qT6BCsCLMZSLe~> pgsZ8s6]imiar9e1G_c)Ack%L1L^&j!`h*5r]gE=!(ZZn"&1R-:%W$!<\lQ25Q8,?hJ~> q(i4Xs4K[#s(::I#oWdD)Da/f!!!5t1B7XU!!*EZoeQ[g!!!r01B7XU!!*EZq_Na~> q90&os7O_5s4QGV$"j5 q.9h`s5J"bs,>uM#u*339kJ!31G_&cAcOjf1BBRGok";#1G_btAcOjf1BBRGqdt?~> qD/CBkOMb3B)h$Zj>-rX!!!33#6"T&)Yc)j/cYkUrYbkI!!"8:1BSNq!#kMd""jQR#6#MC$ig8P q_Na~> qTK5kq#&^eg&LinjNId?!!!ol)ZB^:BDB[Q\,ZLIrau qIU"PmIc*DN;r9ajCSQi1G_$U3W:f7:&&<&@5B]"r_3JZ1G`))Acka`1JROS"( qD/2Zs,?q5!h')'j>-cSqZ$X()YZ#i'EA+Or\FX$!!!5r1BSNq!#kMd!u(_8)ZDMp,6.]Jq_Na~> qTK$-s5O%%!p9OOjNIU:qZ$X-BD9UP;#gT/rlbJ&!!!r1bQDJX!,(uK"&T$uBE$*WMZ<_qqojQ~> qITfKs/H!0!jhpQjCSBdq_J77:%r6%7l)qqral751G_&aAcka`1JROS"%P.':&\`,<\lNlqdt?~> q_J:=R>h&"s-WjPjYHl]r#,S\0(q(',8qIQr\FO,rYkGc"!\^&,P qof,fk2Q<_s5j=-jid^_r+?%g\G",KMe?\4rlbAPrb(oJ",gf)MtP9rMe?\4rlbAPrb),PJ,~> qdonKZ`3k7s0D]Ej^nKnr(R2m@J4:8<_Z:sral.=r_<&t"'/,j M)0Y~> M9LJ~> M.V8~> M)0Y~> M9LJ~> M.V8~> M)0Y~> M9LJ~> M.V8~> M)0Y~> M9LJ~> M.V8~> M)0Y~> M9LJ~> M.V8~> %%EndData showpage %%Trailer end %%EOF idzebra-2.0.44/doc/common/id.tkl.xsl0000644000175000017500000000260711060232401014106 00000000000000 1 .tkl 0 <xsl:apply-templates select="." mode="object.title.markup"/> 1 idzebra-2.0.44/doc/common/id.man.xsl0000644000175000017500000000031311060232401014057 00000000000000 idzebra-2.0.44/doc/common/Makefile.am0000644000175000017500000000044611060232401014224 00000000000000commondir=$(datadir)/doc/$(PACKAGE)$(PACKAGE_SUFFIX)/common common_DATA = style1.css id.png SUPPORTFILES = \ xml.dcl \ common.ent \ id.eps \ ref2dbinc.xsl \ stripref.xsl \ print.dsl.in \ id.htmlhelp.xsl \ id.man.xsl \ id.tkl.xsl EXTRA_DIST = $(SUPPORTFILES) $(common_DATA) README idzebra-2.0.44/doc/common/print.dsl.in0000644000175000017500000000107211060232401014431 00000000000000 ]> (define preferred-mediaobject-notations (list "PDF" "JPG" "JPEG" "PNG" "linespecific")) (define preferred-mediaobject-extensions (list "pdf" "jpg" "jpeg" "png")) idzebra-2.0.44/doc/common/stripref.xsl0000644000175000017500000000047211060232401014555 00000000000000 Generated by stripref.xsl . Do not edit idzebra-2.0.44/doc/common/ref2dbinc.xsl0000644000175000017500000000141111060232401014547 00000000000000 Generated by stripref.xsl . Do not edit
    <xsl:value-of select="refmeta/refentrytitle"/>
    idzebra-2.0.44/doc/common/common.ent0000644000175000017500000002563711226566025014221 00000000000000 Anders Sønderberg"> Adam Dickmeiss"> Heikki Levanto"> Marc Cromme"> Mike Taylor"> Sebastian Hammer"> Index Data ApS"> Metaproxy"> YAZ"> YazPP"> Yazproxy"> Zebra"> Zebra 1.3"> Zebra 2.0"> ANSI"> API"> APT"> BIB-1"> CQL"> DOM"> Explain"> EXSLT"> GET"> GRS-1"> IDXPATH"> MARC"> MARCXML"> MARC21"> OAI"> PHP"> POST"> PQF"> PQN"> REST"> RPN"> SGML"> SOAP"> SRU"> SRW"> SUTRS"> USMARC"> XML"> XPATH"> XSLT"> Z39.50"> ZOOM"> ZeeReX"> ZOOM.NET"> idzebra-2.0.44/doc/common/xml.dcl0000644000175000017500000001522111060232401013451 00000000000000" PIC "?>" SHORTREF NONE NAMES SGMLREF QUANTITY NONE ENTITIES "amp" 38 "lt" 60 "gt" 62 "quot" 34 "apos" 39 FEATURES MINIMIZE DATATAG NO OMITTAG NO RANK NO SHORTTAG STARTTAG EMPTY NO UNCLOSED NO NETENABL IMMEDNET ENDTAG EMPTY NO UNCLOSED NO ATTRIB DEFAULT YES OMITNAME NO VALUE NO EMPTYNRM YES IMPLYDEF ATTLIST NO DOCTYPE NO ELEMENT NO ENTITY NO NOTATION NO LINK SIMPLE NO IMPLICIT NO EXPLICIT NO OTHER CONCUR NO SUBDOC NO FORMAL NO URN NO KEEPRSRE YES VALIDITY TYPE ENTITIES REF ANY INTEGRAL YES APPINFO NONE SEEALSO "ISO 8879:1986//NOTATION Extensible Markup Language (XML) 1.0//EN" > idzebra-2.0.44/doc/common/id.htmlhelp.xsl0000644000175000017500000000124611060232401015127 00000000000000 0 1 1 3 3 1 idzebra-2.0.44/doc/common/README0000644000175000017500000000012211060232401013037 00000000000000This directory contains various common files for our Docbook based documentation. idzebra-2.0.44/doc/common/id.png0000644000175000017500000006147311164151751013316 00000000000000‰PNG  IHDRxð+´sRGB®Îé pHYsgŸÒRtIMEÙ±Þ— IDATxÚì½i°l[RöeæZ{ïª:ÓÞ½ož»ûu7tÓØÉ2 a…ÀÈÈÈV ÛüÃ’-ý1G¶C¿›PØa›  ‡$!,‹ Œ›¦^7Ý@Oožî}÷Ý{Ï=S {¯µ2Ó?Ö®sê¯qóóùUœ¨S§Î®ª]¹ÖÊÌõ}_æ&wÇÿç›#+ÅÎj xîEüÄ÷O~÷SÏéÊÒ@ƇÀ+¹h¿½Ó¹ößý=ßþ_þWß1™!F ÊJЛk ¾5~ áw£¯ÓÐèW2 “Ÿú_¾ú·þöy±ó—½uý*c0¦jèè`' s7 †´¿5Ù¯ÞjÛægþÁßûÞï},´ ¤€žw!Ÿz×У¡³bò‹ÿÇ õ¯þ- h!-©¾žÑÑÁ§/ ‰-ëQÓuaµÚoÚü ¿ð?÷_|î‘{‚¹¼c Í_ÿñq1ÇOþ÷ÿãöì"Ðu[(tLMà.p¤ ƒ4A"‡È!25"1ëââùG'íÎju²3»$<ýß~æçníC˜¡(†¼ ü§6ôñqŸ>ûìÁ#@ýw¿3¿;£ÿ„¹¶Ô]ïï|ûŒöÍ)웯w~wFoZ•¿Ö¿ª­ý4²…õ|ç»bææx8Þ †o·NmGgœ^ÏeÀ힉[ {v–h¬§w }›•iÃ-ÐúÉu¾Qÿ;Zá¶1©íN—Cëqr¼ƒo_Ÿ¡É«e Pr#¸8œ °o ÀÝœŒÜn_Êã`¶f@Aïd[ýÁÇÐZ hà#ì&@Cè€\ ði™‚8Ôá˜Z!Ϥ…B07‚ÅÆŒû]CêH)1¼d¬šš·›±Uƒ(P@Êq¢+K ÙÝ>çf†ùÖ´mš¢XBÁÝgÁ;5›þú íÄnæ š†s·í( ep6NNƒÑ`<€2À^ÐÆs 9:¹¦X6¼5_§4lmmÙ)ÐAìöÎ …Š`Ø÷xôÉ=n\².Ë!Ð`PÀaYÍüÌ0ru"ä´C^2šé}ð¾ïo|6i/]¼Ð4PŠ… wsâw7,€v‰øÎïùæ¡\L °:wqv°ƒÄ êm Sa  ËãåóÕ¾3ôþ»þ܃qÁf5Z AÞõÑg·Ù ÿéßü÷?t_hàæÁÍ€ òŠÕœA aìœËÂl^ü á2ëZÇ<—ƒ‡<÷Ã?ü׺ Üဈpè]Picg²XâÏþ™'~ögzÖÉlº½µ½‡²„&h)´¸«{ ÈÀóç™ižì­¦]8®}è#ÿʯþ܇¾i‚9ˆÀLx'¹fÆ_9»F©~úï?û‡ôÜÍý[ïÃä äx;óƒÃ·vwwc "ýÞ¿ôÝßû}Ï8 '‹²»¸3Ãaêè]C0©½‡9àëMÆ){M ?Êüv¤ƒÖG2Õ?ílmùí›ùÿŸgkÓdñm†€(Du³Ñ§›ôÛ¸ -½£Y¬?•¡Þ®ç5þ¼‰ZÜfJ!¯ðs5ä)Ëå·ÛœÖÏ󻆾ÃU3PÖÞo(h ݹÀ‚1tÃÊw ›·wðìþú Mëí5$ 8uʣʀÇp@xC±Áw‚ãýæ0¼3mý§˜ÑÕ åN?Ko“ zMÜgÁŽÏLy ¥ž-‘w]Ns M€ Øm{9Â:wf§H§x¿‡{ä‰wŒÇ;ÝM CßËcà° 6ƒñš§Ñ©½FN– à ÷}^Dϯ'µAÒ6ÇÂ^S ôµiÊOƒ4ï¨*Eɧ/Òõ‡óøF¬Fé♤n_÷ºf¿C¬8 i1 \ B€šéÛá³ïF¨©ßñn·²´<Ð:*úY®í0»B”ŒÐÀ‰r‹; F#Òzúu.;6â@ì•o'7ÃìŒéqWí0ȫà €¢¹1z˜˜ÀÙ ê`d‚,€8œ×¼‘ãõ9ªÁ t¾¦þïih¡”Ä¡•@N©s€\˜œœêãñtǹ\…d8•T/QMOº¶•Ôñ†»‘ PæXG+ĺ*\] Quët‘ÇLqƒóÒfcJY¡,­§3Bkf’G- Ø+ƒIÄ@€(Œu@Rß?–õ”©ìÄYxqAV6&f˜©®‰JVóö{rO¨babÜ ­gG0#Ü>_˜Áw8Ô;×õøwñ1òzªÙè”È™‰@›y.¤‘|Ð:ÜkcÂX7E§câ€mø‡SÓЩò»Îø4<(ãŽ-.Öþ…YÓú›!Î㌦²Nwã½¾´ÈZ¢XO#ek"ÿ‰ÐÒ™Iýk·¹¯æ»"€ŽÙ‹ŠÁ ´wù9¾#Ô ÷Ú‚å̾¶áOÏ| [Gm6Ô2>£° ¯ÍâÆÇÕcÒ†ë§ÃÆ(@Ïh7޼W0$Y¬Ðµ÷#f0ÃÛ¦ v½ ì´^°›{ÅÑÐr8Á«‚РÀ3zƒæp9œ!§‹ïš^¾ahŒöl i#Š®Ï×hã_õµuðx#Eõ—„ʯ-[)[;ÁÊ:AtNG?ãà{ú'~âWŸýýϹ3œ‰H$º“™‘WÏ\œŒŽ@ÖeP9=+'Àeý5mýÍÎõ$ *5’W²TJvî>þo}èáox É2sRÊf94M.0;¼ ùí»Fe&ëH×ÁGPˆ¯%O•i·oM0'(Nb @Jp²×)"†àF•ÆÈ<~®={²Ý¸¼º(|þsoý³_yV 3S%fæ %3Z£ÂÈFÊ0Cd› $PÕ16£1?­§ <ÌÀ@Èábd`Es‚Kýò¡ö#Oɪ—3 ©_ˆ…,1Ln¼öîgªÂ,ÕúŽÂ‚S£àÆXFC›Â2ÃàF¶^a À` eq%ed°ÄYÍŠÀÈ‚#*‚û¸þª¿ªy­£UPê(v´e<™zÀÛd¼£©!žÅØÚ»!Ä-+ì ^1 €±G`ˆ€Â30TçOÎÕ ëÐWç{]I‘<0"P Ü×a]Aáç¶[üV™{c¡…‹/µ¯Su!lú(Ó»‹‘²÷ÊhŠã°NJ¬H)ìÊvšà‘3;ŒÆ7 ÊÀ}`Ä¡„!ÀÉZµ` 5€ì¥ñž€¶€,£eƒb‹AŽz&b÷ΤƒºC‚R1Ãk eÇd–l–‰Xœ‹BD¸yŒï^׳¸ûe@"vew$ _ÞÄÝb쬞瓞섆lê—ÇÐH}ò·~ÛÇ¿ÿ¾#§“_þÅ_ûÌ'¯8„Ð: (ƒð0 8RñØ“ýÈò׺Žoüæoüîoýúo϶wÿÒ÷ýÅ?óíÿêW^øéÿ饹9!›ÁrÐ!hš¸·&±ÐÍÖc{÷íðtu2o§“›áÖ›7Žû¸Ý…fÚ«¦`€,Ä\ŒŒœƒ4‘ÎñÎùÉìéG#œŒ´Àê¹kÏïÌsô'.RÜÜCãa—\sÔ Wyüþ§ãs_øò¯ïðv×MÓý»ç÷yü­Å­«ýQD”ÅÆd‰„ÅЖêO°Ö±‹æƒ—»zõêÕ”&¾Ç†%Œq¬ÞûÙÄÜ[>óþ§ÿÆ´¾ð…/~ú“/5³U€4ò)0Mƒ™Wyé—~îŸÜXôd‚!ƒ î¤EJ‰¦*´ç?Äïx¾½œaöÄŧö/~eÿ…—o¼iÙÃ,ªYaÀM‚•*U(N…B”K{—Â#K† „Ð…­ C1‡Iˆ­»©ZKaÖÌ–É Ø%4¼õ$·Gí·¯¿b»Ûó7>ò4creØ‚dLnbìµèÌXªgÈ.,Qd&Ó§ñdß.¯·$¸‰ÛXV›÷.ð‰båÙÙ@0"Ã]‘0 ƒ¼êB©¨u+‚±¥”a ,» ´ 6ø¶oýÀG?òÄoÿ?Ÿ™NÕ „E E- &`q ˜ee_ ¶ÜΦ¿ü⯠Ë~ø‘‡žÚ~êñ ï;ârcu´$/ÄIL+Øâ,n¢±€^sIÅè->yáކy’Ôwùļ;)^4i %0ÑÀ‰T°5›ÍSþÒ•—{h÷™Ù^Ø>Þß¿ñ¾ïA\úíùçß¼u.ÎTG` î„}]™S'¤:(›»oaM¬8„Åüžt>¿Ö^‹ÁˆAŒ(ÙWÇë€ÇÌá%Ú7”O>.?ôüåV iAˆˆÂh Ubl"H,Ã@|a›Ø;ü•+/¿0¼ö¶·Ê0ˆ»¸‰Ì̩(›²5QˆÀ¢_-ûÕ¼_õšÏÉsï9£xqòBÂ@JÁéxµøÒÍ×nâäãßû¡ ?=yèåáÕ—Þx­ÛΗ‹cÍÌÉŒàä^Q¬ HZ4‚Õ´2DŒQøî{‚t ¬f‡„DÐâè‹.8 ià¾p¬b“×uàQó¦£Y@£)›‚ Ïþþ§ø¿üÏ<ñÌÉ~/†€vµ€c’ ÆYhî…J­ÚÈe~ý-?Âù¨\?x“‘/‡½-ø´¤YIÓ’§%OJn-·šÅó"$̇€rÝ{î»ü±ÇŸúØcO¼ÿâ¥û$JßsêYœ[h£¹)Ú˜†,ÁrÜiÞ;7}G¿{ü‡Ï`ï;/¾7aþå+ÏaJ“VmEœ•“rrNÆÉi|`œ!…¢ æè… (ƒmtªwýðXÞCv;âbÄÊ0³’3RÀÂLdU¥OÈZöˆs”•ºFoRòþ/~ý÷?ûâÖ~ìÇþóÝ-q9Ú&¶1*z0AZ≹ 9gM 3'C8wá¼™‘ÃÃÄ4CGnäFîâÆnÁ-ØøÃ̱ ÌpOtßîKN.D'6ml„x†>/!à ‹Å‚Ó¦2_ö‹“åÜ‘fh®] !0ó­ýýsۻêg¸“+»±™òX}Sòs"MLpv5MÁï"ç «0ÁÝÝAÑÕàpg3$w‰m‹Ršbd†•À:Á”0c´F}Á‰H›áÜuÈF_yîÊÏþܯ*áûÿÊ'ž~¦°ä°Zæk-+€g™J; ``ÛͲg3=J{“Ý“9Ê aY’H¡PZ1 6  3'.d×qý‹¯é7¿úÉϼüù×÷÷ 5fðÖ ØÐ…¨Ãà ³f' ¦•ˆ¨?„É'îïüE}ó½»ÏÜ7ݳy¾´{yukµ-31"˜”` œ@p‰.‘ÛÅ0í¢€§Ô‘É™_Ýøa–î(b¢8¤Ò·±ëÚY°š£kv»¸•´b'3x†eXB2,€>ëwVhĶþå¯}êù¯”Ðàñ'àN)÷­„b+,!MäVРXN'¹,³&¦wÐH¯»ÍìáËø¦ÝR✉¹0)±;± Ç>•!gn±üdX-†!eu«¾Ý„Ð5M˱_ö«!u;[«œæóùSx ~æä>ûÆó·püäÅ'Îmïï4±Uu÷¨gT¯i–yR)…b4p&·âV§±òöÖœPhM®IKrÏny£æ’ú¡ŽHIªÙÚÐjÐK  L$…¥Æˆ|Ö5R€„aÊç^üÊ«¿úK¿‘ØÛÛs iÎkn ˜Î`î® â\œ[’+réW“¶Úö¡Ë—éîÑ¿õÖ["âe¡0’`YÐÌ&`¯c_à`âJ8ñB7 ªñšÜݵ¢¶m{öJa<úè£ïíž¾†·^¾yõÊbÿK‡/u˜>óÐû¶§³0íW¿+Sfw'ò¦¦ì@o/† MÓHìŒ[¶€ˆ`."}^dÃÔ!}I v!îÉK|ay² `¹@û"îÿþÞÏß÷ÿ…'߇Հ“c´ínÖ#…! n0°zPBH!âø£|LG)ˆ*ìÕþµkû×e§³†o£ÍœŒó~Œgm#[Ø}Ï…gôí+¸º\–ż7‡"µRO54Ñ£/Ó*v“KÍòçÞø£^”¶ÛWn\i÷¦»¸¼}~÷Æþ5jV›‰ŒÂ×q¾:À"‘Aoá`ÐÄÊo‹Í‡”I‹C]Ý׈«SFkH¿òþæ«WßДþð Ï4„© µÇD0„­…Ë´¹0O·>ùé/ýÐôÓªþ©O~Þå¡×oÿ‡?üß>ôèÞª`q¢7n,M‹8È,€ƒÔX3奧7ß*ÄÇœú’”²Z,—˹lµ³½­ƒaÉ6TNF Á7 ƒJ²WŽß¸ÙÜ´âTÈ»¸ìÅrE·Ýˆ8†\4õe6Ý‚€½†«WN^Yت˜NÚ.‹}õÚ+“ûOöûãe^mµÓ;Êj020Š„èðãÅñ+xm¹Z([6ópo['[#ç4Ò9V«ªh®\ßý_ürÌB{¾(¡¤‘UàÊ䨉M èŠù?ýÇÿšT “Ø\üO1<›sQ„I(€ Œl À•ÈÁ^Hýp9_Þ¼:Le>,Z â”–‹B3›œ ‹Z>.>òTlˆ%$æàä7Nn*¢4Ì\ȇc[Y ]ôyð’c$Ì,yH^TKRò«G×ÓÁâòÎNe¾Zì̶ŽòòÕ×ãÎd2iSî­÷ßkñÛœš 9€UY^=( +B};ÅDHX‚V¤‚êA,-ჱ#0œa¹ØÅ1mF(žÊèÍ XÔâÍQÙVGY·BØV/ cPKÎ! (™‘¹š¨]èÕ^JKDI$t,¢ä‹~»¶Æ%ÄHÁ wOšX ’+‰yg+$!ÎLDª9ÄVš )¹šw¦°;9Ñ~gÒYòžri©(B@CayÒS”‘‘[#ãNîav7¥OYˆ\äkô >¶¯FáF¸q ˜EÌ,ª­`Ù˜š@Óbš‘”+¼ÒÚ ú›¥\–>å­¤i˜ß’­KšVÈvO³©’W戃)u¡É% CADD$Nœ”œ¨ˆ“³ÇVJ?”’"KÖ""¡mœÎªÆk8"‚8†œ„yÊÈÁªÅ¡‹¦CJ}ÝÈ5MÃD}Ÿ<˜gÕ­í•–å°Úšn÷'‹cÓÉv7ï{‰¼µ=],—ƒ{Ó6nzÊÃݦd.9Qlµì'ÓÛɭ·üíÇÿ÷€©%iK&QÝ™¸€ ;& €T$^$™·òlÇ.ýƒŸø¥ÏýÃÏAΧR±‘=;a‹€Xb J©Š/wƒ÷%E„œ—p'g/®Ô6æœ#I°âCj@¼¦ŒÍ´ ù”oÓõ$¯,¢r”lª®# (0‚{&f&TC—Rˆƒ2ëd‘ršˆxß·QŒ°@â–ÍM–ýŒ8”6H“Ê”úºîFDVJ²wûFñ]†¾&Ï]ko0E’®08Dƒ*2q9›,L^˜²`pWxÛЮiZÄ› h"HÁ.ÈUÛ±F°6eÑVaZr!¯Uù¬4VdUšj3—:}`§”Ç„µÀé´¸Üïd”k¡ØZlL0B´Qåëieƒ¡öka%K›Ü?;2¯u-ÝwÝÎ4:þyoC Å“‘[va¨ÁƒSœ)Âj×?c@Ù]äTL,Á àFTšÌi€góÂÀ”¼nô®t&]¯ º ¬™„‘ýVÚ`Ó7V®Ü“k¯Úœµ­yãe|ª#Yÿ§þ%kÖ‘…Íâp@ ¶~Ÿõb ÊÎì¸Þs³Sšøm}´ eÌ%š ±E‰¨¦)@,N WKÌØë¶§NßZü 3+ZÄAk-V¥œn×S;Ó=h€èš·>5­÷ !£S+ûm\øéýÚÜ·Á’§d¸2UN1ø:Õª(seÄ‹œ}¨ÝKÐâ#T;ÿ¨½Ñ{,‚M‘cÇ¥#xt²à`°Âën2ÂZXK(ŒØZ76b±€BTY AjÞ†fýå8;»£Š¦NÕ½f¾FÄÁëDÂ0åõú¥MʊשUe:6㺌èt®Í=ÎD´.Æ8U˜È‚D\&öJŒ‘#9œQ˜*ËF¾Vx¬O #Þì`G­p·{ª/ïœÑÚŠFƒV""%cR7Ø•Ac>鯿¢€ƒ‰¥î&!(ŠÇu£5¦Ú¬êÒnçýÈA0v9¡¨fÊwöMÙОÊn›¹›‚¿«QUBc\æÌtF¨ãv_ïóQ©÷vï¶yþ§Ç3ùÛ²‡hª2ÈÆÏa'ÐYPeÄ0#Í …—DÉP\$$F!!¹6ux£IØÐY‰Än·Ù¨ñE!Pt‚”}œ}õÛ­9ÿê%«Ç¨TKTðF²Û#/ÆÖ|*—b‡2avD3qDß¼¢ô9ÊØ´ÌO]Æéú0Å ´n!¿ÛKÝ!Û…»×Ö•Npsªj´èdp'ÏÁÐ$(àÁ+ª SdõÕ-k¥ZõX¼Eæ0r¸‡µ¯ÿ NpΠ,>o·³õ|áÓv5 8Ö3ÚFì4æºäg…äÊJ£*•¬ú2€ÝŒ@Ž"€›Ä=ؘ„ؽ8¨Í9«<¶å 6ŒÂ(q>] d 6¿k‘± Yà„¤¸I AU‰:÷)hË¢¨õ1wœSœ¬Â–SŒƒ[P0˜AÑÑ®Ð%t ›ŽŠP+±Ç*cÑP„2TC3…+B n‹‹JÏ’ƒÉÉ$‹à}Ë=SH‘¨º:)qý©VG«ˆÆÒvK³ÂÞkj(úà$—à²rIl½PæàFž]¬Ù‚f±hÖªE³AƒØ îbÜ’ˆ65 ” ­"¤<éš¹”ë'ÄMV2y)%P„‘“°zöˆ½j–%¨Q©È+¶¹±")3/RðF ì&õëŽôy¨̸5ú„›¬Ú&9‹,†I¶ ¿xùá²:hºm“-r'ccr!F ’ÉBF4‰& ‘q}ldÅkÿž†U›Ö¸³ØPìâÄsA2¬UÊÈj9LDBhê¬g·ZÊêdˆq^ RÈ“•¤Ù´"žTLì,Ïѵd‰Sí¹gÛžl§“UK1PH}ªd“#Àà®f¡Æß*qû·¶&3™ö‹Cn95ÁÔ.Ѭ-qe‹Ìy£öÆÜNÚ!ÍË©9S¦eB²:>^lµÓù°¼ùÖkÍì¾Ü¯`yTéùZÜíND­Ñ–uS¶&RYÙ`ÅÐ2™+i"ùÆÆ$v{ØVÅõýÃvk2 H‹a›ÚFx&È­€¡kq«-†ÖúX‰ Ô©lw;ûÃb¡\sTwµµòÞ×WWÓÉ@s'u ì#„³âƒªYus0yJÞA.†ß½þ…iØBû?à“á•£—, IDATWÁàwˆùLÓÌŸyÿCÿñX㇕0,Ð4€c9ÿ·ÿÑ?ü­¿ûwòdÙ›AÍórd‹ÑÖJwsB=ƒÇ ùN° —’i¯©Vbܵ‰1S%å~ Ì]¼øÒsztüäå‡>€÷yû…+ó›Ùµnw$6­—Í:;2°;Âåvï)ÌÈÙÝKP÷Žì EÕ%’)bÁüqÜÿêÖ•ý7¯t±á”/6{ló¿ÿÌ?û®ïøáæ}Ï<Á G†+HÇò„µ0°nnA)D=Ë‚mÉVºv§IªnÆ*@±ŽQ,íÔÛöN¾rðÜþ¯=òßöžoÙÁÞï½öÇ/ͯ­hÛ˜LÕÃf¬JÒŽ¯ÞºvýðÍGèþ§»'ÿàÊç:`º-%ÌW)£ Ì·ë ‘3œ‘5‚XYBDä®`ÒµÖ¿.ú Ü*åc‚ß\_ö¿içf™ÛÂS´€i.D5$øÈŸùZ]ƒ‡±.ïÀ·–ó—ñÚǦœ¹ ‰ö6 ‰ˆŒ“Žé¥$C‰RJóùŽ®ëš¦<ç ©§1v aff®§åð¦;´}ç·±ÍÌ"b÷¨¨wƒ¥”cιë:U=°)¥@¬ª)%!jÛ–™K)ªo{‚Bë¨÷}of1F5K‚̈†F!ëŽ`†û†þà¹/­°úÀÓïÅP×s®çÆÌ1F3 RÓ;re8;ªÈÄêÓøåן?ÿÈî3ïyzž—“öœ×]çi5÷Gm7mšF­"8)a nÒ~øCp|´º~ã&S¬Ç¤YoïBàW^ûì+|+ô«=ñ²r3™æ~AÎcJ‹šŒÀ;»SOf'ÃÃ?ùhûÄþòè8®¾ù‰¿qãxÑïSôÐ…¡_r;‰F¾m¨È6e7Q#ž(HpÖ”]¹¨êVÐÀfXWò2sBYŠë,-ôƒ H»7 i5äv‚UòìÇ÷]Šøð?õ¿þÔåËpÇW¾zå«_yykk ôi,›÷ÖW?õâï¤Ü÷¾Ë´Y†ʪo¨é…œá›…S&î@Yq^"±Á’ Aꮚ2ÃmAWÆò‹$( ¤°!ê"æ/¾ùÂ!–÷?ö@[w‘Âê&bfîî„À6â,Z)/¸±Õ ¤–öûã°_¸öÒÞóGðÄx]ÙØ¡µÖj$' z@c˜–ýÍÿìGð¯ühÛàÂÅ•×ñßü×?©ÎÇ'‡Mœ%ê¨z£Z­6ø4ÚÞ…YÃÝjê^LYB±tJ²8ay¹¤óÝì›/ô2.?{ô×í9=»øÜ‡gyâòƒÃõåæBŒu"f.nêÆÎa3U]t&[D=A*LÞ`znzpóèÅþsÝà ~Z`z†xÖ²Þé´,ª“’&ì^À¤Eßã—á•ÿ±ÿbÙ{-zLy!»3õkÞBÔT¿¡„¹8¹ûñK8Æê«xéÕ¯ŸÆÙ¤C?k¬ú÷vÒM±µÃ篿Öî´ñK×^¸øÔ¥-éöövGsg5ײ»µ7¤ÅFE¡óØÍËFßÄÑÔÑúb®ˆkrG NfÌJeˆlŽpšíf²×¾zôÖ¸¹Ù‰/IØL‰"ƒ‘ÂiH+ˆ0SùW×~¯ 4”Õñ±ºçço¾ößjf[ް.â»-2•åaú+¿ò[_øüúÖdg²êspõý~>yv.Ì^Ĺês@lã·rÊlÿòÆïte¿ä&ri©DÛ[»K/®ùÔ¡C Giõ¹ùVËÔ‡ìçiÙNå3×>îüîA´,)ve(­ÌNfäõzÁ(o¼5¿h«c¯Åö@ààfmí5 c‰/`Ê\Ø®^_ÙïÝ@^ Kk²Pþµ¯þß=pùRq38T•Ü& $«ãBAcžØD‡ «ÕâÅó{;D¦“Æœ¯Ý:œˆG8¡J9ÆË%(Èh2ñAo‹?¾Q2nŽ0A)m{.¢› Ü„¶›¿)çîW?˜Ø7.tüå~¿mBAi,¶¥I–0˜Qš9AÖÕ–8¶K·ç篗¡\?L©…†œW©_!ŒÕ†ëÚiƒo '7Râ g§ CTÆ"º¢Ö‚Q+Ìâ~ìmØšµê.l/Þºuuq«'ƒŒ¸Fm=%"E5€¨ïŒõ7' [Ý<õ±COúå¤Û:wéüáÁbä0ªvÇx9È;/Õæ¸)Wª¨Åø£x§ê&wС§…ÚãÑHZ9Ÿª$èöÀ»n44žÁ™Îâô8òÊ`õ"•s£mK:@ækÙͺl}ÝÎh-%P"1°¡Ëu;ÆpB’‘g¯ŽÁ°æïÚyÞÙp¤2c£‚b\°Ææð57F%Â=úüœ¶ªDøØÆGj> `Fím%8éúÁë$y%Y6¹×5aXçãiòsJæn63¹­èÌad#›N&ë‹ôÜñBÚàúhCµc>J“·Iú+W™dœGööý>CáZsFM™ÃÈxÌš]!^‹uéí¥ÖõªAÕËŒm$ ¯ßºqŒjS/!‚qOÅk7õñH6{í#åvÚGȹÊVlÔk8sfª +ß!:X3Ògàªøiƒ­Ñ¼§öº cZÛ½&6QI×ìx’Ѳ…aã)„,È@f0 E»çŒö*êJm2ìp‡¸ÛÚãÒ8‡ìîºÄ·AÕ±„â°^ŸÍ»mÔf:îëMv-îe÷Ó6oä›=YÈ*|çg»MKÕ&`}­4³…S^ÝGmmVñÛZãTF¿Jd`¨Ø¿VÐÈ ÑѽÔï¤|ç•iî4ô4cša‚¢ 3!)¢£%(Û'ÿ“:ÿ¬/TŸTð0¨ŽmxéTy±ÖÙX £JHªT@Ê>6¦²õ|dØ ÓiŒ­w6£ xÏmmÄê‘õ6Í8¨ì·Iù´v1€ñ¦bäTÂŽ˜)Ľ¼2©,ÌÛ´e,sÕù¬†>„&±¦3& €UÇçªêîfV 3kˆ”"e6fR’ád9›ÍB Á³;†e‘ŒÀ¹ýÚm§r´þÍŒŠ5Þôý-B?è¢SŠ1÷²²å„÷V©’sF7ƒ/¬$-·6éZfh¶\òD¶-3±oM&ðCÓ4âºq[]ç´)ï,Å„xÖti1,'¤mbñ³¶g§i;’û!5MÓ¶lÚ˜•Žc¯Î!ó%é2µ»Ñ˜=€¬ÜÖŠ`Äì˜5Sv.É‚pŸMÝÈ&a¯TQE¢E¤®¹°­´Lž)Ö(쑨µpŽgñ„W'±a{ZL©¨‘ÓmÅg%¸ÝÎ}ýñõ T²€ÓlÒ-W7<çØÜ¿#[«@ ¢Ãx…¶%ˆ™Ã$÷žsÖ‚N&¤ê)u³N‡Dª³¶+jê™}뤺Z`1ãYב„ì5ÈZ¹¾@ €íéäx¹š÷ƒ7–i‚V’¥Rš­ÜQž5m³3[¦U¡ä͆ýÔ³Gå¶·NiµXJÛ bhc AVei̵ܳª‚* îŸÃ–8ixΜ˜ÆÛ%|ÏÃßü(.øé9\éÖÕÒa>YøpWdeýñ!bCy¸xßö‹¯ý<''h:„y…ç>oÿó} ²âÍt+EÇâjÎÞÐv Ú&>òàÄ3/¦Ïíï;ÙÉj~þÁGoŸz¯]=ººÌ«2?ÝF«£ë&>OË“ùNœ~üòǾðú…F1]è:L‹ÃyœtMŒpÞ[ßúà7=€ '˜ÿ«7þ Òîlû‘K—£ËÏÞøBï«”{ DîU÷_­Ü(¶Þ7½ü¯ï}Ãm@8F>ÀÉ o¾ôÜ /54«hDL•ç¯õÌ#LIŽè MáF¹…LÑ,pôêÁ‹7Wo݇Ýãü'>qù›ÁÅO¯0;VüUö»yhÖ\n{‹ް\aH`2+fiyˆå ¦mÁÝ-—~ÑÞ:xsÿÚU¼ñ¡æ™óÖ¬®t%<ÖÞß‚‹ãÕ|U C§{Ô­ÃÕ"B4ÙÆd“bLÎt[Àæ(q •FýñÈÛˆ—pþÒÖyQ¢^gÔ>€ rpŽÒT%6bb\Û‘Åä{˜ 8~yÿ…«G¯î`òÑ>øû³-‰™•Rª‰+£""áÊ.]ï½¶•dyTb šÿ·²7µ,»Îû¾µÖÞg¸÷¾±Æ®žçæÐÔ$E‘VhG¢&;4dYŽÉ14À`eÁ‘(q,8‘dv"ØŽ-;r€0¶$ÃN+‰)Š¢„ÑTìf³«YÝ]óðÆ;aï½VþØç¾÷ªYEÈ…F£Ð¨®÷Þ¾çì½×Zß÷ûÞm¯½~íbp]?öÀƒ=ùÑGžýÝÝ—ñõWÚ<£aZöûEñ 8DÅßÿ{¿òá`:5.ÎÇùxÚ(PPQ[ßñ¤ÔtÖš- óñº¯j ñöõ;í g>óÜÙÇiO=tî¶¾Ò¼5ß›z'É,ÝG~£xTV© sÌz„’½ZŠÙ„b'[#p ¾í:ÑíÉæ¸Ä(£~¡On>:].g»ûÖW›´ª¢®*Ä q(޲tzáh ~içêå+W[¦óæç6NŸ-ίmmÏ–·û¾ÏÇ`>ðhØJ BnRXN|:·~3-ß¼z%¢}Ü?$w5ò 8Ѻ.*·µ˜MIÀŒ²BÛÌSìv÷vövï(¼¯¬ŸÕD÷÷‚ˆˆ—û®_¨¦„~ÙÌ߸óÚþñ<þ‡ê³s,®\» 8]Qî œ 'Z!N@±OH´Žõ1F±wucVéJHFEY\h—(¢D5Åô¥w^:sç7ÏŒ”7¨¨@#)U5f¼Áªu''.é\ø%â;»ÖlUoܺxûà¶«íq1r&82hBJɦ¥1„{h"Kï(ÂÆÐ3\õl;ºt§G˹^;¸þͧDÄ‘‹JŸŒhiÔ‚&ˆ1ÁÕ•eáô÷ý©ïùžïüîd%’|ñÿºüÃ?öõ©­×·šé"p>D3ª¤XKmTsL~ìòáÞùÚóÛO]ÇÎk—_Y ™&c%zÑÊÌ’ "6uâ´·Ò•‚W§ºb´£{G"(É¥E;*Ç úkw–Sgï|lôüaw±8l'•ëgKÞs¬)N¬ \'K4˜!ts{1m«²\«oÞ¾s7ÏáìÛÍ¥‘«LѦP”EÓ…²®¸ÈâuµÕNŒ 5àº@ò-†Ô™Z¤vLïÍp¢¢|€1»Aˆ“Qí}9™H쳟’ }3½SÖ0Á9céBÛu®šùu]è‰í§÷0u¨Æã13×ãœä³ˆWË# ‰%]¤Ž™H"(œ÷ù²a|2¹<¿}Ú„I  ±¢•¿µsg‰ùóϼ¯3´¬<;ic0°‚óÍVwJQ”$}«!ê…6G£ $r:Hn5Tá Æj`•¡ìåhð€"Á¬êh”ô”+KÃÓ“­²?¬msŸšPÐGùÙŸùùÿê¯þmȤ’3…žQŒêz³éS»Œ)%Pß{q¡÷]šðöûÞ÷±€ôû7ß|ìüOžztgq{o>·1÷ÐÄ(ÓÐ#Ž<ÈØ˜Yƒ*‰ =zu©S¦û)ª,*1ÐÅ®C ­…°8¼væÖû6Ù^m‘zM!%¹¨FPQäö ‹‘S.•+ÐzòûMwö·Š-”W°É’æ% £ $ö ‰F«4ÒÜNÐÈ|tïpÔ§ÇÏ_Ø^;½ƒƒDv$•¯×`øz\`”ÈP8:{执žüÀSO>ûð£­m¬3¹¦Y‚ˆ¨ÆÊì˜`˜QQT§OŸ~TùƒƒWß<¸új{ñ ¶äa!‹)e›K(Òqy€bVF¤<ô༷޳;, b!EÒ” µœZJïÞººDØZ?­ ¡ mQJHÄ—èˆÈlÚhHÔ–oõL½öGŸ:‹­½~/¤d«7@u˜l¸QÐB5-D좥F#ßÝÜþðO@ _mc{ŠðÚλ‘7”õ¸?­š)b¨c|ÿ÷}÷w}×w÷a\¾¨?öcÿáµÝƒØ4 Ú%Ä9Ô¤ãÐÖDÞarîÔù§ÜsïâÖ¥+ó‘¾~û³l¬’.†;˽ËéÚåÉÊ•7C]žÃ$f²£dS Ê gâQÍ“ÑYœz£Kñí;{‘DˆÉŒ’¦ÜrÆ”ò¸‚R:ŠïâÎRøú,ê€t7nïí¿µsN•Y±NDw;­PÔ2.ªÑ믃%…FÄC9G‡‹¶ ± T­UxU3cr޽©–X¾~íµÞ÷mì•[¯?wîÉ ¥NbD‡  jaa¤i» ©×dwW’|¬A³%UCê)ÞÁAƒ8ÓV N°¯Ý¾R?P8p/Z:¿Ð»Zu–ï-DѲ]Ƕ=9áîàðöüê¥+oOÇAK¢”ç fY]ææšA`g³`ÖŠýî­×G(c ç¢m[¾8µÖ Š€”2È4“„¼.S×_|÷«ÿö÷ÿhÛÍ&1I›šª\“0Ù9°6®OÏÛ; ,ÅF¤ôUc1z0?|Í]íIÀ²*öfÓo½º¶±.D^._S°!rö˜"Ì M—g×C‘ß³+ÂÌS‚“Ò»{×ʲ\j/®h¯[¾|ý<·–ôÈžK 0G\ïw®¼ØåÆdiº···Áe¹]v©£Â…ÔŒ™Á`b5sS'y2FN-P[ŠWºöÔÆæ<$ Ý„ËT"HŒf&z/’?Á4u3Ÿg/_¾nH…”!ExYLgW‚JÑÏ÷÷ÈÕ—(KµBˆ®gâ8i{ë`¶¹yaÿöþödk1ŸŽ6Æ{‡ûýöf ,F?Q^F&8,)6¤Ê²×ìõL²UvY» Ê;/}좩ffYŒ.Â&DpAI$8$‹¼Qî IÄó2$fô2ìfFȞδé‹©‚EU»>M”S ‚YAL …€d¦<Ð'5Se©&K,ùj´šb³ÒÐԞ穱µ²ê…òçÛ Áѱ‰ÌYšß¦ â0û¼ÊGÆÛ“u>X(„À€”NÉ%8qóØø’:Õ!Ï`S¶ãÉMÖ­'Fc‰ Œ$è9õ ª –bäÄAŒ4™Â@ ç²,²eg€ê”EeC”#õÝ5-4~¯;×2]xe_Íü@GqöGR`3¤0(Qd˜eXdãÈN‘ÇèJGþU‚)ƒ3áp„Á¨p2fÌ@ Íl¿MœíкòP jµ ¥D9)Æ¢XŽ>€”܉ï9¿v£H£@ÊÄ.CLÀ§ÃèI'È+°ãXêŒ:¥tŒŠT俢3(¬ð@–1è ÑÞ0„U"P„¥fÃÔnÅÓÈ’ ÊR•ÈÃÈ# Np‚Às"²E³–ãÄ¢ŸlH '«©>ŽFœ Ðñã!ºÒÄÐ1ƒ²ƒE4Q¿CA÷Nq’µì'„yôk'@ùèu:¨Õì=_`ã¤\‘V:s†9­²Mâ×…‰¨‘T¢‰1e/ ]ñJ"ÑýFà¶ÜËÊ÷%½ïÓŽ#çìîÆ”Ò]¨‚̶«™øXr¥dœcâV?«Ë™ –Å Ø=¹Æ.2'b6e5¦¬%Kdi%ÉB£*dA4f#ûÑàÙ˜à Ð,R1øã™iÎÊ‚c¨Ú‘ÄéDLððžª!È)à (ù4(²"CWy|bNyì8¼‹¢|bß8Îz/y‚ÌøÄMÕ)Ó,2å¡+3ÈŒA”ùzÔA#¬®G) |Ý`¥…5AG+1W¾¦ë@â:Yæ¯uú^G6ñRZŽ>UÎ ={/ƒö.ñJ¦–ˆux„”9^)ñ :ùJæ'ÿY6MÕNÓýbí¾.ÄãÈVä ¶#¯=ñÝ* … <fKDDÆF‰LyH­¸¯#1¡èøá"F Å dÑ8$BpF¦‰õn@/+eI9ŸØ¢âjC'„‘ìXLföæ ÕnIèGÂÊY%d3Í÷h5ÄwS¦îÖ|½æä$À¼ÚŒ‡×b%š5€GÇÏÊE:í$â,\Ê)ÛyNÖ;mܰó)•îÚ£Oìcjeͱ I…V²  èÌ‘‚4DÍó#¨’îÍ­~¦¸zƆ$ö´r¦ã[Gþ{LpÌT2î<9é!Ã>“‚za>Àé*óGñn e$ÿ·á[%gɺåØ0ß­i"ã!>Ó‘Èò¡žØVŠÕ¼ÖƒÛE¡ Ö¼•åg )'F¤¼{Ùý$sœ_ Q” “>­uVF#Cï©)dæ©"ñb ¤…8QQ/êÈÉŽ‚Z ªá X* $ï¥d7Œ IDATE™3P4] ÀŠBáa%«g-r{Ìœö¤|BAPÏÁ´‡çÀ‰‹deR†%†!ÿ„A*§Öšhôè…1 u×ý™7ò`§‘cô`‹)?nÚöÎdäkRòRXjeoDdì¹K ”÷F*ˆ…¦ÂB™’ÓÔ§(u™’‰/#C q],ºÄj–_l£UV’'‚Š©S:àêc²hJÎû¢EM)µmK'XBlyÔLq)ãµñf´ÎbðÐïµ0©Ï&d „Éöy´ýÉ”N‚RîГvÙ9Ï•çÂk ùàUb€%§B¬6%ӮªžPé£F탋ñä«À¬Œdjy㋚qá¼”U0L—ÍbÞôMï]YTu2íº.Æ^a]è‡!úPdjþ‘5ö!4m×…”¬¿UOî7«wG7Íœœ“ùRdVùBƒR€!$"~<Ö¶K#SUõÐ:‚y–š™(Çãõår™Òª\k»4o¥Ce}ïÆ§æû‹QO=¨7à¼ÿt™±àÀÒEÒÄ%3÷É„N§»:ìL\,--=DÜöÒqχÖG‡ˆ^¬˜)%"ï k{íR+ÚyQæ1•ë“ éS›ºÐ/4Šz}<6BŠIwÿÄÙ;Î<‹7Ú¨×G®`ë“¥¾oS³Gæž´Ýe MCÅU$.(±3Òˆ>%J]š·‹r½2ò,Köµ„–hUÒÂÁ‹ëâ} ¡ífeµÑµ‡õ£{Í>IKpQœ>Ûã:VÇãqµf,"¬ìC4O&NØkLN†þF:îã)‹xôT›km'±.}EÞzuòz1ÕD¥0“cR3#´]'DäD˜¤6ö}ë|4b*Ö•cÓx°?CèE„‹RI wíDIZµ¦ñ½‡æäJa-ØQ£1ò=áU¤zº5Ô`("Wm:[­}Í«•­ö7mw¦¡e™r€ãp°1k¶˜ž=?yò©³ä—7níÞ±ƒé\q볟ý£aêCzâ÷^}%r… ýí[(Í8©GìºÚºˆ÷J4tùjlDÃD#Q éŸ~ì±§ð8ÚC/áê\tÚîæÏH•Ã…·^€¢mÛ¿ûwÿ³j ]ÀÿÐ_þýß»ø=ßûÇþößüÇ„ÏþÒï½ü¢p™Ü©³׎.X–/0êA¤)8r?{Í_yyzÕæÄIŠ£tìÆ¤\ª¼ýñ åWñ΋/µ]Ú¬ª÷Ÿ~TœÛYÞYéŒXL(È4Ï’¼]Vªsaî¶7P2æ{åé+˜·ÀY·6‚[ï%0E…0#%¨¡ë@ìªZzZëå *Azãæ;Óƒ .œœùøäùÉ•—/5067·CÛ€4£4ó?œåw£\ÙÀ®-ÞýÚ|§ñ)-RïS&1ݲœ±.dXNg| —ÚÐ7ݲí—mWzŸ¥J&ê†ÐOñ´éþù/ÿÚ~÷RøSúü­¿óŸ?ð`þÑ/üoWÞy§k;ò('Çr€üQåE'-Š¢]´„¦ïÚ E•e±Jôni³ª²q@œãÐ#=0Þ^›lΗmjAÑ+•Ü)®Ê^Ų›DhàM0(‚À0gÔ]3þ‰ÿ«žqþ<¾ïÏ|ª*ñÎÛÍOÿµŸY¶©®Ï©ið;P^‚à%¨‹±UµÀ$YY–I5¥ÄÌ‘˜Þ ‡u®€ó ÄÃØ_Ù½ýLýl¿ìÖë ŠBQÏ]Òª(BÛÅ’RÅ–´O!Hu¹°ÚÑU ³Óã¿6»|“s\oMÖà bË ÅÄà#¯sU4Ñ¡;-õi+N©?Ç㺠,ôu}¥\_žè/®T—!E‡j[Ï>óþozæãO?ôÜÆÖ¶ñI–:ÑÀ]9q\ˆÇõöWß|ûŸüâo\WÂÏýÜßdv Ú5-€¨=DŽ›n©€† ™'Òöxc¼Ÿ«#hšÏç5ªhúîîí}4/<ðAÌ:h£)˜šÙ^Qó,”"¼÷ŽàkI—ž4öžnïî0âC[gšåR)²ÈNø5!ƶ f|þOèãO|ò±óOnŸ>u?c‹ñʪ8:"£sh+™B¯böêþÕ×ìúEì\ÓeSKbe€Ì­>’l›ˆÝ|O“–(w›Ý÷?ý¾Ï}î3M“éøþ?ý½Û‘+ÅÙd} háW›9 ¦ÌFvDD¹ÀÉ T–eÊ÷{ú÷ cNÛöFš¿…âüc£í20çya–T‚– ’´o»6ô}êµïâ®"qF•ó%¸`1¤®oº®•‘¦Wë½ Ž‹nìg 7íÖK³w^Á•¯è­=éï»GŸè±ádÄjb$Ðý;·¯~åk/]}÷àp/¥¸2‰0!7¹m˜ç» fÐŒHþ›¿ñ×67qãjóê+×`øìgßÿ#?òçË’bjæÓË£r‚ùš¹¼ÌçW¤(ŠºmSHËʦH‰ŽJ'ûp±,=Ð¥ÒȽsps·>öè󈪈Î9‰šRJ>Z öľôn\ø²ðà R¤ U›Ê¦ï÷.œ= ¸vêK¿XÌNÚdŽÝËЙÁMÛååë×.^þÚå«ïN§Óû)¸9ðq GNáT-ôïï%ÚN|6ÊZ—¼œ®Õ„%ÛŒKDÕ0Tügþìw|òÓ§Aø¥öÿÄÿô| þƒÿGϜݥ¬—Ý~yêìêq®†zÇ*µ2‡@E êEÁ$ÄófiLùÜ?2EYp—}—XX9NBûíü­;_[Çd}´€’jß«já|vоïÍ1 —X%™Gtè'MÜ\Ä­þÐÃO<\=xûoMo™ÓÂKb$0¯p ŸP\4ESE;SŽÎr}*ºQoî~mÒ¬ÄQ:ÂÁƒ9ï}D¬Q=ýÔ“$¬À®Mßݹv`‡šù‡–7VÂÜx}{1ßSÌþëŸùsëë¸t ¿ô?ÿú;ïÜü_ÿå~ðÏ~ò©§ðWþò_ùsñÇIÄIÝíÝÁÚ±Éj5Ü‚QŠ®ô=ûÊ/Sc¬Ü8©á$5û(Äjä‚Yãµ²Ùkµ ÛÓýKgn<‰Ç#š¬«f_¹ÐõMLªe»@g­¸ZÇú‡Ÿy__z™;Ø}éàµ4PTEµì{¥¼¯*­žhœ÷…wŠxzm›ÖÆbB?µæË·ßºÖ˜ßÓÉÕJc¬mÈi¿ÀrA½óŒ8ôè@kJh ðbzÉOêçþäÅ‹!½Õ¾ø¥×^þòþúOÿüž}!Íüdtê…~úÅ?øý¢ÚŠTí [¦Ê9"_^ÆõÝù¡÷>„EYVÐ!˜óä‰mÙ±\HgüÜ M6ïd.ñ‹7ßÔók7±×Š9çM£šÍœ&ÂzY³1bÏUÑJq³ ÌÇåÆªëØo½=»>³êÌFè‡Ó}©k»Ç¬@gÍb]ê)–§°¹…É!f‚‘Ý?‡…þ‹þó7îÜŽÎRI]êEÄ%r‘Š^(h%år¹$’&ãMç»(Jꪰuªì—þúÿñÕ_|——ä"¨a‡´(Ê¢ïPû‡bŒÁn3é¸.Öæ}n}$”K\˜}î§þÄÃß9>,n°£l„v& )ZÞŠk‹nÙN;ÝÞ©SgöçRŒ  bXÎ닱Õ,6)Òr-EI¶ˆ•• BSšú5 ]oÞ/œe‰e#†^­*JŠÀa{¦+êˆfÙ8}©ÝåÍŠ5ílcT¥”(+÷WwZݵ<7qma%I*ÝA»Ø˜Œ§Ý"­Qdýúësªb1Øh5,Q#Ó¬À!u:’üÈ÷ÖH$ aí¢°9o¨"÷DqL(ɨ7ƒ÷mC wAI?‰¹} ö` r6&Behc"õ$Á© §…›¥BS keÝ-æeÁi•I2é `¶¸&N,̪9i, ×[oFÑ3RŠä¼ÂItÉb#Bª8rìÙÔO´¯ú¨°mÙცô‘ƒ™JŽ©Éúë•䎇˜òï*ZÔ%R«Ç`-ÆÆÝË·íV&ÿãìœË8ЋFF}9òÎÐÁG»~v?ÆQšá#²^Õ ”g*Çå\¨̧œœ7ïÌ'væle‡EÖ šÈ”3xäxÞ¨^qvóÜÊ)ÚKbîaŽcM¦‰ôhò«9ÞD=çÂ}Ŧ‰té}²=i’]‘ýèëÝ~YLÒñÑ„ÚiÎ9¾_jÅ`Î\´ÕbކX&–‡ÊG¶tI°û‚‰I\åPy‘Qš%ËJZ fØ´0XP`”]oð~K.T_ê‚*ˆˆY1ƲÀ'¤m•Äd'½Þ:$,O™MÈ@èP•¡Ñ¦C¥bIr8‹2›D%d©ù‰í5w÷Né¬ÊzJ°ÁëŠÃ3ÈqDÌ «õ úÑvŸŒ§!—c{¨‚S4˜ !ôÜÃS¸¿•”!ÝPé©ÅèE;AJ¯€RôŸE‡~c¤4H¦¤°H%¯3”[1z\ÁĈÁ<ä5ÉMF"Rã0èE±Dʇ•üC‰³:ÔÀ'Âr@CV‚“£Øœ—0Eø˜äF‰†µ>®¨ï|8 $±x¼ƒè ÓpS$!Â|9 U‹µp±1¸[}a0NÐDspFá­4VÀõ(ã ;½qUôÜuqé]𥷸ÐådL+¬E–àøò~ô¯HÔå$˜ËÞ>…7cåĹim*VÀf+OÊ€Ý>«•2‹Œsp•Á× L¤Œ™°JRBõ2”"'اo°u|}wé(táHw²Š53q f}´;{æc–T×q³5•Æ( sÇ ÍŒSÏÞåÀ22²4 gž74ïÐ%1QŽMZ2¼³Ûñ4¢v—¬k•c¡«†8œZþÿÄ †Z ¬ßeõ¥IlÇ b‡¸ÉJ-ÈClžÉ1_„T³’x "«LؼÂÁâ×Qy†™!ß“b«'h6Jj†ü 3÷°¤´T´©ìžùæ3Ï}艊65$)7ƽ`ÌZ“ºŒÈ‰Ñ)È”=¤æÝ´ß#{°|\vc7TGõn¾ é1–‡‡Dt”£Ï2ÿR1*€˜ç5LJdŒ@`#N³ìã1‚1óJJ@tdUC2Ä<ÌFR¦£÷(¿ G 5…å)¡(Æ«%ìï=aɰ'¾˜C«Yb†‘ÙpLsê¢wT¸±Yj»¾¨=qÚïÈX”£q£†þ€-`…(¥Ü…‘ÄèÙR¡êTI)‚"×uˆ!ÆXÔŸX㨫o l´¢Ì0¯¸=ùÎÛ+ƒrZ"5X&Ö ƒ$&ƒpF”8§])`]f<©#²a:ˆ³ ¾Êƒ^L3• £˜á¦k Œ9ÓýåQjBDf1%bÊÌÏ’TŹzå,ALcW†ž×-!¥J$è•{°bdJÄYÂ7̙̈‘Ž‘!Š%¶˜™pÞ•ª.v* q9éöfkk)yß·] ±ª*6¤”|ábŒ™ˆ~Œä1˜ ¾ KsÖhWÖ¥†Þ£°¨¥”b¢&‰Š6†HZ—œZ«‹²‹èz-«µd¤±÷RÇÐ7Жł†jì5„˜zGãAaG‡!‚‚Åñb±¨j‰)ˆpLí¨,ÛESø{¯µ;Ñ—ZñF d<6‰8hð®ÐÀÃñhƒ<8域@Hù:F9UëøªÇfÒ¶ï< È9Ï8Fo›ÐQbGR:rÔ#©EÕØ´(Jw†Á 1ŽŒÉèøŒâ)¥¹Rpœ@AC—’*’ðåÈXºÔ{Õa$ðè8’p(bÓµžQx_x¶¾ïÚ%œl®¯·S;' éjÔƒRØØ‚uÜõMá|HS_ìÞsGÐŒ›ÍÊ>^e&Å£©¯‹  o]ŠèØÅDÑ­Ä«¼šåæÑƒËA/8*ªKbä@‘U`‹EB,Ê·)ij=Ç”lc¼®„Xó~s‡ˆFã}ß#WõrÙ’1{«[í-.„ ΗEiNèC» 5.&^*À‘I]#bãÔ·ÍÈ l¤=u½Í,ï®j¾¤Q=F§m虉ÁÃÞÎî¨ÜÐ}&ƒ¯’”‘úú>´‹¶®ëIáÖÆåt¶0c|¢ôûº'úÄÓÇ00öe¯f¾iŒë ìmaË•tquÙ%Í÷\çÌKÎñ«œÏ4S¨X+Ì‘ ˆEb2afƒ¦°ì•Öû.ö]¿6•ošÅ¢YÔã(]¿uys}Ë@šõ)–¿"‘²K–·©òÅ(ã ’ÆMMª’Èw!…>Á/}0ö\j]9Çj¤fd>8Zj3í¨¨+ñ¤…jéÚŒtxÓ™äš6ªÚ”}±Y»Q·˜¶M[~TtñÞ‹;9…öeG› ©hÛa¬mÒ&X忬[Áv²`›WDW–Äl ÆJ®¨Ê½qP¯vL ºL˜“ÑzÝl¬û:I˜pÃ#çK•´LÅÈÛØŽÉ1¤¬J&Fð“:4sßÛmú®öVšQ›–~´ltÞõsöc"D>%/ÎF!„¦m¬Oä’VVNdÃu¥D· WG‡íAÐ~¯ÙYÛ J5¿º!*RcÇk~[:¿A뱟z×,öç2½WÞ½K+°Šž ‹áÜ©s]fó¹Ázl¶l$ï„;n'ïéœ7¥•ñvÐhÆ>¥co_ÏÆ„(&dHF,¬dª*ÆÖQš»×¾xÅ-Æãº:8Ü+Ætá‰ó§ÏnwnÙ†…Jç=”³íOÙ(c ø§?ýk¸ØÀרšÿ…öï•oxÛ~I†ŽÐp²Q½†pC_ù•w¾ú?}7=äAX‰2wððüßü¸œªcÙ%í`Dêaó0©$‰ó¢æÓð[¯~éŸünîƒû¾íÃ?ú“?À›-\ï'Y«DJIÞ8üÚg6>õÄúüÌì±S*L^»ó%Â`•¼{Ã!%3VUg™®Ôæ¹[à³îXssªæBÕÝÂAF\oÔ[د1åñ¹ Ûç6ÛÑòÎí5¼~ýÅË¿½¸>÷¾6QÌbØ#Èpmãl“·ÓTæWZ¼³?ÙÀþ»—_ºùÄÖFq¾°0WflFâ ^“Ηˢ(77Ï<úè“{ߤgúG^ÿWW0~pÝ?ùØÁèÒxkmoyUJ$V6–”mÐPrJäjïu†K/ÞÂFyÍÞWv{Ìë‚»‚:HªüÑŸúåri™ŸH‰Ø:²$Ò´ŠŸàçiÙlXõìæ³¿Ó½z¥ÝW3ŸD‘/¶yÂD2@¾ 9BÎXTÄàL½’O´ˆbÁÅ( dèAdV‡ /ïØ[¿~3¤³œü¥Ÿûw·?3zà#½õò>vüÎ?ôo~ Îõ.k¢doìûÀä&åòNnöè¯þƒÿ}ñîõG?õéÃ+W`탫ßùÇ?½Ç7hdÖ9Sðˆ#)‚#FÚqרòô§>úÙ}˧¾å7ÿûÁ¹cüƒ?õo½ð½ï;t·\¡FQ%Å.MÒØ'gˆ(¹õ1XX/êÛoì|ñç¿€Åø}ßþÑÛï P·Q>ó­fv¬ J…ëB¨Gkm8eƈÁÁ˜”¢hpÔ„xíê­xó[|á<ö‰íµ+7¯/bcflšû·FJdÊÖ.9òëäEWòÊ9"URÁV$¢ÈE¡B”L#‘r)̬MÂt7Ö{ûÕåÉsöø'Î~Ó'_@ÐúËðZbSND™ÕX”DÑÏš3å™t·_¼ öŸúôÇ¿éÓß‚yœ¾5ûÚ®lÓ)i؃E¤KD(Yt][4‹j:í,ê=¸>†z:+îÌd'º…°rb"WU£‘sÞ,Ƹl›>ÆBFýn¸úÊ ô#Þ<ÿCß÷ýhvè­/Ý8¼¹ð(44ZŒQU˲äžR¤\Š3bƒØ°µ¾Ñ.–7nÞ iwwWíöh-¦Ù}ñ‡øe¤zìMË}"*¸pæHã–Kóã²Â¤jm²™’ŽÆüôÆ8Bgû³CÒR´v©s¢pšJíF½nÇz»]û½ñEÜPœ}ú‰Çß÷üG¾Õ»Y¼ñ[W6Û ÕrÝGqF̙䲞ŒØ\&÷—=¼÷…ó…Ž=”b»¥öm˜7ûËjRVUUiQ-Æ›‡¼ò«qcöÑgŸ}èìùg?ô­°Çg_<Ø¿ØnðùQÚóÆˆ«Š}èšÐÍÙlؾ²èÞ ¬æbêO­¯=üÐc»Xìcñ؃Oœ_ÛŠ»Ó£q:­~}ÃEÎ}‰»t\9tj¹l,qÍ£±›ˆ¹ÔƦiÐ5¡‰Îæ(Ô½séMè ¾l`ÂZJOŒH‰4¹Dã4±yñ·^æê%üæoþÆ×._„0úòâ+·ö®tÖ,¬cW¯ã•WIIô(£V¡ ÂᢟgK™IYÖ£²®Ê‘YLÖ'bSvÑü‚oõ¯í© ŸÿçŸ×xn8ÀW¾p1ì2- ,„zùÚ“¢ó Q¨Pt0gê{L kìŸ~øÑþý[¯CðÓÏ>ÿðãý¥ù®…ø‡{#€&õ@pÉOž HÂF¥pÞ×Ü£:EOÌéòWv.}õmh ×<ýü“ffêId >D‚KÎ[­}õÖ«—»[¦Åÿï_ücL¶1;€?·{ãð¥WÞ~ÿÃD,B3-bÑ.{¿² gG*'œªÎq JAÉ҆̕vTWä}H<[Db;3.Î…Ñ/ÿËßÄA‡5ÿú—~ýõ·ôÒbùΗ/‡½o?pnæ9à‘™XéÙy#!4©F ªŒkå [§Ocû’^½ÖšC…ëOáôçÎv×è„ïAÜk×zÁ686Ø(åÇÛU.¥c$bƒ)…Ʀè§;Wäþ»z½÷æ—_Ç+»8µuþ3yì¹nÛ5+qëœ&€à¼oüêÿò+èfXëÛÜï#17õ‹ÿãÿ‹ezå•7žûŽÇF§Æ]ê*+´³”N¸-mÈJ±¸ª[«'™&‹m !ED²Èe%ÆÌÌÚ]¿våÕÿçwÀÅú|îS/´ãE·ñìWîÜd¶ ÞüCíÔÇ*=EÏé²Yz/¾,hŒ…TN1iAñK¿øyœeH¶<ýmÏ÷|Ûœw£³ìñK1ס lÅ¥×/÷¯ëãÍ=úÉy?m/coõrûÅßøu´»o_|ûÍçN=Ëmq0šŒBL5j"9Õˆ©‘Eé°ÞÂ4Mš¡ï]M"»¸QŸÖ(3Wõ.dîàpúÚKo€x¤zè3kß÷Ÿü±tKçÅíßi^zù—á–o\|í©>Rl±Š)“2Øe°ËE /NŒýëíŃÃù6¼V(ëAXþÞí—677ÌåüüÆ«œ›G ¶ã•ÇÉú¦ï*àô#g>ñ'¿y g§M?ÚúŽû£Z¾å#/”k´_ìö>(3ælÏ…’‡ ‚ñþ{ªåäéço¶æ‡z}­õÚ~ïùßx·Ï·Î›…Æœ‹lD#U“‘qŒ®ûÄ_úP>Åãíz¿›ÁØ9ÒÚŒ4uírT®MÖ×ýFñÂO|®®ÖûÄö;Ý›ûºWUëë;ýM?ù]Ëfºuvc´Yô®3xIÆŠD?iŸß½y»´ä„ p’Rª’Ü3G¦DpеÞº(b¸Ÿ ÷~"cÒ‰£q0ÊÆ)Hod’|ÕO6çg],;ßE×z2uŠÄ©-º^¢R26½?„qçE‹ž…ÓZÙžQâ®ÜKÒˆ:0©IDATQ‘T*YWªtd0¸€1@Œ ÊýêHt•ýÚæüÏêi[Ì’kŒ’ȈÔi’ÎÀÐ  [úD>l*\çCp]ïZÀœJ‹ª±q\ß»†A†:ŒT ‘3JFQ²‚r*œ Ðc^-ò_{•sæ}þ·‘!qÊY@JjˆÁ5óêP”»b™¤eË46ÒÞÅD k‘ÙNá bFÔ™h/!°|âUdФÞ̓ÉPI%L”(q3êÉ«'ÀQBSÌ ®Ilp6æã;÷p²ËÑ2$+J ²¯DŠB bH»¢‰"@u‰5JLœ@ìœé‘­,­txFˆÃc«9*§¿é¿æ:Ÿðª¯èù£M †RP²Þ*çd%™˜bËööÌ’Ð죘™"‰D >8vÅAdND¢ìS!*¹(QØàѾœ«èQúä‘]$}[ÎŽÒÅUîŸb§†räS²Õ‰´/æ€JrEb‰.Z°¢ë’u9¶P9ëk€ó *Ü+˜˜3Çò*K>RN$yodÍòž§'ƒ]Þ³‰d¤½ëØVÀ2ÿä9 :ÀïáqÏ,–}]Q¹S™J:±ª&bž`ÊÄB2…ù\4aÚ0J½ëŒ q”®8h rRž@BLÍXY/.‰S!ãHš$(Ep29h9?®Ž*ªËRRÙ Š1Y†7%%bá ¿AYˆÁxÇ‹›ñædÈùȦ{qaDVw žˆ"S2ÒD:$ÝgG"ê”ÊE‚K^“R"ÄlQ%o ¡±=³aØÍŽ$ ‰]gR¦yĬ0Rp0k)ÊC ã”Șá2$¥‚CDeÅÈðÞHæ˜þÿîÓüü©bhIEND®B`‚idzebra-2.0.44/doc/common/Makefile.in0000644000175000017500000003074411412336424014254 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc/common DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/print.dsl.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = print.dsl CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(commondir)" DATA = $(common_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ commondir = $(datadir)/doc/$(PACKAGE)$(PACKAGE_SUFFIX)/common common_DATA = style1.css id.png SUPPORTFILES = \ xml.dcl \ common.ent \ id.eps \ ref2dbinc.xsl \ stripref.xsl \ print.dsl.in \ id.htmlhelp.xsl \ id.man.xsl \ id.tkl.xsl EXTRA_DIST = $(SUPPORTFILES) $(common_DATA) README all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/common/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/common/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): print.dsl: $(top_builddir)/config.status $(srcdir)/print.dsl.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-commonDATA: $(common_DATA) @$(NORMAL_INSTALL) test -z "$(commondir)" || $(MKDIR_P) "$(DESTDIR)$(commondir)" @list='$(common_DATA)'; test -n "$(commondir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(commondir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(commondir)" || exit $$?; \ done uninstall-commonDATA: @$(NORMAL_UNINSTALL) @list='$(common_DATA)'; test -n "$(commondir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(commondir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(commondir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(commondir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-commonDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-commonDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-commonDATA install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-commonDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/doc/license.html0000644000175000017500000000502011412336551013215 00000000000000Appendix A. License

    Appendix A. License

    Zebra Server, Copyright © 1994-2010 Index Data ApS.

    Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

    Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along with Zebra; see the file LICENSE.zebra. If not, write to the Free Software Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

    idzebra-2.0.44/doc/record-model-domxml-conf.html0000644000175000017500000003616011412336551016401 000000000000003. DOM Record Model Configuration

    3. DOM Record Model Configuration

    3.1. DOM Indexing Configuration

    As mentioned above, there can be only one indexing pipeline, and configuration of the indexing process is a synonym of writing an XSLT stylesheet which produces XML output containing the magic processing instructions or elements discussed in Section 2.5, “Canonical Indexing Format”. Obviously, there are million of different ways to accomplish this task, and some comments and code snippets are in order to enlighten the wary.

    Stylesheets can be written in the pull or the push style: pull means that the output XML structure is taken as starting point of the internal structure of the XSLT stylesheet, and portions of the input XML are pulled out and inserted into the right spots of the output XML structure. On the other side, push XSLT stylesheets are recursively calling their template definitions, a process which is commanded by the input XML structure, and is triggered to produce some output XML whenever some special conditions in the input stylesheets are met. The pull type is well-suited for input XML with strong and well-defined structure and semantics, like the following OAI indexing example, whereas the push type might be the only possible way to sort out deeply recursive input XML formats.

    A pull stylesheet example used to index OAI harvested records could use some of the following template definitions:

          
          <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
           xmlns:z="http://indexdata.com/zebra-2.0"
           xmlns:oai="http://www.openarchives.org/&acro.oai;/2.0/" 
           xmlns:oai_dc="http://www.openarchives.org/&acro.oai;/2.0/oai_dc/" 
           xmlns:dc="http://purl.org/dc/elements/1.1/"
           version="1.0">
    
           <!-- Example pull and magic element style Zebra indexing --> 
           <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
    
            <!-- disable all default text node output -->
            <xsl:template match="text()"/>
    
            <!-- disable all default recursive element node transversal -->
            <xsl:template match="node()"/>
    
             <!-- match only on oai xml record root -->
             <xsl:template match="/">    
              <z:record z:id="{normalize-space(oai:record/oai:header/oai:identifier)}">
               <!-- you may use z:rank="{some XSLT; function here}" -->
    
               <!-- explicetly calling defined templates -->
               <xsl:apply-templates/>
              </z:record>
             </xsl:template>
    
             <!-- OAI indexing templates -->
             <xsl:template match="oai:record/oai:header/oai:identifier">
              <z:index name="oai_identifier:0">
               <xsl:value-of select="."/>
              </z:index>    
             </xsl:template>
    
             <!-- etc, etc -->
    
             <!-- DC specific indexing templates -->
             <xsl:template match="oai:record/oai:metadata/oai_dc:dc/dc:title">
              <z:index name="dc_any:w dc_title:w dc_title:p dc_title:s ">
               <xsl:value-of select="."/>
              </z:index>
             </xsl:template>
    
             <!-- etc, etc -->
     
          </xsl:stylesheet>
          
         

    3.2. DOM Indexing MARCXML

    The DOM filter allows indexing of both binary MARC records and MARCXML records, depending on its configuration. A typical MARCXML record might look like this:

      
          
          <record xmlns="http://www.loc.gov/MARC21/slim">
           <rank>42</rank>
           <leader>00366nam  22001698a 4500</leader>
           <controlfield tag="001">   11224466   </controlfield>
           <controlfield tag="003">DLC  </controlfield>
           <controlfield tag="005">00000000000000.0  </controlfield>
           <controlfield tag="008">910710c19910701nju           00010 eng    </controlfield>
           <datafield tag="010" ind1=" " ind2=" ">
             <subfield code="a">   11224466 </subfield>
           </datafield>
           <datafield tag="040" ind1=" " ind2=" ">
             <subfield code="a">DLC</subfield>
             <subfield code="c">DLC</subfield>
           </datafield>
           <datafield tag="050" ind1="0" ind2="0">
             <subfield code="a">123-xyz</subfield>
           </datafield>
           <datafield tag="100" ind1="1" ind2="0">
             <subfield code="a">Jack Collins</subfield>
           </datafield>
           <datafield tag="245" ind1="1" ind2="0">
             <subfield code="a">How to program a computer</subfield>
           </datafield>
           <datafield tag="260" ind1="1" ind2=" ">
             <subfield code="a">Penguin</subfield>
           </datafield>
           <datafield tag="263" ind1=" " ind2=" ">
             <subfield code="a">8710</subfield>
           </datafield>
           <datafield tag="300" ind1=" " ind2=" ">
             <subfield code="a">p. cm.</subfield>
           </datafield>
          </record>
          
          

    It is easily possible to make string manipulation in the DOM filter. For example, if you want to drop some leading articles in the indexing of sort fields, you might want to pick out the MARCXML indicator attributes to chop of leading substrings. If the above XML example would have an indicator ind2="8" in the title field 245, i.e.

      
          
           <datafield tag="245" ind1="1" ind2="8">
             <subfield code="a">How to program a computer</subfield>
           </datafield>
          
          

    one could write a template taking into account this information to chop the first 8 characters from the sorting index title:s like this:

      
          
          <xsl:template match="m:datafield[@tag='245']">
            <xsl:variable name="chop">
              <xsl:choose>
                <xsl:when test="not(number(@ind2))">0</xsl:when>
                <xsl:otherwise><xsl:value-of select="number(@ind2)"/></xsl:otherwise>
              </xsl:choose>
            </xsl:variable>  
    
            <z:index name="title:w title:p any:w">
               <xsl:value-of select="m:subfield[@code='a']"/>
            </z:index>
    
            <z:index name="title:s">
              <xsl:value-of select="substring(m:subfield[@code='a'], $chop)"/>
            </z:index>
    
          </xsl:template> 
          
          

    The output of the above MARCXML and XSLT excerpt would then be:

      
          
            <z:index name="title:w title:p any:w">How to program a computer</z:index>
            <z:index name="title:s">program a computer</z:index>
          
          

    and the record would be sorted in the title index under 'P', not 'H'.

    3.3. DOM Indexing Wizardry

    The names and types of the indexes can be defined in the indexing XSLT stylesheet dynamically according to content in the original XML records, which has opportunities for great power and wizardry as well as grande disaster.

    The following excerpt of a push stylesheet might be a good idea according to your strict control of the XML input format (due to rigorous checking against well-defined and tight RelaxNG or XML Schema's, for example):

          
          <xsl:template name="element-name-indexes">     
           <z:index name="{name()}:w">
            <xsl:value-of select="'1'"/>
           </z:index>
          </xsl:template>
          
         

    This template creates indexes which have the name of the working node of any input XML file, and assigns a '1' to the index. The example query find @attr 1=xyz 1 finds all files which contain at least one xyz XML element. In case you can not control which element names the input files contain, you might ask for disaster and bad karma using this technique.

    One variation over the theme dynamically created indexes will definitely be unwise:

            
          <!-- match on oai xml record root -->
          <xsl:template match="/">    
           <z:record>
          
            <!-- create dynamic index name from input content --> 
            <xsl:variable name="dynamic_content">
             <xsl:value-of select="oai:record/oai:header/oai:identifier"/>
            </xsl:variable>
            
            <!-- create zillions of indexes with unknown names -->
            <z:index name="{$dynamic_content}:w">
             <xsl:value-of select="oai:record/oai:metadata/oai_dc:dc"/>
            </z:index>          
           </z:record>
           
          </xsl:template>
          
         

    Don't be tempted to play too smart tricks with the power of XSLT, the above example will create zillions of indexes with unpredictable names, resulting in severe Zebra index pollution..

    3.4. Debuggig DOM Filter Configurations

    It can be very hard to debug a DOM filter setup due to the many successive MARC syntax translations, XML stream splitting and XSLT transformations involved. As an aid, you have always the power of the -s command line switch to the zebraidz indexing command at your hand:

         zebraidx -s -c zebra.cfg update some_record_stream.xml
        

    This command line simulates indexing and dumps a lot of debug information in the logs, telling exactly which transformations have been applied, how the documents look like after each transformation, and which record ids and terms are send to the indexer.

    idzebra-2.0.44/doc/idzebra-config-2.0.10000644000175000017500000000455711412336537014171 00000000000000'\" t .\" Title: idzebra-config .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 06/29/2010 .\" Manual: [FIXME: manual] .\" Source: zebra 2.0.44 .\" Language: English .\" .TH "IDZEBRA\-CONFIG" "1" "06/29/2010" "zebra 2.0.44" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" idzebra-config \- Script to get information about idzebra .SH "SYNOPSIS" .HP \w'\fBidzebra\-config\fR\ 'u \fBidzebra\-config\fR [\fB\-\-prefix[=\fR\fB\fIDIR\fR\fR\fB]\fR] [\fB\-\-version\fR] [\fB\-\-libs\fR] [\fB\-\-lalibs\fR] [\fB\-\-cflags\fR] [\fB\-\-tab\fR] [\fB\-\-modules\fR] [libraries...] .SH "DESCRIPTION" .PP \fBidzebra\-config\fR is a script that returns information that your own software should use to build software that uses idzebra\&. .PP The following libraries are supported: .PP None .SH "OPTIONS" .PP \-\-prefix[=\fIDIR\fR] .RS 4 Returns prefix of idzebra or assume a different one if DIR is specified\&. .RE .PP \-\-version .RS 4 Returns version of idzebra\&. .RE .PP \-\-libs .RS 4 Library specification be used when linking with idzebra\&. .RE .PP \-\-lalibs .RS 4 Return library specification\&. .RE .PP \-\-cflags .RS 4 Return C Compiler flags\&. .RE .PP \-\-tab .RS 4 Return directory of idzebra tables\&. .RE .PP \-\-modules .RS 4 Return directory for Zebra modules\&. .RE .SH "FILES" .PP /usr/local/bin/idzebra\-config\-2\&.0 .PP /usr/local/lib/libidzebra*2\&.0\&.a .PP /usr/local/include/idzebra\-2\&.0/idzebra/*\&.h idzebra-2.0.44/doc/administration-ranking.html0000644000175000017500000004350611412336551016262 000000000000009. Relevance Ranking and Sorting of Result Sets

    9. Relevance Ranking and Sorting of Result Sets

    9.1. Overview

    The default ordering of a result set is left up to the server, which inside Zebra means sorting in ascending document ID order. This is not always the order humans want to browse the sometimes quite large hit sets. Ranking and sorting comes to the rescue.

    In cases where a good presentation ordering can be computed at indexing time, we can use a fixed static ranking scheme, which is provided for the alvis indexing filter. This defines a fixed ordering of hit lists, independently of the query issued.

    There are cases, however, where relevance of hit set documents is highly dependent on the query processed. Simply put, dynamic relevance ranking sorts a set of retrieved records such that those most likely to be relevant to your request are retrieved first. Internally, Zebra retrieves all documents that satisfy your query, and re-orders the hit list to arrange them based on a measurement of similarity between your query and the content of each record.

    Finally, there are situations where hit sets of documents should be sorted during query time according to the lexicographical ordering of certain sort indexes created at indexing time.

    9.2. Static Ranking

    Zebra uses internally inverted indexes to look up term frequencies in documents. Multiple queries from different indexes can be combined by the binary boolean operations AND, OR and/or NOT (which is in fact a binary AND NOT operation). To ensure fast query execution speed, all indexes have to be sorted in the same order.

    The indexes are normally sorted according to document ID in ascending order, and any query which does not invoke a special re-ranking function will therefore retrieve the result set in document ID order.

    If one defines the

        staticrank: 1 
        

    directive in the main core Zebra configuration file, the internal document keys used for ordering are augmented by a preceding integer, which contains the static rank of a given document, and the index lists are ordered first by ascending static rank, then by ascending document ID. Zero is the ``best'' rank, as it occurs at the beginning of the list; higher numbers represent worse scores.

    The experimental alvis filter provides a directive to fetch static rank information out of the indexed XML records, thus making all hit sets ordered after ascending static rank, and for those doc's which have the same static rank, ordered after ascending doc ID. See Chapter 8, ALVIS XML Record Model and Filter Module for the gory details.

    9.3. Dynamic Ranking

    In order to fiddle with the static rank order, it is necessary to invoke additional re-ranking/re-ordering using dynamic ranking or score functions. These functions return positive integer scores, where highest score is ``best''; hit sets are sorted according to descending scores (in contrary to the index lists which are sorted according to ascending rank number and document ID).

    Dynamic ranking is enabled by a directive like one of the following in the zebra configuration file (use only one of these a time!):

     
        rank: rank-1        # default TDF-IDF like
        rank: rank-static   # dummy do-nothing
        

    Dynamic ranking is done at query time rather than indexing time (this is why we call it ``dynamic ranking'' in the first place ...) It is invoked by adding the BIB-1 relation attribute with value ``relevance'' to the PQF query (that is, @attr 2=102, see also The BIB-1 Attribute Set Semantics, also in HTML). To find all articles with the word Eoraptor in the title, and present them relevance ranked, issue the PQF query:

         @attr 2=102 @attr 1=4 Eoraptor
        

    9.3.1. Dynamically ranking using PQF queries with the 'rank-1' algorithm

    The default rank-1 ranking module implements a TF/IDF (Term Frequecy over Inverse Document Frequency) like algorithm. In contrast to the usual definition of TF/IDF algorithms, which only considers searching in one full-text index, this one works on multiple indexes at the same time. More precisely, Zebra does boolean queries and searches in specific addressed indexes (there are inverted indexes pointing from terms in the dictionary to documents and term positions inside documents). It works like this:

    Query Components

    First, the boolean query is dismantled into its principal components, i.e. atomic queries where one term is looked up in one index. For example, the query

            @attr 2=102 @and @attr 1=1010 Utah @attr 1=1018 Springer
             

    is a boolean AND between the atomic parts

           @attr 2=102 @attr 1=1010 Utah
             

    and

           @attr 2=102 @attr 1=1018 Springer
             

    which gets processed each for itself.

    Atomic hit lists

    Second, for each atomic query, the hit list of documents is computed.

    In this example, two hit lists for each index @attr 1=1010 and @attr 1=1018 are computed.

    Atomic scores

    Third, each document in the hit list is assigned a score (_if_ ranking is enabled and requested in the query) using a TF/IDF scheme.

    In this example, both atomic parts of the query assign the magic @attr 2=102 relevance attribute, and are to be used in the relevance ranking functions.

    It is possible to apply dynamic ranking on only parts of the PQF query:

              @and @attr 2=102 @attr 1=1010 Utah @attr 1=1018 Springer
             

    searches for all documents which have the term 'Utah' on the body of text, and which have the term 'Springer' in the publisher field, and sort them in the order of the relevance ranking made on the body-of-text index only.

    Hit list merging

    Fourth, the atomic hit lists are merged according to the boolean conditions to a final hit list of documents to be returned.

    This step is always performed, independently of the fact that dynamic ranking is enabled or not.

    Document score computation

    Fifth, the total score of a document is computed as a linear combination of the atomic scores of the atomic hit lists

    Ranking weights may be used to pass a value to a ranking algorithm, using the non-standard BIB-1 attribute type 9. This allows one branch of a query to use one value while another branch uses a different one. For example, we can search for utah in the @attr 1=4 index with weight 30, as well as in the @attr 1=1010 index with weight 20:

             @attr 2=102 @or @attr 9=30 @attr 1=4 utah @attr 9=20 @attr 1=1010 city
             

    The default weight is sqrt(1000) ~ 34 , as the Z39.50 standard prescribes that the top score is 1000 and the bottom score is 0, encoded in integers.

    Warning

    The ranking-weight feature is experimental. It may change in future releases of zebra.

    Re-sorting of hit list

    Finally, the final hit list is re-ordered according to scores.

    The rank-1 algorithm does not use the static rank information in the list keys, and will produce the same ordering with or without static ranking enabled.

    Warning

    Dynamic ranking is not compatible with estimated hit sizes, as all documents in a hit set must be accessed to compute the correct placing in a ranking sorted list. Therefore the use attribute setting @attr 2=102 clashes with @attr 9=integer.

    9.3.2. Dynamically ranking CQL queries

    Dynamic ranking can be enabled during sever side CQL query expansion by adding @attr 2=102 chunks to the CQL config file. For example

           relationModifier.relevant		= 2=102
          

    invokes dynamic ranking each time a CQL query of the form

           Z> querytype cql
           Z> f alvis.text =/relevant house
          

    is issued. Dynamic ranking can also be automatically used on specific CQL indexes by (for example) setting

           index.alvis.text                        = 1=text 2=102
          

    which then invokes dynamic ranking each time a CQL query of the form

           Z> querytype cql
           Z> f alvis.text = house
          

    is issued.

    9.4. Sorting

    Zebra sorts efficiently using special sorting indexes (type=s; so each sortable index must be known at indexing time, specified in the configuration of record indexing. For example, to enable sorting according to the BIB-1 Date/time-added-to-db field, one could add the line

            xelm /*/@created               Date/time-added-to-db:s
         

    to any .abs record-indexing configuration file. Similarly, one could add an indexing element of the form

           
          <z:index name="date-modified" type="s">
           <xsl:value-of select="some/xpath"/>
          </z:index>
          

    to any alvis-filter indexing stylesheet.

    Indexing can be specified at searching time using a query term carrying the non-standard BIB-1 attribute-type 7. This removes the need to send a Z39.50 Sort Request separately, and can dramatically improve latency when the client and server are on separate networks. The sorting part of the query is separate from the rest of the query - the actual search specification - and must be combined with it using OR.

    A sorting subquery needs two attributes: an index (such as a BIB-1 type-1 attribute) specifying which index to sort on, and a type-7 attribute whose value is be 1 for ascending sorting, or 2 for descending. The term associated with the sorting attribute is the priority of the sort key, where 0 specifies the primary sort key, 1 the secondary sort key, and so on.

    For example, a search for water, sort by title (ascending), is expressed by the PQF query

         @or @attr 1=1016 water @attr 7=1 @attr 1=4 0
         

    whereas a search for water, sort by title ascending, then date descending would be

         @or @or @attr 1=1016 water @attr 7=1 @attr 1=4 0 @attr 7=2 @attr 1=30 1
         

    Notice the fundamental differences between dynamic ranking and sorting: there can be only one ranking function defined and configured; but multiple sorting indexes can be specified dynamically at search time. Ranking does not need to use specific indexes, so dynamic ranking can be enabled and disabled without re-indexing; whereas, sorting indexes need to be defined before indexing.

    idzebra-2.0.44/doc/generic-ids.html0000644000175000017500000001417311412336551013775 000000000000006. Indexing with General Record IDs

    6. Indexing with General Record IDs

    When using this method you construct an (almost) arbitrary, internal record key based on the contents of the record itself and other system information. If you have a group of records that explicitly associates an ID with each record, this method is convenient. For example, the record format may contain a title or a ID-number - unique within the group. In either case you specify the Z39.50 attribute set and use-attribute location in which this information is stored, and the system looks at that field to determine the identity of the record.

    As before, the record ID is defined by the recordId setting in the configuration file. The value of the record ID specification consists of one or more tokens separated by whitespace. The resulting ID is represented in the index by concatenating the tokens and separating them by ASCII value (1).

    There are three kinds of tokens:

    Internal record info

    The token refers to a key that is extracted from the record. The syntax of this token is ( set , use ), where set is the attribute set name use is the name or value of the attribute.

    System variable

    The system variables are preceded by

            $
           

    and immediately followed by the system variable name, which may one of

    group

    Group name.

    database

    Current database specified.

    type

    Record type.

    Constant string

    A string used as part of the ID — surrounded by single- or double quotes.

    For instance, the sample GILS records that come with the Zebra distribution contain a unique ID in the data tagged Control-Identifier. The data is mapped to the BIB-1 use attribute Identifier-standard (code 1007). To use this field as a record id, specify (bib1,Identifier-standard) as the value of the recordId in the configuration file. If you have other record types that uses the same field for a different purpose, you might add the record type (or group or database name) to the record id of the gils records as well, to prevent matches with other types of records. In this case the recordId might be set like this:

        gils.recordId: $type (bib1,Identifier-standard)
       

    (see Chapter 9, GRS-1 Record Model and Filter Modules for details of how the mapping between elements of your records and searchable attributes is established).

    As for the file record ID case described in the previous section, updating your system is simply a matter of running zebraidx with the update command. However, the update with general keys is considerably slower than with file record IDs, since all files visited must be (re)read to discover their IDs.

    As you might expect, when using the general record IDs method, you can only add or modify existing records with the update command. If you wish to delete records, you must use the, delete command, with a directory as a parameter. This will remove all records that match the files below that root directory.

    idzebra-2.0.44/doc/recordmodel-alvisxslt.xml0000644000175000017500000004576511412332551015775 00000000000000 ALVIS &acro.xml; Record Model and Filter Module The functionality of this record model has been improved and replaced by the DOM &acro.xml; record model, see . The Alvis &acro.xml; record model is considered obsolete, and will eventually be removed from future releases of the &zebra; software. The record model described in this chapter applies to the fundamental, structured &acro.xml; record type alvis, introduced in . This filter has been developed under the ALVIS project funded by the European Community under the "Information Society Technologies" Program (2002-2006).
    ALVIS Record Filter The experimental, loadable Alvis &acro.xml;/&acro.xslt; filter module mod-alvis.so is packaged in the GNU/Debian package libidzebra1.4-mod-alvis. It is invoked by the zebra.cfg configuration statement recordtype.xml: alvis.db/filter_alvis_conf.xml In this example on all data files with suffix *.xml, where the Alvis &acro.xslt; filter configuration file is found in the path db/filter_alvis_conf.xml. The Alvis &acro.xslt; filter configuration file must be valid &acro.xml;. It might look like this (This example is used for indexing and display of &acro.oai; harvested records): <?xml version="1.0" encoding="UTF-8"?> <schemaInfo> <schema name="identity" stylesheet="xsl/identity.xsl" /> <schema name="index" identifier="http://indexdata.dk/zebra/xslt/1" stylesheet="xsl/oai2index.xsl" /> <schema name="dc" stylesheet="xsl/oai2dc.xsl" /> <!-- use split level 2 when indexing whole &acro.oai; Record lists --> <split level="2"/> </schemaInfo> All named stylesheets defined inside schema element tags are for presentation after search, including the indexing stylesheet (which is a great debugging help). The names defined in the name attributes must be unique, these are the literal schema or element set names used in &acro.srw;, &acro.sru; and &acro.z3950; protocol queries. The paths in the stylesheet attributes are relative to zebras working directory, or absolute to file system root. The <split level="2"/> decides where the &acro.xml; Reader shall split the collections of records into individual records, which then are loaded into &acro.dom;, and have the indexing &acro.xslt; stylesheet applied. There must be exactly one indexing &acro.xslt; stylesheet, which is defined by the magic attribute identifier="http://indexdata.dk/zebra/xslt/1".
    ALVIS Internal Record Representation When indexing, an &acro.xml; Reader is invoked to split the input files into suitable record &acro.xml; pieces. Each record piece is then transformed to an &acro.xml; &acro.dom; structure, which is essentially the record model. Only &acro.xslt; transformations can be applied during index, search and retrieval. Consequently, output formats are restricted to whatever &acro.xslt; can deliver from the record &acro.xml; structure, be it other &acro.xml; formats, HTML, or plain text. In case you have libxslt1 running with E&acro.xslt; support, you can use this functionality inside the Alvis filter configuration &acro.xslt; stylesheets.
    ALVIS Canonical Indexing Format The output of the indexing &acro.xslt; stylesheets must contain certain elements in the magic xmlns:z="http://indexdata.dk/zebra/xslt/1" namespace. The output of the &acro.xslt; indexing transformation is then parsed using &acro.dom; methods, and the contained instructions are performed on the magic elements and their subtrees. For example, the output of the command xsltproc xsl/oai2index.xsl one-record.xml might look like this: <?xml version="1.0" encoding="UTF-8"?> <z:record xmlns:z="http://indexdata.dk/zebra/xslt/1" z:id="oai:JTRS:CP-3290---Volume-I" z:rank="47896"> <z:index name="oai_identifier" type="0"> oai:JTRS:CP-3290---Volume-I</z:index> <z:index name="oai_datestamp" type="0">2004-07-09</z:index> <z:index name="oai_setspec" type="0">jtrs</z:index> <z:index name="dc_all" type="w"> <z:index name="dc_title" type="w">Proceedings of the 4th International Conference and Exhibition: World Congress on Superconductivity - Volume I</z:index> <z:index name="dc_creator" type="w">Kumar Krishen and *Calvin Burnham, Editors</z:index> </z:index> </z:record> This means the following: From the original &acro.xml; file one-record.xml (or from the &acro.xml; record &acro.dom; of the same form coming from a split input file), the indexing stylesheet produces an indexing &acro.xml; record, which is defined by the record element in the magic namespace xmlns:z="http://indexdata.dk/zebra/xslt/1". &zebra; uses the content of z:id="oai:JTRS:CP-3290---Volume-I" as internal record ID, and - in case static ranking is set - the content of z:rank="47896" as static rank. Following the discussion in we see that this records is internally ordered lexicographically according to the value of the string oai:JTRS:CP-3290---Volume-I47896. In this example, the following literal indexes are constructed: oai_identifier oai_datestamp oai_setspec dc_all dc_title dc_creator where the indexing type is defined in the type attribute (any value from the standard configuration file default.idx will do). Finally, any text() node content recursively contained inside the index will be filtered through the appropriate char map for character normalization, and will be inserted in the index. Specific to this example, we see that the single word oai:JTRS:CP-3290---Volume-I will be literal, byte for byte without any form of character normalization, inserted into the index named oai:identifier, the text Kumar Krishen and *Calvin Burnham, Editors will be inserted using the w character normalization defined in default.idx into the index dc:creator (that is, after character normalization the index will keep the individual words kumar, krishen, and, calvin, burnham, and editors), and finally both the texts Proceedings of the 4th International Conference and Exhibition: World Congress on Superconductivity - Volume I and Kumar Krishen and *Calvin Burnham, Editors will be inserted into the index dc:all using the same character normalization map w. Finally, this example configuration can be queried using &acro.pqf; queries, either transported by &acro.z3950;, (here using a yaz-client) open localhost:9999 Z> elem dc Z> form xml Z> Z> f @attr 1=dc_creator Kumar Z> scan @attr 1=dc_creator adam Z> Z> f @attr 1=dc_title @attr 4=2 "proceeding congress superconductivity" Z> scan @attr 1=dc_title abc ]]> or the proprietary extensions x-pquery and x-pScanClause to &acro.sru;, and &acro.srw; See for more information on &acro.sru;/&acro.srw; configuration, and or the &yaz; &acro.cql; section for the details or the &yaz; frontend server. Notice that there are no *.abs, *.est, *.map, or other &acro.grs1; filter configuration files involves in this process, and that the literal index names are used during search and retrieval.
    ALVIS Record Model Configuration
    ALVIS Indexing Configuration As mentioned above, there can be only one indexing stylesheet, and configuration of the indexing process is a synonym of writing an &acro.xslt; stylesheet which produces &acro.xml; output containing the magic elements discussed in . Obviously, there are million of different ways to accomplish this task, and some comments and code snippets are in order to lead our Padawan's on the right track to the good side of the force. Stylesheets can be written in the pull or the push style: pull means that the output &acro.xml; structure is taken as starting point of the internal structure of the &acro.xslt; stylesheet, and portions of the input &acro.xml; are pulled out and inserted into the right spots of the output &acro.xml; structure. On the other side, push &acro.xslt; stylesheets are recursively calling their template definitions, a process which is commanded by the input &acro.xml; structure, and are triggered to produce some output &acro.xml; whenever some special conditions in the input stylesheets are met. The pull type is well-suited for input &acro.xml; with strong and well-defined structure and semantics, like the following &acro.oai; indexing example, whereas the push type might be the only possible way to sort out deeply recursive input &acro.xml; formats. A pull stylesheet example used to index &acro.oai; harvested records could use some of the following template definitions: ]]> Notice also, that the names and types of the indexes can be defined in the indexing &acro.xslt; stylesheet dynamically according to content in the original &acro.xml; records, which has opportunities for great power and wizardry as well as grande disaster. The following excerpt of a push stylesheet might be a good idea according to your strict control of the &acro.xml; input format (due to rigorous checking against well-defined and tight RelaxNG or &acro.xml; Schema's, for example): ]]> This template creates indexes which have the name of the working node of any input &acro.xml; file, and assigns a '1' to the index. The example query find @attr 1=xyz 1 finds all files which contain at least one xyz &acro.xml; element. In case you can not control which element names the input files contain, you might ask for disaster and bad karma using this technique. One variation over the theme dynamically created indexes will definitely be unwise: ]]> Don't be tempted to cross the line to the dark side of the force, Padawan; this leads to suffering and pain, and universal disintegration of your project schedule.
    ALVIS Exchange Formats An exchange format can be anything which can be the outcome of an &acro.xslt; transformation, as far as the stylesheet is registered in the main Alvis &acro.xslt; filter configuration file, see . In principle anything that can be expressed in &acro.xml;, HTML, and TEXT can be the output of a schema or element set directive during search, as long as the information comes from the original input record &acro.xml; &acro.dom; tree (and not the transformed and indexed &acro.xml;!!). In addition, internal administrative information from the &zebra; indexer can be accessed during record retrieval. The following example is a summary of the possibilities: ]]>
    ALVIS Filter &acro.oai; Indexing Example The source code tarball contains a working Alvis filter example in the directory examples/alvis-oai/, which should get you started. More example data can be harvested from any &acro.oai; compliant server, see details at the &acro.oai; http://www.openarchives.org/ web site, and the community links at http://www.openarchives.org/community/index.html. There is a tutorial found at http://www.oaforum.org/tutorial/.
    idzebra-2.0.44/doc/tutorial-oai-sru-zebra-indexes.html0000644000175000017500000001137311412336551017561 000000000000005. Investigating the content of the indexes

    5. Investigating the content of the indexes

    How does the magic work? What is inside the indexes? Why is a certain record found by a search, and another not?. The answer is in the inverted indexes. You can easily investigate them using the special Zebra schema zebra::index::fieldname. In this example you can see that the title index has both word (type :w) and phrase (type :p) indexed fields, http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::index::title

    But where in the indexes did the term match for the query occur? Easily answered with the special Zebra schema zebra::snippet. The matching terms are encapsulated by <s> tags. http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::snippet

    How can I refine my search? Which interesting search terms are found inside my hit set? Try the special Zebra schema zebra::facet::fieldname:type. In this case, we investigate additional search terms for the title:w index. http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::facet::title:w

    One can ask for multiple facets. Here, we want them from phrase indexes of type :p. http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::facet::publisher:p,title:p

    idzebra-2.0.44/doc/querymodel-cql-to-pqf.html0000644000175000017500000001012511412336551015744 000000000000004. Server Side CQL to PQF Query Translation

    4. Server Side CQL to PQF Query Translation

    Using the <cql2rpn>l2rpn.txt</cql2rpn> YAZ Frontend Virtual Hosts option, one can configure the YAZ Frontend CQL-to-PQF converter, specifying the interpretation of various CQL indexes, relations, etc. in terms of Type-1 query attributes.

    For example, using server-side CQL-to-PQF conversion, one might query a zebra server like this:

        
         yaz-client localhost:9999
         Z> querytype cql
         Z> find text=(plant and soil)
         
        

    and - if properly configured - even static relevance ranking can be performed using CQL query syntax:

        
         Z> find text = /relevant (plant and soil)
         
         

    By the way, the same configuration can be used to search using client-side CQL-to-PQF conversion: (the only difference is querytype cql2rpn instead of querytype cql, and the call specifying a local conversion file)

        
         yaz-client -q local/cql2pqf.txt localhost:9999
         Z> querytype cql2rpn
         Z> find text=(plant and soil)
         
         

    Exhaustive information can be found in the Section CQL to RPN conversion" in the YAZ manual.

    idzebra-2.0.44/doc/zebraidx.xml0000644000175000017500000002026311412332551013241 00000000000000 %local; %entities; %idcommon; ]> zebra &version; zebraidx 1 zebraidx &zebra; Administrative Tool zebraidx command file DESCRIPTION zebraidx allows you to insert, delete or updates records in &zebra;. zebraidx accepts a set options (see below) and exactly one command (mandatory). COMMANDS update directory Update the register with the files contained in directory. If no directory is provided, a list of files is read from stdin. See Administration in the &zebra; Manual. delete directory Remove the records corresponding to the files found under directory from the register. adelete directory Remove the records corresponding to the files found under directory from the register. Unlike command delete this command does not fail if a record does not exist (but which is attempted deleted). commit Write the changes resulting from the last update commands to the register. This command is only available if the use of shadow register files is enabled (see Shadow Registers in the &zebra; Manual). clean Clean shadow files and "forget" changes. create database Create database. drop database Drop database (delete database). init Deletes an entire register (all files in shadow+register areas). OPTIONS -t type Update all files as type. Currently, the types supported are text, alvis and grs.subtype. Generally, it is probably advisable to specify the record types in the zebra.cfg file (see Record Types in the &zebra; manual), to avoid confusion at subsequent updates. -c config-file Read the configuration file config-file instead of zebra.cfg. -g group Update the files according to the group settings for group (see &zebra; Configuration File in the &zebra; manual). -d database The records located should be associated with the database name database for access through the &acro.z3950; server. -l file Write log messages to file instead of stderr. -m mbytes Use mbytes of memory before flushing keys to background storage. This setting affects performance when updating large databases. -L Makes zebraidx skip symbolic links. By default, zebraidx follows them. -n Disable the use of shadow registers for this operation (see Shadow Registers in the &zebra; manual). -s Show analysis of the indexing process. The maintenance program works in a read-only mode and doesn't change the state of the index. This options is very useful when you wish to test a new profile. -V Show &zebra; version. -v level Set the log level to level. level should be one of none, debug, and all. FILES zebra.cfg SEE ALSO zebrasrv 8 idzebra-2.0.44/doc/tutorial-oai-sru-searches.html0000644000175000017500000000766711412336551016631 000000000000004. More interesting searches

    4. More interesting searches

    The OAI indexing example defines many different index names, a study of the conf/oai2index.xsl stylesheet reveals the following word type indexes (i.e. those with suffix :w):

         any:w 
         title:w
         author:w
         subject:w
         description:w
         contributor:w
         publisher:w
         language:w
         rights:w
        

    By default, searches do access the any:w index, but we can direct searches to any access point by constructing the correct PQF query. For example, to search in titles only, we use http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=@attr 1=title the&startRecord=1&maximumRecords=1&recordSchema=dc

    Similar we can direct searches to the other indexes defined. Or we can create boolean combinations of searches on different indexes. In this case we search for the in title and for fish in description using the query @and @attr 1=title the @attr 1=description fish. http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=@and @attr 1=title the @attr 1=description fish&startRecord=1&maximumRecords=1&recordSchema=dc

    idzebra-2.0.44/doc/querymodel.xml0000644000175000017500000024773311412332551013634 00000000000000 Query Model
    Query Model Overview
    Query Languages &zebra; is born as a networking Information Retrieval engine adhering to the international standards &acro.z3950; and &acro.sru;, and implement the type-1 Reverse Polish Notation (&acro.rpn;) query model defined there. Unfortunately, this model has only defined a binary encoded representation, which is used as transport packaging in the &acro.z3950; protocol layer. This representation is not human readable, nor defines any convenient way to specify queries. Since the type-1 (&acro.rpn;) query structure has no direct, useful string representation, every client application needs to provide some form of mapping from a local query notation or representation to it.
    Prefix Query Format (&acro.pqf;) Index Data has defined a textual representation in the Prefix Query Format, short &acro.pqf;, which maps one-to-one to binary encoded type-1 &acro.rpn; queries. &acro.pqf; has been adopted by other parties developing &acro.z3950; software, and is often referred to as Prefix Query Notation, or in short &acro.pqn;. See for further explanations and descriptions of &zebra;'s capabilities.
    Common Query Language (&acro.cql;) The query model of the type-1 &acro.rpn;, expressed in &acro.pqf;/&acro.pqn; is natively supported. On the other hand, the default &acro.sru; web services Common Query Language &acro.cql; is not natively supported. &zebra; can be configured to understand and map &acro.cql; to &acro.pqf;. See .
    Operation types &zebra; supports all of the three different &acro.z3950;/&acro.sru; operations defined in the standards: explain, search, and scan. A short description of the functionality and purpose of each is quite in order here.
    Explain Operation The syntax of &acro.z3950;/&acro.sru; queries is well known to any client, but the specific semantics - taking into account a particular servers functionalities and abilities - must be discovered from case to case. Enters the explain operation, which provides the means for learning which fields (also called indexes or access points) are provided, which default parameter the server uses, which retrieve document formats are defined, and which specific parts of the general query model are supported. The &acro.z3950; embeds the explain operation by performing a search in the magic IR-Explain-1 database; see . In &acro.sru;, explain is an entirely separate operation, which returns an ZeeRex &acro.xml; record according to the structure defined by the protocol. In both cases, the information gathered through explain operations can be used to auto-configure a client user interface to the servers capabilities.
    Scan Operation The scan operation is a helper functionality, which operates on one index or access point a time. It provides the means to investigate the content of specific indexes. Scanning an index returns a handful of terms actually found in the indexes, and in addition the scan operation returns the number of documents indexed by each term. A search client can use this information to propose proper spelling of search terms, to auto-fill search boxes, or to display controlled vocabularies.
    &acro.rpn; queries and semantics The &acro.pqf; grammar is documented in the &yaz; manual, and shall not be repeated here. This textual &acro.pqf; representation is not transmitted to &zebra; during search, but it is in the client mapped to the equivalent &acro.z3950; binary query parse tree.
    &acro.rpn; tree structure The &acro.rpn; parse tree - or the equivalent textual representation in &acro.pqf; - may start with one specification of the attribute set used. Following is a query tree, which consists of atomic query parts (&acro.apt;) or named result sets, eventually paired by boolean binary operators, and finally recursively combined into complex query trees.
    Attribute sets Attribute sets define the exact meaning and semantics of queries issued. &zebra; comes with some predefined attribute set definitions, others can easily be defined and added to the configuration. Attribute sets predefined in &zebra; Attribute set &acro.pqf; notation (Short hand) Status Notes Explain exp-1 Special attribute set used on the special automagic IR-Explain-1 database to gain information on server capabilities, database names, and database and semantics. predefined &acro.bib1; bib-1 Standard &acro.pqf; query language attribute set which defines the semantics of &acro.z3950; searching. In addition, all of the non-use attributes (types 2-14) define the hard-wired &zebra; internal query processing. default GILS gils Extension to the &acro.bib1; attribute set. predefined
    The use attributes (type 1) mappings the predefined attribute sets are found in the attribute set configuration files tab/*.att. The &zebra; internal query processing is modeled after the &acro.bib1; attribute set, and the non-use attributes type 2-6 are hard-wired in. It is therefore essential to be familiar with .
    Boolean operators A pair of sub query trees, or of atomic queries, is combined using the standard boolean operators into new query trees. Thus, boolean operators are always internal nodes in the query tree. Boolean operators Keyword Operator Description @and binary AND operator Set intersection of two atomic queries hit sets @or binary OR operator Set union of two atomic queries hit sets @not binary AND NOT operator Set complement of two atomic queries hit sets @prox binary PROXIMITY operator Set intersection of two atomic queries hit sets. In addition, the intersection set is purged for all documents which do not satisfy the requested query term proximity. Usually a proper subset of the AND operation.
    For example, we can combine the terms information and retrieval into different searches in the default index of the default attribute set as follows. Querying for the union of all documents containing the terms information OR retrieval: Z> find @or information retrieval Querying for the intersection of all documents containing the terms information AND retrieval: The hit set is a subset of the corresponding OR query. Z> find @and information retrieval Querying for the intersection of all documents containing the terms information AND retrieval, taking proximity into account: The hit set is a subset of the corresponding AND query (see the &acro.pqf; grammar for details on the proximity operator): Z> find @prox 0 3 0 2 k 2 information retrieval Querying for the intersection of all documents containing the terms information AND retrieval, in the same order and near each other as described in the term list. The hit set is a subset of the corresponding PROXIMITY query. Z> find "information retrieval"
    Atomic queries (&acro.apt;) Atomic queries are the query parts which work on one access point only. These consist of an attribute list followed by a single term or a quoted term list, and are often called Attributes-Plus-Terms (&acro.apt;) queries. Atomic (&acro.apt;) queries are always leaf nodes in the &acro.pqf; query tree. UN-supplied non-use attributes types 2-12 are either inherited from higher nodes in the query tree, or are set to &zebra;'s default values. See for details. Atomic queries (&acro.apt;) Name Type Notes attribute list List of orthogonal attributes Any of the orthogonal attribute types may be omitted, these are inherited from higher query tree nodes, or if not inherited, are set to the default &zebra; configuration values. term single term or quoted term list Here the search terms or list of search terms is added to the query
    Querying for the term information in the default index using the default attribute set, the server choice of access point/index, and the default non-use attributes. Z> find information Equivalent query fully specified including all default values: Z> find @attrset bib-1 @attr 1=1017 @attr 2=3 @attr 3=3 @attr 4=1 @attr 5=100 @attr 6=1 information Finding all documents which have the term debussy in the title field. Z> find @attr 1=4 debussy The scan operation is only supported with atomic &acro.apt; queries, as it is bound to one access point at a time. Boolean query trees are not allowed during scan. For example, we might want to scan the title index, starting with the term debussy, and displaying this and the following terms in lexicographic order: Z> scan @attr 1=4 debussy
    Named Result Sets Named result sets are supported in &zebra;, and result sets can be used as operands without limitations. It follows that named result sets are leaf nodes in the &acro.pqf; query tree, exactly as atomic &acro.apt; queries are. After the execution of a search, the result set is available at the server, such that the client can use it for subsequent searches or retrieval requests. The Z30.50 standard actually stresses the fact that result sets are volatile. It may cease to exist at any time point after search, and the server will send a diagnostic to the effect that the requested result set does not exist any more. Defining a named result set and re-using it in the next query, using yaz-client. Notice that the client, not the server, assigns the string '1' to the named result set. Z> f @attr 1=4 mozart ... Number of hits: 43, setno 1 ... Z> f @and @set 1 @attr 1=4 amadeus ... Number of hits: 14, setno 2 Named result sets are only supported by the &acro.z3950; protocol. The &acro.sru; web service is stateless, and therefore the notion of named result sets does not exist when accessing a &zebra; server by the &acro.sru; protocol.
    &zebra;'s special access point of type 'string' The numeric use (type 1) attribute is usually referred to from a given attribute set. In addition, &zebra; let you use any internal index name defined in your configuration as use attribute value. This is a great feature for debugging, and when you do not need the complexity of defined use attribute values. It is the preferred way of accessing &zebra; indexes directly. Finding all documents which have the term list "information retrieval" in an &zebra; index, using its internal full string name. Scanning the same index. Z> find @attr 1=sometext "information retrieval" Z> scan @attr 1=sometext aterm Searching or scanning the bib-1 use attribute 54 using its string name: Z> find @attr 1=Code-language eng Z> scan @attr 1=Code-language "" It is possible to search in any silly string index - if it's defined in your indexing rules and can be parsed by the &acro.pqf; parser. This is definitely not the recommended use of this facility, as it might confuse your users with some very unexpected results. Z> find @attr 1=silly/xpath/alike[@index]/name "information retrieval" See also for details, and for the &acro.sru; &acro.pqf; query extension using string names as a fast debugging facility.
    &zebra;'s special access point of type 'XPath' for &acro.grs1; filters As we have seen above, it is possible (albeit seldom a great idea) to emulate XPath 1.0 based search by defining use (type 1) string attributes which in appearance resemble XPath queries. There are two problems with this approach: first, the XPath-look-alike has to be defined at indexing time, no new undefined XPath queries can entered at search time, and second, it might confuse users very much that an XPath-alike index name in fact gets populated from a possible entirely different &acro.xml; element than it pretends to access. When using the &acro.grs1; Record Model (see ), we have the possibility to embed life XPath expressions in the &acro.pqf; queries, which are here called use (type 1) xpath attributes. You must enable the xpath enable directive in your .abs configuration files. Only a very restricted subset of the XPath 1.0 standard is supported as the &acro.grs1; record model is simpler than a full &acro.xml; &acro.dom; structure. See the following examples for possibilities. Finding all documents which have the term "content" inside a text node found in a specific &acro.xml; &acro.dom; subtree, whose starting element is addressed by XPath. Z> find @attr 1=/root content Z> find @attr 1=/root/first content Notice that the XPath must be absolute, i.e., must start with '/', and that the XPath descendant-or-self axis followed by a text node selection text() is implicitly appended to the stated XPath. It follows that the above searches are interpreted as: Z> find @attr 1=/root//text() content Z> find @attr 1=/root/first//text() content Searching inside attribute strings is possible: Z> find @attr 1=/link/@creator morten Filter the addressing XPath by a predicate working on exact string values in attributes (in the &acro.xml; sense) can be done: return all those docs which have the term "english" contained in one of all text sub nodes of the subtree defined by the XPath /record/title[@lang='en']. And similar predicate filtering. Z> find @attr 1=/record/title[@lang='en'] english Z> find @attr 1=/link[@creator='sisse'] sibelius Z> find @attr 1=/link[@creator='sisse']/description[@xml:lang='da'] sibelius Combining numeric indexes, boolean expressions, and xpath based searches is possible: Z> find @attr 1=/record/title @and foo bar Z> find @and @attr 1=/record/title foo @attr 1=4 bar Escaping &acro.pqf; keywords and other non-parseable XPath constructs with '{ }' to prevent client-side &acro.pqf; parsing syntax errors: Z> find @attr {1=/root/first[@attr='danish']} content Z> find @attr {1=/record/@set} oai It is worth mentioning that these dynamic performed XPath queries are a performance bottleneck, as no optimized specialized indexes can be used. Therefore, avoid the use of this facility when speed is essential, and the database content size is medium to large.
    Explain Attribute Set The &acro.z3950; standard defines the Explain attribute set Exp-1, which is used to discover information about a server's search semantics and functional capabilities &zebra; exposes a "classic" Explain database by base name IR-Explain-1, which is populated with system internal information. The attribute-set exp-1 consists of a single use attribute (type 1). In addition, the non-Use &acro.bib1; attributes, that is, the types Relation, Position, Structure, Truncation, and Completeness are imported from the &acro.bib1; attribute set, and may be used within any explain query.
    Use Attributes (type = 1) The following Explain search attributes are supported: ExplainCategory (@attr 1=1), DatabaseName (@attr 1=3), DateAdded (@attr 1=9), DateChanged(@attr 1=10). A search in the use attribute ExplainCategory supports only these predefined values: CategoryList, TargetInfo, DatabaseInfo, AttributeDetails. See tab/explain.att and the &acro.z3950; standard for more information.
    Explain searches with yaz-client Classic Explain only defines retrieval of Explain information via ASN.1. Practically no &acro.z3950; clients supports this. Fortunately they don't have to - &zebra; allows retrieval of this information in other formats: &acro.sutrs;, &acro.xml;, &acro.grs1; and ASN.1 Explain. List supported categories to find out which explain commands are supported: Z> base IR-Explain-1 Z> find @attr exp1 1=1 categorylist Z> form sutrs Z> show 1+2 Get target info, that is, investigate which databases exist at this server endpoint: Z> base IR-Explain-1 Z> find @attr exp1 1=1 targetinfo Z> form xml Z> show 1+1 Z> form grs-1 Z> show 1+1 Z> form sutrs Z> show 1+1 List all supported databases, the number of hits is the number of databases found, which most commonly are the following two: the Default and the IR-Explain-1 databases. Z> base IR-Explain-1 Z> find @attr exp1 1=1 databaseinfo Z> form sutrs Z> show 1+2 Get database info record for database Default. Z> base IR-Explain-1 Z> find @and @attr exp1 1=1 databaseinfo @attr exp1 1=3 Default Identical query with explicitly specified attribute set: Z> base IR-Explain-1 Z> find @attrset exp1 @and @attr 1=1 databaseinfo @attr 1=3 Default Get attribute details record for database Default. This query is very useful to study the internal &zebra; indexes. If records have been indexed using the alvis &acro.xslt; filter, the string representation names of the known indexes can be found. Z> base IR-Explain-1 Z> find @and @attr exp1 1=1 attributedetails @attr exp1 1=3 Default Identical query with explicitly specified attribute set: Z> base IR-Explain-1 Z> find @attrset exp1 @and @attr 1=1 attributedetails @attr 1=3 Default
    &acro.bib1; Attribute Set Most of the information contained in this section is an excerpt of the ATTRIBUTE SET &acro.bib1; (&acro.z3950;-1995) SEMANTICS found at . The &acro.bib1; Attribute Set Semantics from 1995, also in an updated &acro.bib1; Attribute Set version from 2003. Index Data is not the copyright holder of this information, except for the configuration details, the listing of &zebra;'s capabilities, and the example queries.
    Use Attributes (type 1) A use attribute specifies an access point for any atomic query. These access points are highly dependent on the attribute set used in the query, and are user configurable using the following default configuration files: tab/bib1.att, tab/dan1.att, tab/explain.att, and tab/gils.att. For example, some few &acro.bib1; use attributes from the tab/bib1.att are: att 1 Personal-name att 2 Corporate-name att 3 Conference-name att 4 Title ... att 1009 Subject-name-personal att 1010 Body-of-text att 1011 Date/time-added-to-db ... att 1016 Any att 1017 Server-choice att 1018 Publisher ... att 1035 Anywhere att 1036 Author-Title-Subject New attribute sets can be added by adding new tab/*.att configuration files, which need to be sourced in the main configuration zebra.cfg. In addition, &zebra; allows the access of internal index names and dynamic XPath as use attributes; see and . Phrase search for information retrieval in the title-register, scanning the same register afterwards: Z> find @attr 1=4 "information retrieval" Z> scan @attr 1=4 information
    &zebra; general Bib1 Non-Use Attributes (type 2-6)
    Relation Attributes (type 2) Relation attributes describe the relationship of the access point (left side of the relation) to the search term as qualified by the attributes (right side of the relation), e.g., Date-publication <= 1975. Relation Attributes (type 2) Relation Value Notes Less than 1 supported Less than or equal 2 supported Equal 3 default Greater or equal 4 supported Greater than 5 supported Not equal 6 unsupported Phonetic 100 unsupported Stem 101 unsupported Relevance 102 supported AlwaysMatches 103 supported *
    AlwaysMatches searches are only supported if alwaysmatches indexing has been enabled. See The relation attributes 1-5 are supported and work exactly as expected. All ordering operations are based on a lexicographical ordering, except when the structure attribute numeric (109) is used. In this case, ordering is numerical. See . Z> find @attr 1=Title @attr 2=1 music ... Number of hits: 11745, setno 1 ... Z> find @attr 1=Title @attr 2=2 music ... Number of hits: 11771, setno 2 ... Z> find @attr 1=Title @attr 2=3 music ... Number of hits: 532, setno 3 ... Z> find @attr 1=Title @attr 2=4 music ... Number of hits: 11463, setno 4 ... Z> find @attr 1=Title @attr 2=5 music ... Number of hits: 11419, setno 5 The relation attribute Relevance (102) is supported, see for full information. Ranked search for information retrieval in the title-register: Z> find @attr 1=4 @attr 2=102 "information retrieval" The relation attribute AlwaysMatches (103) is in the default configuration supported in conjecture with structure attribute Phrase (1) (which may be omitted by default). It can be configured to work with other structure attributes, see the configuration file tab/default.idx and . AlwaysMatches (103) is a great way to discover how many documents have been indexed in a given field. The search term is ignored, but needed for correct &acro.pqf; syntax. An empty search term may be supplied. Z> find @attr 1=Title @attr 2=103 "" Z> find @attr 1=Title @attr 2=103 @attr 4=1 ""
    Position Attributes (type 3) The position attribute specifies the location of the search term within the field or subfield in which it appears. Position Attributes (type 3) Position Value Notes First in field 1 supported * First in subfield 2 supported * Any position in field 3 default
    &zebra; only supports first-in-field seaches if the firstinfield is enabled for the index Refer to . &zebra; does not distinguish between first in field and first in subfield. They result in the same hit count. Searching for first position in (sub)field in only supported in &zebra; 2.0.2 and later.
    Structure Attributes (type 4) The structure attribute specifies the type of search term. This causes the search to be mapped on different &zebra; internal indexes, which must have been defined at index time. The possible values of the structure attribute (type 4) can be defined using the configuration file tab/default.idx. The default configuration is summarized in this table. Structure Attributes (type 4) Structure Value Notes Phrase 1 default Word 2 supported Key 3 supported Year 4 supported Date (normalized) 5 supported Word list 6 supported Date (un-normalized) 100 unsupported Name (normalized) 101 unsupported Name (un-normalized) 102 unsupported Structure 103 unsupported Urx 104 supported Free-form-text 105 supported Document-text 106 supported Local-number 107 supported String 108 unsupported Numeric string 109 supported
    The structure attribute values Word list (6) is supported, and maps to the boolean AND combination of words supplied. The word list is useful when Google-like bag-of-word queries need to be translated from a GUI query language to &acro.pqf;. For example, the following queries are equivalent: Z> find @attr 1=Title @attr 4=6 "mozart amadeus" Z> find @attr 1=Title @and mozart amadeus The structure attribute value Free-form-text (105) and Document-text (106) are supported, and map both to the boolean OR combination of words supplied. The following queries are equivalent: Z> find @attr 1=Body-of-text @attr 4=105 "bach salieri teleman" Z> find @attr 1=Body-of-text @attr 4=106 "bach salieri teleman" Z> find @attr 1=Body-of-text @or bach @or salieri teleman This OR list of terms is very useful in combination with relevance ranking: Z> find @attr 1=Body-of-text @attr 2=102 @attr 4=105 "bach salieri teleman" The structure attribute value Local number (107) is supported, and maps always to the &zebra; internal document ID, irrespectively which use attribute is specified. The following queries have exactly the same unique record in the hit set: Z> find @attr 4=107 10 Z> find @attr 1=4 @attr 4=107 10 Z> find @attr 1=1010 @attr 4=107 10 In the GILS schema (gils.abs), the west-bounding-coordinate is indexed as type n, and is therefore searched by specifying structure=Numeric String. To match all those records with west-bounding-coordinate greater than -114 we use the following query: Z> find @attr 4=109 @attr 2=5 @attr gils 1=2038 -114 The exact mapping between &acro.pqf; queries and &zebra; internal indexes and index types is explained in .
    Truncation Attributes (type = 5) The truncation attribute specifies whether variations of one or more characters are allowed between search term and hit terms, or not. Using non-default truncation attributes will broaden the document hit set of a search query. Truncation Attributes (type 5) Truncation Value Notes Right truncation 1 supported Left truncation 2 supported Left and right truncation 3 supported Do not truncate 100 default Process # in search term 101 supported RegExpr-1 102 supported RegExpr-2 103 supported
    The truncation attribute values 1-3 perform the obvious way: Z> scan @attr 1=Body-of-text schnittke ... * schnittke (81) schnittkes (31) schnittstelle (1) ... Z> find @attr 1=Body-of-text @attr 5=1 schnittke ... Number of hits: 95, setno 7 ... Z> find @attr 1=Body-of-text @attr 5=2 schnittke ... Number of hits: 81, setno 6 ... Z> find @attr 1=Body-of-text @attr 5=3 schnittke ... Number of hits: 95, setno 8 The truncation attribute value Process # in search term (101) is a poor-man's regular expression search. It maps each # to .*, and performs then a Regexp-1 (102) regular expression search. The following two queries are equivalent: Z> find @attr 1=Body-of-text @attr 5=101 schnit#ke Z> find @attr 1=Body-of-text @attr 5=102 schnit.*ke ... Number of hits: 89, setno 10 The truncation attribute value Regexp-1 (102) is a normal regular search, see for details. Z> find @attr 1=Body-of-text @attr 5=102 schnit+ke Z> find @attr 1=Body-of-text @attr 5=102 schni[a-t]+ke The truncation attribute value Regexp-2 (103) is a &zebra; specific extension which allows fuzzy matches. One single error in spelling of search terms is allowed, i.e., a document is hit if it includes a term which can be mapped to the used search term by one character substitution, addition, deletion or change of position. Z> find @attr 1=Body-of-text @attr 5=100 schnittke ... Number of hits: 81, setno 14 ... Z> find @attr 1=Body-of-text @attr 5=103 schnittke ... Number of hits: 103, setno 15 ...
    Completeness Attributes (type = 6) The Completeness Attributes (type = 6) is used to specify that a given search term or term list is either part of the terms of a given index/field (Incomplete subfield (1)), or is what literally is found in the entire field's index (Complete field (3)). Completeness Attributes (type = 6) Completeness Value Notes Incomplete subfield 1 default Complete subfield 2 deprecated Complete field 3 supported
    The Completeness Attributes (type = 6) is only partially and conditionally supported in the sense that it is ignored if the hit index is not of structure type="w" or type="p". Incomplete subfield (1) is the default, and makes &zebra; use register type="w", whereas Complete field (3) triggers search and scan in index type="p". The Complete subfield (2) is a reminiscent from the happy &acro.marc; binary format days. &zebra; does not support it, but maps silently to Complete field (3). The exact mapping between &acro.pqf; queries and &zebra; internal indexes and index types is explained in .
    Extended &zebra; &acro.rpn; Features The &zebra; internal query engine has been extended to specific needs not covered by the bib-1 attribute set query model. These extensions are non-standard and non-portable: most functional extensions are modeled over the bib-1 attribute set, defining type 7 and higher values. There are also the special string type index names for the idxpath attribute set.
    &zebra; specific retrieval of all records &zebra; defines a hardwired string index name called _ALLRECORDS. It matches any record contained in the database, if used in conjunction with the relation attribute AlwaysMatches (103). The _ALLRECORDS index name is used for total database export. The search term is ignored, it may be empty. Z> find @attr 1=_ALLRECORDS @attr 2=103 "" Combination with other index types can be made. For example, to find all records which are not indexed in the Title register, issue one of the two equivalent queries: Z> find @not @attr 1=_ALLRECORDS @attr 2=103 "" @attr 1=Title @attr 2=103 "" Z> find @not @attr 1=_ALLRECORDS @attr 2=103 "" @attr 1=4 @attr 2=103 "" The special string index _ALLRECORDS is experimental, and the provided functionality and syntax may very well change in future releases of &zebra;.
    &zebra; specific Scan Extensions to all Attribute Sets &zebra; extends the Bib1 attribute types, and these extensions are recognized regardless of attribute set used in a scan operation query. &zebra; Scan Attribute Extensions Name Type Operation &zebra; version Result Set Narrow 8 scan 1.3 Approximative Limit 12 scan 2.0.20
    &zebra; Extension Result Set Narrow (type 8) If attribute Result Set Narrow (type 8) is given for scan, the value is the name of a result set. Each hit count in scan is @and'ed with the result set given. Consider for example the case of scanning all title fields around the scanterm mozart, then refining the scan by issuing a filtering query for amadeus to restrict the scan to the result set of the query: Z> scan @attr 1=4 mozart ... * mozart (43) mozartforskningen (1) mozartiana (1) mozarts (16) ... Z> f @attr 1=4 amadeus ... Number of hits: 15, setno 2 ... Z> scan @attr 1=4 @attr 8=2 mozart ... * mozart (14) mozartforskningen (0) mozartiana (0) mozarts (1) ... &zebra; 2.0.2 and later is able to skip 0 hit counts. This, however, is known not to scale if the number of terms to skip is high. This most likely will happen if the result set is small (and result in many 0 hits).
    &zebra; Extension Approximative Limit (type 12) The &zebra; Extension Approximative Limit (type 12) is a way to enable approximate hit counts for scan hit counts, in the same way as for search hit counts.
    &zebra; special &acro.idxpath; Attribute Set for &acro.grs1; indexing The attribute-set idxpath consists of a single Use (type 1) attribute. All non-use attributes behave as normal. This feature is enabled when defining the xpath enable option in the &acro.grs1; filter *.abs configuration files. If one wants to use the special idxpath numeric attribute set, the main &zebra; configuration file zebra.cfg directive attset: idxpath.att must be enabled. The idxpath is deprecated, may not be supported in future &zebra; versions, and should definitely not be used in production code.
    &acro.idxpath; Use Attributes (type = 1) This attribute set allows one to search &acro.grs1; filter indexed records by &acro.xpath; like structured index names. The idxpath option defines hard-coded index names, which might clash with your own index names. &zebra; specific &acro.idxpath; Use Attributes (type 1) &acro.idxpath; Value String Index Notes &acro.xpath; Begin 1 _XPATH_BEGIN deprecated &acro.xpath; End 2 _XPATH_END deprecated &acro.xpath; CData 1016 _XPATH_CDATA deprecated &acro.xpath; Attribute Name 3 _XPATH_ATTR_NAME deprecated &acro.xpath; Attribute CData 1015 _XPATH_ATTR_CDATA deprecated
    See tab/idxpath.att for more information. Search for all documents starting with root element /root (either using the numeric or the string use attributes): Z> find @attrset idxpath @attr 1=1 @attr 4=3 root/ Z> find @attr idxpath 1=1 @attr 4=3 root/ Z> find @attr 1=_XPATH_BEGIN @attr 4=3 root/ Search for all documents where specific nested &acro.xpath; /c1/c2/../cn exists. Notice the very counter-intuitive reverse notation! Z> find @attrset idxpath @attr 1=1 @attr 4=3 cn/cn-1/../c1/ Z> find @attr 1=_XPATH_BEGIN @attr 4=3 cn/cn-1/../c1/ Search for CDATA string text in any element Z> find @attrset idxpath @attr 1=1016 text Z> find @attr 1=_XPATH_CDATA text Search for CDATA string anothertext in any attribute: Z> find @attrset idxpath @attr 1=1015 anothertext Z> find @attr 1=_XPATH_ATTR_CDATA anothertext Search for all documents with have an &acro.xml; element node including an &acro.xml; attribute named creator Z> find @attrset idxpath @attr 1=3 @attr 4=3 creator Z> find @attr 1=_XPATH_ATTR_NAME @attr 4=3 creator Combining usual bib-1 attribute set searches with idxpath attribute set searches: Z> find @and @attr idxpath 1=1 @attr 4=3 link/ @attr 1=4 mozart Z> find @and @attr 1=_XPATH_BEGIN @attr 4=3 link/ @attr 1=_XPATH_CDATA mozart Scanning is supported on all idxpath indexes, both specified as numeric use attributes, or as string index names. Z> scan @attrset idxpath @attr 1=1016 text Z> scan @attr 1=_XPATH_ATTR_CDATA anothertext Z> scan @attrset idxpath @attr 1=3 @attr 4=3 ''
    Mapping from &acro.pqf; atomic &acro.apt; queries to &zebra; internal register indexes The rules for &acro.pqf; &acro.apt; mapping are rather tricky to grasp in the first place. We deal first with the rules for deciding which internal register or string index to use, according to the use attribute or access point specified in the query. Thereafter we deal with the rules for determining the correct structure type of the named register.
    Mapping of &acro.pqf; &acro.apt; access points &zebra; understands four fundamental different types of access points, of which only the numeric use attribute type access points are defined by the &acro.z3950; standard. All other access point types are &zebra; specific, and non-portable. Access point name mapping Access Point Type Grammar Notes Use attribute numeric [1-9][1-9]* directly mapped to string index name String index name string [a-zA-Z](\-?[a-zA-Z0-9])* normalized name is used as internal string index name &zebra; internal index name zebra _[a-zA-Z](_?[a-zA-Z0-9])* hardwired internal string index name &acro.xpath; special index XPath /.* special xpath search for &acro.grs1; indexed records
    Attribute set names and string index names are normalizes according to the following rules: all single hyphens '-' are stripped, and all upper case letters are folded to lower case. Numeric use attributes are mapped to the &zebra; internal string index according to the attribute set definition in use. The default attribute set is &acro.bib1;, and may be omitted in the &acro.pqf; query. According to normalization and numeric use attribute mapping, it follows that the following &acro.pqf; queries are considered equivalent (assuming the default configuration has not been altered): Z> find @attr 1=Body-of-text serenade Z> find @attr 1=bodyoftext serenade Z> find @attr 1=BodyOfText serenade Z> find @attr 1=bO-d-Y-of-tE-x-t serenade Z> find @attr 1=1010 serenade Z> find @attrset &acro.bib1; @attr 1=1010 serenade Z> find @attrset bib1 @attr 1=1010 serenade Z> find @attrset Bib1 @attr 1=1010 serenade Z> find @attrset b-I-b-1 @attr 1=1010 serenade The numerical use attributes (type 1) are interpreted according to the attribute sets which have been loaded in the zebra.cfg file, and are matched against specific fields as specified in the .abs file which describes the profile of the records which have been loaded. If no use attribute is provided, a default of &acro.bib1; Use Any (1016) is assumed. The predefined use attribute sets can be reconfigured by tweaking the configuration files tab/*.att, and new attribute sets can be defined by adding similar files in the configuration path profilePath of the server. String indexes can be accessed directly, independently which attribute set is in use. These are just ignored. The above mentioned name normalization applies. String index names are defined in the used indexing filter configuration files, for example in the &acro.grs1; *.abs configuration files, or in the alvis filter &acro.xslt; indexing stylesheets. &zebra; internal indexes can be accessed directly, according to the same rules as the user defined string indexes. The only difference is that &zebra; internal index names are hardwired, all uppercase and must start with the character '_'. Finally, &acro.xpath; access points are only available using the &acro.grs1; filter for indexing. These access point names must start with the character '/', they are not normalized, but passed unaltered to the &zebra; internal &acro.xpath; engine. See .
    Mapping of &acro.pqf; &acro.apt; structure and completeness to register type Internally &zebra; has in its default configuration several different types of registers or indexes, whose tokenization and character normalization rules differ. This reflects the fact that searching fundamental different tokens like dates, numbers, bitfields and string based text needs different rule sets. Structure and completeness mapping to register types Structure Completeness Register type Notes phrase (@attr 4=1), word (@attr 4=2), word-list (@attr 4=6), free-form-text (@attr 4=105), or document-text (@attr 4=106) Incomplete field (@attr 6=1) Word ('w') Traditional tokenized and character normalized word index phrase (@attr 4=1), word (@attr 4=2), word-list (@attr 4=6), free-form-text (@attr 4=105), or document-text (@attr 4=106) complete field' (@attr 6=3) Phrase ('p') Character normalized, but not tokenized index for phrase matches urx (@attr 4=104) ignored URX/URL ('u') Special index for URL web addresses numeric (@attr 4=109) ignored Numeric ('n') Special index for digital numbers key (@attr 4=3) ignored Null bitmap ('0') Used for non-tokenized and non-normalized bit sequences year (@attr 4=4) ignored Year ('y') Non-tokenized and non-normalized 4 digit numbers date (@attr 4=5) ignored Date ('d') Non-tokenized and non-normalized ISO date strings ignored ignored Sort ('s') Used with special sort attribute set (@attr 7=1, @attr 7=2) overruled overruled special Internal record ID register, used whenever Relation Always Matches (@attr 2=103) is specified
    If a Structure attribute of Phrase is used in conjunction with a Completeness attribute of Complete (Sub)field, the term is matched against the contents of the phrase (long word) register, if one exists for the given Use attribute. A phrase register is created for those fields in the &acro.grs1; *.abs file that contains a p-specifier. Z> scan @attr 1=Title @attr 4=1 @attr 6=3 beethoven ... bayreuther festspiele (1) * beethoven bibliography database (1) benny carter (1) ... Z> find @attr 1=Title @attr 4=1 @attr 6=3 "beethoven bibliography" ... Number of hits: 0, setno 5 ... Z> find @attr 1=Title @attr 4=1 @attr 6=3 "beethoven bibliography database" ... Number of hits: 1, setno 6 If Structure=Phrase is used in conjunction with Incomplete Field - the default value for Completeness, the search is directed against the normal word registers, but if the term contains multiple words, the term will only match if all of the words are found immediately adjacent, and in the given order. The word search is performed on those fields that are indexed as type w in the &acro.grs1; *.abs file. Z> scan @attr 1=Title @attr 4=1 @attr 6=1 beethoven ... beefheart (1) * beethoven (18) beethovens (7) ... Z> find @attr 1=Title @attr 4=1 @attr 6=1 beethoven ... Number of hits: 18, setno 1 ... Z> find @attr 1=Title @attr 4=1 @attr 6=1 "beethoven bibliography" ... Number of hits: 2, setno 2 ... If the Structure attribute is Word List, Free-form Text, or Document Text, the term is treated as a natural-language, relevance-ranked query. This search type uses the word register, i.e. those fields that are indexed as type w in the &acro.grs1; *.abs file. If the Structure attribute is Numeric String the term is treated as an integer. The search is performed on those fields that are indexed as type n in the &acro.grs1; *.abs file. If the Structure attribute is URX the term is treated as a URX (URL) entity. The search is performed on those fields that are indexed as type u in the *.abs file. If the Structure attribute is Local Number the term is treated as native &zebra; Record Identifier. If the Relation attribute is Equals (default), the term is matched in a normal fashion (modulo truncation and processing of individual words, if required). If Relation is Less Than, Less Than or Equal, Greater than, or Greater than or Equal, the term is assumed to be numerical, and a standard regular expression is constructed to match the given expression. If Relation is Relevance, the standard natural-language query processor is invoked. For the Truncation attribute, No Truncation is the default. Left Truncation is not supported. Process # in search term is supported, as is Regxp-1. Regxp-2 enables the fault-tolerant (fuzzy) search. As a default, a single error (deletion, insertion, replacement) is accepted when terms are matched against the register contents.
    &zebra; Regular Expressions in Truncation Attribute (type = 5) Each term in a query is interpreted as a regular expression if the truncation value is either Regxp-1 (@attr 5=102) or Regxp-2 (@attr 5=103). Both query types follow the same syntax with the operands: Regular Expression Operands x Matches the character x. . Matches any character. [ .. ] Matches the set of characters specified; such as [abc] or [a-c].
    The above operands can be combined with the following operators: Regular Expression Operators x* Matches x zero or more times. Priority: high. x+ Matches x one or more times. Priority: high. x? Matches x zero or once. Priority: high. xy Matches x, then y. Priority: medium. x|y Matches either x or y. Priority: low. ( ) The order of evaluation may be changed by using parentheses.
    If the first character of the Regxp-2 query is a plus character (+) it marks the beginning of a section with non-standard specifiers. The next plus character marks the end of the section. Currently &zebra; only supports one specifier, the error tolerance, which consists one digit. Since the plus operator is normally a suffix operator the addition to the query syntax doesn't violate the syntax for standard regular expressions. For example, a phrase search with regular expressions in the title-register is performed like this: Z> find @attr 1=4 @attr 5=102 "informat.* retrieval" Combinations with other attributes are possible. For example, a ranked search with a regular expression: Z> find @attr 1=4 @attr 5=102 @attr 2=102 "informat.* retrieval"
    Server Side &acro.cql; to &acro.pqf; Query Translation Using the <cql2rpn>l2rpn.txt</cql2rpn> &yaz; Frontend Virtual Hosts option, one can configure the &yaz; Frontend &acro.cql;-to-&acro.pqf; converter, specifying the interpretation of various &acro.cql; indexes, relations, etc. in terms of Type-1 query attributes. For example, using server-side &acro.cql;-to-&acro.pqf; conversion, one might query a zebra server like this: querytype cql Z> find text=(plant and soil) ]]> and - if properly configured - even static relevance ranking can be performed using &acro.cql; query syntax: find text = /relevant (plant and soil) ]]> By the way, the same configuration can be used to search using client-side &acro.cql;-to-&acro.pqf; conversion: (the only difference is querytype cql2rpn instead of querytype cql, and the call specifying a local conversion file) querytype cql2rpn Z> find text=(plant and soil) ]]> Exhaustive information can be found in the Section &acro.cql; to &acro.rpn; conversion" in the &yaz; manual.
    idzebra-2.0.44/doc/architecture.html0000644000175000017500000001257311412336551014270 00000000000000Chapter 4. Overview of Zebra Architecture

    Chapter 4. Overview of Zebra Architecture

    1. Local Representation

    As mentioned earlier, Zebra places few restrictions on the type of data that you can index and manage. Generally, whatever the form of the data, it is parsed by an input filter specific to that format, and turned into an internal structure that Zebra knows how to handle. This process takes place whenever the record is accessed - for indexing and retrieval.

    The RecordType parameter in the zebra.cfg file, or the -t option to the indexer tells Zebra how to process input records. Two basic types of processing are available - raw text and structured data. Raw text is just that, and it is selected by providing the argument text to Zebra. Structured records are all handled internally using the basic mechanisms described in the subsequent sections. Zebra can read structured records in many different formats.

    idzebra-2.0.44/doc/introduction.xml0000644000175000017500000011634511412332551014161 00000000000000 Introduction
    Overview &zebra; is a free, fast, friendly information management system. It can index records in &acro.xml;/&acro.sgml;, &acro.marc;, e-mail archives and many other formats, and quickly find them using a combination of boolean searching and relevance ranking. Search-and-retrieve applications can be written using &acro.api;s in a wide variety of languages, communicating with the &zebra; server using industry-standard information-retrieval protocols or web services. &zebra; is licensed Open Source, and can be deployed by anyone for any purpose without license fees. The C source code is open to anybody to read and change under the GPL license. &zebra; is a networked component which acts as a reliable &acro.z3950; server for both record/document search, presentation, insert, update and delete operations. In addition, it understands the &acro.sru; family of webservices, which exist in &acro.rest; &acro.get;/&acro.post; and truly &acro.soap; flavors. &zebra; is available as MS Windows 2003 Server (32 bit) self-extracting package as well as GNU/Debian Linux (32 bit and 64 bit) precompiled packages. It has been deployed successfully on other Unix systems, including Sun Sparc, HP Unix, and many variants of Linux and BSD based systems. http://www.indexdata.com/zebra/ http://ftp.indexdata.dk/pub/zebra/win32/ http://ftp.indexdata.dk/pub/zebra/debian/ &zebra; is a high-performance, general-purpose structured text indexing and retrieval engine. It reads records in a variety of input formats (e.g. email, &acro.xml;, &acro.marc;) and provides access to them through a powerful combination of boolean search expressions and relevance-ranked free-text queries. &zebra; supports large databases (tens of millions of records, tens of gigabytes of data). It allows safe, incremental database updates on live systems. Because &zebra; supports the industry-standard information retrieval protocol, &acro.z3950;, you can search &zebra; databases using an enormous variety of programs and toolkits, both commercial and free, which understand this protocol. Application libraries are available to allow bespoke clients to be written in Perl, C, C++, Java, Tcl, Visual Basic, Python, &acro.php; and more - see the &acro.zoom; web site for more information on some of these client toolkits. This document is an introduction to the &zebra; system. It explains how to compile the software, how to prepare your first database, and how to configure the server to give you the functionality that you need.
    &zebra; Features Overview
    &zebra; Document Model &zebra; document model Feature Availability Notes Reference Complex semi-structured Documents &acro.xml; and &acro.grs1; Documents Both &acro.xml; and &acro.grs1; documents exhibit a &acro.dom; like internal representation allowing for complex indexing and display rules and Input document formats &acro.xml;, &acro.sgml;, Text, ISO2709 (&acro.marc;) A system of input filters driven by regular expressions allows most ASCII-based data formats to be easily processed. &acro.sgml;, &acro.xml;, ISO2709 (&acro.marc;), and raw text are also supported. Document storage Index-only, Key storage, Document storage Data can be, and usually is, imported into &zebra;'s own storage, but &zebra; can also refer to external files, building and maintaining indexes of "live" collections.
    &zebra; Index Scanning &zebra; index scanning Feature Availability Notes Reference Scan term suggestions Scan on a given named index returns all the indexed terms in lexicographical order near the given start term. This can be used to create drop-down menus and search suggestions. and Facetted browsing available Zebra 2.1 and allows retrieval of facets for a result set. Drill-down or refine-search partially scanning in result sets can be used to implement drill-down in search clients
    &zebra; Document Presentation &zebra; document presentation Feature Availability Notes Reference Hit count yes Search results include at any time the total hit count of a given query, either exact computed, or approximative, in case that the hit count exceeds a possible pre-defined hit set truncation level. and Paged result sets yes Paging of search requests and present/display request can return any successive number of records from any start position in the hit set, i.e. it is trivial to provide search results in successive pages of any size. &acro.xml; document transformations &acro.xslt; based Record presentation can be performed in many pre-defined &acro.xml; data formats, where the original &acro.xml; records are on-the-fly transformed through any preconfigured &acro.xslt; transformation. It is therefore trivial to present records in short/full &acro.xml; views, transforming to RSS, Dublin Core, or other &acro.xml; based data formats, or transform records to XHTML snippets ready for inserting in XHTML pages. Binary record transformations &acro.marc;, &acro.usmarc;, &acro.marc21; and &acro.marcxml; post-filter record transformations Record Syntaxes Multiple record syntaxes for data retrieval: &acro.grs1;, &acro.sutrs;, &acro.xml;, ISO2709 (&acro.marc;), etc. Records can be mapped between record syntaxes and schemas on the fly. &zebra; internal metadata yes &zebra; internal document metadata can be fetched in &acro.sutrs; and &acro.xml; record syntaxes. Those are useful in client applications. &zebra; internal raw record data yes &zebra; internal raw, binary record data can be fetched in &acro.sutrs; and &acro.xml; record syntaxes, leveraging %zebra; to a binary storage system &zebra; internal record field data yes &zebra; internal record field data can be fetched in &acro.sutrs; and &acro.xml; record syntaxes. This makes very fast minimal record data displays possible.
    &zebra; Sorting and Ranking &zebra; sorting and ranking Feature Availability Notes Reference Sort numeric, lexicographic Sorting on the basis of alpha-numeric and numeric data is supported. Alphanumeric sorts can be configured for different data encodings and locales for European languages. and Combined sorting yes Sorting on the basis of combined sorts ­ e.g. combinations of ascending/descending sorts of lexicographical/numeric/date field data is supported Relevance ranking TF-IDF like Relevance-ranking of free-text queries is supported using a TF-IDF like algorithm. Static pre-ranking yes Enables pre-index time ranking of documents where hit lists are ordered first by ascending static rank, then by ascending document ID.
    &zebra; Live Updates &zebra; live updates Feature Availability Notes Reference Incremental and batch updates It is possible to schedule record inserts/updates/deletes in any quantity, from single individual handled records to batch updates in strikes of any size, as well as total re-indexing of all records from file system. Remote updates &acro.z3950; extended services Updates can be performed from remote locations using the &acro.z3950; extended services. Access to extended services can be login-password protected. and Live updates transaction based Data updates are transaction based and can be performed on running &zebra; systems. Full searchability is preserved during life data update due to use of shadow disk areas for update operations. Multiple update transactions at the same time are lined up, to be performed one after each other. Data integrity is preserved.
    &zebra; Networked Protocols &zebra; networked protocols Feature Availability Notes Reference Fundamental operations &acro.z3950;/&acro.sru; explain, search, scan, and update &acro.z3950; protocol support yes Protocol facilities supported are: init, search, present (retrieval), Segmentation (support for very large records), delete, scan (index browsing), sort, close and support for the update Extended Service to add or replace an existing &acro.xml; record. Piggy-backed presents are honored in the search request. Named result sets are supported. Web Service support &acro.sru; The protocol operations explain, searchRetrieve and scan are supported. &acro.cql; to internal query model &acro.rpn; conversion is supported. Extended RPN queries for search/retrieve and scan are supported.
    &zebra; Data Size and Scalability &zebra; data size and scalability Feature Availability Notes Reference No of records 40-60 million Data size 100 GB of record data &zebra; based applications have successfully indexed up to 100 GB of record data Scale out multiple discs Performance O(n * log N) &zebra; query speed and performance is affected roughly by O(log N), where N is the total database size, and by O(n), where n is the specific query hit set size. Average search times Even on very large size databases hit rates of 20 queries per seconds with average query answering time of 1 second are possible, provided that the boolean queries are constructed sufficiently precise to result in hit sets of the order of 1000 to 5.000 documents. Large databases 64 bit file pointers 64 file pointers assure that register files can extend the 2 GB limit. Logical files can be automatically partitioned over multiple disks, thus allowing for large databases.
    &zebra; Supported Platforms &zebra; supported platforms Feature Availability Notes Reference Linux GNU Linux (32 and 64bit), journaling Reiser or (better) JFS file system on disks. NFS file systems are not supported. GNU/Debian Linux packages are available Unix tar-ball &zebra; is written in portable C, so it runs on most Unix-like systems. Usual tar-ball install possible on many major Unix systems Windows NT/2000/2003/XP &zebra; runs as well on Windows (NT/2000/2003/XP). Windows installer packages available
    References and &zebra; based Applications &zebra; has been deployed in numerous applications, in both the academic and commercial worlds, in application domains as diverse as bibliographic catalogues, Geo-spatial information, structured vocabulary browsing, government information locators, civic information systems, environmental observations, museum information and web indexes. Notable applications include the following:
    Koha free open-source ILS Koha is a full-featured open-source ILS, initially developed in New Zealand by Katipo Communications Ltd, and first deployed in January of 2000 for Horowhenua Library Trust. It is currently maintained by a team of software providers and library technology staff from around the globe. LibLime, a company that is marketing and supporting Koha, adds in the new release of Koha 3.0 the &zebra; database server to drive its bibliographic database. In early 2005, the Koha project development team began looking at ways to improve &acro.marc; support and overcome scalability limitations in the Koha 2.x series. After extensive evaluations of the best of the Open Source textual database engines - including MySQL full-text searching, PostgreSQL, Lucene and Plucene - the team selected &zebra;. "&zebra; completely eliminates scalability limitations, because it can support tens of millions of records." explained Joshua Ferraro, LibLime's Technology President and Koha's Project Release Manager. "Our performance tests showed search results in under a second for databases with over 5 million records on a modest i386 900Mhz test server." "&zebra; also includes support for true boolean search expressions and relevance-ranked free-text queries, both of which the Koha 2.x series lack. &zebra; also supports incremental and safe database updates, which allow on-the-fly record management. Finally, since &zebra; has at its heart the &acro.z3950; protocol, it greatly improves Koha's support for that critical library standard." Although the bibliographic database will be moved to &zebra;, Koha 3.0 will continue to use a relational SQL-based database design for the 'factual' database. "Relational database managers have their strengths, in spite of their inability to handle large numbers of bibliographic records efficiently," summed up Ferraro, "We're taking the best from both worlds in our redesigned Koha 3.0. See also LibLime's newsletter article Koha Earns its Stripes.
    Kete Open Source Digital Library and Archiving software Kete is a digital object management repository, initially developed in New Zealand. Initial development has been a partnership between the Horowhenua Library Trust and Katipo Communications Ltd. funded as part of the Community Partnership Fund in 2006. Kete is purpose built software to enable communities to build their own digital libraries, archives and repositories. It is based on Ruby-on-Rails and MySQL, and integrates the &zebra; server and the &yaz; toolkit for indexing and retrieval of it's content. Zebra is run as separate computer process from the Kete application. See how Kete manages Zebra. Why does Kete wants to use Zebra?? Speed, Scalability and easy integration with Koha. Read their detailed reasoning here.
    Emilda open source ILS Emilda is a complete Integrated Library System, released under the GNU General Public License. It has a full featured Web-OPAC, allowing comprehensive system management from virtually any computer with an Internet connection, has template based layout allowing anyone to alter the visual appearance of Emilda, and is &acro.xml; based language for fast and easy portability to virtually any language. Currently, Emilda is used at three schools in Espoo, Finland. As a surplus, 100% &acro.marc; compatibility has been achieved using the &zebra; Server from Index Data as backend server.
    ReIndex.Net web based ILS Reindex.net is a netbased library service offering all traditional functions on a very high level plus many new services. Reindex.net is a comprehensive and powerful WEB system based on standards such as &acro.xml; and &acro.z3950;. updates. Reindex supports &acro.marc21;, dan&acro.marc; eller Dublin Core with UTF8-encoding. Reindex.net runs on GNU/Debian Linux with &zebra; and Simpleserver from Index Data for bibliographic data. The relational database system Sybase 9 &acro.xml; is used for administrative data. Internally &acro.marcxml; is used for bibliographical records. Update utilizes &acro.z3950; extended services.
    DADS - the DTV Article Database Service DADS is a huge database of more than ten million records, totalling over ten gigabytes of data. The records are metadata about academic journal articles, primarily scientific; about 10% of these metadata records link to the full text of the articles they describe, a body of about a terabyte of information (although the full text is not indexed.) It allows students and researchers at DTU (Danmarks Tekniske Universitet, the Technical College of Denmark) to find and order articles from multiple databases in a single query. The database contains literature on all engineering subjects. It's available on-line through a web gateway, though currently only to registered users. More information can be found at and
    Infonet Eprints The InfoNet Eprints service from the Technical Knowledge Center of Denmark provides access to documents stored in eprint/preprint servers and institutional research archives around the world. The service is based on Open Archives Initiative metadata harvesting of selected scientific archives around the world. These open archives offer free and unrestricted access to their contents. Infonet Eprints currently holds 1.4 million records from 16 archives. The online search facility is found at .
    Alvis The Alvis EU project run under the 6th Framework (IST-1-002068-STP) is building a semantic-based peer-to-peer search engine. A consortium of eleven partners from six different European Community countries plus Switzerland and China contribute with expertise in a broad range of specialties including network topologies, routing algorithms, linguistic analysis and bioinformatics. The &zebra; information retrieval indexing machine is used inside the Alvis framework to manage huge collections of natural language processed and enhanced &acro.xml; data, coming from a topic relevant web crawl. In this application, &zebra; swallows and manages 37GB of &acro.xml; data in about 4 hours, resulting in search times of fractions of seconds.
    ULS (Union List of Serials) The M25 Systems Team has created a union catalogue for the periodicals of the twenty-one constituent libraries of the University of London and the University of Westminster (). They have achieved this using an unusual architecture, which they describe as a ``non-distributed virtual union catalogue''. The member libraries send in data files representing their periodicals, including both brief bibliographic data and summary holdings. Then 21 individual &acro.z3950; targets are created, each using &zebra;, and all mounted on the single hardware server. The live service provides a web gateway allowing &acro.z3950; searching of all of the targets or a selection of them. &zebra;'s small footprint allows a relatively modest system to comfortably host the 21 servers. More information can be found at
    NLI-&acro.z3950; - a Natural Language Interface for Libraries Fernuniversität Hagen in Germany have developed a natural language interface for access to library databases. In order to evaluate this interface for recall and precision, they chose &zebra; as the basis for retrieval effectiveness. The &zebra; server contains a copy of the GIRT database, consisting of more than 76000 records in &acro.sgml; format (bibliographic records from social science), which are mapped to &acro.marc; for presentation. (GIRT is the German Indexing and Retrieval Testdatabase. It is a standard German-language test database for intelligent indexing and retrieval systems. See ) Evaluation will take place as part of the TREC/CLEF campaign 2003 . For more information, contact Johannes Leveling Johannes.Leveling@FernUni-Hagen.De
    Various web indexes &zebra; has been used by a variety of institutions to construct indexes of large web sites, typically in the region of tens of millions of pages. In this role, it functions somewhat similarly to the engine of Google or AltaVista, but for a selected intranet or a subset of the whole Web. For example, Liverpool University's web-search facility (see on the home page at and many sub-pages) works by relevance-searching a &zebra; database which is populated by the Harvest-NG web-crawling software. For more information on Liverpool university's intranet search architecture, contact John Gilbertson jgilbert@liverpool.ac.uk Kang-Jin Lee has recently modified the Harvest web indexer to use &zebra; as its native repository engine. His comments on the switch over from the old engine are revealing:
    The first results after some testing with &zebra; are very promising. The tests were done with around 220,000 SOIF files, which occupies 1.6GB of disk space. Building the index from scratch takes around one hour with &zebra; where [old-engine] needs around five hours. While [old-engine] blocks search requests when updating its index, &zebra; can still answer search requests. [...] &zebra; supports incremental indexing which will speed up indexing even further. While the search time of [old-engine] varies from some seconds to some minutes depending how expensive the query is, &zebra; usually takes around one to three seconds, even for expensive queries. [...] &zebra; can search more than 100 times faster than [old-engine] and can process multiple search requests simultaneously I am very happy to see such nice software available under GPL.
    Support You can get support for &zebra; from at least three sources. First, there's the &zebra; web site at , which always has the most recent version available for download. If you have a problem with &zebra;, the first thing to do is see whether it's fixed in the current release. Second, there's the &zebra; mailing list. Its home page at includes a complete archive of all messages that have ever been posted on the list. The &zebra; mailing list is used both for announcements from the authors (new releases, bug fixes, etc.) and general discussion. You are welcome to seek support there. Join by filling the form on the list home page. Third, it's possible to buy a commercial support contract, with well defined service levels and response times, from Index Data. See for details.
    idzebra-2.0.44/doc/tutorial-oai-z3950.html0000644000175000017500000001510011412336551014774 000000000000007. Searching the OAI database by Z39.50 protocol

    7. Searching the OAI database by Z39.50 protocol

    In this section we repeat the searches and presents we have done so far using the binary Z39.50 protocol, you can use any Z39.50 client. For instance, you can use the demo command-line client that comes with YAZ.

    Connecting to the server is done by the command

         yaz-client localhost:9999
        

    When the client has connected, you can type:

         Z> format xml
         Z> querytype prefix
         Z> elements oai
         Z> find the
         Z> show 1+1
        

    Z39.50 presents using presentation stylesheets:

         Z> elements dc
         Z> show 2+1
         
         Z> elements zebra
         Z> show 3+1
        

    Z39.50 buildin Zebra presents (in this configuration only if started without yaz-frontendserver):

         Z> elements zebra::meta
         Z> show 4+1
         
         Z> elements zebra::meta::sysno
         Z> show 5+1
         
         Z> format sutrs
         Z> show 5+1
         Z> format xml
         
         Z> elements zebra::index
         Z> show 6+1
         
         Z> elements zebra::snippet
         Z> show 7+1
         
         Z> elements zebra::facet::any:w
         Z> show 1+1
         
         Z> elements zebra::facet::publisher:p,title:p
         Z> show 1+1
        

    Z39.50 searches targeted at specific indexes and boolean combinations of these can be issued as well.

         Z> elements dc
         Z> find @attr 1=oai_identifier @attr 4=3 oai:caltechcstr.library.caltech.edu:4
         Z> show 1+1
    
         Z> find @attr 1=oai_datestamp @attr 4=3 2001-04-20
         Z> show 1+1
    
         Z> find @attr 1=oai_setspec @attr 4=3 7374617475733D756E707562
         Z> show 1+1
         
         Z> find @attr 1=title communication
         Z> show 1+1
         
         Z> find @attr 1=identifier @attr 4=3  
         http://resolver.caltech.edu/CaltechCSTR:1986.5228-tr-86
         Z> show 1+1
        

    etc, etc.

    Z39.50 scan:

         yaz-client localhost:9999
         Z> format xml
         Z> querytype prefix
         Z> scan @attr 1=oai_identifier @attr 4=3 oai
         Z> scan @attr 1=oai_datestamp @attr 4=3 1
         Z> scan @attr 1=oai_setspec @attr 4=3 2000
         Z>
         Z> scan @attr 1=title communication
         Z> scan @attr 1=identifier @attr 4=3 a
        

    Z39.50 search using server-side CQL conversion:

         Z> format xml
         Z> querytype cql
         Z> elements dc
         Z>
         Z> find harry 
         Z>
         Z> find dc.creator = the
         Z> find dc.creator = the
         Z> find dc.title = the
         Z>
         Z> find dc.description < the
         Z> find dc.title > some
         Z>
         Z> find dc.identifier="http://resolver.caltech.edu/CaltechCSTR:1978.2276-tr-78"
         Z> find dc.relation = something 
        

    Tip

    Z39.50 scan using server side CQL conversion - unfortunately, this will _never_ work as it is not supported by the Z39.50 standard. If you want to use scan using server side CQL conversion, you need to make an SRW connection using yaz-client, or a SRU connection using REST Web Services - any browser will do.

    Tip

    All indexes defined by 'type="0"' in the indexing style sheet must be searched using the '@attr 4=3' structure attribute instruction.

    Notice that searching and scan on indexes contributor, language, rights, and source might fail, simply because none of the records in the small example set have these fields set, and consequently, these indexes might not been created.

    idzebra-2.0.44/doc/shadow-registers.html0000644000175000017500000002217611412336551015100 000000000000008. Safe Updating - Using Shadow Registers

    8. Safe Updating - Using Shadow Registers

    8.1. Description

    The Zebra server supports updating of the index structures. That is, you can add, modify, or remove records from databases managed by Zebra without rebuilding the entire index. Since this process involves modifying structured files with various references between blocks of data in the files, the update process is inherently sensitive to system crashes, or to process interruptions: Anything but a successfully completed update process will leave the register files in an unknown state, and you will essentially have no recourse but to re-index everything, or to restore the register files from a backup medium. Further, while the update process is active, users cannot be allowed to access the system, as the contents of the register files may change unpredictably.

    You can solve these problems by enabling the shadow register system in Zebra. During the updating procedure, zebraidx will temporarily write changes to the involved files in a set of "shadow files", without modifying the files that are accessed by the active server processes. If the update procedure is interrupted by a system crash or a signal, you simply repeat the procedure - the register files have not been changed or damaged, and the partially written shadow files are automatically deleted before the new updating procedure commences.

    At the end of the updating procedure (or in a separate operation, if you so desire), the system enters a "commit mode". First, any active server processes are forced to access those blocks that have been changed from the shadow files rather than from the main register files; the unmodified blocks are still accessed at their normal location (the shadow files are not a complete copy of the register files - they only contain those parts that have actually been modified). If the commit process is interrupted at any point during the commit process, the server processes will continue to access the shadow files until you can repeat the commit procedure and complete the writing of data to the main register files. You can perform multiple update operations to the registers before you commit the changes to the system files, or you can execute the commit operation at the end of each update operation. When the commit phase has completed successfully, any running server processes are instructed to switch their operations to the new, operational register, and the temporary shadow files are deleted.

    8.2. How to Use Shadow Register Files

    The first step is to allocate space on your system for the shadow files. You do this by adding a shadow entry to the zebra.cfg file. The syntax of the shadow entry is exactly the same as for the register entry (see Section 7, “Register Location”). The location of the shadow area should be different from the location of the main register area (if you have specified one - remember that if you provide no register setting, the default register area is the working directory of the server and indexing processes).

    The following excerpt from a zebra.cfg file shows one example of a setup that configures both the main register location and the shadow file area. Note that two directories or partitions have been set aside for the shadow file area. You can specify any number of directories for each of the file areas, but remember that there should be no overlaps between the directories used for the main registers and the shadow files, respectively.

         register: /d1:500M
         shadow: /scratch1:100M /scratch2:200M
        

    When shadow files are enabled, an extra command is available at the zebraidx command line. In order to make changes to the system take effect for the users, you'll have to submit a "commit" command after a (sequence of) update operation(s).

         $ zebraidx update /d1/records 
         $ zebraidx commit
        

    Or you can execute multiple updates before committing the changes:

         $ zebraidx -g books update /d1/records  /d2/more-records
         $ zebraidx -g fun update /d3/fun-records
         $ zebraidx commit
        

    If one of the update operations above had been interrupted, the commit operation on the last line would fail: zebraidx will not let you commit changes that would destroy the running register. You'll have to rerun all of the update operations since your last commit operation, before you can commit the new changes.

    Similarly, if the commit operation fails, zebraidx will not let you start a new update operation before you have successfully repeated the commit operation. The server processes will keep accessing the shadow files rather than the (possibly damaged) blocks of the main register files until the commit operation has successfully completed.

    You should be aware that update operations may take slightly longer when the shadow register system is enabled, since more file access operations are involved. Further, while the disk space required for the shadow register data is modest for a small update operation, you may prefer to disable the system if you are adding a very large number of records to an already very large database (we use the terms large and modest very loosely here, since every application will have a different perception of size). To update the system without the use of the the shadow files, simply run zebraidx with the -n option (note that you do not have to execute the commit command of zebraidx when you temporarily disable the use of the shadow registers in this fashion. Note also that, just as when the shadow registers are not enabled, server processes will be barred from accessing the main register while the update procedure takes place.

    idzebra-2.0.44/doc/file-ids.html0000644000175000017500000001267611412336551013306 000000000000005. Indexing with File Record IDs

    5. Indexing with File Record IDs

    If you have a set of files that regularly change over time: Old files are deleted, new ones are added, or existing files are modified, you can benefit from using the file ID indexing methodology. Examples of this type of database might include an index of WWW resources, or a USENET news spool area. Briefly speaking, the file key methodology uses the directory paths of the individual records as a unique identifier for each record. To perform indexing of a directory with file keys, again, you specify the top-level directory after the update command. The command will recursively traverse the directories and compare each one with whatever have been indexed before in that same directory. If a file is new (not in the previous version of the directory) it is inserted into the registers; if a file was already indexed and it has been modified since the last update, the index is also modified; if a file has been removed since the last visit, it is deleted from the index.

    The resulting system is easy to administrate. To delete a record you simply have to delete the corresponding file (say, with the rm command). And to add records you create new files (or directories with files). For your changes to take effect in the register you must run zebraidx update with the same directory root again. This mode of operation requires more disk space than simpler indexing methods, but it makes it easier for you to keep the index in sync with a frequently changing set of data. If you combine this system with the safe update facility (see below), you never have to take your server off-line for maintenance or register updating purposes.

    To enable indexing with pathname IDs, you must specify file as the value of recordId in the configuration file. In addition, you should set storeKeys to 1, since the Zebra indexer must save additional information about the contents of each record in order to modify the indexes correctly at a later time.

    For example, to update records of group esdd located below /data1/records/ you should type:

        $ zebraidx -g esdd update /data1/records
       

    The corresponding configuration file includes:

        esdd.recordId: file
        esdd.recordType: grs.sgml
        esdd.storeKeys: 1
       

    Note

    You cannot start out with a group of records with simple indexing (no record IDs as in the previous section) and then later enable file record Ids. Zebra must know from the first time that you index the group that the files should be indexed with file record IDs.

    You cannot explicitly delete records when using this method (using the delete command to zebraidx. Instead you have to delete the files from the file system (or move them to a different location) and then run zebraidx with the update command.

    idzebra-2.0.44/doc/record-model-domxml.html0000644000175000017500000002367611412336551015466 00000000000000Chapter 7. DOM XML Record Model and Filter Module

    Chapter 7. DOM XML Record Model and Filter Module

    The record model described in this chapter applies to the fundamental, structured XML record type DOM, introduced in Section 2.5.1, “DOM XML Record Model and Filter Module”. The DOM XML record model is experimental, and its inner workings might change in future releases of the Zebra Information Server.

    1. DOM Record Filter Architecture

    The DOM XML filter uses a standard DOM XML structure as internal data model, and can therefore parse, index, and display any XML document type. It is well suited to work on standardized XML-based formats such as Dublin Core, MODS, METS, MARCXML, OAI-PMH, RSS, and performs equally well on any other non-standard XML format.

    A parser for binary MARC records based on the ISO2709 library standard is provided, it transforms these to the internal MARCXML DOM representation. Other binary document parsers are planned to follow.

    The DOM filter architecture consists of four different pipelines, each being a chain of arbitrarily many successive XSLT transformations of the internal DOM XML representations of documents.

    Figure 7.1. DOM XML filter architecture

    [Here there should be a diagram showing the DOM XML filter architecture, but is seems that your tool chain has not been able to include the diagram in this document.]

    Table 7.1. DOM XML filter pipelines overview

    NameWhenDescriptionInputOutput
    inputfirstinput parsing and initial transformations to common XML formatInput raw XML record buffers, XML streams and binary MARC buffersCommon XML DOM
    extractsecondindexing term extraction transformationsCommon XML DOMIndexing XML DOM
    storesecond transformations before internal document storageCommon XML DOMStorage XML DOM
    retrievethirdmultiple document retrieve transformations from storage to different output formats are possibleStorage XML DOMOutput XML syntax in requested formats

    The DOM XML filter pipelines use XSLT (and if supported on your platform, even EXSLT), it brings thus full XPATH support to the indexing, storage and display rules of not only XML documents, but also binary MARC records.

    idzebra-2.0.44/doc/zebra.eps0000644000175000017500000010076011146471444012535 00000000000000%!PS-Adobe-3.0 EPSF-3.0 %%Creator: GIMP PostScript file plugin V 1.12 by Peter Kirchgessner %%Title: /home/adam/zebra.eps %%CreationDate: Wed May 7 16:10:08 2003 %%DocumentData: Clean7Bit %%LanguageLevel: 2 %%Pages: 1 %%BoundingBox: 14 14 225 183 %%EndComments %%BeginProlog % Use own dictionary to avoid conflicts 10 dict begin %%EndProlog %%Page: 1 1 % Translate for offset 14.173228 14.173228 translate % Translate to begin of first scanline 0.000000 168.000000 translate 210.000000 -168.000000 scale % Image geometry 210 168 8 % Transformation matrix [ 210 0 0 168 0 0 ] % Strings to hold RGB-samples per scanline /rstr 210 string def /gstr 210 string def /bstr 210 string def {currentfile /ASCII85Decode filter /RunLengthDecode filter rstr readstring pop} {currentfile /ASCII85Decode filter /RunLengthDecode filter gstr readstring pop} {currentfile /ASCII85Decode filter /RunLengthDecode filter bstr readstring pop} true 3 %%BeginData: 32258 ASCII Bytes colorimage JcDqRJ,~> JcDqRJ,~> JcDqRJ,~> JcDqRJ,~> JcDqRJ,~> JcDqRJ,~> cN!A6JcG?AJ,~> cN!A6JcG?AJ,~> cN!A6JcG?AJ,~> e,T=G!<;rsq#C-iJcGQGJ,~> e,T=G!<;rsq#C-iJcGQGJ,~> e,T=G!<;rsq#C-iJcGQGJ,~> ec5XLqu?Tpp](*js8VusJcG`LJ,~> ec5XLqu?Tpp](*js8VusJcG`LJ,~> ec5XLqu?Tpp](*js8VusJcG`LJ,~> g].'Lqu?Tpp](-kq>^HpJc>`MJ,~> g].'Lqu?Tpp](-kq>^HpJc>`MJ,~> g].'Lqu?Tpp](-kq>^HpJc>`MJ,~> hZ*?Nq>^Bnp](-kp](6nK)^?~> hZ*?Nq>^Bnp](-kp](6nK)^?~> hZ*?Nq>^Bnp](-kp](6nK)^?~> i;`fWrVufrq#C9mp](-kp&G$lK`?Q~> i;`fWrVufrq#C9mp](-kp&G$lK`?Q~> i;`fWrVufrq#C9mp](-kp&G$lK`?Q~> irB#Yqu?Tpq#C9mp](-kp&FmhM#Vu~> irB#Yqu?Tpq#C9mp](-kp&FmhM#Vu~> irB#Yqu?Tpq#C9mp](-kp&FmhM#Vu~> j8T)Zq>^Bnq#C9mp](0lo`+afM>r)~> j8T)Zq>^Bnq#C9mp](0lo`+afM>r)~> j8T)Zq>^Bnq#C9mp](0lo`+afM>r)~> jo>>\p](3mq#C9mp](0lo`+ghs8W*!MuS;~> jo>>\p](3mq#C9mp](0lo`+ghs8W*!MuS;~> jo>>\p](3mq#C9mp](0lo`+ghs8W*!MuS;~> k5YD\p](3mq#C9mp](0lp&Fpir;Q`sN;nD~> k5YD\p](3mq#C9mp](0lp&Fpir;Q`sN;nD~> k5YD\p](3mq#C9mp](0lp&Fpir;Q`sN;nD~> pAapgqu?Nnq#C pAapgqu?Nnq#C pAapgqu?Nnq#C p\t3nq>UEprVlitrr;rtp](3mrVu3ap&Fpip\t3nOT0h~> p\t3nq>UEprVlitrr;rtp](3mrVu3ap&Fpip\t3nOT0h~> p\t3nq>UEprVlitrr;rtp](3mrVu3ap&Fpip\t3nOT0h~> q#: q#: q#: q>UEpp&G$lqu?Wqq>^Bnq#C q>UEpp&G$lqu?Wqq>^Bnq#C q>UEpp&G$lqu?Wqq>^Bnq#C q>UEprVu`prr2ruqu?Wqr;ZTnq#C q>UEprVu`prr2ruqu?Wqr;ZTnq#C q>UEprVu`prr2ruqu?Wqr;ZTnq#C q>UEprr;rtrr;uurr2rur;Z`rrr;uurVuisq#C q>UEprr;rtrr;uurr2rur;Z`rrr;uurVuisq#C q>UEprr;rtrr;uurr2rur;Z`rrr;uurVuisq#C q#: q#: q#: q#: q#: q#: p\t3nrVuisrr3'#s8N)ss8E#os8;rns8E#ns8E#ls8;rrrr<&qs8E#rs8N(ds*t~> p\t3nrVuisrr3'#s8N)ss8E#os8;rns8E#ns8E#ls8;rrrr<&qs8E#rs8N(ds*t~> p\t3nrVuisrr3'#s8N)ss8E#os8;rns8E#ns8E#ls8;rrrr<&qs8E#rs8N(ds*t~> pAY*mrVuiss8W*!!WN0!s8N'!s8E#ps8;rns8E#ns8E#ms8;rps8N)ts8;rorr<%es*t~> pAY*mrVuiss8W*!!WN0!s8N'!s8E#ps8;rns8E#ns8E#ms8;rps8N)ts8;rorr<%es*t~> pAY*mrVuiss8W*!!WN0!s8N'!s8E#ps8;rns8E#ns8E#ms8;rps8N)ts8;rorr<%es*t~> pAY0orrE#trrE*!"T\T&!<3&us8E#os8E#os8E#ns8E#ms8;rns8Duus8E#orr<&Gs6]mCs*t~> pAY0orrE#trrE*!"T\T&!<3&us8E#os8E#os8E#ns8E#ms8;rns8Duus8E#orr<&Gs6]mCs*t~> pAY0orrE#trrE*!"T\T&!<3&us8E#os8E#os8E#ns8E#ms8;rns8Duus8E#orr<&Gs6]mCs*t~> pAY6qs8N'!rr;rt"TJK%rrDusrW)fprW)corW)cor;cTlrW)Wkr;cWm!!(OKquHKkp&O(OJ,~> pAY6qs8N'!rr;rt"TJK%rrDusrW)fprW)corW)cor;cTlrW)Wkr;cWm!!(OKquHKkp&O(OJ,~> pAY6qs8N'!rr;rt"TJK%rrDusrW)fprW)corW)cor;cTlrW)Wkr;cWm!!(OKquHKkp&O(OJ,~> pAY*mrVlitrr;oss8N'!r;Z`rqZ$Npq>^Eoq>^Eop](0lpAb'kp\t3nfDk^Jo)JRes8W&ujSs`~> pAY*mrVlitrr;oss8N'!r;Z`rqZ$Npq>^Eoq>^Eop](0lpAb'kp\t3nfDk^Jo)JRes8W&ujSs`~> pAY*mrVlitrr;oss8N'!r;Z`rqZ$Npq>^Eoq>^Eop](0lpAb'kp\t3nfDk^Jo)JRes8W&ujSs`~> q#C?o!WN/urr<&us8;p!rr<&ts8E#ps8E#os8E#os8E#ms8;rks8)flrr<&Qs7u``s8)fqrr<&\ s*t~> q#C?o!WN/urr<&us8;p!rr<&ts8E#ps8E#os8E#os8E#ms8;rks8)flrr<&Qs7u``s8)fqrr<&\ s*t~> q#C?o!WN/urr<&us8;p!rr<&ts8E#ps8E#os8E#os8E#ms8;rks8)flrr<&Qs7u``s8)fqrr<&\ s*t~> pAY*mqu6Wrrr;rts8N'!r;ZcsqZ$KoqZ$Npq>^Eop](3mpAb'krr2ruqZ$QqhZ*EPlMp\\s8W*! kPp&~> pAY*mqu6Wrrr;rts8N'!r;ZcsqZ$KoqZ$Npq>^Eop](3mpAb'krr2ruqZ$QqhZ*EPlMp\\s8W*! kPp&~> pAY*mqu6Wrrr;rts8N'!r;ZcsqZ$KoqZ$Npq>^Eop](3mpAb'krr2ruqZ$QqhZ*EPlMp\\s8W*! kPp&~> !<;rsrr;iqrVlitrr;uus8N'!r;Z`rqu?TpqZ$NpqZ$Kop](3mpAb'krVuisr;Q`si;`TQkPtDZ rr2rukl6/~> !<;rsrr;iqrVlitrr;uus8N'!r;Z`rqu?TpqZ$NpqZ$Kop](3mpAb'krVuisr;Q`si;`TQkPtDZ rr2rukl6/~> !<;rsrr;iqrVlitrr;uus8N'!r;Z`rqu?TpqZ$NpqZ$Kop](3mpAb'krVuisr;Q`si;`TQkPtDZ rr2rukl6/~> !WN/us8N)urr`?%rr<&prrW9$rrDrrrrDoqrW)fprW)fprW)]mrW)ZlquHWo!!)rs!!)'Zp]0CT q>gQqrrD?aJ,~> !WN/us8N)urr`?%rr<&prrW9$rrDrrrrDoqrW)fprW)fprW)]mrW)ZlquHWo!!)rs!!)'Zp]0CT q>gQqrrD?aJ,~> !WN/us8N)urr`?%rr<&prrW9$rrDrrrrDoqrW)fprW)fprW)]mrW)ZlquHWo!!)rs!!)'Zp]0CT q>gQqrrD?aJ,~> !WN0!s7lZps8N)qrr`?%rr<&ss8E#qs8E#ps8E#ps8E#ms8E#ls8;rns7lZYs7ZNOs8)fqrr<&b s*t~> !WN0!s7lZps8N)qrr`?%rr<&ss8E#qs8E#ps8E#ps8E#ms8E#ls8;rns7lZYs7ZNOs8)fqrr<&b s*t~> !WN0!s7lZps8N)qrr`?%rr<&ss8E#qs8E#ps8E#ps8E#ms8E#ls8;rns7lZYs7ZNOs8)fqrr<&b s*t~> !WN0!s7ZKorrE&u!!*#u!!*#u!!)rsrW)iqrW)fprW)fprW)`nr;cTlquHNlq#Ka\pAj%LqZ-Wq !!)BcJ,~> !WN0!s7ZKorrE&u!!*#u!!*#u!!)rsrW)iqrW)fprW)fprW)`nr;cTlquHNlq#Ka\pAj%LqZ-Wq !!)BcJ,~> !WN0!s7ZKorrE&u!!*#u!!*#u!!)rsrW)iqrW)fprW)fprW)`nr;cTlquHNlq#Ka\pAj%LqZ-Wq !!)BcJ,~> !WN/us7ZKrrrE*!!<3#u!<<'!!;lfq!;ulq!;lfq!;lfq!;HNm!;?Hk!;6Bh!:Km[!:'UN!<3#u !:Kl;~> !WN/us7ZKrrrE*!!<3#u!<<'!!;lfq!;ulq!;lfq!;lfq!;HNm!;?Hk!;6Bh!:Km[!:'UN!<3#u !:Kl;~> !WN/us7ZKrrrE*!!<3#u!<<'!!;lfq!;ulq!;lfq!;lfq!;HNm!;?Hk!;6Bh!:Km[!:'UN!<3#u !:Kl;~> !WN/us7ZNlrr<&us8N*!s8N)ss8E#rs8;rps8E#qs8E#ms8E#ms82ljs7u`es7$*Us6'I]rr<&f s*t~> !WN/us7ZNlrr<&us8N*!s8N)ss8E#rs8;rps8E#qs8E#ms8E#ms82ljs7u`es7$*Us6'I]rr<&f s*t~> !WN/us7ZNlrr<&us8N*!s8N)ss8E#rs8;rps8E#qs8E#ms8E#ms82ljs7u`es7$*Us6'I]rr<&f s*t~> s8N'!rVuTls8W*!rr;uurr2ruqu?Wqr;Z`rqu?Wqqu?Wqq#C9mp](0lpAb!i!<<#uq>^Bnr;ZNl mJl5Is8W&unGe"~> s8N'!rVuTls8W*!rr;uurr2ruqu?Wqr;Z`rqu?Wqqu?Wqq#C9mp](0lpAb!i!<<#uq>^Bnr;ZNl mJl5Is8W&unGe"~> s8N'!rVuTls8W*!rr;uurr2ruqu?Wqr;Z`rqu?Wqqu?Wqq#C9mp](0lpAb!i!<<#uq>^Bnr;ZNl mJl5Is8W&unGe"~> rr;uurVuWms8N'!rVults8W&urVufrrVuisr;Z]qqu?Wqq#C rr;uurVuWms8N'!rVults8W&urVufrrVuisr;Z]qqu?Wqq#C rr;uurVuWms8N'!rVults8W&urVufrrVuisr;Z]qqu?Wqq#C r;ZBhs8N'!rVultrr;rtrVufrrr;rtr;Z]qr;Z`rp](3mp](0lp](-kp&Fpir;ZNlnc.SK!<;cn o)F4~> r;ZBhs8N'!rVultrr;rtrVufrrr;rtr;Z]qr;Z`rp](3mp](0lp](-kp&Fpir;ZNlnc.SK!<;cn o)F4~> r;ZBhs8N'!rVultrr;rtrVufrrr;rtr;Z]qr;Z`rp](3mp](0lp](-kp&Fpir;ZNlnc.SK!<;cn o)F4~> oDegj"TJK%rrDusrrE#trrDusrrE#trrDusrW)iqrW)`nr;cWmr;cTlquHEiquHZpp]0pch>dQU pAjgbJ,~> oDegj"TJK%rrDusrrE#trrDusrrE#trrDusrW)iqrW)`nr;cWmr;cTlquHEiquHZpp]0pch>dQU pAjgbJ,~> oDegj"TJK%rrDusrrE#trrDusrrE#trrDusrW)iqrW)`nr;cWmr;cTlquHEiquHZpp]0pch>dQU pAjgbJ,~> o)Amorr<'!!!)rsrrE#trrDusrrE&urW)osrW)iqrW)`nr;cWmr;cWmquHEiquHZpp]0sdg].?S p&OabJ,~> o)Amorr<'!!!)rsrrE#trrDusrrE&urW)osrW)iqrW)`nr;cWmr;cWmquHEiquHZpp]0sdg].?S p&OabJ,~> o)Amorr<'!!!)rsrrE#trrDusrrE&urW)osrW)iqrW)`nr;cWmr;cWmquHEiquHZpp]0sdg].?S p&OabJ,~> o)Apps8N*!rr<&ss8N)ts8E#ss8Duus8E#ss8E#rs8;rms8E#ns82lms82lis82lps7cTds4RGQ s7ZNcs*t~> o)Apps8N*!rr<&ss8N)ts8E#ss8Duus8E#ss8E#rs8;rms8E#ns82lms82lis82lps7cTds4RGQ s7ZNcs*t~> o)Apps8N*!rr<&ss8N)ts8E#ss8Duus8E#ss8E#rs8;rms8E#ns82lms82lis82lps7cTds4RGQ s7ZNcs*t~> o)J^i"9/B$s8E#rs8N)ss8N)ss8N'#rr<&ts8E#rs8E#ms8E#ns8;rms82lks8)fos7cTes3C]F rr<&ls*t~> o)J^i"9/B$s8E#rs8N)ss8N)ss8N'#rr<&ts8E#rs8E#ms8E#ns8;rms82lks8)fos7cTes3C]F rr<&ls*t~> o)J^i"9/B$s8E#rs8N)ss8N)ss8N'#rr<&ts8E#rs8E#ms8E#ns8;rms82lks8)fos7cTes3C]F rr<&ls*t~> oD]$qrrE'!!<<)t!;uls!<)rs!<)rt!!<0#!<3#t!;ulr!;QTn!;QTl!;ZZm!;HNk!;lfl!;6B\ !:BgZ!;uis!;?GC~> oD]$qrrE'!!<<)t!;uls!<)rs!<)rt!!<0#!<3#t!;ulr!;QTn!;QTl!;ZZm!;HNk!;lfl!;6B\ !:BgZ!;uis!;?GC~> oD]$qrrE'!!<<)t!;uls!<)rs!<)rt!!<0#!<3#t!;ulr!;QTn!;QTl!;ZZm!;HNk!;lfl!;6B\ !:BgZ!;uis!;?GC~> oD\sorrE*!!<3#r!<)rs!<3#t!<)p"!<3$!rr;rtr;Z`rq#C^?mp](-kqZ$BlpAaU^ kPtJ\!<;utr;Q`spA]X~> oD\sorrE*!!<3#r!<)rs!<3#t!<)p"!<3$!rr;rtr;Z`rq#C^?mp](-kqZ$BlpAaU^ kPtJ\!<;utr;Q`spA]X~> oD\sorrE*!!<3#r!<)rs!<3#t!<)p"!<3$!rr;rtr;Z`rq#C^?mp](-kqZ$BlpAaU^ kPtJ\!<;utr;Q`spA]X~> oD\sorrE*!!;ulq!;uis!;uis!;uiu!<3&us8E#ss8;rns8;rns82lms82lls82lns7u`hs7-0L s8N*!s8;rqrr<&ns*t~> oD\sorrE*!!;ulq!;uis!;uis!;uiu!<3&us8E#ss8;rns8;rns82lms82lls82lns7u`hs7-0L s8N*!s8;rqrr<&ns*t~> oD\sorrE*!!;ulq!;uis!;uis!;uiu!<3&us8E#ss8;rns8;rns82lms82lls82lns7u`hs7-0L s8N*!s8;rqrr<&ns*t~> o`#*qs8N*!rrDlprrDusrrE#t!!)ut!W`6#rr;rtrVuisq#C^?mq#C3kqu?Kmp]'gb h>[NVs8W&ur;Q`sp]#a~> o`#*qs8N*!rrDlprrDusrrE#t!!)ut!W`6#rr;rtrVuisq#C^?mq#C3kqu?Kmp]'gb h>[NVs8W&ur;Q`sp]#a~> o`#*qs8N*!rrDlprrDusrrE#t!!)ut!W`6#rr;rtrVuisq#C^?mq#C3kqu?Kmp]'gb h>[NVs8W&ur;Q`sp]#a~> o`#*qs8N*!rrDiorrDusrrE&urrE#trrE&urrDusrW)`nrW)coquHQmr;cWmqZ-Nnq>g9io`3VD r;ccq!!)foJ,~> o`#*qs8N*!rrDiorrDusrrE&urrE#trrE&urrDusrW)`nrW)coquHQmr;cWmqZ-Nnq>g9io`3VD r;ccq!!)foJ,~> o`#*qs8N*!rrDiorrDusrrE&urrE#trrE&urrDusrW)`nrW)coquHQmr;cWmqZ-Nnq>g9io`3VD r;ccq!!)foJ,~> o`#*qs8N*!!!)utrW)rtrrDusrrE&urrE&urrE&urrDusrW)cor;cZnr;cZnquHQmqZ-Nnq#L3i p&N_E! o`#*qs8N*!!!)utrW)rtrrDusrrE&urrE&urrE&urrDusrW)cor;cZnr;cZnquHQmqZ-Nnq#L3i p&N_E! o`#*qs8N*!!!)utrW)rtrrDusrrE&urrE&urrE&urrDusrW)cor;cZnr;cZnquHQmqZ-Nnq#L3i p&N_E! o`#'prr<'!!<3#p!<<*!!;uis!<)rt!<3!"!<<)u!;uls!;QTn!;ZZm!;c`n!;ZZl!;lfl!;QTg !7_&G!;uis!;ZYF~> o`#'prr<'!!<3#p!<<*!!;uis!<)rt!<3!"!<<)u!;uls!;QTn!;ZZm!;c`n!;ZZl!;lfl!;QTg !7_&G!;uis!;ZYF~> o`#'prr<'!!<3#p!<<*!!;uis!<)rt!<3!"!<<)u!;uls!;QTn!;ZZm!;c`n!;ZZl!;lfl!;QTg !7_&G!;uis!;ZYF~> o`#3trr<'!!<<'!s8)frs8N)ss8N)ts8N*!rrN3#s8E#rs8N)ps8;rns8;rns8;rns8)fms7u`j s7cTBs8)forr<&ps*t~> o`#3trr<'!!<<'!s8)frs8N)ss8N)ts8N*!rrN3#s8E#rs8N)ps8;rns8;rns8;rns8)fms7u`j s7cTBs8)forr<&ps*t~> o`#3trr<'!!<<'!s8)frs8N)ss8N)ts8N*!rrN3#s8E#rs8N)ps8;rns8;rns8;rns8)fms7u`j s7cTBs8)forr<&ps*t~> p&>@!s8N*!rrE*!!<;ors8W&ur;Q`sr;Qp#s8N*!s8E#ss8E#os8;ros82lns82lms82lns7u`j s7cTArrN3#s8E#qrr<&qs*t~> p&>@!s8N*!rrE*!!<;ors8W&ur;Q`sr;Qp#s8N*!s8E#ss8E#os8;ros82lns82lms82lns7u`j s7cTArrN3#s8E#qrr<&qs*t~> p&>@!s8N*!rrE*!!<;ors8W&ur;Q`sr;Qp#s8N*!s8E#ss8E#os8;ros82lns82lms82lns7u`j s7cTArrN3#s8E#qrr<&qs*t~> p&>C"s8N*!!!*'!!<<)t!<3#s!<)rt!<)rt!!E6$s8W&urVuisq>^Eoq>^BnqZ$Hnq>^^3ic2[_Br;Q`sqYu'~> p&>C"s8N*!!!*'!!<<)t!<3#s!<)rt!<)rt!!E6$s8W&urVuisq>^Eoq>^BnqZ$Hnq>^^3ic2[_Br;Q`sqYu'~> p&>C"s8N*!!!*'!!<<)t!<3#s!<)rt!<)rt!!E6$s8W&urVuisq>^Eoq>^BnqZ$Hnq>^^3ic2[_Br;Q`sqYu'~> p&> p&> p&> p&>gfs`j8f,XqZ-Qo!!)lqJ,~> p&>gfs`j8f,XqZ-Qo!!)lqJ,~> p&>gfs`j8f,XqZ-Qo!!)lqJ,~> p&>I$s8N*!rr<'!rrE*!!<3#u!<3#t!<)rt!<3#t!!*&u!<)rs!;c`o!;c`n!;lfo!;ZZm!;c`l !;QTj!:g*>!<)rt!;c_G~> p&>I$s8N*!rr<'!rrE*!!<3#u!<3#t!<)rt!<3#t!!*&u!<)rs!;c`o!;c`n!;lfo!;ZZm!;c`l !;QTj!:g*>!<)rt!;c_G~> p&>I$s8N*!rr<'!rrE*!!<3#u!<3#t!<)rt!<3#t!!*&u!<)rs!;c`o!;c`n!;lfo!;ZZm!;c`l !;QTj!:g*>!<)rt!;c_G~> p&>*os8N)urriE&rrE'!rr;uur;ZcsrVultrVlp!s8W&urVultq>^BnqZ$KoqZ$HnqZ$EmqZ$Bl q>^9koDdDBs8W#t!<;rsqu;0~> p&>*os8N)urriE&rrE'!rr;uur;ZcsrVultrVlp!s8W&urVultq>^BnqZ$KoqZ$HnqZ$EmqZ$Bl q>^9koDdDBs8W#t!<;rsqu;0~> p&>*os8N)urriE&rrE'!rr;uur;ZcsrVultrVlp!s8W&urVultq>^BnqZ$KoqZ$HnqZ$EmqZ$Bl q>^9koDdDBs8W#t!<;rsqu;0~> p&>6ss8N'!s8N)urr<&us8N)rs8E#ss8N)urrN3#s8E#ss8N)qs8;ros82los82lms8)fns7u`k s7u`es4%,Ls7cTks*t~> p&>6ss8N'!s8N)urr<&us8N)rs8E#ss8N)urrN3#s8E#ss8N)qs8;ros82los82lms8)fns7u`k s7u`es4%,Ls7cTks*t~> p&>6ss8N'!s8N)urr<&us8N)rs8E#ss8N)urrN3#s8E#ss8N)qs8;ros82los82lms8)fns7u`k s7u`es4%,Ls7cTks*t~> p&G$l#6+Z's8N'!qu?Zrs8W&us8W*!rVultrr3$"s8W&urVultqZ$KoqZ$Hnr;ZZpq>^^6jp&EJ@s8Vioqu;0~> p&G$l#6+Z's8N'!qu?Zrs8W&us8W*!rVultrr3$"s8W&urVultqZ$KoqZ$Hnr;ZZpq>^^6jp&EJ@s8Vioqu;0~> p&G$l#6+Z's8N'!qu?Zrs8W&us8W*!rVultrr3$"s8W&urVultqZ$KoqZ$Hnr;ZZpq>^^6jp&EJ@s8Vioqu;0~> o`#-rrr<'!rr<&ss8N*!s8;rts8E#srrrK'rr<'!s8E#ss8N)qs8E#os8;rps82lms8)fns7u`k s7u`hs3UiHs7cTks*t~> o`#-rrr<'!rr<&ss8N*!s8;rts8E#srrrK'rr<'!s8E#ss8N)qs8E#os8;rps82lms8)fns7u`k s7u`hs3UiHs7cTks*t~> o`#-rrr<'!rr<&ss8N*!s8;rts8E#srrrK'rr<'!s8E#ss8N)qs8E#os8;rps82lms8)fns7u`k s7u`hs3UiHs7cTks*t~> o`#-rrr<'!rr<&ts8N*!s82lrs8N)ts8N'"rrE&urW)rtrW)iqr;cZnr;ccqqZ-KmqZ-KmqZ-Hl q>g9ic2[kEp]13kJ,~> o`#-rrr<'!rr<&ts8N*!s82lrs8N)ts8N'"rrE&urW)rtrW)iqr;cZnr;ccqqZ-KmqZ-KmqZ-Hl q>g9ic2[kEp]13kJ,~> o`#-rrr<'!rr<&ts8N*!s82lrs8N)ts8N'"rrE&urW)rtrW)iqr;cZnr;ccqqZ-KmqZ-KmqZ-Hl q>g9ic2[kEp]13kJ,~> o`#-rrr<'!rr<&us8N*!s8N*!s8N)us8N)ts8;rts8E#ss8E#qs8;ros8;rps82lms8)fns7u`l s7u`is6]mSs6BXcrrDusJ,~> o`#-rrr<'!rr<&us8N*!s8N*!s8N)us8N)ts8;rts8E#ss8E#qs8;ros8;rps82lms8)fns7u`l s7u`is6]mSs6BXcrrDusJ,~> o`#-rrr<'!rr<&us8N*!s8N*!s8N)us8N)ts8;rts8E#ss8E#qs8;ros8;rps82lms8)fns7u`l s7u`is6]mSs6BXcrrDusJ,~> o`#-rrr<'!rr<&us8N*!rr<&ts8N)us8N)us82iss8E#ss8N)qs8E#ps8;rps8)fls82lns8)fl s8)fks7-0Ks7lWps82lrrr<&ss*t~> o`#-rrr<'!rr<&us8N*!rr<&ts8N)us8N)us82iss8E#ss8N)qs8E#ps8;rps8)fls82lns8)fl s8)fks7-0Ks7lWps82lrrr<&ss*t~> o`#-rrr<'!rr<&us8N*!rr<&ts8N)us8N)us82iss8E#ss8N)qs8E#ps8;rps8)fls82lns8)fl s8)fks7-0Ks7lWps82lrrr<&ss*t~> o`"smrrE&u!!)ut$3:,+!<<'!s8N'!rr;uurVlitrr;osrVultqu?TpqZ$Koqu?Nnq>^?mqZ$Em qZ$Emq#Bsdg].6Qrr;rtr;Q`sr;V9~> o`"smrrE&u!!)ut$3:,+!<<'!s8N'!rr;uurVlitrr;osrVultqu?TpqZ$Koqu?Nnq>^?mqZ$Em qZ$Emq#Bsdg].6Qrr;rtr;Q`sr;V9~> o`"smrrE&u!!)ut$3:,+!<<'!s8N'!rr;uurVlitrr;osrVultqu?TpqZ$Koqu?Nnq>^?mqZ$Em qZ$Emq#Bsdg].6Qrr;rtr;Q`sr;V9~> o`"smrrE&u!!*#urrE*!!s&?$!<2uu!<3#t!<<'!!;c`q!<<)u!;lfp!;lfp!;lfm!;c`m!;lfm !;lfn!;QTe!8%5N!<3#t!;uis!;ukI~> o`"smrrE&u!!*#urrE*!!s&?$!<2uu!<3#t!<<'!!;c`q!<<)u!;lfp!;lfp!;lfm!;c`m!;lfm !;lfn!;QTe!8%5N!<3#t!;uis!;ukI~> o`"smrrE&u!!*#urrE*!!s&?$!<2uu!<3#t!<<'!!;c`q!<<)u!;lfp!;lfp!;lfm!;c`m!;lfm !;lfn!;QTe!8%5N!<3#t!;uis!;ukI~> o`"smrrE&u!!*#u"9AK%!!*#u!s&B$!<3#t!!3*"p](-kr;Z]qqZ$Kor;ZTnq>^^*fec,ULrr;rtr;Q`sr;V9~> o`"smrrE&u!!*#u"9AK%!!*#u!s&B$!<3#t!!3*"p](-kr;Z]qqZ$Kor;ZTnq>^^*fec,ULrr;rtr;Q`sr;V9~> o`"smrrE&u!!*#u"9AK%!!*#u!s&B$!<3#t!!3*"p](-kr;Z]qqZ$Kor;ZTnq>^^*fec,ULrr;rtr;Q`sr;V9~> o`#*qrrE*!!!*#u!s&B$!<)p#!<<'!!<3#t!;- o`#*qrrE*!!!*#u!s&B$!<)p#!<<'!!<3#t!;- o`#*qrrE*!!!*#u!s&B$!<)p#!<<'!!<3#t!;- p&>3rs8N*!rrE&u!!*#u!!)ut!!*#urrE*!rrDTh!!)utr;c]or;ccqr;ZitrW)coquHTnqZ-Nn quHTnpAiS?qZ-Qo!!)rsJ,~> p&>3rs8N*!rrE&u!!*#u!!)ut!!*#urrE*!rrDTh!!)utr;c]or;ccqr;ZitrW)coquHTnqZ-Nn quHTnpAiS?qZ-Qo!!)rsJ,~> p&>3rs8N*!rrE&u!!*#u!!)ut!!*#urrE*!rrDTh!!)utr;c]or;ccqr;ZitrW)coquHTnqZ-Nn quHTnpAiS?qZ-Qo!!)rsJ,~> p&>3rs8N*!rrE&u"9AK%!!)ut!!*#uquH3c!!*#ur;c`pquHZpr;ZitrW)coquHTnqZ-NnquHTn p]/Y?qZ-Qo!!)rsJ,~> p&>3rs8N*!rrE&u"9AK%!!)ut!!*#uquH3c!!*#ur;c`pquHZpr;ZitrW)coquHTnqZ-NnquHTn p]/Y?qZ-Qo!!)rsJ,~> p&>3rs8N*!rrE&u"9AK%!!)ut!!*#uquH3c!!*#ur;c`pquHZpr;ZitrW)coquHTnqZ-NnquHTn p]/Y?qZ-Qo!!)rsJ,~> p&>'nrrE&u!!*#u!s&B$!;uis!<)rt!:9^e!<<)t!;lfp!;ulq!<<)u!;c`m!;lfm!;lfp!;c`k !6tQ@!;uis!;ukI~> p&>'nrrE&u!!*#u!s&B$!;uis!<)rt!:9^e!<<)t!;lfp!;ulq!<<)u!;c`m!;lfm!;lfp!;c`k !6tQ@!;uis!;ukI~> p&>'nrrE&u!!*#u!s&B$!;uis!<)rt!:9^e!<<)t!;lfp!;ulq!<<)u!;c`m!;lfm!;lfp!;c`k !6tQ@!;uis!;ukI~> p&>'nrrE&u!!*#u!s&B$!;uis!<)ot!:'U^!;lfo!;ulr!<3#t!;c`m!;lfm!;lfp!;c`l!9!nL !;?Hm!;uis!;ukI~> p&>'nrrE&u!!*#u!s&B$!;uis!<)ot!:'U^!;lfo!;ulr!<3#t!;c`m!;lfm!;lfp!;c`l!9!nL !;?Hm!;uis!;ukI~> p&>'nrrE&u!!*#u!s&B$!;uis!<)ot!:'U^!;lfo!;ulr!<3#t!;c`m!;lfm!;lfp!;c`l!9!nL !;?Hm!;uis!;ukI~> p&>3rrrE*!!!*#u!s&B$!<)rt!<)ot!9jI^!;lfp!;ulq!<)rt!;c`m!;lfn!;c`o!;c`l!9X=G !;lfr!;uis!;ukI~> p&>3rrrE*!!!*#u!s&B$!<)rt!<)ot!9jI^!;lfp!;ulq!<)rt!;c`m!;lfn!;c`o!;c`l!9X=G !;lfr!;uis!;ukI~> p&>3rrrE*!!!*#u!s&B$!<)rt!<)ot!9jI^!;lfp!;ulq!<)rt!;c`m!;lfn!;c`o!;c`l!9X=G !;lfr!;uis!;ukI~> pAY?ts8N*!rr<&urrW9$rrE#t!!)ut!!)0]rrDrrr;ccqrW)lrrrDoqqZ-NnqZ-Kmr;c]oq>fj] i;ilWrrDus!!)rsJ,~> pAY?ts8N*!rr<&urrW9$rrE#t!!)ut!!)0]rrDrrr;ccqrW)lrrrDoqqZ-NnqZ-Kmr;c]oq>fj] i;ilWrrDus!!)rsJ,~> pAY?ts8N*!rr<&urrW9$rrE#t!!)ut!!)0]rrDrrr;ccqrW)lrrrDoqqZ-NnqZ-Kmr;c]oq>fj] i;ilWrrDus!!)rsJ,~> pAYfs` hZ3WTq#L?mJ,~> pAYfs` hZ3WTq#L?mJ,~> pAYfs` hZ3WTq#L?mJ,~> pAY0orrDcm!!*#u!!)ut!!)'Z!!)utr;ccqrW)iqrW)iqquHTnqZ-Kmr;c]oqZ-*bh#RERq#L?m J,~> pAY0orrDcm!!*#u!!)ut!!)'Z!!)utr;ccqrW)iqrW)iqquHTnqZ-Kmr;c]oqZ-*bh#RERq#L?m J,~> pAY0orrDcm!!*#u!!)ut!!)'Z!!)utr;ccqrW)iqrW)iqquHTnqZ-Kmr;c]oqZ-*bh#RERq#L?m J,~> pAY*mnG`Igrr2ruir8uYrr;osqu?Wqqu?Wqqu?QoqZ$EmqZ$KoqZ$Emnc-r9qu;0~> pAY*mnG`Igrr2ruir8uYrr;osqu?Wqqu?Wqqu?QoqZ$EmqZ$KoqZ$Emnc-r9qu;0~> pAY*mnG`Igrr2ruir8uYrr;osqu?Wqqu?Wqqu?QoqZ$EmqZ$KoqZ$Emnc-r9qu;0~> pAY*mr;Z`rq>^Hprr2ruiVrrZs8W#tr;Z`rqZ$Npqu?QoqZ$EmqZ$KoqZ$EmoDd)9qu;0~> pAY*mr;Z`rq>^Hprr2ruiVrrZs8W#tr;Z`rqZ$Npqu?QoqZ$EmqZ$KoqZ$EmoDd)9qu;0~> pAY*mr;Z`rq>^Hprr2ruiVrrZs8W#tr;Z`rqZ$Npqu?QoqZ$EmqZ$KoqZ$EmoDd)9qu;0~> pAY*mqZ$QqqYpNqrr2ruhuEQRr;Z`rqZ$Npqu?QoqZ$EmqZ$KoqZ$Emp&EVDrVu]oqu;0~> pAY*mqZ$QqqYpNqrr2ruhuEQRr;Z`rqZ$Npqu?QoqZ$EmqZ$KoqZ$Emp&EVDrVu]oqu;0~> pAY*mqZ$QqqYpNqrr2ruhuEQRr;Z`rqZ$Npqu?QoqZ$EmqZ$KoqZ$Emp&EVDrVu]oqu;0~> pAY*mqu6Wrq>^Hprr2ruhZ*NSqu?WqqZ$NpqZ$KoqZ$EmqZ$Hnqu?NnpAaL[mf34crr;coqu;0~> pAY*mqu6Wrq>^Hprr2ruhZ*NSqu?WqqZ$NpqZ$KoqZ$EmqZ$Hnqu?NnpAaL[mf34crr;coqu;0~> pAY*mqu6Wrq>^Hprr2ruhZ*NSqu?WqqZ$NpqZ$KoqZ$EmqZ$Hnqu?NnpAaL[mf34crr;coqu;0~> pAY*mqu6Wrq>UEprVlith>dHSr;Z`rq>^Bnqu?Tpq>^ pAY*mqu6Wrq>UEprVlith>dHSr;Z`rq>^Bnqu?Tpq>^ pAY*mqu6Wrq>UEprVlith>dHSr;Z`rq>^Bnqu?Tpq>^ pAY*mr;Q`sq>UEpr;Q`sh#@?Squ?Wqq#C pAY*mr;Q`sq>UEpr;Q`sh#@?Squ?Wqq#C pAY*mr;Q`sq>UEpr;Q`sh#@?Squ?Wqq#C pAY*moD\djr;Q`sh#@?Squ?Wqq#C pAY*moD\djr;Q`sh#@?Squ?Wqq#C pAY*moD\djr;Q`sh#@?Squ?Wqq#C pAY*mo`+pkrVlitgA_-Qr;Z`rq#C^-gi;`WRrVlitqu;0~> pAY*mo`+pkrVlitgA_-Qr;Z`rq#C^-gi;`WRrVlitqu;0~> pAY*mo`+pkrVlitgA_-Qr;Z`rq#C^-gi;`WRrVlitqu;0~> p&>!lp&>!lr;Q`sg&D$PrVultp](0lr;ZZpqZ$EmqZ$Koqu?Kmq>^0hhuENQrVlitqu;0~> p&>!lp&>!lr;Q`sg&D$PrVultp](0lr;ZZpqZ$EmqZ$Koqu?Kmq>^0hhuENQrVlitqu;0~> p&>!lp&>!lr;Q`sg&D$PrVultp](0lr;ZZpqZ$EmqZ$Koqu?Kmq>^0hhuENQrVlitqu;0~> o`"mkpAY*mrVlitf`(pOrVultp](0lr;ZZpqZ$EmqZ$Hnqu?Nnq>^3ihZ!QUrr;rtrr2ruqYu'~> o`"mkpAY*mrVlitf`(pOrVultp](0lr;ZZpqZ$EmqZ$Hnqu?Nnq>^3ihZ!QUrr;rtrr2ruqYu'~> o`"mkpAY*mrVlitf`(pOrVultp](0lr;ZZpqZ$EmqZ$Hnqu?Nnq>^3ihZ!QUrr;rtrr2ruqYu'~> oD\djq#C?os8W*!f)G^Mrr;uupAb*lqu?Qoqu?Nnq>^Bnqu?NnqZ$[HTrr;rtrr2ruqYu'~> oD\djq#C?os8W*!f)G^Mrr;uupAb*lqu?Qoqu?Nnq>^Bnqu?NnqZ$[HTrr;rtrr2ruqYu'~> oD\djq#C?os8W*!f)G^Mrr;uupAb*lqu?Qoqu?Nnq>^Bnqu?NnqZ$[HTrr;rtrr2ruqYu'~> o)A[iq>UEprr2rueGfUNs8N)ls8E#qs82lns8)fms8;rps8)fms7lZMrr<&us8E#urr<&ps*t~> o)A[iq>UEprr2rueGfUNs8N)ls8E#qs82lns8)fms8;rps8)fms7lZMrr<&us8E#urr<&ps*t~> o)A[iq>UEprr2rueGfUNs8N)ls8E#qs82lns8)fms8;rps8)fms7lZMrr<&us8E#urr<&ps*t~> nc/OfrVls"s8N)IrrN3#!;6Bj!;ulp!;c`m!;c`n!;ulo!;c`k!8RSS!<3#t!<<'!!;ZYF~> nc/OfrVls"s8N)IrrN3#!;6Bj!;ulp!;c`m!;c`n!;ulo!;c`k!8RSS!<3#t!<<'!!;ZYF~> nc/OfrVls"s8N)IrrN3#!;6Bj!;ulp!;c`m!;c`n!;ulo!;c`k!8RSS!<3#t!<<'!!;ZYF~> mJd.drr;rtd/X+Gr;Z`rr;Z`rr;ZZpqZ$EmqZ$Hnqu?QoqZ$Blg]%6Rrr;rt!WN/ps*t~> mJd.drr;rtd/X+Gr;Z`rr;Z`rr;ZZpqZ$EmqZ$Hnqu?QoqZ$Blg]%6Rrr;rt!WN/ps*t~> mJd.drr;rtd/X+Gr;Z`rr;Z`rr;ZZpqZ$EmqZ$Hnqu?QoqZ$Blg]%6Rrr;rt!WN/ps*t~> m/R%bbl7YCrVucqrVuisqu?Qoqu?Nnq>^Bnqu?Nnqu?NnkPt2T!<;ipp]#a~> m/R%bbl7YCrVucqrVuisqu?Qoqu?Nnq>^Bnqu?Nnqu?NnkPt2T!<;ipp]#a~> m/R%bbl7YCrVucqrVuisqu?Qoqu?Nnq>^Bnqu?Nnqu?NnkPt2T!<;ipp]#a~> [/U++rVucqr;Z`rr;ZZpqu?KmqZ$Hnr;ZWoqu?NnmJl>LpA]X~> [/U++rVucqr;Z`rr;ZZpqu?KmqZ$Hnr;ZWoqu?NnmJl>LpA]X~> [/U++rVucqr;Z`rr;ZZpqu?KmqZ$Hnr;ZWoqu?NnmJl>LpA]X~> [/U++rr;fprVuisr;ZZpqZ$EmqZ$Hnqu?Qoqu?QonGhbRrVuispA]X~> [/U++rr;fprVuisr;ZZpqZ$EmqZ$Hnqu?Qoqu?QonGhbRrVuispA]X~> [/U++rr;fprVuisr;ZZpqZ$EmqZ$Hnqu?Qoqu?QonGhbRrVuispA]X~> [/U++rr;corr;rtr;ZWoqu?NnqZ$Hnqu?Qoqu?Qoo`+%RrVuispA]X~> [/U++rr;corr;rtr;ZWoqu?NnqZ$Hnqu?Qoqu?Qoo`+%RrVuispA]X~> [/U++rr;corr;rtr;ZWoqu?NnqZ$Hnqu?Qoqu?Qoo`+%RrVuispA]X~> [/U++rr;corVultqu?Qoqu?Nnq>^?mqu?Qor;ZZppAa1RrVuispA]X~> [/U++rr;corVultqu?Qoqu?Nnq>^?mqu?Qor;ZZppAa1RrVuispA]X~> [/U++rr;corVultqu?Qoqu?Nnq>^?mqu?Qor;ZZppAa1RrVuispA]X~> [/U1-s8ViorVuisr;ZWor;ZWoq>^?mqu?Qor;Z]qp]'4QrVuispA]X~> [/U1-s8ViorVuisr;ZWor;ZWoq>^?mqu?Qor;Z]qp]'4QrVuispA]X~> [/U1-s8ViorVuisr;ZWor;ZWoq>^?mqu?Qor;Z]qp]'4QrVuispA]X~> [/^.+!<;uts8W#trr;rtr;ZWoqu?Nnq>^Bnqu?Qoqu?Wqq>]+JpA]X~> [/^.+!<;uts8W#trr;rtr;ZWoqu?Nnq>^Bnqu?Qoqu?Wqq>]+JpA]X~> [/^.+!<;uts8W#trr;rtr;ZWoqu?Nnq>^Bnqu?Qoqu?Wqq>]+JpA]X~> Zi:%+s8;rss8;rss8E#rs82los8)fls82los82lps8E#qs6p$\s7HBcs*t~> Zi:%+s8;rss8;rss8E#rs82los8)fls82los82lps8E#qs6p$\s7HBcs*t~> Zi:%+s8;rss8;rss8E#rs82los8)fls82los82lps8E#qs6p$\s7HBcs*t~> ZN'k'qu?Zrrr;rtr;ZWoqu?Qoq#C9mqZ$Kor;Z`rrVuNjlMpkarVuispA]X~> ZN'k'qu?Zrrr;rtr;ZWoqu?Qoq#C9mqZ$Kor;Z`rrVuNjlMpkarVuispA]X~> ZN'k'qu?Zrrr;rtr;ZWoqu?Qoq#C9mqZ$Kor;Z`rrVuNjlMpkarVuispA]X~> ZN'k'qu?Wqrr;rtr;ZZpqu?Nnq>^?mqu?QorVuisrr;]mkl1\arrE#trW)ZlJ,~> ZN'k'qu?Wqrr;rtr;ZZpqu?Nnq>^?mqu?QorVuisrr;]mkl1\arrE#trW)ZlJ,~> ZN'k'qu?Wqrr;rtr;ZZpqu?Nnq>^?mqu?QorVuisrr;]mkl1\arrE#trW)ZlJ,~> Z2ae'qZ$Nps8W&ur;ZZpqu?Nnq#C6lqu?Qorr;rts8Viok5PJ_rrE#trW)ZlJ,~> Z2ae'qZ$Nps8W&ur;ZZpqu?Nnq#C6lqu?Qorr;rts8Viok5PJ_rrE#trW)ZlJ,~> Z2ae'qZ$Nps8W&ur;ZZpqu?Nnq#C6lqu?Qorr;rts8Viok5PJ_rrE#trW)ZlJ,~> Z2ah(q>^Eos8W&uqu?Qoqu?Nnq>^?mqu?Nns8W&u!<;ipjo5D_s8N)ts8E#ls*t~> Z2ah(q>^Eos8W&uqu?Qoqu?Nnq>^?mqu?Nns8W&u!<;ipjo5D_s8N)ts8E#ls*t~> Z2ah(q>^Eos8W&uqu?Qoqu?Nnq>^?mqu?Nns8W&u!<;ipjo5D_s8N)ts8E#ls*t~> Yl=\'q#C Yl=\'q#C Yl=\'q#C Yl=\'p](3m!<;utr;ZZpqu?Nnq>^ Yl=\'p](3m!<;utr;ZZpqu?Nnq>^ Yl=\'p](3m!<;utr;ZZpqu?Nnq>^ Yl=\'pAb-ms8W&uqu?Qoqu?Nnq>^?mqZ$Emr;Q`sir8uYrr2ruqu?Wqp]#a~> Yl=\'pAb-ms8W&uqu?Qoqu?Nnq>^?mqZ$Emr;Q`sir8uYrr2ruqu?Wqp]#a~> Yl=\'pAb-ms8W&uqu?Qoqu?Nnq>^?mqZ$Emr;Q`sir8uYrr2ruqu?Wqp]#a~> YQ"S&pAb-ms8W&ur;ZZpqu?Nnq#C6lqZ$Qqq#: YQ"S&pAb-ms8W&ur;ZZpqu?Nnq#C6lqZ$Qqq#: YQ"S&pAb-ms8W&ur;ZZpqu?Nnq#C6lqZ$Qqq#: YQ"S&pAb*ls8W&ur;ZZpqu?Nnq#C6lr;Q`sp&>!ljo5;\rr2ruqZ$Npp]#a~> YQ"S&pAb*ls8W&ur;ZZpqu?Nnq#C6lr;Q`sp&>!ljo5;\rr2ruqZ$Npp]#a~> YQ"S&pAb*ls8W&ur;ZZpqu?Nnq#C6lr;Q`sp&>!ljo5;\rr2ruqZ$Npp]#a~> YQ+V&pAb*ls8N0$rr<&ts82los82lls8)crs8E#jrr<&fs82lqrr<&trr<&qs8E#ms*t~> YQ+V&pAb*ls8N0$rr<&ts82los82lls8)crs8E#jrr<&fs82lqrr<&trr<&qs8E#ms*t~> YQ+V&pAb*ls8N0$rr<&ts82los82lls8)crs8E#jrr<&fs82lqrr<&trr<&qs8E#ms*t~> Y5\P's8W#tqu?Wq!WN0!s8N*!s82los8)fks8)fcrr<&ns7$*err<&rs8;rls*t~> Y5\P's8W#tqu?Wq!WN0!s8N*!s82los8)fks8)fcrr<&ns7$*err<&rs8;rls*t~> Y5\P's8W#tqu?Wq!WN0!s8N*!s82los8)fks8)fcrr<&ns7$*err<&rs8;rls*t~> XoAD%s82lps82lps8N'!s82los8)fls8E#brr<&rs6fscrr<&qs8;rls*t~> XoAD%s82lps82lps8N'!s82los8)fls8E#brr<&rs6fscrr<&qs8;rls*t~> XoAD%s82lps82lps8N'!s82los8)fls8E#brr<&rs6fscrr<&qs8;rls*t~> XoJ.rrVufrqZ$Blqu?6fl2Lebs8VEcr;Q`sq>^Eop]#a~> XoJ.rrVufrqZ$Blqu?6fl2Lebs8VEcr;Q`sq>^Eop]#a~> XoJ.rrVufrqZ$Blqu?6fl2Lebs8VEcr;Q`sq>^Eop]#a~> XT/"prVlitq>UEpqu?Ekh>cd@r;Q`sq>^Bnp]#a~> XT/"prVlitq>UEpqu?Ekh>cd@r;Q`sq>^Bnp]#a~> XT/"prVlitq>UEpqu?Ekh>cd@r;Q`sq>^Bnp]#a~> X8hnorr2ruq>UEpo`"mkh#I$Ir;ZWorVlitq>^Bnp]#a~> X8hnorr2ruq>UEpo`"mkh#I$Ir;ZWorVlitq>^Bnp]#a~> X8hnorr2ruq>UEpo`"mkh#I$Ir;ZWorVlitq>^Bnp]#a~> WrN)!s8Vrrs8N'!q#:!lg].0Oo`"mkrr30&s8N*!rrDrrr;cTlJ,~> WrN)!s8Vrrs8N'!q#:!lg].0Oo`"mkrr30&s8N*!rrDrrr;cTlJ,~> WrN)!s8Vrrs8N'!q#:!lg].0Oo`"mkrr30&s8N*!rrDrrr;cTlJ,~> WW)qurVu]oq#C-irr;rtg].9Rnc&RhrVm$$rrE*!!;lfo!;QSE~> WW)qurVu]oq#C-irr;rtg].9Rnc&RhrVm$$rrE*!!;lfo!;QSE~> WW)qurVu]oq#C-irr;rtg].9Rnc&RhrVm$$rrE*!!;lfo!;QSE~> WW)quqZ$Koq#:?ps7QHGrr<&hrr<&srr`?%rr<&rs82lls*t~> WW)quqZ$Koq#:?ps7QHGrr<&hrr<&srr`?%rr<&rs82lls*t~> WW)quqZ$Koq#:?ps7QHGrr<&hrr<&srr`?%rr<&rs82lls*t~> W;chtq>^Hpq#: W;chtq>^Hpq#: W;chtq>^Hpq#: W;chtq#: W;chtq#: W;chtq#: W;chtq#:j~> W;chtq#:j~> W;chtq#:j~> W;chtq#: W;chtq#: W;chtq#: W;chtq#:!lrVm-'rrE*!!<<'!rVucqq#>j~> W;chtq#:!lrVm-'rrE*!!<<'!rVucqq#>j~> W;chtq#:!lrVm-'rrE*!!<<'!rVucqq#>j~> VuQVorr2rup\t3nq#:j~> VuQVorr2rup\t3nq#:j~> VuQVorr2rup\t3nq#:j~> VuQJkp](0lqu6WreGo1Ar;R!%rrE'!s8N)ss82lls*t~> VuQJkp](0lqu6WreGo1Ar;R!%rrE'!s8N)ss82lls*t~> VuQJkp](0lqu6WreGo1Ar;R!%rrE'!s8N)ss82lls*t~> VuQJkp]'peeGoFHqu?ZrrVults8N0$s8N)ss82lls*t~> VuQJkp]'peeGoFHqu?ZrrVults8N0$s8N)ss82lls*t~> VuQJkp]'peeGoFHqu?ZrrVults8N0$s8N)ss82lls*t~> VuH_sr;Z]qp]'peeGfLKpAY*mrVult"oeQ&s8N)ss8)fls*t~> VuH_sr;Z]qp]'peeGfLKpAY*mrVult"oeQ&s8N)ss8)fls*t~> VuH_sr;Z]qp]'peeGfLKpAY*mrVult"oeQ&s8N)ss8)fls*t~> VuH_sq>UEpp\t3nq>UEpe,KCJpAY*mqYpNqrr2rur;ZZp!WN/rs*t~> VuH_sq>UEpp\t3nq>UEpe,KCJpAY*mqYpNqrr2rur;ZZp!WN/rs*t~> VuH_sq>UEpp\t3nq>UEpe,KCJpAY*mqYpNqrr2rur;ZZp!WN/rs*t~> W;lktq>UEpp\t3nq>UEpdf0:Ip\t3nqYpZus8N'!r;ZZps8N'!qu;0~> W;lktq>UEpp\t3nq>UEpdf0:Ip\t3nqYpZus8N'!r;ZZps8N'!qu;0~> W;lktq>UEpp\t3nq>UEpdf0:Ip\t3nqYpZus8N'!r;ZZps8N'!qu;0~> W;chtq#:UEpdf0:IpAY*mqu6d!s8N'!rVucqrr2ruqu;0~> W;chtq#:UEpdf0:IpAY*mqu6d!s8N'!rVucqrr2ruqu;0~> W;chtq#:UEpdf0:IpAY*mqu6d!s8N'!rVucqrr2ruqu;0~> W;chtq#:UEpdf0:IpAY*mqu6d!s8N'!rVucqrr2ruqu;0~> W;chtq#:UEpdf0:IpAY*mqu6d!s8N'!rVucqrr2ruqu;0~> W;chtq#:UEpdf0:IpAY*mqu6d!s8N'!rVucqrr2ruqu;0~> W;chtq#:UEpdf0:IpAY*mr;Q`srVlitrVucqrVlitr;V9~> W;chtq#:UEpdf0:IpAY*mr;Q`srVlitrVucqrVlitr;V9~> W;chtq#:UEpdf0:IpAY*mr;Q`srVlitrVucqrVlitr;V9~> W;chtq#:UEpdf0:IpAY*mr;Qm"s8N'!r;ZZprVlitr;V9~> W;chtq#:UEpdf0:IpAY*mr;Qm"s8N'!r;ZZprVlitr;V9~> W;chtq#:UEpdf0:IpAY*mr;Qm"s8N'!r;ZZprVlitr;V9~> W;chtq#:UEpdf0:IpAY*mr;Qj!s8N)rs82lqrr<&ss*t~> W;chtq#:UEpdf0:IpAY*mr;Qj!s8N)rs82lqrr<&ss*t~> W;chtq#:UEpdf0:IpAY*mr;Qj!s8N)rs82lqrr<&ss*t~> W;chtq>UEppAY*mq>UEpdf9"@!WN/trr`?%rr<&ss82lqrr<&ss*t~> W;chtq>UEppAY*mq>UEpdf9"@!WN/trr`?%rr<&ss82lqrr<&ss*t~> W;chtq>UEppAY*mq>UEpdf9"@!WN/trr`?%rr<&ss82lqrr<&ss*t~> W;l\os8N'!pAY*mq>UEpdf8q>r;Qm"s8N'!r;ZKkr;V9~> W;l\os8N'!pAY*mq>UEpdf8q>r;Qm"s8N'!r;ZKkr;V9~> W;l\os8N'!pAY*mq>UEpdf8q>r;Qm"s8N'!r;ZKkr;V9~> W;lSlpAY*mq>UEpdf9=Iq>^Eor;Qm"rrE'!r;ZKkr;V9~> W;lSlpAY*mq>UEpdf9=Iq>^Eor;Qm"rrE'!r;ZKkr;V9~> W;lSlpAY*mq>UEpdf9=Iq>^Eor;Qm"rrE'!r;ZKkr;V9~> W;lSlpAajedf0:IpAY*mr;Qm"rrE'!r;ZKkr;V9~> W;lSlpAajedf0:IpAY*mr;Qm"rrE'!r;ZKkr;V9~> W;lSlpAajedf0:IpAY*mr;Qm"rrE'!r;ZKkr;V9~> W;chtqu?WqpAajedf0:IpAY*mr;Qm"rrE'!r;Z]qr;Q`sr;V9~> W;chtqu?WqpAajedf0:IpAY*mr;Qm"rrE'!r;Z]qr;Q`sr;V9~> W;chtqu?WqpAajedf0:IpAY*mr;Qm"rrE'!r;Z]qr;Q`sr;V9~> W;chtq>UEppAajedf0:IpAY*mr;Z`r!WN/ts8;rqrr<&ss*t~> W;chtq>UEppAajedf0:IpAY*mr;Z`r!WN/ts8;rqrr<&ss*t~> W;chtq>UEppAajedf0:IpAY*mr;Z`r!WN/ts8;rqrr<&ss*t~> W;chtq>UEppAY*mq>UEpdf0:IpAY*mqu?Zr!WN/us82lprr<&ss*t~> W;chtq>UEppAY*mq>UEpdf0:IpAY*mqu?Zr!WN/us82lprr<&ss*t~> W;chtq>UEppAY*mq>UEpdf0:IpAY*mqu?Zr!WN/us82lprr<&ss*t~> W;chtq>UEppAY*mq>UEpdf0:IpAY*mqu?Zr!WN/us82lprr<&ss*t~> W;chtq>UEppAY*mq>UEpdf0:IpAY*mqu?Zr!WN/us82lprr<&ss*t~> W;chtq>UEppAY*mq>UEpdf0:IpAY*mqu?Zr!WN/us82lprr<&ss*t~> W;chtq>UEppAY*mq>UEpdf0:Ip](6nq#: W;chtq>UEppAY*mq>UEpdf0:Ip](6nq#: W;chtq>UEppAY*mq>UEpdf0:Ip](6nq#: W;chtq>UEpp&>!lqYpNqdf0:Ip\t3np\t3nrVufrqu6Wrr;V9~> W;chtq>UEpp&>!lqYpNqdf0:Ip\t3np\t3nrVufrqu6Wrr;V9~> W;chtq>UEpp&>!lqYpNqdf0:Ip\t3np\t3nrVufrqu6Wrr;V9~> W;chtq>UEpp&>!lqYpNqdf0:Ip\t3npAY*mrr;osqu6Wrr;V9~> W;chtq>UEpp&>!lqYpNqdf0:Ip\t3npAY*mrr;osqu6Wrr;V9~> W;chtq>UEpp&>!lqYpNqdf0:Ip\t3npAY*mrr;osqu6Wrr;V9~> W;chtq>UEpp&>!lqYpNqdf0:Ip\t3npAY*mrr;osqu6Wrr;V9~> W;chtq>UEpp&>!lqYpNqdf0:Ip\t3npAY*mrr;osqu6Wrr;V9~> W;chtq>UEpp&>!lqYpNqdf0:Ip\t3npAY*mrr;osqu6Wrr;V9~> W;cu#s8N'!rVlitp&>!lqYpNqdf8t?pAY*mrr;osqu6Wrr;V9~> W;cu#s8N'!rVlitp&>!lqYpNqdf8t?pAY*mrr;osqu6Wrr;V9~> W;cu#s8N'!rVlitp&>!lqYpNqdf8t?pAY*mrr;osqu6Wrr;V9~> W;lYn!WN/mrr<&qrr<&Is7HBcrr<&us7QHjs*t~> W;lYn!WN/mrr<&qrr<&Is7HBcrr<&us7QHjs*t~> W;lYn!WN/mrr<&qrr<&Is7HBcrr<&us7QHjs*t~> W;lSlo`+dg!WN/Js7QHbrrN3#s7QHjs*t~> W;lSlo`+dg!WN/Js7QHbrrN3#s7QHjs*t~> W;lSlo`+dg!WN/Js7QHbrrN3#s7QHjs*t~> W;lktrr;lro`+^ee,KCJp\t3no`"sms8Vcmr;V9~> W;lktrr;lro`+^ee,KCJp\t3no`"sms8Vcmr;V9~> W;lktrr;lro`+^ee,KCJp\t3no`"sms8Vcmr;V9~> W;chtq>UEpo`+^ee,KCJp\t3no`"sms8W&uqYpNqr;V9~> W;chtq>UEpo`+^ee,KCJp\t3no`"sms8W&uqYpNqr;V9~> W;chtq>UEpo`+^ee,KCJp\t3no`"sms8W&uqYpNqr;V9~> W;chtq>UEpo`"mkqu6Wre,KCJp\t3no`"sms8W&uqYpNqr;V9~> W;chtq>UEpo`"mkqu6Wre,KCJp\t3no`"sms8W&uqYpNqr;V9~> W;chtq>UEpo`"mkqu6Wre,KCJp\t3no`"sms8W&uqYpNqr;V9~> W;chtq#:!lqu6Wre,KCJp\t3noD\gks8E#prr<&ss*t~> W;chtq#:!lqu6Wre,KCJp\t3noD\gks8E#prr<&ss*t~> W;chtq#:!lqu6Wre,KCJp\t3noD\gks8E#prr<&ss*t~> W;chtq#:!lqu6WreGfLKpAY*moD\gks8E#prr<&ss*t~> W;chtq#:!lqu6WreGfLKpAY*moD\gks8E#prr<&ss*t~> W;chtq#:!lqu6WreGfLKpAY*moD\gks8E#prr<&ss*t~> W;chtq#: W;chtq#: W;chtq#: W;chtq#:UEpr;V9~> W;chtq#:UEpr;V9~> W;chtq#:UEpr;V9~> W;l\orr2rupAY*mqYpNqec5XLqu?Qonc/Rgq>UEpr;V9~> W;l\orr2rupAY*mqYpNqec5XLqu?Qonc/Rgq>UEpr;V9~> W;l\orr2rupAY*mqYpNqec5XLqu?Qonc/Rgq>UEpr;V9~> W;lSlp&>!lqYpNqec,ULp](6nnG`Igq#: W;lSlp&>!lqYpNqec,ULp](6nnG`Igq#: W;lSlp&>!lqYpNqec,ULp](6nnG`Igq#: W;lSlp&>!lqYpNqf)G^Mp&>!lo)JUfqYpNqr;V9~> W;lSlp&>!lqYpNqf)G^Mp&>!lo)JUfqYpNqr;V9~> W;lSlp&>!lqYpNqf)G^Mp&>!lo)JUfqYpNqr;V9~> W;chtrVucqp&Fdef)G^MpAY*mnc/Cbrr2ruqu;0~> W;chtrVucqp&Fdef)G^MpAY*mnc/Cbrr2ruqu;0~> W;chtrVucqp&Fdef)G^MpAY*mnc/Cbrr2ruqu;0~> W;chtq>UEpp&FadfDkgMq#: W;chtq>UEpp&FadfDkgMq#: W;chtq>UEpp&FadfDkgMq#: WW)quq#:!lq>UEpf`1gKqYpNqnc&RhqZ$Koqu;0~> WW)quq#:!lq>UEpf`1gKqYpNqnc&RhqZ$Koqu;0~> WW)quq#:!lq>UEpf`1gKqYpNqnc&RhqZ$Koqu;0~> WrN)!q#:UEpf`(pOrr;lrrVlitnc&Rhq#C?oqu;0~> WrN)!q#:UEpf`(pOrr;lrrVlitnc&Rhq#C?oqu;0~> WrN)!q#:UEpf`(pOrr;lrrVlitnc&Rhq#C?oqu;0~> X8i+uq>UEppAY*mq#: X8i+uq>UEppAY*mq#: X8i+uq>UEppAY*mq#: XT/.tqYpNqpAY*mq#: XT/.tqYpNqpAY*mq#: XT/.tqYpNqpAY*mq#: XoJ1squ6WrpAY*mq#:UEpqYu'~> XoJ1squ6WrpAY*mq#:UEpqYu'~> XoJ1squ6WrpAY*mq#:UEpqYu'~> Y5e4rr;Q`sp]'jch#I9Pp\t3no)JOdr;Q`sqYu'~> Y5e4rr;Q`sp]'jch#I9Pp\t3no)JOdr;Q`sqYu'~> Y5e4rr;Q`sp]'jch#I9Pp\t3no)JOdr;Q`sqYu'~> YQ+7qrVlitp]'jch>d9NqYpNqo)JFarr2ruqYu'~> YQ+7qrVlitp]'jch>d9NqYpNqo)JFarr2ruqYu'~> YQ+7qrVlitp]'jch>d9NqYpNqo)JFarr2ruqYu'~> YQ+4ps8W*!p]'jchZ* YQ+4ps8W*!p]'jchZ* YQ+4ps8W*!p]'jchZ* YlF4np&FXahZ*9Lr;Q`soDeF_!WN/rs*t~> YlF4np&FXahZ*9Lr;Q`soDeF_!WN/rs*t~> YlF4np&FXahZ*9Lr;Q`soDeF_!WN/rs*t~> YQ+4poDeF_huE9Js8N'!o)J:]q>Ys~> YQ+4poDeF_huE9Js8N'!o)J:]q>Ys~> YQ+4poDeF_huE9Js8N'!o)J:]q>Ys~> PlLCVhZ*'FoDe@]q>Ys~> PlLCVhZ*'FoDe@]q>Ys~> PlLCVhZ*'FoDe@]q>Ys~> JcFj3o)S7Zo`4adJ,~> JcFj3o)S7Zo`4adJ,~> JcFj3o)S7Zo`4adJ,~> JcFd1q#JtFJ,~> JcFd1q#JtFJ,~> JcFd1q#JtFJ,~> %%EndData showpage %%Trailer end %%EOF idzebra-2.0.44/doc/zebraidx-2.0.10000644000175000017500000001101111412336536013074 00000000000000'\" t .\" Title: zebraidx .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 06/29/2010 .\" Manual: [FIXME: manual] .\" Source: zebra 2.0.44 .\" Language: English .\" .TH "ZEBRAIDX" "1" "06/29/2010" "zebra 2.0.44" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zebraidx \- Zebra Administrative Tool .SH "SYNOPSIS" .HP \w'\fBzebraidx\fR\ 'u \fBzebraidx\fR [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-c\ \fR\fB\fIconfig\fR\fR] [\fB\-g\ \fR\fB\fIgroup\fR\fR] [\fB\-d\ \fR\fB\fIdatabase\fR\fR] [\fB\-m\ \fR\fB\fImbytes\fR\fR] [\fB\-n\fR] [\fB\-s\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-l\ \fR\fB\fIfile\fR\fR] [\fB\-L\fR] [\fB\-f\ \fR\fB\fInumber\fR\fR] [\fB\-v\fR] {\fIcommand\fR} [\fIfile\fR...] .SH "DESCRIPTION" .PP \fBzebraidx\fR allows you to insert, delete or updates records in Zebra\&. \fBzebraidx\fR accepts a set options (see below) and exactly one command (mandatory)\&. .SH "COMMANDS" .PP update \fIdirectory\fR .RS 4 Update the register with the files contained in \fIdirectory\fR\&. If no directory is provided, a list of files is read from stdin\&. See Administration in the Zebra Manual\&. .RE .PP delete \fIdirectory\fR .RS 4 Remove the records corresponding to the files found under \fIdirectory\fR from the register\&. .RE .PP adelete \fIdirectory\fR .RS 4 Remove the records corresponding to the files found under \fIdirectory\fR from the register\&. Unlike command delete this command does not fail if a record does not exist (but which is attempted deleted)\&. .RE .PP commit .RS 4 Write the changes resulting from the last update commands to the register\&. This command is only available if the use of shadow register files is enabled (see Shadow Registers in the Zebra Manual)\&. .RE .PP clean .RS 4 Clean shadow files and "forget" changes\&. .RE .PP create \fIdatabase\fR .RS 4 Create database\&. .RE .PP drop \fIdatabase\fR .RS 4 Drop database (delete database)\&. .RE .PP init .RS 4 Deletes an entire register (all files in shadow+register areas)\&. .RE .SH "OPTIONS" .PP \-t \fItype\fR .RS 4 Update all files as \fItype\fR\&. Currently, the types supported are text, alvis and grs\fI\&.subtype\fR\&. Generally, it is probably advisable to specify the record types in the zebra\&.cfg file (see Record Types in the Zebra manual), to avoid confusion at subsequent updates\&. .RE .PP \-c \fIconfig\-file\fR .RS 4 Read the configuration file \fIconfig\-file\fR instead of zebra\&.cfg\&. .RE .PP \-g \fIgroup\fR .RS 4 Update the files according to the group settings for \fIgroup\fR (see Zebra Configuration File in the Zebra manual)\&. .RE .PP \-d \fIdatabase\fR .RS 4 The records located should be associated with the database name \fIdatabase\fR for access through the Z39\&.50 server\&. .RE .PP \-l \fIfile\fR .RS 4 Write log messages to \fIfile\fR instead of stderr\&. .RE .PP \-m \fImbytes\fR .RS 4 Use \fImbytes\fR of memory before flushing keys to background storage\&. This setting affects performance when updating large databases\&. .RE .PP \-L .RS 4 Makes zebraidx skip symbolic links\&. By default, zebraidx follows them\&. .RE .PP \-n .RS 4 Disable the use of shadow registers for this operation (see Shadow Registers in the Zebra manual)\&. .RE .PP \-s .RS 4 Show analysis of the indexing process\&. The maintenance program works in a read\-only mode and doesn\*(Aqt change the state of the index\&. This options is very useful when you wish to test a new profile\&. .RE .PP \-V .RS 4 Show Zebra version\&. .RE .PP \-v \fIlevel\fR .RS 4 Set the log level to \fIlevel\fR\&. \fIlevel\fR should be one of none, debug, and all\&. .RE .SH "FILES" .PP zebra\&.cfg .SH "SEE ALSO" .PP \fBzebrasrv\fR(8) idzebra-2.0.44/doc/icuchain-files.html0000644000175000017500000001034011412336551014457 000000000000003. ICU Chain Files

    3. ICU Chain Files

    The ICU chain files defines a chain of rules which specify the conversion process to be carried out for each record string for indexing.

    Both searching and sorting is based on the sort normalization that ICU provides. This means that scan and sort will return terms in the sort order given by ICU.

    Zebra is using YAZ' ICU wrapper. Refer to the yaz-icu man page for documentation about the ICU chain rules.

    Tip

    Use the yaz-icu program to test your icuchain rules.

    Example 10.2. Indexing Greek text

    Consider a system where all "regular" text is to be indexed using as Greek (locale: EL). We would have to change our index type file - to read

          # Index greek words
          index w
          completeness 0
          position 1
          alwaysmatches 1
          firstinfield 1
          icuahain greek.xml
          ..
         

    The ICU chain file greek.xml could look as follows:

          <icu_chain locale="el">
          <transform rule="[:Control:] Any-Remove"/>
          <tokenize rule="l"/>
          <transform rule="[[:WhiteSpace:][:Punctuation:]] Remove"/>
          <display/>
          <casemap rule="l"/>
         </icu_chain>
         


    Zebra is shipped with a field types file icu.idx which is an ICU chain version of default.idx.

    Example 10.3. MARCXML indexing using ICU

    The directory examples/marcxml includes a complete sample with MARCXML records that are DOM XML indexed using ICU chain rules. Study the README in the marcxml directory for details.


    idzebra-2.0.44/doc/manref.xml0000644000175000017500000015175711412336536012725 00000000000000 zebra 2.0.44 zebraidx 1 zebraidx Zebra Administrative Tool zebraidx command file DESCRIPTION zebraidx allows you to insert, delete or updates records in Zebra. zebraidx accepts a set options (see below) and exactly one command (mandatory). COMMANDS update directory Update the register with the files contained in directory. If no directory is provided, a list of files is read from stdin. See Administration in the Zebra Manual. delete directory Remove the records corresponding to the files found under directory from the register. adelete directory Remove the records corresponding to the files found under directory from the register. Unlike command delete this command does not fail if a record does not exist (but which is attempted deleted). commit Write the changes resulting from the last update commands to the register. This command is only available if the use of shadow register files is enabled (see Shadow Registers in the Zebra Manual). clean Clean shadow files and "forget" changes. create database Create database. drop database Drop database (delete database). init Deletes an entire register (all files in shadow+register areas). OPTIONS -t type Update all files as type. Currently, the types supported are text, alvis and grs.subtype. Generally, it is probably advisable to specify the record types in the zebra.cfg file (see Record Types in the Zebra manual), to avoid confusion at subsequent updates. -c config-file Read the configuration file config-file instead of zebra.cfg. -g group Update the files according to the group settings for group (see Zebra Configuration File in the Zebra manual). -d database The records located should be associated with the database name database for access through the Z39.50 server. -l file Write log messages to file instead of stderr. -m mbytes Use mbytes of memory before flushing keys to background storage. This setting affects performance when updating large databases. -L Makes zebraidx skip symbolic links. By default, zebraidx follows them. -n Disable the use of shadow registers for this operation (see Shadow Registers in the Zebra manual). -s Show analysis of the indexing process. The maintenance program works in a read-only mode and doesn't change the state of the index. This options is very useful when you wish to test a new profile. -V Show Zebra version. -v level Set the log level to level. level should be one of none, debug, and all. FILES zebra.cfg SEE ALSO zebrasrv 8 zebra 2.0.44 zebrasrv 8 zebrasrv Zebra Server zebrasrv listener-spec DESCRIPTION Zebra is a high-performance, general-purpose structured text indexing and retrieval engine. It reads structured records in a variety of input formats (e.g. email, XML, MARC) and allows access to them through exact boolean search expressions and relevance-ranked free-text queries. zebrasrv is the Z39.50 and SRU frontend server for the Zebra search engine and indexer. On Unix you can run the zebrasrv server from the command line - and put it in the background. It may also operate under the inet daemon. On WIN32 you can run the server as a console application or as a WIN32 Service. OPTIONS The options for zebrasrv are the same as those for YAZ' yaz-ztest. Option -c specifies a Zebra configuration file - if omitted zebra.cfg is read. -a file Specify a file for dumping PDUs (for diagnostic purposes). The special name - (dash) sends output to stderr. -S Don't fork or make threads on connection requests. This is good for debugging, but not recommended for real operation: Although the server is asynchronous and non-blocking, it can be nice to keep a software malfunction (okay then, a crash) from affecting all current users. The server can only accept a single connection in this mode. -1 Like -S but after one session the server exits. This mode is for debugging only. -T Operate the server in threaded mode. The server creates a thread for each connection rather than a fork a process. Only available on UNIX systems that offers POSIX threads. -s Use the SR protocol (obsolete). -z Use the Z39.50 protocol (default). This option and -s complement each other. You can use both multiple times on the same command line, between listener-specifications (see below). This way, you can set up the server to listen for connections in both protocols concurrently, on different local ports. -l file Specify an output file for the diagnostic messages. The default is to write this information to stderr -c config-file Read configuration information from config-file. The default configuration is ./zebra.cfg -f vconfig This specifies an XML file that describes one or more YAZ frontend virtual servers. See section VIRTUAL HOSTS for details. -C fname Sets SSL certificate file name for server (PEM). -v level The log level. Use a comma-separated list of members of the set {fatal,debug,warn,log,malloc,all,none}. -u uid Set user ID. Sets the real UID of the server process to that of the given user. It's useful if you aren't comfortable with having the server run as root, but you need to start it as such to bind a privileged port. -w working-directory The server changes to this working directory during before listening on incoming connections. This option is useful when the server is operating from the inetd daemon (see -i). -p pidfile Specifies that the server should write its Process ID to file given by pidfile. A typical location would be /var/run/zebrasrv.pid. -i Use this to make the the server run from the inetd server (UNIX only). Make sure you use the logfile option -l in conjunction with this mode and specify the -l option before any other options. -D Use this to make the server put itself in the background and run as a daemon. If neither -i nor -D is given, the server starts in the foreground. -install Use this to install the server as an NT service (Windows NT/2000/XP only). Control the server by going to the Services in the Control Panel. -installa Use this to install and activate the server as an NT service (Windows NT/2000/XP only). Control the server by going to the Services in the Control Panel. -remove Use this to remove the server from the NT services (Windows NT/2000/XP only). -t minutes Idle session timeout, in minutes. Default is 60 minutes. -k size Maximum record size/message size, in kilobytes. Default is 1024 KB (1 MB). -d daemon Set name of daemon to be used in hosts access file. See hosts_access 5 and tcpd 8 . A listener-address consists of an optional transport mode followed by a colon (:) followed by a listener address. The transport mode is either a file system socket unix, a SSL TCP/IP socket ssl, or a plain TCP/IP socket tcp (default). For TCP, an address has the form hostname | IP-number [: portnumber] The port number defaults to 210 (standard Z39.50 port) for privileged users (root), and 9999 for normal users. The special hostname "@" is mapped to the address INADDR_ANY, which causes the server to listen on any local interface. The default behavior for zebrasrv - if started as non-privileged user - is to establish a single TCP/IP listener, for the Z39.50 protocol, on port 9999. zebrasrv @ zebrasrv tcp:some.server.name.org:1234 zebrasrv ssl:@:3000 To start the server listening on the registered port for Z39.50, or on a filesystem socket, and to drop root privileges once the ports are bound, execute the server like this from a root shell: zebrasrv -u daemon @ zebrasrv -u daemon tcp:@:210 zebrasrv -u daemon unix:/some/file/system/socket Here daemon is an existing user account, and the unix socket /some/file/system/socket is readable and writable for the daemon account. <acronym>Z39.50</acronym> Protocol Support and Behavior <acronym>Z39.50</acronym> Initialization During initialization, the server will negotiate to version 3 of the Z39.50 protocol, and the option bits for Search, Present, Scan, NamedResultSets, and concurrentOperations will be set, if requested by the client. The maximum PDU size is negotiated down to a maximum of 1 MB by default. <acronym>Z39.50</acronym> Search The supported query type are 1 and 101. All operators are currently supported with the restriction that only proximity units of type "word" are supported for the proximity operator. Queries can be arbitrarily complex. Named result sets are supported, and result sets can be used as operands without limitations. Searches may span multiple databases. The server has full support for piggy-backed retrieval (see also the following section). <acronym>Z39.50</acronym> Present The present facility is supported in a standard fashion. The requested record syntax is matched against the ones supported by the profile of each record retrieved. If no record syntax is given, SUTRS is the default. The requested element set name, again, is matched against any provided by the relevant record profiles. <acronym>Z39.50</acronym> Scan The attribute combinations provided with the termListAndStartPoint are processed in the same way as operands in a query (see above). Currently, only the term and the globalOccurrences are returned with the termInfo structure. <acronym>Z39.50</acronym> Sort Z39.50 specifies three different types of sort criteria. Of these Zebra supports the attribute specification type in which case the use attribute specifies the "Sort register". Sort registers are created for those fields that are of type "sort" in the default.idx file. The corresponding character mapping file in default.idx specifies the ordinal of each character used in the actual sort. Z39.50 allows the client to specify sorting on one or more input result sets and one output result set. Zebra supports sorting on one result set only which may or may not be the same as the output result set. <acronym>Z39.50</acronym> Close If a Close PDU is received, the server will respond with a Close PDU with reason=FINISHED, no matter which protocol version was negotiated during initialization. If the protocol version is 3 or more, the server will generate a Close PDU under certain circumstances, including a session timeout (60 minutes by default), and certain kinds of protocol errors. Once a Close PDU has been sent, the protocol association is considered broken, and the transport connection will be closed immediately upon receipt of further data, or following a short timeout. <acronym>Z39.50</acronym> Explain Zebra maintains a "classic" Z39.50 Explain database on the side. This database is called IR-Explain-1 and can be searched using the attribute set exp-1. The records in the explain database are of type grs.sgml. The root element for the Explain grs.sgml records is explain, thus explain.abs is used for indexing. Zebra must be able to locate explain.abs in order to index the Explain records properly. Zebra will work without it but the information will not be searchable. The <acronym>SRU</acronym> Server In addition to Z39.50, Zebra supports the more recent and web-friendly IR protocol SRU. SRU can be carried over SOAP or a REST-like protocol that uses HTTP GET or POST to request search responses. The request itself is made of parameters such as query, startRecord, maximumRecords and recordSchema; the response is an XML document containing hit-count, result-set records, diagnostics, etc. SRU can be thought of as a re-casting of Z39.50 semantics in web-friendly terms; or as a standardisation of the ad-hoc query parameters used by search engines such as Google and AltaVista; or as a superset of A9's OpenSearch (which it predates). Zebra supports Z39.50, SRU GET, SRU POST, SRU SOAP (SRW) - on the same port, recognising what protocol is used by each incoming requests and handling them accordingly. This is a achieved through the use of Deep Magic; civilians are warned not to stand too close. Running zebrasrv as an <acronym>SRU</acronym> Server Because Zebra supports all protocols on one port, it would seem to follow that the SRU server is run in the same way as the Z39.50 server, as described above. This is true, but only in an uninterestingly vacuous way: a Zebra server run in this manner will indeed recognise and accept SRU requests; but since it doesn't know how to handle the CQL queries that these protocols use, all it can do is send failure responses. It is possible to cheat, by having SRU search Zebra with a PQF query instead of CQL, using the x-pquery parameter instead of query. This is a non-standard extension of CQL, and a very naughty thing to do, but it does give you a way to see Zebra serving SRU ``right out of the box''. If you start your favourite Zebra server in the usual way, on port 9999, then you can send your web browser to: http://localhost:9999/Default?version=1.1 &operation=searchRetrieve &x-pquery=mineral &startRecord=1 &maximumRecords=1 This will display the XML-formatted SRU response that includes the first record in the result-set found by the query mineral. (For clarity, the SRU URL is shown here broken across lines, but the lines should be joined together to make single-line URL for the browser to submit.) In order to turn on Zebra's support for CQL queries, it's necessary to have the YAZ generic front-end (which Zebra uses) translate them into the Z39.50 Type-1 query format that is used internally. And to do this, the generic front-end's own configuration file must be used. See ; the salient point for SRU support is that zebrasrv must be started with the -f frontendConfigFile option rather than the -c zebraConfigFile option, and that the front-end configuration file must include both a reference to the Zebra configuration file and the CQL-to-PQF translator configuration file. A minimal front-end configuration file that does this would read as follows: <yazgfs> <server> <config>zebra.cfg</config> <cql2rpn>../../tab/pqf.properties</cql2rpn> </server> </yazgfs> The <config> element contains the name of the Zebra configuration file that was previously specified by the -c command-line argument, and the <cql2rpn> element contains the name of the CQL properties file specifying how various CQL indexes, relations, etc. are translated into Type-1 queries. A zebra server running with such a configuration can then be queried using proper, conformant SRU URLs with CQL queries: http://localhost:9999/Default?version=1.1 &operation=searchRetrieve &query=title=utah and description=epicent* &startRecord=1 &maximumRecords=1 <acronym>SRU</acronym> Protocol Support and Behavior Zebra running as an SRU server supports SRU version 1.1, including CQL version 1.1. In particular, it provides support for the following elements of the protocol. <acronym>SRU</acronym> Search and Retrieval Zebra supports the SRU searchRetrieve operation. One of the great strengths of SRU is that it mandates a standard query language, CQL, and that all conforming implementations can therefore be trusted to correctly interpret the same queries. It is with some shame, then, that we admit that Zebra also supports an additional query language, our own Prefix Query Format (PQF). A PQF query is submitted by using the extension parameter x-pquery, in which case the query parameter must be omitted, which makes the request not valid SRU. Please feel free to use this facility within your own applications; but be aware that it is not only non-standard SRU but not even syntactically valid, since it omits the mandatory query parameter. <acronym>SRU</acronym> Scan Zebra supports SRU scan operation. Scanning using CQL syntax is the default, where the standard scanClause parameter is used. In addition, a mutant form of SRU scan is supported, using the non-standard x-pScanClause parameter in place of the standard scanClause to scan on a PQF query clause. <acronym>SRU</acronym> Explain Zebra supports SRU explain. The ZeeRex record explaining a database may be requested either with a fully fledged SRU request (with operation=explain and version-number specified) or with a simple HTTP GET at the server's basename. The ZeeRex record returned in response is the one embedded in the YAZ Frontend Server configuration file that is described in the . Unfortunately, the data found in the CQL-to-PQF text file must be added by hand-craft into the explain section of the YAZ Frontend Server configuration file to be able to provide a suitable explain record. Too bad, but this is all extreme new alpha stuff, and a lot of work has yet to be done .. There is no linkage whatsoever between the Z39.50 explain model and the SRU explain response (well, at least not implemented in Zebra, that is ..). Zebra does not provide a means using Z39.50 to obtain the ZeeRex record. Other <acronym>SRU</acronym> operations In the Z39.50 protocol, Initialization, Present, Sort and Close are separate operations. In SRU, however, these operations do not exist. SRU has no explicit initialization handshake phase, but commences immediately with searching, scanning and explain operations. Neither does SRU have a close operation, since the protocol is stateless and each request is self-contained. (It is true that multiple SRU request/response pairs may be implemented as multiple HTTP request/response pairs over a single persistent TCP/IP connection; but the closure of that connection is not a protocol-level operation.) Retrieval in SRU is part of the searchRetrieve operation, in which a search is submitted and the response includes a subset of the records in the result set. There is no direct analogue of Z39.50's Present operation which requests records from an established result set. In SRU, this is achieved by sending a subsequent searchRetrieve request with the query cql.resultSetId=id where id is the identifier of the previously generated result-set. Sorting in CQL is done within the searchRetrieve operation - in v1.1, by an explicit sort parameter, but the forthcoming v1.2 or v2.0 will most likely use an extension of the query language, CQL sorting. It can be seen, then, that while Zebra operating as an SRU server does not provide the same set of operations as when operating as a Z39.50 server, it does provide equivalent functionality. <acronym>SRU</acronym> Examples Surf into http://localhost:9999 to get an explain response, or use http://localhost:9999/?version=1.1&operation=explain See number of hits for a query http://localhost:9999/?version=1.1&operation=searchRetrieve &query=text=(plant%20and%20soil) Fetch record 5-7 in Dublin Core format http://localhost:9999/?version=1.1&operation=searchRetrieve &query=text=(plant%20and%20soil) &startRecord=5&maximumRecords=2&recordSchema=dc Even search using PQF queries using the extended naughty parameter x-pquery http://localhost:9999/?version=1.1&operation=searchRetrieve &x-pquery=@attr%201=text%20@and%20plant%20soil Or scan indexes using the extended extremely naughty parameter x-pScanClause http://localhost:9999/?version=1.1&operation=scan &x-pScanClause=@attr%201=text%20something Don't do this in production code! But it's a great fast debugging aid. <application moreinfo="none">YAZ</application> server virtual hosts The Virtual hosts mechanism allows a YAZ frontend server to support multiple backends. A backend is selected on the basis of the TCP/IP binding (port+listening address) and/or the virtual host. A backend can be configured to execute in a particular working directory. Or the YAZ frontend may perform CQL to RPN conversion, thus allowing traditional Z39.50 backends to be offered as a SRU service. SRU Explain information for a particular backend may also be specified. For the HTTP protocol, the virtual host is specified in the Host header. For the Z39.50 protocol, the virtual host is specified as in the Initialize Request in the OtherInfo, OID 1.2.840.10003.10.1000.81.1. Not all Z39.50 clients allows the VHOST information to be set. For those the selection of the backend must rely on the TCP/IP information alone (port and address). The YAZ frontend server uses XML to describe the backend configurations. Command-line option -f specifies filename of the XML configuration. The configuration uses the root element yazgfs. This element includes a list of listen elements, followed by one or more server elements. The listen describes listener (transport end point), such as TCP/IP, Unix file socket or SSL server. Content for a listener: CDATA (required) The CDATA for the listen element holds the listener string, such as tcp:@:210, tcp:server1:2100, etc. attribute id (optional) identifier for this listener. This may be referred to from server sections. We expect more information to be added for the listen section in a future version, such as CERT file for SSL servers. The server describes a server and the parameters for this server type. Content for a server: attribute id (optional) Identifier for this server. Currently not used for anything, but it might be for logging purposes. attribute listenref (optional) Specifies listener for this server. If this attribute is not given, the server is accessible from all listener. In order for the server to be used for real, however, the virtual host must match (if specified in the configuration). element config (optional) Specifies the server configuration. This is equivalent to the config specified using command line option -c. element directory (optional) Specifies a working directory for this backend server. If specified, the YAZ frontend changes current working directory to this directory whenever a backend of this type is started (backend handler bend_start), stopped (backend handler hand_stop) and initialized (bend_init). element host (optional) Specifies the virtual host for this server. If this is specified a client must specify this host string in order to use this backend. element cql2rpn (optional) Specifies a filename that includes CQL to RPN conversion for this backend server. See CQL section in YAZ manual. If given, the backend server will only "see" a Type-1/RPN query. element explain (optional) Specifies SRU ZeeRex content for this server - copied verbatim to the client. As things are now, some of the Explain content seems redundant because host information, etc. is also stored elsewhere. The format of the Explain record is described in detail, with examples, on the file at the ZeeRex web-site. The XML below configures a server that accepts connections from two ports, TCP/IP port 9900 and a local UNIX file socket. We name the TCP/IP server public and the other server internal. <yazgfs> <listen id="public">tcp:@:9900</listen> <listen id="internal">unix:/var/tmp/socket</listen> <server id="server1"> <host>server1.mydomain</host> <directory>/var/www/s1</directory> <config>config.cfg</config> </server> <server id="server2"> <host>server2.mydomain</host> <directory>/var/www/s2</directory> <config>config.cfg</config> <cql2rpn>../etc/pqf.properties</cql2rpn> <explain xmlns="http://explain.z3950.org/dtd/2.0/"> <serverInfo> <host>server2.mydomain</host> <port>9900</port> <database>a</database> </serverInfo> </explain> </server> <server id="server3" listenref="internal"> <directory>/var/www/s3</directory> <config>config.cfg</config> </server> </yazgfs> There are three configured backend servers. The first two servers, "server1" and "server2", can be reached by both listener addresses - since no listenref attribute is specified. In order to distinguish between the two a virtual host has been specified for each of server in the host elements. For "server2" elements for CQL to RPN conversion is supported and explain information has been added (a short one here to keep the example small). The third server, "server3" can only be reached via listener "internal". SEE ALSO zebraidx 1 zebra 2.0.44 idzebra-config 1 idzebra-config Script to get information about idzebra idzebra-config libraries DESCRIPTION idzebra-config is a script that returns information that your own software should use to build software that uses idzebra. The following libraries are supported: None OPTIONS --prefix[=DIR] Returns prefix of idzebra or assume a different one if DIR is specified. --version Returns version of idzebra. --libs Library specification be used when linking with idzebra. --lalibs Return library specification. --cflags Return C Compiler flags. --tab Return directory of idzebra tables. --modules Return directory for Zebra modules. FILES /usr/local/bin/idzebra-config-2.0 /usr/local/lib/libidzebra*2.0.a /usr/local/include/idzebra-2.0/idzebra/*.h idzebra-2.0.44/doc/zebrasrv.xml0000644000175000017500000004467311412332551013302 00000000000000 %local; %entities; %idcommon; ]> zebra &version; zebrasrv 8 zebrasrv Zebra Server &zebrasrv-synopsis; DESCRIPTION Zebra is a high-performance, general-purpose structured text indexing and retrieval engine. It reads structured records in a variety of input formats (e.g. email, &acro.xml;, &acro.marc;) and allows access to them through exact boolean search expressions and relevance-ranked free-text queries. zebrasrv is the &acro.z3950; and &acro.sru; frontend server for the Zebra search engine and indexer. On Unix you can run the zebrasrv server from the command line - and put it in the background. It may also operate under the inet daemon. On WIN32 you can run the server as a console application or as a WIN32 Service. OPTIONS The options for zebrasrv are the same as those for &yaz;' yaz-ztest. Option -c specifies a Zebra configuration file - if omitted zebra.cfg is read. &zebrasrv-options; &acro.z3950; Protocol Support and Behavior &acro.z3950; Initialization During initialization, the server will negotiate to version 3 of the &acro.z3950; protocol, and the option bits for Search, Present, Scan, NamedResultSets, and concurrentOperations will be set, if requested by the client. The maximum PDU size is negotiated down to a maximum of 1 MB by default. &acro.z3950; Search The supported query type are 1 and 101. All operators are currently supported with the restriction that only proximity units of type "word" are supported for the proximity operator. Queries can be arbitrarily complex. Named result sets are supported, and result sets can be used as operands without limitations. Searches may span multiple databases. The server has full support for piggy-backed retrieval (see also the following section). &acro.z3950; Present The present facility is supported in a standard fashion. The requested record syntax is matched against the ones supported by the profile of each record retrieved. If no record syntax is given, &acro.sutrs; is the default. The requested element set name, again, is matched against any provided by the relevant record profiles. &acro.z3950; Scan The attribute combinations provided with the termListAndStartPoint are processed in the same way as operands in a query (see above). Currently, only the term and the globalOccurrences are returned with the termInfo structure. &acro.z3950; Sort &acro.z3950; specifies three different types of sort criteria. Of these Zebra supports the attribute specification type in which case the use attribute specifies the "Sort register". Sort registers are created for those fields that are of type "sort" in the default.idx file. The corresponding character mapping file in default.idx specifies the ordinal of each character used in the actual sort. &acro.z3950; allows the client to specify sorting on one or more input result sets and one output result set. Zebra supports sorting on one result set only which may or may not be the same as the output result set. &acro.z3950; Close If a Close PDU is received, the server will respond with a Close PDU with reason=FINISHED, no matter which protocol version was negotiated during initialization. If the protocol version is 3 or more, the server will generate a Close PDU under certain circumstances, including a session timeout (60 minutes by default), and certain kinds of protocol errors. Once a Close PDU has been sent, the protocol association is considered broken, and the transport connection will be closed immediately upon receipt of further data, or following a short timeout. &acro.z3950; Explain Zebra maintains a "classic" &acro.z3950; Explain database on the side. This database is called IR-Explain-1 and can be searched using the attribute set exp-1. The records in the explain database are of type grs.sgml. The root element for the Explain grs.sgml records is explain, thus explain.abs is used for indexing. Zebra must be able to locate explain.abs in order to index the Explain records properly. Zebra will work without it but the information will not be searchable. The &acro.sru; Server In addition to &acro.z3950;, Zebra supports the more recent and web-friendly IR protocol &acro.sru;. &acro.sru; can be carried over &acro.soap; or a &acro.rest;-like protocol that uses HTTP &acro.get; or &acro.post; to request search responses. The request itself is made of parameters such as query, startRecord, maximumRecords and recordSchema; the response is an &acro.xml; document containing hit-count, result-set records, diagnostics, etc. &acro.sru; can be thought of as a re-casting of &acro.z3950; semantics in web-friendly terms; or as a standardisation of the ad-hoc query parameters used by search engines such as Google and AltaVista; or as a superset of A9's OpenSearch (which it predates). Zebra supports &acro.z3950;, &acro.sru; &acro.get;, SRU &acro.post;, SRU &acro.soap; (&acro.srw;) - on the same port, recognising what protocol is used by each incoming requests and handling them accordingly. This is a achieved through the use of Deep Magic; civilians are warned not to stand too close. Running zebrasrv as an &acro.sru; Server Because Zebra supports all protocols on one port, it would seem to follow that the &acro.sru; server is run in the same way as the &acro.z3950; server, as described above. This is true, but only in an uninterestingly vacuous way: a Zebra server run in this manner will indeed recognise and accept &acro.sru; requests; but since it doesn't know how to handle the &acro.cql; queries that these protocols use, all it can do is send failure responses. It is possible to cheat, by having &acro.sru; search Zebra with a &acro.pqf; query instead of &acro.cql;, using the x-pquery parameter instead of query. This is a non-standard extension of &acro.cql;, and a very naughty thing to do, but it does give you a way to see Zebra serving &acro.sru; ``right out of the box''. If you start your favourite Zebra server in the usual way, on port 9999, then you can send your web browser to: http://localhost:9999/Default?version=1.1 &operation=searchRetrieve &x-pquery=mineral &startRecord=1 &maximumRecords=1 This will display the &acro.xml;-formatted &acro.sru; response that includes the first record in the result-set found by the query mineral. (For clarity, the &acro.sru; URL is shown here broken across lines, but the lines should be joined together to make single-line URL for the browser to submit.) In order to turn on Zebra's support for &acro.cql; queries, it's necessary to have the &yaz; generic front-end (which Zebra uses) translate them into the &acro.z3950; Type-1 query format that is used internally. And to do this, the generic front-end's own configuration file must be used. See ; the salient point for &acro.sru; support is that zebrasrv must be started with the -f frontendConfigFile option rather than the -c zebraConfigFile option, and that the front-end configuration file must include both a reference to the Zebra configuration file and the &acro.cql;-to-&acro.pqf; translator configuration file. A minimal front-end configuration file that does this would read as follows: zebra.cfg ../../tab/pqf.properties ]]> The <config> element contains the name of the Zebra configuration file that was previously specified by the -c command-line argument, and the <cql2rpn> element contains the name of the &acro.cql; properties file specifying how various &acro.cql; indexes, relations, etc. are translated into Type-1 queries. A zebra server running with such a configuration can then be queried using proper, conformant &acro.sru; URLs with &acro.cql; queries: http://localhost:9999/Default?version=1.1 &operation=searchRetrieve &query=title=utah and description=epicent* &startRecord=1 &maximumRecords=1 &acro.sru; Protocol Support and Behavior Zebra running as an &acro.sru; server supports SRU version 1.1, including &acro.cql; version 1.1. In particular, it provides support for the following elements of the protocol. &acro.sru; Search and Retrieval Zebra supports the &acro.sru; searchRetrieve operation. One of the great strengths of &acro.sru; is that it mandates a standard query language, &acro.cql;, and that all conforming implementations can therefore be trusted to correctly interpret the same queries. It is with some shame, then, that we admit that Zebra also supports an additional query language, our own Prefix Query Format (&acro.pqf;). A &acro.pqf; query is submitted by using the extension parameter x-pquery, in which case the query parameter must be omitted, which makes the request not valid &acro.sru;. Please feel free to use this facility within your own applications; but be aware that it is not only non-standard &acro.sru; but not even syntactically valid, since it omits the mandatory query parameter. &acro.sru; Scan Zebra supports &acro.sru; scan operation. Scanning using &acro.cql; syntax is the default, where the standard scanClause parameter is used. In addition, a mutant form of &acro.sru; scan is supported, using the non-standard x-pScanClause parameter in place of the standard scanClause to scan on a &acro.pqf; query clause. &acro.sru; Explain Zebra supports &acro.sru; explain. The ZeeRex record explaining a database may be requested either with a fully fledged &acro.sru; request (with operation=explain and version-number specified) or with a simple HTTP &acro.get; at the server's basename. The ZeeRex record returned in response is the one embedded in the &yaz; Frontend Server configuration file that is described in the . Unfortunately, the data found in the &acro.cql;-to-&acro.pqf; text file must be added by hand-craft into the explain section of the &yaz; Frontend Server configuration file to be able to provide a suitable explain record. Too bad, but this is all extreme new alpha stuff, and a lot of work has yet to be done .. There is no linkage whatsoever between the &acro.z3950; explain model and the &acro.sru; explain response (well, at least not implemented in Zebra, that is ..). Zebra does not provide a means using &acro.z3950; to obtain the ZeeRex record. Other &acro.sru; operations In the &acro.z3950; protocol, Initialization, Present, Sort and Close are separate operations. In &acro.sru;, however, these operations do not exist. &acro.sru; has no explicit initialization handshake phase, but commences immediately with searching, scanning and explain operations. Neither does &acro.sru; have a close operation, since the protocol is stateless and each request is self-contained. (It is true that multiple &acro.sru; request/response pairs may be implemented as multiple HTTP request/response pairs over a single persistent TCP/IP connection; but the closure of that connection is not a protocol-level operation.) Retrieval in &acro.sru; is part of the searchRetrieve operation, in which a search is submitted and the response includes a subset of the records in the result set. There is no direct analogue of &acro.z3950;'s Present operation which requests records from an established result set. In &acro.sru;, this is achieved by sending a subsequent searchRetrieve request with the query cql.resultSetId=id where id is the identifier of the previously generated result-set. Sorting in &acro.cql; is done within the searchRetrieve operation - in v1.1, by an explicit sort parameter, but the forthcoming v1.2 or v2.0 will most likely use an extension of the query language, &acro.cql; sorting. It can be seen, then, that while Zebra operating as an &acro.sru; server does not provide the same set of operations as when operating as a &acro.z3950; server, it does provide equivalent functionality. &acro.sru; Examples Surf into http://localhost:9999 to get an explain response, or use See number of hits for a query Fetch record 5-7 in Dublin Core format Even search using &acro.pqf; queries using the extended naughty parameter x-pquery Or scan indexes using the extended extremely naughty parameter x-pScanClause Don't do this in production code! But it's a great fast debugging aid. &yaz; server virtual hosts &zebrasrv-virtual; SEE ALSO zebraidx 1 idzebra-2.0.44/doc/installation.html0000644000175000017500000002456111412336551014307 00000000000000Chapter 2. Installation

    Chapter 2. Installation

    Zebra is written in ANSI C and was implemented with portability in mind. We primarily use GCC on UNIX and Microsoft Visual C++ on Windows.

    The software is regularly tested on Debian GNU/Linux, Red Hat Linux, Gentoo Linux, SuSE Linux, FreeBSD (i386), MAC OSX, SunOS 5.9 (sparc), Windows 2000.

    Zebra can be configured to use the following utilities (most of which are optional):

    YAZ (required)

    Zebra uses YAZ to support Z39.50 / SRU. Zebra also uses a lot of other utilities (not related to networking), such as memory management and XML support.

    For the DOM XML / ALVIS record filters, YAZ must be compiled with Libxml2 and Libxslt support and Libxml2 must be version 2.6.15 or later.

    iconv (optional)

    Character set conversion. This is required if you're going to use any other character set than UTF-8 and ISO-8859-1 for records. Note that some Unixes has iconv built-in.

    Expat (optional)

    XML parser. If you're going to index real XML you should install this (filter grs.xml). On most systems you should be able to find binary Expat packages.

    Tcl (optional)

    Tcl is required if you need to use the Tcl record filter for Zebra. You can find binary packages for Tcl for many Unices and Windows.

    Autoconf, Automake (optional)

    GNU Automake and Autoconf are only required if you're using the CVS version of Zebra. You do not need these if you have fetched a Zebra tar.

    Docbook and friends (optional)

    These tools are only required if you're writing documentation for Zebra. You need the following Debian packages: docbook, docbook-xml, docbook-xsl, docbook-utils, xsltproc.

    1. UNIX

    On Unix, GCC works fine, but any native C compiler should be possible to use as long as it is ANSI C compliant.

    Unpack the distribution archive. The configure shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a Makefile in each directory of Zebra.

    To run the configure script type:

         ./configure
        

    The configure script attempts to use C compiler specified by the CC environment variable. If this is not set, cc or GNU C will be used. The CFLAGS environment variable holds options to be passed to the C compiler. If you're using a Bourne-shell compatible shell you may pass something like this:

         CC=/opt/ccs/bin/cc CFLAGS=-O ./configure
        

    The configure script support various options: you can see what they are with

         ./configure --help
        

    Once the build environment is configured, build the software by typing:

         make
        

    If the build is successful, two executables are created in the sub-directory index:

    zebrasrv

    The Z39.50 server and search engine.

    zebraidx

    The administrative indexing tool.

    index/*.so

    The .so-files are Zebra record filter modules. There are modules for reading MARC (mod-grs-marc.so), XML (mod-grs-xml.so) , etc.

    Note

    Using configure option --disable-shared builds Zebra statically and links "in" Zebra filter code statically, i.e. no .so-files are generated

    You can now use Zebra. If you wish to install it system-wide, then as root type

         make install
        

    By default this will install the Zebra executables in /usr/local/bin, and the standard configuration files in /usr/local/share/idzebra-2.0. If shared modules are built, these are installed in /usr/local/lib/idzebra-2.0/modules. You can override this with the --prefix option to configure.

    idzebra-2.0.44/doc/Makefile.in0000644000175000017500000006501611412336424012764 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/local.ent.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = local.ent CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" \ "$(DESTDIR)$(docdir)" man8dir = $(mandir)/man8 NROFF = nroff MANS = $(man_MANS) DATA = $(doc_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = $(datadir)/doc/$(PACKAGE)$(PACKAGE_SUFFIX) dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ SUBDIRS = common XMLMAN = zebraidx.xml zebrasrv.xml idzebra-config.xml XMLFILES = \ administration.xml \ architecture.xml \ field-structure.xml \ gpl-2.0.xml \ indexdata.xml \ installation.xml \ introduction.xml \ license.xml \ marc_indexing.xml \ querymodel.xml \ recordmodel-domxml.xml \ recordmodel-alvisxslt.xml \ recordmodel-grs.xml \ manref.xml \ tutorial.xml \ zebra.xml \ zebrasrv-options.xml \ zebrasrv-synopsis.xml \ zebrasrv-virtual.xml #examples.xml #quickstart.xml HTMLFILES = index.html PNGFILES = zebra.png domfilter.png EPSFILES = zebra.eps domfilter.eps PDFFILES = zebra.pdf domfilter.pdf MANFILES = zebraidx$(PACKAGE_SUFFIX).1 \ zebrasrv$(PACKAGE_SUFFIX).8 \ idzebra-config$(PACKAGE_SUFFIX).1 doc_DATA = $(HTMLFILES) $(PNGFILES) man_MANS = $(MANFILES) EXTRA_DIST = $(XMLFILES) $(XMLMAN) \ $(doc_DATA) zebra.eps $(man_MANS) \ marc_indexing.xml entities.ent local.ent.in domfilter.svg all: all-recursive .SUFFIXES: .SUFFIXES: .eps .pdf $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): local.ent: $(top_builddir)/config.status $(srcdir)/local.ent.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } install-man8: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" @list=''; test -n "$(man8dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.8[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ done; } uninstall-man8: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man8dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.8[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } install-docDATA: $(doc_DATA) @$(NORMAL_INSTALL) test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done uninstall-docDATA: @$(NORMAL_UNINSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(docdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-recursive all-am: Makefile $(MANS) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(docdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-docDATA install-man @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-man1 install-man8 install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-docDATA uninstall-man @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook uninstall-man: uninstall-man1 uninstall-man8 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-data-am install-strip tags-recursive \ uninstall-am .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive dist-hook distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-data-hook install-docDATA install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man1 install-man8 install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-docDATA uninstall-hook \ uninstall-man uninstall-man1 uninstall-man8 zebraidx$(PACKAGE_SUFFIX).1: zebraidx.xml $(MAN_COMPILE) $(srcdir)/zebraidx.xml mv zebraidx.1 zebraidx$(PACKAGE_SUFFIX).1 zebrasrv$(PACKAGE_SUFFIX).8: zebrasrv.xml zebrasrv-options.xml \ zebrasrv-synopsis.xml zebrasrv-virtual.xml $(MAN_COMPILE) $(srcdir)/zebrasrv.xml mv zebrasrv.8 zebrasrv$(PACKAGE_SUFFIX).8 idzebra-config$(PACKAGE_SUFFIX).1: idzebra-config.xml $(MAN_COMPILE) $(srcdir)/idzebra-config.xml mv idzebra-config.1 idzebra-config$(PACKAGE_SUFFIX).1 $(HTMLFILES): $(XMLFILES) $(PNGFILES) rm -f *.html $(HTML_COMPILE) $(srcdir)/zebra.xml index.tkl: $(XMLFILES) rm -f *.tkl $(TKL_COMPILE) $(srcdir)/zebra.xml zebra.pdf: $(XMLFILES) domfilter.pdf for i in $(PNGFILES); do \ if test ! -f $$i; then cp $(srcdir)/$$i .; fi; \ done $(PDF_COMPILE) $(srcdir)/zebra.xml manref.xml: $(XMLMAN) $(srcdir)/common/ref2dbinc.xsl rm -f manref.xml for i in $(XMLMAN); do \ xsltproc $(srcdir)/common/stripref.xsl $(srcdir)/$$i | sed 1d >> manref.xml; \ done gils.txt: gils.sgml sgml2txt -f gils.sgml gils.ps: gils.sgml sgml2latex -o ps -p a4 gils.sgml gils.html: gils.sgml sgml2html gils.sgml clean-data-hook: rm -f [0-9]* *.bak dist-hook: if test -f index.html; then d=.; else d="$(srcdir)"; fi; \ for p in $$d/*.html; do \ cp $$p $(distdir); \ done install-data-hook: cd $(DESTDIR)$(man1dir) && ln -sf zebraidx$(PACKAGE_SUFFIX).1 zebraidx.1 cd $(DESTDIR)$(man8dir) && ln -sf zebrasrv$(PACKAGE_SUFFIX).8 zebrasrv.8 cd $(DESTDIR)$(man1dir) && ln -sf idzebra-config$(PACKAGE_SUFFIX).1 idzebra-config.1 if test -f index.html; then d=.; else d="$(srcdir)"; fi; \ for p in $$d/*.html; do \ $(INSTALL_DATA) $$p $(DESTDIR)$(docdir); \ done uninstall-hook: rm -r $(DESTDIR)$(docdir) domfilter.png: domfilter.svg unset DISPLAY; inkscape --export-png=$@ --export-width=600 $? domfilter.eps: domfilter.svg unset DISPLAY; inkscape --export-eps=$@ --export-bbox-page $? doc-clean: rm -f manref.xml *.html *.pdf *.[0-9] domfilter.png domfilter.eps .eps.pdf: epstopdf -hires $? # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/doc/features.html0000644000175000017500000007005011412336551013416 000000000000002. Zebra Features Overview

    2. Zebra Features Overview

    2.1. Zebra Document Model

    Table 1.1. Zebra document model

    FeatureAvailabilityNotesReference
    Complex semi-structured DocumentsXML and GRS-1 DocumentsBoth XML and GRS-1 documents exhibit a DOM like internal representation allowing for complex indexing and display rulesChapter 8, ALVIS XML Record Model and Filter Module and Chapter 9, GRS-1 Record Model and Filter Modules
    Input document formatsXML, SGML, Text, ISO2709 (MARC) A system of input filters driven by regular expressions allows most ASCII-based data formats to be easily processed. SGML, XML, ISO2709 (MARC), and raw text are also supported.Section 2.5, “Record Models and Filter Modules”
    Document storageIndex-only, Key storage, Document storageData can be, and usually is, imported into Zebra's own storage, but Zebra can also refer to external files, building and maintaining indexes of "live" collections. 

    2.2. Zebra Search Features

    Table 1.2. Zebra search functionality

    FeatureAvailabilityNotesReference
    Query languagesCQL and RPN/PQFThe type-1 Reverse Polish Notation (RPN) and its textual representation Prefix Query Format (PQF) are supported. The Common Query Language (CQL) can be configured as a mapping from CQL to RPN/PQFSection 1.1.1, “Prefix Query Format (PQF)” and Section 4, “Server Side CQL to PQF Query Translation”
    Complex boolean query treeCQL and RPN/PQFBoth CQL and RPN/PQF allow atomic query parts (APT) to be combined into complex boolean query treesSection 2.1, “RPN tree structure”
    Field searchuser definedAtomic query parts (APT) are either general, or directed at user-specified document fields Section 2.1.3, “Atomic queries (APT)”, Section 2.1.5, “Zebra's special access point of type 'string'”, Section 2.3.1, “Use Attributes (type 1)”, and Section 3.4.1, “IDXPATH Use Attributes (type = 1)”
    Data normalizationuser definedData normalization, text tokenization and character mappings can be applied during indexing and searchingChapter 10, Field Structure and Character Sets
    Predefined field typesuser definedData fields can be indexed as phrase, as into word tokenized text, as numeric values, URLs, dates, and raw binary data.Section 2, “Charmap Files” and Section 3.5.2, “Mapping of PQF APT structure and completeness to register type”
    Regular expression matchingavailableFull regular expression matching and "approximate matching" (e.g. spelling mistake corrections) are handled.Section 3.6, “Zebra Regular Expressions in Truncation Attribute (type = 5)”
    Term truncationleft, right, left-and-rightThe truncation attribute specifies whether variations of one or more characters are allowed between search term and hit terms, or not. Using non-default truncation attributes will broaden the document hit set of a search query.Section 2.4.4, “Truncation Attributes (type = 5)”
    Fuzzy searchesSpelling correctionIn addition, fuzzy searches are implemented, where one spelling mistake in search terms is matchedSection 2.4.4, “Truncation Attributes (type = 5)”

    2.3. Zebra Index Scanning

    Table 1.3. Zebra index scanning

    FeatureAvailabilityNotesReference
    Scanterm suggestionsScan on a given named index returns all the indexed terms in lexicographical order near the given start term. This can be used to create drop-down menus and search suggestions.Section 1.2.3, “Scan Operation” and Section 2.1.3, “Atomic queries (APT)”
    Facetted browsingavailableZebra 2.1 and allows retrieval of facets for a result set. Section 3.3, “Zebra specific Scan Extensions to all Attribute Sets”
    Drill-down or refine-searchpartiallyscanning in result sets can be used to implement drill-down in search clientsSection 3.3, “Zebra specific Scan Extensions to all Attribute Sets”

    2.4. Zebra Document Presentation

    Table 1.4. Zebra document presentation

    FeatureAvailabilityNotesReference
    Hit countyesSearch results include at any time the total hit count of a given query, either exact computed, or approximative, in case that the hit count exceeds a possible pre-defined hit set truncation level. Section 3.2.4, “Local Approximative Limit Attribute (type 11)” and Section 2, “The Zebra Configuration File”
    Paged result setsyesPaging of search requests and present/display request can return any successive number of records from any start position in the hit set, i.e. it is trivial to provide search results in successive pages of any size. 
    XML document transformationsXSLT based Record presentation can be performed in many pre-defined XML data formats, where the original XML records are on-the-fly transformed through any preconfigured XSLT transformation. It is therefore trivial to present records in short/full XML views, transforming to RSS, Dublin Core, or other XML based data formats, or transform records to XHTML snippets ready for inserting in XHTML pages. Section 2.2, “ALVIS Exchange Formats”
    Binary record transformationsMARC, USMARC, MARC21 and MARCXMLpost-filter record transformations 
    Record Syntaxes  Multiple record syntaxes for data retrieval: GRS-1, SUTRS, XML, ISO2709 (MARC), etc. Records can be mapped between record syntaxes and schemas on the fly. 
    Zebra internal metadatayes Zebra internal document metadata can be fetched in SUTRS and XML record syntaxes. Those are useful in client applications.Section 4, “Retrieval of Zebra internal record data”
    Zebra internal raw record datayes Zebra internal raw, binary record data can be fetched in SUTRS and XML record syntaxes, leveraging %zebra; to a binary storage systemSection 4, “Retrieval of Zebra internal record data”
    Zebra internal record field datayes Zebra internal record field data can be fetched in SUTRS and XML record syntaxes. This makes very fast minimal record data displays possible.Section 4, “Retrieval of Zebra internal record data”

    2.5. Zebra Sorting and Ranking

    Table 1.5. Zebra sorting and ranking

    FeatureAvailabilityNotesReference
    Sortnumeric, lexicographicSorting on the basis of alpha-numeric and numeric data is supported. Alphanumeric sorts can be configured for different data encodings and locales for European languages.Section 9.4, “Sorting” and Section 3.2.1, “Zebra Extension Embedded Sort Attribute (type 7)”
    Combined sortingyesSorting on the basis of combined sorts ­ e.g. combinations of ascending/descending sorts of lexicographical/numeric/date field data is supportedSection 9.4, “Sorting”
    Relevance rankingTF-IDF likeRelevance-ranking of free-text queries is supported using a TF-IDF like algorithm.Section 9.3, “Dynamic Ranking”
    Static pre-rankingyesEnables pre-index time ranking of documents where hit lists are ordered first by ascending static rank, then by ascending document ID.Section 9.2, “Static Ranking”

    2.6. Zebra Live Updates

    Table 1.6. Zebra live updates

    FeatureAvailabilityNotesReference
    Incremental and batch updates It is possible to schedule record inserts/updates/deletes in any quantity, from single individual handled records to batch updates in strikes of any size, as well as total re-indexing of all records from file system. zebraidx(1)
    Remote updatesZ39.50 extended servicesUpdates can be performed from remote locations using the Z39.50 extended services. Access to extended services can be login-password protected.Section 10, “Extended Services: Remote Insert, Update and Delete” and Section 2, “The Zebra Configuration File”
    Live updatestransaction based Data updates are transaction based and can be performed on running Zebra systems. Full searchability is preserved during life data update due to use of shadow disk areas for update operations. Multiple update transactions at the same time are lined up, to be performed one after each other. Data integrity is preserved.Section 8, “Safe Updating - Using Shadow Registers”

    2.7. Zebra Networked Protocols

    Table 1.7. Zebra networked protocols

    FeatureAvailabilityNotesReference
    Fundamental operationsZ39.50/SRU explain, search, scan, and update Section 1.2, “Operation types”
    Z39.50 protocol supportyes Protocol facilities supported are: init, search, present (retrieval), Segmentation (support for very large records), delete, scan (index browsing), sort, close and support for the update Extended Service to add or replace an existing XML record. Piggy-backed presents are honored in the search request. Named result sets are supported.the section called “Z39.50 Protocol Support and Behavior”
    Web Service supportSRU The protocol operations explain, searchRetrieve and scan are supported. CQL to internal query model RPN conversion is supported. Extended RPN queries for search/retrieve and scan are supported.the section called “SRU Protocol Support and Behavior”

    2.8. Zebra Data Size and Scalability

    Table 1.8. Zebra data size and scalability

    FeatureAvailabilityNotesReference
    No of records40-60 million  
    Data size100 GB of record dataZebra based applications have successfully indexed up to 100 GB of record data 
    Scale outmultiple discs  
    PerformanceO(n * log N) Zebra query speed and performance is affected roughly by O(log N), where N is the total database size, and by O(n), where n is the specific query hit set size. 
    Average search times  Even on very large size databases hit rates of 20 queries per seconds with average query answering time of 1 second are possible, provided that the boolean queries are constructed sufficiently precise to result in hit sets of the order of 1000 to 5.000 documents. 
    Large databases64 bit file pointers64 file pointers assure that register files can extend the 2 GB limit. Logical files can be automatically partitioned over multiple disks, thus allowing for large databases. 

    2.9. Zebra Supported Platforms

    Table 1.9. Zebra supported platforms

    FeatureAvailabilityNotesReference
    Linux GNU Linux (32 and 64bit), journaling Reiser or (better) JFS file system on disks. NFS file systems are not supported. GNU/Debian Linux packages are availableSection 2, “GNU/Debian”
    Unixtar-ballZebra is written in portable C, so it runs on most Unix-like systems. Usual tar-ball install possible on many major Unix systemsSection 1, “UNIX”
    WindowsNT/2000/2003/XPZebra runs as well on Windows (NT/2000/2003/XP). Windows installer packages availableSection 3, “WIN32”

    idzebra-2.0.44/doc/entities.ent0000644000175000017500000000217111412332551013241 00000000000000 idzebra-2.0.44/doc/idzebra-config.html0000644000175000017500000000732511412336551014470 00000000000000idzebra-config

    Name

    idzebra-config — Script to get information about idzebra

    Synopsis

    idzebra-config [--prefix[=DIR]] [--version] [--libs] [--lalibs] [--cflags] [--tab] [--modules] [libraries...]

    DESCRIPTION

    idzebra-config is a script that returns information that your own software should use to build software that uses idzebra.

    The following libraries are supported:

    None

    OPTIONS

    --prefix[=DIR]

    Returns prefix of idzebra or assume a different one if DIR is specified.

    --version

    Returns version of idzebra.

    --libs

    Library specification be used when linking with idzebra.

    --lalibs

    Return library specification.

    --cflags

    Return C Compiler flags.

    --tab

    Return directory of idzebra tables.

    --modules

    Return directory for Zebra modules.

    FILES

    /usr/local/bin/idzebra-config-2.0

    /usr/local/lib/libidzebra*2.0.a

    /usr/local/include/idzebra-2.0/idzebra/*.h

    idzebra-2.0.44/doc/installation-win32.html0000644000175000017500000001601411412336551015241 000000000000003. WIN32

    3. WIN32

    The easiest way to install Zebra on Windows is by downloading an installer from here. The installer comes with source too - in case you wish to compile Zebra with different Compiler options.

    Zebra is shipped with "makefiles" for the NMAKE tool that comes with Microsoft Visual C++. Version 2003 and 2005 has been tested. We expect that zebra compiles with version 6 as well.

    Start a command prompt and switch the sub directory WIN where the file makefile is located. Customize the installation by editing the makefile file (for example by using notepad). The following summarizes the most important settings in that file:

    DEBUG

    If set to 1, the software is compiled with debugging libraries (code generation is multi-threaded debug DLL). If set to 0, the software is compiled with release libraries (code generation is multi-threaded DLL).

    YAZDIR

    Directory of YAZ source. Zebra's makefile expects to find yaz.lib, yaz.dll in yazdir/lib and yazdir/bin respectively.

    HAVE_EXPAT, EXPAT_DIR

    If HAVE_EXPAT is set to 1, Zebra is compiled with Expat support. In this configuration, set ZEBRA_DIR to the Expat source directory. Windows version of Expat can be downloaded from SourceForge.

    HAVE_ICONV, ICONV_DIR

    If HAVE_ICONV is set to 1, Zebra is compiled with iconv support. In this configuration, set ICONV_DIR to the iconv source directory. Iconv binaries can be downloaded from this site.

    BZIP2INCLUDE, BZIP2LIB, BZIP2DEF

    Define these symbols if Zebra is to be compiled with BZIP2 record compression support.

    Warning

    The DEBUG setting in the makefile for Zebra must be set to the same value as DEBUG setting in the makefile for YAZ. If not, the Zebra server/indexer will crash.

    When satisfied with the settings in the makefile, type

         nmake
        

    Note

    If the nmake command is not found on your system you probably haven't defined the environment variables required to use that tool. To fix that, find and run the batch file vcvars32.bat. You need to run it from within the command prompt or set the environment variables "globally"; otherwise it doesn't work.

    If you wish to recompile Zebra - for example if you modify settings in the makefile you can delete object files, etc by running.

         nmake clean
        

    The following files are generated upon successful compilation:

    bin/zebraidx.exe

    The Zebra indexer.

    bin/zebrasrv.exe

    The Zebra server.

    idzebra-2.0.44/doc/introduction-apps.html0000644000175000017500000004333311412336551015266 000000000000003. References and Zebra based Applications

    3. References and Zebra based Applications

    Zebra has been deployed in numerous applications, in both the academic and commercial worlds, in application domains as diverse as bibliographic catalogues, Geo-spatial information, structured vocabulary browsing, government information locators, civic information systems, environmental observations, museum information and web indexes.

    Notable applications include the following:

    3.1. Koha free open-source ILS

    Koha is a full-featured open-source ILS, initially developed in New Zealand by Katipo Communications Ltd, and first deployed in January of 2000 for Horowhenua Library Trust. It is currently maintained by a team of software providers and library technology staff from around the globe.

    LibLime, a company that is marketing and supporting Koha, adds in the new release of Koha 3.0 the Zebra database server to drive its bibliographic database.

    In early 2005, the Koha project development team began looking at ways to improve MARC support and overcome scalability limitations in the Koha 2.x series. After extensive evaluations of the best of the Open Source textual database engines - including MySQL full-text searching, PostgreSQL, Lucene and Plucene - the team selected Zebra.

    "Zebra completely eliminates scalability limitations, because it can support tens of millions of records." explained Joshua Ferraro, LibLime's Technology President and Koha's Project Release Manager. "Our performance tests showed search results in under a second for databases with over 5 million records on a modest i386 900Mhz test server."

    "Zebra also includes support for true boolean search expressions and relevance-ranked free-text queries, both of which the Koha 2.x series lack. Zebra also supports incremental and safe database updates, which allow on-the-fly record management. Finally, since Zebra has at its heart the Z39.50 protocol, it greatly improves Koha's support for that critical library standard."

    Although the bibliographic database will be moved to Zebra, Koha 3.0 will continue to use a relational SQL-based database design for the 'factual' database. "Relational database managers have their strengths, in spite of their inability to handle large numbers of bibliographic records efficiently," summed up Ferraro, "We're taking the best from both worlds in our redesigned Koha 3.0.

    See also LibLime's newsletter article Koha Earns its Stripes.

    3.2. Kete Open Source Digital Library and Archiving software

    Kete is a digital object management repository, initially developed in New Zealand. Initial development has been a partnership between the Horowhenua Library Trust and Katipo Communications Ltd. funded as part of the Community Partnership Fund in 2006. Kete is purpose built software to enable communities to build their own digital libraries, archives and repositories.

    It is based on Ruby-on-Rails and MySQL, and integrates the Zebra server and the YAZ toolkit for indexing and retrieval of it's content. Zebra is run as separate computer process from the Kete application. See how Kete manages Zebra.

    Why does Kete wants to use Zebra?? Speed, Scalability and easy integration with Koha. Read their detailed reasoning here.

    3.3. Emilda open source ILS

    Emilda is a complete Integrated Library System, released under the GNU General Public License. It has a full featured Web-OPAC, allowing comprehensive system management from virtually any computer with an Internet connection, has template based layout allowing anyone to alter the visual appearance of Emilda, and is XML based language for fast and easy portability to virtually any language. Currently, Emilda is used at three schools in Espoo, Finland.

    As a surplus, 100% MARC compatibility has been achieved using the Zebra Server from Index Data as backend server.

    3.4. ReIndex.Net web based ILS

    Reindex.net is a netbased library service offering all traditional functions on a very high level plus many new services. Reindex.net is a comprehensive and powerful WEB system based on standards such as XML and Z39.50. updates. Reindex supports MARC21, danMARC eller Dublin Core with UTF8-encoding.

    Reindex.net runs on GNU/Debian Linux with Zebra and Simpleserver from Index Data for bibliographic data. The relational database system Sybase 9 XML is used for administrative data. Internally MARCXML is used for bibliographical records. Update utilizes Z39.50 extended services.

    3.5. DADS - the DTV Article Database Service

    DADS is a huge database of more than ten million records, totalling over ten gigabytes of data. The records are metadata about academic journal articles, primarily scientific; about 10% of these metadata records link to the full text of the articles they describe, a body of about a terabyte of information (although the full text is not indexed.)

    It allows students and researchers at DTU (Danmarks Tekniske Universitet, the Technical College of Denmark) to find and order articles from multiple databases in a single query. The database contains literature on all engineering subjects. It's available on-line through a web gateway, though currently only to registered users.

    More information can be found at http://www.dtv.dk/ and http://dads.dtv.dk

    3.6. Infonet Eprints

    The InfoNet Eprints service from the Technical Knowledge Center of Denmark provides access to documents stored in eprint/preprint servers and institutional research archives around the world. The service is based on Open Archives Initiative metadata harvesting of selected scientific archives around the world. These open archives offer free and unrestricted access to their contents.

    Infonet Eprints currently holds 1.4 million records from 16 archives. The online search facility is found at http://preprints.cvt.dk.

    3.7. Alvis

    The Alvis EU project run under the 6th Framework (IST-1-002068-STP) is building a semantic-based peer-to-peer search engine. A consortium of eleven partners from six different European Community countries plus Switzerland and China contribute with expertise in a broad range of specialties including network topologies, routing algorithms, linguistic analysis and bioinformatics.

    The Zebra information retrieval indexing machine is used inside the Alvis framework to manage huge collections of natural language processed and enhanced XML data, coming from a topic relevant web crawl. In this application, Zebra swallows and manages 37GB of XML data in about 4 hours, resulting in search times of fractions of seconds.

    3.8. ULS (Union List of Serials)

    The M25 Systems Team has created a union catalogue for the periodicals of the twenty-one constituent libraries of the University of London and the University of Westminster (http://www.m25lib.ac.uk/ULS/). They have achieved this using an unusual architecture, which they describe as a ``non-distributed virtual union catalogue''.

    The member libraries send in data files representing their periodicals, including both brief bibliographic data and summary holdings. Then 21 individual Z39.50 targets are created, each using Zebra, and all mounted on the single hardware server. The live service provides a web gateway allowing Z39.50 searching of all of the targets or a selection of them. Zebra's small footprint allows a relatively modest system to comfortably host the 21 servers.

    More information can be found at http://www.m25lib.ac.uk/ULS/

    3.9. NLI-Z39.50 - a Natural Language Interface for Libraries

    Fernuniversität Hagen in Germany have developed a natural language interface for access to library databases. In order to evaluate this interface for recall and precision, they chose Zebra as the basis for retrieval effectiveness. The Zebra server contains a copy of the GIRT database, consisting of more than 76000 records in SGML format (bibliographic records from social science), which are mapped to MARC for presentation.

    (GIRT is the German Indexing and Retrieval Testdatabase. It is a standard German-language test database for intelligent indexing and retrieval systems. See http://www.gesis.org/forschung/informationstechnologie/clef-delos.htm)

    Evaluation will take place as part of the TREC/CLEF campaign 2003 http://clef.iei.pi.cnr.it.

    For more information, contact Johannes Leveling

    3.10. Various web indexes

    Zebra has been used by a variety of institutions to construct indexes of large web sites, typically in the region of tens of millions of pages. In this role, it functions somewhat similarly to the engine of Google or AltaVista, but for a selected intranet or a subset of the whole Web.

    For example, Liverpool University's web-search facility (see on the home page at http://www.liv.ac.uk/ and many sub-pages) works by relevance-searching a Zebra database which is populated by the Harvest-NG web-crawling software.

    For more information on Liverpool university's intranet search architecture, contact John Gilbertson

    Kang-Jin Lee has recently modified the Harvest web indexer to use Zebra as its native repository engine. His comments on the switch over from the old engine are revealing:

    The first results after some testing with Zebra are very promising. The tests were done with around 220,000 SOIF files, which occupies 1.6GB of disk space.

    Building the index from scratch takes around one hour with Zebra where [old-engine] needs around five hours. While [old-engine] blocks search requests when updating its index, Zebra can still answer search requests. [...] Zebra supports incremental indexing which will speed up indexing even further.

    While the search time of [old-engine] varies from some seconds to some minutes depending how expensive the query is, Zebra usually takes around one to three seconds, even for expensive queries. [...] Zebra can search more than 100 times faster than [old-engine] and can process multiple search requests simultaneously

    I am very happy to see such nice software available under GPL.

    idzebra-2.0.44/doc/record-model-alvisxslt.html0000644000175000017500000004005411412336551016204 00000000000000Chapter 8. ALVIS XML Record Model and Filter Module

    Chapter 8. ALVIS XML Record Model and Filter Module

    Warning

    The functionality of this record model has been improved and replaced by the DOM XML record model, see Chapter 7, DOM XML Record Model and Filter Module. The Alvis XML record model is considered obsolete, and will eventually be removed from future releases of the Zebra software.

    The record model described in this chapter applies to the fundamental, structured XML record type alvis, introduced in Section 2.5.2, “ALVIS XML Record Model and Filter Module”.

    This filter has been developed under the ALVIS project funded by the European Community under the "Information Society Technologies" Program (2002-2006).

    1. ALVIS Record Filter

    The experimental, loadable Alvis XML/XSLT filter module mod-alvis.so is packaged in the GNU/Debian package libidzebra1.4-mod-alvis. It is invoked by the zebra.cfg configuration statement

         recordtype.xml: alvis.db/filter_alvis_conf.xml
        

    In this example on all data files with suffix *.xml, where the Alvis XSLT filter configuration file is found in the path db/filter_alvis_conf.xml.

    The Alvis XSLT filter configuration file must be valid XML. It might look like this (This example is used for indexing and display of OAI harvested records):

        <?xml version="1.0" encoding="UTF-8"?>
          <schemaInfo>
            <schema name="identity" stylesheet="xsl/identity.xsl" />
            <schema name="index" identifier="http://indexdata.dk/zebra/xslt/1"
                stylesheet="xsl/oai2index.xsl" />
            <schema name="dc" stylesheet="xsl/oai2dc.xsl" />
            <!-- use split level 2 when indexing whole OAI Record lists -->
            <split level="2"/>
          </schemaInfo>
        

    All named stylesheets defined inside schema element tags are for presentation after search, including the indexing stylesheet (which is a great debugging help). The names defined in the name attributes must be unique, these are the literal schema or element set names used in SRW, SRU and Z39.50 protocol queries. The paths in the stylesheet attributes are relative to zebras working directory, or absolute to file system root.

    The <split level="2"/> decides where the XML Reader shall split the collections of records into individual records, which then are loaded into DOM, and have the indexing XSLT stylesheet applied.

    There must be exactly one indexing XSLT stylesheet, which is defined by the magic attribute identifier="http://indexdata.dk/zebra/xslt/1".

    1.1. ALVIS Internal Record Representation

    When indexing, an XML Reader is invoked to split the input files into suitable record XML pieces. Each record piece is then transformed to an XML DOM structure, which is essentially the record model. Only XSLT transformations can be applied during index, search and retrieval. Consequently, output formats are restricted to whatever XSLT can deliver from the record XML structure, be it other XML formats, HTML, or plain text. In case you have libxslt1 running with EXSLT support, you can use this functionality inside the Alvis filter configuration XSLT stylesheets.

    1.2. ALVIS Canonical Indexing Format

    The output of the indexing XSLT stylesheets must contain certain elements in the magic xmlns:z="http://indexdata.dk/zebra/xslt/1" namespace. The output of the XSLT indexing transformation is then parsed using DOM methods, and the contained instructions are performed on the magic elements and their subtrees.

    For example, the output of the command

      
          xsltproc xsl/oai2index.xsl one-record.xml
         

    might look like this:

          <?xml version="1.0" encoding="UTF-8"?>
          <z:record xmlns:z="http://indexdata.dk/zebra/xslt/1" 
               z:id="oai:JTRS:CP-3290---Volume-I" 
               z:rank="47896">
           <z:index name="oai_identifier" type="0">
                    oai:JTRS:CP-3290---Volume-I</z:index>
           <z:index name="oai_datestamp" type="0">2004-07-09</z:index>
           <z:index name="oai_setspec" type="0">jtrs</z:index>
           <z:index name="dc_all" type="w">
              <z:index name="dc_title" type="w">Proceedings of the 4th 
                    International Conference and Exhibition:
                    World Congress on Superconductivity - Volume I</z:index>
              <z:index name="dc_creator" type="w">Kumar Krishen and *Calvin
                    Burnham, Editors</z:index>
           </z:index>
         </z:record>
         

    This means the following: From the original XML file one-record.xml (or from the XML record DOM of the same form coming from a split input file), the indexing stylesheet produces an indexing XML record, which is defined by the record element in the magic namespace xmlns:z="http://indexdata.dk/zebra/xslt/1". Zebra uses the content of z:id="oai:JTRS:CP-3290---Volume-I" as internal record ID, and - in case static ranking is set - the content of z:rank="47896" as static rank. Following the discussion in Section 9, “Relevance Ranking and Sorting of Result Sets” we see that this records is internally ordered lexicographically according to the value of the string oai:JTRS:CP-3290---Volume-I47896.

    In this example, the following literal indexes are constructed:

           oai_identifier
           oai_datestamp
           oai_setspec
           dc_all
           dc_title
           dc_creator
         

    where the indexing type is defined in the type attribute (any value from the standard configuration file default.idx will do). Finally, any text() node content recursively contained inside the index will be filtered through the appropriate char map for character normalization, and will be inserted in the index.

    Specific to this example, we see that the single word oai:JTRS:CP-3290---Volume-I will be literal, byte for byte without any form of character normalization, inserted into the index named oai:identifier, the text Kumar Krishen and *Calvin Burnham, Editors will be inserted using the w character normalization defined in default.idx into the index dc:creator (that is, after character normalization the index will keep the individual words kumar, krishen, and, calvin, burnham, and editors), and finally both the texts Proceedings of the 4th International Conference and Exhibition: World Congress on Superconductivity - Volume I and Kumar Krishen and *Calvin Burnham, Editors will be inserted into the index dc:all using the same character normalization map w.

    Finally, this example configuration can be queried using PQF queries, either transported by Z39.50, (here using a yaz-client)

          
          Z> open localhost:9999
          Z> elem dc
          Z> form xml
          Z>
          Z> f @attr 1=dc_creator Kumar
          Z> scan @attr 1=dc_creator adam
          Z>
          Z> f @attr 1=dc_title @attr 4=2 "proceeding congress superconductivity"
          Z> scan @attr 1=dc_title abc
          
         

    or the proprietary extensions x-pquery and x-pScanClause to SRU, and SRW

          
          http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=%40attr+1%3Ddc_creator+%40attr+4%3D6+%22the
          http://localhost:9999/?version=1.1&operation=scan&x-pScanClause=@attr+1=dc_date+@attr+4=2+a
          
         

    See the section called “The SRU Server” for more information on SRU/SRW configuration, and the section called “YAZ server virtual hosts” or the YAZ CQL section for the details or the YAZ frontend server.

    Notice that there are no *.abs, *.est, *.map, or other GRS-1 filter configuration files involves in this process, and that the literal index names are used during search and retrieval.

    idzebra-2.0.44/doc/zebra-cfg.html0000644000175000017500000003623211412336551013444 000000000000002. The Zebra Configuration File

    2. The Zebra Configuration File

    The Zebra configuration file, read by zebraidx and zebrasrv defaults to zebra.cfg unless specified by -c option.

    You can edit the configuration file with a normal text editor. parameter names and values are separated by colons in the file. Lines starting with a hash sign (#) are treated as comments.

    If you manage different sets of records that share common characteristics, you can organize the configuration settings for each type into "groups". When zebraidx is run and you wish to address a given group you specify the group name with the -g option. In this case settings that have the group name as their prefix will be used by zebraidx. If no -g option is specified, the settings without prefix are used.

    In the configuration file, the group name is placed before the option name itself, separated by a dot (.). For instance, to set the record type for group public to grs.sgml (the SGML-like format for structured records) you would write:

        public.recordType: grs.sgml
       

    To set the default value of the record type to text write:

        recordType: text
       

    The available configuration settings are summarized below. They will be explained further in the following sections.

    group .recordType[.name]: type

    Specifies how records with the file extension name should be handled by the indexer. This option may also be specified as a command line option (-t). Note that if you do not specify a name, the setting applies to all files. In general, the record type specifier consists of the elements (each element separated by dot), fundamental-type, file-read-type and arguments. Currently, two fundamental types exist, text and grs.

    group.recordId: record-id-spec

    Specifies how the records are to be identified when updated. See Section 3, “Locating Records”.

    group.database: database

    Specifies the Z39.50 database name.

    group.storeKeys: boolean

    Specifies whether key information should be saved for a given group of records. If you plan to update/delete this type of records later this should be specified as 1; otherwise it should be 0 (default), to save register space. See Section 5, “Indexing with File Record IDs”.

    group.storeData: boolean

    Specifies whether the records should be stored internally in the Zebra system files. If you want to maintain the raw records yourself, this option should be false (0). If you want Zebra to take care of the records for you, it should be true(1).

    register: register-location

    Specifies the location of the various register files that Zebra uses to represent your databases. See Section 7, “Register Location”.

    shadow: register-location

    Enables the safe update facility of Zebra, and tells the system where to place the required, temporary files. See Section 8, “Safe Updating - Using Shadow Registers”.

    lockDir: directory

    Directory in which various lock files are stored.

    keyTmpDir: directory

    Directory in which temporary files used during zebraidx's update phase are stored.

    setTmpDir: directory

    Specifies the directory that the server uses for temporary result sets. If not specified /tmp will be used.

    profilePath: path

    Specifies a path of profile specification files. The path is composed of one or more directories separated by colon. Similar to PATH for UNIX systems.

    modulePath: path

    Specifies a path of record filter modules. The path is composed of one or more directories separated by colon. Similar to PATH for UNIX systems. The 'make install' procedure typically puts modules in /usr/local/lib/idzebra-2.0/modules.

    index: filename

    Defines the filename which holds fields structure definitions. If omitted, the file default.idx is read. Refer to Section 1, “The default.idx file” for more information.

    sortmax: integer

    Specifies the maximum number of records that will be sorted in a result set. If the result set contains more than integer records, records after the limit will not be sorted. If omitted, the default value is 1,000.

    staticrank: integer

    Enables whether static ranking is to be enabled (1) or disabled (0). If omitted, it is disabled - corresponding to a value of 0. Refer to Section 9.2, “Static Ranking” .

    estimatehits:: integer

    Controls whether Zebra should calculate approximate hit counts and at which hit count it is to be enabled. A value of 0 disables approximate hit counts. For a positive value approximate hit count is enabled if it is known to be larger than integer.

    Approximate hit counts can also be triggered by a particular attribute in a query. Refer to Section 3.2.5, “Global Approximative Limit Attribute (type 12)”.

    attset: filename

    Specifies the filename(s) of attribute set files for use in searching. In many configurations bib1.att is used, but that is not required. If Classic Explain attributes is to be used for searching, explain.att must be given. The path to att-files in general can be given using profilePath setting. See also Section 3.4, “The Attribute Set (.att) Files”.

    memMax: size

    Specifies size of internal memory to use for the zebraidx program. The amount is given in megabytes - default is 4 (4 MB). The more memory, the faster large updates happen, up to about half the free memory available on the computer.

    tempfiles: Yes/Auto/No

    Tells zebra if it should use temporary files when indexing. The default is Auto, in which case zebra uses temporary files only if it would need more that memMax megabytes of memory. This should be good for most uses.

    root: dir

    Specifies a directory base for Zebra. All relative paths given (in profilePath, register, shadow) are based on this directory. This setting is useful if your Zebra server is running in a different directory from where zebra.cfg is located.

    passwd: file

    Specifies a file with description of user accounts for Zebra. The format is similar to that known to Apache's htpasswd files and UNIX' passwd files. Non-empty lines not beginning with # are considered account lines. There is one account per-line. A line consists of fields separate by a single colon character. First field is username, second is password.

    passwd.c: file

    Specifies a file with description of user accounts for Zebra. File format is similar to that used by the passwd directive except that the password are encrypted. Use Apache's htpasswd or similar for maintenance.

    perm.user: permstring

    Specifies permissions (privilege) for a user that are allowed to access Zebra via the passwd system. There are two kinds of permissions currently: read (r) and write(w). By default users not listed in a permission directive are given the read privilege. To specify permissions for a user with no username, or Z39.50 anonymous style use anonymous. The permstring consists of a sequence of characters. Include character w for write/update access, r for read access and a to allow anonymous access through this account.

    dbaccess accessfile

    Names a file which lists database subscriptions for individual users. The access file should consists of lines of the form username: dbnames, where dbnames is a list of database names, separated by '+'. No whitespace is allowed in the database list.

    encoding charsetname

    Tells Zebra to interpret the terms in Z39.50 queries as having been encoded using the specified character encoding. The default is ISO-8859-1; one useful alternative is UTF-8.

    idzebra-2.0.44/doc/idzebra-config.xml0000644000175000017500000000643311412332551014317 00000000000000 %local; %entities; %idcommon; ]> zebra &version; idzebra-config 1 idzebra-config Script to get information about idzebra idzebra-config libraries DESCRIPTION idzebra-config is a script that returns information that your own software should use to build software that uses idzebra. The following libraries are supported: None OPTIONS --prefix[=DIR] Returns prefix of idzebra or assume a different one if DIR is specified. --version Returns version of idzebra. --libs Library specification be used when linking with idzebra. --lalibs Return library specification. --cflags Return C Compiler flags. --tab Return directory of idzebra tables. --modules Return directory for &zebra; modules. FILES &prefix;/bin/idzebra-config-2.0 &prefix;/lib/libidzebra*2.0.a &prefix;/include/idzebra-2.0/idzebra/*.h idzebra-2.0.44/doc/index.html0000644000175000017500000010764311412336551012720 00000000000000Zebra - User's Guide and Reference

    Zebra - User's Guide and Reference

    Adam Dickmeiss

    Heikki Levanto

    Marc Cromme

    Mike Taylor

    Sebastian Hammer

    2.0.44

    Abstract

    Zebra is a free, fast, friendly information management system. It can index records in XML, SGML, MARC, e-mail archives and many other formats, and quickly find them using a combination of boolean searching and relevance ranking. Search-and-retrieve applications can be written using APIs in a wide variety of languages, communicating with the Zebra server using industry-standard information-retrieval protocols or web services.

    This manual explains how to build and install Zebra, configure it appropriately for your application, add data and set up a running information service. It describes version 2.0.44 of Zebra.


    Table of Contents

    1. Introduction
    1. Overview
    2. Zebra Features Overview
    2.1. Zebra Document Model
    2.2. Zebra Search Features
    2.3. Zebra Index Scanning
    2.4. Zebra Document Presentation
    2.5. Zebra Sorting and Ranking
    2.6. Zebra Live Updates
    2.7. Zebra Networked Protocols
    2.8. Zebra Data Size and Scalability
    2.9. Zebra Supported Platforms
    3. References and Zebra based Applications
    3.1. Koha free open-source ILS
    3.2. Kete Open Source Digital Library and Archiving software
    3.3. Emilda open source ILS
    3.4. ReIndex.Net web based ILS
    3.5. DADS - the DTV Article Database Service
    3.6. Infonet Eprints
    3.7. Alvis
    3.8. ULS (Union List of Serials)
    3.9. NLI-Z39.50 - a Natural Language Interface for Libraries
    3.10. Various web indexes
    4. Support
    2. Installation
    1. UNIX
    2. GNU/Debian
    2.1. GNU/Debian Linux on i686 Platform
    2.2. Ubuntu/Debian and GNU/Debian on other platforms
    3. WIN32
    4. Upgrading from Zebra version 1.3.x
    3. Tutorial
    1. A first OAI indexing example
    2. Searching the OAI database by web service
    3. Presenting search results in different formats
    4. More interesting searches
    5. Investigating the content of the indexes
    6. Setting up a correct SRU web service
    7. Searching the OAI database by Z39.50 protocol
    4. Overview of Zebra Architecture
    1. Local Representation
    2. Main Components
    2.1. Core Zebra Libraries Containing Common Functionality
    2.2. Zebra Indexer
    2.3. Zebra Searcher/Retriever
    2.4. YAZ Server Frontend
    2.5. Record Models and Filter Modules
    2.5.1. DOM XML Record Model and Filter Module
    2.5.2. ALVIS XML Record Model and Filter Module
    2.5.3. GRS-1 Record Model and Filter Modules
    2.5.4. TEXT Record Model and Filter Module
    3. Indexing and Retrieval Workflow
    4. Retrieval of Zebra internal record data
    5. Query Model
    1. Query Model Overview
    1.1. Query Languages
    1.1.1. Prefix Query Format (PQF)
    1.1.2. Common Query Language (CQL)
    1.2. Operation types
    1.2.1. Explain Operation
    1.2.2. Search Operation
    1.2.3. Scan Operation
    2. RPN queries and semantics
    2.1. RPN tree structure
    2.1.1. Attribute sets
    2.1.2. Boolean operators
    2.1.3. Atomic queries (APT)
    2.1.4. Named Result Sets
    2.1.5. Zebra's special access point of type 'string'
    2.1.6. Zebra's special access point of type 'XPath' for GRS-1 filters
    2.2. Explain Attribute Set
    2.2.1. Use Attributes (type = 1)
    2.2.2. Explain searches with yaz-client
    2.3. BIB-1 Attribute Set
    2.3.1. Use Attributes (type 1)
    2.4. Zebra general Bib1 Non-Use Attributes (type 2-6)
    2.4.1. Relation Attributes (type 2)
    2.4.2. Position Attributes (type 3)
    2.4.3. Structure Attributes (type 4)
    2.4.4. Truncation Attributes (type = 5)
    2.4.5. Completeness Attributes (type = 6)
    3. Extended Zebra RPN Features
    3.1. Zebra specific retrieval of all records
    3.2. Zebra specific Search Extensions to all Attribute Sets
    3.2.1. Zebra Extension Embedded Sort Attribute (type 7)
    3.2.2. Zebra Extension Rank Weight Attribute (type 9)
    3.2.3. Zebra Extension Term Reference Attribute (type 10)
    3.2.4. Local Approximative Limit Attribute (type 11)
    3.2.5. Global Approximative Limit Attribute (type 12)
    3.3. Zebra specific Scan Extensions to all Attribute Sets
    3.3.1. Zebra Extension Result Set Narrow (type 8)
    3.3.2. Zebra Extension Approximative Limit (type 12)
    3.4. Zebra special IDXPATH Attribute Set for GRS-1 indexing
    3.4.1. IDXPATH Use Attributes (type = 1)
    3.5. Mapping from PQF atomic APT queries to Zebra internal register indexes
    3.5.1. Mapping of PQF APT access points
    3.5.2. Mapping of PQF APT structure and completeness to register type
    3.6. Zebra Regular Expressions in Truncation Attribute (type = 5)
    4. Server Side CQL to PQF Query Translation
    6. Administrating Zebra
    1. Record Types
    2. The Zebra Configuration File
    3. Locating Records
    4. Indexing with no Record IDs (Simple Indexing)
    5. Indexing with File Record IDs
    6. Indexing with General Record IDs
    7. Register Location
    8. Safe Updating - Using Shadow Registers
    8.1. Description
    8.2. How to Use Shadow Register Files
    9. Relevance Ranking and Sorting of Result Sets
    9.1. Overview
    9.2. Static Ranking
    9.3. Dynamic Ranking
    9.3.1. Dynamically ranking using PQF queries with the 'rank-1' algorithm
    9.3.2. Dynamically ranking CQL queries
    9.4. Sorting
    10. Extended Services: Remote Insert, Update and Delete
    10.1. Extended services in the Z39.50 protocol
    10.2. Extended services from yaz-client
    10.3. Extended services from yaz-php
    10.4. Extended services debugging guide
    7. DOM XML Record Model and Filter Module
    1. DOM Record Filter Architecture
    2. DOM XML filter pipeline configuration
    2.1. Input pipeline
    2.2. Extract pipeline
    2.3. Store pipeline
    2.4. Retrieve pipeline
    2.5. Canonical Indexing Format
    2.5.1. Processing-instruction governed indexing format
    2.5.2. Magic element governed indexing format
    2.5.3. Semantics of the indexing formats
    3. DOM Record Model Configuration
    3.1. DOM Indexing Configuration
    3.2. DOM Indexing MARCXML
    3.3. DOM Indexing Wizardry
    3.4. Debuggig DOM Filter Configurations
    8. ALVIS XML Record Model and Filter Module
    1. ALVIS Record Filter
    1.1. ALVIS Internal Record Representation
    1.2. ALVIS Canonical Indexing Format
    2. ALVIS Record Model Configuration
    2.1. ALVIS Indexing Configuration
    2.2. ALVIS Exchange Formats
    2.3. ALVIS Filter OAI Indexing Example
    9. GRS-1 Record Model and Filter Modules
    1. GRS-1 Record Filters
    1.1. GRS-1 Canonical Input Format
    1.1.1. Record Root
    1.1.2. Variants
    1.2. GRS-1 REGX And TCL Input Filters
    2. GRS-1 Internal Record Representation
    2.1. Tagged Elements
    2.2. Variants
    2.3. Data Elements
    3. GRS-1 Record Model Configuration
    3.1. The Abstract Syntax
    3.2. The Configuration Files
    3.3. The Abstract Syntax (.abs) Files
    3.4. The Attribute Set (.att) Files
    3.5. The Tag Set (.tag) Files
    3.6. The Variant Set (.var) Files
    3.7. The Element Set (.est) Files
    3.8. The Schema Mapping (.map) Files
    3.9. The MARC (ISO2709) Representation (.mar) Files
    4. GRS-1 Exchange Formats
    5. Extended indexing of MARC records
    5.1. The index-formula
    5.2. Notation of index-formula for Zebra
    5.2.1. Examples
    10. Field Structure and Character Sets
    1. The default.idx file
    2. Charmap Files
    3. ICU Chain Files
    I. Reference
    zebraidxZebra Administrative Tool
    zebrasrv — Zebra Server
    idzebra-config — Script to get information about idzebra
    A. License
    B. GNU General Public License
    1. Preamble
    2. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
    2.1. Section 0
    2.2. Section 1
    2.3. Section 2
    2.4. Section 3
    2.5. Section 4
    2.6. Section 5
    2.7. Section 6
    2.8. Section 7
    2.9. Section 8
    2.10. Section 9
    2.11. Section 10
    2.12. NO WARRANTY Section 11
    2.13. Section 12
    3. How to Apply These Terms to Your New Programs
    C. About Index Data and the Zebra Server

    List of Figures

    7.1. DOM XML filter architecture
    idzebra-2.0.44/doc/character-map-files.html0000644000175000017500000003002011412336551015400 000000000000002. Charmap Files

    2. Charmap Files

    The character map files are used to define the word tokenization and character normalization performed before inserting text into the inverse indexes. Zebra ships with the predefined character map files tab/*.chr. Users are allowed to add and/or modify maps according to their needs.

    Table 10.1. Character maps predefined in Zebra

    File nameIntended typeDescription
    numeric.chr:nNumeric digit tokenization and normalization map. All characters not in the set -{0-9}., will be suppressed. Note that floating point numbers are processed fine, but scientific exponential numbers are trashed.
    scan.chr:w or :pWord tokenization char map for Scandinavian languages. This one resembles the generic word tokenization character map tab/string.chr, the main differences are sorting of the special characters üzæäøöå and equivalence maps according to Scandinavian language rules.
    string.chr:w or :pGeneral word tokenization and normalization character map, mostly useful for English texts. Use this to derive your own language tokenization and normalization derivatives.
    urx.chr:uURL parsing and tokenization character map.
    @:0Do-nothing character map used for literal binary indexing. There is no existing file associated to it, and there is no normalization or tokenization performed at all.

    The contents of the character map files are structured as follows:

    encoding encoding-name

    This directive must be at the very beginning of the file, and it specifies the character encoding used in the entire file. If omitted, the encoding ISO-8859-1 is assumed.

    For example, one of the test files found at test/rusmarc/tab/string.chr contains the following encoding directive:

             encoding koi8-r
            

    and the test file test/charmap/string.utf8.chr is encoded in UTF-8:

             encoding utf-8
            

    lowercase value-set

    This directive introduces the basic value set of the field type. The format is an ordered list (without spaces) of the characters which may occur in "words" of the given type. The order of the entries in the list determines the sort order of the index. In addition to single characters, the following combinations are legal:

    • Backslashes may be used to introduce three-digit octal, or two-digit hex representations of single characters (preceded by x). In addition, the combinations \\, \\r, \\n, \\t, \\s (space — remember that real space-characters may not occur in the value definition), and \\ are recognized, with their usual interpretation.

    • Curly braces {} may be used to enclose ranges of single characters (possibly using the escape convention described in the preceding point), e.g., {a-z} to introduce the standard range of ASCII characters. Note that the interpretation of such a range depends on the concrete representation in your local, physical character set.

    • parentheses () may be used to enclose multi-byte characters - e.g., diacritics or special national combinations (e.g., Spanish "ll"). When found in the input stream (or a search term), these characters are viewed and sorted as a single character, with a sorting value depending on the position of the group in the value statement.

    For example, scan.chr contains the following lowercase normalization and sorting order:

             lowercase {0-9}{a-y}üzæäøöå
            

    uppercase value-set

    This directive introduces the upper-case equivalences to the value set (if any). The number and order of the entries in the list should be the same as in the lowercase directive.

    For example, scan.chr contains the following uppercase equivalent:

             uppercase {0-9}{A-Y}ÜZÆÄØÖÅ
            

    space value-set

    This directive introduces the character which separate words in the input stream. Depending on the completeness mode of the field in question, these characters either terminate an index entry, or delimit individual "words" in the input stream. The order of the elements is not significant — otherwise the representation is the same as for the uppercase and lowercase directives.

    For example, scan.chr contains the following space instruction:

             space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~
            

    map value-set target

    This directive introduces a mapping between each of the members of the value-set on the left to the character on the right. The character on the right must occur in the value set (the lowercase directive) of the character set, but it may be a parenthesis-enclosed multi-octet character. This directive may be used to map diacritics to their base characters, or to map HTML-style character-representations to their natural form, etc. The map directive can also be used to ignore leading articles in searching and/or sorting, and to perform other special transformations.

    For example, scan.chr contains the following map instructions among others, to make sure that HTML entity encoded Danish special characters are mapped to the equivalent Latin-1 characters:

             map (&aelig;)      æ
             map (&oslash;)     ø
             map (&aring;)      å
            

    In addition to specifying sort orders, space (blank) handling, and upper/lowercase folding, you can also use the character map files to make Zebra ignore leading articles in sorting records, or when doing complete field searching.

    This is done using the map directive in the character map file. In a nutshell, what you do is map certain sequences of characters, when they occur in the beginning of a field, to a space. Assuming that the character "@" is defined as a space character in your file, you can do:

    	 map (^The\s) @
    	 map (^the\s) @
    	

    The effect of these directives is to map either 'the' or 'The', followed by a space character, to a space. The hat ^ character denotes beginning-of-field only when complete-subfield indexing or sort indexing is taking place; otherwise, it is treated just as any other character.

    Because the default.idx file can be used to associate different character maps with different indexing types -- and you can create additional indexing types, should the need arise -- it is possible to specify that leading articles should be ignored either in sorting, in complete-field searching, or both.

    If you ignore certain prefixes in sorting, then these will be eliminated from the index, and sorting will take place as if they weren't there. However, if you set the system up to ignore certain prefixes in searching, then these are deleted both from the indexes and from query terms, when the client specifies complete-field searching. This has the effect that a search for 'the science journal' and 'science journal' would both produce the same results.

    equivalent value-set

    This directive introduces equivalence classes of characters and/or strings for sorting purposes only. It resembles the map directive, but does not affect search and retrieval indexing, but only sorting order under present requests.

    For example, scan.chr contains the following equivalent sorting instructions, which can be uncommented:

             # equivalent æä(ae)
             # equivalent øö(oe)
             # equivalent å(aa)
             # equivalent uü
            

    idzebra-2.0.44/doc/local.ent.in0000644000175000017500000000007211412332551013112 00000000000000 idzebra-2.0.44/doc/reference.html0000644000175000017500000000435611412336551013544 00000000000000Reference

    Reference


    The material in this chapter is drawn directly from the individual manual entries.

    Table of Contents

    zebraidxZebra Administrative Tool
    zebrasrv — Zebra Server
    idzebra-config — Script to get information about idzebra
    idzebra-2.0.44/Makefile.am0000644000175000017500000000142211412332551012172 00000000000000 AUTOMAKE_OPTIONS=foreign ACLOCAL_AMFLAGS = -I m4 SUBDIRS=util bfile dfa dict isams isamb isamc rset data1 \ tab index test examples include doc aclocaldir=$(datadir)/aclocal aclocal_DATA = m4/idzebra-2.0.m4 SPEC_FILE=idzebra.spec EXTRA_DIST= README NEWS IDMETA $(SPEC_FILE) $(SPEC_FILE).in \ idzebra-config-2.0.in m4/idzebra-2.0.m4 m4/yaz.m4 buildconf.sh Doxyfile.in dist-hook: if test -x /usr/bin/git -a -d .git; then git log >ChangeLog ; cp ChangeLog $(distdir); fi cp $(srcdir)/LICENSE* $(distdir) test -d $(distdir)/win || mkdir $(distdir)/win for i in $(srcdir)/win/*; do \ if test -f $$i; then \ cp $$i $(distdir)/win; \ fi; \ done dox: doxygen showdox: doxygen firefox -new-window file:///`pwd`/$(top_srcdir)/dox/html/index.html & .PHONY: dox showdox idzebra-2.0.44/win/0000755000175000017500000000000011412336551011020 500000000000000idzebra-2.0.44/win/makefile0000644000175000017500000003312511412336551012444 00000000000000# Zebra makefile for MS NMAKE ########################################################### ############### Parameters ########################################################### DEBUG=0 # 0 for release, 1 for debug # TCL is optional - ONLY needed for source straight from Git TCL="C:\Tcl\bin\tclsh85.exe" HAVE_TCL=1 # EXPAT is optional. It's required for grs.xml-filters. HAVE_EXPAT=1 EXPAT_DIR=c:\Program files\Expat 2.0.1 # iconv is optional HAVE_ICONV=1 ICONV_DIR=c:\iconv-1.9.2.win32 # libxslt. For mod_dom and mod_alvis HAVE_LIBXSLT=1 LIBXSLT_DIR=c:\libxslt-1.1.24.win32 # libxml2. Used by libxslt HAVE_LIBXML2=1 LIBXML2_DIR=c:\libxml2-2.7.1.win32 # zlib compression. Used by libxml2 ZLIB_DIR = c:\zlib-1.2.3.win32 # get WIN32 binaries libxml2 & iconv & zlib from here: # http://www.zlatkovic.com/libxml.en.html # ICU support # get icu libraries from http://www.icu-project.org HAVE_ICU=1 ICU_DIR=c:\icu default: all all: dirs generate expat iconv libxml2 libxslt icu yaz dll zserver zebraidx tstflock # Directories # The current directory is supposed to be something like # ..../Zebra/Win, everything is relative to that ROOTDIR=.. # The home of zebra # YAZ include files, libraries, etc. YAZDIR=$(ROOTDIR)\..\yaz # or \program files\yaz YAZBINDIR=$(YAZDIR)\bin !if $(DEBUG) YAZLIB="$(YAZDIR)\lib\yaz3d.lib" !if $(HAVE_ICU) YAZLIB=$(YAZLIB) "$(YAZDIR)\lib\yaz_icu3d.lib" !endif YAZ_DLL_SOURCE="$(YAZBINDIR)\yaz3d.dll" YAZ_DLL_TARGET="$(BINDIR)\yaz3d.dll" !else YAZLIB="$(YAZDIR)\lib\yaz3.lib" !if $(HAVE_ICU) YAZLIB=$(YAZLIB) "$(YAZDIR)\lib\yaz_icu3.lib" !endif YAZ_DLL_SOURCE="$(YAZBINDIR)\yaz3.dll" YAZ_DLL_TARGET="$(BINDIR)\yaz3.dll" !endif # BZIP2 settings. Uncomment and specify if you wish to use LIBBZIP2. # (C) 1996-1999 Julian Seward http://www.bzip2.org #BZIP2INCLUDE=/I"$(ROOTDIR)\..\bzip2-0.9.5d" #BZIP2LIB=$(ROOTDIR)\..\bzip2-0.9.5d\libbz2.lib #BZIP2DEF=/D"HAVE_BZLIB_H=1" # ZEBRA Include files, libraries, programs, etc. INCLDIR=$(ROOTDIR)\include # our includes LIBDIR=$(ROOTDIR)\lib # We produce .lib, .exp etc there BINDIR=$(ROOTDIR)\bin # We produce exes and dlls there WINDIR=$(ROOTDIR)\win # all these Win make things !if $(DEBUG) OBJDIR=$(WINDIR)\dobj # where we store intermediate files !else OBJDIR=$(WINDIR)\obj # where we store intermediate files !endif UNIXDIR=$(ROOTDIR)\unix # corresponding unix things SRCDIR=$(ROOTDIR) # for the case we move them under src INDEXDIR=$(SRCDIR)\INDEX BFILEDIR=$(SRCDIR)\BFILE DFADIR=$(SRCDIR)\DFA DICTDIR=$(SRCDIR)\DICT ISAMSDIR=$(SRCDIR)\ISAMS ISAMCDIR=$(SRCDIR)\ISAMC ISAMBDIR=$(SRCDIR)\ISAMB RSETDIR=$(SRCDIR)\RSET UTILDIR=$(SRCDIR)\UTIL DATA1DIR=$(SRCDIR)\DATA1 # Force temp files in a local temp, easier to clean # when nmake crashes and leaves a lot of rubbish behind TMPDIR=$(ROOTDIR)\win\tmp TMP=$(TMPDIR) TEMP=$(TMPDIR) # NSIS NSIS="c:\program files\nsis\makensis.exe" dist: nmake DEBUG=1 clean nmake DEBUG=0 clean nmake DEBUG=0 $(NSIS) zebra.nsi nsis: $(NSIS) zebra.nsi # Targets - what to make !if $(DEBUG) DLL=$(BINDIR)\idzebrad.dll IMPLIB=$(LIBDIR)\idzebrad.lib !else DLL=$(BINDIR)\idzebra.dll IMPLIB=$(LIBDIR)\idzebra.lib !endif ZSERVER=$(BINDIR)\zebrasrv.exe ZEBRAIDX=$(BINDIR)\zebraidx.exe TSTFLOCK=$(BINDIR)\tstflock.exe # shortcut names defined here zebraidx: $(ZEBRAIDX) zserver: $(ZSERVER) tstflock: $(TSTFLOCK) dll: $(DLL) # External libs and modules (enabled or disabled) !if $(HAVE_EXPAT) EXPAT_DEF= /D HAVE_EXPAT_H=1 /I"$(EXPAT_DIR)\source\lib" EXPAT_LIB= "$(EXPAT_DIR)\bin\libexpat.lib" EXPAT_DLL_SOURCE= "$(EXPAT_DIR)\bin\libexpat.dll" EXPAT_DLL_TARGET= "$(BINDIR)\libexpat.dll" expat: $(EXPAT_DLL_TARGET) $(EXPAT_DLL_TARGET) : $(EXPAT_DLL_SOURCE) copy $(EXPAT_DLL_SOURCE) $(EXPAT_DLL_TARGET) !else EXPAT_DEF= /D HAVE_EXPAT_H=0 EXPAT_LIB= EXPAT_DLL_SOURCE= EXPAT_DLL_TARGET= expat: !endif !if $(HAVE_ICONV) ICONV_DEF= /D HAVE_ICONV_H=1 /I"$(ICONV_DIR)\include" ICONV_LIB= $(ICONV_DIR)\lib\iconv.lib iconv: $(BINDIR)\iconv.dll $(BINDIR)\iconv.dll: copy "$(ICONV_DIR)\bin\iconv.dll" $(BINDIR) !else ICONV_DEF= /D HAVE_ICONV_H=0 ICONV_LIB= iconv: !endif !if $(HAVE_LIBXML2) LIBXML2_LIB="$(LIBXML2_DIR)\lib\libxml2.lib" LIBXML2_DEF=/DYAZ_HAVE_XML2=1 /D HAVE_XML2=1 /I"$(LIBXML2_DIR)\include" libxml2: $(BINDIR)\libxml2.dll $(BINDIR)\zlib1.dll $(BINDIR)\libxml2.dll: copy "$(LIBXML2_DIR)\bin\libxml2.dll" $(BINDIR) $(BINDIR)\zlib1.dll: copy "$(ZLIB_DIR)\bin\zlib1.dll" $(BINDIR) !else LIBXML2_LIB= LIBXML2_DEF=/D HAVE_XML2=0 libxml2: !endif !if $(HAVE_LIBXSLT) LIBXSLT_LIB="$(LIBXSLT_DIR)\lib\libxslt.lib" LIBXSLT_DEF=/D HAVE_XSLT=1 /I"$(LIBXSLT_DIR)\include" libxslt: $(BINDIR)\libxslt.dll $(BINDIR)\libxslt.dll: copy "$(LIBXSLT_DIR)\bin\libxslt.dll" $(BINDIR) !else LIBXSLT_LIB= LIBXSLT_DEF=/D HAVE_XSLT=0 libxslt: !endif !if $(HAVE_ICU) ICU_DEF= /DYAZ_HAVE_ICU=1 /I"$(ICU_DIR)\include" ICU_LIB= $(ICU_DIR)\lib\icudt.lib $(ICU_DIR)\lib\icuin.lib $(ICU_DIR)\lib\icuuc.lib icu: $(BINDIR)\icudt40.dll $(BINDIR)\icuin40.dll $(BINDIR)\icuuc40.dll $(BINDIR)\icudt40.dll: copy "$(ICU_DIR)\bin\icudt40.dll" $(BINDIR) $(BINDIR)\icuin40.dll: copy "$(ICU_DIR)\bin\icuin40.dll" $(BINDIR) $(BINDIR)\icuuc40.dll: copy "$(ICU_DIR)\bin\icuuc40.dll" $(BINDIR) !else ICU_DEF= /DYAZ_HAVE_ICU=0 ICU_LIB= icu: !endif !if $(HAVE_LIBXSLT) MOD_ALVIS_OBJS= $(OBJDIR)\mod_alvis.obj MOD_ALVIS_CFLAGS=/DIDZEBRA_STATIC_ALVIS=1 MOD_DOM_OBJS= $(OBJDIR)\mod_dom.obj MOD_DOM_CFLAGS=/DIDZEBRA_STATIC_DOM=1 !else MOD_ALVIS_OBJS= MOD_ALVIS_CFLAGS= MOD_DOM_OBJS= MOD_DOM_CFLAGS= !endif ### C and CPP compiler (the same thing) # Note: $(CPP) has already been defined in the environment # (if you set things up right!) COMMON_C_OPTIONS= \ /nologo /W3 /EHsc /FD /c \ /D "WIN32" \ /D"_CONSOLE" /D"_MBCS" \ /DYAZ_USE_NEW_LOG=1 \ /D"_CRT_SECURE_NO_DEPRECATE" \ /D"_CRT_NONSTDC_NO_DEPRECATE" \ $(ICONV_DEF) \ $(EXPAT_DEF) \ $(LIBXML2_DEF) \ $(LIBXSLT_DEF) \ $(ICU_DEF) \ /FR"$(OBJDIR)\\" \ /Fo"$(OBJDIR)\\" \ /Fd"$(OBJDIR)\\" \ /DDEFAULT_PROFILE_PATH=0 \ /DDEFAULT_MODULE_PATH=0 \ /DIDZEBRA_STATIC_GRS_SGML=1 \ /DIDZEBRA_STATIC_TEXT=1 \ /DIDZEBRA_STATIC_GRS_XML=1 \ /DIDZEBRA_STATIC_GRS_REGX=1 \ /DIDZEBRA_STATIC_GRS_MARC=1 \ /DIDZEBRA_STATIC_GRS_DANBIB=1 \ $(MOD_ALVIS_CFLAGS) \ $(MOD_DOM_CFLAGS) \ /DIDZEBRA_STATIC_SAFARI=1 \ $(BZIP2DEF) COMMON_C_INCLUDES= \ /I"$(SRCDIR)\include" \ /I"$(YAZDIR)\include" \ $(BZIP2INCLUDE) DEBUG_C_OPTIONS= \ /D "_DEBUG" \ /MDd /Od /YX /Zi /Gm RELEASE_C_OPTIONS= \ /D "NDEBUG" \ /MD /O2 # /W3 = warning level # /GX = Enable exception handling # /FD = Generate file dependencies (what ever they are) # /c = compile without linking # /FR = Generate browse info (.sbr file that gets combined into .bsc) # /Fo = object file name (or at least path) # /Fd = debug database name (or path) # /MD = Runtime library: Multithread DLL # /MDd = Runtime library: Multithread DLL (debug) # /Od = Disable optimising (debug) # /O2 = Optimize for speed # /YX = Automatic use of precomipled headers # /Gm = Minimal rebuild (some cpp class stuff) # /Zi = Program database for debuggers # /ZI = Pgm database with special "edit&continue" stuff - not available in C5 ### Linker options LINK=link.exe LINK_LIBS= kernel32.lib user32.lib gdi32.lib winspool.lib \ comdlg32.lib advapi32.lib shell32.lib ole32.lib \ oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \ wsock32.lib advapi32.lib \ $(ICONV_LIB) $(EXPAT_LIB) $(LIBXML2_LIB) $(LIBXSLT_LIB) $(ICU_LIB) COMMON_LNK_OPTIONS= /nologo /machine:i386 /incremental:no DEBUG_LNK_OPTIONS= /debug RELEASE_LNK_OPTIONS= ZEBRALIB_LINK_OPTIONS= -lib DLL_LINK_OPTIONS= /dll CLIENT_LINK_OPTIONS= /subsystem:console # Final opt variables !if $(DEBUG) COPT= $(COMMON_C_OPTIONS) $(DEBUG_C_OPTIONS) $(COMMON_C_INCLUDES) MTLOPT= $(COMMON_MTL_OPTIONS) $(DEBUG_MTL_OPTIONS) RCOPT= $(COMMON_RC_OPTIONS) $(DEBUG_RC_OPTIONS) LNKOPT= $(COMMON_LNK_OPTIONS) $(DEBUG_LNK_OPTIONS) $(LNK_LIBS) !else COPT= $(COMMON_C_OPTIONS) $(RELEASE_C_OPTIONS) $(COMMON_C_INCLUDES) MTLOPT= $(COMMON_MTL_OPTIONS) $(RELEASE_MTL_OPTIONS) RCOPT= $(COMMON_RC_OPTIONS) $(RELEASE_RC_OPTIONS) LNKOPT= $(COMMON_LNK_OPTIONS) $(RELEASE_LNK_OPTIONS) $(LNK_LIBS) !endif LINK_PROGRAM= $(LINK) \ $(LNKOPT) \ $(CLIENT_LINK_OPTIONS) \ $(IMPLIB) \ $(YAZLIB) \ $(BZIP2LIB) \ $(LINK_LIBS) # Generated sources generate: $(INCLDIR)\idzebra\version.h $(INCLDIR)\idzebra\version.h: @cd $(ROOTDIR)\util $(TCL) mk_version.tcl $(ROOTDIR)/configure.ac $(INCLDIR)\idzebra\version.h # Source and object modules # Note: Ordinary source files are not specified here at # all, make finds them in suitable dirs. The object modules # need to be specified, though ZSERVER_OBJS= \ $(OBJDIR)\zebrasrv.obj ZEBRAIDX_OBJS= \ $(OBJDIR)\zebraidx.obj TSTFLOCK_OBJS= \ $(OBJDIR)\tstflock.obj ZEBRALIB_OBJS= \ $(MOD_ALVIS_OBJS) \ $(MOD_DOM_OBJS) \ $(OBJDIR)\atoi_zn.obj \ $(OBJDIR)\attribute.obj \ $(OBJDIR)\attrfind.obj \ $(OBJDIR)\bfile.obj \ $(OBJDIR)\bset.obj \ $(OBJDIR)\cfile.obj \ $(OBJDIR)\check_res.obj \ $(OBJDIR)\charmap.obj \ $(OBJDIR)\close.obj \ $(OBJDIR)\commit.obj \ $(OBJDIR)\compact.obj \ $(OBJDIR)\d1_absyn.obj \ $(OBJDIR)\d1_attset.obj \ $(OBJDIR)\d1_doespec.obj \ $(OBJDIR)\d1_espec.obj \ $(OBJDIR)\d1_expout.obj \ $(OBJDIR)\d1_grs.obj \ $(OBJDIR)\d1_handle.obj \ $(OBJDIR)\d1_if.obj \ $(OBJDIR)\d1_map.obj \ $(OBJDIR)\d1_marc.obj \ $(OBJDIR)\d1_prtree.obj \ $(OBJDIR)\d1_read.obj \ $(OBJDIR)\d1_soif.obj \ $(OBJDIR)\d1_sumout.obj \ $(OBJDIR)\d1_sutrs.obj \ $(OBJDIR)\d1_tagset.obj \ $(OBJDIR)\d1_utils.obj \ $(OBJDIR)\d1_varset.obj \ $(OBJDIR)\d1_write.obj \ $(OBJDIR)\dclose.obj \ $(OBJDIR)\dcompact.obj \ $(OBJDIR)\delete.obj \ $(OBJDIR)\dfa.obj \ $(OBJDIR)\dir.obj \ $(OBJDIR)\dirent.obj \ $(OBJDIR)\dirs.obj \ $(OBJDIR)\dopen.obj \ $(OBJDIR)\drdwr.obj \ $(OBJDIR)\exit.obj \ $(OBJDIR)\extract.obj \ $(OBJDIR)\flock.obj \ $(OBJDIR)\imalloc.obj \ $(OBJDIR)\inline.obj \ $(OBJDIR)\insert.obj \ $(OBJDIR)\invstat.obj \ $(OBJDIR)\isamb.obj \ $(OBJDIR)\isamc.obj \ $(OBJDIR)\isams.obj \ $(OBJDIR)\isam_methods.obj \ $(OBJDIR)\it_key.obj \ $(OBJDIR)\kcontrol.obj \ $(OBJDIR)\key_block.obj \ $(OBJDIR)\kinput.obj \ $(OBJDIR)\limit.obj \ $(OBJDIR)\lookgrep.obj \ $(OBJDIR)\lookup.obj \ $(OBJDIR)\lookupec.obj \ $(OBJDIR)\marcomp.obj \ $(OBJDIR)\mod_grs_marc.obj \ $(OBJDIR)\merge.obj \ $(OBJDIR)\mfile.obj \ $(OBJDIR)\open.obj \ $(OBJDIR)\orddict.obj \ $(OBJDIR)\passwddb.obj \ $(OBJDIR)\rank1.obj \ $(OBJDIR)\ranksimilarity.obj \ $(OBJDIR)\rankstatic.obj \ $(OBJDIR)\recctrl.obj \ $(OBJDIR)\recgrs.obj \ $(OBJDIR)\records.obj \ $(OBJDIR)\recindex.obj \ $(OBJDIR)\reckeys.obj \ $(OBJDIR)\mod_text.obj \ $(OBJDIR)\mod_grs_regx.obj \ $(OBJDIR)\res.obj \ $(OBJDIR)\retrieve.obj \ $(OBJDIR)\rpnscan.obj \ $(OBJDIR)\rpnsearch.obj \ $(OBJDIR)\rsbetween.obj \ $(OBJDIR)\rsbool.obj \ $(OBJDIR)\rset.obj \ $(OBJDIR)\rset_isam.obj \ $(OBJDIR)\rsisamb.obj \ $(OBJDIR)\rsisamc.obj \ $(OBJDIR)\rsisams.obj \ $(OBJDIR)\rsmultiandor.obj \ $(OBJDIR)\rsnull.obj \ $(OBJDIR)\rsprox.obj \ $(OBJDIR)\rstemp.obj \ $(OBJDIR)\mod_safari.obj \ $(OBJDIR)\scan.obj \ $(OBJDIR)\set.obj \ $(OBJDIR)\mod_grs_sgml.obj \ $(OBJDIR)\snippet.obj \ $(OBJDIR)\sortidx.obj \ $(OBJDIR)\states.obj \ $(OBJDIR)\stream.obj \ $(OBJDIR)\strmap.obj \ $(OBJDIR)\su_codec.obj \ $(OBJDIR)\trunc.obj \ $(OBJDIR)\untrans.obj \ $(OBJDIR)\update_path.obj \ $(OBJDIR)\update_file.obj \ $(OBJDIR)\version.obj \ $(OBJDIR)\mod_grs_xml.obj \ $(OBJDIR)\xpath.obj \ $(OBJDIR)\zaptterm.obj \ $(OBJDIR)\zebra-lock.obj \ $(OBJDIR)\zebraapi.obj \ $(OBJDIR)\zebramap.obj \ $(OBJDIR)\zinfo.obj \ $(OBJDIR)\zint.obj \ $(OBJDIR)\zsets.obj # Compiling # Note: This defines where to look for the necessary # source files. Funny way of doing it, but it works. {$(INDEXDIR)}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) $< {$(BFILEDIR)}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) $< {$(DFADIR)}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) $< {$(DICTDIR)}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) $< {$(ISAMSDIR)}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) $< {$(ISAMCDIR)}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) $< {$(ISAMBDIR)}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) $< {$(RSETDIR)}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) $< {$(UTILDIR)}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) $< {$(DATA1DIR)}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) $< # Linking $(ZSERVER) : "$(BINDIR)" $(ZSERVER_OBJS) $(IMPLIB) $(LINK_PROGRAM) \ $(ZSERVER_OBJS) \ /out:$(ZSERVER) $(ZEBRAIDX) : "$(BINDIR)" $(ZEBRAIDX_OBJS) $(IMPLIB) $(LINK_PROGRAM) \ $(ZEBRAIDX_OBJS) \ /out:$(ZEBRAIDX) $(TSTFLOCK) : "$(BINDIR)" $(TSTFLOCK_OBJS) $(IMPLIB) $(LINK_PROGRAM) \ $(TSTFLOCK_OBJS) \ /out:$(TSTFLOCK) # Resources RES=$(OBJDIR)\zebra.res RC=$(WINDIR)\zebra.rc RSC=rc.exe !if $(DEBUG) RSOPT=/d_DEBUG !else RSOPT=/d_NDEBUG !endif $(RES): $(RC) $(RSC) $(RSOPT) /I"../include" /I"$(YAZDIR)\include" /fo"$(RES)" $(RC) $(DLL) $(IMPLIB): "$(BINDIR)" $(ZEBRALIB_OBJS) $(RES) $(LINK) \ $(LNKOPT) \ $(LINK_LIBS) \ $(DLL_LINK_OPTIONS) \ $(ZEBRALIB_OBJS) \ $(RES) \ /out:$(DLL) \ $(YAZLIB) \ /implib:"$(IMPLIB)" \ /map:"$(LIBDIR)\idzebra.map" \ # Other rules clean: -del $(OBJDIR)\*.obj -del $(OBJDIR)\*.sbr -del $(BINDIR)\*.exe -del $(BINDIR)\*.dll -del $(TMPDIR)\*. -del $(LIBDIR)\*.lib dirs: $(OBJDIR) $(WINDIR) $(LIBDIR) $(BINDIR) $(TMPDIR) $(OBJDIR) $(WINDIR) $(LIBDIR) $(BINDIR) $(TMPDIR): if not exist "$@/$(NUL)" mkdir "$@" yaz: $(YAZ_DLL_TARGET) $(YAZ_DLL_TARGET) : $(YAZ_DLL_SOURCE) # copy "$(YAZBINDIR)\*.dll.manifest" $(BINDIR) copy "$(YAZBINDIR)\*.dll" $(BINDIR) idzebra-2.0.44/win/version.nsi.in0000644000175000017500000000004511412336551013544 00000000000000!define VERSION "@PACKAGE_VERSION@" idzebra-2.0.44/win/license.txt0000644000175000017500000003545211412336551013134 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS idzebra-2.0.44/win/zebra.nsi0000644000175000017500000001133611412336551012562 00000000000000!include version.nsi ; VS 2005 ; !define VS_RUNTIME_DLL "c:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\msvcr80.dll" ; !define VS_RUNTIME_MANIFEST "c:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\Microsoft.VC80.CRT.manifest" ; VS 2003 ; !define VS_RUNTIME_DLL "c:\Program files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\msvcr71.dll" ; VS 6.0 ; (no defines) !include "MUI.nsh" SetCompressor bzip2 Name "Zebra" Caption "Index Data Zebra ${VERSION} Setup" OutFile "idzebra_${VERSION}.exe" LicenseText "You must read the following license before installing:" LicenseData license.txt ComponentText "This will install Zebra on your computer:" InstType "Full (w/ Source)" InstType "Lite (w/o Source)" InstallDir "$PROGRAMFILES\Zebra" InstallDirRegKey HKLM "SOFTWARE\Index Data\Zebra" "" ;-------------------------------- ; Pages !insertmacro MUI_PAGE_LICENSE "license.txt" !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES ; Page components ; Page directory ; Page instfiles ; UninstPage uninstConfirm ; UninstPage instfiles ;-------------------------------- ;Languages !insertmacro MUI_LANGUAGE "English" ;-------------------------------- Section "" ; (default section) SetOutPath "$INSTDIR" ; add files / whatever that need to be installed here. WriteRegStr HKLM "SOFTWARE\Index Data\Zebra" "" "$INSTDIR" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Zebra" "DisplayName" "Zebra ${VERSION} (remove only)" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Zebra" "UninstallString" '"$INSTDIR\uninst.exe"' ; write out uninstaller WriteUninstaller "$INSTDIR\uninst.exe" SetOutPath "$SMPROGRAMS\Index Data\Zebra\" CreateShortCut "$SMPROGRAMS\Index Data\Zebra\Zebra Program Directory.lnk" \ "$INSTDIR" WriteINIStr "$SMPROGRAMS\Index Data\Zebra\Zebra Home page.url" \ "InternetShortcut" "URL" "http://www.indexdata.dk/zebra/" CreateShortCut "$SMPROGRAMS\Index Data\Zebra\Uninstall Zebra.lnk" \ "$INSTDIR\uninst.exe" SetOutPath $INSTDIR File ..\LICENSE.zebra File ..\README SetOutPath $INSTDIR File /r ..\tab SectionEnd ; end of default section Section "Zebra Runtime" SectionIn 1 2 SetOutPath $INSTDIR\bin !ifdef VS_RUNTIME_DLL File "${VS_RUNTIME_DLL}" !endif !ifdef VS_RUNTIME_MANIFEST File "${VS_RUNTIME_MANIFEST}" File ..\bin\*.manifest !endif File ..\bin\*.exe File ..\bin\idzebra.dll File ..\bin\iconv.dll File ..\bin\zlib1.dll File ..\bin\libxml2.dll File ..\bin\libxslt.dll File ..\bin\yaz3.dll File ..\bin\libexpat.dll File ..\bin\icu*.dll File ..\bin\yaz_icu3.dll SectionEnd Section "Zebra Development" SectionIn 1 SetOutPath $INSTDIR\include File ..\include\*.h SetOutPath $INSTDIR\include\idzebra File ..\include\idzebra\*.h SetOutPath $INSTDIR\lib File ..\lib\*.lib SectionEnd Section "Zebra Documentation" SectionIn 1 2 SetOutPath $INSTDIR\doc File /r ..\doc\*.html File /r ..\doc\*.png File /r ..\doc\*.xml File /r ..\doc\*.xsl SetOutPath "$SMPROGRAMS\Index Data\Zebra\" CreateShortCut "$SMPROGRAMS\Index Data\Zebra\HTML Documentation.lnk" \ "$INSTDIR\doc\index.html" SectionEnd Section "Zebra Examples" SectionIn 1 2 SetOutPath $INSTDIR File /r ..\test File /r /x *.mf /x *.LCK ..\examples SectionEnd Section "Zebra Source" SectionIn 1 SetOutPath $INSTDIR\util File ..\util\*.c SetOutPath $INSTDIR\dfa File ..\dfa\*.c File ..\dfa\*.h SetOutPath $INSTDIR\index File ..\index\*.c File ..\index\*.h SetOutPath $INSTDIR\isams File ..\isams\*.c SetOutPath $INSTDIR\isamc File ..\isamc\*.c File ..\isamc\*.h SetOutPath $INSTDIR\isamb File ..\isamb\*.c SetOutPath $INSTDIR\data1 File ..\data1\*.c SetOutPath $INSTDIR\dict File ..\dict\*.c File ..\dict\*.h SetOutPath $INSTDIR\bfile File ..\bfile\*.c File ..\bfile\*.h SetOutPath $INSTDIR\rset File ..\rset\*.c SetOutPath $INSTDIR\test\api File ..\test\api\*.c File ..\test\api\*.cfg SetOutPath $INSTDIR\win File makefile File *.nsi File *.txt SectionEnd ; begin uninstall settings/section UninstallText "This will uninstall Zebra ${VERSION} from your system" Section Uninstall ; add delete commands to delete whatever files/registry keys/etc you installed here. Delete "$INSTDIR\uninst.exe" DeleteRegKey HKLM "SOFTWARE\Index Data\Zebra" DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Zebra" ExecWait '"$INSTDIR\bin\zebrasrv" -remove' RMDir /r "$SMPROGRAMS\Index Data\Zebra" RMDir /r $INSTDIR IfFileExists $INSTDIR 0 Removed MessageBox MB_OK|MB_ICONEXCLAMATION \ "Note: $INSTDIR could not be removed." Removed: SectionEnd ; eof idzebra-2.0.44/win/readme.txt0000644000175000017500000000113011412336551012731 00000000000000Compilation for Zebra on WIN32. This software is shipped with MS nmake files. It has been tested on Visual C++ 6, but should work with Visual C++ 5 as well. Prerequesties: yaz - untar it at the same location as zebra. Optional prerequesties: bzip2 - untar it at the same location as zebra. Adjust the makefile as needed. Comments in the makefile itself describe the most important settings. Run nmake The makefile (if un-modified) builds the following: lib\zebra.lib a library with most modules bin\zebraidx.exe the indexer utility bin\zebrasrv.exe the Z39.50 server idzebra-2.0.44/win/version.nsi0000644000175000017500000000003211412336551013133 00000000000000!define VERSION "2.0.44" idzebra-2.0.44/win/zebra.rc0000644000175000017500000000204411412336551012371 00000000000000#include "winver.h" #include "..\include\idzebra\version.h" VS_VERSION_INFO VERSIONINFO FILEVERSION ZEBRA_FILEVERSION PRODUCTVERSION ZEBRA_FILEVERSION FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS VOS_NT FILETYPE VFT_DLL FILESUBTYPE VFT2_UNKNOWN { BLOCK "StringFileInfo" { BLOCK "000004b0" BEGIN VALUE "Comments", "http://www.indexdata.com/zebra/\0" VALUE "CompanyName", "Index Data\0" VALUE "FileDescription", "idzebra DLL\0" VALUE "FileVersion", ZEBRAVER "\0" VALUE "InternalName", "idzebra\0" VALUE "LegalCopyright", "Copyright © 1995-2010 Index Data ApS\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "zebra.rc\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "Zebra\0" VALUE "ProductVersion", ZEBRAVER "\0" VALUE "SpecialBuild", "\0" END } BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x0, 1200 END } idzebra-2.0.44/isamb/0000755000175000017500000000000011412336534011317 500000000000000idzebra-2.0.44/isamb/dictisam.plt0000644000175000017500000000053011412332551013546 00000000000000# Plot isam + isamb times from output of benchindex1 set terminal x11 #set terminal postscript eps #set output "dictisam.eps" set xlabel "Run" set ylabel "time (seconds)" plot "4.jfs.dat" title "jfs 4" with lines, \ "4.jfs.dat" using 1:3 title "jfs 4 dict" with lines, \ "4.jfs.dat" using 1:6 title "jfs 4 isam" with lines pause 60 idzebra-2.0.44/isamb/isamb.c0000644000175000017500000013425111412332551012477 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #ifndef ISAMB_DEBUG #define ISAMB_DEBUG 0 #endif #define ISAMB_MAJOR_VERSION 3 #define ISAMB_MINOR_VERSION_NO_ROOT 0 #define ISAMB_MINOR_VERSION_WITH_ROOT 1 struct ISAMB_head { zint first_block; zint last_block; zint free_list; zint no_items; int block_size; int block_max; int block_offset; }; /* if 1, upper nodes items are encoded; 0 if not encoded */ #define INT_ENCODE 1 /* maximum size of encoded buffer */ #define DST_ITEM_MAX 5000 /* max page size for _any_ isamb use */ #define ISAMB_MAX_PAGE 32768 #define ISAMB_MAX_LEVEL 10 /* approx 2*max page + max size of item */ #define DST_BUF_SIZE (2*ISAMB_MAX_PAGE+DST_ITEM_MAX+100) /* should be maximum block size of multiple thereof */ #define ISAMB_CACHE_ENTRY_SIZE ISAMB_MAX_PAGE /* CAT_MAX: _must_ be power of 2 */ #define CAT_MAX 4 #define CAT_MASK (CAT_MAX-1) /* CAT_NO: <= CAT_MAX */ #define CAT_NO 4 /* Smallest block size */ #define ISAMB_MIN_SIZE 32 /* Size factor */ #define ISAMB_FAC_SIZE 4 /* ISAMB_PTR_CODEC = 1 var, =0 fixed */ #define ISAMB_PTR_CODEC 1 struct ISAMB_cache_entry { ISAM_P pos; unsigned char *buf; int dirty; int hits; struct ISAMB_cache_entry *next; }; struct ISAMB_file { BFile bf; int head_dirty; struct ISAMB_head head; struct ISAMB_cache_entry *cache_entries; }; struct ISAMB_s { BFiles bfs; ISAMC_M *method; struct ISAMB_file *file; int no_cat; int cache; /* 0 = no cache, 1 = use cache, -1 = dummy isam (for testing only) */ int log_io; /* log level for bf_read/bf_write calls */ int log_freelist; /* log level for freelist handling */ zint skipped_numbers; /* on a leaf node */ zint returned_numbers; zint skipped_nodes[ISAMB_MAX_LEVEL]; /* [0]=skipped leaves, 1 = higher etc */ zint accessed_nodes[ISAMB_MAX_LEVEL]; /* nodes we did not skip */ zint number_of_int_splits; zint number_of_leaf_splits; int enable_int_count; /* whether we count nodes (or not) */ int cache_size; /* size of blocks to cache (if cache=1) */ int minor_version; zint root_ptr; }; struct ISAMB_block { ISAM_P pos; int cat; int size; int leaf; int dirty; int deleted; int offset; zint no_items; /* number of nodes in this + children */ char *bytes; char *cbuf; unsigned char *buf; void *decodeClientData; int log_rw; }; struct ISAMB_PP_s { ISAMB isamb; ISAM_P pos; int level; int maxlevel; /* total depth */ zint total_size; zint no_blocks; zint skipped_numbers; /* on a leaf node */ zint returned_numbers; zint skipped_nodes[ISAMB_MAX_LEVEL]; /* [0]=skipped leaves, 1 = higher etc */ zint accessed_nodes[ISAMB_MAX_LEVEL]; /* nodes we did not skip */ struct ISAMB_block **block; int scope; /* on what level we forward */ }; #define encode_item_len encode_ptr #if ISAMB_PTR_CODEC static void encode_ptr(char **dst, zint pos) { unsigned char *bp = (unsigned char*) *dst; while (pos > 127) { *bp++ = (unsigned char) (128 | (pos & 127)); pos = pos >> 7; } *bp++ = (unsigned char) pos; *dst = (char *) bp; } #else static void encode_ptr(char **dst, zint pos) { memcpy(*dst, &pos, sizeof(pos)); (*dst) += sizeof(pos); } #endif #define decode_item_len decode_ptr #if ISAMB_PTR_CODEC static void decode_ptr(const char **src, zint *pos) { zint d = 0; unsigned char c; unsigned r = 0; while (((c = *(const unsigned char *)((*src)++)) & 128)) { d += ((zint) (c & 127) << r); r += 7; } d += ((zint) c << r); *pos = d; } #else static void decode_ptr(const char **src, zint *pos) { memcpy(pos, *src, sizeof(*pos)); (*src) += sizeof(*pos); } #endif void isamb_set_int_count(ISAMB b, int v) { b->enable_int_count = v; } void isamb_set_cache_size(ISAMB b, int v) { b->cache_size = v; } ISAMB isamb_open2(BFiles bfs, const char *name, int writeflag, ISAMC_M *method, int cache, int no_cat, int *sizes, int use_root_ptr) { ISAMB isamb = xmalloc(sizeof(*isamb)); int i; assert(no_cat <= CAT_MAX); isamb->bfs = bfs; isamb->method = (ISAMC_M *) xmalloc(sizeof(*method)); memcpy(isamb->method, method, sizeof(*method)); isamb->no_cat = no_cat; isamb->log_io = 0; isamb->log_freelist = 0; isamb->cache = cache; isamb->skipped_numbers = 0; isamb->returned_numbers = 0; isamb->number_of_int_splits = 0; isamb->number_of_leaf_splits = 0; isamb->enable_int_count = 1; isamb->cache_size = 40; if (use_root_ptr) isamb->minor_version = ISAMB_MINOR_VERSION_WITH_ROOT; else isamb->minor_version = ISAMB_MINOR_VERSION_NO_ROOT; isamb->root_ptr = 0; for (i = 0; iskipped_nodes[i] = isamb->accessed_nodes[i] = 0; if (cache == -1) { yaz_log(YLOG_WARN, "isamb_open %s. Degraded TEST mode", name); } else { assert(cache == 0 || cache == 1); } isamb->file = xmalloc(sizeof(*isamb->file) * isamb->no_cat); for (i = 0; i < isamb->no_cat; i++) { isamb->file[i].bf = 0; isamb->file[i].head_dirty = 0; isamb->file[i].cache_entries = 0; } for (i = 0; i < isamb->no_cat; i++) { char fname[DST_BUF_SIZE]; char hbuf[DST_BUF_SIZE]; sprintf(fname, "%s%c", name, i+'A'); if (cache) isamb->file[i].bf = bf_open(bfs, fname, ISAMB_CACHE_ENTRY_SIZE, writeflag); else isamb->file[i].bf = bf_open(bfs, fname, sizes[i], writeflag); if (!isamb->file[i].bf) { isamb_close(isamb); return 0; } /* fill-in default values (for empty isamb) */ isamb->file[i].head.first_block = ISAMB_CACHE_ENTRY_SIZE/sizes[i]+1; isamb->file[i].head.last_block = isamb->file[i].head.first_block; isamb->file[i].head.block_size = sizes[i]; assert(sizes[i] <= ISAMB_CACHE_ENTRY_SIZE); #if ISAMB_PTR_CODEC if (i == isamb->no_cat-1 || sizes[i] > 128) isamb->file[i].head.block_offset = 8; else isamb->file[i].head.block_offset = 4; #else isamb->file[i].head.block_offset = 11; #endif isamb->file[i].head.block_max = sizes[i] - isamb->file[i].head.block_offset; isamb->file[i].head.free_list = 0; if (bf_read(isamb->file[i].bf, 0, 0, 0, hbuf)) { /* got header assume "isamb"major minor len can fit in 16 bytes */ zint zint_tmp; int major, minor, len, pos = 0; int left; const char *src = 0; if (memcmp(hbuf, "isamb", 5)) { yaz_log(YLOG_WARN, "bad isamb header for file %s", fname); isamb_close(isamb); return 0; } if (sscanf(hbuf+5, "%d %d %d", &major, &minor, &len) != 3) { yaz_log(YLOG_WARN, "bad isamb header for file %s", fname); isamb_close(isamb); return 0; } if (major != ISAMB_MAJOR_VERSION) { yaz_log(YLOG_WARN, "bad major version for file %s %d, must be %d", fname, major, ISAMB_MAJOR_VERSION); isamb_close(isamb); return 0; } for (left = len - sizes[i]; left > 0; left = left - sizes[i]) { pos++; if (!bf_read(isamb->file[i].bf, pos, 0, 0, hbuf + pos*sizes[i])) { yaz_log(YLOG_WARN, "truncated isamb header for " "file=%s len=%d pos=%d", fname, len, pos); isamb_close(isamb); return 0; } } src = hbuf + 16; decode_ptr(&src, &isamb->file[i].head.first_block); decode_ptr(&src, &isamb->file[i].head.last_block); decode_ptr(&src, &zint_tmp); isamb->file[i].head.block_size = (int) zint_tmp; decode_ptr(&src, &zint_tmp); isamb->file[i].head.block_max = (int) zint_tmp; decode_ptr(&src, &isamb->file[i].head.free_list); if (isamb->minor_version >= ISAMB_MINOR_VERSION_WITH_ROOT) decode_ptr(&src, &isamb->root_ptr); } assert(isamb->file[i].head.block_size >= isamb->file[i].head.block_offset); /* must rewrite the header if root ptr is in use (bug #1017) */ if (use_root_ptr && writeflag) isamb->file[i].head_dirty = 1; else isamb->file[i].head_dirty = 0; assert(isamb->file[i].head.block_size == sizes[i]); } #if ISAMB_DEBUG yaz_log(YLOG_WARN, "isamb debug enabled. Things will be slower than usual"); #endif return isamb; } ISAMB isamb_open(BFiles bfs, const char *name, int writeflag, ISAMC_M *method, int cache) { int sizes[CAT_NO]; int i, b_size = ISAMB_MIN_SIZE; for (i = 0; ifile[cat].cache_entries) { struct ISAMB_cache_entry *ce_this = b->file[cat].cache_entries; b->file[cat].cache_entries = ce_this->next; if (ce_this->dirty) { yaz_log(b->log_io, "bf_write: flush_blocks"); bf_write(b->file[cat].bf, ce_this->pos, 0, 0, ce_this->buf); } xfree(ce_this->buf); xfree(ce_this); } } static int cache_block(ISAMB b, ISAM_P pos, unsigned char *userbuf, int wr) { int cat = (int) (pos&CAT_MASK); int off = (int) (((pos/CAT_MAX) & (ISAMB_CACHE_ENTRY_SIZE / b->file[cat].head.block_size - 1)) * b->file[cat].head.block_size); zint norm = pos / (CAT_MASK*ISAMB_CACHE_ENTRY_SIZE / b->file[cat].head.block_size); int no = 0; struct ISAMB_cache_entry **ce, *ce_this = 0, **ce_last = 0; if (!b->cache) return 0; assert(ISAMB_CACHE_ENTRY_SIZE >= b->file[cat].head.block_size); for (ce = &b->file[cat].cache_entries; *ce; ce = &(*ce)->next, no++) { ce_last = ce; if ((*ce)->pos == norm) { ce_this = *ce; *ce = (*ce)->next; /* remove from list */ ce_this->next = b->file[cat].cache_entries; /* move to front */ b->file[cat].cache_entries = ce_this; if (wr) { memcpy(ce_this->buf + off, userbuf, b->file[cat].head.block_size); ce_this->dirty = 1; } else memcpy(userbuf, ce_this->buf + off, b->file[cat].head.block_size); return 1; } } if (no >= b->cache_size) { assert(ce_last && *ce_last); ce_this = *ce_last; *ce_last = 0; /* remove the last entry from list */ if (ce_this->dirty) { yaz_log(b->log_io, "bf_write: cache_block"); bf_write(b->file[cat].bf, ce_this->pos, 0, 0, ce_this->buf); } xfree(ce_this->buf); xfree(ce_this); } ce_this = xmalloc(sizeof(*ce_this)); ce_this->next = b->file[cat].cache_entries; b->file[cat].cache_entries = ce_this; ce_this->buf = xmalloc(ISAMB_CACHE_ENTRY_SIZE); ce_this->pos = norm; yaz_log(b->log_io, "bf_read: cache_block"); if (!bf_read(b->file[cat].bf, norm, 0, 0, ce_this->buf)) memset(ce_this->buf, 0, ISAMB_CACHE_ENTRY_SIZE); if (wr) { memcpy(ce_this->buf + off, userbuf, b->file[cat].head.block_size); ce_this->dirty = 1; } else { ce_this->dirty = 0; memcpy(userbuf, ce_this->buf + off, b->file[cat].head.block_size); } return 1; } void isamb_close(ISAMB isamb) { int i; for (i = 0; isamb->accessed_nodes[i]; i++) yaz_log(YLOG_DEBUG, "isamb_close level leaf-%d: "ZINT_FORMAT" read, " ZINT_FORMAT" skipped", i, isamb->accessed_nodes[i], isamb->skipped_nodes[i]); yaz_log(YLOG_DEBUG, "isamb_close returned "ZINT_FORMAT" values, " "skipped "ZINT_FORMAT, isamb->skipped_numbers, isamb->returned_numbers); for (i = 0; ino_cat; i++) { flush_blocks(isamb, i); if (isamb->file[i].head_dirty) { char hbuf[DST_BUF_SIZE]; int major = ISAMB_MAJOR_VERSION; int len = 16; char *dst = hbuf + 16; int pos = 0, left; int b_size = isamb->file[i].head.block_size; encode_ptr(&dst, isamb->file[i].head.first_block); encode_ptr(&dst, isamb->file[i].head.last_block); encode_ptr(&dst, isamb->file[i].head.block_size); encode_ptr(&dst, isamb->file[i].head.block_max); encode_ptr(&dst, isamb->file[i].head.free_list); if (isamb->minor_version >= ISAMB_MINOR_VERSION_WITH_ROOT) encode_ptr(&dst, isamb->root_ptr); memset(dst, '\0', b_size); /* ensure no random bytes are written */ len = dst - hbuf; /* print exactly 16 bytes (including trailing 0) */ sprintf(hbuf, "isamb%02d %02d %02d\r\n", major, isamb->minor_version, len); bf_write(isamb->file[i].bf, pos, 0, 0, hbuf); for (left = len - b_size; left > 0; left = left - b_size) { pos++; bf_write(isamb->file[i].bf, pos, 0, 0, hbuf + pos*b_size); } } if (isamb->file[i].bf) bf_close (isamb->file[i].bf); } xfree(isamb->file); xfree(isamb->method); xfree(isamb); } /* open_block: read one block at pos. Decode leading sys bytes .. consisting of Offset:Meaning 0: leader byte, != 0 leaf, == 0, non-leaf 1-2: used size of block 3-7*: number of items and all children * Reserve 5 bytes for large block sizes. 1 for small ones .. Number of items. We can thus have at most 2^40 nodes. */ static struct ISAMB_block *open_block(ISAMB b, ISAM_P pos) { int cat = (int) (pos&CAT_MASK); const char *src; int offset = b->file[cat].head.block_offset; struct ISAMB_block *p; if (!pos) return 0; p = xmalloc(sizeof(*p)); p->pos = pos; p->cat = (int) (pos & CAT_MASK); p->buf = xmalloc(b->file[cat].head.block_size); p->cbuf = 0; if (!cache_block (b, pos, p->buf, 0)) { yaz_log(b->log_io, "bf_read: open_block"); if (bf_read(b->file[cat].bf, pos/CAT_MAX, 0, 0, p->buf) != 1) { yaz_log(YLOG_FATAL, "isamb: read fail for pos=%ld block=%ld", (long) pos, (long) pos/CAT_MAX); zebra_exit("isamb:open_block"); } } p->bytes = (char *)p->buf + offset; p->leaf = p->buf[0]; p->size = (p->buf[1] + 256 * p->buf[2]) - offset; if (p->size < 0) { yaz_log(YLOG_FATAL, "Bad block size %d in pos=" ZINT_FORMAT "\n", p->size, pos); } assert(p->size >= 0); src = (char*) p->buf + 3; decode_ptr(&src, &p->no_items); p->offset = 0; p->dirty = 0; p->deleted = 0; p->decodeClientData = (*b->method->codec.start)(); return p; } struct ISAMB_block *new_block(ISAMB b, int leaf, int cat) { struct ISAMB_block *p; p = xmalloc(sizeof(*p)); p->buf = xmalloc(b->file[cat].head.block_size); if (!b->file[cat].head.free_list) { zint block_no; block_no = b->file[cat].head.last_block++; p->pos = block_no * CAT_MAX + cat; if (b->log_freelist) yaz_log(b->log_freelist, "got block " ZINT_FORMAT " from last %d:" ZINT_FORMAT, p->pos, cat, p->pos/CAT_MAX); } else { p->pos = b->file[cat].head.free_list; assert((p->pos & CAT_MASK) == cat); if (!cache_block(b, p->pos, p->buf, 0)) { yaz_log(b->log_io, "bf_read: new_block"); if (!bf_read(b->file[cat].bf, p->pos/CAT_MAX, 0, 0, p->buf)) { yaz_log(YLOG_FATAL, "isamb: read fail for pos=%ld block=%ld", (long) p->pos/CAT_MAX, (long) p->pos/CAT_MAX); zebra_exit("isamb:new_block"); } } if (b->log_freelist) yaz_log(b->log_freelist, "got block " ZINT_FORMAT " from freelist %d:" ZINT_FORMAT, p->pos, cat, p->pos/CAT_MAX); memcpy(&b->file[cat].head.free_list, p->buf, sizeof(zint)); } p->cat = cat; b->file[cat].head_dirty = 1; memset(p->buf, 0, b->file[cat].head.block_size); p->bytes = (char*)p->buf + b->file[cat].head.block_offset; p->leaf = leaf; p->size = 0; p->dirty = 1; p->deleted = 0; p->offset = 0; p->no_items = 0; p->decodeClientData = (*b->method->codec.start)(); return p; } struct ISAMB_block *new_leaf(ISAMB b, int cat) { return new_block(b, 1, cat); } struct ISAMB_block *new_int(ISAMB b, int cat) { return new_block(b, 0, cat); } static void check_block(ISAMB b, struct ISAMB_block *p) { assert(b); /* mostly to make the compiler shut up about unused b */ if (p->leaf) { ; } else { /* sanity check */ char *startp = p->bytes; const char *src = startp; char *endp = p->bytes + p->size; ISAM_P pos; void *c1 = (*b->method->codec.start)(); decode_ptr(&src, &pos); assert((pos&CAT_MASK) == p->cat); while (src != endp) { #if INT_ENCODE char file_item_buf[DST_ITEM_MAX]; char *file_item = file_item_buf; (*b->method->codec.reset)(c1); (*b->method->codec.decode)(c1, &file_item, &src); #else zint item_len; decode_item_len(&src, &item_len); assert(item_len > 0 && item_len < 128); src += item_len; #endif decode_ptr(&src, &pos); if ((pos&CAT_MASK) != p->cat) { assert((pos&CAT_MASK) == p->cat); } } (*b->method->codec.stop)(c1); } } void close_block(ISAMB b, struct ISAMB_block *p) { if (!p) return; if (p->deleted) { yaz_log(b->log_freelist, "release block " ZINT_FORMAT " from freelist %d:" ZINT_FORMAT, p->pos, p->cat, p->pos/CAT_MAX); memcpy(p->buf, &b->file[p->cat].head.free_list, sizeof(zint)); b->file[p->cat].head.free_list = p->pos; b->file[p->cat].head_dirty = 1; if (!cache_block(b, p->pos, p->buf, 1)) { yaz_log(b->log_io, "bf_write: close_block (deleted)"); bf_write(b->file[p->cat].bf, p->pos/CAT_MAX, 0, 0, p->buf); } } else if (p->dirty) { int offset = b->file[p->cat].head.block_offset; int size = p->size + offset; char *dst = (char*)p->buf + 3; assert(p->size >= 0); /* memset becuase encode_ptr usually does not write all bytes */ memset(p->buf, 0, b->file[p->cat].head.block_offset); p->buf[0] = p->leaf; p->buf[1] = size & 255; p->buf[2] = size >> 8; encode_ptr(&dst, p->no_items); check_block(b, p); if (!cache_block(b, p->pos, p->buf, 1)) { yaz_log(b->log_io, "bf_write: close_block"); bf_write(b->file[p->cat].bf, p->pos/CAT_MAX, 0, 0, p->buf); } } (*b->method->codec.stop)(p->decodeClientData); xfree(p->buf); xfree(p); } int insert_sub(ISAMB b, struct ISAMB_block **p, void *new_item, int *mode, ISAMC_I *stream, struct ISAMB_block **sp, void *sub_item, int *sub_size, const void *max_item); int insert_int(ISAMB b, struct ISAMB_block *p, void *lookahead_item, int *mode, ISAMC_I *stream, struct ISAMB_block **sp, void *split_item, int *split_size, const void *last_max_item) { char *startp = p->bytes; const char *src = startp; char *endp = p->bytes + p->size; ISAM_P pos; struct ISAMB_block *sub_p1 = 0, *sub_p2 = 0; char sub_item[DST_ITEM_MAX]; int sub_size; int more = 0; zint diff_terms = 0; void *c1 = (*b->method->codec.start)(); *sp = 0; assert(p->size >= 0); decode_ptr(&src, &pos); while (src != endp) { int d; const char *src0 = src; #if INT_ENCODE char file_item_buf[DST_ITEM_MAX]; char *file_item = file_item_buf; (*b->method->codec.reset)(c1); (*b->method->codec.decode)(c1, &file_item, &src); d = (*b->method->compare_item)(file_item_buf, lookahead_item); if (d > 0) { sub_p1 = open_block(b, pos); assert(sub_p1); diff_terms -= sub_p1->no_items; more = insert_sub(b, &sub_p1, lookahead_item, mode, stream, &sub_p2, sub_item, &sub_size, file_item_buf); diff_terms += sub_p1->no_items; src = src0; break; } #else zint item_len; decode_item_len(&src, &item_len); d = (*b->method->compare_item)(src, lookahead_item); if (d > 0) { sub_p1 = open_block(b, pos); assert(sub_p1); diff_terms -= sub_p1->no_items; more = insert_sub(b, &sub_p1, lookahead_item, mode, stream, &sub_p2, sub_item, &sub_size, src); diff_terms += sub_p1->no_items; src = src0; break; } src += item_len; #endif decode_ptr(&src, &pos); } if (!sub_p1) { /* we reached the end. So lookahead > last item */ sub_p1 = open_block(b, pos); assert(sub_p1); diff_terms -= sub_p1->no_items; more = insert_sub(b, &sub_p1, lookahead_item, mode, stream, &sub_p2, sub_item, &sub_size, last_max_item); diff_terms += sub_p1->no_items; } if (sub_p2) diff_terms += sub_p2->no_items; if (diff_terms) { p->dirty = 1; p->no_items += diff_terms; } if (sub_p2) { /* there was a split - must insert pointer in this one */ char dst_buf[DST_BUF_SIZE]; char *dst = dst_buf; #if INT_ENCODE const char *sub_item_ptr = sub_item; #endif assert(sub_size < DST_ITEM_MAX && sub_size > 1); memcpy(dst, startp, src - startp); dst += src - startp; #if INT_ENCODE (*b->method->codec.reset)(c1); (*b->method->codec.encode)(c1, &dst, &sub_item_ptr); #else encode_item_len(&dst, sub_size); /* sub length and item */ memcpy(dst, sub_item, sub_size); dst += sub_size; #endif encode_ptr(&dst, sub_p2->pos); /* pos */ if (endp - src) /* remaining data */ { memcpy(dst, src, endp - src); dst += endp - src; } p->size = dst - dst_buf; assert(p->size >= 0); if (p->size <= b->file[p->cat].head.block_max) { /* it fits OK in this block */ memcpy(startp, dst_buf, dst - dst_buf); close_block(b, sub_p2); } else { /* must split _this_ block as well .. */ struct ISAMB_block *sub_p3; #if INT_ENCODE char file_item_buf[DST_ITEM_MAX]; char *file_item = file_item_buf; #else zint split_size_tmp; #endif zint no_items_first_half = 0; int p_new_size; const char *half; src = dst_buf; endp = dst; b->number_of_int_splits++; p->dirty = 1; close_block(b, sub_p2); half = src + b->file[p->cat].head.block_size/2; decode_ptr(&src, &pos); if (b->enable_int_count) { /* read sub block so we can get no_items for it */ sub_p3 = open_block(b, pos); no_items_first_half += sub_p3->no_items; close_block(b, sub_p3); } while (src <= half) { #if INT_ENCODE file_item = file_item_buf; (*b->method->codec.reset)(c1); (*b->method->codec.decode)(c1, &file_item, &src); #else decode_item_len(&src, &split_size_tmp); *split_size = (int) split_size_tmp; src += *split_size; #endif decode_ptr(&src, &pos); if (b->enable_int_count) { /* read sub block so we can get no_items for it */ sub_p3 = open_block(b, pos); no_items_first_half += sub_p3->no_items; close_block(b, sub_p3); } } /* p is first half */ p_new_size = src - dst_buf; memcpy(p->bytes, dst_buf, p_new_size); #if INT_ENCODE file_item = file_item_buf; (*b->method->codec.reset)(c1); (*b->method->codec.decode)(c1, &file_item, &src); *split_size = file_item - file_item_buf; memcpy(split_item, file_item_buf, *split_size); #else decode_item_len(&src, &split_size_tmp); *split_size = (int) split_size_tmp; memcpy(split_item, src, *split_size); src += *split_size; #endif /* *sp is second half */ *sp = new_int(b, p->cat); (*sp)->size = endp - src; memcpy((*sp)->bytes, src, (*sp)->size); p->size = p_new_size; /* adjust no_items in first&second half */ (*sp)->no_items = p->no_items - no_items_first_half; p->no_items = no_items_first_half; } p->dirty = 1; } close_block(b, sub_p1); (*b->method->codec.stop)(c1); return more; } int insert_leaf(ISAMB b, struct ISAMB_block **sp1, void *lookahead_item, int *lookahead_mode, ISAMC_I *stream, struct ISAMB_block **sp2, void *sub_item, int *sub_size, const void *max_item) { struct ISAMB_block *p = *sp1; char *endp = 0; const char *src = 0; char dst_buf[DST_BUF_SIZE], *dst = dst_buf; int new_size; void *c1 = (*b->method->codec.start)(); void *c2 = (*b->method->codec.start)(); int more = 1; int quater = b->file[b->no_cat-1].head.block_max / 4; char *mid_cut = dst_buf + quater * 2; char *tail_cut = dst_buf + quater * 3; char *maxp = dst_buf + b->file[b->no_cat-1].head.block_max; char *half1 = 0; char *half2 = 0; char cut_item_buf[DST_ITEM_MAX]; int cut_item_size = 0; int no_items = 0; /* number of items (total) */ int no_items_1 = 0; /* number of items (first half) */ int inserted_dst_bytes = 0; if (p && p->size) { char file_item_buf[DST_ITEM_MAX]; char *file_item = file_item_buf; src = p->bytes; endp = p->bytes + p->size; (*b->method->codec.decode)(c1, &file_item, &src); while (1) { const char *dst_item = 0; /* resulting item to be inserted */ char *lookahead_next; char *dst_0 = dst; int d = -1; if (lookahead_item) d = (*b->method->compare_item)(file_item_buf, lookahead_item); /* d now holds comparison between existing file item and lookahead item d = 0: equal d > 0: lookahead before file d < 0: lookahead after file */ if (d > 0) { /* lookahead must be inserted */ dst_item = lookahead_item; /* if this is not an insertion, it's really bad .. */ if (!*lookahead_mode) { yaz_log(YLOG_WARN, "isamb: Inconsistent register (1)"); assert(*lookahead_mode); } } else if (d == 0 && *lookahead_mode == 2) { /* For mode == 2, we insert the new key anyway - even though the comparison is 0. */ dst_item = lookahead_item; p->dirty = 1; } else dst_item = file_item_buf; if (d == 0 && !*lookahead_mode) { /* it's a deletion and they match so there is nothing to be inserted anyway .. But mark the thing dirty (file item was part of input.. The item will not be part of output */ p->dirty = 1; } else if (!half1 && dst > mid_cut) { /* we have reached the splitting point for the first time */ const char *dst_item_0 = dst_item; half1 = dst; /* candidate for splitting */ /* encode the resulting item */ (*b->method->codec.encode)(c2, &dst, &dst_item); cut_item_size = dst_item - dst_item_0; assert(cut_item_size > 0); memcpy(cut_item_buf, dst_item_0, cut_item_size); half2 = dst; no_items_1 = no_items; no_items++; } else { /* encode the resulting item */ (*b->method->codec.encode)(c2, &dst, &dst_item); no_items++; } /* now move "pointers" .. result has been encoded .. */ if (d > 0) { /* we must move the lookahead pointer */ inserted_dst_bytes += (dst - dst_0); if (inserted_dst_bytes >= quater) /* no more room. Mark lookahead as "gone".. */ lookahead_item = 0; else { /* move it really.. */ lookahead_next = lookahead_item; if (!(*stream->read_item)(stream->clientData, &lookahead_next, lookahead_mode)) { /* end of stream reached: no "more" and no lookahead */ lookahead_item = 0; more = 0; } if (lookahead_item && max_item && (*b->method->compare_item)(max_item, lookahead_item) <= 0) { /* the lookahead goes beyond what we allow in this leaf. Mark it as "gone" */ lookahead_item = 0; } p->dirty = 1; } } else if (d == 0) { /* exact match .. move both pointers */ lookahead_next = lookahead_item; if (!(*stream->read_item)(stream->clientData, &lookahead_next, lookahead_mode)) { lookahead_item = 0; more = 0; } if (src == endp) break; /* end of file stream reached .. */ file_item = file_item_buf; /* move file pointer */ (*b->method->codec.decode)(c1, &file_item, &src); } else { /* file pointer must be moved */ if (src == endp) break; file_item = file_item_buf; (*b->method->codec.decode)(c1, &file_item, &src); } } } /* this loop runs when we are "appending" to a leaf page. That is either it's empty (new) or all file items have been read in previous loop */ maxp = dst_buf + b->file[b->no_cat-1].head.block_max + quater; while (lookahead_item) { char *dst_item; const char *src = lookahead_item; char *dst_0 = dst; /* if we have a lookahead item, we stop if we exceed the value of it */ if (max_item && (*b->method->compare_item)(max_item, lookahead_item) <= 0) { /* stop if we have reached the value of max item */ break; } if (!*lookahead_mode) { /* this is append. So a delete is bad */ yaz_log(YLOG_WARN, "isamb: Inconsistent register (2)"); assert(*lookahead_mode); } else if (!half1 && dst > tail_cut) { const char *src_0 = src; half1 = dst; /* candidate for splitting */ (*b->method->codec.encode)(c2, &dst, &src); cut_item_size = src - src_0; assert(cut_item_size > 0); memcpy(cut_item_buf, src_0, cut_item_size); no_items_1 = no_items; half2 = dst; } else (*b->method->codec.encode)(c2, &dst, &src); if (dst > maxp) { dst = dst_0; break; } no_items++; if (p) p->dirty = 1; dst_item = lookahead_item; if (!(*stream->read_item)(stream->clientData, &dst_item, lookahead_mode)) { lookahead_item = 0; more = 0; } } new_size = dst - dst_buf; if (p && p->cat != b->no_cat-1 && new_size > b->file[p->cat].head.block_max) { /* non-btree block will be removed */ p->deleted = 1; close_block(b, p); /* delete it too!! */ p = 0; /* make a new one anyway */ } if (!p) { /* must create a new one */ int i; for (i = 0; i < b->no_cat; i++) if (new_size <= b->file[i].head.block_max) break; if (i == b->no_cat) i = b->no_cat - 1; p = new_leaf(b, i); } if (new_size > b->file[p->cat].head.block_max) { char *first_dst; const char *cut_item = cut_item_buf; assert(half1); assert(half2); assert(cut_item_size > 0); /* first half */ p->size = half1 - dst_buf; assert(p->size <= b->file[p->cat].head.block_max); memcpy(p->bytes, dst_buf, half1 - dst_buf); p->no_items = no_items_1; /* second half */ *sp2 = new_leaf(b, p->cat); (*b->method->codec.reset)(c2); b->number_of_leaf_splits++; first_dst = (*sp2)->bytes; (*b->method->codec.encode)(c2, &first_dst, &cut_item); memcpy(first_dst, half2, dst - half2); (*sp2)->size = (first_dst - (*sp2)->bytes) + (dst - half2); assert((*sp2)->size <= b->file[p->cat].head.block_max); (*sp2)->no_items = no_items - no_items_1; (*sp2)->dirty = 1; p->dirty = 1; memcpy(sub_item, cut_item_buf, cut_item_size); *sub_size = cut_item_size; } else { memcpy(p->bytes, dst_buf, dst - dst_buf); p->size = new_size; p->no_items = no_items; } (*b->method->codec.stop)(c1); (*b->method->codec.stop)(c2); *sp1 = p; return more; } int insert_sub(ISAMB b, struct ISAMB_block **p, void *new_item, int *mode, ISAMC_I *stream, struct ISAMB_block **sp, void *sub_item, int *sub_size, const void *max_item) { if (!*p || (*p)->leaf) return insert_leaf(b, p, new_item, mode, stream, sp, sub_item, sub_size, max_item); else return insert_int(b, *p, new_item, mode, stream, sp, sub_item, sub_size, max_item); } int isamb_unlink(ISAMB b, ISAM_P pos) { struct ISAMB_block *p1; if (!pos) return 0; p1 = open_block(b, pos); p1->deleted = 1; if (!p1->leaf) { zint sub_p; const char *src = p1->bytes + p1->offset; #if INT_ENCODE void *c1 = (*b->method->codec.start)(); #endif decode_ptr(&src, &sub_p); isamb_unlink(b, sub_p); while (src != p1->bytes + p1->size) { #if INT_ENCODE char file_item_buf[DST_ITEM_MAX]; char *file_item = file_item_buf; (*b->method->codec.reset)(c1); (*b->method->codec.decode)(c1, &file_item, &src); #else zint item_len; decode_item_len(&src, &item_len); src += item_len; #endif decode_ptr(&src, &sub_p); isamb_unlink(b, sub_p); } #if INT_ENCODE (*b->method->codec.stop)(c1); #endif } close_block(b, p1); return 0; } void isamb_merge(ISAMB b, ISAM_P *pos, ISAMC_I *stream) { char item_buf[DST_ITEM_MAX]; char *item_ptr; int i_mode; int more; int must_delete = 0; if (b->cache < 0) { int more = 1; while (more) { item_ptr = item_buf; more = (*stream->read_item)(stream->clientData, &item_ptr, &i_mode); } *pos = 1; return; } item_ptr = item_buf; more = (*stream->read_item)(stream->clientData, &item_ptr, &i_mode); while (more) { struct ISAMB_block *p = 0, *sp = 0; char sub_item[DST_ITEM_MAX]; int sub_size; if (*pos) p = open_block(b, *pos); more = insert_sub(b, &p, item_buf, &i_mode, stream, &sp, sub_item, &sub_size, 0); if (sp) { /* increase level of tree by one */ struct ISAMB_block *p2 = new_int(b, p->cat); char *dst = p2->bytes + p2->size; #if INT_ENCODE void *c1 = (*b->method->codec.start)(); const char *sub_item_ptr = sub_item; #endif encode_ptr(&dst, p->pos); assert(sub_size < DST_ITEM_MAX && sub_size > 1); #if INT_ENCODE (*b->method->codec.reset)(c1); (*b->method->codec.encode)(c1, &dst, &sub_item_ptr); #else encode_item_len(&dst, sub_size); memcpy(dst, sub_item, sub_size); dst += sub_size; #endif encode_ptr(&dst, sp->pos); p2->size = dst - p2->bytes; p2->no_items = p->no_items + sp->no_items; *pos = p2->pos; /* return new super page */ close_block(b, sp); close_block(b, p2); #if INT_ENCODE (*b->method->codec.stop)(c1); #endif } else { *pos = p->pos; /* return current one (again) */ } if (p->no_items == 0) must_delete = 1; else must_delete = 0; close_block(b, p); } if (must_delete) { isamb_unlink(b, *pos); *pos = 0; } } ISAMB_PP isamb_pp_open_x(ISAMB isamb, ISAM_P pos, int *level, int scope) { ISAMB_PP pp = xmalloc(sizeof(*pp)); int i; assert(pos); pp->isamb = isamb; pp->block = xmalloc(ISAMB_MAX_LEVEL * sizeof(*pp->block)); pp->pos = pos; pp->level = 0; pp->maxlevel = 0; pp->total_size = 0; pp->no_blocks = 0; pp->skipped_numbers = 0; pp->returned_numbers = 0; pp->scope = scope; for (i = 0; iskipped_nodes[i] = pp->accessed_nodes[i] = 0; while (1) { struct ISAMB_block *p = open_block(isamb, pos); const char *src = p->bytes + p->offset; pp->block[pp->level] = p; pp->total_size += p->size; pp->no_blocks++; if (p->leaf) break; decode_ptr(&src, &pos); p->offset = src - p->bytes; pp->level++; pp->accessed_nodes[pp->level]++; } pp->block[pp->level+1] = 0; pp->maxlevel = pp->level; if (level) *level = pp->level; return pp; } ISAMB_PP isamb_pp_open(ISAMB isamb, ISAM_P pos, int scope) { return isamb_pp_open_x(isamb, pos, 0, scope); } void isamb_pp_close_x(ISAMB_PP pp, zint *size, zint *blocks) { int i; if (!pp) return; yaz_log(YLOG_DEBUG, "isamb_pp_close lev=%d returned "ZINT_FORMAT" values, " "skipped "ZINT_FORMAT, pp->maxlevel, pp->skipped_numbers, pp->returned_numbers); for (i = pp->maxlevel; i>=0; i--) if (pp->skipped_nodes[i] || pp->accessed_nodes[i]) yaz_log(YLOG_DEBUG, "isamb_pp_close level leaf-%d: " ZINT_FORMAT" read, "ZINT_FORMAT" skipped", i, pp->accessed_nodes[i], pp->skipped_nodes[i]); pp->isamb->skipped_numbers += pp->skipped_numbers; pp->isamb->returned_numbers += pp->returned_numbers; for (i = pp->maxlevel; i>=0; i--) { pp->isamb->accessed_nodes[i] += pp->accessed_nodes[i]; pp->isamb->skipped_nodes[i] += pp->skipped_nodes[i]; } if (size) *size = pp->total_size; if (blocks) *blocks = pp->no_blocks; for (i = 0; i <= pp->level; i++) close_block(pp->isamb, pp->block[i]); xfree(pp->block); xfree(pp); } int isamb_block_info(ISAMB isamb, int cat) { if (cat >= 0 && cat < isamb->no_cat) return isamb->file[cat].head.block_size; return -1; } void isamb_pp_close(ISAMB_PP pp) { isamb_pp_close_x(pp, 0, 0); } /* simple recursive dumper .. */ static void isamb_dump_r(ISAMB b, ISAM_P pos, void (*pr)(const char *str), int level) { char buf[1024]; char prefix_str[1024]; if (pos) { struct ISAMB_block *p = open_block(b, pos); sprintf(prefix_str, "%*s " ZINT_FORMAT " cat=%d size=%d max=%d items=" ZINT_FORMAT, level*2, "", pos, p->cat, p->size, b->file[p->cat].head.block_max, p->no_items); (*pr)(prefix_str); sprintf(prefix_str, "%*s " ZINT_FORMAT, level*2, "", pos); if (p->leaf) { while (p->offset < p->size) { const char *src = p->bytes + p->offset; char *dst = buf; (*b->method->codec.decode)(p->decodeClientData, &dst, &src); (*b->method->log_item)(YLOG_DEBUG, buf, prefix_str); p->offset = src - (char*) p->bytes; } assert(p->offset == p->size); } else { const char *src = p->bytes + p->offset; ISAM_P sub; decode_ptr(&src, &sub); p->offset = src - (char*) p->bytes; isamb_dump_r(b, sub, pr, level+1); while (p->offset < p->size) { #if INT_ENCODE char file_item_buf[DST_ITEM_MAX]; char *file_item = file_item_buf; void *c1 = (*b->method->codec.start)(); (*b->method->codec.decode)(c1, &file_item, &src); (*b->method->codec.stop)(c1); (*b->method->log_item)(YLOG_DEBUG, file_item_buf, prefix_str); #else zint item_len; decode_item_len(&src, &item_len); (*b->method->log_item)(YLOG_DEBUG, src, prefix_str); src += item_len; #endif decode_ptr(&src, &sub); p->offset = src - (char*) p->bytes; isamb_dump_r(b, sub, pr, level+1); } } close_block(b, p); } } void isamb_dump(ISAMB b, ISAM_P pos, void (*pr)(const char *str)) { isamb_dump_r(b, pos, pr, 0); } int isamb_pp_read(ISAMB_PP pp, void *buf) { return isamb_pp_forward(pp, buf, 0); } void isamb_pp_pos(ISAMB_PP pp, double *current, double *total) { /* return an estimate of the current position and of the total number of */ /* occureences in the isam tree, based on the current leaf */ assert(total); assert(current); /* if end-of-stream PP may not be leaf */ *total = (double) (pp->block[0]->no_items); *current = (double) pp->returned_numbers; #if ISAMB_DEBUG yaz_log(YLOG_LOG, "isamb_pp_pos returning: cur= %0.1f tot=%0.1f rn=" ZINT_FORMAT, *current, *total, pp->returned_numbers); #endif } int isamb_pp_forward(ISAMB_PP pp, void *buf, const void *untilb) { char *dst = buf; const char *src; struct ISAMB_block *p = pp->block[pp->level]; ISAMB b = pp->isamb; if (!p) return 0; again: while (p->offset == p->size) { ISAM_P pos; #if INT_ENCODE const char *src_0; void *c1; char file_item_buf[DST_ITEM_MAX]; char *file_item = file_item_buf; #else zint item_len; #endif while (p->offset == p->size) { if (pp->level == 0) return 0; close_block(pp->isamb, pp->block[pp->level]); pp->block[pp->level] = 0; (pp->level)--; p = pp->block[pp->level]; assert(!p->leaf); } assert(!p->leaf); src = p->bytes + p->offset; #if INT_ENCODE c1 = (*b->method->codec.start)(); (*b->method->codec.decode)(c1, &file_item, &src); #else decode_ptr(&src, &item_len); src += item_len; #endif decode_ptr(&src, &pos); p->offset = src - (char*) p->bytes; src = p->bytes + p->offset; while(1) { if (!untilb || p->offset == p->size) break; assert(p->offset < p->size); #if INT_ENCODE src_0 = src; file_item = file_item_buf; (*b->method->codec.reset)(c1); (*b->method->codec.decode)(c1, &file_item, &src); if ((*b->method->compare_item)(untilb, file_item_buf) < pp->scope) { src = src_0; break; } #else decode_item_len(&src, &item_len); if ((*b->method->compare_item)(untilb, src) < pp->scope) break; src += item_len; #endif decode_ptr(&src, &pos); p->offset = src - (char*) p->bytes; } pp->level++; while (1) { pp->block[pp->level] = p = open_block(pp->isamb, pos); pp->total_size += p->size; pp->no_blocks++; if (p->leaf) { break; } src = p->bytes + p->offset; while(1) { decode_ptr(&src, &pos); p->offset = src - (char*) p->bytes; if (!untilb || p->offset == p->size) break; assert(p->offset < p->size); #if INT_ENCODE src_0 = src; file_item = file_item_buf; (*b->method->codec.reset)(c1); (*b->method->codec.decode)(c1, &file_item, &src); if ((*b->method->compare_item)(untilb, file_item_buf) < pp->scope) { src = src_0; break; } #else decode_ptr(&src, &item_len); if ((*b->method->compare_item)(untilb, src) <= pp->scope) break; src += item_len; #endif } pp->level++; } #if INT_ENCODE (*b->method->codec.stop)(c1); #endif } assert(p->offset < p->size); assert(p->leaf); while(1) { char *dst0 = dst; src = p->bytes + p->offset; (*pp->isamb->method->codec.decode)(p->decodeClientData, &dst, &src); p->offset = src - (char*) p->bytes; if (!untilb || (*pp->isamb->method->compare_item)(untilb, dst0) < pp->scope) break; dst = dst0; if (p->offset == p->size) goto again; } pp->returned_numbers++; return 1; } zint isamb_get_int_splits(ISAMB b) { return b->number_of_int_splits; } zint isamb_get_leaf_splits(ISAMB b) { return b->number_of_leaf_splits; } zint isamb_get_root_ptr(ISAMB b) { return b->root_ptr; } void isamb_set_root_ptr(ISAMB b, zint root_ptr) { b->root_ptr = root_ptr; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/isamb/filesystems.plt0000644000175000017500000000051511412332551014323 00000000000000# Inspect benchindex1 times with different filesystems set terminal x11 # set terminal postscript eps # set output "filesystems.eps" set xlabel "Run" set ylabel "time (seconds)" plot "ext3.dat" title "ext3" smooth acsplines,\ "jfs.dat" title "jfs" smooth acsplines, \ "reiser.dat" title "reiser" smooth acsplines pause 60 idzebra-2.0.44/isamb/Makefile.am0000644000175000017500000000162011412332551013265 00000000000000 noinst_LTLIBRARIES = libidzebra-isamb.la noinst_PROGRAMS = benchisamb benchindex1 check_PROGRAMS = tstisamb EXTRA_DIST = bench1.sh bench1.plt bench2.sh bench2.plt \ filesystems.plt dictisam.plt TESTS = $(check_PROGRAMS) tstisamb_SOURCES = tstisamb.c tstisamb_LDADD = libidzebra-isamb.la \ ../bfile/libidzebra-bfile.la \ ../util/libidzebra-util.la $(YAZLALIB) benchisamb_SOURCES = benchisamb.c benchisamb_LDADD = libidzebra-isamb.la \ ../bfile/libidzebra-bfile.la \ ../util/libidzebra-util.la $(YAZLALIB) benchindex1_SOURCES = benchindex1.c benchindex1_LDADD = libidzebra-isamb.la \ ../bfile/libidzebra-bfile.la \ ../dict/libidzebra-dict.la \ ../util/libidzebra-util.la $(YAZLALIB) libidzebra_isamb_la_SOURCES = isamb.c AM_CPPFLAGS=-I$(srcdir)/../include $(YAZINC) LDADD = ../util/libutil.a ../bfile/libbfile.a libisamc.a $(YAZLALIB) clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf idzebra-2.0.44/isamb/tstisamb.c0000644000175000017500000002545311412332551013235 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #if HAVE_SYS_TIMES_H #include #endif #if HAVE_SYS_TIME_H #include #endif #include #include #include #include #include #include static int log_level = 0; static void log_item(int level, const void *b, const char *txt) { int x; memcpy(&x, b, sizeof(int)); yaz_log(log_level, "%s %d", txt, x); } static void log_pr(const char *txt) { yaz_log(log_level, "%s", txt); } int compare_item(const void *a, const void *b) { int ia, ib; memcpy(&ia, a, sizeof(int)); memcpy(&ib, b, sizeof(int)); if (ia > ib) return 1; if (ia < ib) return -1; return 0; } void *code_start(void) { return 0; } void code_item(void *p, char **dst, const char **src) { memcpy (*dst, *src, sizeof(int)); (*dst) += sizeof(int); (*src) += sizeof(int); } void code_reset(void *p) { } void code_stop(void *p) { } struct read_info { int val; int step; int no; int max; int insertMode; }; int code_read(void *vp, char **dst, int *insertMode) { struct read_info *ri = (struct read_info *)vp; int x; if (ri->no >= ri->max) return 0; ri->no++; x = ri->val; memcpy (*dst, &x, sizeof(int)); (*dst)+=sizeof(int); ri->val = ri->val + ri->step; *insertMode = ri->insertMode; #if 0 yaz_log(log_level, "%d %5d", ri->insertMode, x); #endif return 1; } void tst_insert(ISAMB isb, int n) { ISAMC_I isamc_i; ISAM_P isamc_p; struct read_info ri; ISAMB_PP pp; char key_buf[20]; int nerrs = 0; /* insert a number of entries */ ri.no = 0; ri.max = n; ri.val = 0; ri.step = 1; ri.insertMode = 1; isamc_i.clientData = &ri; isamc_i.read_item = code_read; isamc_p = 0; /* new list */ isamb_merge (isb, &isamc_p , &isamc_i); /* read the entries */ pp = isamb_pp_open (isb, isamc_p, 1); ri.val = 0; while(isamb_pp_read (pp, key_buf)) { int x; memcpy (&x, key_buf, sizeof(int)); if (x != ri.val) { yaz_log(YLOG_WARN, "isamb_pp_read. n=%d Got %d (expected %d)", n, x, ri.val); nerrs++; } else if (nerrs) yaz_log(log_level, "isamb_pp_read. n=%d Got %d", n, x); ri.val++; } if (ri.val != ri.max) { yaz_log(YLOG_WARN, "ri.max != ri.max (%d != %d)", ri.val, ri.max); nerrs++; } isamb_dump(isb, isamc_p, log_pr); isamb_pp_close(pp); if (nerrs) exit(3); /* delete a number of entries (even ones) */ ri.no = 0; ri.max = n - n/2; ri.val = 0; ri.step = 2; ri.insertMode = 0; isamc_i.clientData = &ri; isamc_i.read_item = code_read; isamb_merge (isb, &isamc_p , &isamc_i); /* delete a number of entries (odd ones) */ ri.no = 0; ri.max = n/2; ri.val = 1; ri.step = 2; ri.insertMode = 0; isamc_i.clientData = &ri; isamc_i.read_item = code_read; isamb_merge (isb, &isamc_p, &isamc_i); if (isamc_p) { yaz_log(YLOG_WARN, "isamb_merge did not return empty list n=%d", n); exit(3); } } void tst_forward(ISAMB isb, int n) { ISAMC_I isamc_i; ISAM_P isamc_p; struct read_info ri; int i; ISAMB_PP pp; /* insert a number of entries */ ri.val = 0; ri.max = n; ri.no = 0; ri.step = 1; ri.insertMode = 1; isamc_i.clientData = &ri; isamc_i.read_item = code_read; isamc_p = 0; isamb_merge (isb, &isamc_p, &isamc_i); /* read the entries */ pp = isamb_pp_open (isb, isamc_p, 1); for (i = 0; iidx < ri->max && ri->delta[ri->idx] == ri->level) { ri->idx++; ri->level = 0; } if (ri->idx >= ri->max) return 0; if (ri->delta[ri->idx] > 0) { ri->level++; *insertMode = 1; } else { ri->level--; *insertMode = 0; } x = ri->idx; memcpy (*dst, &x, sizeof(int)); (*dst)+=sizeof(int); yaz_log(YLOG_DEBUG, "%d %5d", *insertMode, x); return 1; } void tst_random(ISAMB isb, int n, int rounds, int max_dups) { ISAM_P isamb_p = 0; int *freq = malloc(sizeof(int) * n); int *delta = malloc(sizeof(int) * n); int i, j; for (i = 0; i #include #include #include #include #include #include #include #include #include #include #include #include struct index_block { NMEM nmem; int no_entries; size_t current_entry; size_t current_max; struct index_term *terms; struct index_term **ar; int round; }; struct index_term { const char *term; zint docid; zint seqno; int word_id; struct index_term *next; }; struct index_block *index_block_new(int memory) { struct index_block *b = xmalloc(sizeof(*b)); b->no_entries = 0; b->current_max = memory * 1024 * 1024; b->terms = 0; b->nmem = nmem_create(); b->round = 0; return b; } void index_block_destroy(struct index_block **bp) { if (*bp) { nmem_destroy((*bp)->nmem); xfree(*bp); *bp = 0; } } static int cmp_ar(const void *p1, const void *p2) { struct index_term *t1 = *(struct index_term **) p1; struct index_term *t2 = *(struct index_term **) p2; int d = strcmp(t1->term, t2->term); if (d) return d; if (t1->docid > t2->docid) return 1; else if (t1->docid < t2->docid) return -1; if (t1->seqno > t2->seqno) return 1; else if (t1->seqno < t2->seqno) return -1; return 0; } int code_read(void *vp, char **dst, int *insertMode) { struct index_block *b = (struct index_block *)vp; struct index_term *t; struct it_key key; if (b->current_entry >= b->no_entries) return 0; t = b->ar[b->current_entry]; b->current_entry++; key.len = 3; key.mem[0] = t->word_id; key.mem[1] = t->docid; key.mem[2] = t->seqno; key.mem[3] = 0; memcpy(*dst, &key, sizeof(key)); (*dst) += sizeof(key); *insertMode = 1; #if 0 yaz_log(YLOG_LOG, "returning " ZINT_FORMAT " " ZINT_FORMAT "\n", key.mem[0], key.mem[1]); #endif return 1; } void index_block_flush(struct index_block *b, ISAMB isb, Dict dict, int no_docs) { struct index_term *t = b->terms; int i; int word_id_seq = 0; int no_words = 0, no_new_words = 0; const char *dict_info = 0; ISAM_P isamc_p = 0; yaz_timing_t tim_dict = 0; yaz_timing_t tim_isamb = 0; zint number_of_int_splits = isamb_get_int_splits(isb); zint number_of_leaf_splits = isamb_get_leaf_splits(isb); zint number_of_dict_splits = dict_get_no_split(dict); b->ar = xmalloc(sizeof(*b->ar) * b->no_entries); for (i = 0; i < b->no_entries; i++, t = t->next) { assert(t); b->ar[i] = t; } assert(!t); qsort(b->ar, b->no_entries, sizeof(*b->ar), cmp_ar); tim_dict = yaz_timing_create(); #if 0 for (i = 0; i < b->no_entries; i++) { printf("%s " ZINT_FORMAT " " ZINT_FORMAT "\n", ar[i]->term, ar[i]->docid, ar[i]->seqno); } #endif dict_info = dict_lookup(dict, "_w"); if (dict_info) { assert(*dict_info == sizeof(word_id_seq)); memcpy(&word_id_seq, dict_info+1, sizeof(word_id_seq)); } dict_info = dict_lookup(dict, "_i"); if (dict_info) { assert(*dict_info == sizeof(isamc_p)); memcpy(&isamc_p, dict_info+1, sizeof(isamc_p)); } for (i = 0; i < b->no_entries; i++) { if (i > 0 && strcmp(b->ar[i-1]->term, b->ar[i]->term) == 0) b->ar[i]->word_id = b->ar[i-1]->word_id; else { const char *dict_info = dict_lookup(dict, b->ar[i]->term); if (dict_info) { memcpy(&b->ar[i]->word_id, dict_info+1, sizeof(int)); } else { word_id_seq++; no_new_words++; dict_insert(dict, b->ar[i]->term, sizeof(int), &word_id_seq); b->ar[i]->word_id = word_id_seq; } no_words++; } } dict_insert(dict, "_w", sizeof(word_id_seq), &word_id_seq); yaz_timing_stop(tim_dict); tim_isamb = yaz_timing_create(); b->current_entry = 0; if (b->no_entries) { ISAMC_I isamc_i; isamc_i.clientData = b; isamc_i.read_item = code_read; isamb_merge (isb, &isamc_p, &isamc_i); assert(isamc_p); dict_insert(dict, "_i", sizeof(isamc_p), &isamc_p); } yaz_timing_stop(tim_isamb); number_of_int_splits = isamb_get_int_splits(isb) - number_of_int_splits; number_of_leaf_splits = isamb_get_leaf_splits(isb) - number_of_leaf_splits; number_of_dict_splits = dict_get_no_split(dict) - number_of_dict_splits; if (b->round == 0) { printf("# run total dict-real user sys isam-real user sys " " intsp leafsp docs postings words new d-spl\n"); } b->round++; printf("%5d %9.6f %9.6f %5.2f %5.2f %9.6f %5.2f %5.2f " "%6" ZINT_FORMAT0 " %6" ZINT_FORMAT0 " %8d %8d %6d %6d" " %5" ZINT_FORMAT0 "\n", b->round, yaz_timing_get_real(tim_dict) + yaz_timing_get_real(tim_isamb), yaz_timing_get_real(tim_dict), yaz_timing_get_user(tim_dict), yaz_timing_get_sys(tim_dict), yaz_timing_get_real(tim_isamb), yaz_timing_get_user(tim_isamb), yaz_timing_get_sys(tim_isamb), number_of_int_splits, number_of_leaf_splits, no_docs, b->no_entries, no_words, no_new_words, number_of_dict_splits ); fflush(stdout); xfree(b->ar); b->ar = 0; nmem_reset(b->nmem); b->no_entries = 0; b->terms = 0; yaz_timing_destroy(&tim_isamb); yaz_timing_destroy(&tim_dict); } void index_block_check_flush(struct index_block *b, ISAMB isb, Dict dict, int no_docs) { int total = nmem_total(b->nmem); int max = b->current_max; if (total > max) { index_block_flush(b, isb, dict, no_docs); } } void index_block_add(struct index_block *b, const char *term, zint docid, zint seqno) { struct index_term *t = nmem_malloc(b->nmem, sizeof(*t)); t->term = nmem_strdup(b->nmem, term); t->docid = docid; t->seqno = seqno; t->next = b->terms; b->terms = t; b->no_entries++; } void index_term(struct index_block *b, const char *term, zint docid, zint *seqno) { #if 0 printf("%s " ZINT_FORMAT " " ZINT_FORMAT "\n", term, docid, *seqno); #endif index_block_add(b, term, docid, *seqno); (*seqno)++; } void index_wrbuf(struct index_block *b, WRBUF wrbuf, zint docid, int subfield_char) { int nl = 1; const char *cp = wrbuf_buf(wrbuf); char term[4096]; size_t sz = 0; zint seqno = 0; while (*cp) { if (nl) { int i; if (cp[0] != ' ') { /* skip field+indicator (e.g. 245 00) */ for (i = 0; i<6 && *cp; i++, cp++) ; } else { /* continuation line */ for (i = 0; i<4 && *cp; i++, cp++) ; } } nl = 0; if (*cp == '\n') { if (sz) { index_term(b, term, docid, &seqno); sz = 0; } nl = 1; cp++; } else if (*cp == subfield_char && cp[1]) { if (sz) { index_term(b, term, docid, &seqno); sz = 0; } cp += 2; } else if (strchr("$*/-;,.:[]\"&(){} ", *cp)) { if (sz) { index_term(b, term, docid, &seqno); sz = 0; } cp++; } else { unsigned ch = *(const unsigned char *)cp; if (sz < sizeof(term)) { term[sz] = tolower(ch); term[sz+1] = '\0'; sz++; } cp++; } } if (sz) index_term(b, term, docid, &seqno); } void index_marc_line_records(ISAMB isb, Dict dict, zint *docid_seq, FILE *inf, int memory) { WRBUF wrbuf = wrbuf_alloc(); int no_docs = 0; int new_rec = 1; char line[4096]; struct index_block *b = index_block_new(memory); while(fgets(line, sizeof(line)-1, inf)) { if (line[0] == '$') { if (!new_rec) new_rec = 1; else new_rec = 0; continue; } if (new_rec) { (*docid_seq)++; no_docs++; index_block_check_flush(b, isb, dict, no_docs); new_rec = 0; } if (line[0] == ' ') { /* continuation */ wrbuf_puts(wrbuf, line); continue; } else { /* index existing buffer (if any) */ if (wrbuf_len(wrbuf)) { index_wrbuf(b, wrbuf, *docid_seq, '*'); wrbuf_rewind(wrbuf); } if (line[0] != ' ' && line[1] != ' ' && line[2] != ' ' && line[3] == ' ') { /* normal field+indicator line */ wrbuf_puts(wrbuf, line); } } } if (wrbuf_len(wrbuf)) { index_wrbuf(b, wrbuf, *docid_seq, '*'); wrbuf_rewind(wrbuf); } (*docid_seq)++; no_docs++; index_block_flush(b, isb, dict, no_docs); index_block_destroy(&b); } void index_marc_from_file(ISAMB isb, Dict dict, zint *docid_seq, FILE *inf, int memory, int verbose, int print_offset) { yaz_marc_t mt = yaz_marc_create(); WRBUF wrbuf = wrbuf_alloc(); struct index_block *b = index_block_new(memory); int no_docs = 0; while (1) { size_t r; char buf[100001]; int len, rlen; r = fread (buf, 1, 5, inf); if (r < 5) { if (r && print_offset && verbose) printf ("\n", (long) r); break; } while (*buf < '0' || *buf > '9') { int i; long off = ftell(inf) - 5; if (verbose || print_offset) printf("\n", *buf & 0xff, *buf & 0xff, off, off); for (i = 0; i<4; i++) buf[i] = buf[i+1]; r = fread(buf+4, 1, 1, inf); if (r < 1) break; } if (r < 1) { if (verbose || print_offset) printf ("\n"); break; } len = atoi_n(buf, 5); if (len < 25 || len > 100000) { long off = ftell(inf) - 5; printf("Bad Length %ld read at offset %ld (%lx)\n", (long)len, (long) off, (long) off); break; } rlen = len - 5; r = fread (buf + 5, 1, rlen, inf); if (r < rlen) break; yaz_marc_read_iso2709(mt, buf, len); if (yaz_marc_write_line(mt, wrbuf)) break; index_wrbuf(b, wrbuf, *docid_seq, '$'); wrbuf_rewind(wrbuf); (*docid_seq)++; no_docs++; index_block_check_flush(b, isb, dict, no_docs); } index_block_flush(b, isb, dict, no_docs); wrbuf_destroy(wrbuf); yaz_marc_destroy(mt); index_block_destroy(&b); } void exit_usage(void) { fprintf(stderr, "benchindex1 [-t type] [-c d:i] [-m mem] [-i] [inputfile]\n"); exit(1); } int main(int argc, char **argv) { BFiles bfs; ISAMB isb_postings; ISAMC_M method_postings; Dict dict; int ret; int reset = 0; char *arg; int memory = 5; int isam_cache_size = 40; int dict_cache_size = 50; const char *fname = 0; FILE *inf = stdin; yaz_timing_t tim = 0; zint docid_seq = 1; const char *dict_info; const char *type = "iso2709"; int int_count_enable = 1; while ((ret = options("im:t:c:N", argv, argc, &arg)) != -2) { switch(ret) { case 'm': memory = atoi(arg); break; case 'i': reset = 1; break; case 't': if (!strcmp(arg, "iso2709")) type = "iso2709"; else if (!strcmp(arg, "line")) type = "line"; else { fprintf(stderr, "bad type: %s.\n", arg); exit_usage(); } break; case 'c': if (sscanf(arg, "%d:%d", &dict_cache_size, &isam_cache_size) != 2) { fprintf(stderr, "bad cache sizes for -c\n"); exit_usage(); } break; case 0: fname = arg; break; case 'N': int_count_enable = 0; break; default: fprintf(stderr, "bad option.\n"); exit_usage(); } } if (fname) { inf = fopen(fname, "rb"); if (!inf) { fprintf(stderr, "Cannot open %s\n", fname); exit(1); } } printf("# benchindex1 %s %s\n", __DATE__, __TIME__); printf("# isam_cache_size = %d\n", isam_cache_size); printf("# dict_cache_size = %d\n", dict_cache_size); printf("# int_count_enable = %d\n", int_count_enable); printf("# memory = %d\n", memory); /* setup postings isamb attributes */ method_postings.compare_item = key_compare; method_postings.log_item = key_logdump_txt; method_postings.codec.start = iscz1_start; method_postings.codec.decode = iscz1_decode; method_postings.codec.encode = iscz1_encode; method_postings.codec.stop = iscz1_stop; method_postings.codec.reset = iscz1_reset; method_postings.debug = 0; /* create block system */ bfs = bfs_create(0, 0); if (!bfs) { yaz_log(YLOG_WARN, "bfs_create failed"); exit(1); } if (reset) bf_reset(bfs); tim = yaz_timing_create(); /* create isam handle */ isb_postings = isamb_open (bfs, "isamb", isam_cache_size ? 1 : 0, &method_postings, 0); if (!isb_postings) { yaz_log(YLOG_WARN, "isamb_open failed"); exit(2); } isamb_set_cache_size(isb_postings, isam_cache_size); isamb_set_int_count(isb_postings, int_count_enable); dict = dict_open(bfs, "dict", dict_cache_size, 1, 0, 4096); dict_info = dict_lookup(dict, "_s"); if (dict_info) { assert(*dict_info == sizeof(docid_seq)); memcpy(&docid_seq, dict_info+1, sizeof(docid_seq)); } if (!strcmp(type, "iso2709")) index_marc_from_file(isb_postings, dict, &docid_seq, inf, memory, 0 /* verbose */ , 0 /* print_offset */); else if (!strcmp(type, "line")) index_marc_line_records(isb_postings, dict, &docid_seq, inf, memory); printf("# Total " ZINT_FORMAT " documents\n", docid_seq); dict_insert(dict, "_s", sizeof(docid_seq), &docid_seq); dict_close(dict); isamb_close(isb_postings); if (fname) fclose(inf); /* exit block system */ bfs_destroy(bfs); yaz_timing_stop(tim); printf("# Total timings real=%8.6f user=%3.2f system=%3.2f\n", yaz_timing_get_real(tim), yaz_timing_get_user(tim), yaz_timing_get_sys(tim)); yaz_timing_destroy(&tim); exit(0); return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/isamb/bench2.sh0000755000175000017500000000025711412332551012736 00000000000000#!/bin/sh # Test for variations in size of ISAM entry CMD="./benchisamb -r 50 -n 1000000 -i 1" for sz in 0 4 8 12; do $CMD -z $sz >bench2.$sz.dat ls -l *.mf sleep 2 done idzebra-2.0.44/isamb/Makefile.in0000644000175000017500000005075211412336425013314 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = benchisamb$(EXEEXT) benchindex1$(EXEEXT) check_PROGRAMS = tstisamb$(EXEEXT) subdir = isamb DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libidzebra_isamb_la_LIBADD = am_libidzebra_isamb_la_OBJECTS = isamb.lo libidzebra_isamb_la_OBJECTS = $(am_libidzebra_isamb_la_OBJECTS) PROGRAMS = $(noinst_PROGRAMS) am_benchindex1_OBJECTS = benchindex1.$(OBJEXT) benchindex1_OBJECTS = $(am_benchindex1_OBJECTS) am__DEPENDENCIES_1 = benchindex1_DEPENDENCIES = libidzebra-isamb.la \ ../bfile/libidzebra-bfile.la ../dict/libidzebra-dict.la \ ../util/libidzebra-util.la $(am__DEPENDENCIES_1) am_benchisamb_OBJECTS = benchisamb.$(OBJEXT) benchisamb_OBJECTS = $(am_benchisamb_OBJECTS) benchisamb_DEPENDENCIES = libidzebra-isamb.la \ ../bfile/libidzebra-bfile.la ../util/libidzebra-util.la \ $(am__DEPENDENCIES_1) am_tstisamb_OBJECTS = tstisamb.$(OBJEXT) tstisamb_OBJECTS = $(am_tstisamb_OBJECTS) tstisamb_DEPENDENCIES = libidzebra-isamb.la \ ../bfile/libidzebra-bfile.la ../util/libidzebra-util.la \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libidzebra_isamb_la_SOURCES) $(benchindex1_SOURCES) \ $(benchisamb_SOURCES) $(tstisamb_SOURCES) DIST_SOURCES = $(libidzebra_isamb_la_SOURCES) $(benchindex1_SOURCES) \ $(benchisamb_SOURCES) $(tstisamb_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ noinst_LTLIBRARIES = libidzebra-isamb.la EXTRA_DIST = bench1.sh bench1.plt bench2.sh bench2.plt \ filesystems.plt dictisam.plt TESTS = $(check_PROGRAMS) tstisamb_SOURCES = tstisamb.c tstisamb_LDADD = libidzebra-isamb.la \ ../bfile/libidzebra-bfile.la \ ../util/libidzebra-util.la $(YAZLALIB) benchisamb_SOURCES = benchisamb.c benchisamb_LDADD = libidzebra-isamb.la \ ../bfile/libidzebra-bfile.la \ ../util/libidzebra-util.la $(YAZLALIB) benchindex1_SOURCES = benchindex1.c benchindex1_LDADD = libidzebra-isamb.la \ ../bfile/libidzebra-bfile.la \ ../dict/libidzebra-dict.la \ ../util/libidzebra-util.la $(YAZLALIB) libidzebra_isamb_la_SOURCES = isamb.c AM_CPPFLAGS = -I$(srcdir)/../include $(YAZINC) LDADD = ../util/libutil.a ../bfile/libbfile.a libisamc.a $(YAZLALIB) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu isamb/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu isamb/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libidzebra-isamb.la: $(libidzebra_isamb_la_OBJECTS) $(libidzebra_isamb_la_DEPENDENCIES) $(LINK) $(libidzebra_isamb_la_OBJECTS) $(libidzebra_isamb_la_LIBADD) $(LIBS) clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list benchindex1$(EXEEXT): $(benchindex1_OBJECTS) $(benchindex1_DEPENDENCIES) @rm -f benchindex1$(EXEEXT) $(LINK) $(benchindex1_OBJECTS) $(benchindex1_LDADD) $(LIBS) benchisamb$(EXEEXT): $(benchisamb_OBJECTS) $(benchisamb_DEPENDENCIES) @rm -f benchisamb$(EXEEXT) $(LINK) $(benchisamb_OBJECTS) $(benchisamb_LDADD) $(LIBS) tstisamb$(EXEEXT): $(tstisamb_OBJECTS) $(tstisamb_DEPENDENCIES) @rm -f tstisamb$(EXEEXT) $(LINK) $(tstisamb_OBJECTS) $(tstisamb_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/benchindex1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/benchisamb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isamb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstisamb.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ clean-noinstLTLIBRARIES clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/isamb/bench1.sh0000755000175000017500000000052111412332551012727 00000000000000#!/bin/sh # Test for variations of number of trees.. Total number of entries is # Constant 1 mio CMD="./benchisamb -r 50" $CMD -i 1000 -n 1000 >bench1.1000.dat ls -l *.mf sleep 2 $CMD -i 100 -n 10000 >bench1.100.dat ls -l *.mf sleep 2 $CMD -i 10 -n 100000 >bench1.10.dat ls -l *.mf sleep 2 $CMD -i 1 -n 1000000 >bench1.1.dat ls -l *.mf idzebra-2.0.44/isamb/bench2.plt0000644000175000017500000000043411057500746013125 00000000000000set terminal postscript eps set output "bench2.eps" set xlabel "R" set ylabel "time" plot "bench2.0.dat" title "0" with linespoints, \ "bench2.4.dat" title "4" with linespoints, \ "bench2.8.dat" title "8" with linespoints, \ "bench2.12.dat" title "12" with linespoints idzebra-2.0.44/isamb/benchisamb.c0000644000175000017500000001352411412332551013476 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #if HAVE_SYS_TIMES_H #include #endif #if HAVE_SYS_TIME_H #include #endif #include #include #include #include #include #include #include static void log_item(int level, const void *b, const char *txt) { int x; memcpy(&x, b, sizeof(int)); yaz_log(YLOG_LOG, "%s %d", txt, x); } static void log_pr(const char *txt) { yaz_log(YLOG_LOG, "%s", txt); } int compare_item(const void *a, const void *b) { int ia, ib; memcpy(&ia, (const char *) a + 1, sizeof(int)); memcpy(&ib, (const char *) b + 1, sizeof(int)); if (ia > ib) return 1; if (ia < ib) return -1; return 0; } void *code_start(void) { return 0; } void code_item(void *p, char **dst, const char **src) { int sz = **src; memcpy (*dst, *src, sz); (*dst) += sz; (*src) += sz; } void code_reset(void *p) { } void code_stop(void *p) { } struct read_info { int val; int step; int no; int max; int insertMode; int sz; }; int code_read(void *vp, char **dst, int *insertMode) { struct read_info *ri = (struct read_info *)vp; int x; if (ri->no >= ri->max) return 0; ri->no++; x = ri->val; memset(*dst, 0, ri->sz); **dst = ri->sz; memcpy(*dst + 1, &x, sizeof(int)); (*dst) += ri->sz; ri->val = ri->val + ri->step; *insertMode = ri->insertMode; #if 0 yaz_log(YLOG_LOG, "%d %5d", ri->insertMode, x); #endif return 1; } void bench_insert(ISAMB isb, int number_of_trees, int number_of_rounds, int number_of_elements, int extra_size) { ISAMC_I isamc_i; ISAM_P *isamc_p = xmalloc(sizeof(ISAM_P) * number_of_trees); struct read_info ri; int round, i; for (i = 0; i X211 X212 X213 X221 X2 X3 idzebra-2.0.44/test/espec/Makefile.in0000644000175000017500000004310611412336425014272 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = t1$(EXEEXT) subdir = test/espec DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_t1_OBJECTS = t1.$(OBJEXT) t1_OBJECTS = $(am_t1_OBJECTS) t1_LDADD = $(LDADD) am__DEPENDENCIES_1 = t1_DEPENDENCIES = ../api/libtestlib.a ../../$(main_zebralib) \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(t1_SOURCES) DIST_SOURCES = $(t1_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ TESTS = $(check_PROGRAMS) EXTRA_DIST = zebra.cfg rec1.xml root.abs brief.est t1_SOURCES = t1.c AM_CPPFLAGS = -I$(top_srcdir)/include $(YAZINC) LDADD = ../api/libtestlib.a ../../$(main_zebralib) $(YAZLALIB) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/espec/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/espec/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list t1$(EXEEXT): $(t1_OBJECTS) $(t1_DEPENDENCIES) @rm -f t1$(EXEEXT) $(LINK) $(t1_OBJECTS) $(t1_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t1.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/test/zsh/0000755000175000017500000000000011412336535012010 500000000000000idzebra-2.0.44/test/zsh/Makefile.am0000644000175000017500000000050111412332551013752 00000000000000 #dist-hook: # -mkdir $(distdir)/records # cp $(srcdir)/records/*.grs $(distdir)/records check_SCRIPTS = testall.sh TESTS = testall.sh EXTRA_DIST = $(check_SCRIPTS) test1.zsh test2.zsh zebra.cfg clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf -rm -rf reg/*.LCK -rm -rf reg/*.log -rm -rf reg/*.mf idzebra-2.0.44/test/zsh/zebra.cfg0000644000175000017500000000017311412332551013507 00000000000000 # A fairly minimal zebra.cfg profilePath: ${srcdir:-.}/../../tab register: reg:100M lockDir: reg recordType: grs.sgml idzebra-2.0.44/test/zsh/test1.zsh0000644000175000017500000000037311057500746013523 00000000000000quickstart init create_database Default record_insert foobar search_pqf firstset @attr 1=/ nothere expect 0 hits search_pqf firstset @attr 1=/ foo expect 1 hits search_pqf firstset @attr 1=/ nothere expect 0 hits idzebra-2.0.44/test/zsh/testall.sh0000755000175000017500000000103711412332551013732 00000000000000#!/bin/sh # run all zebrash tests srcdir=${srcdir:-"."} test -d reg || mkdir reg rm -f *.mf reg/*.mf *.out for F in $srcdir/*.zsh do echo $F if [ "." = "$srcdir" ] then # running make check ../../index/zebrash -c $srcdir/zebra.cfg <$F >$F.out else # running make distcheck ../../index/zebrash -c $srcdir/zebra.cfg <$F >/dev/null fi RC=$? if [ "$RC" -gt "0" ] then echo "$F failed with exit code $RC" FINAL=$RC fi done if [ "$FINAL" ] then echo "Tests FAILED" exit 9 fi exit 0 idzebra-2.0.44/test/zsh/Makefile.in0000644000175000017500000003235411412336426014003 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ #dist-hook: # -mkdir $(distdir)/records # cp $(srcdir)/records/*.grs $(distdir)/records VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = test/zsh DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ check_SCRIPTS = testall.sh TESTS = testall.sh EXTRA_DIST = $(check_SCRIPTS) test1.zsh test2.zsh zebra.cfg all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/zsh/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/zsh/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool clean-local distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf -rm -rf reg/*.LCK -rm -rf reg/*.log -rm -rf reg/*.mf # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/test/zsh/test2.zsh0000644000175000017500000000030711057500746013521 00000000000000quickstart init create_database Default record_insert foobar search_pqf firstset @attr 1=/ nothere expect 0 hits search_pqf firstset @attr 1=/ foo expect 1 hits idzebra-2.0.44/test/xpath/0000755000175000017500000000000011412336535012330 500000000000000idzebra-2.0.44/test/xpath/xpath2.c0000644000175000017500000000514511412332551013621 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "../api/testlib.h" /** xpath2.c - index a a bit more complex sgml record and search in it */ const char *myrec[] = { " \n" " 10 \n" " Sauropoda \n" " PT \n" " \n" " BT \n" " 5 \n" " Brontosauria \n" " PT \n" " \n" " \n" " NT \n" " 11 \n" " Eusauropoda \n" " PT \n" " \n" " \n", " \n" " 5 \n" " Brontosauria \n" " PT \n" " \n" " BT \n" " 4 \n" " Sauropodomorpha \n" " PT \n" " \n" " \n" " NT \n" " 6 \n" " Plateosauria \n" " PT \n" " \n" " \n" " NT \n" " 10 \n" " Sauropoda \n" " PT \n" " \n" " \n", 0}; static void tst(int argc, char **argv) { ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); YAZ_CHECK(tl_init_data(zh, myrec)); YAZ_CHECK(tl_query(zh, "@attr 1=/Zthes/termName Sauropoda", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=/Zthes/relation/termName Sauropoda", 1)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/xpath/xpath4.c0000644000175000017500000001304211412332551013616 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "../api/testlib.h" /** xpath4.c - Attributes */ const char *myrec[] = { " \n" " foo \n" " bar \n" " gryf \n" " \n", " \n" " foo bar \n" " gryf \n" " \n", " \n" " foo gryf \n" " grunt \n" " \n", " \n" " foo grunt \n" " bar \n" " \n", " \n" " double english \n" " double danish \n" " grunt \n" " \n", " \n" " hamlet \n" " foo bar grunt grunt grunt \n" " \n", " \n" " before \n" " \n" " early \n" " \n" " middle \n" " \n" " late \n" " \n" " after \n" " \n", " \n" " before \n" " \n" " early \n" " \n" " middle \n" " \n" " late \n" " \n" " after \n" " \n", 0}; static void tst(int argc, char **argv) { ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); #if 0 yaz_log_init_level( yaz_log_mask_str_x("xpath4,rsbetween", LOG_DEFAULT_LEVEL)); #endif YAZ_CHECK(tl_init_data(zh, myrec)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/title foo",4)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/title bar",2)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/title[@lang='da'] foo",1)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/title[@lang='en'] foo",1)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/title[@lang='en'] english",1)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/title[@lang='da'] english",0)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/title[@lang='da'] danish",1)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/title[@lang='en'] danish",0)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/title @and foo bar",2)); /* The previous one returns two hits, as the and applies to the whole record, so it matches foobar This might not have to be like that, but currently that is what zebra does. */ YAZ_CHECK(tl_query(zh, "@and @attr 1=/record/title foo @attr 1=/record/title bar ",2)); /* check we get all the occureences for 'grunt' */ /* this can only be seen in the log, with debugs on. bug #202 */ YAZ_CHECK(tl_query(zh, "@attr 1=/record/author grunt",3)); /* check nested tags */ YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested before",0)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested early",1)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested middle",1)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested late",1)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested after",0)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested/nested before",0)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested/nested early",0)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested/nested middle",1)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested/nested late",0)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nested/nested after",0)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='outer'] before",0)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='outer'] early",1)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='outer'] middle",1)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='outer'] late",1)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='outer'] after",0)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='inner'] before",0)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='inner'] early",0)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='inner'] middle",0)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='inner'] late",0)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr[@level='inner'] after",0)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr/nestattr[@level='inner'] before",0)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr/nestattr[@level='inner'] early",0)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr/nestattr[@level='inner'] middle",1)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr/nestattr[@level='inner'] late",0)); YAZ_CHECK(tl_query(zh, "@attr 1=/record/nestattr/nestattr[@level='inner'] after",0)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/xpath/xpath1.c0000644000175000017500000000524011412332551013614 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "../api/testlib.h" /** xpath1.c - index a simple sgml record and search in it */ static void tst(int argc, char **argv) { ZebraService zs; ZebraHandle zh; const char *myrec[] = { " \n" " before \n" " \n" " inside it\n" " \n" " after \n" " \n", 0}; zs = tl_start_up(0, argc, argv); zh = zebra_open(zs, 0); YAZ_CHECK(tl_init_data(zh, myrec)); YAZ_CHECK(tl_query(zh, "@attr 1=/sgml/tag before", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=/sgml/tag inside", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=/sgml/tag {inside it}", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=/sgml/tag after", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=/sgml/none after", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=/sgml/none inside", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=/sgml before", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=/sgml inside", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=/sgml after", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=/sgml/tag/@x v", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=/sgml/tag/@x no", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=/sgml/tag/@y v", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=_XPATH_BEGIN @attr 4=3 tag/sgml/", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=_XPATH_BEGIN @attr 4=3 sgml/", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=_XPATH_BEGIN @attr 4=3 tag/", 0)); /* bug #617 */ YAZ_CHECK(tl_query(zh, "@attr 1=/sgml/tag @attr 2=103 dummy", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=/sgml @attr 2=103 dummy", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=/tag @attr 2=103 dummy", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=/sgml/tag/@x @attr 2=103 dummy", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=/sgml/tag/@y @attr 2=103 dummy", 0)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/xpath/Makefile.am0000644000175000017500000000073011412332551014276 00000000000000 check_PROGRAMS = xpath1 xpath2 xpath3 xpath4 xpath5 xpath6 TESTS = $(check_PROGRAMS) EXTRA_DIST=zebra.cfg rec1.xml rec2.xml assembled.abs xpath1_SOURCES = xpath1.c xpath2_SOURCES = xpath2.c xpath3_SOURCES = xpath3.c xpath4_SOURCES = xpath4.c xpath5_SOURCES = xpath5.c xpath6_SOURCES = xpath6.c AM_CPPFLAGS = -I$(top_srcdir)/include $(YAZINC) LDADD = ../api/libtestlib.a ../../$(main_zebralib) $(YAZLALIB) clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf idzebra-2.0.44/test/xpath/xpath6.c0000644000175000017500000000505511412332551013625 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "../api/testlib.h" static void tst(int argc, char **argv) { int i; ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); char path[256]; YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_init(zh); tl_check_filter(zs, "grs.xml"); zebra_set_resource(zh, "recordType", "grs.xml"); YAZ_CHECK(zebra_begin_trans(zh, 1) == ZEBRA_OK); for (i = 1; i <= 2; i++) { sprintf(path, "%.200s/rec%d.xml", tl_get_srcdir(), i); zebra_repository_update(zh, path); } YAZ_CHECK(zebra_end_trans(zh) == ZEBRA_OK); zebra_commit(zh); YAZ_CHECK(tl_query(zh, "@attr 5=1 @attr 6=3 @attr 4=1 @attr 1=/assembled/basic/names/CASno \"367-93-1\"", 2)); YAZ_CHECK(tl_query(zh, "@attr 5=1 @attr 6=3 @attr 4=1 @attr 1=18 \"367-93-1\"", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=/assembled/orgs/org 0", 1)); YAZ_CHECK(tl_query(zh, "@and @attr 1=/assembled/orgs/org 0 @attr 5=1 @attr 6=3 @attr 4=1 " "@attr 1=/assembled/basic/names/CASno \"367-93-1\"", 1)); YAZ_CHECK(tl_query(zh, "@and @attr 1=/assembled/orgs/org 1 @attr 5=1 @attr 6=3 @attr 4=1 " "@attr 1=/assembled/basic/names/CASno 367-93-1", 2)); /* bug #317 */ YAZ_CHECK(tl_query(zh, "@attr 1=1010 46", 2)); /* bug #431 */ YAZ_CHECK(tl_query(zh, "@attr 1=1021 0", 1)); /* bug #431 */ YAZ_CHECK(tl_query(zh, "@attr 1=1021 46", 1)); /* bug #431 */ YAZ_CHECK(tl_query(zh, "@attr 1=1021 1", 0)); /* bug #460 */ YAZ_CHECK(tl_query(zh, "@attr 1=4 46", 0)); /* bug #460 */ YAZ_CHECK(tl_query(zh, "@attr 1=4 beta", 1)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/xpath/xpath3.c0000644000175000017500000000360411412332551013620 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "../api/testlib.h" /** xpath3.c - attributes, with Danish characters */ const char *myrec[] = { " \n" " \n" " content \n" " content \n" " \n" " content \n" " \n", 0}; static void tst(int argc, char **argv) { ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); YAZ_CHECK(tl_init_data(zh, myrec)); YAZ_CHECK(tl_query(zh, "@attr 1=/root content",1)); YAZ_CHECK(tl_query(zh, "@attr 1=/root/first content",1)); YAZ_CHECK(tl_query(zh, "@attr {1=/root/first[@attr='danish']} content",1)); YAZ_CHECK(tl_query(zh, "@attr {1=/root/second[@attr='danish lake']} content",1)); YAZ_CHECK(tl_query(zh, "@attr {1=/root/third[@attr='dansk s\xc3\xb8']} content",1)); /* FIXME - This triggers bug200 */ YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/xpath/xpath5.c0000644000175000017500000000472611412332551013630 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "../api/testlib.h" /** xpath5.c - Ranking in xpath */ const char *recs[] = { "\n" " The first title\n" " \n" " The first common word is the: the the the \n" " The second common word is word \n" " but all have the foo bar \n" " \n" "\n", "\n" " The second title\n" " \n" " The first common word is the: the \n" " The second common word is foo: foo foo \n" " but all have the foo bar \n" " \n" "\n", "\n" " The third title\n" " \n" " The first common word is the: the \n" " The third common word is bar: bar \n" " but all have the foo bar \n" " \n" "\n", 0 }; static void tst(int argc, char **argv) { ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); YAZ_CHECK(tl_init_data(zh, recs)); YAZ_CHECK(tl_ranking_query(zh, "@attr 1=/record/title @attr 2=102 the", 3,"first title", 952)); YAZ_CHECK(tl_ranking_query(zh, "@attr 1=/ @attr 2=102 @or third foo", 3,"third title", 802)); YAZ_CHECK(tl_ranking_query(zh, "@attr 1=/ @attr 2=102 foo", 3,"second title", 850)); YAZ_CHECK(tl_ranking_query(zh, "@attr 1=/record/ @attr 2=102 foo", 3,"second title", 927)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/xpath/zebra.cfg0000644000175000017500000000016711412332551014032 00000000000000profilePath: ${srcdir:-.}:${srcdir:-.}/../../tab recordType: grs.sgml attset: bib1.att attset: explain.att isam:b idzebra-2.0.44/test/xpath/rec1.xml0000644000175000017500000000060711057500746013631 00000000000000 KBA/localreg/367-93-1 1 46 Isopropopyl-beta-D-thiogalactoside 367-93-1 idzebra-2.0.44/test/xpath/README0000644000175000017500000000016411057500746013133 00000000000000 the xpath tests have been moved into test/api/xpath*.c This directory is not used any more, and should be deleted idzebra-2.0.44/test/xpath/Makefile.in0000644000175000017500000004772511412336426014333 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = xpath1$(EXEEXT) xpath2$(EXEEXT) xpath3$(EXEEXT) \ xpath4$(EXEEXT) xpath5$(EXEEXT) xpath6$(EXEEXT) subdir = test/xpath DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_xpath1_OBJECTS = xpath1.$(OBJEXT) xpath1_OBJECTS = $(am_xpath1_OBJECTS) xpath1_LDADD = $(LDADD) am__DEPENDENCIES_1 = xpath1_DEPENDENCIES = ../api/libtestlib.a ../../$(main_zebralib) \ $(am__DEPENDENCIES_1) am_xpath2_OBJECTS = xpath2.$(OBJEXT) xpath2_OBJECTS = $(am_xpath2_OBJECTS) xpath2_LDADD = $(LDADD) xpath2_DEPENDENCIES = ../api/libtestlib.a ../../$(main_zebralib) \ $(am__DEPENDENCIES_1) am_xpath3_OBJECTS = xpath3.$(OBJEXT) xpath3_OBJECTS = $(am_xpath3_OBJECTS) xpath3_LDADD = $(LDADD) xpath3_DEPENDENCIES = ../api/libtestlib.a ../../$(main_zebralib) \ $(am__DEPENDENCIES_1) am_xpath4_OBJECTS = xpath4.$(OBJEXT) xpath4_OBJECTS = $(am_xpath4_OBJECTS) xpath4_LDADD = $(LDADD) xpath4_DEPENDENCIES = ../api/libtestlib.a ../../$(main_zebralib) \ $(am__DEPENDENCIES_1) am_xpath5_OBJECTS = xpath5.$(OBJEXT) xpath5_OBJECTS = $(am_xpath5_OBJECTS) xpath5_LDADD = $(LDADD) xpath5_DEPENDENCIES = ../api/libtestlib.a ../../$(main_zebralib) \ $(am__DEPENDENCIES_1) am_xpath6_OBJECTS = xpath6.$(OBJEXT) xpath6_OBJECTS = $(am_xpath6_OBJECTS) xpath6_LDADD = $(LDADD) xpath6_DEPENDENCIES = ../api/libtestlib.a ../../$(main_zebralib) \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(xpath1_SOURCES) $(xpath2_SOURCES) $(xpath3_SOURCES) \ $(xpath4_SOURCES) $(xpath5_SOURCES) $(xpath6_SOURCES) DIST_SOURCES = $(xpath1_SOURCES) $(xpath2_SOURCES) $(xpath3_SOURCES) \ $(xpath4_SOURCES) $(xpath5_SOURCES) $(xpath6_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ TESTS = $(check_PROGRAMS) EXTRA_DIST = zebra.cfg rec1.xml rec2.xml assembled.abs xpath1_SOURCES = xpath1.c xpath2_SOURCES = xpath2.c xpath3_SOURCES = xpath3.c xpath4_SOURCES = xpath4.c xpath5_SOURCES = xpath5.c xpath6_SOURCES = xpath6.c AM_CPPFLAGS = -I$(top_srcdir)/include $(YAZINC) LDADD = ../api/libtestlib.a ../../$(main_zebralib) $(YAZLALIB) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/xpath/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/xpath/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list xpath1$(EXEEXT): $(xpath1_OBJECTS) $(xpath1_DEPENDENCIES) @rm -f xpath1$(EXEEXT) $(LINK) $(xpath1_OBJECTS) $(xpath1_LDADD) $(LIBS) xpath2$(EXEEXT): $(xpath2_OBJECTS) $(xpath2_DEPENDENCIES) @rm -f xpath2$(EXEEXT) $(LINK) $(xpath2_OBJECTS) $(xpath2_LDADD) $(LIBS) xpath3$(EXEEXT): $(xpath3_OBJECTS) $(xpath3_DEPENDENCIES) @rm -f xpath3$(EXEEXT) $(LINK) $(xpath3_OBJECTS) $(xpath3_LDADD) $(LIBS) xpath4$(EXEEXT): $(xpath4_OBJECTS) $(xpath4_DEPENDENCIES) @rm -f xpath4$(EXEEXT) $(LINK) $(xpath4_OBJECTS) $(xpath4_LDADD) $(LIBS) xpath5$(EXEEXT): $(xpath5_OBJECTS) $(xpath5_DEPENDENCIES) @rm -f xpath5$(EXEEXT) $(LINK) $(xpath5_OBJECTS) $(xpath5_LDADD) $(LIBS) xpath6$(EXEEXT): $(xpath6_OBJECTS) $(xpath6_DEPENDENCIES) @rm -f xpath6$(EXEEXT) $(LINK) $(xpath6_OBJECTS) $(xpath6_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpath1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpath2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpath3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpath4.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpath5.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpath6.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/test/xpath/assembled.abs0000644000175000017500000000042011057500746014674 00000000000000attset bib1.att xpath enable xelm /assembled/basic/names/CASno !:w,!:p,!:s,NAL-call-number:p,Title-key:s xelm /*/orgs body-of-text:w xelm //something Title:w # Bib-level=1021 xelm /assembled/@org Bib-level:w,Bib-level:w xelm /assembled/basic Title:w idzebra-2.0.44/test/xpath/rec2.xml0000644000175000017500000005607711057500746013646 00000000000000 KBA/oldkba/CAS/367-93-1 0 1 147 41 46 86 ISOPROPYL-β-D-THIOGALACTOPYRANOSID- DIOXAN FRI 367-93-1 IPTG 20010918 20010918 20010918 20000407 367931 367-93-1 ISOPROPYL-β-D-THIOGALACTOPYRANOSID- DIOXAN FRI IPTG

    pr.nr.:

    bruttoformel: C 9 H 18 O 5 S

    molvægt: 238,3

    kogepunkt:

    smeltepunkt: ca 110°C

    massefylde:

     

    Der foreligger ikke information, der gør det muligt at klassificere dette stof.

    Data til brug ved substitution m.m.

     GRÆNSE-

    VÆRDI 

    FLAMME-

    PUNKT

    EKSPLO-

    SIONS-

    GRÆNSE

    DAMPTRYK

    mmHg

    FORDAMP-

    NINGS-

    HASTIGHED

    VHI

    (VHR)

    LOG.

    OCTANOL:

    VAND

    -

     

     

     

     

     

    -1,25


    Særlig advarsel

    Supplerende information 

     

    Ved indhold af 1,4-dioxan CAS nr 123-91-1 se brugsanvisning for dette stof.


    SUNDHEDSFARLIGE EGENSKABER: SAMMENFATNING AF AFSNIT B.

    LANGTIDSVIRKNINGER VED UDSÆTTELSE

    Nej

    Mistænkt

    Ja

    Modstridende

    oplysninger

    Ingen

    dokumentation

    Kræftfremkaldende

     

     

     

     

     X

    Skade på kønsorganer, æg, sæd, foster

     

     

     

     

     X

    Skade på arveanlæg (mutagent)

     

     

     

     

     X

    Hudsygdomme bl.a. allergi

     

     

     

     

     X

    Allergisk astma

     

     

     

     

     X

    Skade på nervesystemet

     

     

     

     

     X

    Organskade: lunger, lever, nyrer

     

     

     

     

     X

    Øvrige skader:

     

     

     

     

     X

    A: Anvendelsesområde/begrænsning


    Information om lokal praksis - skal udfyldes af instituttet/afdelingen:

    B: Sundhedsfarlige egenskaber


    Der foreligger stærkt begrænset viden om dette stofs virkninger.


    Stoffet kan optages gennem hud, lunger og mavetarmkanal.

    Indånding

    Akut forgiftning: Evt. irritation af slimhinderne i de øvre luftveje (SAF).

    Langtidsvirkninger: Der foreligger ingen information.

    Hud

    Evt.irritation.

    Langtidsvirkninger: Der foreligger ingen information.

    Øjne

    Evt. irritation.

    Indtagelse

    C: Forholdsregler ved brug


    Sørg for effektiv procesventilation f.eks stinkskab. Brug engangshandsker ved uundgåelig kontakt med stoffet. Vær opmærksom på gennembrudstid, søg oplysning hos handskeleverandør.


    Der skal være let adgang til nødbruser, øjenskylleflaske og håndvask med sæbe.


    Der mangler viden om stoffets langtidsvirkninger, tilrettelæg derfor arbejdet så kontakt med stoffet undgås.


    Benyttede glasvarer, apparatur og lign. skylles omhyggeligt, inden det stilles til opvask.


    Information om lokal praksis - skal udfyldes af instituttet/afdelingen:

    D: Beskrivelse af stoffet/produktet


    Fast stof. Der foreligger ikke information om opløselighed.

    Kan indeholde op til 5% vand (Aldrich).

    Uforligelighed: Der foreligger ingen information.

    Miljøforhold: Der er ikke fundet nogen data om stoffets nedbrydning og det må derfor anses for ikke at være let nedbrydeligt.

    Anses ikke for bioakkumulerende.


    Instituttets/afdelingens supplerende oplysninger:

    E: Opvarmning og brand


    Brand: Der kan dannes giftige gasser af bl.a. kulmonoxid og svovloxider.

    Slukning: Vandtåge, kuldioxid, pulverslukker (SA).

    Vær dog opmærksom på, at pulver kan skade apparatur.


    F: Forholdsregler ved spild og bortskaffelse


    Begræns støvudvikling. Hold uvedkommende på afstand og informer ved øget risiko for påvirkning.

    Undgå kontakt med stoffet. Anvend evt handsker og åndedrætsværn med kombinationsfilter (Type ABEK-P).

    Tør op evt. med fugtig klud. Klud og spild bortskaffes som kemikalieaffald i veltillukket beholder. Rengør området efter opsamling af spild.

    Informér de Kommunale myndigheder og institutionens miljøansvarlige ved større udslip til omgivelserne.


    Affaldsgruppe: B Klasse, klassifikationskode: - UN nr: -

    G: Første hjælp


    Indånding: Personen bringes i frisk luft, holdes i ro og under opsyn. Ved risiko for bevidstløshed lejres personen i aflåst sideleje og holdes varm. Ved manglende vejrtrækning gives kunstigt åndedræt.

    Hud: Skyl længe og grundigt med vand, fjern forurenet tøj og evt. smykker.

    Øjne: Skyl straks med vand. Spil øjet grundigt op. Fjern kontaktlinser. Fortsæt skylningen indtil læge overtager behandlingen.

    Indtagelse: Skyl straks munden og drik vand eller mælk. Giv ikke væske til bevidstløse. Fremkald ikke opkastning.

    Ved vedvarende gener søg skadestue og medbring denne brugsanvisning.


    H: Sikkerhedsforskrifter ved oplagring


    Stoffet skal opbevares tæt tillukket på et køligt, tørt sted.

    Information om lokal praksis - skal udfyldes af instituttet/afdelingen:


    IPTG
    Pharmacia 0,001 kg 24.5.33 Køleskab Xn 10 g 24.2.35 Kølerum Ej oplyst 10g teilum, 6. sal 2g 4.2.15 Freezer T 5g 4.2.11 -20C freezer 1 T R45
    idzebra-2.0.44/test/cddb/0000755000175000017500000000000011412336535012100 500000000000000idzebra-2.0.44/test/cddb/cddb.flt0000644000175000017500000000110211057500746013417 00000000000000BEGIN { begin record cddb } /^DISCID=/ BODY /$/ { data -element identifier $1 } /^DTITLE=/ BODY /$/ { data -element title $1 } /^EXTD=/ BODY /$/ { data -element ext $1 } /^TTITLE/ /[0-9]+/ /=/ BODY /$/ { set trackstitle($1) $3 } /^EXTT/ /[0-9]+/ /=/ BODY /$/ { set tracksext($1) $3 } /^PLAYORDER/ { foreach v [array names trackstitle] { begin element track data -element title $trackstitle($v) if {[info exists tracksext($v)]} { set d $tracksext($v) if {[string length $d]} { data -element ext $tracksext($v) } } end element } } idzebra-2.0.44/test/cddb/Makefile.am0000644000175000017500000000007511412332551014050 00000000000000 EXTRA_DIST = zebra.cfg cddb.abs cddb.flt cddb.tag b00b520d idzebra-2.0.44/test/cddb/cddb.abs0000644000175000017500000000152011412332551013373 00000000000000 name meta attset bib1.att tagset cddb.tag varset var1.var esetname F @ esetname B meta-b.est maptab meta-usmarc.map elm (2,1) title Title:w,Title:p elm (4,101) titleext Title-other-variant:w elm (2,2) creator Author:w,Author:p elm (2,21) subject Subject-heading elm (2,17) description - elm (2,31) publisher Publisher elm (2,32) contributor - elm (2,4) date Date elm (2,22) type Content-type elm (2,27) format Material-type elm (2,28) identifier - elm (2,33) source - elm (2,20) language Code-language elm (2,30) relation - elm (2,34) coverage - elm (2,29) rights - # These tags are required by Zebra for GRS-1 generation elm (1,10) rank - elm (1,14) localControlNumber Local-number elm (4,100) track - elm (4,100)/(2,1) tracktitle Title-series:w,Title-series:p elm (4,100)/(4,101) trackext - idzebra-2.0.44/test/cddb/b00b520d0000644000175000017500000000160711057500746013067 00000000000000# xmcd CD database file generated by Grip 2.91 # # Track frame offsets: # 150 # 20930 # 35302 # 56250 # 75127 # 89017 # 108410 # 122402 # 136712 # 149425 # 171437 # 193037 # 205450 # # Disc length: 2900 seconds # # Revision: 3 # Processed by: cddbd v1.4b39PL1 Copyright (c) 1996-1997 Steve Scherf # Submitted via: Grip 2.91 # DISCID=b00b520d DTITLE=Disappear Fear / Live At The Bottom Line TTITLE0=Sink The Censorship TTITLE1=16 Roses TTITLE2=Love Isn't Dead TTITLE3=Postcard From Texas TTITLE4=Love Insurance TTITLE5=Box Of Tissues TTITLE6=Sexual Telepathy TTITLE7=One More Chance TTITLE8=Red Heaven TTITLE9=Sink The Censorship (2) TTITLE10=Box Of Tissues (2) TTITLE11=Damn Crazy TTITLE12=Long Long Way To Go EXTD= EXTT0= EXTT1= EXTT2= EXTT3= EXTT4= EXTT5= EXTT6= EXTT7= EXTT8= EXTT9= EXTT10= EXTT11= EXTT12= PLAYORDER= idzebra-2.0.44/test/cddb/zebra.cfg0000644000175000017500000000055711412332551013605 00000000000000# Simple Zebra configuration file # # Where the schema files, attribute files, etc are located. profilePath: .:../../tab:../../../yaz/tab # Files that describe the attribute sets supported. attset: bib1.att attset: gils.att attset: explain.att recordtype: grs.tcl.cddb storekeys: 1 storedata: 1 #recordId: (bib1,identifier-standard) modulePath: ../../index/.libs idzebra-2.0.44/test/cddb/Makefile.in0000644000175000017500000002421411412336425014066 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = test/cddb DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ EXTRA_DIST = zebra.cfg cddb.abs cddb.flt cddb.tag b00b520d all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/cddb/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/cddb/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/test/cddb/cddb.tag0000644000175000017500000000011511057500746013410 00000000000000name cddb type 4 include meta.tag tag 100 track string tag 101 ext string idzebra-2.0.44/test/config/0000755000175000017500000000000011412336535012451 500000000000000idzebra-2.0.44/test/config/m.flt0000644000175000017500000000152311057500746013337 00000000000000# # DEF portal input filter # // { begin record meta; set type ""; set AUTHOR ""; set PUBLISHER "" } /<\/meta>/ { data -element author-publisher "$AUTHOR XXX $PUBLISHER"; end record } // { if {$scheme != ""} { set tag "$tag-s-$scheme" }; if {$lang != ""} { set tag "$tag-l-$lang" }; regsub -all {[\. -/:]} $tag "_" tag; begin element $tag; end context; begin context content; } /lang=\"/ BODY /\"/ { set lang $1 } /scheme=\"/ BODY /\"/ { set scheme $1 } CONTEXT {content} /<\/[aA]>/ { data $0 } /<\/[^>]*>/ { end element; end context } /./ { if {$tag == "dc_creator"} { append AUTHOR $0}; if {$tag == "dc_publisher"} { append PUBLISHER $0}; data $0 } idzebra-2.0.44/test/config/m.rec0000644000175000017500000000016311057500746013322 00000000000000 film 2002-04-10 idzebra-2.0.44/test/config/Makefile.am0000644000175000017500000000030111412332551014411 00000000000000 check_SCRIPTS = test1.sh test2.sh TESTS = test1.sh test2.sh EXTRA_DIST = zebra.cfg $(check_SCRIPTS) g.rec g.abs m.rec m.flt m.rec clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf idzebra-2.0.44/test/config/test1.sh0000755000175000017500000000023611412332551013763 00000000000000#!/bin/sh pp=${srcdir:-"."} LOG=test1.log ../../index/zebraidx -c $pp/zebra.cfg -l $LOG init ../../index/zebraidx -c $pp/zebra.cfg -l $LOG update $pp/g.rec idzebra-2.0.44/test/config/zebra.cfg0000644000175000017500000000057411412332551014155 00000000000000# Simple Zebra configuration file # # Where the schema files, attribute files, etc are located. profilePath: ${srcdir:-.}:${srcdir:-.}/../../tab # Files that describe the attribute sets supported. attset: bib1.att attset: gils.att attset: explain.att recordtype: grs.sgml #storekeys: 1 #storedata: 1 #recordId: (bib1,identifier-standard) isam: b modulePath: ../../index/.libs idzebra-2.0.44/test/config/g.abs0000644000175000017500000001524411412332551013306 00000000000000# Slight modification of gils.abs with errors! name gils reference GILS-schema attset gils.att tagset bad.tag varset var1.var maptab gils-usmarc.map maptab gils-summary.map # Element set names esetname VARIANT gils-variant.est # for WAIS-compliance esetname B gils-b.est esetname G gils-g.est esetname W gils-b.est # We don't really do bodyOfDisplay yet. esetname F @ systag sysno none #all Any elm (1,1) schemaIdentifier - elm (1,10) rank - elm (1,12) url - elm (1,14) localControlNumber - elm (2,1) title !:w,!:p,!:s elm (4,52) originator author-name-corporate # # Additional structuring of originator non-standard. # elm (4,52)/(2,7) originatorName author-name-corporate elm (4,52)/(2,10) originatorOrganization author-name-corporate elm (4,52)/(4,2) originatorStreetAddress author-name-corporate elm (4,52)/(4,3) originatorCity author-name-corporate elm (4,52)/(4,4) originatorStateOrProvince author-name-corporate elm (4,52)/(4,5) originatorZipOrPostalCode author-name-corporate elm (4,52)/(2,16) originatorCountry author-name-corporate elm (4,52)/(2,12) originatorNetworkAddress author-name-corporate elm (4,52)/(4,6) originatorHoursofService author-name-corporate elm (4,52)/(2,14) originatorTelephone author-name-corporate elm (4,52)/(2,15) originatorFax author-name-corporate elm (2,2) author ! # # Additional structuring of author non-standard. # elm (2,2)/(2,7) authorName author elm (2,2)/(2,10) authorOrganization author elm (2,2)/(4,2) authorStreetAddress author elm (2,2)/(4,3) authorCity author elm (2,2)/(4,4) authorStateOrProvince author elm (2,2)/(4,5) authorZipOrPostalCode author elm (2,2)/(2,16) authorCountry author elm (2,2)/(2,12) authorNetworkAddress author elm (2,2)/(4,6) authorHoursofService author elm (2,2)/(2,14) authorTelephone author elm (2,2)/(2,15) authorFax author elm (2,4) dateOfPublication ! elm (2,3) placeOfPublication place-publication elm (4,32) languageOfResource code-language elm (2,6) abstract ! elm (4,95) controlledSubjectIndex - elm (4,95)/(4,21) subjectThesaurus - elm (4,95)/(4,96) subjectTermsControlled controlled-subject-index elm (4,95)/(4,96)/(4,20) controlledTerm index-terms elm (4,97) subjectTermsUncontrolled uncontrolled-term elm (4,97)/(4,22) uncontrolledTerm uncontrolled-term elm (4,71) spatialDomain ! elm (4,71)/(4,91) boundingCoordinates ! elm (4,71)/(4,91)/(4,9) westBoundingCoordinate !:n elm (4,71)/(4,91)/(4,10) eastBoundingCoordinate !:n elm (4,71)/(4,91)/(4,11) northBoundingCoordinate !:n elm (4,71)/(4,91)/(4,12) southBoundingCoordinate !:n elm (4,71)/(4,92) place ! elm (4,71)/(4,92)/(4,14) placeKeywordThesaurus - elm (4,71)/(4,92)/(4,13) placeKeyword place elm (4,93) timePeriod ! elm (4,93)/(4,16) timePeriodTextual ! elm (4,93)/(4,101) timePeriodStructured ! elm (4,93)/(4,101)/(4,15) beginningDate ! elm (4,93)/(4,101)/(4,36) endingDate ! elm (4,70) availability ! elm (4,70)/(4,33) medium material-type elm (4,70)/(4,90) distributor ! elm (4,70)/(4,90)/(2,7) distributorName ! elm (4,70)/(4,90)/(2,10) distributorOrganization ! elm (4,70)/(4,90)/(4,2) distributorStreetAddress ! elm (4,70)/(4,90)/(4,3) distributorCity ! elm (4,70)/(4,90)/(4,4) distributorStateOrProvince ! elm (4,70)/(4,90)/(4,5) distributorZipOrPostalCode ! elm (4,70)/(4,90)/(2,16) distributorCountry ! elm (4,70)/(4,90)/(2,12) distributorNetworkAddress ! elm (4,70)/(4,90)/(4,6) distributorHoursofService ! elm (4,70)/(4,90)/(2,14) distributorTelephone ! elm (4,70)/(4,90)/(2,15) distributorFax ! elm (4,70)/(4,7) resourceDescription ! elm (4,70)/(4,55) orderProcess ! elm (4,70)/(4,55)/(4,28) orderInformation ! elm (4,70)/(4,55)/(4,29) cost ! elm (4,70)/(4,55)/(4,30) costInformation ! elm (4,70)/(4,8) technicalPrerequisites ! elm (4,70)/(4,93) availableTimePeriod ! elm (4,70)/(4,93)/(4,16) availableTimeTextual ! elm (4,70)/(4,93)/(4,102) availableTimeStructured ! elm (4,70)/(4,93)/(4,102)/(4,15) beginningDate available-time-structured elm (4,70)/(4,93)/(4,102)/(4,36) endingDate available-time-structured elm (4,70)/(4,99) availableLinkage ! elm (4,70)/(4,99)/(4,18) linkageType ! elm (4,70)/(4,99)/(4,17) linkage available-linkage:u,linkage:u elm (4,57) sourcesOfData ! elm (4,58) methodology ! elm (4,53) accessConstraints ! elm (4,53)/(4,25) generalAccessConstraints ! elm (4,53)/(4,26) originatorDisseminationControl ! elm (4,53)/(4,27) securityClassificationControl ! elm (4,54) useConstraints ! elm (4,94) pointOfContact ! elm (4,94)/(2,7) contactName ! elm (4,94)/(2,10) contactOrganization ! elm (4,94)/(4,2) contactStreetAddress ! elm (4,94)/(4,3) contactCity ! elm (4,94)/(4,4) contactStateOrProvince ! elm (4,94)/(4,5) contactZipOrPostalCode ! elm (4,94)/(2,16) contactCountry ! elm (4,94)/(2,12) contactNetworkAddress ! elm (4,94)/(4,6) contactHoursOfService ! elm (4,94)/(2,14) contactTelephone ! elm (4,94)/(2,15) contactFax ! elm (4,59) supplementalInformation - elm (4,51) purpose ! elm (4,56) agencyProgram ! elm (4,98) crossReference ! elm (4,98)/(2,1) crossReferenceTitle ! elm (4,98)/(4,35) crossReferenceRelationship ! elm (4,98)/(4,100) crossReferenceLinkage ! elm (4,98)/(4,100)/(4,18) linkageType - elm (4,98)/(4,100)/(4,17) linkage cross-reference-linkage:u elm (4,31) scheduleNumber ! elm (4,1) controlIdentifier identifier-standard elm (4,23) originalControlIdentifier ! elm (4,19) recordSource ! elm (4,34) languageOfRecord ! elm (1,16) dateOfLastModification date/time-last-modified:w,date/time-last-modified:s elm (4,24) recordReviewDate ! idzebra-2.0.44/test/config/g.rec0000644000175000017500000000521311057500746013315 00000000000000 UTAH EARTHQUAKE EPICENTERS <Acronym> UUCCSEIS </Acronym> UTAH GEOLOGICAL AND MINERAL SURVEY APPALACHIAN VALLEY; EARTHQUAKE; EPICENTER; SEISMOLOGY; UTAH Five files of epicenter data arranged by date comprise this data set. These files are searchable by magnitude and longitude/latitude. Hardcopy of listing and plot of requested area available. Epicenter location and date, magnitude, and focal depth available. DIGITAL DATA SETS TERRESTRIAL Data are supplied by the University of Utah Seismograph Station. The Utah Geologcial and Mineral Survey (UGMS) is merely a clearinghouse of the data. US STATE UTAH -114 -109 42 37 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 UTAH EARTHQUAKE EPICENTERS AUTOMATED BATCH 8,700 PC NETWORK SALT LAKE CITY, UT NONE OPERATIONAL BILL CASE UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0006 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/test/config/Makefile.in0000644000175000017500000003217011412336425014437 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = test/config DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ check_SCRIPTS = test1.sh test2.sh TESTS = test1.sh test2.sh EXTRA_DIST = zebra.cfg $(check_SCRIPTS) g.rec g.abs m.rec m.flt m.rec all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/config/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/config/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool clean-local distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/test/config/test2.sh0000755000175000017500000000047111412332551013765 00000000000000#!/bin/sh pp=${srcdir:-"."} LOG=test2.log if ../../index/zebraidx -c $pp/zebra.cfg -l $LOG filters|grep grs.tcl >/dev/null; then ../../index/zebraidx -c $pp/zebra.cfg -l $LOG init ../../index/zebraidx -c $pp/zebra.cfg -l $LOG -s -t grs.tcl.m update $pp/m.rec | grep tag:dc:subject >/dev/null else exit 0 fi idzebra-2.0.44/test/xelm/0000755000175000017500000000000011412336535012151 500000000000000idzebra-2.0.44/test/xelm/user.abs0000644000175000017500000000062311057500746013541 00000000000000name user attset bib1.att #xpath enable #xelm //des*/ Any:w #xelm //user/age !:n,ISBN:w #xelm //user/name !:p xelm //user/@id !:w,Doc-id:w,Any:w #xelm /user[@id="strucc"]/description[@xml:lang="en" and @test] !:w,Any:w #xelm ///description[@xml:lang="en"] !:w,Any:w #elm name name Any:p #elm age age Any:n xelm /@* !:w # all attributes xelm /* !:w # expression for all tags idzebra-2.0.44/test/xelm/strucc.xml0000644000175000017500000000054511412332551014114 00000000000000 Strucc Emu Leiras Testit strucc@technomat.hu http://www.technomat.hu/strucc 5 idzebra-2.0.44/test/xelm/Makefile.am0000644000175000017500000000017111412332551014116 00000000000000 check_SCRIPTS = test.sh TESTS = $(check_SCRIPTS) EXTRA_DIST = zebra.cfg user.abs $(check_SCRIPTS) pop.xml strucc.xml idzebra-2.0.44/test/xelm/zebra.cfg0000644000175000017500000000037411057500746013663 00000000000000# Simple zebra configuration file to demonstate the usage of xelm directive profilePath: ${srcdir:-.}/../../tab attset: bib1.att attset: explain.att # Specify record type recordType.xml: grs.xml #recordId: file memMax: 4 storeKeys: 1 storeData: 1 idzebra-2.0.44/test/xelm/pop.xml0000644000175000017500000000053311412332551013404 00000000000000 Peter Popovics Leiras Description pop@technomat.hu http://www.technomat.hu/pop 29 idzebra-2.0.44/test/xelm/test.sh0000755000175000017500000000002111057500746013402 00000000000000#!/bin/sh exit 0 idzebra-2.0.44/test/xelm/Makefile.in0000644000175000017500000003202011412336426014132 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = test/xelm DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ check_SCRIPTS = test.sh TESTS = $(check_SCRIPTS) EXTRA_DIST = zebra.cfg user.abs $(check_SCRIPTS) pop.xml strucc.xml all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/xelm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/xelm/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/test/xslt/0000755000175000017500000000000011412336535012176 500000000000000idzebra-2.0.44/test/xslt/dom-index-element.xsl0000644000175000017500000000157611412332551016164 00000000000000 idzebra-2.0.44/test/xslt/dctoindex.xsl0000644000175000017500000000313511412332551014623 00000000000000 |title|date|creator| |title|date|creator| idzebra-2.0.44/test/xslt/dom-brief.xsl0000644000175000017500000000073211412332551014506 00000000000000 <xsl:value-of select="m:subfield[@code='a']"/> idzebra-2.0.44/test/xslt/gutenberg.xml0000644000175000017500000000063611412332551014621 00000000000000 idzebra-2.0.44/test/xslt/marc-one.xml0000644000175000017500000000230111057500746014337 00000000000000 42 00366nam 22001698a 4500 11224466 DLC 00000000000000.0 910710c19910701nju 00010 eng 11224466 DLC DLC 123-xyz Jack Collins How to program a computer Penguin 8710 p. cm. idzebra-2.0.44/test/xslt/marc-missing-ns.xml0000644000175000017500000000232411057500746015652 00000000000000 42 00366nam 22001698a 4500 11224466 DLC 00000000000000.0 910710c19910701nju 00010 eng 11224466 DLC DLC 123-xyz Jack Collins How to program a computer Penguin 8710 p. cm. idzebra-2.0.44/test/xslt/gutenberg-sample.xml0000644000175000017500000000355211412332551016100 00000000000000 ]> &pg; Selected Prose of Oscar Wilde Preface by Robert Ross -- How They Struck a Contemporary -- The Quality of George Meredith -- Life in the Fallacious Model -- Life the Disciple -- Life the Plagiarist -- The Indispensable East -- The Influence of the Impressionists on Climate -- Wilde, Oscar, 1854-1900 Selected Prose of Oscar Wilde by Oscar Wilde en Essays Short stories PR 1998-06-01 idzebra-2.0.44/test/xslt/dom-config-marc.xml0000644000175000017500000000036111412332551015574 00000000000000 idzebra-2.0.44/test/xslt/marc-col.xml0000644000175000017500000001342511233601266014337 00000000000000 ]> 1 00366nam 22001698a 4500 11224466 DLC 00000000000000.0 910710c19910701nju 00010 eng 11224466 DLC DLC 123-xyz Jack Collins How to program a &com; Penguin 8710 p. cm. 5 00366nam 22001698a 4500 11224467 DLC 00000000000000.0 910710c19910701nju 00010 eng 11224467 DLC DLC 123-xyz Jack Collins How to program a computer Penguin 8710 p. cm. 3 01369cam 2200265 i 4500 73090924 DLC 19820524000000.0 760609s1974 nyua b 10110 eng 73090924 DLC DLC DLC RC71.3 .W67 1971 616.07/575/02854 Workshop on Computer Processing of Dynamic Images from an Anger Scintillation Camera, Washington University, 1971. Computer processing of dynamic images from an Anger scintillation camera : the proceedings of a workshop / cosponsored by the Biomedical Computer Laboratory and the Nuclear Medicine Division, Department of Radiology, School of Medicine, Washington University, St. Louis, January 18-22, 1971 ; edited by Kenneth B. Larson, Jerome R. Cox, Jr. New York : Society of Nuclear Medicine, [c1974] xiv, p. : ill. ; 24 cm. Includes bibliographical references and index. Radioisotope scanning Data processing Congresses. Scintillation cameras Congresses. Imaging systems in medicine Data processing Congresses. Larson, Kenneth B. Cox, Jerome R. Washington University, St. Louis. Biomedical Computer Laboratory. Washington University, St. Louis. Nuclear Medicine Division. idzebra-2.0.44/test/xslt/zebra-dom.cfg0000644000175000017500000000032711162200462014450 00000000000000profilePath: ${srcdir:-.}:${srcdir:-.}/../../tab modulePath: ../../index/.libs #recordType: dom.dom-config-skipped.xml #recordType: dom.dom-config-col.xml recordType: dom.dom-config-one.xml #perm.anonymous: rw idzebra-2.0.44/test/xslt/zebrastaticrank.cfg0000644000175000017500000000020211412332551015752 00000000000000profilePath: ${srcdir:-.}:${srcdir:-.}/../../tab modulePath: ../../index/.libs staticrank: 1 rank: rank-static #rank: rank-2 idzebra-2.0.44/test/xslt/dom-index-element-chop.xsl0000644000175000017500000000231711412332551017105 00000000000000 0 idzebra-2.0.44/test/xslt/dom-index-skipped.xsl0000644000175000017500000000250111412332551016157 00000000000000 idzebra-2.0.44/test/xslt/dom-index-pi.xsl0000644000175000017500000000246711412332551015143 00000000000000 record id= rank= index control:w index title:w title:p title:s <xsl:value-of select="."/> idzebra-2.0.44/test/xslt/Makefile.am0000644000175000017500000000217011412332551014144 00000000000000 check_PROGRAMS = xslt1 xslt2 xslt3 xslt4 xslt5 dom1 TESTS = $(check_PROGRAMS) EXTRA_DIST= \ dom-config-col.xml \ dom-config-marc.xml \ dom-config-one.xml \ dom-config-skipped.xml \ dom-index-element.xsl \ dom-index-element-chop.xsl \ dom-index-pi.xsl \ dom-index-skipped.xsl \ dom-config-del.xml \ dom-brief.xsl \ dom-snippet.xsl \ gutenberg.xml \ gutenberg-sample.xml \ dcaddmeta.xsl \ gpdctodc.xsl \ dctoindex.xsl \ del-col.xml \ id.xsl \ index.xsl \ marc-col.mrc \ marc-col.xml \ marc-missing-ns.xml \ marc-one.xml \ marcschema-col.xml \ marcschema-one.xml \ snippet.xsl \ zebra-dom.cfg \ zebra.cfg \ zebrastaticrank.cfg xslt1_SOURCES = xslt1.c xslt2_SOURCES = xslt2.c xslt3_SOURCES = xslt3.c xslt4_SOURCES = xslt4.c xslt5_SOURCES = xslt5.c dom1_SOURCES = dom1.c AM_CPPFLAGS = -I$(srcdir)/../api -I$(top_srcdir)/include $(YAZINC) zebralibs = ../../index/libidzebra-2.0.la LDADD = ../api/libtestlib.a $(zebralibs) $(YAZLALIB) clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf idzebra-2.0.44/test/xslt/snippet.xsl0000644000175000017500000000117011412332551014321 00000000000000 idzebra-2.0.44/test/xslt/gpdctodc.xsl0000644000175000017500000000572211412332551014435 00000000000000 http://www.gutenberg.org/etext/ idzebra-2.0.44/test/xslt/dom-config-col.xml0000644000175000017500000000062211412332551015427 00000000000000 idzebra-2.0.44/test/xslt/xslt1.c0000644000175000017500000000370611412332551013335 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include "testlib.h" void tst(int argc, char **argv) { char path[256]; char profile_path[256]; ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); tl_check_filter(zs, "alvis"); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_init(zh); sprintf(profile_path, "%s:%s/../../tab", tl_get_srcdir(), tl_get_srcdir()); zebra_set_resource(zh, "profilePath", profile_path); zebra_set_resource(zh, "recordType", "alvis.marcschema-col.xml"); YAZ_CHECK(zebra_begin_trans(zh, 1) == ZEBRA_OK); sprintf(path, "%s/marc-col.xml", tl_get_srcdir()); YAZ_CHECK(zebra_repository_update(zh, path) == ZEBRA_OK); YAZ_CHECK(zebra_end_trans(zh) == ZEBRA_OK); zebra_commit(zh); YAZ_CHECK(tl_query(zh, "@attr 1=title computer", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=control 11224466", 1)); YAZ_CHECK(tl_query_x(zh, "@attr 1=titl computer", 0, 114)); YAZ_CHECK(tl_query_x(zh, "@attr 1=4 computer", 0, 121)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/xslt/xslt2.c0000644000175000017500000000453711412332551013341 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include "testlib.h" static void tst(int argc, char **argv) { char path[256]; char profile_path[256]; char record_buf[20000]; const char *records_array[] = { record_buf, 0 }; FILE *f; size_t r; ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); tl_check_filter(zs, "alvis"); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_init(zh); sprintf(profile_path, "%s:%s/../../tab", tl_get_srcdir(), tl_get_srcdir()); zebra_set_resource(zh, "profilePath", profile_path); zebra_set_resource(zh, "recordType", "alvis.marcschema-col.xml"); sprintf(path, "%.200s/marc-col.xml", tl_get_srcdir()); f = fopen(path, "rb"); if (!f) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "Cannot open %s", path); exit(1); } r = fread(record_buf, 1, sizeof(record_buf)-1, f); if (r < 2 || r == sizeof(record_buf)-1) { yaz_log(YLOG_FATAL, "Bad size of %s", path); exit(1); } fclose(f); record_buf[r] = '\0'; /* for now only the first of the records in the collection is indexed. That can be seen as a bug */ YAZ_CHECK(tl_init_data(zh, records_array)); /* only get hits from first record .. */ YAZ_CHECK(tl_query(zh, "@attr 1=title computer", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=control 11224466", 1)); YAZ_CHECK(tl_query_x(zh, "@attr 1=titl computer", 0, 114)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/xslt/marcschema-one.xml0000644000175000017500000000052511412332551015516 00000000000000 idzebra-2.0.44/test/xslt/dom-config-skipped.xml0000644000175000017500000000034511412332551016313 00000000000000 idzebra-2.0.44/test/xslt/dom1.c0000644000175000017500000001277511412332551013130 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include "testlib.h" void index_more(ZebraHandle zh, const char *filter, const char *file) { char path[256]; char profile_path[256]; sprintf(profile_path, "%.80s:%.80s/../../tab", tl_get_srcdir(), tl_get_srcdir()); zebra_set_resource(zh, "profilePath", profile_path); zebra_set_resource(zh, "recordType", filter); YAZ_CHECK(zebra_begin_trans(zh, 1) == ZEBRA_OK); sprintf(path, "%.80s/%.80s", tl_get_srcdir(), file); YAZ_CHECK(zebra_repository_update(zh, path) == ZEBRA_OK); YAZ_CHECK(zebra_end_trans(zh) == ZEBRA_OK); zebra_commit(zh); } ZebraHandle index_some(ZebraService zs, const char *filter, const char *file) { ZebraHandle zh = zebra_open(zs, 0); tl_check_filter(zs, "dom"); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_init(zh); index_more(zh, filter, file); return zh; } void tst(int argc, char **argv) { ZebraHandle zh; ZebraService zs = tl_start_up(0, argc, argv); zh = index_some(zs, "dom.bad.xml", "marc-col.xml"); zebra_close(zh); /* testing XMLREADER input with PI stylesheet */ zh = index_some(zs, "dom.dom-config-col.xml", "marc-col.xml"); YAZ_CHECK(tl_query(zh, "@attr 1=title computer", 3)); /* fetch first using dom-brief.xsl */ YAZ_CHECK_EQ(tl_fetch_first_compare( zh, "B", yaz_oid_recsyn_xml, "\n" "How to program a computer\n"), ZEBRA_OK); /* fetch first using dom-snippets.xsl */ YAZ_CHECK_EQ(tl_fetch_first_compare( zh, "snippet", yaz_oid_recsyn_xml, "\n" "\n" " \n" " How to program a computer\n" "\n" " How to program a computer\n" "\n"), ZEBRA_OK); YAZ_CHECK(tl_query(zh, "@attr 1=control 11224466", 1)); YAZ_CHECK(tl_query_x(zh, "@attr 1=titl computer", 0, 114)); YAZ_CHECK(tl_query_x(zh, "@attr 1=4 computer", 0, 121)); zebra_close(zh); /* testing XMLREADER input with ELEMENT stylesheet */ zh = index_some(zs, "dom.dom-config-one.xml", "marc-one.xml"); YAZ_CHECK(tl_query(zh, "@attr 1=title computer", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=control 11224466", 1)); YAZ_CHECK(tl_query_x(zh, "@attr 1=titl computer", 0, 114)); YAZ_CHECK(tl_query_x(zh, "@attr 1=4 computer", 0, 121)); zebra_close(zh); /* testing MARC input with ELEMENT stylesheet */ zh = index_some(zs, "dom.dom-config-marc.xml", "marc-col.mrc"); YAZ_CHECK(tl_query(zh, "@attr 1=title computer", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=control 11224466", 1)); YAZ_CHECK(tl_query_x(zh, "@attr 1=titl computer", 0, 114)); YAZ_CHECK(tl_query_x(zh, "@attr 1=4 computer", 0, 121)); zebra_close(zh); /* testing XMLREADER input with ELEMENT stylesheet and skipped records */ zh = index_some(zs, "dom.dom-config-skipped.xml", "marc-col.xml"); YAZ_CHECK(tl_query(zh, "@attr 1=title computer", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=control 11224466", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=control 11224467", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=control 73090924", 0)); /* testing XMLREADER input with type attributes (insert,delete,..) */ zh = index_some(zs, "dom.dom-config-del.xml", "del-col.xml"); YAZ_CHECK(tl_query(zh, "@attr 1=title a", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=title 1", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=title 2", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=title 3", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=title b", 1)); zh = index_some(zs, "dom.gutenberg.xml", "gutenberg-sample.xml"); YAZ_CHECK(tl_query(zh, "oscar", 1)); YAZ_CHECK_EQ(tl_fetch_first_compare( zh, "zebra::snippet", yaz_oid_recsyn_xml, "\n" " " "Selected Prose of Oscar Wilde" "\n" " " "Wilde, Oscar, 1854-1900" "\n" ""), ZEBRA_OK); zebra_close(zh); YAZ_CHECK(tl_close_down(0, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/xslt/zebra.cfg0000644000175000017500000000021411077620005013672 00000000000000profilePath: ${srcdir:-.}:${srcdir:-.}/../../tab modulePath: ../../index/.libs recordType: alvis.marcschema-one.xml perm.anonymous: rw idzebra-2.0.44/test/xslt/dom-config-del.xml0000644000175000017500000000032311412332551015414 00000000000000 idzebra-2.0.44/test/xslt/marc-col.mrc0000644000175000017500000000406511057500746014325 0000000000000000366nam 22001698a 4500001001300000003000400013005001700017008004100034010001700179040001300075050001200088100001700100245003000117260001200147263000900159300001100168 11224466 DLC00000000000000.0910710c19910701nju 00010 eng  aDLCcDLC00a123-xyz10aJack Collins10aHow to program a computer1 aPenguin a8710 ap. cm. a 11224466 00366nam 22001698a 4500001001300000003000400013005001700017008004100034010001700179040001300075050001200088100001700100245003000117260001200147263000900159300001100168 11224467 DLC00000000000000.0910710c19910701nju 00010 eng  aDLCcDLC00a123-xyz10aJack Collins10aHow to program a computer1 aPenguin a8710 ap. cm. a 11224467 01369cam 2200265 i 4500001001800000003000400018005001700022008004100039010002201081040001800080050002200098082002100120111012100141245034700262260005400609300003000663504005100693650005600744650003900800650006200839700002300901700002000924710007100944710006601015 73090924 //r82DLC19820524000000.0760609s1974 nyua b 10110 eng  aDLCcDLCdDLC00aRC71.3b.W67 197100a616.07/575/0285420aWorkshop on Computer Processing of Dynamic Images from an Anger Scintillation Camera,cWashington University,d1971.10aComputer processing of dynamic images from an Anger scintillation camera :bthe proceedings of a workshop /ccosponsored by the Biomedical Computer Laboratory and the Nuclear Medicine Division, Department of Radiology, School of Medicine, Washington University, St. Louis, January 18-22, 1971 ; edited by Kenneth B. Larson, Jerome R. Cox, Jr.0 aNew York :bSociety of Nuclear Medicine,c[c1974] axiv, p. :bill. ;c24 cm. aIncludes bibliographical references and index. 0aRadioisotope scanningxData processingxCongresses. 0aScintillation camerasxCongresses. 0aImaging systems in medicinexData processingxCongresses.10aLarson, Kenneth B.10aCox, Jerome R. 20aWashington University, St. Louis.bBiomedical Computer Laboratory.20aWashington University, St. Louis.bNuclear Medicine Division. a 73090924 //r82idzebra-2.0.44/test/xslt/xslt3.c0000644000175000017500000000525411412332551013337 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include "testlib.h" static void tst(int argc, char **argv) { char path[256]; char profile_path[256]; char record_buf[20000]; const char *records_array[] = { record_buf, 0 }; FILE *f; size_t r; ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); tl_check_filter(zs, "alvis"); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_init(zh); sprintf(profile_path, "%s:%s/../../tab", tl_get_srcdir(), tl_get_srcdir()); zebra_set_resource(zh, "profilePath", profile_path); zebra_set_resource(zh, "recordType", "alvis.marcschema-one.xml"); sprintf(path, "%.200s/marc-one.xml", tl_get_srcdir()); f = fopen(path, "rb"); if (!f) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "Cannot open %s", path); exit(1); } r = fread(record_buf, 1, sizeof(record_buf)-1, f); if (r < 2 || r == sizeof(record_buf)-1) { yaz_log(YLOG_FATAL, "Bad size of %s", path); exit(1); } fclose(f); record_buf[r] = '\0'; /* index this one record */ YAZ_CHECK(tl_init_data(zh, records_array)); /* only get hits from first record .. */ YAZ_CHECK(tl_query(zh, "@attr 1=title computer", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=control 11224466", 1)); YAZ_CHECK(tl_query_x(zh, "@attr 1=titl computer", 0, 114)); /* index one more time to see that we don't get dups, since index.xsl has a record ID associated with them */ zebra_add_record(zh, record_buf, strlen(record_buf)); /* only get hits from first record .. */ YAZ_CHECK(tl_query(zh, "@attr 1=title computer", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=control 11224466", 1)); YAZ_CHECK(tl_query_x(zh, "@attr 1=titl computer", 0, 114)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/xslt/dom-snippet.xsl0000644000175000017500000000112611412332551015077 00000000000000 <xsl:value-of select="m:subfield[@code='a']"/> idzebra-2.0.44/test/xslt/id.xsl0000644000175000017500000000054511057500746013250 00000000000000 idzebra-2.0.44/test/xslt/del-col.xml0000644000175000017500000000066511057500746014170 00000000000000 a 1 a 2 a 3 b idzebra-2.0.44/test/xslt/Makefile.in0000644000175000017500000005070311412336426014167 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = xslt1$(EXEEXT) xslt2$(EXEEXT) xslt3$(EXEEXT) \ xslt4$(EXEEXT) xslt5$(EXEEXT) dom1$(EXEEXT) subdir = test/xslt DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_dom1_OBJECTS = dom1.$(OBJEXT) dom1_OBJECTS = $(am_dom1_OBJECTS) dom1_LDADD = $(LDADD) am__DEPENDENCIES_1 = dom1_DEPENDENCIES = ../api/libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_xslt1_OBJECTS = xslt1.$(OBJEXT) xslt1_OBJECTS = $(am_xslt1_OBJECTS) xslt1_LDADD = $(LDADD) xslt1_DEPENDENCIES = ../api/libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_xslt2_OBJECTS = xslt2.$(OBJEXT) xslt2_OBJECTS = $(am_xslt2_OBJECTS) xslt2_LDADD = $(LDADD) xslt2_DEPENDENCIES = ../api/libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_xslt3_OBJECTS = xslt3.$(OBJEXT) xslt3_OBJECTS = $(am_xslt3_OBJECTS) xslt3_LDADD = $(LDADD) xslt3_DEPENDENCIES = ../api/libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_xslt4_OBJECTS = xslt4.$(OBJEXT) xslt4_OBJECTS = $(am_xslt4_OBJECTS) xslt4_LDADD = $(LDADD) xslt4_DEPENDENCIES = ../api/libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_xslt5_OBJECTS = xslt5.$(OBJEXT) xslt5_OBJECTS = $(am_xslt5_OBJECTS) xslt5_LDADD = $(LDADD) xslt5_DEPENDENCIES = ../api/libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(dom1_SOURCES) $(xslt1_SOURCES) $(xslt2_SOURCES) \ $(xslt3_SOURCES) $(xslt4_SOURCES) $(xslt5_SOURCES) DIST_SOURCES = $(dom1_SOURCES) $(xslt1_SOURCES) $(xslt2_SOURCES) \ $(xslt3_SOURCES) $(xslt4_SOURCES) $(xslt5_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ TESTS = $(check_PROGRAMS) EXTRA_DIST = \ dom-config-col.xml \ dom-config-marc.xml \ dom-config-one.xml \ dom-config-skipped.xml \ dom-index-element.xsl \ dom-index-element-chop.xsl \ dom-index-pi.xsl \ dom-index-skipped.xsl \ dom-config-del.xml \ dom-brief.xsl \ dom-snippet.xsl \ gutenberg.xml \ gutenberg-sample.xml \ dcaddmeta.xsl \ gpdctodc.xsl \ dctoindex.xsl \ del-col.xml \ id.xsl \ index.xsl \ marc-col.mrc \ marc-col.xml \ marc-missing-ns.xml \ marc-one.xml \ marcschema-col.xml \ marcschema-one.xml \ snippet.xsl \ zebra-dom.cfg \ zebra.cfg \ zebrastaticrank.cfg xslt1_SOURCES = xslt1.c xslt2_SOURCES = xslt2.c xslt3_SOURCES = xslt3.c xslt4_SOURCES = xslt4.c xslt5_SOURCES = xslt5.c dom1_SOURCES = dom1.c AM_CPPFLAGS = -I$(srcdir)/../api -I$(top_srcdir)/include $(YAZINC) zebralibs = ../../index/libidzebra-2.0.la LDADD = ../api/libtestlib.a $(zebralibs) $(YAZLALIB) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/xslt/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/xslt/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list dom1$(EXEEXT): $(dom1_OBJECTS) $(dom1_DEPENDENCIES) @rm -f dom1$(EXEEXT) $(LINK) $(dom1_OBJECTS) $(dom1_LDADD) $(LIBS) xslt1$(EXEEXT): $(xslt1_OBJECTS) $(xslt1_DEPENDENCIES) @rm -f xslt1$(EXEEXT) $(LINK) $(xslt1_OBJECTS) $(xslt1_LDADD) $(LIBS) xslt2$(EXEEXT): $(xslt2_OBJECTS) $(xslt2_DEPENDENCIES) @rm -f xslt2$(EXEEXT) $(LINK) $(xslt2_OBJECTS) $(xslt2_LDADD) $(LIBS) xslt3$(EXEEXT): $(xslt3_OBJECTS) $(xslt3_DEPENDENCIES) @rm -f xslt3$(EXEEXT) $(LINK) $(xslt3_OBJECTS) $(xslt3_LDADD) $(LIBS) xslt4$(EXEEXT): $(xslt4_OBJECTS) $(xslt4_DEPENDENCIES) @rm -f xslt4$(EXEEXT) $(LINK) $(xslt4_OBJECTS) $(xslt4_LDADD) $(LIBS) xslt5$(EXEEXT): $(xslt5_OBJECTS) $(xslt5_DEPENDENCIES) @rm -f xslt5$(EXEEXT) $(LINK) $(xslt5_OBJECTS) $(xslt5_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dom1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xslt1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xslt2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xslt3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xslt4.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xslt5.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/test/xslt/marcschema-col.xml0000644000175000017500000000050211412332551015505 00000000000000 idzebra-2.0.44/test/xslt/dom-config-one.xml0000644000175000017500000000052411412332551015434 00000000000000 idzebra-2.0.44/test/xslt/xslt4.c0000644000175000017500000000410411412332551013331 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include "testlib.h" static void tst(int argc, char **argv) { char path[256]; char profile_path[256]; ZebraService zs = tl_start_up("zebrastaticrank.cfg", argc, argv); ZebraHandle zh = zebra_open(zs, 0); tl_check_filter(zs, "alvis"); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_init(zh); sprintf(profile_path, "%s:%s/../../tab", tl_get_srcdir(), tl_get_srcdir()); zebra_set_resource(zh, "profilePath", profile_path); zebra_set_resource(zh, "recordType", "alvis.marcschema-col.xml"); zebra_set_resource(zh, "staticrank", "1"); YAZ_CHECK(zebra_begin_trans(zh, 1) == ZEBRA_OK); sprintf(path, "%.200s/marc-col.xml", tl_get_srcdir()); zebra_repository_update(zh, path); YAZ_CHECK(zebra_end_trans(zh) == ZEBRA_OK); zebra_commit(zh); YAZ_CHECK(tl_query(zh, "@attr 1=title computer", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=control 11224466", 1)); YAZ_CHECK(tl_query_x(zh, "@attr 1=titl computer", 0, 114)); if (1) { zint ids[5]; ids[0] = 2; ids[1] = 4; ids[2] = 3; YAZ_CHECK(tl_sort(zh, "@attr 1=title computer", 3, ids)); } YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/xslt/index.xsl0000644000175000017500000000215711412332551013754 00000000000000 idzebra-2.0.44/test/xslt/xslt5.c0000644000175000017500000000455411412332551013343 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include "testlib.h" #if YAZ_HAVE_XML2 #include #endif static void tst(int argc, char **argv) { char path[256]; char profile_path[256]; char record_buf[20000]; FILE *f; size_t r; ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); tl_check_filter(zs, "alvis"); YAZ_CHECK_EQ(zebra_select_database(zh, "Default"), ZEBRA_OK); zebra_init(zh); sprintf(profile_path, "%s:%s/../../tab", tl_get_srcdir(), tl_get_srcdir()); zebra_set_resource(zh, "profilePath", profile_path); zebra_set_resource(zh, "recordType", "alvis.marcschema-one.xml"); sprintf(path, "%.200s/marc-missing-ns.xml", tl_get_srcdir()); f = fopen(path, "rb"); YAZ_CHECK(f); if (f) { r = fread(record_buf, 1, sizeof(record_buf)-1, f); YAZ_CHECK(r > 0); fclose(f); YAZ_CHECK(r > 2); record_buf[r] = '\0'; #if 0 /* disable this test for now: bug #730 */ /* http://xmlsoft.org/html/libxml-parser.html#xmlReadIO */ #if YAZ_HAVE_XML2 /* On Mac OSX using Libxml 2.6.16, we xmlTextReaderExpand does not return 0 ptr even though the record has an error in it */ #if LIBXML_VERSION >= 20617 YAZ_CHECK_EQ(zebra_add_record(zh, record_buf, strlen(record_buf)), ZEBRA_FAIL); #else zebra_add_record(zh, record_buf, strlen(record_buf)); #endif #endif #endif } YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/xslt/dcaddmeta.xsl0000644000175000017500000000112711412332551014547 00000000000000 idzebra-2.0.44/test/mbox/0000755000175000017500000000000011412336535012151 500000000000000idzebra-2.0.44/test/mbox/invalid.mbx0000644000175000017500000000006311057500746014230 00000000000000LicenseType = "User" LicenseClass = "Commercial" idzebra-2.0.44/test/mbox/mail1.mbx0000644000175000017500000000320311057500746013604 00000000000000From marc@indexdata.dk Thu Dec 02 09:57:42 2004 Return-path: Envelope-to: heikki@indexdata.dk Delivery-date: Thu, 02 Dec 2004 09:57:42 +0100 Received: from user.indexdata.dk ([213.150.43.10] helo=[10.0.1.66]) by bagel.indexdata.dk with esmtp (Exim 3.35 #1 (Debian)) id 1CZmmS-0006ZW-00; Thu, 02 Dec 2004 09:57:40 +0100 Message-ID: <41AED904.3000500@indexdata.dk> Date: Thu, 02 Dec 2004 09:57:40 +0100 From: Marc Cromme Reply-To: marc@indexdata.dk Organization: Index Data User-Agent: Mozilla Thunderbird 0.8 (X11/20040926) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Adam Dickmeiss , Heikki Levanto , Sebastian Hammer Subject: [Fwd: [Zebralist] Indexing multiple xml elements as a phrase] Content-Type: multipart/mixed; boundary="------------020203040804000501020404" X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on bagel.indexdata.dk X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.0 X-Spam-Level: Status: RO Content-Length: 4755 Lines: 135 This is a multi-part message in MIME format. --------------020203040804000501020404 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi folks - denne her er ikke blevet besvaret pÃ¥ zebra listen, og jeg kan ikke svare pÃ¥ den. Kan en af jer ?? Marc -- Marc Cromme, cand. polyt, Ph.D Senior Developer, Project Manager Index Data Aps Købmagergade 43, 2 1150 Copenhagen K. Denmark tel: +45 3341 1000 fax: +45 3341 0101 http://www.indexdata.com INDEX DATA Means Business for Open Source and Open Standards idzebra-2.0.44/test/mbox/mbox1.c0000644000175000017500000000322711412332551013261 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "testlib.h" static void tst(int argc, char **argv) { char path[256]; ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); tl_check_filter(zs, "grs.regx"); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_init(zh); YAZ_CHECK(zebra_begin_trans(zh, 1) == ZEBRA_OK); sprintf(path, "%.200s/mail1.mbx", tl_get_srcdir()); zebra_repository_update(zh, path); sprintf(path, "%.200s/mail3.mbx", tl_get_srcdir()); zebra_repository_update(zh, path); #if 1 /* bug #234 */ sprintf(path, "%.200s/invalid.mbx", tl_get_srcdir()); zebra_repository_update(zh, path); #endif YAZ_CHECK(zebra_end_trans(zh) == ZEBRA_OK); zebra_commit(zh); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/mbox/Makefile.am0000644000175000017500000000055511412332551014124 00000000000000 check_PROGRAMS = mbox1 TESTS = $(check_PROGRAMS) mailboxfiles = mail1.mbx mail3.mbx invalid.mbx EXTRA_DIST= zebra.cfg email2.flt $(mailboxfiles) mbox1_SOURCES = mbox1.c AM_CPPFLAGS = -I$(srcdir)/../api -I$(top_srcdir)/include $(YAZINC) LDADD = ../api/libtestlib.a ../../$(main_zebralib) $(YAZLALIB) clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf idzebra-2.0.44/test/mbox/mail3.mbx0000644000175000017500000001161111057500746013610 00000000000000From marc@indexdata.dk Thu Dec 02 09:57:42 2004 Return-path: Envelope-to: heikki@indexdata.dk Delivery-date: Thu, 02 Dec 2004 09:57:42 +0100 Received: from user.indexdata.dk ([213.150.43.10] helo=[10.0.1.66]) by bagel.indexdata.dk with esmtp (Exim 3.35 #1 (Debian)) id 1CZmmS-0006ZW-00; Thu, 02 Dec 2004 09:57:40 +0100 Message-ID: <41AED904.3000500@indexdata.dk> Date: Thu, 02 Dec 2004 09:57:40 +0100 From: Marc Cromme Reply-To: marc@indexdata.dk Organization: Index Data User-Agent: Mozilla Thunderbird 0.8 (X11/20040926) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Adam Dickmeiss , Heikki Levanto , Sebastian Hammer Subject: [Fwd: [Zebralist] Indexing multiple xml elements as a phrase] Content-Type: multipart/mixed; boundary="------------020203040804000501020404" X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on bagel.indexdata.dk X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.0 X-Spam-Level: Status: RO Content-Length: 4755 Lines: 135 This is a multi-part message in MIME format. --------------020203040804000501020404 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi folks - denne her er ikke blevet besvaret pÃ¥ zebra listen, og jeg kan ikke svare pÃ¥ den. Kan en af jer ?? Marc -- Marc Cromme, cand. polyt, Ph.D Senior Developer, Project Manager Index Data Aps Købmagergade 43, 2 1150 Copenhagen K. Denmark tel: +45 3341 1000 fax: +45 3341 0101 http://www.indexdata.com INDEX DATA Means Business for Open Source and Open Standards From marc@indexdata.dk Thu Dec 02 09:57:42 2004 Return-path: Envelope-to: heikki@indexdata.dk Delivery-date: Thu, 02 Dec 2004 09:57:42 +0100 Received: from user.indexdata.dk ([213.150.43.10] helo=[10.0.1.66]) by bagel.indexdata.dk with esmtp (Exim 3.35 #1 (Debian)) id 1CZmmS-0006ZW-00; Thu, 02 Dec 2004 09:57:40 +0100 Message-ID: <41AED904.3000500@indexdata.dk> Date: Thu, 02 Dec 2004 09:57:40 +0100 From: Marc Cromme Reply-To: marc@indexdata.dk Organization: Index Data User-Agent: Mozilla Thunderbird 0.8 (X11/20040926) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Adam Dickmeiss , Heikki Levanto , Sebastian Hammer Subject: [Fwd: [Zebralist] Indexing multiple xml elements as a phrase] Content-Type: multipart/mixed; boundary="------------020203040804000501020404" X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on bagel.indexdata.dk X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.0 X-Spam-Level: Status: RO Content-Length: 4755 Lines: 135 This is a multi-part message in MIME format. --------------020203040804000501020404 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi folks - denne her er ikke blevet besvaret pÃ¥ zebra listen, og jeg kan ikke svare pÃ¥ den. Kan en af jer ?? Marc -- Marc Cromme, cand. polyt, Ph.D Senior Developer, Project Manager Index Data Aps Købmagergade 43, 2 1150 Copenhagen K. Denmark tel: +45 3341 1000 fax: +45 3341 0101 http://www.indexdata.com INDEX DATA Means Business for Open Source and Open Standards From marc@indexdata.dk Thu Dec 02 09:57:42 2004 Return-path: Envelope-to: heikki@indexdata.dk Delivery-date: Thu, 02 Dec 2004 09:57:42 +0100 Received: from user.indexdata.dk ([213.150.43.10] helo=[10.0.1.66]) by bagel.indexdata.dk with esmtp (Exim 3.35 #1 (Debian)) id 1CZmmS-0006ZW-00; Thu, 02 Dec 2004 09:57:40 +0100 Message-ID: <41AED904.3000500@indexdata.dk> Date: Thu, 02 Dec 2004 09:57:40 +0100 From: Marc Cromme Reply-To: marc@indexdata.dk Organization: Index Data User-Agent: Mozilla Thunderbird 0.8 (X11/20040926) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Adam Dickmeiss , Heikki Levanto , Sebastian Hammer Subject: [Fwd: [Zebralist] Indexing multiple xml elements as a phrase] Content-Type: multipart/mixed; boundary="------------020203040804000501020404" X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on bagel.indexdata.dk X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.0 X-Spam-Level: Status: RO Content-Length: 4755 Lines: 135 This is a multi-part message in MIME format. --------------020203040804000501020404 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi folks - denne her er ikke blevet besvaret pÃ¥ zebra listen, og jeg kan ikke svare pÃ¥ den. Kan en af jer ?? Marc -- Marc Cromme, cand. polyt, Ph.D Senior Developer, Project Manager Index Data Aps Købmagergade 43, 2 1150 Copenhagen K. Denmark tel: +45 3341 1000 fax: +45 3341 0101 http://www.indexdata.com INDEX DATA Means Business for Open Source and Open Standards idzebra-2.0.44/test/mbox/zebra.cfg0000644000175000017500000000034711412332551013653 00000000000000# Zebra configuration file # #profilePath: .:/usr/share/idzebra/tab profilepath: .:${srcdir:-.}/../../tab recordType.mbx: grs.regx.email2 #recordType.mbx: grs.regx.mail database: mail attset: bib1.att attset: gils.att isam: b idzebra-2.0.44/test/mbox/Makefile.in0000644000175000017500000004327211412336426014145 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = mbox1$(EXEEXT) subdir = test/mbox DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_mbox1_OBJECTS = mbox1.$(OBJEXT) mbox1_OBJECTS = $(am_mbox1_OBJECTS) mbox1_LDADD = $(LDADD) am__DEPENDENCIES_1 = mbox1_DEPENDENCIES = ../api/libtestlib.a ../../$(main_zebralib) \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(mbox1_SOURCES) DIST_SOURCES = $(mbox1_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ TESTS = $(check_PROGRAMS) mailboxfiles = mail1.mbx mail3.mbx invalid.mbx EXTRA_DIST = zebra.cfg email2.flt $(mailboxfiles) mbox1_SOURCES = mbox1.c AM_CPPFLAGS = -I$(srcdir)/../api -I$(top_srcdir)/include $(YAZINC) LDADD = ../api/libtestlib.a ../../$(main_zebralib) $(YAZLALIB) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/mbox/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/mbox/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list mbox1$(EXEEXT): $(mbox1_OBJECTS) $(mbox1_DEPENDENCIES) @rm -f mbox1$(EXEEXT) $(LINK) $(mbox1_OBJECTS) $(mbox1_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbox1.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/test/mbox/email2.flt0000644000175000017500000000047411057500746013760 00000000000000BEGIN /.*$/ { begin record email; begin context headers } /^From .*$/ { unread 0; end element; end record } CONTEXT {headers} /^[A-Z][^:]*/ /: / { end element; begin element $0 } /\n\n/ { end context; end element; begin element body } /\n/ {} /^\t/ { data " " } /^ / { data " " } END { end record } idzebra-2.0.44/test/malxml/0000755000175000017500000000000011412336535012476 500000000000000idzebra-2.0.44/test/malxml/f1.xml0000644000175000017500000000357111412332551013446 00000000000000 idzebra-2.0.44/test/malxml/Makefile.am0000644000175000017500000000023011412332551014437 00000000000000 check_SCRIPTS = test1.sh TESTS = test1.sh EXTRA_DIST = zebra.cfg $(check_SCRIPTS) f1.xml clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf idzebra-2.0.44/test/malxml/test1.sh0000755000175000017500000000044011412332551014005 00000000000000#!/bin/sh pp=${srcdir:-"."} LOG=test1.log rm -f $LOG if ../../index/zebraidx -c $pp/zebra.cfg -l $LOG filters|grep grs.xml >/dev/null; then ../../index/zebraidx -c $pp/zebra.cfg -l$LOG init else exit 0 fi ../../index/zebraidx -c $pp/zebra.cfg -l $LOG update $pp/f1.xml idzebra-2.0.44/test/malxml/zebra.cfg0000644000175000017500000000055611412332551014202 00000000000000# Simple Zebra configuration file # # Where the schema files, attribute files, etc are located. profilePath: ${srcdir:-.}/../../tab # Files that describe the attribute sets supported. attset: bib1.att attset: gils.att attset: explain.att recordtype: grs.xml #storekeys: 1 #storedata: 1 #recordId: (bib1,identifier-standard) isam: b modulePath: ../../index/.libs idzebra-2.0.44/test/malxml/Makefile.in0000644000175000017500000003211711412336426014466 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = test/malxml DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ check_SCRIPTS = test1.sh TESTS = test1.sh EXTRA_DIST = zebra.cfg $(check_SCRIPTS) f1.xml all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/malxml/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/malxml/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool clean-local distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/test/codec/0000755000175000017500000000000011412336534012260 500000000000000idzebra-2.0.44/test/codec/Makefile.am0000644000175000017500000000026211412332551014227 00000000000000 check_PROGRAMS = tstcodec TESTS = $(check_PROGRAMS) tstcodec_SOURCES = tstcodec.c AM_CPPFLAGS = -I$(top_srcdir)/include $(YAZINC) LDADD = ../../$(main_zebralib) $(YAZLALIB) idzebra-2.0.44/test/codec/tstcodec.c0000644000175000017500000001137111412332551014152 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include "../../index/index.h" char *prog = ""; int tst_encode(int num) { struct it_key key; int i; void *codec_handle =iscz1_start(); char *dst_buf = malloc(200 + num * 10); char *dst = dst_buf; if (!dst_buf) { printf ("%s: out of memory (num=%d)\n", prog, num); return 10; } for (i = 0; i dst_buf + num*10) { printf ("%s: i=%d size overflow\n", prog, i); return 1; } } iscz1_stop(codec_handle); codec_handle =iscz1_start(); if (1) { const char *src = dst_buf; for (i = 0; i>8); while (src0 != src) { printf (" %02X (%d decimal)", *src0, *src0); src0++; } printf ("\n"); return 3; } if (key.mem[1] != (i&255)) { printf ("%s: i=%d mem[0]=" ZINT_FORMAT " expected %d\n", prog, i, key.mem[1], i&255); while (src0 != src) { printf (" %02X (%d decimal)", *src0, *src0); src0++; } printf ("\n"); return 4; } } } iscz1_stop(codec_handle); free(dst_buf); return 0; } void tstcodec1(void) { char buf[100]; char *dst = buf; const char *src; struct it_key key1; struct it_key key2; void *codec_handle =iscz1_start(); memset(&key1, 0, sizeof(key1)); memset(&key2, 0, sizeof(key2)); key1.len = 4; key1.mem[0] = 4*65536+1016; key1.mem[1] = 24339; key1.mem[2] = 125060; key1.mem[3] = 1; src = (char*) &key1; dst = buf; iscz1_encode(codec_handle, &dst, &src); iscz1_stop(codec_handle); codec_handle =iscz1_start(); dst = (char*) &key2; src = buf; iscz1_decode(codec_handle, &dst, &src); iscz1_stop(codec_handle); if (memcmp(&key1, &key2, sizeof(key1))) { const char *cp1 = (char*) &key1; const char *cp2 = (char*) &key2; int i; for (i = 0; i 1) num = atoi(argv[1]); if (num < 1 || num > 100000000) num = 10000; tstcodec1(); ret = tstcodec2(500); ret = tst_encode(num); exit(ret); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/codec/Makefile.in0000644000175000017500000004277711412336425014265 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = tstcodec$(EXEEXT) subdir = test/codec DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_tstcodec_OBJECTS = tstcodec.$(OBJEXT) tstcodec_OBJECTS = $(am_tstcodec_OBJECTS) tstcodec_LDADD = $(LDADD) am__DEPENDENCIES_1 = tstcodec_DEPENDENCIES = ../../$(main_zebralib) $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(tstcodec_SOURCES) DIST_SOURCES = $(tstcodec_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ TESTS = $(check_PROGRAMS) tstcodec_SOURCES = tstcodec.c AM_CPPFLAGS = -I$(top_srcdir)/include $(YAZINC) LDADD = ../../$(main_zebralib) $(YAZLALIB) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/codec/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/codec/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list tstcodec$(EXEEXT): $(tstcodec_OBJECTS) $(tstcodec_DEPENDENCIES) @rm -f tstcodec$(EXEEXT) $(LINK) $(tstcodec_OBJECTS) $(tstcodec_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstcodec.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/test/marcxml/0000755000175000017500000000000011412336535012647 500000000000000idzebra-2.0.44/test/marcxml/t1.c0000644000175000017500000000424711412332551013260 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "testlib.h" static void tst(int argc, char **argv) { ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); char path[256]; tl_check_filter(zs, "grs.xml"); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_init(zh); YAZ_CHECK(zebra_begin_trans(zh, 1) == ZEBRA_OK); sprintf(path, "%.200s/m1.xml", tl_get_srcdir()); zebra_repository_update(zh, path); sprintf(path, "%.200s/m2.xml", tl_get_srcdir()); zebra_repository_update(zh, path); sprintf(path, "%.200s/m3.xml", tl_get_srcdir()); zebra_repository_update(zh, path); YAZ_CHECK(zebra_end_trans(zh) == ZEBRA_OK); zebra_commit(zh); YAZ_CHECK(tl_query(zh, "@and " "@attr 1=54 eng " "@and @attr 1=1003 jack @attr 1=4 computer", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=leader 00366", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=leader2 nam", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=1003 jack", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=1003 jack", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=1003 collins", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=1003 @attr 3=1 collins", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 3=1 program", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 3=1 to", 0)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/marcxml/m2.xml0000644000175000017500000000225711057500746013637 00000000000000 00366nam 22001698a 4500 11224467 DLC 00000000000000.0 910710c19910701nju 00010 eng 11224467 DLC DLC 123-xyz Jack Collins How to program a computer Penguin 8710 p. cm. idzebra-2.0.44/test/marcxml/m1.xml0000644000175000017500000000225111057500746013630 00000000000000 00366nam 22001698a 4500 11224466 DLC 00000000000000.0 910710c19910701nju 00010 eng 11224466 DLC DLC 123-xyz Jack Collins How to program a computer Penguin 8710 p. cm. idzebra-2.0.44/test/marcxml/Makefile.am0000644000175000017500000000053511412332551014620 00000000000000 check_PROGRAMS = t1 t2 TESTS = $(check_PROGRAMS) EXTRA_DIST = zebra.cfg record.abs m1.xml m2.xml m3.xml sample-marc t1_SOURCES = t1.c t2_SOURCES = t2.c AM_CPPFLAGS = -I$(top_srcdir)/include -I$(srcdir)/../api $(YAZINC) LDADD = ../api/libtestlib.a ../../$(main_zebralib) $(YAZLALIB) clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf idzebra-2.0.44/test/marcxml/m3.xml0000644000175000017500000000644311057500746013641 00000000000000 01369cam 2200265 i 4500 73090924 //r82 DLC 19820524000000.0 760609s1974 nyua b 10110 eng 73090924 //r82 DLC DLC DLC RC71.3 .W67 1971 616.07/575/02854 Workshop on Computer Processing of Dynamic Images from an Anger Scintillation Camera, Washington University, 1971. Computer processing of dynamic images from an Anger scintillation camera : the proceedings of a workshop / cosponsored by the Biomedical Computer Laboratory and the Nuclear Medicine Division, Department of Radiology, School of Medicine, Washington University, St. Louis, January 18-22, 1971 ; edited by Kenneth B. Larson, Jerome R. Cox, Jr. New York : Society of Nuclear Medicine, [c1974] xiv, p. : ill. ; 24 cm. Includes bibliographical references and index. Radioisotope scanning Data processing Congresses. Scintillation cameras Congresses. Imaging systems in medicine Data processing Congresses. Larson, Kenneth B. Cox, Jerome R. Washington University, St. Louis. Biomedical Computer Laboratory. Washington University, St. Louis. Nuclear Medicine Division. idzebra-2.0.44/test/marcxml/t2.c0000644000175000017500000000402311412332551013251 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "testlib.h" static void tst(int argc, char **argv) { ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); char path[256]; YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_init(zh); zebra_set_resource(zh, "recordType", "grs.marcxml.record"); YAZ_CHECK(zebra_begin_trans(zh, 1) == ZEBRA_OK); sprintf(path, "%.200s/sample-marc", tl_get_srcdir()); zebra_repository_update(zh, path); YAZ_CHECK(zebra_end_trans(zh) == ZEBRA_OK); zebra_commit(zh); YAZ_CHECK(tl_query(zh, "@and " "@attr 1=54 eng " "@and @attr 1=1003 jack @attr 1=4 computer", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=leader 00366", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=leader2 nam", 12)); YAZ_CHECK(tl_query(zh, "@attr 1=1003 jack", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=1003 jack", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=1003 collins", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=1003 @attr 3=1 collins", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 3=1 program", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 3=1 to", 0)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/marcxml/sample-marc0000644000175000017500000005623411057500746014727 0000000000000000366nam 22001698a 4500001001300000003000400013005001700017008004100034010001700179040001300075050001200088100001700100245003000117260001200147263000900159300001100168 11224466 DLC00000000000000.0910710c19910701nju 00010 eng  aDLCcDLC00a123-xyz10aJack Collins10aHow to program a computer1 aPenguin a8710 ap. cm. a 11224466 00366nam 22001698a 4500001001300000003000400013005001700017008004100034010001700179040001300075050001200088100001700100245003000117260001200147263000900159300001100168 11224467 DLC00000000000000.0910710c19910701nju 00010 eng  aDLCcDLC00a123-xyz10aJack Collins10aHow to program a computer1 aPenguin a8710 ap. cm. a 11224467 01369cam 2200265 i 4500001001800000003000400018005001700022008004100039010002201081040001800080050002200098082002100120111012100141245034700262260005400609300003000663504005100693650005600744650003900800650006200839700002300901700002000924710007100944710006601015 73090924 //r82DLC19820524000000.0760609s1974 nyua b 10110 eng  aDLCcDLCdDLC00aRC71.3b.W67 197100a616.07/575/0285420aWorkshop on Computer Processing of Dynamic Images from an Anger Scintillation Camera,cWashington University,d1971.10aComputer processing of dynamic images from an Anger scintillation camera :bthe proceedings of a workshop /ccosponsored by the Biomedical Computer Laboratory and the Nuclear Medicine Division, Department of Radiology, School of Medicine, Washington University, St. Louis, January 18-22, 1971 ; edited by Kenneth B. Larson, Jerome R. Cox, Jr.0 aNew York :bSociety of Nuclear Medicine,c[c1974] axiv, p. :bill. ;c24 cm. aIncludes bibliographical references and index. 0aRadioisotope scanningxData processingxCongresses. 0aScintillation camerasxCongresses. 0aImaging systems in medicinexData processingxCongresses.10aLarson, Kenneth B.10aCox, Jerome R. 20aWashington University, St. Louis.bBiomedical Computer Laboratory.20aWashington University, St. Louis.bNuclear Medicine Division. a 73090924 //r8200942cam 22002531a 4500001001900000003000400019005001700023008004100040010002300665040001800081041001400099050001600113082001600129245007300145260007000218300005000288500004800338500009600386630003900482630003900521700003800560700003300598710003400631 73209622 //r823DLC19820325000000.0780306m19009999ohu 00000 grc  aDLCcDLCdDLC0 agrchebeng00aBS421b.C6400a220.4/421904aThe Computer Bible /cJ. Arthur Baird, David Noel Freedman, editors.0 a[Wooster, Ohio] :bBiblical Research Associates,c<1973-c1980 > av. <2-4, 7-10, 13, 15-18, 20-24 > ;c28 cm. aHebrew and Greek; introductions in English. aVols. 2, 8: Missoula, Mont. : Published by Scholars Press for Biblical Research Associates. 0aBible. O.T.xConcordances, Hebrew.00aBible.pN.T.xConcordances, Greek.10aBaird, J. Arthurq(Joseph Arthur)10aFreedman, David Noel,d1922-20aBiblical Research Associates. a 73209622 //r82301033cam 2200253 i 4500001002100000003000400021005001700025008004100042010002500754040001800083043001200101050002200113100001900135245010500154260007300259300003800332490006800370500003500438504002400473650003400497651004600531700003900577810013800616 76357895 /MAP/r82DLC19820806000000.0760407s1974 waua b 00010 eng  aDLCcDLCdDLC an-us-wa00aG1467.P8bM3 197410aMairs, John W.14aThe Puget Sound Region :ba portfolio of thematic computer maps /cJohn W. Mairs, Eugene A. Hoerauf.0 a[Bellingham, Wash.] :bCenter for Pacific Northwest Studies,cc1974. aiii, 41 p. :bill. ;c25 x 36 cm.1 aOccasional paper - Center for Pacific Northwest Studies ; no. 3 aScale of maps ca. 1:1,000,000. aBibliography: p. 4. 0aCartographyxData processing. 0aPuget Sound region (Wash.)xCensusxMaps.10aHoerauf, Eugene A.,ejoint author.1 aWashington (State).bWestern Washington State College, Bellingham.bCenter for Pacific Northwest Studies.tOccasional paper ;vno. 3. a 76357895 /MAP/r8201000pam 2200229 i 4500001001300000003000400013005001700017008004100034010001700753020001500075040001800090050001800108082001500126245030400141260004800445300003300493504005100526650002800577700002900605710004800634710007100682 77000348 DLC19770707000000.0770112s1977 mdua b 10110 eng  a0839108826 aDLCcDLCdDLC00aRC78.7.T6bR400a616.07/57200aReconstruction tomography in diagnostic radiology and nuclear medicine :bproceedings of the workshop ... /cedited by Michel M. Ter-Pogossian ... [et al.] ; co-sponsors, the Edward Mallinckrodt Institute of Radiology and Biomedical Computer Laboratory, Washington University School of Medicine ....0 aBaltimore :bUniversity Park Press,cc1977. axv, 573 p. :bill. ;c24 cm. aIncludes bibliographical references and index. 0aTomographyxCongresses.20aTer-Pogossian, Michel M.20aEdward Mallinckrodt Institute of Radiology.20aWashington University, St. Louis.bBiomedical Computer Laboratory. a 77000348 01493pam 2200277 i 4500001001300000003000400013005001700017008004100034010001701198040001800075043001200093050003400105082002800139086001800167111009500185245044800280260013800728300003400866490003600900650005900936700003100995700002101026700002001047710005001067810008101117 77004773 DLC19770822000000.0770321s1977 dcua 10000 eng  aDLCcDLCdDLC an-us---00aQC100b.U57 no. 500-8aTA165000a602/.1 sa621.381.9/598 aC13.10:500-8.20aWorkshop on Standards for Image Pattern Recognition,cNational Bureau of Standards,d1976.10aComputer science & technology :bproceedings of a workshop held at the National Bureau of Standards, Gaithersburg, MD, June 3-4, 1976 /cWorkshop on Standards for Image Pattern Recognition ; John M. Evans, Jr., Russell Kirsch, and Roger N. Nagel, editor[s] ; sponsored by National Bureau of Standards, Electronic Industries Association, Institute of Electrical and Electronic Engineers, in cooperation with Association for Computing Machinery.0 a[Washington] :bU.S. Dept. of Commerce, National Bureau of Standards : for sale by the Supt. of Docs., U.S. Govt. Print. Off.,c1977. avii, 112 p. :bill. ;c26 cm.1 aNBS special publication ; 500-8 0aOptical pattern recognitionxStandardszUnited States.10aEvans, John Martin,d1942-10aKirsch, Russell.10aNagel, Roger N.10aUnited States.bNational Bureau of Standards.1 aUnited States.bNational Bureau of Standards.tSpecial publication ;v500-8. a 77004773 00878cam 2200229 i 4500001001300000003000400013005001700017008004100034010001700631040001800075050003800093082002200131086001700153100001900170245008700189260013800276300002400414440003400438490003600472650004200508810008100550 77005558 DLC19770713000000.0770401s1977 dcu 00010 eng  aDLCcDLCdDLC00aQC100b.U57 no. 500-9aQA76.9.A2500a602/.1 sa001.6/40 aC13.10:500-910aWood, Helen M.14aThe use of passwords for controlled access to computer resources /cHelen M. Wood.0 a[Washington] :bU.S. Dept. of Commerce, National Bureau of Standards : for sale by the Supt. of Docs., U.S. Govt. Print. Off.,c1977. aiv, 53 p. ;c26 cm. 0aComputer science & technology1 aNBS special publication ; 500-9 0aComputersxAccess controlxPasswords.1 aUnited States.bNational Bureau of Standards.tSpecial publication ;v500-9. a 77005558 00791cam 2200217 4500001001800000003000400018005001700022008004100039010002200551040001800080043003000098050001800128082001800146100002100164245016200185260002300347300002600370500002900396650006400425710006200489 77616367 //r84DLC19841213000000.0720329s1971 dcua 00010 eng  aDLCcDLCdDLC an-us-dcan-us-mdan-us-va00aHE2781.W3bE500a385/.22/0975310aEnglund, Carl R.10aWashington metropolitan area rail computer feasibility study;bfinal reportc[by] Carl R. Englund, Jr. Prepared for Urban Mass Transportation Administration.0 aWashington,c1971. a92 l.billus.c28 cm. a"Contract DOT-UT-10003." 0aRailroadszWashington Metropolitan AreaxCommuting traffic.10aUnited States.bUrban Mass Transportation Administration. a 77616367 //r8400686cam 2200229 4500001001800000003000400018005001700022008004100039010002200434040001800080043001200098050002400110082001900134110007000153245005500223250000900278260002100287300001800308500001700326650004800343650004300391 77637075 //r82DLC19820817000000.0720320s1971 wau s 00000 eng  aDLCcDLCdDLC an-us-wa00aLB1028.5b.W37 197100a378/.052/0979710aWashington (State).bState Board for Community College Education.12aA plan for community college computer development. aRev.1 a[Olympia]c1971. a47 l.c28 cm. aCover title. 0aUniversities and collegesxData processing. 0aCommunity collegeszWashington (State) a 77637075 //r8200668nam 22002171 4500001001300000003000400013005001700017008004100034010001700433040001800075050001800093082001600111100001900127245007600146260004000222300004000262350000900302490003200311504003000343630006000373 70001070 DLC19700427000000.0700302s1968 mouab b 00000 eng  aDLCcDLCdDLC00aBS1275.5b.O200a222/.15/00710aOberst, Bruce.00aDeuteronomy.cThought questions, by Don DeWelt. Summary by Adam Clarke.0 aJoplin, Mo.,bCollege Pressc[1968] aviii, 452 p.billus., maps.c22 cm. a5.950 aBible study textbook series aBibliography: p. 449-452. 0aBible. O.T. DeuteronomyxStudyxOutlines, syllabi, etc. a 70001070 00888pam 2200265 4500001001300000003000400013005001700017008004100034010001700605020001500075040001800090043001200108050002000120082001200140100002900152245009300181260005500274300002800329500008100357504004100438650004500479650002500524651002200549830003400571 72002565 DLC19730409000000.0720418r19721909nyu b 00000 eng  a0836968433 aDLCcDLCdDLC ae-gr---00aBL785b.A3 197200a292/.0810aAdam, James,d1860-1907.14aThe religious teachers of Greece.cEdited with a memoir, by his wife, Adela Marion Adam.0 aFreeport, N.Y.,bBooks for Libraries Pressc[1972] axix, lv, 467 p.c22 cm. aReprint of the 1909 ed., which was issued as the 1904-1906 Gifford lectures. aIncludes bibliographical references. 0aGreek literaturexHistory and criticism. 0aPhilosophy, Ancient. 0aGreecexReligion. 0aGifford lectures,v1904-1906. a 72002565 01126nam 2200265 a 4500001001300000003000400013005001700017008004100034010001700843020003100075040001800106050002100124082001800145100004200163245015800205250003700363260004500400300005000445440003500495630006400530630006400594630006200658630006300720730006000783 80082329 DLC19810528000000.0810526s1980 ctuaf 00010 eng  a0879832355 (pbk.) :c$4.95 aDLCcDLCdDLC00aBS1433b.S5 198000a223/.207721910aSmith, George Adam,cSir,d1856-1942.10aFour psalms :bXXIII, XXXVI, LII, CXXI /cinterpreted for practical use by George Adam Smith ; introduction by F.F. Bruce ; illustrations by Ron McCarty. aShepherd illustrated classic ed.0 aNew Canaan, Conn. :bKeats Pub.,cc1980. a81 p., [5] leaves of plates :bill. ;c21 cm. 2aA Shepherd illustrated classic00aBible.pO.T.pPsalms XXIIIxCriticism, interpretation, etc.00aBible.pO.T.pPsalms XXXVIxCriticism, interpretation, etc.00aBible.pO.T.pPsalms LIIxCriticism, interpretation, etc.00aBible.pO.T.pPsalms CXXIxCriticism, interpretation, etc.01aBible.pO.T.pPsalms XXIII, XXXVI, LII, CXXI.lEnglish. a 80082329 01433nas 2200421 a 4500001000900000003000400009005001700013008004100030010003100071022001400102030001100116032001700127035002000144035002700164040009600191042001300287050002000300070001800320072000900338082001400347210001900361222001900380245002000399260004300419265005800462300001700520310006200537350001100599362003200610500002400642650004600666650003600712650003900748650003500787650003300822780008200855850007400937ACD-3837DLC19940614065614.0920728c19929999ctumn1p 0 a0eng d a 92646062 zsn 92004430 0 a1064-3923 aIERNE8 a008187bUSPS a(OCoLC)2627327500ilcmarc/AQP-6285/JEANNE aNSDPcNSDPdWaUdNICdDNALdOUCAdNSTdDLCdNSTdNSDPdNSTdDLCdInUdMHdNSDPdNdDLCdMiU ansdpalc00aTK5105.5b.R4480 aTK5105.5.R448 0aX20000a384.32200 aInternet world 0aInternet world00aInternet world. aWestport, CT :bMeckler Corp.,cc1992- aMeckler Corp., 11 Ferry Lane West, Westport, CT 06880 av. ;c28 cm. aMonthly (except Jan./Feb., July/Aug., Nov./Dec. combined) a$97.000 aVol. 3, no. 7 (Sept. 1992)- aTitle from caption. 0aInternet (Computer network)xPeriodicals. 0aComputer networksxPeriodicals. 0aInformation networksxPeriodicals. 2aComputer Systemsxperiodicals. 2aOnline Systemsxperiodicals.00tResearch & education networkingx1051-4791w(DLC) 90646613w(OCoLC)21974448 aDLCaDNALaDNGAaInUaMBCoaMH-EdaMdBJaMiUaMoKLaNaNICaTxHRaWaU01330nas 22003735a 4500001000900000003000400009005001700013008004100030010001700071022002500088035002000113035002700133040002900160042001600189043001200205055001200217082001200229130003500241210002700276222002900303245001700332260005400349265006900403300002500472310001200497350002100509362003300530500002400563580005800587780008300645780005100728785008300779787009400862ACD-3799DLC19940614090514.0920723c19919999oncmr4p 0 a0eng d acn 92031641 0 a1187-7081y0025-9535 a(OCoLC)2624484400ilcmarc/AQF-2896/JEANNE aCaOOCMbengcCaOONLdInU anlcaisds/c an-cn--- 2aHD9696*1 a0042120 aInfo Canada (Downsview, Ont.).0 aInfo Can.b(Downsview) 0aInfo Canadab(Downsview)00aInfo Canada. aDownsview, Ont. :bLaurentian Technomedia,c1991- aLaurentian Technomedia, 501 Oakdale Rd., Downsview, Ont. M3N 1W7 av. :bill. ;c40 cm. aMonthly a$50.00 per year.0 aVol. 16, no. 9 (Sept. 1991)- aTitle from caption. aIncludes: Network world Canada, Sept. 1991-Jan. 1992.00tComputer datax0383-7319w(CaOONL)770308317w(OCoLC)11416479w(DLC)cn 7703083105tI.T. magazine (Toronto, Ont.)w(OCoLC)2769906601tNetwork world CanadagFeb. 1992x1187-2985w(OCoLC)25314012w(CaOONL)9203057251 tNetwork world CanadagSept. 1991-Jan. 1992x1187-2985w(OCoLC)25314012w(CaOONL)92030572500803nam 22002898a 4500001000900000003000400009005001700013008004100030010001700071020001500088035002700103040001300130043001200143050002800155082001800183100002500201245009500226250001200321260003400333263000900367300001100376500002000387630003800407600002200445600001500467650003100482ACD-3792DLC19931215084605.7931206s1993 nyu 001 0 eng  a 93047992  a156282754500ilcmarc/ARU-2364/STEVES aDLCcDLC an-us---00aPN1992.77.T63bC37 199300a791.45/722201 aCarter, Bill,d1949-14aThe late shift :bLetterman, Leno, and the network battle for the night /cby Bill Carter. a1st ed. aNew York :bHyperion,cc1993. a9402 ap. cm. aIncludes index.00aTonight show (Television program)10aLetterman, David.10aLeno, Jay. 0aTalk showszUnited States.00766nam 22002658a 4500001000900000005001700009008004100026010001700067020001500084035002900099040001300128050002900141082001600170245007600186250001600262260005600278263000900334300001100343440003200354500002000386650003200406650001900438700002500457700001800482ACD-366519930730092004.1930721s1993 nju 001 0 eng  a 93030775  a013289661300ilcmarc/ARI-3804/JULIANNE aDLCcDLC00aTK5105.875.I57bI56 199300a384.3/422000aInternet :bmailing lists /cedited by Edward T.L. Hardie, Vivian Neou. aUpdated ed. aEnglewood Cliffs, N.J. :bPTR Prentice Hall,c1993. a9308 ap. cm. 0aInternet information series aIncludes index. 0aInternet (Computer network) 0aMailing lists.10aHardie, Edward T. L.10aNeou, Vivian.01324nam 2200289Ia 4500001000900000008004100009005001700050010001300067037002300080043001200103074001900115086002200134049000900156245006200165260014500227300002500372500008000397500022100477500005500698500002100753500002200774610006100796650004300857650004500900700002100945710006800966ACD-2728910514s1984 nyu r f00100 eng d19910519144551.0 o23740002 aED ED 289459bERIC an-us--- a0466-A-03 (MF)0 aED 1.310/2:289459 aDRUG00aTechnology programs that work /cMichael B. Webb, editor.0 aNew York, N.Y. :bTechnology for the NDN Project, Institute for Urban and Minority Education, Teachers College, Columbia University,c[1984] a72, [1] p. ;c28 cm. a"Spons agency Office of Educational Research and Improvement"--Doc. resume. a"This directory was developed by the Technology for the National Diffusion Network Project, Teachers College, Columbia University pursuant to contract number OE-300-83-0253, U.S. Department of Education"--T.p. verso. aDistributed to depository libraries in microfiche. a"December 1984." aIncludes indexes.10aUnited States.bNational Diffusion NetworkxDirectories. 0aEducational technologyzUnited States. 0aFederal aid to educationzUnited States.10aWebb, Michael B.10aUnited States.bOffice of Educational Research and Improvement.01559nam 2200373Ia 4500001000900000008004100009005001700050010001300067037002000080043001200100074001900112086002200131088001600153049000900169100002200178245025900200260010500459300003300564500005500597500001700652504004100669500001800710650004400728650004400772650003700816650005200853650003700905700004400942700002500986710004801011710003001059710006801089740002801157ACD-2476910425s1987 dcua b f00010 eng d19910519144551.0 o23602389 aED 288529bERIC an-us--- a0466-A-03 (MF)0 aED 1.310/2:288529 aLP 87-403 c aDRUG10aSeager, Andrew J.10aCheck this out :blibrary program models /cprepared by Andrew J. Seager, Sarah J. Roberts, Carol Z. Lincoln ; prepared for National Diffusion Network under contract to RMC Corporation, contract 300-84-0251 with the United States Department of Education.0 aWashington, D.C. :bOffice of Educational Research and Improvement, U.S. Dept. of Education,c[1987] aix, 319 p. :bill. ;c28 cm. aDistributed to depository libraries in microfiche. a"July 1987." aIncludes bibliographical references. a"LP 87-403c." 0aLibraries and communityzUnited States. 0aLibraries and educationzUnited States. 0aSchool librarieszUnited States. 0aInstructional materials centerszUnited States. 0aPublic librarieszUnited States.10aRoberts, Sarah J.q(Sarah Jane),d1946-10aLincoln, Carol Zall.10aUnited States.bNational Diffusion Network.20aRMC Research Corporation.10aUnited States.bOffice of Educational Research and Improvement.01aLibrary program models.01155nas 22003135a 4500001000900000008004100009005001700050010002700067040000800094012001200102042000700114050001500121074001100136086002000147049000900167212008300176245006900259260011500328265007100443300001700514310001100531500003200542610003600574650006200610650006400672710002200736710007000758936001300828ACD-2376910225c19uu9999dcuar f0uuu 0eng 19910519144551.0 a 91656060 o23150847 dGPO a2i9103 alc00aIN PROCESS a0785-H0 aLC 1.40/2:F 31/ aDRUG0 aFederal Library and Information Network services directory for fiscal year ...00aFEDLINK services directory for fiscal year ... /cFLICC/FEDLINK.00aWashington, D.C. :bFederal Library and Information Network, Federal Library and Information Center Committee, aFEDLINK, Room LA 1026C, Library of Congress, Washington D.C. 20540 av. ;c28 cm. aAnnual aDescription based on: 1990.20aFEDLINK (Network)xDirectories. 0aLibrary information networkszUnited StatesxDirectories. 0aLibraries, Governmental, administrative, etc.xPeriodicals.20aFEDLINK (Network)20aUnited States.bFederal Library and Information Center Committee. a1991 LIC00915nam 2200229Ka 4500001000900000008004100009005001700050010001300067040001300080037002000093074001900113086002200132049000900154100001800163245015700181260012400338300000900462533009300471500005500564650001400619710005200633ACD-1949910415r19901087dcu b f00010 eng d19910421122541.0 o23469261 aGPOcGPO aED 286992bERIC a0466-A-03 (MF)0 aED 1.310/2:286992 aDRUG10aPaulu, Nancy.10aDealing with dropoutshmicroform :bthe urban superintendents' call to action /cby the OERI Urban Superintendents Network ; Nancy Paulu, writer-editor.0 a[Washington, D.C]. :bOffice of Educational Research and Improvement, Educational Resources Information Center,c[1987] a1 v. aMicrofiche.b[Washington, D.C.?] :cSupt. of Docs., U.S. G.P.O.,d[1990].e1 microfiche. aDistributed to depository libraries in microfiche. 0aDropouts.20aEducational Resources Information Center (U.S.)01053nam 2200217Ka 4500001000900000008004100009005001700050010001300067037002000080074001900100086002200119049000900141245016300150260025100313300000900564533009400573500005500667650002400722650003700746710005200783ACD-1947910415r19901986dcu b f00010 eng d19910421122541.0 o23469098 aED 286333bERIC a0466-A-03 (MF)0 aED 1.310/2:286333 aDRUG00aNational dissemination model for the I'M SPECIAL Program of Physical Education for the Handicapped, 1983-1986hmicroform :bfinal report, I'M SPECIAL network.0 aTampa, Fla. :bDepartment of Physical Education, College of Education, University of South Florida ;a[Washington, D.C.] :bU.S. Dept. of Education, Office of Educational Research and Improvement, Educational Resources Information Center,c[1986] a1 v. aMicrofiche.b[Washington, D.C.?] :cSupt. of Docs., U.S. G.P.O.,d[1990].e2 microfiches. aDistributed to depository libraries in microfiche. 0aPhysical education. 0aHandicapped childrenxEducation.20aEducational Resources Information Center (U.S.)01036nam 2200289Ia 4500001000900000008004100009005001700050010001300067040001300080043001200093074001400105086001800119088001500137049000900152245004500161260010500206300004100311500005500352500003300407500002800440500002600468610004800494650005500542650004400597710006800641740003700709ACD-1938910415s1991 dcu f00000 eng d19910421122541.0 o23468272 aGPOcGPO an-us--- a0461-D-050 aED 1.302:Sh 2 aPIP 91-836 aDRUG00aNDN, sharing success to improve schools.0 a[Washington, DC] :bU.S. Dept. of Education, Office of Educational Research and Improvement,c[1991] a1 folded sheet (6 p.) ;c22 x 10 cm. aAt head of title: National Diffusion Network, NDN. aShipping list no.: 91-198-P. a"January 1991"--P. [5]. a"PIP 91-836"--P. [5].10aUnited States.bNational Diffusion Network. 0aDemonstration centers in educationzUnited States. 0aEducational innovationszUnited States.10aUnited States.bOffice of Educational Research and Improvement.01aNational Diffusion Network, NDN.00725nam0 2200253 45 00100150000000400150001500800230003002100340005304100130008710000180010024100150011824501230013325000240025626000320028030000270031252000310033965200110037001000210038109600110040225100240041326100090043797000130044697000120045900aD00001593700satmrnu000ar19881981bdkldan00a87-11-04010-6chf.dkr. 92,0000adanceng00aAndersonhBob00aStretching00aStrækøvelserdBob Andersonfillustreret af Jean Andersonfdansk udgave ved Lis Engelf[oversættelse ved Jesper Langer]00a1. udgave, 4. oplag00a[Kbh.]bClausen bøgerc198800a192 siderbill.c26 cm00aTidligere: 1. udgave. 198100a79.60100a870970b0567503000z87097000a1. udgave, 4. oplag00c198800b0567503000cDBF8842idzebra-2.0.44/test/marcxml/zebra.cfg0000644000175000017500000000066611412332551014355 00000000000000# Simple Zebra configuration file # # Where the schema files, attribute files, etc are located. profilePath: ${srcdir:-.}:${srcdir:-.}/../../tab # Files that describe the attribute sets supported. attset: bib1.att attset: gils.att attset: explain.att recordtype: grs.xml storekeys: 1 storedata: 1 recordId: (bib1,identifier-standard) isam: b perm.anonymous: rw modulePath: ../../index/.libs #shadow: shadow:1G #register: register:1G idzebra-2.0.44/test/marcxml/Makefile.in0000644000175000017500000004377611412336426014654 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = t1$(EXEEXT) t2$(EXEEXT) subdir = test/marcxml DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_t1_OBJECTS = t1.$(OBJEXT) t1_OBJECTS = $(am_t1_OBJECTS) t1_LDADD = $(LDADD) am__DEPENDENCIES_1 = t1_DEPENDENCIES = ../api/libtestlib.a ../../$(main_zebralib) \ $(am__DEPENDENCIES_1) am_t2_OBJECTS = t2.$(OBJEXT) t2_OBJECTS = $(am_t2_OBJECTS) t2_LDADD = $(LDADD) t2_DEPENDENCIES = ../api/libtestlib.a ../../$(main_zebralib) \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(t1_SOURCES) $(t2_SOURCES) DIST_SOURCES = $(t1_SOURCES) $(t2_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ TESTS = $(check_PROGRAMS) EXTRA_DIST = zebra.cfg record.abs m1.xml m2.xml m3.xml sample-marc t1_SOURCES = t1.c t2_SOURCES = t2.c AM_CPPFLAGS = -I$(top_srcdir)/include -I$(srcdir)/../api $(YAZINC) LDADD = ../api/libtestlib.a ../../$(main_zebralib) $(YAZLALIB) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/marcxml/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/marcxml/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list t1$(EXEEXT): $(t1_OBJECTS) $(t1_DEPENDENCIES) @rm -f t1$(EXEEXT) $(LINK) $(t1_OBJECTS) $(t1_LDADD) $(LIBS) t2$(EXEEXT): $(t2_OBJECTS) $(t2_DEPENDENCIES) @rm -f t2$(EXEEXT) $(LINK) $(t2_OBJECTS) $(t2_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t2.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/test/marcxml/record.abs0000644000175000017500000000515711412332551014536 00000000000000 name marcxml attset bib1.att esetname F @ esetname B @ marc usmarc.mar xpath disable xelm /record/leader leader:w:range(data,0,5),leader2:w:range(data,5,3) melm 001 Identifier-Standard:0 melm 008 Code-Language:w melm 017 Number-legal-deposit,Identifier-standard melm 018 Identifier-standard melm 020$a ISBN:w,Identifier-standard:w melm 020 ISBN,Identifier-standard melm 022$a ISSN:w,ISBN:w melm 022 ISSN,Identifier-standard melm 023 Identifier-standard melm 024 Identifier-standard melm 025 Identifier-standard melm 027 Report-number,Identifier-standard melm 028 Number-music-publisher,Identifier-standard melm 030 CODEN,Identifier-standard melm 033 Date melm 034 Map-scale melm 035 Local-number,Identifier-standard melm 037 Identifier-standard,Stock-number melm 040 Code-institution,Record-source melm 041 ln melm 043 Code-geographic melm 046 pubdate melm 050$b LC-call-number:w, LC-call-number:p, LC-call-number:s melm 050 LC-call-number:w, LC-call-number:p, LC-call-number:s melm 052 Geographic-class melm 060 NLM-call-number melm 070 NAL-call-number melm 080 UDC-classification melm 082 Dewey-classification:w,Dewey-classification:s melm 086 Number-govt-pub melm 100$a author:w,author:s melm 245 title:w melm 650 subject-heading:w,subject-heading:p xelm /record/datafield[@tag="710"]/subfield Server-choice:p:range(data,first(data,'.')) melm 700$9 Cross-Reference melm 700$a Author,Author:p melm 700$n Thematic-number melm 700$r Music-key melm 700$t author,Author-title,Name-and-title,Title,Title-uniform melm 700$t Author-title,Name-and-title,Title,Title-uniform melm 700 Author,Author-name-corporate,Author-name-personal,Name,Editor,Personal-name melm 710 Author,Corporate-name melm 710$t author,Author-title,Name-and-title,Title,Title-uniform melm 710$t Author-title,Name-and-title,Title,Title-uniform melm 710 author,Name melm 710 Author,Name melm 711$a Name-and-title melm 711$t Author-title,Title,Title-uniform melm 711 author,Author-name-corporate,Name,Conference-name melm 711 Author-name-corporate,Name,Conference-name melm 730$n Thematic-number melm 730$r Music-key melm 730 Title,Title-uniform idzebra-2.0.44/test/Makefile.am0000644000175000017500000000017211412332551013152 00000000000000 SUBDIRS=codec api filters xslt xpath malxml config usmarc dmoz \ xelm cddb rusmarc zsh marcxml charmap mbox espec gils idzebra-2.0.44/test/usmarc/0000755000175000017500000000000011412336535012476 500000000000000idzebra-2.0.44/test/usmarc/lock/0000755000175000017500000000000011412336535013426 500000000000000idzebra-2.0.44/test/usmarc/register/0000755000175000017500000000000011412336535014322 500000000000000idzebra-2.0.44/test/usmarc/Makefile.am0000644000175000017500000000033011057500746014450 00000000000000 EXTRA_DIST = zebra.cfg test.sh dist-hook: -mkdir $(distdir)/records cp $(srcdir)/records/*marc* $(distdir)/records mkdir $(distdir)/shadow mkdir $(distdir)/register mkdir $(distdir)/lock mkdir $(distdir)/tmp idzebra-2.0.44/test/usmarc/shadow/0000755000175000017500000000000011412336535013763 500000000000000idzebra-2.0.44/test/usmarc/tmp/0000755000175000017500000000000011412336535013276 500000000000000idzebra-2.0.44/test/usmarc/zebra.cfg0000644000175000017500000000101411412332551014170 00000000000000# Simple Zebra configuration file that defines # a database with USMARC records. # # Where are the config files located? profilePath: ${srcdir:-.}:${srcdir:-.}/../../tab # Files that describe the attribute sets supported. attset: bib1.att attset: explain.att # Specify record type recordType: grs.marc.usmarc # Lock File Area lockDir: lock # Temp File area for result sets setTmpDir: tmp # Temp File area for index program keyTmpDir: tmp # Approx. Memory usage during indexing memMax: 4 modulePath: ../../index/.libs idzebra-2.0.44/test/usmarc/test.sh0000755000175000017500000000036311412332551013730 00000000000000#!/bin/sh test -d tmp || mkdir tmp test -d lock || mkdir lock echo Loading Records if [ -x ../../index/zebraidx ]; then ../../index/zebraidx update records fi echo Starting Server if [ -x ../../index/zebrasrv ]; then ../../index/zebrasrv fi idzebra-2.0.44/test/usmarc/Makefile.in0000644000175000017500000002463211412336426014471 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = test/usmarc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ EXTRA_DIST = zebra.cfg test.sh all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/usmarc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/usmarc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ dist-hook distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am dist-hook: -mkdir $(distdir)/records cp $(srcdir)/records/*marc* $(distdir)/records mkdir $(distdir)/shadow mkdir $(distdir)/register mkdir $(distdir)/lock mkdir $(distdir)/tmp # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/test/usmarc/records/0000755000175000017500000000000011412336535014137 500000000000000idzebra-2.0.44/test/usmarc/records/sample-marc0000644000175000017500000005623111412336535016212 0000000000000000366nam 22001698a 4500001001300000003000400013005001700017008004100034010001700179040001300075050001200088100001700100245003000117260001200147263000900159300001100168 11224466 DLC00000000000000.0910710c19910701nju 00010 eng  aDLCcDLC00a123-xyz10aJack Collins10aHow to program a computer1 aPenguin a8710 ap. cm. a 11224466 00366nam 22001698a 4500001001300000003000400013005001700017008004100034010001700179040001300075050001200088100001700100245003000117260001200147263000900159300001100168 11224467 DLC00000000000000.0910710c19910701nju 00010 eng  aDLCcDLC00a123-xyz10aJack Collins10aHow to program a computer1 aPenguin a8710 ap. cm. a 11224467 01369cam 2200265 i 4500001001800000003000400018005001700022008004100039010002201081040001800080050002200098082002100120111012100141245034700262260005400609300003000663504005100693650005600744650003900800650006200839700002300901700002000924710007100944710006601015 73090924 //r82DLC19820524000000.0760609s1974 nyua b 10110 eng  aDLCcDLCdDLC00aRC71.3b.W67 197100a616.07/575/0285420aWorkshop on Computer Processing of Dynamic Images from an Anger Scintillation Camera,cWashington University,d1971.10aComputer processing of dynamic images from an Anger scintillation camera :bthe proceedings of a workshop /ccosponsored by the Biomedical Computer Laboratory and the Nuclear Medicine Division, Department of Radiology, School of Medicine, Washington University, St. Louis, January 18-22, 1971 ; edited by Kenneth B. Larson, Jerome R. Cox, Jr.0 aNew York :bSociety of Nuclear Medicine,c[c1974] axiv, p. :bill. ;c24 cm. aIncludes bibliographical references and index. 0aRadioisotope scanningxData processingxCongresses. 0aScintillation camerasxCongresses. 0aImaging systems in medicinexData processingxCongresses.10aLarson, Kenneth B.10aCox, Jerome R. 20aWashington University, St. Louis.bBiomedical Computer Laboratory.20aWashington University, St. Louis.bNuclear Medicine Division. a 73090924 //r8200942cam 22002531a 4500001001900000003000400019005001700023008004100040010002300665040001800081041001400099050001600113082001600129245007300145260007000218300005000288500004800338500009600386630003900482630003900521700003800560700003300598710003400631 73209622 //r823DLC19820325000000.0780306m19009999ohu 00000 grc  aDLCcDLCdDLC0 agrchebeng00aBS421b.C6400a220.4/421904aThe Computer Bible /cJ. Arthur Baird, David Noel Freedman, editors.0 a[Wooster, Ohio] :bBiblical Research Associates,c<1973-c1980 > av. <2-4, 7-10, 13, 15-18, 20-24 > ;c28 cm. aHebrew and Greek; introductions in English. aVols. 2, 8: Missoula, Mont. : Published by Scholars Press for Biblical Research Associates. 0aBible. O.T.xConcordances, Hebrew.00aBible.pN.T.xConcordances, Greek.10aBaird, J. Arthurq(Joseph Arthur)10aFreedman, David Noel,d1922-20aBiblical Research Associates. a 73209622 //r82301033cam 2200253 i 4500001002100000003000400021005001700025008004100042010002500754040001800083043001200101050002200113100001900135245010500154260007300259300003800332490006800370500003500438504002400473650003400497651004600531700003900577810013800616 76357895 /MAP/r82DLC19820806000000.0760407s1974 waua b 00010 eng  aDLCcDLCdDLC an-us-wa00aG1467.P8bM3 197410aMairs, John W.14aThe Puget Sound Region :ba portfolio of thematic computer maps /cJohn W. Mairs, Eugene A. Hoerauf.0 a[Bellingham, Wash.] :bCenter for Pacific Northwest Studies,cc1974. aiii, 41 p. :bill. ;c25 x 36 cm.1 aOccasional paper - Center for Pacific Northwest Studies ; no. 3 aScale of maps ca. 1:1,000,000. aBibliography: p. 4. 0aCartographyxData processing. 0aPuget Sound region (Wash.)xCensusxMaps.10aHoerauf, Eugene A.,ejoint author.1 aWashington (State).bWestern Washington State College, Bellingham.bCenter for Pacific Northwest Studies.tOccasional paper ;vno. 3. a 76357895 /MAP/r8201000pam 2200229 i 4500001001300000003000400013005001700017008004100034010001700753020001500075040001800090050001800108082001500126245030400141260004800445300003300493504005100526650002800577700002900605710004800634710007100682 77000348 DLC19770707000000.0770112s1977 mdua b 10110 eng  a0839108826 aDLCcDLCdDLC00aRC78.7.T6bR400a616.07/57200aReconstruction tomography in diagnostic radiology and nuclear medicine :bproceedings of the workshop ... /cedited by Michel M. Ter-Pogossian ... [et al.] ; co-sponsors, the Edward Mallinckrodt Institute of Radiology and Biomedical Computer Laboratory, Washington University School of Medicine ....0 aBaltimore :bUniversity Park Press,cc1977. axv, 573 p. :bill. ;c24 cm. aIncludes bibliographical references and index. 0aTomographyxCongresses.20aTer-Pogossian, Michel M.20aEdward Mallinckrodt Institute of Radiology.20aWashington University, St. Louis.bBiomedical Computer Laboratory. a 77000348 01493pam 2200277 i 4500001001300000003000400013005001700017008004100034010001701198040001800075043001200093050003400105082002800139086001800167111009500185245044800280260013800728300003400866490003600900650005900936700003100995700002101026700002001047710005001067810008101117 77004773 DLC19770822000000.0770321s1977 dcua 10000 eng  aDLCcDLCdDLC an-us---00aQC100b.U57 no. 500-8aTA165000a602/.1 sa621.381.9/598 aC13.10:500-8.20aWorkshop on Standards for Image Pattern Recognition,cNational Bureau of Standards,d1976.10aComputer science & technology :bproceedings of a workshop held at the National Bureau of Standards, Gaithersburg, MD, June 3-4, 1976 /cWorkshop on Standards for Image Pattern Recognition ; John M. Evans, Jr., Russell Kirsch, and Roger N. Nagel, editor[s] ; sponsored by National Bureau of Standards, Electronic Industries Association, Institute of Electrical and Electronic Engineers, in cooperation with Association for Computing Machinery.0 a[Washington] :bU.S. Dept. of Commerce, National Bureau of Standards : for sale by the Supt. of Docs., U.S. Govt. Print. Off.,c1977. avii, 112 p. :bill. ;c26 cm.1 aNBS special publication ; 500-8 0aOptical pattern recognitionxStandardszUnited States.10aEvans, John Martin,d1942-10aKirsch, Russell.10aNagel, Roger N.10aUnited States.bNational Bureau of Standards.1 aUnited States.bNational Bureau of Standards.tSpecial publication ;v500-8. a 77004773 00878cam 2200229 i 4500001001300000003000400013005001700017008004100034010001700631040001800075050003800093082002200131086001700153100001900170245008700189260013800276300002400414440003400438490003600472650004200508810008100550 77005558 DLC19770713000000.0770401s1977 dcu 00010 eng  aDLCcDLCdDLC00aQC100b.U57 no. 500-9aQA76.9.A2500a602/.1 sa001.6/40 aC13.10:500-910aWood, Helen M.14aThe use of passwords for controlled access to computer resources /cHelen M. Wood.0 a[Washington] :bU.S. Dept. of Commerce, National Bureau of Standards : for sale by the Supt. of Docs., U.S. Govt. Print. Off.,c1977. aiv, 53 p. ;c26 cm. 0aComputer science & technology1 aNBS special publication ; 500-9 0aComputersxAccess controlxPasswords.1 aUnited States.bNational Bureau of Standards.tSpecial publication ;v500-9. a 77005558 00791cam 2200217 4500001001800000003000400018005001700022008004100039010002200551040001800080043003000098050001800128082001800146100002100164245016200185260002300347300002600370500002900396650006400425710006200489 77616367 //r84DLC19841213000000.0720329s1971 dcua 00010 eng  aDLCcDLCdDLC an-us-dcan-us-mdan-us-va00aHE2781.W3bE500a385/.22/0975310aEnglund, Carl R.10aWashington metropolitan area rail computer feasibility study;bfinal reportc[by] Carl R. Englund, Jr. Prepared for Urban Mass Transportation Administration.0 aWashington,c1971. a92 l.billus.c28 cm. a"Contract DOT-UT-10003." 0aRailroadszWashington Metropolitan AreaxCommuting traffic.10aUnited States.bUrban Mass Transportation Administration. a 77616367 //r8400686cam 2200229 4500001001800000003000400018005001700022008004100039010002200434040001800080043001200098050002400110082001900134110007000153245005500223250000900278260002100287300001800308500001700326650004800343650004300391 77637075 //r82DLC19820817000000.0720320s1971 wau s 00000 eng  aDLCcDLCdDLC an-us-wa00aLB1028.5b.W37 197100a378/.052/0979710aWashington (State).bState Board for Community College Education.12aA plan for community college computer development. aRev.1 a[Olympia]c1971. a47 l.c28 cm. aCover title. 0aUniversities and collegesxData processing. 0aCommunity collegeszWashington (State) a 77637075 //r8200668nam 22002171 4500001001300000003000400013005001700017008004100034010001700433040001800075050001800093082001600111100001900127245007600146260004000222300004000262350000900302490003200311504003000343630006000373 70001070 DLC19700427000000.0700302s1968 mouab b 00000 eng  aDLCcDLCdDLC00aBS1275.5b.O200a222/.15/00710aOberst, Bruce.00aDeuteronomy.cThought questions, by Don DeWelt. Summary by Adam Clarke.0 aJoplin, Mo.,bCollege Pressc[1968] aviii, 452 p.billus., maps.c22 cm. a5.950 aBible study textbook series aBibliography: p. 449-452. 0aBible. O.T. DeuteronomyxStudyxOutlines, syllabi, etc. a 70001070 00888pam 2200265 4500001001300000003000400013005001700017008004100034010001700605020001500075040001800090043001200108050002000120082001200140100002900152245009300181260005500274300002800329500008100357504004100438650004500479650002500524651002200549830003400571 72002565 DLC19730409000000.0720418r19721909nyu b 00000 eng  a0836968433 aDLCcDLCdDLC ae-gr---00aBL785b.A3 197200a292/.0810aAdam, James,d1860-1907.14aThe religious teachers of Greece.cEdited with a memoir, by his wife, Adela Marion Adam.0 aFreeport, N.Y.,bBooks for Libraries Pressc[1972] axix, lv, 467 p.c22 cm. aReprint of the 1909 ed., which was issued as the 1904-1906 Gifford lectures. aIncludes bibliographical references. 0aGreek literaturexHistory and criticism. 0aPhilosophy, Ancient. 0aGreecexReligion. 0aGifford lectures,v1904-1906. a 72002565 01126nam 2200265 a 4500001001300000003000400013005001700017008004100034010001700843020003100075040001800106050002100124082001800145100004200163245015800205250003700363260004500400300005000445440003500495630006400530630006400594630006200658630006300720730006000783 80082329 DLC19810528000000.0810526s1980 ctuaf 00010 eng  a0879832355 (pbk.) :c$4.95 aDLCcDLCdDLC00aBS1433b.S5 198000a223/.207721910aSmith, George Adam,cSir,d1856-1942.10aFour psalms :bXXIII, XXXVI, LII, CXXI /cinterpreted for practical use by George Adam Smith ; introduction by F.F. Bruce ; illustrations by Ron McCarty. aShepherd illustrated classic ed.0 aNew Canaan, Conn. :bKeats Pub.,cc1980. a81 p., [5] leaves of plates :bill. ;c21 cm. 2aA Shepherd illustrated classic00aBible.pO.T.pPsalms XXIIIxCriticism, interpretation, etc.00aBible.pO.T.pPsalms XXXVIxCriticism, interpretation, etc.00aBible.pO.T.pPsalms LIIxCriticism, interpretation, etc.00aBible.pO.T.pPsalms CXXIxCriticism, interpretation, etc.01aBible.pO.T.pPsalms XXIII, XXXVI, LII, CXXI.lEnglish. a 80082329 01433nas 2200421 a 4500001000900000003000400009005001700013008004100030010003100071022001400102030001100116032001700127035002000144035002700164040009600191042001300287050002000300070001800320072000900338082001400347210001900361222001900380245002000399260004300419265005800462300001700520310006200537350001100599362003200610500002400642650004600666650003600712650003900748650003500787650003300822780008200855850007400937ACD-3837DLC19940614065614.0920728c19929999ctumn1p 0 a0eng d a 92646062 zsn 92004430 0 a1064-3923 aIERNE8 a008187bUSPS a(OCoLC)2627327500ilcmarc/AQP-6285/JEANNE aNSDPcNSDPdWaUdNICdDNALdOUCAdNSTdDLCdNSTdNSDPdNSTdDLCdInUdMHdNSDPdNdDLCdMiU ansdpalc00aTK5105.5b.R4480 aTK5105.5.R448 0aX20000a384.32200 aInternet world 0aInternet world00aInternet world. aWestport, CT :bMeckler Corp.,cc1992- aMeckler Corp., 11 Ferry Lane West, Westport, CT 06880 av. ;c28 cm. aMonthly (except Jan./Feb., July/Aug., Nov./Dec. combined) a$97.000 aVol. 3, no. 7 (Sept. 1992)- aTitle from caption. 0aInternet (Computer network)xPeriodicals. 0aComputer networksxPeriodicals. 0aInformation networksxPeriodicals. 2aComputer Systemsxperiodicals. 2aOnline Systemsxperiodicals.00tResearch & education networkingx1051-4791w(DLC) 90646613w(OCoLC)21974448 aDLCaDNALaDNGAaInUaMBCoaMH-EdaMdBJaMiUaMoKLaNaNICaTxHRaWaU01330nas 22003735a 4500001000900000003000400009005001700013008004100030010001700071022002500088035002000113035002700133040002900160042001600189043001200205055001200217082001200229130003500241210002700276222002900303245001700332260005400349265006900403300002500472310001200497350002100509362003300530500002400563580005800587780008300645780005100728785008300779787009400862ACD-3799DLC19940614090514.0920723c19919999oncmr4p 0 a0eng d acn 92031641 0 a1187-7081y0025-9535 a(OCoLC)2624484400ilcmarc/AQF-2896/JEANNE aCaOOCMbengcCaOONLdInU anlcaisds/c an-cn--- 2aHD9696*1 a0042120 aInfo Canada (Downsview, Ont.).0 aInfo Can.b(Downsview) 0aInfo Canadab(Downsview)00aInfo Canada. aDownsview, Ont. :bLaurentian Technomedia,c1991- aLaurentian Technomedia, 501 Oakdale Rd., Downsview, Ont. M3N 1W7 av. :bill. ;c40 cm. aMonthly a$50.00 per year.0 aVol. 16, no. 9 (Sept. 1991)- aTitle from caption. aIncludes: Network world Canada, Sept. 1991-Jan. 1992.00tComputer datax0383-7319w(CaOONL)770308317w(OCoLC)11416479w(DLC)cn 7703083105tI.T. magazine (Toronto, Ont.)w(OCoLC)2769906601tNetwork world CanadagFeb. 1992x1187-2985w(OCoLC)25314012w(CaOONL)9203057251 tNetwork world CanadagSept. 1991-Jan. 1992x1187-2985w(OCoLC)25314012w(CaOONL)92030572500803nam 22002898a 4500001000900000003000400009005001700013008004100030010001700071020001500088035002700103040001300130043001200143050002800155082001800183100002500201245009500226250001200321260003400333263000900367300001100376500002000387630003800407600002200445600001500467650003100482ACD-3792DLC19931215084605.7931206s1993 nyu 001 0 eng  a 93047992  a156282754500ilcmarc/ARU-2364/STEVES aDLCcDLC an-us---00aPN1992.77.T63bC37 199300a791.45/722201 aCarter, Bill,d1949-14aThe late shift :bLetterman, Leno, and the network battle for the night /cby Bill Carter. a1st ed. aNew York :bHyperion,cc1993. a9402 ap. cm. aIncludes index.00aTonight show (Television program)10aLetterman, David.10aLeno, Jay. 0aTalk showszUnited States.00766nam 22002658a 4500001000900000005001700009008004100026010001700067020001500084035002900099040001300128050002900141082001600170245007600186250001600262260005600278263000900334300001100343440003200354500002000386650003200406650001900438700002500457700001800482ACD-366519930730092004.1930721s1993 nju 001 0 eng  a 93030775  a013289661300ilcmarc/ARI-3804/JULIANNE aDLCcDLC00aTK5105.875.I57bI56 199300a384.3/422000aInternet :bmailing lists /cedited by Edward T.L. Hardie, Vivian Neou. aUpdated ed. aEnglewood Cliffs, N.J. :bPTR Prentice Hall,c1993. a9308 ap. cm. 0aInternet information series aIncludes index. 0aInternet (Computer network) 0aMailing lists.10aHardie, Edward T. L.10aNeou, Vivian.01324nam 2200289Ia 4500001000900000008004100009005001700050010001300067037002300080043001200103074001900115086002200134049000900156245006200165260014500227300002500372500008000397500022100477500005500698500002100753500002200774610006100796650004300857650004500900700002100945710006800966ACD-2728910514s1984 nyu r f00100 eng d19910519144551.0 o23740002 aED ED 289459bERIC an-us--- a0466-A-03 (MF)0 aED 1.310/2:289459 aDRUG00aTechnology programs that work /cMichael B. Webb, editor.0 aNew York, N.Y. :bTechnology for the NDN Project, Institute for Urban and Minority Education, Teachers College, Columbia University,c[1984] a72, [1] p. ;c28 cm. a"Spons agency Office of Educational Research and Improvement"--Doc. resume. a"This directory was developed by the Technology for the National Diffusion Network Project, Teachers College, Columbia University pursuant to contract number OE-300-83-0253, U.S. Department of Education"--T.p. verso. aDistributed to depository libraries in microfiche. a"December 1984." aIncludes indexes.10aUnited States.bNational Diffusion NetworkxDirectories. 0aEducational technologyzUnited States. 0aFederal aid to educationzUnited States.10aWebb, Michael B.10aUnited States.bOffice of Educational Research and Improvement.01559nam 2200373Ia 4500001000900000008004100009005001700050010001300067037002000080043001200100074001900112086002200131088001600153049000900169100002200178245025900200260010500459300003300564500005500597500001700652504004100669500001800710650004400728650004400772650003700816650005200853650003700905700004400942700002500986710004801011710003001059710006801089740002801157ACD-2476910425s1987 dcua b f00010 eng d19910519144551.0 o23602389 aED 288529bERIC an-us--- a0466-A-03 (MF)0 aED 1.310/2:288529 aLP 87-403 c aDRUG10aSeager, Andrew J.10aCheck this out :blibrary program models /cprepared by Andrew J. Seager, Sarah J. Roberts, Carol Z. Lincoln ; prepared for National Diffusion Network under contract to RMC Corporation, contract 300-84-0251 with the United States Department of Education.0 aWashington, D.C. :bOffice of Educational Research and Improvement, U.S. Dept. of Education,c[1987] aix, 319 p. :bill. ;c28 cm. aDistributed to depository libraries in microfiche. a"July 1987." aIncludes bibliographical references. a"LP 87-403c." 0aLibraries and communityzUnited States. 0aLibraries and educationzUnited States. 0aSchool librarieszUnited States. 0aInstructional materials centerszUnited States. 0aPublic librarieszUnited States.10aRoberts, Sarah J.q(Sarah Jane),d1946-10aLincoln, Carol Zall.10aUnited States.bNational Diffusion Network.20aRMC Research Corporation.10aUnited States.bOffice of Educational Research and Improvement.01aLibrary program models.01155nas 22003135a 4500001000900000008004100009005001700050010002700067040000800094012001200102042000700114050001500121074001100136086002000147049000900167212008300176245006900259260011500328265007100443300001700514310001100531500003200542610003600574650006200610650006400672710002200736710007000758936001300828ACD-2376910225c19uu9999dcuar f0uuu 0eng 19910519144551.0 a 91656060 o23150847 dGPO a2i9103 alc00aIN PROCESS a0785-H0 aLC 1.40/2:F 31/ aDRUG0 aFederal Library and Information Network services directory for fiscal year ...00aFEDLINK services directory for fiscal year ... /cFLICC/FEDLINK.00aWashington, D.C. :bFederal Library and Information Network, Federal Library and Information Center Committee, aFEDLINK, Room LA 1026C, Library of Congress, Washington D.C. 20540 av. ;c28 cm. aAnnual aDescription based on: 1990.20aFEDLINK (Network)xDirectories. 0aLibrary information networkszUnited StatesxDirectories. 0aLibraries, Governmental, administrative, etc.xPeriodicals.20aFEDLINK (Network)20aUnited States.bFederal Library and Information Center Committee. a1991 LIC00915nam 2200229Ka 4500001000900000008004100009005001700050010001300067040001300080037002000093074001900113086002200132049000900154100001800163245015700181260012400338300000900462533009300471500005500564650001400619710005200633ACD-1949910415r19901087dcu b f00010 eng d19910421122541.0 o23469261 aGPOcGPO aED 286992bERIC a0466-A-03 (MF)0 aED 1.310/2:286992 aDRUG10aPaulu, Nancy.10aDealing with dropoutshmicroform :bthe urban superintendents' call to action /cby the OERI Urban Superintendents Network ; Nancy Paulu, writer-editor.0 a[Washington, D.C]. :bOffice of Educational Research and Improvement, Educational Resources Information Center,c[1987] a1 v. aMicrofiche.b[Washington, D.C.?] :cSupt. of Docs., U.S. G.P.O.,d[1990].e1 microfiche. aDistributed to depository libraries in microfiche. 0aDropouts.20aEducational Resources Information Center (U.S.)01053nam 2200217Ka 4500001000900000008004100009005001700050010001300067037002000080074001900100086002200119049000900141245016300150260025100313300000900564533009400573500005500667650002400722650003700746710005200783ACD-1947910415r19901986dcu b f00010 eng d19910421122541.0 o23469098 aED 286333bERIC a0466-A-03 (MF)0 aED 1.310/2:286333 aDRUG00aNational dissemination model for the I'M SPECIAL Program of Physical Education for the Handicapped, 1983-1986hmicroform :bfinal report, I'M SPECIAL network.0 aTampa, Fla. :bDepartment of Physical Education, College of Education, University of South Florida ;a[Washington, D.C.] :bU.S. Dept. of Education, Office of Educational Research and Improvement, Educational Resources Information Center,c[1986] a1 v. aMicrofiche.b[Washington, D.C.?] :cSupt. of Docs., U.S. G.P.O.,d[1990].e2 microfiches. aDistributed to depository libraries in microfiche. 0aPhysical education. 0aHandicapped childrenxEducation.20aEducational Resources Information Center (U.S.)01036nam 2200289Ia 4500001000900000008004100009005001700050010001300067040001300080043001200093074001400105086001800119088001500137049000900152245004500161260010500206300004100311500005500352500003300407500002800440500002600468610004800494650005500542650004400597710006800641740003700709ACD-1938910415s1991 dcu f00000 eng d19910421122541.0 o23468272 aGPOcGPO an-us--- a0461-D-050 aED 1.302:Sh 2 aPIP 91-836 aDRUG00aNDN, sharing success to improve schools.0 a[Washington, DC] :bU.S. Dept. of Education, Office of Educational Research and Improvement,c[1991] a1 folded sheet (6 p.) ;c22 x 10 cm. aAt head of title: National Diffusion Network, NDN. aShipping list no.: 91-198-P. a"January 1991"--P. [5]. a"PIP 91-836"--P. [5].10aUnited States.bNational Diffusion Network. 0aDemonstration centers in educationzUnited States. 0aEducational innovationszUnited States.10aUnited States.bOffice of Educational Research and Improvement.01aNational Diffusion Network, NDN.00725nam0 2200253 45 00100150000000400150001500800230003002100340005304100130008710000180010024100150011824501230013325000240025626000320028030000270031252000310033965200110037001000210038109600110040225100240041326100090043797000130044697000120045900aD00001593700satmrnu000ar19881981bdkldan00a87-11-04010-6chf.dkr. 92,0000adanceng00aAndersonhBob00aStretching00aStrækøvelserdBob Andersonfillustreret af Jean Andersonfdansk udgave ved Lis Engelf[oversættelse ved Jesper Langer]00a1. udgave, 4. oplag00a[Kbh.]bClausen bøgerc198800a192 siderbill.c26 cm00aTidligere: 1. udgave. 198100a79.60100a870970b0567503000z87097000a1. udgave, 4. oplag00c198800b0567503000cDBF8842idzebra-2.0.44/test/rusmarc/0000755000175000017500000000000011412336535012660 500000000000000idzebra-2.0.44/test/rusmarc/t1.c0000644000175000017500000000334211412332551013264 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include "../api/testlib.h" void check_koi8r(void) { yaz_iconv_t cd = yaz_iconv_open("koi8-r", "utf-8"); if (!cd) { yaz_log(YLOG_WARN, "koi8-r to utf-8 unsupported"); exit(0); } yaz_iconv_close(cd); } static void tst(int argc, char **argv) { ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); char path[256]; check_koi8r(); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_init(zh); YAZ_CHECK(zebra_begin_trans(zh, 1) == ZEBRA_OK); sprintf(path, "%.200s/records/simple-rusmarc", tl_get_srcdir()); zebra_repository_update(zh, path); YAZ_CHECK(zebra_end_trans(zh) == ZEBRA_OK); zebra_commit(zh); YAZ_CHECK(tl_query(zh, "@attr 1=21 \xfa\xc1\xcd\xd1\xd4\xc9\xce", 1)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/rusmarc/tab/0000755000175000017500000000000011412336535013426 500000000000000idzebra-2.0.44/test/rusmarc/tab/string.chr0000644000175000017500000000130111412336535015345 00000000000000# Russian character map. # # Define the basic value-set. *Beware* of changing this without re-indexing # your databases. # Character set this file encoding koi8-r lowercase {0-9}{a-z}ÁÂ×ÇÄÅ£ÖÚÉÊËÌÍÎÏÐÒÓÔÕÆÈÃÞÛÝßÙØÜÀÑ uppercase {0-9}{A-Z}áâ÷çäå³öúéêëìíîïðòóôõæèãþûýÿùøüàñ # Breaking characters space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~ # Characters to be considered equivalent for searching purposes. # equivalent ÔÄ(ae) # equivalent ÜÆ(oe) # equivalent Å(aa) # equivalent uÝ # Supplemental mappings #map (æ) Ô #map (ø) Ü #map (å) Å #map (&Aelig;) ô #map (Ø) ü #map (Å) å #map Èè e #map À a #map Ñ o #map Ì i #map (Aa) (AA) idzebra-2.0.44/test/rusmarc/tab/rusmarc.tag0000644000175000017500000000022511412336535015516 00000000000000# Pseudo-tagset for USMARC # name rusmarc type 4 include tagsetm.tag #tag 1 a string #tag 2 b string tag 200 200 string tag 700 700 string idzebra-2.0.44/test/rusmarc/tab/rusmarc.mar0000644000175000017500000000003711412336535015523 00000000000000name rusmarc reference RUSmarc idzebra-2.0.44/test/rusmarc/tab/rusmarc-b.est0000644000175000017500000000045311412336535015760 00000000000000simpleelement (3,'200) simpleelement (3,'210) simpleelement (3,'700) simpleelement (3,'701) simpleelement (3,'702) simpleelement (3,'710) simpleelement (3,'711) simpleelement (3,'712) simpleelement (3,'720) simpleelement (3,'721) simpleelement (3,'722) simpleelement (3,'463) simpleelement (3,'999) idzebra-2.0.44/test/rusmarc/tab/rusmarc.abs0000644000175000017500000001602711412336535015517 00000000000000# name rusmarc reference RUSmarc attset bib1.att tagset rusmarc.tag marc rusmarc.mar esetname B rusmarc-b.est esetname F @ encoding koi8-r elm mc-70._1_$a,_$g_(_$c_) Author !:w,!:p elm mc-70._1_$a,_$b_(_$c_) Author !:w,!:p elm mc-70._0_$a__$d_(_$c_) Author !:w,!:p elm mc-4.._._$1<001>_ Author !:w,!:p elm mc-4.._._$1<70._1_$a,_$g_(_$c_)>_ Author !:w,!:p elm mc-4.._._$1<70._1_$a,_$b_(_$c_)>_ Author !:w,!:p elm mc-4.._._$1<70._0_$a__$d_(_$c_)>_ Author !:w,!:p elm mc-71.00_$a,_$g,_$h_(_$c_){.$b_(_$c_)} Author !:w,!:p elm mc-71.01_$a_(_$c_){.$b_(_$c_)(_$d;_$f;_$e_)} Author !:w,!:p elm mc-71.02_$a_(_$c_){.$b_(_$c_)(_$d;_$f;_$e_)} Author !:w,!:p elm mc-4.._._$1<71.00_$a,_$g,_$h_(_$c_){.$b_(_$c_)}>_ Author !:w,!:p elm mc-4.._._$1<71.01_$a_(_$c_){.$b_(_$c_)(_$d;_$f;_$e_)}>_ Author !:w,!:p elm mc-4.._._$1<71.02_$a_(_$c_){.$b_(_$c_)(_$d;_$f;_$e_)}>_ Author !:w,!:p elm mc-71.10_$a,_$g,_$h_(_$c_)(_$d;_$f;_$e_){.$b_(_$c_)(_$d;_$f;_$e_)} Author !:w,!:p elm mc-71.11_$a_(_$c_)(_$d;_$f;_$e_){.$b_(_$c_)(_$d;_$f;_$e_)} Author !:w,!:p elm mc-71.12_$a_(_$d;_$f;_$e_){.$b_(_$c_)(_$d;_$f;_$e_)} Author !:w,!:p elm mc-4.._._$1<71.10_$a,_$g,_$h_(_$c_)(_$d;_$f;_$e_){.$b_(_$c_)(_$d;_$f;_$e_)}>_ Author !:w,!:p elm mc-4.._._$1<71.11_$a_(_$c_)(_$d;_$f;_$e_){.$b_(_$c_)(_$d;_$f;_$e_)}>_ Author !:w,!:p elm mc-4.._._$1<71.12_$a_(_$d;_$f;_$e_){.$b_(_$c_)(_$d;_$f;_$e_)}>_ Author !:w,!:p elm mc-2001__$a_{.$h,_$i_} Title !:w,!:p elm mc-2001__$i_ Title !:w,!:p elm mc-2250__$a_{.$h,_$i_} Title !:w,!:p elm mc-2251__$a_{.$h,_$i_} Title !:w,!:p elm mc-2251__$i_ Title !:w,!:p elm mc-2252__$i_ Title !:w,!:p elm mc-5001._$a_{.$h,_$i_} Title !:w,!:p elm mc-5001._$i_ Title !:w,!:p elm mc-501.__$a_ Title !:w,!:p elm mc-5031__$a_ Title !:w,!:p elm mc-5101__$a_{.$h,_$i_} Title !:w,!:p elm mc-5101__$i_ Title !:w,!:p elm mc-5121__$a_ Title !:w,!:p elm mc-5131__$a_{.$h,_$i_} Title !:w,!:p elm mc-5131__$i_ Title !:w,!:p elm mc-5141__$a_ Title !:w,!:p elm mc-5151__$a_ Title !:w,!:p elm mc-5161__$a_ Title !:w,!:p elm mc-5171__$a_ Title !:w,!:p elm mc-5181__$a_ Title !:w,!:p elm mc-5201__$a_{.$h,_$i_} Title !:w,!:p elm mc-5201__$i_ Title !:w,!:p elm mc-5301__$a_ Title !:w,!:p elm mc-531___$a_ Title !:w,!:p elm mc-5321._$a_ Title !:w,!:p elm mc-5401__$a_ Title !:w,!:p elm mc-5411__$a_{.$h,_$i_} Title !:w,!:p elm mc-5411__$i_ Title !:w,!:p elm mc-5451__$a_ Title !:w,!:p elm mc-4.._._$1<2001__$a_{.$h,_$i_}>_ Title !:w,!:p elm mc-4.._._$1<2001__$i_>_ Title !:w,!:p elm mc-4.._._$1<2250__$a_{.$h,_$i_}>_ Title !:w,!:p elm mc-4.._._$1<2250__$i_>_ Title !:w,!:p elm mc-4.._._$1<2251__$a_{.$h,_$i_}>_ Title !:w,!:p elm mc-4.._._$1<2251__$i_>_ Title !:w,!:p elm mc-4.._._$1<2252__$i_>_ Title !:w,!:p elm mc-4.._._$1<5001._$a_{.$h,_$i_}>_ Title !:w,!:p elm mc-4.._._$1<5001._$i_>_ Title !:w,!:p elm mc-4.._._$1<501.__$a_>_ Title !:w,!:p elm mc-4.._._$1<5031__$a_>_ Title !:w,!:p elm mc-4.._._$1<5101__$a_{.$h,_$i_}>_ Title !:w,!:p elm mc-4.._._$1<5101__$i_>_ Title !:w,!:p elm mc-4.._._$1<5121__$a_>_ Title !:w,!:p elm mc-4.._._$1<5131__$a_{.$h,_$i_}>_ Title !:w,!:p elm mc-4.._._$1<5131__$i_>_ Title !:w,!:p elm mc-4.._._$1<5141__$a_>_ Title !:w,!:p elm mc-4.._._$1<5151__$a_>_ Title !:w,!:p elm mc-4.._._$1<5161__$a_>_ Title !:w,!:p elm mc-4.._._$1<5171__$a_>_ Title !:w,!:p elm mc-4.._._$1<5181__$a_>_ Title !:w,!:p elm mc-4.._._$1<5201__$a_{.$h,_$i_}>_ Title !:w,!:p elm mc-4.._._$1<5201__$i_>_ Title !:w,!:p elm mc-4.._._$1<5301__$a_>_ Title !:w,!:p elm mc-4.._._$1<531___$a_>_ Title !:w,!:p elm mc-4.._._$1<5321._$a_>_ Title !:w,!:p elm mc-4.._._$1<5401__$a_>_ Title !:w,!:p elm mc-4.._._$1<5411__$a_{.$h,_$i_}>_ Title !:w,!:p elm mc-4.._._$1<5411__$i_>_ Title !:w,!:p elm mc-4.._._$1<5451__$a_>_ Title !:w,!:p elm mc-600_._$a_ Subject-heading !:w,!:p elm mc-601.._$a_ Subject-heading !:w,!:p elm mc-602___$a_ Subject-heading !:w,!:p elm mc-604___$a_ Subject-heading !:w,!:p elm mc-605___$a_ Subject-heading !:w,!:p elm mc-606.__$a_ Subject-heading !:w,!:p elm mc-607___$a_ Subject-heading !:w,!:p elm mc-608___$a_ Subject-heading !:w,!:p elm mc-610.__$a_ Subject-heading !:w,!:p elm mc-010___$a_ ISBN !:w,!:p elm mc-421_._$1<010___$a_>_ ISBN !:w,!:p elm mc-422_._$1<010___$a_>_ ISBN !:w,!:p elm mc-45._._$1<010___$a_>_ ISBN !:w,!:p elm mc-463_._$1<010___$a_>_ ISBN !:w,!:p elm mc-470_._$1<010___$a_>_ ISBN !:w,!:p elm mc-48._._$1<010___$a_>_ ISBN !:w,!:p elm mc-011___$a_ ISSN !:p elm mc-225.__$x_ ISSN !:p elm mc-461_._$1<011___$a_>_ ISSN !:p elm mc-462_._$1<011___$a_>_ ISSN !:p elm mc-010___$a Identifier-standard !:p elm mc-011___$a Identifier-standard !:p elm mc-014___$a Identifier-standard !:p elm mc-020___$b Identifier-standard !:p elm mc-021___$b Identifier-standard !:p elm mc-022___$b Identifier-standard !:p elm mc-001 Local-number ! elm mc-100___$a[09-12]_ Date-of-publication ! elm mc-100___$a[13-16]_ Date-of-publication ! elm mc-210___$d_ Date-of-publication ! elm mc-102___$a_ Place-publication !:w elm mc-102___$b_ Place-publication !:w elm mc-210___$a_ Place-publication !:w elm mc-620___$a_ Place-publication !:w elm mc-620___$b_ Place-publication !:w elm mc-620___$c_ Place-publication !:w elm mc-620___$d_ Place-publication !:w elm mc-210___$c_ Publisher !:w elm mc-100___$a[00-07]_ Date/time-added-to-db ! elm mc-801_0_$c_ Date/time-added-to-db ! elm mc-101.__$a_ Code-language !:w elm mc-ldr[07] Bib-level ! elm mc-ldr[06] Record-type ! elm mc-105___$a[4]_ Content-type ! elm mc-105___$a[5]_ Content-type ! elm mc-105___$a[6]_ Content-type ! elm mc-105___$a[7]_ Content-type ! elm mc-110___$a[3]_ Content-type ! elm mc-110___$a[4]_ Content-type ! elm mc-110___$a[5]_ Content-type ! elm mc-110___$a[6]_ Content-type ! elm mc-801_.$b_ Record-source !:w idzebra-2.0.44/test/rusmarc/tab/rusmarc.flt0000644000175000017500000000065011412336535015532 00000000000000# # Rather dummy input-filter for MARC # BEGIN { begin record usmarc } /^00./ / / BODY /\n/ { begin element $0 data -element @ $2 end element } /^.../ / / /../ { begin element $0 } /[$*]/ /./ / / BODY / *[$*\n]/ { data -element $1 $3; unread 4 } /\n/ { end element } /./ { } idzebra-2.0.44/test/rusmarc/tab/scan.chr0000644000175000017500000000152111412336535014767 00000000000000# Danish/Swedish character map. # # Define the basic value-set. *Beware* of changing this without re-indexing # your databases. # Character set this file encoding koi8-r lowercase {0-9}{a-z}ÁÂ×ÇÄÅ£ÖÚÉÊËÌÍÎÏÐÒÓÔÕÆÈÃÞÛÝßÙØÜÀÑ uppercase {0-9}{A-Z}áâ÷çäå³öúéêëìíîïðòóôõæèãþûýÿùøüàñ # Breaking characters space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~ # Characters to be considered equivalent for searching purposes. # equivalent æä(ae) # equivalent øö(oe) # equivalent å(aa) # equivalent uü # Supplemental mappings #map (ä) ä #map (æ) æ #map (ø) ø #map (å) å #map (ö) ö #map (Ä) Ä #map (&Aelig;) Æ #map (Ø) Ø #map (Å) Å #map (Ö) Ö #map éÉ e #map á a #map ó o #map í i #map (Aa) (AA) #map (aa) a #qmap (ies) (ie) idzebra-2.0.44/test/rusmarc/Makefile.am0000644000175000017500000000066111412332551014631 00000000000000 check_PROGRAMS = t1 TESTS = $(check_PROGRAMS) EXTRA_DIST = zebra.cfg test.sh dist-hook: mkdir -p $(distdir)/records mkdir -p $(distdir)/tab -cp $(srcdir)/records/simple-rusmarc $(distdir)/records -cp $(srcdir)/tab/* $(distdir)/tab t1_SOURCES = t1.c AM_CPPFLAGS = -I$(top_srcdir)/include $(YAZINC) LDADD = ../api/libtestlib.a ../../$(main_zebralib) $(YAZLALIB) clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf idzebra-2.0.44/test/rusmarc/zebra.cfg0000644000175000017500000000062311412332551014357 00000000000000# Simple Zebra configuration file that defines # Database with RUSMARC records. # # Where are the config files located? profilePath: ${srcdir:-.}/tab:${srcdir:-.}/../../tab # Files that describe the attribute sets supported. attset: bib1.att attset: explain.att # Specify record type recordType: grs.marc.rusmarc # Default encoding encoding: koi8-r # Set up modulePath modulePath: ../../index/.libs idzebra-2.0.44/test/rusmarc/test.sh0000755000175000017500000000031711412332551014111 00000000000000#!/bin/sh echo Loading Records if [ -x ../../index/zebraidx ]; then ../../index/zebraidx update records/simple-rusmarc fi echo Starting Server if [ -x ../../index/zebrasrv ]; then ../../index/zebrasrv fi idzebra-2.0.44/test/rusmarc/Makefile.in0000644000175000017500000004350111412336426014647 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = t1$(EXEEXT) subdir = test/rusmarc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_t1_OBJECTS = t1.$(OBJEXT) t1_OBJECTS = $(am_t1_OBJECTS) t1_LDADD = $(LDADD) am__DEPENDENCIES_1 = t1_DEPENDENCIES = ../api/libtestlib.a ../../$(main_zebralib) \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(t1_SOURCES) DIST_SOURCES = $(t1_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ TESTS = $(check_PROGRAMS) EXTRA_DIST = zebra.cfg test.sh t1_SOURCES = t1.c AM_CPPFLAGS = -I$(top_srcdir)/include $(YAZINC) LDADD = ../api/libtestlib.a ../../$(main_zebralib) $(YAZLALIB) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/rusmarc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/rusmarc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list t1$(EXEEXT): $(t1_OBJECTS) $(t1_DEPENDENCIES) @rm -f t1$(EXEEXT) $(LINK) $(t1_OBJECTS) $(t1_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t1.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ ctags dist-hook distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am dist-hook: mkdir -p $(distdir)/records mkdir -p $(distdir)/tab -cp $(srcdir)/records/simple-rusmarc $(distdir)/records -cp $(srcdir)/tab/* $(distdir)/tab clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/test/rusmarc/records/0000755000175000017500000000000011412336535014321 500000000000000idzebra-2.0.44/test/rusmarc/records/simple-rusmarc0000644000175000017500000016513311412336535017140 0000000000000001591nam0 2200361 i 450 001001700000005001700017021002300034100004100057101000800098102000700106105001800113200003800131210002500169215001500194010002400209010002700233010003400260600009900294600010100393686003600494686003700530686003100567686003200598700007200630801002800702899002000730225004800750320002700798327009700825423022700922461005501149830002501204RU\NLR\bibl\198019990708171252.0 aRU91455b97-34452 a19980708d1997 u||y0rusy0102 ca0 arus aRU ay z 00|ay1 aõÅÚÄÎÏÅaíÙe[òÏÍÁÎÙ]få. úÁÍÑÔÉÎ aí.cáóôcïÌÉÍÐd1997 a607 Ó.d20 a5-7390-0346-6bÏÂÝ. a5-7390-0315-6b"ïÌÉÍÐ" a5-88196-625-2bôëï áóô911000 1aúÁÍÑÔÉÎbå. é.gå×ÇÅÎÉÊ é×ÁÎÏ×ÉÞf1884 - 1937xéÚÕÞÅÎÉÅ × ÛËÏÌÅ2nlr-sh3RU\NLR\auth\661249827 1aðÌÁÔÏÎÏ×bá. ð.gáÎÄÒÅÊ ðÌÁÔÏÎÏ×ÉÞf1899 - 1951xéÚÕÞÅÎÉÅ × ÛËÏÌÅ2nlr-sh3RU\NLR\auth\661249828 aþ426.21,6(2)317.8úÁÍÑÔÉÎ2rubbk aþ426.21,6(2)317.8ðÌÁÔÏÎÏ×2rubbk aû9(2)62=ò7-4úÁÍÑÔÉÎ2rubbk aû9(2)62=ò7-4ðÌÁÔÏÎÏ×2rubbk 1aúÁÍÑÔÉÎbå. é.f1884-1937gå×ÇÅÎÉÊ é×ÁÎÏ×ÉÞ3RU\NLR\auth\775714070 0aRUbNLRc19980619gPSBO aNLRj97-3/113071 aûË. ËÌÁÓÓÉËÉeûëeëÎ. ÄÌÑ ÕÞÅÎÉËÁ É ÕÞÉÔÅÌÑ aâÉÂÌÉÏÇÒ. : Ó. 605-6061 a÷ ËÎ. ÔÁËÖÅ : ëÒÉÔÉËÁ É ËÏÍÍÅÎÔ. ôÅÍÙ É ÒÁÚ×ÅÒÎÕÔÙÅ ÐÌÁÎÙ ÓÏÞ. íÁÔÅÒÉÁÌÙ ÄÌÑ ÐÏÄÇÏÔ. Ë ÕÒÏËÕ 012001 aëÏÔÌÏ×ÁÎaà×ÅÎÉÌØÎÏÅ ÍÏÒÅe[òÏÍÁÎÙ]fá. ðÌÁÔÏÎÏ×g[ë ÓÂ. × ÃÅÌÏÍ: ÐÒÅÄÉÓÌ., ËÏÍÍÅÎÔ. î.â. é×ÁÎÏ×ÏÊ ]1210 aí.d19971215 aÓ.237 - 4481700 1aðÌÁÔÏÎÏ×bá.ð.f1899-1951gáÎÄÒÅÊ ðÌÁÔÏÎÏ×ÉÞ3RU\NLR\auth\7713464070 012001 aûËÏÌÁ ËÌÁÓÓÉËÉeëÎÉÇÁ ÄÌÑ ÕÞÅÎÉËÁ É ÕÞÉÔÅÌÑ aá×Ô. ÒÁÓËÒÙÔÙ ÐÏ ËÎ.00732nam0 2200241 i 450 001001800000005001700018021002300035100004100058101000800099102000700107105001800114200003200132210002100164215002000185010001100205686002500216700002200241801002800263899001900291225002200310300004800332423011000380RU\NLR\bibl\2847819990714121239.0 aRU9823b98-25548Ð a19990524d1998 m||y0rusy0102 ca0 arus aRU aa |||||||ay1 a50 X 50eòÏÍÁÎfë. óÅÒÇÅÅ×Á aí.cðÏÄ×ÉÇd1998 a271 Ó.cÉÌ.d20 910 000 aû6(2=ò)75-4462rubbk 1aóÅÒÇÅÅ×Ábë.4070 0aRUbNLRc19990519gPSBO aNLRj99-3/37481 aäÅÔÅËÔÉ×Ù óívN 6 aïÐÉÓÁÎÏ ÐÏ ÏÂÌ. îÁ ÔÉÔ.Ì. ÔÏÌØËÏ ÚÁÇÌ. ÓÅÒ. 012001 açÒÅÈÉ ÍÏÌÏÄÏÓÔÉeòÏÍÁÎfó. íÁËÓÉÍÏ×1210 aí.d19981215 aó. 174-2711700 1aíÁËÓÉÍÏ×bó. 407000979nam0 2200265 i 450 001001700000005001700017021002300034100004100057101000800098102000700106105001800113200009100131210002600222215002000248010002500268686003600293700006300329701006400392801002800456899001900484300007400503423009900577512001200676830002500688RU\NLR\bibl\126419990714125446.0 aRU91858b97-43357 a19980703d1997 u||y0rusy0102 ca0 aeng aRU aa j 00|yy1 aEnglisheõÞÅÂ.e6-Ê ÇÏÄ ÏÂÕÞÅÎÉÑ (ÄÌÑ 10 ËÌ. ÓÒÅÄ. ÛË.)fá.ð. óÔÁÒËÏ×, â.ó. ïÓÔÒÏ×ÓËÉÊ aóðÂcóÐÅÃ. ÌÉÔ.d1997 a464 Ó.cÉÌ.d21 a5-7571-0117-2975000 aû143.21-93ÒÕÓ21[10]ÈÒÅÓÔ2rubbk 1aóÔÁÒËÏ×bá. ð.gáÎÁÔÏÌÉÊ ðÅÔÒÏ×ÉÞ3RU\NLR\auth\7715244070 1aïÓÔÒÏ×ÓËÉÊbâ. ó.gâÏÒÉÓ óÅÍÅÎÏ×ÉÞ3RU\NLR\auth\7715754070 0aRUbNLRc19980528gPSBO aNLRj97-5/4265 aîÁ ÏÂÌ.: English: 6th year / Starcov A.P., Dixon R.R., Ostrovsky B.S. 012001 aReadereëÎ. ÄÌÑ ÞÔÅÎÉÑfóÏÓÔ. â.ó. ïÓÔÒÏ×ÓËÉÊ1210 aóðÂd19971215 aÓ. 350-435cÉÌ.1 aEnglish aá×Ô. ÒÁÓËÒÙÔÙ ÐÏ ËÎ.01293nam0 2200301 i 450 001001700000005001700017021002100034100004100055101001300096102000700109105001800116200006900134210002100203215002000224010002500244606007200269607006800341686002300409686004100432686002700473700006200500801002800562899001900590225003000609300007300639423020600712454007300918RU\NLR\bibl\574619990714130836.0 aRU9288b98-6006 a19981016d1998 u||y0rusy0102 ca1 aruscger aRU aa |||||||yy1 aá×ÓÔÒÁÌÉÊÓËÉÅ ÜÔÀÄÙfâÅÒÎÇÁÒÄ çÒÖÉÍÅËg[ðÅÒ. Ó ÎÅÍ. å. çÅÅ×ÓËÏÊ] aí.cáÒÍÁÄÁd1998 a395 Ó.cÉÌ.d21 a5-7632-0623-19150000 aöÉ×ÏÔÎÙÅyá×ÓÔÒÁÌÉÑ9ðÏÐÕÌÑÒÎÙÅ ÉÚÄÁÎÉÑ2nlr-sh3RU\NLR\auth\667043 aá×ÓÔÒÁÌÉÑxïÐÉÓÁÎÉÅ É ÐÕÔÅÛÅÓÔ×ÉÑ2nlr-sh3RU\NLR\auth\66124852 aä890(82)0222rubbk aå685.9(82)Ñ9aû6(4æ)07-4(çÒ.)2rubbk aû6(4æ)07-4(çÒ.)2rubbk 1açÒÖÉÍÅËbâ.f1909-1987gâÅÒÎÇÁÒÄ3RU\NLR\auth\7766194070 0aRUbNLRc19980904gPSBO aNLRj98-3/38221 aúÅÌÅÎÁÑ ÓÅÒi÷ÏËÒÕÇ Ó×ÅÔÁ aðÅÒ. ÉÚÄ.: Vierfussige Australier / Berhard Grzimek. - Munchen, 1966 012001 aðÏÌÅÔ ÂÕÍÅÒÁÎÇÁfîÉËÏÌÁÊ äÒÏÚÄÏ×g[ë ÓÂ.× ÃÅÌÏÍ: éÌ. æ. åÒÍÁËÏ×Á]11010 arus1210 aí.cáÒÍÁÄÁd19981215 aó. 199-3921700 1aäÒÏÚÄÏ×bî. f1937-gîÉËÏÌÁÊ îÉËÏÌÁÅ×ÉÞ3RU\NLR\auth\7766174070 012001 aVierfussige AustralierfBerhard Grzimek1210 aMunchend196601355nam0 2200361 i 450 001001800000005001700018021002400035100004100059101000800100102000700108105001800115200005100133205001300184210003000197215002800227010002400255606005500279686001900334686002000353700007200373801002800445899001900473225006100492225003600553300004900589300003400638300005900672320004800731423003300779423003600812423004600848423009900894RU\NLR\bibl\2537419990714124250.0 aRU946b99-1470 îëó a19990506d1998 u||y0rusy0102 ca0 arus aRU aac j 00|yy1 aáÌÅËÓÁÎÄÒ íÁËÅÄÏÎÓËÉÊ É àÌÉÊ ãÅÚÁÒØf[å.ïÒÌÏ×] a2-Å ÉÚÄ. aþÅÌÑÂÉÎÓËcõÒÁÌ LTDd1998 a536 c.cÉÌ., ÐÏÒÔÒ.d21 a5-8029-0066-0950000 aâÉÏÇÒÁÆÉÉ9óÂÏÒÎÉËÉ2nlr-sh3RU\NLR\auth\661255890 añ222(0)2rubbk aô3(0)0-82rubbk 13RU\NLR\auth\778618aòÏÔÛÔÅÊÎbæ. á.f1871-1953gæÅÄÏÒ áÒÏÎÏ×ÉÞ4070 0aRUbNLRc19990505gPSBO aNLRj99-3/26161 aöÉÚÎØ ÚÁÍÅÞÁÔÅÌØÎÙÈ ÌÀÄÅÊeâÉÏÇÒ. Â-ËÁ æ.ðÁ×ÌÅÎËÏ×Ávô.61 aâÉÏÇÒÁÆÉÞÅÓËÁÑ ÓÅÒÉÑ, 1890-1915 aîÁ 517 Ó. 1-Ê Á×Ô.: æ.á.òÏÔÛÔÅÊÎ (å.ïÒÌÏ×). aîÁ ÏÂÌ. ÔÏÌØËÏ ÚÁÇÌ. 2-Ê ÓÅÒ. aîÁ ÓÕÐÅÒÏÂÌ. ÚÁÇÌ. 1-Ê ÓÅÒ.: â-ËÁ æÌÏÒÅÎÔÉÑ ðÁ×ÌÅÎËÏ×Á aâÉÂÌÉÏÇÒ.× ËÏÎÃÅ ÇÌÁ× É × ÐÏÄÓÔÒÏÞ. ÐÒÉÍÅÞ. 012001 aòÉÛÅÌØÅf[÷.ì.òÁÎÃÏ×] 012001 aëÒÏÍ×ÅÌØf[å.á.óÏÌÏרÅ×] 012001 aîÁÐÏÌÅÏÎ If[ðÒÏÆ. á.ó.ôÒÁÞÅ×ÓËÉÊ] 012001 aâÉÓÍÁÒËeâÉÏÇÒ. ÐÏ×ÅÓÔ×Ï×ÁÎÉÑf[ò.é.óÅÍÅÎÔÏ×ÓËÉÊgë ÓÂ. × ÃÅÌÏÍ: ðÏÓÌÅÓÌ. á.æ.áÒÅÎÄÁÒÑ]01050nam0 2200253 i 450 001001700000005001700017010002500034021002100059100004100080101001300121102000700134105001800141200008700159210002600246215002000272225001900292423028100311461002600592686002900618700005600647701004600703801002800749899001900777RU\NLR\bibl\350619990708172247.0 a5-04-000284-4920000 aRU9106b98-2205 a19980910d1998 u||y0rusy0102 ca1 arusceng aRU aa z 00|ay1 aâÉÌÌ, ÇÅÒÏÊ çÁÌÁËÔÉËÉ, ÎÁ ÐÌÁÎÅÔÅ ÄÅÓÑÔÉ ÔÙÓÑÞ ÂÁÒÏ×fçÁÒÒÉ çÁÒÒÉÓÏÎ É äÜ×ÉÄ âÉÛÏÆ aí.cüëóíï-ÐÒÅÓÓd1998 a392 Ó.cÉÌ.d211 aóÔÁÌØÎÁÑ ëÒÙÓÁ 112001 aâÉÌÌ, ÇÅÒÏÊ çÁÌÁËÔÉËÉ: ÐÏÓÌÅÄÎÅÅ ÚÌÏÐÏÌÕÞÎÏÅ ÐÒÉËÌÀÞÅÎÉÅe[æÁÎÔÁÓÔ. ÒÏÍÁÎÙeðÅÒ. Ó ÁÎÇÌ]fçÁÒÒÉ çÁÒÒÉÓÓÏÎ É äÜ×ÉÄ èÁÒÒÉÓ1210 aí.d19971215 aó. 179-3911700 1açÁÒÒÉÓÏÎbç. f1925-gçÁÒÒÉ40703RU\NLR\auth\7747851701 1aèÁÒÒÉÓbä. gäÜ×ÉÄ3RU\NLR\auth\7761994070 012001 aóÔÁÌØÎÁÑ ëÒÙÓÁ aû6(7óûá)67-445Ñ432rubbk 1açÁÒÒÉÓÏÎbç.f1925-gçÁÒÒÉ40703RU\NLR\auth\774785 1aâÉÛÏÆbä.gäÜ×ÉÄ40703RU\NLR\auth\775017 0aRUbNLRc19980717gPSBO aNLRj98-3/203801290nam0 2200289 i 450 001001700000005001700017021001900034100004100053101001300094102000700107105001800114200012100132210002600253215002000279010002500299686003600324686003300360686003800393700004900431701004600480801002800526899001900554225001600573300007900589423030600668461002600974RU\NLR\bibl\272119990714150520.0 aRU920b98-378 a19981019d1997 u||y0rusy0102 ca1 arusceng aRU aa z 00|ay1 aâÉÌÌ, ÇÅÒÏÊ çÁÌÁËÔÉËÉ, ÎÁ ÐÌÁÎÅÔÅ ÎÅÐÏÚÎÁÎÎÙÈ ÎÁÓÌÁÖÄÅÎÉÊfçÁÒÒÉ çÁÒÒÉÓÏÎ É äÜ×ÉÄ âÉÛÏÆg[ðÅÒ. Ó ÁÎÇÌ. î. íÉÈÁÊÌÏ×Á] aí.cüëóíï-ðÒÅÓÓd1997 a392 Ó.cÉÌ.d21 a5-04-000118-5925000 aû6(7óûá)67-445(çÁÒÒÉÓÏÎ)2rubbk aû6(7óûá)67-445(âÉÛÏÆ)2rubbk aû6(7óûá)67-445(èÏÌÄÅÍÁÎII)2rubbk 1açÁÒÒÉÓÏÎbç.gçÁÒÒÉ3RU\NLR\auth\7747854070 1aâÉÛÏÆbä.gäÜ×ÉÄ3RU\NLR\auth\7750174070 0aRUbNLRc19980706gPSBO aNLRj98-3/14831 aóÔÁÌ. ËÒÙÓÁ aîÁ ÏÂÌ.: âÉÌÌ, ÇÅÒÏÊ çÁÌÁËÔÉËÉ, ÎÁ ÐÌÁÎÅÔÅ ÚÏÍÂÉ-×ÁÍÐÉÒÏ× / çÁÒÒÉ çÁÒÒÉÓÏÎ 012001 aâÉÌÌ,ÇÅÒÏÊ çÁÌÁËÔÉËÉ, ÎÁ ÐÌÁÎÅÔÅ ÚÏÍÂÉ-×ÁÍÐÉÒÏ×fçÁÒÒÉ çÁÒÒÉÓÏÎ É äÖÅË èÏÌÄÅÍÁÎ IIg[ðÅÒ. Ó ÁÎÇÌ. á. éÏÒÄÁÎÓËÏÇÏeë ÓÂ. × ÃÅÌÏÍ.: æÁÎÔÁÓÔ. ÒÏÍÁÎÙ]1210 aí.d19971215 aC. 205-3911700 1açÁÒÒÉÓÏÎbç.f1925-gçÁÒÒÉ3RU\NLR\auth\77478540701701 1aèÏÌÄÅÍÁÎbä.gäÖÅË3RU\NLR\auth\7750134070 012001 aóÔÁÌØÎÁÑ ËÒÙÓÁ00930nam0 2200241 i 450 001001800000005001700018021002100035100004100056101002000097102000700117105001800124200025100142210003000393215002000423010001000443600005800453606004100511686002600552686002100578700004300599801002800642899001800670RU\NLR\bibl\2318419990714141728.0 aRU9242b99-5193 a19990420d1999 u||y0rusy0102 ca0 arusa9crsc9crs aRU aa z 00|zy1 a÷ÅÌÉËÉÊ ËÁÎÏÎ, ÞÉÔÁÅÍÙÊ × ÐÏÎÅÄÅÌØÎÉË, ×ÔÏÒÎÉË, ÓÒÅÄÕ, ÞÅÔ×ÅÒÇ ÐÅÒ×ÏÊ ÓÅÄÍÉÃÙ É × ÞÅÔ×ÅÒÇ ÐÑÔÏÊ ÓÅÄÍÉÃÙ ÷ÅÌÉËÏÇÏ ÐÏÓÔÁaöÉÔÉÅ ÐÒÅÐÏÄÏÂÎÏÇÏ áÎÄÒÅÑ ëÒÉÔÓËÏÇÏaöÉÔÉÅ ÐÒÅÐÏÄÏÂÎÏÊ íÁÒÉÉ åÇÉÐÅÔÓËÏÊeó ÐÁÒÁÌ. ÒÕÓ. ÐÅÒ.fô×ÏÒÅÎÉÅ Ó×ÑÔÏÇÏ áÎÄÒÅÑ ëÒÉÔÓËÏÇÏ aí.cóÒÅÔ. ÍÏÎÁÓÔÙÒØd1999 a334 Ó.cÉÌ.d17 910000 0aíÁÒÉÑ åÇÉÐÅÔÓËÁÑz6 ×.2nlr-sh3RU\NLR\auth\6612597020 aëÁÎÏÎÙ2nlr-sh3RU\NLR\auth\66516630 aü372.24-503.112rubbk aü37-574.32rubbk 0aáÎÄÒÅÊcÁÒÈÉÅÐ. ëÒÉÔÓËÉÊf633-7124070 0aRUbNLRc19990420gPSBO aNLRj99-2/34801136nam0 2200289 i 450 001001800000005001700018021001700035100004100052101000800093102000700101105001800108200008400126210002400210215003100234309001900265320002100284423021100305606005000516686002200566686002200588686001800610702004000628702004600668712008800714801002800802899001600830RU\NLR\bibl\1718619990709110520.0 aRU92b99-40 a19990323d1999 u||y0rusy0102 ca0 arus aRU ay z 000yy1 aäÅÔÓËÏÍÕ ÏÎËÏÌÏÇÕ: Ï ÐÒÏÂÌÅÍÁÈ ÏÂÝÅÎÉÑ Ó ÒÏÄÉÔÅÌÑÍÉ ÏÎËÏÌÏÇÉÞÅÓËÉ ÂÏÌØÎÙÈ ÄÅÔÅÊ a[í.]câ. É.d[1999] a16, 16 Ó. ×ÓÔÒÅÞ. ÐÁÇ.d22 aëÎ.-ÐÅÒÅ×ÅÒÔÙÛ aâÉÂÌÉÏÇÒ.: Ó. 16 012001 aäÅÔÓËÏÍÕ ÏÎËÏÌÏÇÕ: ÞÔÏ ÎÅÏÂÈÏÄÉÍÏ ÚÎÁÔØ Ï ÐÓÉÈÉËÅ ÏÎËÏÌÏÇÉÞÅÓËÉ ÂÏÌØÎÏÇÏ ÒÅÂÅÎËÁfîÅÚÁ×ÉÓ. ÁÓÓÏÃ. ÄÅÔ. ÐÓÉÈÉÁÔÒÏ× É ÐÓÉÈÏÌÏÇÏ×góÏÓÔ. Ë.Í.Î. é.ð. ëÉÒÅÅ×ÁgðÏÄ ÒÅÄ. á.á. óÅ×ÅÒÎÏÇÏ1210 a[í.]d[1999]0 aðÓÉÈÉËÁ ÄÅÔÅÊxéÚÍÅÎÅÎÉÑ ÐÒÉ ÏÐÕÈÏÌÑÈ2nlr-sh aò733.56-372rubbk aò733.64-372rubbk aà948.12rubbk 1aëÉÒÅÅ×Ábé. ð.géÒÉÎÁ ðÅÔÒÏ×ÎÁ4220 1aóÅ×ÅÒÎÙÊbá. á.gáÎÁÔÏÌÉÊ áÌÅËÓÅÅ×ÉÞ4340023RU\NLR\auth\8810010133aîÅÚÁ×ÉÓÉÍÁÑ ÁÓÓÏÃÉÁÃÉÑ ÄÅÔÓËÉÈ ÐÓÉÈÉÁÔÒÏ× É ÐÓÉÈÏÌÏÇÏ×4570 0aRUbNLRc19990323gPSBO aNLRj99-6/101322nam0 2200325 i 450 001001700000005001700017021002200034100004100056101001300097102000700110105001800117200004700135210002500182215003900207010002400246686003000270700003000300801002800330899001900358225007400377300002700451327004300478423013400521423017000655461006600825464003800891510001900929510002700948510002100975RU\NLR\bibl\909119990714135518.0 aRU9515b98-10918 a19981222d1998 u||y0rusy0102 ca1 arusceng aRU aa z 00|ay1 aäÖÅÊÎ üÊÒdJane EyrefûÁÒÌÏÔÔÁ âÒÏÎÔÅzeng aí.cïìíá-ðòåóód1998 a831 Ó., [1] Ì. Ã×. ÐÏÒÔÒ.cÉÌ.d22 a5-87322-819-197000 aû6(4÷Ì)57-440.4Ñ432rubbk 1aâÒÏÎÔÅbû.gûÁÒÌÏÔÔÁ4070 0aRUbNLRc19981202gPSBO aNLRj98-5/10541 aâ-ËÁ ×ÅÌÉËÉÈ ÐÉÓÁÔÅÌÅÊfóÏÓÔ. ô. âÅÒÄÉËÏ×ÏÊióÅÒ. "÷ÏÓÐÉÔÁÎÉÅ ÞÕ×ÓÔ×" aîÁ ÏÂÌ.: óÅÓÔÒÙ âÒÏÎÔÅ1 a÷ ËÎ. ÔÁËÖÅ: üÍÉÌÉ âÒÏÎÔÅ/íÀÒÉÅÌ óÐÁÒË 112001 açÒÏÚÏ×ÏÊ ÐÅÒÅ×ÁÌdWuthering heightsfüÍÉÌÉ âÒÏÎÔÅzeng1210 aí.d19981215 aó. 393-6341700 1aâÒÏÎÔÅbü. güÍÉÌÉ4070 112001 aáÇÎÅÓ çÒÅÊdAgness Greye[òÏÍÁÎÙeðÅÒ. Ó ÁÎÇÌ.]füÎÎ âÒÏÎÔÅg[éÌ. ÈÕÄÏÖ. æ. áÊÈÅÎÂÅÒÇÁ]zeng1210 aí.d19981215 aó. 635-7681700 1aâÒÏÎÔÅbü. güÎÎ4070 012001 aâÉÂÌÉÏÔÅËÁ ×ÅÌÉËÉÈ ÐÉÓÁÔÅÌÅÊióÅÒ. "÷ÏÓÐÉÔÁÎÉÅ ÞÕ×ÓÔ×" 012001 aüÍÉÌÉ âÒÏÎÔÅfíÀÒÉÜÌ óÐÁÒË0 aJane Eyrezeng0 aWuthering heightszeng0 aAgness Greyzeng00815nam0 2200241 i 450 001001800000005001700018021002100035100004100056101001300097102000700110105001800117200003200135210002500167215002800192010002500220686002100245700002600266801002800292899001800320225003200338300002800370423017500398RU\NLR\bibl\2614019990714140408.0 aRU9271b99-5727 a19990513d1999 u||y0rusy0102 ca1 aruscfre aRU aa z 00|zy1 aäÒÅ×ÎÉÊ åÇÉÐÅÔfðØÅÒ íÉËÅÌØ aí.cïìíá-ðòåóód1999 a64 Ó.cÉÌ., Ã×. ÉÌ.d29 a5-224-00160-9925000 aû9cô3(0)2rubbk 1aíÉËÅÌØbð.4070gðØÅÒ 0aRUbNLRc19990511gPSBO aNLRj99-8/4071 a÷ÓÅÍÉÒÎÁÑ ÉÓÔÏÒÉÑ ÄÌÑ ÄÅÔÅÊ aîÁ ÏÂÌ. Á×Ô. ÎÅ ÕËÁÚÁÎÙ 012001 aöÉ×ÏÔÎÙÊ ÍÉÒ ÔÅÈ ×ÒÅÍÅÎfðÏÌØ-áÎÒÉ ðÌÁÎÔÅÎg[ðÅÒ. Ó ÆÒ. å. ëÁÐÒÁÌÏ×ÏÊ]géÌ. ðØÅÒÁ ðÒÏÂÓÔÁ1210 aí.d19991215 aó. 57-641700 1aðÌÁÎÔÅÎbð. -á.gðÏÌØ-áÎÒÉ407000841nam0 2200265 i 450 001001800000005001700018010002500035100004100060101000800101102000700109105001800116200003000134210002100164215002900185225002300214300002800237423005100265423004800316423005500364606004700419686001500466700004700481801002800528899001900556RU\NLR\bibl\2583019990709111042.0 a5-07-002799-9923700 a19990507d1997 m||y0rusy0102 ca0 arus aRU aa z 00|yy1 aå×ÒÏÒÅÍÏÎÔfá.á. óÁ×ÅÌØÅ× aí.cúÎÁÎÉÅd1997 a144 c.cÉÌ., Ã×. ÉÌ.d231 aóÄÅÌÁÊ ÓÁÍv4/1997 aîÁ ÏÂÌ. Á×Ô. ÎÅ ÕËÁÚÁÎ. 012001 aõÂÒÁÎÓÔ×Ï ×ÁÛÅÊ ÇÏÓÔÉÎÏÊfç.á. ûÉÒÏËÏ×Á 012001 aíÅÔÁÌÌÉÞÅÓËÉÅ ÐÏËÒÙÔÉÑfì.á. åÒÌÙËÉÎ 012001 aá ÌÁÒÞÉË ÐÒÏÓÔÏ ... ÄÅÌÁÌÓÑfì.÷. ëÏ×ÁÌÅÎËÏ0 aäÏÍÏ×ÏÄÓÔ×Ï2nlr-sh3RU\NLR\auth\661256504 aí782rubbk 1aóÁ×ÅÌØÅ×bá. á.gáÌÅËÓÁÎÄÒ áÒËÁÄØÅ×ÉÞ4070 0aRUbNLRc19990506gPSBO aNLRj98-7/165901225nam0 2200229 i 450 001001800000005001700018010000900035021002100044100004100065101000800106102000700114105001800121200016300139210002500302215001400327423040700341606009600748686003000844712007500874801002800949899001800977RU\NLR\bibl\2049419990709111133.0 95000 aRU9134b99-2818 a19990406d1998 u||y0rusy0102 ca0 arus aRU ay l 00|yy1 aåÄÉÎÙÅ ÏÔÒÁÓÌÅ×ÙÅ ÎÏÒÍÁÔÉ×Ù ÞÉÓÌÅÎÎÏÓÔÉ ÒÁÂÏÔÎÉËÏ× ÈÏÚÑÊÓÔ×Á ÜÌÅËÔÒÏÓÎÁÂÖÅÎÉÑfí-×Ï ÐÕÔÅÊ ÓÏÏÂÝ. òÏÓ. æÅÄÅÒÁÃÉÉ. äÅÐÁÒÔÁÍÅÎÔ ÜÌÅËÔÒÏÆÉËÁÃÉÉ É ÜÌÅËÔÒÏÓÎÁÂÖÅÎÉÑ aí.côÒÁÎÓÉÚÄÁÔd1998 a16 Ó.d20 112001 aíÅÔÏÄÉËÁ ÏÐÒÅÄÅÌÅÎÉÑ ÞÉÓÌÅÎÎÏÓÔÉ ÍÁÓÔÅÒÏ×, ÜÌÅËÔÒÏÍÅÈÁÎÉËÏ×, ÍÁÛÉÎÉÓÔÏ×-ÉÎÓÔÒÕËÔÏÒÏ× ÌÏËÏÍÏÔÉ×ÎÙÈ ÂÒÉÇÁÄ, ÍÁÛÉÎÉÓÔÏ×-ÉÎÓÔÒÕËÔÏÒÏ× ÂÒÉÇÁÄ ÐÕÔÅ×ÙÈ ÍÁÛÉÎ É ÍÏÔÏÒÎÏ-ÒÅÌØÓÏ×ÏÇÏ ÔÒÁÎÓÐÏÒÔÁhòÁÚÄ. 4iïÐÒÅÄÅÌÅÎÉÅ ÞÉÓÌÅÎÎÏÓÔÉ ÍÁÓÔÅÒÏ× (ÓÔÁÒÛÉÈ ÍÁÓÔÅÒÏ×) ÐÒÏÉÚ×ÏÄÓÔ×ÅÎÎÙÈ ÕÞÁÓÔËÏ×, ÜÌÅËÔÒÏÍÅÈÁÎÉËÏ× (ÓÔÁÒÛÉÈ ÜÌÅËÔÒÏÍÅÈÁÎÉËÏ×) × ÈÏÚÑÊÓÔ×Å ÜÌÅËÔÒÉÆÉËÁÃÉÉ É ÜÌÅËÔÒÏÓÎÁÂÖÅÎÉÑ1210 aí.d19981215 aó. 17-230 aöÅÌÅÚÎÏÄÏÒÏÖÎÙÊ ÔÒÁÎÓÐÏÒÔxîÏÒÍÁÔÉ×Ù ÞÉÓÌÅÎÎÏÓÔÉ ÒÁÂÏÞÅÊ ÓÉÌÙ2nlr-sh3RU\NLR\auth\66407120 aõ37(2)2-640-23Ñ2712rubbk013RU\NLR\auth\889969831aòÏÓÓÉÊÓËÁÑ æÅÄÅÒÁÃÉÑbí-×Ï ÐÕÔÅÊ ÓÏÏÂÝÅÎÉÑ4570 0aRUbNLRc19990406gPSBO aNLRj99-4/50600998nam0 2200289 i 450 001001800000005001700018010002400035010003800059021002200097100004100119101001300160102000700173105001800180200006000198210003200258215002000290225001600310320004200326423012800368461002600496686002900522686002900551700005400580701002700634801002800661899001900689RU\NLR\bibl\1184819990709111339.0 a5-87849-110-9bñÕÚÁ a5-04-000510-5büëóíï-ðÒÅÓÓ917000 aRU9781b98-16527 a19990125d1998 u||y0rusy0102 ca1 arusceng aRU aa z 00|ay1 aúÅÒËÁÌÏ-ÄÒÕÇ, ÚÅÒËÁÌÏ-×ÒÁÇfòÏÂÅÒÔ áÓÐÒÉÎ, äÖÏÒÄÖ ôÁËÅÊ aí.cñÕÚÁcüëóíï-ðÒÅÓÓd1998 a424 Ó.cÉÌ.d211 aóÔÁÌ. ëÒÙÓÁ aîÁ 2-Ê Ó. ÄÒ. ÐÒÏÉÚ×ÅÄÅÎÉÑ ò. áÓÐÒÉÎÁ 012001 aôÁÍÂÕe[æÁÎÔÁÓÔ. ÐÏ×ÅÓÔÉ]fòÏÂÅÒÔ áÓÐÒÉÎg[ë ÓÂ. × ÃÅÌÏÍ: ðÅÒ. Ó ÁÎÇÌ. ç. äÕÔËÉÎÏÊ, ó. çÏÒÑÞÅ×ÏÊgèÕÄÏÖ. ÷. æÅÄÏÒÏ×] 012001 aóÔÁÌØÎÁÑ ëÒÙÓÁ aû6(7óûá)67-445(A)2rubbk aû6(7óûá)67-445(ô)2rubbk 1aáÓÐÒÉÎbò.gòÏÂÅÒÔ40703RU\NLR\auth\77966f1946- 1aôÁËÅÊbä.gäÖÏÒÄÖ4070 0aRUbNLRc19990114gPSBO aNLRj98-3/518001321nam0 2200361 i 450 001001800000005001700018010002400035021002300059100004100082101000800123102000700131105001800138200003000156205001300186210003000199215003400229225006300263225003600326300003400362300006500396320003000461423003500491423003400526423003400560423010000594461003700694606005500731686002500786700005700811702004400868801002800912899001900940RU\NLR\bibl\2840319990709111538.0 a5-8029-0063-695000 aRU9823b98-25537Ð a19990524d1998 u||y0rusy0102 ca0 arus aRU aacg z 00|zd1 aé.-ó. âÁÈf[ó.á. âÁÚÕÎÏ×] a2-Å ÉÚÄ. aþÅÌÑÂÉÎÓËcõÒÁÌ LTDd1998 a460 Ó.cÉÌ., ÐÏÒÔÒ., ÎÏÔÙd210 aöÉÚÎØ ÚÁÍÅÞÁÔÅÌØÎÙÈ ÌÀÄÅÊeâÉÏÇÒ. Â-ËÁ æ. ðÁ×ÌÅÎËÏ×Ávô. 71 aâÉÏÇÒÁÆÉÞÅÓËÁÑ ÓÅÒÉÑ, 1890-1915 aîÁ ÏÂÌ. ÔÏÌØËÏ ÚÁÇÌ. 2-Ê ÓÅÒ. aîÁ ÓÕÐÅÒÏÂÌ. ÚÁÇÌ. 1-Ê ÓÅÒ.: âÉÂÌÉÏÔÅËÁ æÌÏÒÅÎÔÉÑ ðÁ×ÌÅÎËÏ×Á aâÉÂÌÉÏÇÒ. × ËÏÎÃÅ ÏÞÅÒËÏ× 012001 aíÏÃÁÒÔf[í.á. äÁ×ÙÄÏ×Á] 012001 aûÏÐÅÎf[ì.ë. äÁ×ÙÄÏ×Á] 012001 aûÕÍÁÎf[í.á. äÁ×ÙÄÏ×Á] 012001 a÷ÁÇÎÅÒeâÉÏÇÒ. ÐÏ×ÅÓÔ×Ï×ÁÎÉÑf[ó.á. âÁÚÕÎÏ×góÏÓÔ., ÏÂÝ. ÒÅÄ. É ÐÏÓÌÅÓÌ. î.æ. âÏÌÄÙÒÅ×Á] 012001 aöÉÚÎØ ÚÁÍÅÞÁÔÅÌØÎÙÈ ÌÀÄÅÊ0 aíÕÚÙËÁz18 - 19 ××.2nlr-sh3RU\NLR\auth\661257280 aý313(0)-81Ñ432rubbk 1aâÁÚÕÎÏ×bó. á.f1857-1903góÅÒÇÅÊ áÌÅËÓÁÎÄÒÏ×ÉÞ4070 1aâÏÌÄÙÒÅ×bî. æ.gîÉËÏÌÁÊ æÅÄÏÒÏ×ÉÞ4220 0aRUbNLRc19990519gPSBO aNLRj99-3/368201657nam0 2200349 i 450 001001700000005001700017010002400034100004100058101000800099102000700107105001800114200014600132210003700278215002700315225005000342320003300392327014200425461004000567464007100607464008200678464006000760464007000820464006900890464007800959464003001037606007601067686002601143686002701169700006401196801002801260899001901288RU\NLR\bibl\996819990709111718.0 a5-87991-046-691000 a19981221d1998 u||y0rusy0102 ca0 arus aRU aah z 00|y|1 a"úÏÌÏÔÏÊ ×ÅË" Å×ÒÅÊÓËÏÊ ÌÉÔÅÒÁÔÕÒÙ × éÓÐÁÎÉÉeáÒÁÂÏ-ÍÕÓÕÌØÍ. ÐÅÒÉÏÄfóÅÍÅÎ ðÁÒÉÖÓËÉÊg[ðÅÔÅÒÂ. Å×ÒÅÊÓ. ÕÎ-Ô, éÎ-Ô ÐÒÏÂÌ. Å×ÒÅÊÓ. ÏÂÒÁÚÏ×ÁÎÉÑ] aóðÂ.cðÅÔÅÒÂ. Å×ÒÅÊÓ. ÕÎ-Ôd1998 a126 Ó.cÉÌ., ÆÁËÓ.d171 aéÓÔÏÒÉÑ Å×ÒÅÊÓ. ÌÉÔiå×ÒÅÊÓ. ÌÉÔ. ÓÒÅÄ. ×ÅËÏ× aâÉÂÌÉÏÇÒ. × ÐÒÅÄÉÓÌ.: Ó. 5-61 aóÏÄÅÒÖ.: ï ÖÉÚÎÉ É Ô×ÏÒÞÅÓÔ×Å: èÁÓÄÁÊ ÉÂÎ ûÁÐÒÕÔ, íÅÎÁÈÅÍ ÉÂÎ óÁÒÕË, äÕÎÁÛ ÂÅÎ ìÁÂÒÁÔ, ûÍÕÜÌØ ÇÁ-îÁÇÉÄ, ûÌÏÍÏ ÉÂÎ çÁÂÉÒÏÌØ, íÏÛÅ ÉÂÎ üÚÒÁ 012001 aéÓÔÏÒÉÑ Å×ÒÅÊÓËÏÊ ÌÉÔÅÒÁÔÕÒÙ 01700 1aéÂÎ üÚÒÁbí. f1055 - 1135gíÏÉÓÅÊ3RU\NLR\auth\7763884070 01700 1aéÂÎ ûÁÐÒÕÔbè. fÏË.915 - 970 ÉÌÉ 990gèÁÓÄÁÊ3RU\NLR\auth\7763804070 01700 1aéÂÎ óÁÒÕËbí. gíÅÎÁÈÅÍ3RU\NLR\auth\7763814070 01700 1aäÕÎÁÛ ÂÅÎ ìÁÂÒÁÔfÏË.920 - ÏË.9903RU\NLR\auth\7767384070 01700 1açÁÎÁÇÉÄbó. f982 - 1055góÁÍÕÉÌ3RU\NLR\auth\7763774070 01700 1açÁÂÉÒÏÌØbó. fÏË.1021 - ÏË.1058góÏÌÏÍÏÎ3RU\NLR\auth\7763854070 01700 1aíÏÛÅ ÉÂÎ üÚÒÁ40700 aáÒÁÂÓËÁÑ ÌÉÔÅÒÁÔÕÒÁzóÒÅÄÎÉÅ ×ÅËÁyéÓÐÁÎÉÑ2nlr-sh3RU\NLR\auth\6662431 aû5(0)961.2-3352rubbk aû5(0)961.34-3352rubbk 1aðÁÒÉÖÓËÉÊbó. ç.góÅÍÅÎ çÅÏÒÇÉÅ×ÉÞ3RU\NLR\auth\7763794070 0aRUbNLRc19981215gPSBO aNLRj98-2/155400881nam0 2200253 i 450 001001700000005001700017010000900034021002200043100004100065101000800106102000700114105001800121200012000139210002900259215002800288327007400316464003800390464004400428686002500472700006000497801002800557830002300585899001900608RU\NLR\bibl\753419990709111855.0 93000 aRU9496b98-10492 a19981117d1996 u||y0rusy0102 ca0 arus aRU aac z 000ay1 a"éÇÒÁÌ, ÎÏ ÎÅ ÕÇÁÄÁÌ ÎÉ ÏÄÎÏÊ ÂÕË×Ù..."eàÍÏÒÉÓÔ. ÐÏ×ÅÓÔØ, ÒÁÓÓËÁÚÙfàÒÉÊ ûÁÄÒÉÎg[èÕÄÏÖ.: á. âÕËÒÅÅ×, ô. óÁ×ÞÅÎËÏ] a÷ÌÁÄÉ×ÏÓÔÏËcâ. É.d1996 a191 Ó.cÉÌ., ÐÏÒÔÒ.d201 aóÏÄÅÒÖ.: îÁÞÁÌØÎÉË óÅÄÁÎËÉ: ðÏ×ÅÓÔØ; ôÒÁÍ×ÁÊÎÙÊ ËÏÄÅËÓ: óÂ. ÒÁÓÓËÁÚÏ× 012001 aîÁÞÁÌØÎÉË óÅÄÁÎËÉeðÏ×ÅÓÔØ 012001 aôÒÁÍ×ÁÊÎÙÊ ËÏÄÅËÓeóÂ. ÒÁÓÓËÁÚÏ× aû6(2=ò)75-7442rubbk 1aûÁÄÒÉÎbà. ÷.gàÒÉÊ ÷ÁÓÉÌØÅ×ÉÞ3RU\NLR\auth\7754754070 0aRUbNLRc19981111gPSBO aÁ×Ô.ÒÁÓËÒÙÔ ÐÏ ËÎ. aNLRj98-3/294701238nam2 2200349 i 450 001001800000005001700018021002100035100004100056101000800097102000700105105001800112200001300130210000900143215002300152010002300175801002800198899001800226300004900244320002600293327017300319461007000492464003300562464003000595464003200625464003000657464003100687464003500718464003200753464003100785464003900816464003300855RU\NLR\bibl\2140819990702113752.0 aRU9368b99-7644 a19990409d1999 k||y0rusy0102 ca0 arus aRU aac z 00|yd0 a[÷ÙÐ. 1] d1999 a343 ÓcÉÌ., ÐÏÒÔÒ. a5-02-018058-09600 0aRUbNLRc19990409gPSBO aNLRj99-5/358 aîÁ ÏÂÏÒÏÔÅ ÔÉÔ. Ì.: òÏÓ. ÁËÁÄ. ÎÁÕË. 275 ÌÅÔ aâÉÂÌÉÏÇÒ. × ËÏÎÃÅ ÓÔ.1 aóÏÄÅÒÖ.: ï á.÷. áÄÒÉÁÎÏ×Å, â.ü. ðÅÔÒÉ, î.î. ëÏÚØÍÉÎÅ, á.î. çÅÊËÏ, ç.á. ëÏËÉÅ×Å, æ.á. æÉÅÌØÓÔÒÕÐÅ, á.î. èÁÒÕÚÉÎÅ, î.é. ëÏÎÒÁÄÅ, ð.æ. ðÒÅÏÂÒÁÖÅÎÓËÏÍ, î.é. ìÅÂÅÄÅ×ÏÊ É ÄÒ. 01001RU\NLR\bibl\2208412001 aòÅÐÒÅÓÓÉÒÏ×ÁÎÎÙÅ ÜÔÎÏÇÒÁÆÙv[÷ÙÐ. 1] 01600 1aáÄÒÉÁÎÏ×bá. ÷.2psbo 01600 1aðÅÔÒÉbâ. ü.2psbo 01600 1aëÏÚØÍÉÎbî. î.2psbo 01600 1açÅÊËÏbá. î.2psbo 01600 1aëÏËÉÅ×bç. á.2psbo 01600 1aæÉÅÌØÓÔÒÕÐbæ. á.2psbo 01600 1aèÁÒÕÚÉÎbá. î.2psbo 01600 1aëÏÎÒÁÄbî. é.2psbo 01600 1aðÒÅÏÂÒÁÖÅÎÓËÉÊbð. æ.2psbo 01600 1aìÅÂÅÄÅ×Ábî. é.2psbo00905nam1 2200229 i 450 001001800000005001700018100004100035101000800076102000700084105001800091200015000109210003800259215000700297606006000304606008900364686002300453686002300476702002500499712010500524801002800629899001800657RU\NLR\bibl\2208419990709121205.0 a19990414g19999999k||y0rusy0102 ca0 arus aRU a||||z 00|yd1 aòÅÐÒÅÓÓÉÒÏ×ÁÎÎÙÅ ÜÔÎÏÇÒÁÆÙe[óÂ. ÂÉÏÇÒ.]fòÏÓ. ÁËÁÄ. ÎÁÕË, éÎ-Ô ÜÔÎÏÌÏÇÉÉ É ÁÎÔÒÏÐÏÌÏÇÉÉ ÉÍ. î.î. íÉËÌÕÈÏ-íÁËÌÁÑgóÏÓÔ. É ÏÔ×. ÒÅÄ. ä.ä. ôÕÍÁÒËÉÎ aí.céÚÄ. ÆÉÒÍÁ "÷ÏÓÔ. ÌÉÔ."d1999 d220 aüÔÎÏÇÒÁÆÙyóóóò9óÂÏÒÎÉËÉ2nlr-sh3RU\NLR\auth\665639600 aòÅÐÒÅÓÓÉÉ 30 - 40-ÙÈ É ÎÁÞ. 50-ÙÈ ÇÇ. × óóóò9óÂÏÒÎÉËÉ2nlr-sh3RU\NLR\auth\66174418 aô5Ç(2)7ÄÑ432rubbk aô3(2)7-3Ñ432rubbk 1aôÕÍÁÒËÉÎbä. ä.4340023RU\NLR\auth\888945aéÎÓÔÉÔÕÔ ÜÔÎÏÌÏÇÉÉ É ÜÔÎÉÞÅÓËÏÊ ÁÎÔÒÏÐÏÌÏÇÉÉ ÉÍ. î.î.íÉËÌÕÈÏ-íÁËÌÁÑcíÏÓË×Á4570 0aRUbNLRc19990414gPSBO aNLRj99-5/35800531nam1 2200193 i 450 001001700000005001700017100004100034101001300075102000700088105001800095200003900113210002000152215000700172225002700179686002500206700006000231801002800291899001800319RU\NLR\bibl\591019990709121331.0 a19980909g19979999u||y0rusy0102 ca1 arusceng aRU a||||z 00|ay1 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊf÷ÉÌØÑÍ ûÅËÓÐÉÒ aóðÂ.cëüíd1997 d221 aâ-ËÁ ÚÁÒÕÂÅÖ. ËÌÁÓÓÉËÉ aû6(4÷Ì)437Ñ442rubbk 1aûÅËÓÐÉÒb÷.f1564-1616g÷ÉÌØÑÍ3RU\NLR\auth\7719954070 0aRUbNLRc19980909gPSBO aNLRj94-5/75300750nam2 2200241 i 450 001001700000005001700017010002400034021002000058100004100078101001300119102000700132105001800139200011100157210000900268215001600277327003900293461005800332464002400390464002300414686002500437801002800462899001800490RU\NLR\bibl\318019990709112036.0 a5-85694-031-895000 aRU964b98-1243 a19980909d1997 u||y0rusy0102 ca1 arusceng aRU aa z 00|a|0 a[ô. 18fðÅÒ. Ó ÁÎÇÌ. î. òÙËÏ×ÏÊ, â. ôÏÍÁÛÅ×ÓËÏÇÏgëÏÍÍÅÎÔ. á. áÎÉËÓÔÁgèÕÄÏÖ. ìÁÒÉÓÁ É ëÉËÔÏÒ ëÏÌÏÍÅÊÃÅ×Ù] d1997 a464 Ó.cÉÌ.1 aóÏÄÅÒÖ.: ëÏÒÏÌØ éÏÁÎÎ; çÅÎÒÉÈ VIII 01001RU\NLR\bibl\591012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 18 012001 aëÏÒÏÌØ éÏÁÎÎ 012001 açÅÎÒÉÈ VIII aû6(4÷Ì)437Ñ442rubbk 0aRUbNLRc19980714gPSBO aNLRj94-5/75300701nam1 2200229 i 450 001001800000005001700018010001800035100004100053101001300094102000700107105001800114200009400132210002600226215000700252225001400259686002300273700004900296702005100345801002800396830002800424899001900452RU\NLR\bibl\1330819990709121638.0 a5-89091-049-3 a19990210g19989999u||y0rusy0102 ca1 aruscjpn aRU a||||z 00|ay1 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊfëÏÂÏ áÂÜg[óÏÓÔ., ÐÅÒ. Ó ÑÐ. É ÐÒÉÍ. ÷. çÒÉ×ÎÉÎÁgèÕÄÏÖ. á. ðÏÖ×ÁÎÏ×] aóðÂ.cóÉÍÐÏÚÉÕÍd1998 d211 aEx Libris aû6(5ñ)67Ñ442rubbk 0aáÂÜ ëÏÂÏf1924-19933RU\NLR\auth\7780864070 1açÒÉ×ÎÉÎb÷. ó.f1923-g÷ÌÁÄÉÍÉÒ óÅÒÇÅÅ×ÉÞ4220 0aRUbNLRc19990210gPSBO aÁ×Ô.ÐÏ çáë, ÄÁÔÙ ÐÏ ËÎ. aNLRj98-3/943900642nam2 2200229 i 450 001001800000005001700018021002300035100004100058101001300099102000700112105001800119200001100137210000900148215001600157010003000173801002800203899001900231327005100250461006000301464002700361464002400388RU\NLR\bibl\1274319990702114720.0 aRU91423b98-30034 a19990210d1998 u||y0rusy0102 ca1 aruscjpn aRU aa z 00|a|0 a[ô. 2] d1998 a409 Ó.cÉÌ. a5-89091-056-6bÔ. 298500 0aRUbNLRc19990205gPSBO aNLRj98-3/94391 aóÏÄÅÒÖ.: òÏÍÁÎÙ: óÏÖÖÅÎÎÁÑ ËÁÒÔÁ; þÅÌÏ×ÅË-ÑÝÉË 01001RU\NLR\bibl\1330812001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊv[ô. 2] 012001 aóÏÖÖÅÎÎÁÑ ËÁÒÔÁ 012001 aþÅÌÏ×ÅË-ÑÝÉË00688nam2 2200205 i 450 001001800000005001700018021001900035100004100054101001300095102000700108105001800115200000900133210000900142215001600151010003000167801002800197899001900225327018000244461005800424RU\NLR\bibl\1878319990714142054.0 aRU936b99-664 a19990329g19 9999m||y0rusy0102 ca1 aruscjpn aRU aa z 00|a|0 aô. 4 d1998 a559 c.cÉÌ. a5-89091-068-XbÔ. 496000 0aRUbNLRc19990329gPSBO aNLRj98-3/94391 aóÏÄÅÒÖ.: ðÏ×ÅÓÔØ: óÔÅÎÁ; òÁÓÓËÁÚÙ: ÷ÔÏÒÇÛÉÅÓÑ; öÉÚÎØ ÐÏÜÔÁ; òÕËÉ; ðÏÓÌÁÎÅÃ; óÍÅÒÔØ, Ë ËÏÔÏÒÏÊ ÏÎ ÎÅÐÒÉÞÁÓÔÅÎ; úÁ ÐÏ×ÏÒÏÔÏÍ; óÏÌÄÁÔ ÉÚ ÓÎÁ; äÅÔÓËÁÑ; ðØÅÓÙ: ïÈÏÔÁ ÎÁ ÒÁÂÏ× É ÄÒ. 01001RU\NLR\bibl\1330812001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvT. 400877nam0 2200277 i 450 001001700000005001700017010002300034100004100057101001300098102000700111105001800118200004900136210002100185215001400206327008500220464002900305464001800334464002900352464002600381464002100407686002500428700007400453801002800527830002400555899002000579RU\NLR\bibl\770319990709112224.0 a5-8452-170-591000 a19981123d1998 u||y0rusy0102 ba0 arusglat aRU ay z 00|a|1 aContra ideologicaeòÁÓÓËÁÚÙfóÅÒÇÅÊ ëÁÚÍÅÎËÏ aóðÂcìÉÃÅÊd1998 a96 Ó.d201 aóÏÄÅÒÖ.: ëÏÒÏÌÅ×ÓËÁÑ ÏÈÏÔÁ; ôÏÌÞÏË; íÕÚÅÊÎÁÑ ÒÅÄËÏÓÔØ; üË×ÉÌÉÂÒÉÓÔÉËÁ; éÎÓÐÅËÃÉÑ 012001 aëÏÒÏÌÅ×ÓËÁÑ ÏÈÏÔÁ 012001 aôÏÌÞÏË 012001 aíÕÚÅÊÎÁÑ ÒÅÄËÏÓÔØ 012001 aüË×ÉÌÉÂÒÉÓÔÉËÁ 012001 aéÎÓÐÅËÃÉÑ aû6(2=ò)75-4452rubbk 1aëÁÚÍÅÎËÏbó. ÷.f1954-1991góÅÒÇÅÊ ÷ÁÄÉÍÏ×ÉÞ40703RU\NLR\auth\775472 0aRUbNLRc19981113gPSBO aá×Ô. ÒÁÓËÒÙÔ ÐÏ ËÎ. aNLRj98-4/1109401244nam0 2200301 i 450 001001700000005001700017010001000034021002100044100004100065101001300106102000700119105001800126200011400144210002200258215001600280300004400296320003100340327009100371464013500462601005500597686004200652686002200694702006400716702004100780712007500821801002800896899001800924RU\NLR\bibl\681219990709112331.0 910000 aRU9316b98-6598 a19981103d1998 u||y0rusy0102 ca0 arusaeng aRU aa z 00|zy1 aLed Zeppelin: ×ÚÌÅÔ É ÐÁÄÅÎÉÅe[óÂ.fé. ëÏÒÍÉÌØÃÅ×, ÐÅÒ., ÓÏÓÔ.gòÅÄËÏÌ.: ÷. óÌÏÂÖÉÎ É ÄÒ.gó. óÉÔÎÉËÏ×, ÉÌ.] aí.c÷ÅÓÔÎÉËd1998 a352 Ó.cÉÌ. aôÅËÓÔ ÌÉÒÉËÉ ÐÁÒÁÌ. ÎÁ ÒÕÓ. É ÁÎÇÌ. ÑÚ. aëÒÁÔ. ÄÉÓËÏÇÒ.: Ó. 350-3511 aóÏÄÅÒÖ.: ÷ÚÌÅÔ É ÐÁÄÅÎÉÅ "ó×åÎÃÏ×ÏÇÏ ÄÉÒÉÖÁÂÌÑ" / éÌØÑ ëÏÒÍÉÌØÃÅ×. ìÉÒÉËÁ Led Zeppelin 012001 a÷ÚÌÅÔ É ÐÁÄÅÎÉÅ "ó×åÎÃÏ×ÏÇÏ ÄÉÒÉÖÁÂÌÑ"féÌØÑ ëÏÒÍÉÌØÃÅ×1700 1aëÏÒÍÉÌØÃÅ×bé. ÷.géÌØÑ ÷ÁÌÅÒØÅ×ÉÞ3RU\NLR\auth\775384407002a"Led zeppelin", ÒÏË-ÇÒÕÐÐÁc÷ÅÌÉËÏÂÒÉÔÁÎÉÑ2nlr-sh aý364.13(4÷Ì)6-68"ìÅÄ ÃÅÐÐÅÌÉÎ"2rubbk aý319.41(3)2rubbk 1aëÏÒÍÉÌØÃÅ×bé. ÷.géÌØÑ ÷ÁÌÅÒØÅ×ÉÞ3RU\NLR\auth\7753844220 1aóÌÏÂÖÉÎb÷.3RU\NLR\auth\7753854340023RU\NLR\auth\889999982a"Led zeppelin", ÒÏË-ÇÒÕÐÐÁc÷ÅÌÉËÏÂÒÉÔÁÎÉÑ4570 0aRUbNLRc19981103gPSBO aNLRj98-2/55501303nam0 2200361 i 450 001001700000005001700017100004100034101001400075102000800089105001800097200006800115210004200183215002000225686002400245700005900269801002800328899001900356225002500375225001900400300004300419327018000462461003700642464002200679464003300701464002800734464002800762464002300790464002700813464002700840464002200867464002300889464002900912RU\NLR\bibl\864219990714143222.0 a19981210d1997 u||y0rusy0102 ca1 a9estarus aest aa |||||||ay1 aóËÁÚËÉe[ðÅÒ.]fæÒÉÄÒÉÈ òÅÊÎÇÏÌØÄ ëÒÅÊÃ×ÁÌØÄg[éÌ. ç.òÅÊÎÄÏÒÆÁ] a[ôÁÌÌÉÎÎ]côÁÌÌÉÎÎ. ÃÅÎÔÒ íáäðòd1997 a220 Ó.cÉÌ.d21 aû6(2=üÓÔ)5-42rubbk 1aëÒÅÊÃ×ÁÌØÄbæ. ò.f1803 - 1882gæÒÉÄÒÉÈ òÅÊÎÇÏÌØÄ4070 0aRUbNLRc19981126gPSBO aNLRj98-3/76291 aKodumaa - òÏÄÎÏÊ ÄÏÍ1 aâ-ËÁ ÜÓÔ. ÌÉÔ. aþÁÓÔØ ÔÅËÓÔÁ ÐÁÒÁÌ. ÎÁ ÒÕÓ. É ÜÓÔ. ÑÚ.0 aóÏÄÅÒÖ.: úÌÁÔÏÐÒÑÈÉ; âÌÁÇÏÄÁÒÎÙÊ ËÏÒÏÌÅ×ÉÞ; äÏÂÒÙÊ ÄÒÏ×ÏÓÅË; ìÏÐÉ É ìÁÐÉ; þÕÒÂÁÎ É âÅÒÅÓÔÁ; çÒÏÍÏ×ÁÑ ×ÏÌÙÎËÁ; óÉÒÏÔËÉÎ ÖÅÒÎÏ×; èÉÔÒÏÕÍÎÙÊ; èÉÔÒÙÊ áÎÔÓ; ä×ÅÎÁÄÃÁÔØ ÓÅÓÔÅÒ É ÄÒ. 012001 aâ-ËÁ ÜÓÔÏÎÓËÏÊ ÌÉÔÅÒÁÔÕÒÙ 012001 aúÌÁÔÏÐÒÑÈÉ 012001 aâÌÁÇÏÄÁÒÎÙÊ ËÏÒÏÌÅ×ÉÞ 012001 açÏÒÍÏ×ÁÑ ×ÏÌÙÎËÁ 012001 aþÕÒÂÁÎ É âÅÒÅÓÔÁ 012001 aìÏÐÉ É ìÁÐÉ 012001 aäÏÂÒÙÊ ÄÒÏ×ÏÓÅË 012001 aóÉÒÏÔËÉÎ ÖÅÒÎÏ× 012001 aèÉÔÒÏÕÍÎÙÊ 012001 aèÉÔÒÙÊ áÎÔÓ 012001 aä×ÅÎÁÄÃÁÔØ ÓÅÓÔÅÒ00749nam0 2200241 i 450 001001800000005001700018010002500035021002200060100004100082101000800123102000700131105001800138200007100156210002600227215002000253225002400273327006800297464002500365686002500390700004500415801002800460899001900488RU\NLR\bibl\1202419990709112602.0 a5-04-000496-6912000 aRU9794b98-16744 a19990129d1998 u||y0rusy0102 ca0 arus aRU aa z 00|ay1 aáÇÅÎÔ Ú×ÅÚÄÎÏÇÏ ËÏÒÐÕÓÁe[æÁÎÔÁÓÔ. ÐÒÏÉÚ×ÅÄÅÎÉÑ]fìÅÏÎÉÄ ëÕÄÒÑ×ÃÅ× aí.cüëóíï-ðÒÅÓÓd1998 a424 Ó.cÉÌ.d211 aáÂÓÏÌÀÔ. ÏÒÕÖÉÅeáï1 aóÏÄÅÒÖ.: áÇÅÎÔ Ú×ÅÚÄÎÏÇÏ ËÏÒÐÕÓÁ: òÏÍÁÎ; ìÁÂÉÒÉÎÔ ÓÎÏ×: ðÏ×ÅÓÔØ 012001 aìÁÂÉÒÉÎÔ ÓÎÏ× aû6(2=ò)75-4452rubbk 1aëÕÄÒÑ×ÃÅ×bì. ÷.gìÅÏÎÉÄ ÷ÉËÔÏÒÏ×ÉÞ4070 0aRUbNLRc19990118gPSBO aNLRj98-3/579101851nam0 2200397 i 450 001001600000005001700016010000900033021002200042100004100064101000800105102000700113105001800120200013100138210006400269215002200333327017700355464006900532464005500601464005600656464005200712464005400764464005900818464005700877464005300934464005700987464005401044686002301098686002501121686002401146702006101170702007001231712008101301801002801382830002401410899001901434RU\NLR\bibl\50619990709112704.0 92000 aRU9985b97-23873 a19980514d1997 u||y0rusy0102 ca0 arus aRU ac z 00|gy1 aáÌÌÅÑ ×ÄÏÈÎÏ×ÅÎÉÑeCÔÉÈÏÔ×ÏÒÅÎÉÑe[óÔÉÈÉ ÚÁ×ÏÄ. ÐÏÜÔÏ×]fìÏÓÉÎÏÏÓÔÒÏ×. ÜÌÅËÔÒÏÔÅÈÎ. Ú-Äg[óÏÓÔ. ëÏÐÁÓÏ×Á ì.÷gòÅÄ. ïÒÌÉÎ á.é.] aí.câ. É.aäÏÌÇÏÐÒÕÄÎÙÊcõÐÒ. ËÕÌØÔÕÒÙ ÁÄÍÉÎÉÓÔÒÁÃÉÉd1997 a84 Ó.cÐÏÒÔÒ.d200 aóÏÄÅÒÖ.: á×Ô.: ìÉÄÉÑ ëÏÐÁÓÏ×Á, úÏÑ ëÏÞÅÔËÏ×Á, íÉÈÁÉÌ äÁ×ÙÄÏ×, ìÅ× õËÏÌÏ×, åÌÅÎÁ çÉÌÌÅÒ, áÎÖÅÌÉËÁ ëÁÛÉÃÙÎÁ, îÁÄÅÖÄÁ é×ÁÎÏ×Á, àÒÉÊ óÙÓÏÅ×, áÎÄÒÅÊ ëÉÓÔÅÎÅ×, ÷ÁÄÉÍ òÙÖËÏ× É ÄÒ. 01700 1aëÏÐÁÓÏ×Ábì.÷.gìÉÄÉÑ ÷ÁÓÉÌØÅ×ÎÁ3RU\NLR\auth\7719704070 01700 1aëÏÞÅÔËÏ×Ábú.gúÏÑ3RU\NLR\auth\7719714070 01700 1aäÁ×ÙÄÏ×bí.gíÉÈÁÉÌ3RU\NLR\auth\7719724070 01700 1aõËÏÌÏ×bì.gìÅ×3RU\NLR\auth\7719734070 01700 1açÉÌÌÅÒbå.gåÌÅÎÁ3RU\NLR\auth\7719744070 01700 1aëÁÛÉÃÙÎÁbá.gáÎÖÅÌÉËÁ3RU\NLR\auth\7719754070 01700 1aé×ÁÎÏ×Ábî.gîÁÄÅÖÄÁ3RU\NLR\auth\7719764070 01700 1aóÙÓÏÅ×bà.gàÒÉÊ3RU\NLR\auth\7719774070 01700 1aëÉÓÔÅÎÅ×bá.gáÎÄÒÅÊ3RU\NLR\auth\7719784070 01700 1aòÙÖËÏ×b÷.g÷ÁÄÉÍ3RU\NLR\auth\7719794070 aû6(2=ò)75-52rubbk aû6(2=ò)75-9992rubbk aû6(2=ò)75-972rubbk 1aïÒÌÉÎbá. é.gáÎÁÔÏÌÉÊ é×ÁÎÏ×ÉÞ3RU\NLR\auth\7719694340 1aëÏÐÁÓÏ×Ábì. ÷.f1947-gìÉÄÉÑ ÷ÁÓÉÌØÅ×ÎÁ3RU\NLR\auth\7719704220023RU\NLR\auth\8810006266aìÏÓÉÎÏÏÓÔÒÏ×ÓËÉÊ ÜÌÅËÔÒÏÔÅÈÎÉÞÅÓËÉÊ Ú-ÄcíÏÓË×Á4570 0aRUbNLRc19980408gPSBO aóÏÓÔ.ÒÁÓËÒÙÔ ÐÏ ËÎ. aNLRj97-4/945200713nam1 2200205 i 450 001001800000005001700018100004100035101000800076102000700084105001800091200013000109210002300239215000700262225003300269606004400302686001900346712009400365801002800459899002000487RU\NLR\bibl\1643819990709112931.0 a19990317g19989999u||y0rusy0102 ca0 arus aRU ay g 00|yy1 a1000 É 1 ÓÔÁÔØÑ "ÐÒÏ ÜÔÏ"eëÌÁÄÅÚØ ÍÕÄÒÏÓÔÉe[óÂ. ÓÔ. ÕÞÁÝÉÈÓÑ ãðæó "åÄÉÎÅÎÉÅ"]fãÅÎÔÒ ÐÓÉÈÏÆÉÚ. ÓÏ×ÅÒÛÅÎÓÔ×Ï×ÁÎÉÑ "åÄÉÎÅÎÉÅ" aí.cåÄÉÎÅÎÉÅd1998 d201 aóÅÒÉÑ "÷ÏÚÒÏÖÄÅÎÉÅ þÅÌÏ×ÅËÁ"0 aìÉÞÎÏÓÔØxóÁÍÏÓÏ×ÅÒÛÅÎÓÔ×Ï×ÁÎÉÅ2nlr-sh aà717.142rubbk023RU\NLR\auth\8810008373a"åÄÉÎÅÎÉÅ", ÃÅÎÔÒ ÐÓÉÈÏÆÉÚÉÞÅÓËÏÇÏ ÓÏ×ÅÒÛÅÎÓÔ×Ï×ÁÎÉÑcíÏÓË×Á4570 0aRUbNLRc19990317gPSBO aNLRj98-4/1365500503nam2 2200193 i 450 001001800000005001700018021002300035100004100058101000800099102000700107105001800114200001300132210000900145215001500154010002300169801002800192899002000220461006900240RU\NLR\bibl\1438919990702150355.0 aRU91580b98-33270 a19990225d1998 u||y0rusy0102 ca0 arus aRU aa g 00|yy0 a[÷ÙÐ. 2] d1998 a75 Ó.cÉÌ. a5-8040-0006-39500 0aRUbNLRc19990225gPSBO aNLRj98-4/13655 01001RU\NLR\bibl\1643812001 a1000 É 1 ÓÔÁÔØÑ "ÐÒÏ ÜÔÏ"v[÷ÙÐ. 2]00649nam1 2200217 i 450 001001800000005001700018100004100035101000800076102000700084105001800091200005300109205001500162210004300177215000700220010000900227606004100236606008300277686002400360801002800384899001900412RU\NLR\bibl\1100219990714142235.0 a19981224d19981998u||y0rusy0102 ca0 arus aRU a||||z 00|yy1 a1ó: ðÒÅÄÐÒÉÑÔÉÅeïÐÉÓÁÎÉÅ ×ÓÔÒÏÅÎ. ÑÚ.e[÷ 2 Þ.] a÷ÅÒÓÉÑ 7.5 aí.cæÉÒÍÁ "1ó"cáòô-âÉÚÎÅÓ-ãÅÎÔÒd1998 d21 985300 aðÒÅÄÐÒÉÑÔÉÑxëÏÍÐØÀÔÅÒÉÚÁÃÉÑ2nlr-sh0 a"1ó: ðÒÅÄÐÒÉÑÔÉÅ", Á×ÔÏÍÁÔÉÚÉÒÏ×ÁÎÎÁÑ ÓÉÓÔÅÍÁxðÒÏÇÒÁÍÍÎÏÅ ÏÂÅÓÐÅÞÅÎÉÅ2nlr-sh aõ29(0)×612Ñ72rubbk 0aRUbNLRc19981224gPSBO aNLRj98-3/386500503nam2 2200193 i 450 001001700000005001700017021002200034100004100056101000800097102000700105105001800112200000800130215002500138010001800163801002800181899001900209320002700228461005400255RU\NLR\bibl\889719990702151235.0 aRU9558b98-11795 a19981224d1998 u||y0rusy0102 ca0 arus aRU ay z 00|yy0 aþ.1 a[3],èVII,340,èèIV Ó. a5-7287-0139-6 0aRUbNLRc19981130gPSBO aNLRj98-3/3865 aðÒÅÄÍ. ÕËÁÚ.: Ó.I-XXIV 01001RU\NLR\bibl\1100212001 a1ó: ðÒÅÄÐÒÉÑÔÉÅvþ.100510nam2 2200193 i 450 001001700000005001700017021002200034100004100056101000800097102000700105105001800112200000800130215003100138010001800169801002800187899001900215320002800234461005400262RU\NLR\bibl\889819990702151333.0 aRU9558b98-11796 a19981224d1998 u||y0rusy0102 ca0 arus aRU ay z 00|yy0 aþ.2 a[4],XVII, 342-691, XXIV c. a5-7287-0140-è 0aRUbNLRc19981130gPSBO aNLRj98-3/3865 aðÒÅÄÍ. ÕËÁÚ.: Ó. I-XXIV 01001RU\NLR\bibl\1100212001 a1ó: ðÒÅÄÐÒÉÑÔÉÅvþ.201038nam1 2200265 i 450 001001800000005001700018010002400035100004100059101001300100102000800113105001800121200012800139205003000267210002600297215000700323300007300330313002100403454005900424606009100483606009600574686002700670700003000697801002800727899001700755RU\NLR\bibl\1895819990709113307.0 a5-7733-0062-193000 a19990330d1998 m||y0rusy0102 ca1 arusceng aUKR a||||z 00|yy1 aLINUXeòÕËÏ×ÏÄÓÔ×Ï ÐÏ ÏÐÅÒÁÃÉÏÎÎÏÊ ÓÉÓÔÅÍÅe[÷ 2 Ô.]fòÉÞÁÒÄ ðÅÔÅÒÓÅÎgðÅÒ. Ó ÁÎÇÌ. ó.í. ôÉÍÁÞÅ×ÁgðÏÄ ÒÅÄ. í.÷. ëÏÌÏÍÙÃÅ×Á a2-Å ÉÚÄ., ÐÅÒÅÒÁÂ. É ÄÏÐ. aëÉÅ× É ÄÒ.cBHVd1998 d23 aúÁÇÌ. É Á×Ô. ÏÒÉÇ.: Linux: The complete reference / Richard Petersen a1 ÉÚÄ. × çáë ÎÅÔ 012001 aLinuxeThe complete referencefRichard Petersen0 aLINUX, ÏÐÅÒÁÃÉÏÎÎÁÑ ÓÉÓÔÅÍÁ9òÕËÏ×ÏÄÓÔ×Á, ÐÏÓÏÂÉÑ É Ô.Ð.2nlr-sh3RU\NLR\auth\666421640 aINTERNET, ÉÎÆÏÒÍÁÃÉÏÎÎÁÑ ÓÉÓÔÅÍÁ9òÕËÏ×ÏÄÓÔ×Á, ÐÏÓÏÂÉÑ É Ô.Ð.2nlr-sh3RU\NLR\auth\66234270 aú973.23-018.2Ñ72rubbk 1aðÅÔÅÒÓÅÎbò.gòÉÞÁÒÄ4070 0aRUbNLRc19990330gPSBO aNLRj99-7/5700490nam2 2200193 i 450 001001800000005001700018021001900035100004100054101001300095102000800108105001800116200000900134215001600143010001800159801002800177899001700205320002900222461004500251RU\NLR\bibl\1867219990702151815.0 aRU921b99-382 a19990330d1998 m||y0rusy0102 ca1 arusceng aUKR aa z 001yy0 aô. 1 a527 c.cÉÌ. a5-7733-0063-X 0aRUbNLRc19990329gPSBO aNLRj99-7/57 aðÒÅÄÍ. ÕËÁÚ.: Ó. 517-521 01001RU\NLR\bibl\1895812001 aLINUXvô. 100490nam2 2200193 i 450 001001800000005001700018021001900035100004100054101001300095102000800108105001800116200000900134215001600143010001800159801002800177899001700205320002900222461004500251RU\NLR\bibl\1867319990702151941.0 aRU921b99-383 a19990330d1998 m||y0rusy0102 ca1 arusceng aUKR aa z 001yy0 aô. 2 a473 Ó.cÉÌ. a5-7733-0064-8 0aRUbNLRc19990329gPSBO aNLRj99-7/57 aðÒÅÄÍ. ÕËÁÚ.: Ó. 459-463 01001RU\NLR\bibl\1895812001 aLINUXvô. 200682nam1 2200217 i 450 001001700000005001700017100004100034101001300075102000700088105001800095200009000113210002500203215000700228606007500235686002100310801002800331899001800359225002900377313001400406702004400420RU\NLR\bibl\638019990714142349.0 a19981026d19971997u||y0rusy0102 ca1 aruscpol aRU a||||g 00|yy1 aMercedes-BenzeõÓÔÒÏÊÓÔ×Ï. ïÂÓÌÕÖÉ×ÁÎÉÅ. òÅÍÏÎÔe[÷ 2 Ô.fðÅÒ. Ó ÐÏÌ. ó. á. çÏÒÑÞÅ×Á] aóðÂ.cçÅÚÁ ëÏÍd1997 d300 aMercedes-Benz, ÇÒÕÚÏ×ÙÅ Á×ÔÏÍÏÂÉÌÉ ÍÁÌÏÔÏÎÎÁÖÎÙÅxüËÓÐÌÕÁÔÁÃÉÑ2nlr-sh aï335.4-082rubbk 0aRUbNLRc19981026gPSBO aNLRj98-8/1791 aíÉËÒÏÁ×ÔÏÂÕÓÙ ÓÔÒÁÎ ÍÉÒÁ aô.1 - ÎÅÔ 1açÏÒÑÞÅ×bó. á.3RU\NLR\auth\776522473000547nam2 2200193 i 450 001001700000005001700017021002100034100004100055101001300096102000700109105001800116200007800134210000900212215001600221010001800237801002800255899001800283461005200301RU\NLR\bibl\566419990702154343.0 aRU9310b98-6421 a19981026d1997 u||y0rusy0102 ca1 aruscpol aRU aa g 00|yy1 a[íÏÄÅÌÉ] 407D, 507D, 508D, 608D, 609D, 613D, 709D, 711D, 809D, 811D, 814D d1997 a205 Ó.cÉÌ. a5-7678-0006-5 0aRUbNLRc19980902gPSBO aNLRj98-8/179 01001RU\NLR\bibl\638012001 aMercedes-Benzvô. 201128nam0 2200301 i 450 001001400000005001700014010002400031021002300055100004100078101000800119102000700127105001800134200011100152210002300263215002900286225006900315320002600384320002900410461004600439606008500485686002000570686001700590702006900607702006200676801002800738830004100766899001900807RU\NLR\bibl\119990709122957.0 a5-225-02747-495000 aRU91324b97-31656 a19980121d1997 u||y0rusy0102 ca0 arus aRU aa z 00|y|1 aòÅ×ÍÁÔÉÞÅÓËÉÅ ÂÏÌÅÚÎÉf[óÏÓÔ.: î.÷. âÕÎÞÕË É ÄÒ.]gðÏÄ ÒÅÄ. ÁËÁÄ. òáíî ÷.á. îÁÓÏÎÏ×ÏÊ, Ä.Í.Î. î.÷. âÕÎÞÕËÁ aí.cíÅÄÉÃÉÎÁd1997 a520 Ó.cÉÌ., Ã×. ÉÌ.d271 aòÕËÏ×ÏÄÓÔ×Ï ÐÏ ×ÎÕÔÒ. ÂÏÌÅÚÎÑÍfðÏÄ ÏÂÝ. ÒÅÄ. ÁËÁÄ. å. é. þÁÚÏ×Á aâÉÂÌÉÏÇÒ.: Ó. 503-508 aðÒÅÄÍ. ÕËÁÚ.: Ó. 509-517 012001 aòÕËÏ×ÏÄÓÔ×Ï ÐÏ ×ÎÕÔÒÅÎÎÉÍ ÂÏÌÅÚÎÑÍ0 aòÅ×ÍÁÔÉÞÅÓËÉÅ ÂÏÌÅÚÎÉ9òÕËÏ×ÏÄÓÔ×Á, ÐÏÓÏÂÉÑ É Ô.Ð.2nlr-sh3RU\NLR\auth\66611783 aò419.1Ñ72rubbk aò41Ñ72rubbk 1aîÁÓÏÎÏ×Áb÷. á.g÷ÁÌÅÎÔÉÎÁ áÌÅËÓÁÎÄÒÏ×ÎÁ3RU\NLR\auth\773704340 1aâÕÎÞÕËbî. ÷.gîÉËÏÌÁÊ ÷ÁÓÉÌØÅ×ÉÞ3RU\NLR\auth\773714220 0aRUbNLRc19980120gPSBO aóÏÓÔÁ×ÉÔÅÌØ É ÒÅÄ. ÒÁÓËÒÙÔÙ ÐÏ ËÎÉÇÅ aNLRj97-7/130100622nam0 2200217 i 450 001001400000005001700014010002400031021002300055100004100078101001400119102000700133105001800140200004500158205001400203210002600217215003200243606005100275686003100326801002800357899001900385RU\NLR\bibl\219990709123437.0 a5-7102-0021-295000 aRU91324b97-31657 a19980121d1997 u||y0rusy0102 ca1 arusc9klm aRU aac z 00|a|1 aëÁÌÍÙÃËÉÅ ÎÁÒÏÄÎÙÅ ÓËÁÚËÉe[ðÅÒ. Ó ËÁÌÍ. aðÅÒÅÉÚÄ.] aüÌÉÓÔÁcäÖÁÎÇÁÒd1997 a447 Ó.cÃ×. ÉÌ., ÐÏÒÔÒ.d270 aóËÁÚËÉ ËÁÌÍÙÃËÉÅ2nlr-sh3RU\NLR\auth\66498992 aû3(235=ëÁÌÍ)-615.102rubbk 0aRUbNLRc19980120gPSBO aNLRj97-7/130200825nam0 2200253 i 450 001001400000005001700014010002500031021002300056100004100079101000800120102000700128105001800135200006500153205003000218210002700248215001500275300004300290606008100333686002400414700006000438801002800498830002600526899001900552RU\NLR\bibl\419990709123536.0 a5-7102-0149-9910000 aRU91324b97-31660 a19980121d1997 u||y0rusy0102 ca0 arus aRU ay z 00|y|1 aðÒÁËÔÉÞÅÓËÏÅ ÐÏÓÏÂÉÅ ÐÏ ÂÕÈÇÁÌÔÅÒÓËÏÍÕ ÕÞÅÔÕfð.é. ëÁÍÙÛÁÎÏ× a2-Å ÉÚÄ., ÄÏÐ. É ÐÅÒÅÒÁÂ. aí.côïï "ôÅÈÌÉÔ"d1997 a543 Ó.d22 a÷ ÐÒÅÄÉÓÌ. Á×Ô.: ëÁÍÙÛÁÎÏ× ð.é., ÐÒÏÆ.0 aâÕÈÇÁÌÔÅÒÓËÉÊ ÕÞÅÔ9òÕËÏ×ÏÄÓÔ×Á, ÐÏÓÏÂÉÑ É Ô.Ð.2nlr-sh3RU\NLR\auth\6687700 aõ052.9(2)2Ñ72rubbk 1aëÁÍÙÛÁÎÏ×bð. é.gðÅÔÒ é×ÁÎÏ×ÉÞ3RU\NLR\auth\773724070 0aRUbNLRc19980120gPSBO aá×Ô. ÒÁÓËÒÙÔ ÐÏ ËÎÉÇÅ aNLRj97-5/292301098nam0 2200277 i 450 001001400000005001700014010002400031021002300055100004100078101000800119102000700127105001800134200010400152210004600256215001500302300007500317320002500392606006700417606009000484686002600574700006500600701006900665801002800734830003900762899001900801RU\NLR\bibl\519990709123617.0 a5-7455-0935-È92000 aRU91324b97-31662 a19980120d1997 u||y0rusy0102 ca0 arus aRU ay z 00|y|1 aæÉÎÁÎÓÏ×Ï-ÉÎ×ÅÓÔÉÃÉÏÎÎÙÊ ÁÎÁÌÉÚ É ÁÕÄÉÔ ËÏÍÍÅÒÞÅÓËÉÈ ÏÒÇÁÎÉÚÁÃÉÊfì.ô. çÉÌÑÒÏ×ÓËÁÑ, ä.á. åÎÄÏ×ÉÃËÉÊ a÷ÏÒÏÎÅÖcéÚÄ-×Ï ÷ÏÒÏÎÅÖ. ÇÏÓ. ÕÎ-ÔÁd1997 a333 Ó.d20 a÷ ÐÒÅÄÉÓÌ. Á×Ô.: Ä.Ü.Î. ì.ô. çÉÌÑÒÏ×ÓËÁÑ, Ë.Ü.Î., ÄÏÃ. ä.á. åÎÄÏ×ÉÃËÉÊ aâÉÂÌÉÏÇÒ.: Ó.330-3320 aëÏÍÍÅÒÞÅÓËÉÅ ÐÒÅÄÐÒÉÑÔÉÑxáÕÄÉÔ2nlr-sh3RU\NLR\auth\6612450110 aëÏÍÍÅÒÞÅÓËÉÅ ÐÒÅÄÐÒÉÑÔÉÑxëÁÐÉÔÁÌØÎÙÅ ×ÌÏÖÅÎÉÑxáÎÁÌÉÚ2nlr-sh3RU\NLR\auth\661245012 aõ052.9(2)2-2182rubbk 1açÉÌÑÒÏ×ÓËÁÑbì. ô.gìÉÌÉÑ ôÉÍÏÆÅÅ×ÎÁ3RU\NLR\auth\773734070 1aåÎÄÏ×ÉÃËÉÊbä. á.gäÍÉÔÒÉÊ áÌÅËÓÁÎÄÒÏ×ÉÞ3RU\NLR\auth\773744070 0aRUbNLRc19980120gPSBO aéÎÉÃÉÁÌÙ Á×ÔÏÒÏ× ÒÁÓËÒÙÔÙ ÐÏ ËÎÉÇÅ aNLRj97-3/962200938nam0 2200277 i 450 001001400000005001700014010002500031021002300056100004100079101001300120102000700133105001800140200007200158205001300230210002600243215002400269300005500293300008400348300002700432512004400459686003000503700005400533801002800587830002600615899001900641RU\NLR\bibl\619990709123702.0 a5-09-007624-3950000 aRU91324b97-31664 a19980121d1997 u||y0rusy0102 ca0 arusager aRU aa j 00|y|1 aîÅÍÅÃËÉÊ ÑÚÙËeõÞÅÂ. ÄÌÑ 5 ËÌ. ÏÂÝÅÏÂÒÁÚÏ×ÁÔ. ÕÞÒÅÖÄÅÎÉÊfé. ì. âÉÍ a3-Å ÉÚÄ. aí.cðÒÏÓ×ÅÝÅÎÉÅd1997 a302 Ó.cÃ×. ÉÌ.d22 aúÁÇÌ. ÏÂÌ.: Lehrbuch Deutsch die ersten Schritte 5 aîÁ ÏÂÏÒÏÔÅ ÔÉÔ. Ì. Á×Ô.: Ä.Ð.Î., ÐÒÏÆ., ÞÌ.-ËÏÒÒ. òÏÓ. áËÁÄ. ÐÅÄ. ÎÁÕË é.ì. âÉÍ aîÁ ÏÂÌ. Á×Ô. ÎÅ ÕËÁÚÁÎ1 aLehrbuch Deutsch die ersten Schritte 5 aû143.24-93ÒÕÓ21[5]2rubbk 1aâÉÍbé. ì.géÎÅÓÓÁ ìØ×Ï×ÎÁ3RU\NLR\auth\77854070 0aRUbNLRc19980120gPSBO aá×Ô. ÒÁÓËÒÙÔ ÐÏ ËÎÉÇÅ aNLRj97-5/292400906nam0 2200253 i 450 001001400000005001700014010002400031021002300055100004100078101000800119102000700127105001800134200012500152210002900277215001400306225002700320606008700347606008100434686002200515686002300537700004400560801002800604899002000632RU\NLR\bibl\819990709123753.0 a5-7849-0089-793000 aRU91324b97-31669 a19980121d1997 u||y0rusy0102 ca0 arus aRU ay z 00|y|1 aâÕÈÇÁÌÔÅÒÓËÉÊ ÕÞÅÔ É ÎÁÌÏÇÏÏÂÌÏÖÅÎÉÅ × ÐÏÔÒÅÂÉÔÅÌØÓËÉÈ ÏÂÝÅÓÔ×ÁÈ (öóë, çóë é ÓÁÄÏ×ÏÄÞÅÓËÉÈ ÔÏ×ÁÒÉÝÅÓÔ×ÁÈ)fë.ç. ðÁÒÆÅÎÏ× aí.cúáï "âÕÈ.ÂÀÌ."d1997 a57 Ó.d212 aâ-ËÁ ÖÕÒÎ. "âÕÈ. ÂÀÌ."0 aðÏÔÒÅÂÉÔÅÌØÓËÉÅ ÏÂÝÅÓÔ×ÁxóÞÅÔÏ×ÏÄÓÔ×Ï É ÏÔÞÅÔÎÏÓÔØ2nlr-sh3RU\NLR\auth\6612450140 aðÏÔÒÅÂÉÔÅÌØÓËÉÅ ÏÂÝÅÓÔ×ÁxîÁÌÏÇÏ×ÏÅ ÏÂÌÏÖÅÎÉÅ2nlr-sh3RU\NLR\auth\661245016 aõ052.9(2)22rubbk aõ26(2)141.32rubbk 1aðÁÒÆÅÎÏ×bë. ç.3RU\NLR\auth\773754070 0aRUbNLRc19980120gPSBO aNLRj97-4/1334201171nam0 2200265 i 450 001001400000005001700014010000800031021002300039100004100062101000800103102000700111105001800118200025400136210002100390215001400411606009200425606009600517686002200613700006200635701006600697701006300763801002800826830003200854899001900886RU\NLR\bibl\919990709123826.0 9460 aRU91324b97-31670 a19980121d1997 u||y0rusy0102 ca0 arus aRU ay z 00|y|1 aíÅÔÏÄÉÞÅÓËÉÅ ÒÅËÏÍÅÎÄÁÃÉÉ ÐÏ ÏÐÒÅÄÅÌÅÎÉÀ ÏÄÎÏÒÏÄÎÏÓÔÉ ÔÏ×ÁÒÏ× É ÕÓÌÕÇ ÐÒÉ ÜËÓÐÅÒÔÉÚÅ ÚÁÑ×ÏË ÎÁ ÒÅÇÉÓÔÒÁÃÉÀ ÔÏ×ÁÒÎÙÈ ÚÎÁËÏ× É ÚÎÁËÏ× ÏÂÓÌÕÖÉ×ÁÎÉÑfî.ð. çÒÅÛÎÅ×Á, ÷.÷. ïÒÌÏ×Á, ÷.â. ôÁÌÑÎÓËÉÊgòÏÓ. ÁÇÅÎÔÓÔ×Ï ÐÏ ÐÁÔ. É ÔÏ×ÁÒ. ÚÎÁËÁÍ, ÷îéé ÐÁÔ. ÉÎÆÏÒÍ. aí.c÷îééðéd1997 a14 Ó.d210 aôÏ×ÁÒÎÙÅ ÚÎÁËÉxúÁÑ×ËÉxüËÓÐÅÒÔÉÚÁ9íÅÔÏÄÉÞÅÓËÉÅ ÐÏÓÏÂÉÑ2nlr-sh3RU\NLR\auth\6612453180 aúÎÁËÉ ÏÂÓÌÕÖÉ×ÁÎÉÑxúÁÑ×ËÉxüËÓÐÅÒÔÉÚÁ9íÅÔÏÄÉÞÅÓËÉÅ ÐÏÓÏÂÉÑ2nlr-sh3RU\NLR\auth\661245319 aè623.43Ñ782rubbk 1açÒÅÛÎÅ×Ábî. ð.gîÁÔÁÌÉÑ ðÅÔÒÏ×ÎÁ3RU\NLR\auth\773764070 1aïÒÌÏ×Áb÷. ÷.g÷ÁÌÅÎÔÉÎÁ ÷ÌÁÄÉÍÉÒÏ×ÎÁ3RU\NLR\auth\773774070 1aôÁÌÑÎÓËÉÊb÷. â.g÷ÉËÔÏÒ âÏÒÉÓÏ×ÉÞ3RU\NLR\auth\773784070 0aRUbNLRc19980120gPSBO a÷ÓÅ Á×ÔÏÒÙ ÒÁÓËÒÙÔÙ × ËÎÉÇÅ aNLRj97-6/167401186nam0 2200301 i 450 001001500000005001700015010002400032021002300056100004100079101001300120102000700133105001800140200010200158210002800260215002900288300006700317300015100384320002800535320002600563320002600589454005200615606005500667606005000722686002200772700004300794801002800837899001900865RU\NLR\bibl\1019990709123907.0 a5-88782-237-691000 aRU91362b97-32501 a19980121d1997 u||y0rusy0102 ca1 arusceng aRU aa g 00|y|1 aöÅÌÔÙÅ ÓÔÒÁÎÉÃÙ Internet & WebeíÅÖÄÕÎÁÒ. ÒÅÓÕÒÓÙ '97fèÁÒÌÉ èÁÎg[ðÅÒ. Ó ÁÎÇÌ. î. âÌÑÈÍÁÎ É ÄÒ.] aóÐÂ. É ÄÒ.cðÉÔÅÒd1997 a798 Ó.cÉÌ.eÄÉÓËÅÔÁd29 aúÁÇÌ. É Á×Ô. ÏÒÉÇ.: Internet & Web Yellow pages / Harley Hahn aîÁ 4-Ê Ó. Á×Ô.: èÁÒÌÉ èÁÎ ÂÁËÁÌÁ×Ò ÍÁÔÅÍÁÔÉËÉ É ×ÙÞÉÓÌ. ÔÅÈÎÉËÉ × ÕÎ-ÔÅ ÷ÁÔÅÒÌÏÏ × ëÁÎÁÄÅ É ÍÁÇÉÓÔÒ ×ÙÞÉÓÌ. ÔÅÈÎÉËÉ × ÕÎ-ÔÅ óÁÎ-äÉÅÇÏ, ëÁÌÉÆÏÒÎÉÑ aóÐÉÓÏË ÒÁÂÏÔ Á×Ô.: Ó. 4 aôÅÍÁÔ. ÕËÁÚ.: Ó. 9-10 aáÌÆ. ÕÁÚ.: Ó. 795-798 012001 aInternet & Web Yellow pagesfHarley Hahn0 aINTERNET, ÉÎÆÏÒÍÁÃÉÏÎÎÁÑ ÓÉÓÔÅÍÁ9ëÁÔÁÌÏÇÉ2nlr-sh0 aWWW, ÉÎÆÏÒÍÁÃÉÏÎÎÁÑ ÓÉÓÔÅÍÁ9ëÁÔÁÌÏÇÉ2nlr-sh aú988.02Ñ872rubbk 1aèÁÎbè.gèÁÒÌÉ3RU\NLR\auth\773804070 0aRUbNLRc19980120gPSBO aNLRj97-8/122100766nam1 2200205 i 450 001001700000005001700017100004100034101000800075102000800083105001800091109000600109200027400115205001500389210003300404215000700437686002300444700004600467801002800513899001900541RU\NLR\bibl\208119990714144841.0 a19980623g19 9999u||y0rusy0102 ca0 arus aDDR a||||z 00|a| ab1 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊe÷ 6 Ô.eó ÐÒÉÌ. ËÒÉÔ. ÓÔ. Ï Ô×ÏÒÞÅÓÔ×Å Á×Ô., ÍÁÔÅÒÉÁÌÏ× Ï ÐÒÉÓÕÖÄÅÎÉÉ ÅÍÕ îÏÂÅÌÅ×. ÐÒÅÍÉÉ,ÂÉÂÌÉÏÇÒ. ÅÇÏ ÐÒÏÉÚ×ÅÄÅÎÉÊ É ÄÏËÕÍÅÎÔÏ× ÐÏ ÔÁË ÎÁÚÙ×ÁÅÍÏÍÕ "ÄÅÌÕ óÏÌÖÅÎÉÃÙÎÁ"fáÌÅËÓÁÎÄÒ óÏÌÖÅÎÉÃÙÎ gó×ÅÒËÁ Á×Ô. ÔÅËÓÔÏ× É ÒÅÄ. ÐÒÉÌ. ÐÒÏ×ÅÄÅÎÙ á.î. áÒÔÅÍÏ×ÏÊ a[2-Å ÉÚÄ.] aFrankfurt a. M.cðÏÓÅ×d1971 d21 aû6(2=ò)7Ñ442rubbk 1aóÏÌÖÅÎÉÃÙÎbá. é.gáÌÅËÓÁÎÄÒ éÓÁÅ×ÉÞ4070 0aRUbNLRc19980623gPSBO aNLRj98-3/155400476nam2 2200181 i 450 001001700000005001700017100004100034101000800075102000800083105001800091109000600109200004000115210000900155215002600164801002800190899001900218461005700237RU\NLR\bibl\190919990702154854.0 a19980623d1971 u||y0rusy0102 ca0 arus aDDR ac z 00|a| ab1 a÷ ËÒÕÇÅ ÐÅÒ×ÏÍeòÏÍÁÎi(çÌ.1-ÇÌ.47) d1971 a410 Ó., [1] Ì. ÐÏÒÔÒ. 0aRUbNLRc19980617gPSBO aNLRj98-3/1554 01001RU\NLR\bibl\208112001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 300471nam2 2200181 i 450 001001700000005001700017100004100034101000800075102000800083105001800091109000600109200004100115210000900156215002000165801002800185899001900213461005700232RU\NLR\bibl\191019990702154804.0 a19980623d1971 u||y0rusy0102 ca0 arus aDDR aa z 00|a| ab1 a÷ ËÒÕÇÅ ÐÅÒ×ÏÍeòÏÍÁÎi(çÌ.48-ÇÌ.87) d1971 a[3], 409-806 Ó. 0aRUbNLRc19980617gPSBO aNLRj98-3/1554 01001RU\NLR\bibl\208112001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 401102nam2 2200277 i 450 001001700000005001700017100004100034101000800075102000800083105001800091109000600109200002800115210000900143215001100152801002800163899001900191327024600210461005700456464003600513464005500549464003000604464004400634464004500678464006100723464004000784RU\NLR\bibl\191219990702155920.0 a19980623d1971 u||y0rusy0102 ca0 arus aDDR ay z 00|a| ab1 aðØÅÓÙaòÁÓÓËÁÚÙaóÔÁÔØÉ d1971 a271 Ó. 0aRUbNLRc19980617gPSBO aNLRj98-3/15541 aóÏÄÅÒÖ.: ðØÅÓÙ: ïÌÅÎØ É ÛÁÌÁÛÏ×ËÁ; ó×ÅÞÁ ÎÁ ×ÅÔÒÕ (ó×ÅÔ, ËÏÔÏÒÙÊ × ÔÅÂÅ); òÁÓÓËÁÚÙ: ðÒÁ×ÁÑ ËÉÓÔØ; ëÒÏÈÏÔÎÙÅ ÒÁÓÓËÁÚÙ; ðÁÓÈÁÌØÎÙÊ ËÒÅÓÔÎÙÊ ÈÏÄ; óÔÁÔØÉ: þÉÔÁÀÔ "é×ÁÎÁ äÅÎÉÓÏ×ÉÞÁ"; îÅ ÏÂÙÞÁÊ ÄÅÇÔÅÍ ÝÉ ÂÅÌÉÔØ, ÎÁ ÔÏ ÓÍÅÔÁÎÁ; ïÔ×ÅÔ ÔÒÅÍ ÓÔÕÄÅÎÔÁÍ 01001RU\NLR\bibl\208112001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 5 012001 aïÌÅÎØ É ÛÁÌÁÛÏ×ËÁeðØÅÓÁ 012001 aó×ÅÞÁ ÎÁ ×ÅÔÒÕ (ó×ÅÔ ËÏÔÏÒÙÊ × ÔÅÂÅ)eðØÅÓÁ 012001 aëÒÏÈÏÔÎÙÅ ÒÁÓÓËÁÚÙ 012001 aðÁÓÈÁÌØÎÙÊ ËÒÅÓÔÎÙÊ ÈÏÄeòÁÓÓËÁÚ 012001 aþÉÔÁÀÔ "é×ÁÎÁ äÅÎÉÓÏ×ÉÞÁ"eóÔÁÔØÑ 012001 aîÅ ÏÂÙÞÁÊ ÄÅÇÔÅÍ ÝÉ ÂÅÌÉÔØ, ÎÁ ÔÏ ÓÍÅÔÁÎÁeóÔÁÔØÑ 012001 aïÔ×ÅÔ ÔÒÅÍ ÓÔÕÄÅÎÔÁÍeóÔÁÔØÑ00545nam1 2200193 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200004500120210003700165215000700202686002300209700007200232801002800304899001900332RU\NLR\bibl\258019990709122824.0 a19980703g19789999u||y0rusy0102 ca0 arus aUSAaFRA a||||z 00|a| ab1 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊfáÌÅËÓÁÎÄÒ óÏÌÖÅÎÉÃÙÎ a÷ÅÒÍÏÎÔaðÁÒÉÖcYMCA-pressd1978 d23 aû6(2=ò)7Ñ442rubbk 1aóÏÌÖÅÎÉÃÙÎbá. é.f1918-gáÌÅËÓÁÎÄÒ éÓÁÅ×ÉÞ3RU\NLR\auth\772304070 0aRUbNLRc19980703gPSBO aNLRj97-5/249500479nam2 2200181 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200003800120210000900158215002600167801002800193899001900221461005700240RU\NLR\bibl\244419990702160238.0 a19980703d1978 u||y0rusy0102 ca0 arus aUSAaFRA ac z 00|a| ab1 a÷ ËÒÕÇÅ ÐÅÒ×ÏÍeòÏÍÁÎi[çÌ. 1-52] d1978 a419 Ó., [1] Ì. ÐÏÒÔÒ. 0aRUbNLRc19980702gPSBO aNLRj97-5/2495 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 100480nam2 2200181 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200003900120210000900159215002600168801002800194899001900222461005700241RU\NLR\bibl\244519990702160345.0 a19980703d1978 u||y0rusy0102 ca0 arus aUSAaFRA ac z 00|a| ab1 a÷ ËÒÕÇÅ ÐÅÒ×ÏÍeòÏÍÁÎi[çÌ. 53-96] d1978 a404 Ó., [1] Ì. ÐÏÒÔÒ. 0aRUbNLRc19980702gPSBO aNLRj97-5/2495 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 201017nam2 2200301 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200001300120210000900133215002600142801002800168899001900196320003700215327017400252461005700426464003800483464002500521464002000546464002400566464003900590464002700629464002400656464003500680RU\NLR\bibl\244719990702160459.0 a19980703d1978 u||y0rusy0102 ca0 arus aUSAaFRA ac z 00|a| ab1 aòÁÓÓËÁÚÙ d1978 a327 Ó., [1] Ì. ÐÏÒÔÒ. 0aRUbNLRc19980702gPSBO aNLRj97-5/2495 aâÉÂÌÉÏÇÒ. × ËÏÍÍÅÎÔ.: Ó. 326-3271 aóÏÄÅÒÖ.: ïÄÉÎ ÄÅÎØ é×ÁÎÁ äÅÎÉÓÏ×ÉÞÁ; íÁÔÒÅÎÉÎ Ä×ÏÒ; ëÒÏÈÏÔËÉ; ðÒÁ×ÁÑ ËÉÓÔØ; óÌÕÞÁÊ ÎÁ ÓÔÁÎÃÉÉ ëÏÞÅÔÏ×ËÁ; äÌÑ ÐÏÌØÚÙ ÄÅÌÁ; úÁÈÁÒ-ëÁÌÉÔÁ; ëÁË ÖÁÌØ; ðÁÓÈÁÌØÎÙÊ ËÒÅÓÔÎÙÊ ÈÏÄ 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 3 012001 aïÄÉÎ ÄÅÎØ é×ÁÎÁ äÅÎÉÓÏ×ÉÞÁ 012001 aíÁÔÒÅÎÉÎ Ä×ÏÒ 012001 aëÒÏÈÏÔËÉ 012001 aðÒÁ×ÁÑ ËÉÓÔØ 012001 aóÌÕÞÁÊ ÎÁ ÓÔÁÎÃÉÉ ëÏÞÅÔÏ×ËÁ 012001 aäÌÑ ÐÏÌØÚÙ ÄÅÌÁ 012001 aúÁÈÁÒ-ëÁÌÉÔÁ 012001 aðÁÓÈÁÌØÎÙÊ ËÒÅÓÔÎÙÊ ÈÏÄ00469nam2 2200181 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200002800120210000900148215002600157801002800183899001900211461005700230RU\NLR\bibl\244819990702160557.0 a19980703d1979 u||y0rusy0102 ca0 arus aUSAaFRA ac z 00|a| ab1 aòÁËÏ×ÙÊ ËÏÒÐÕÓeðÏ×ÅÓÔØ d1979 a505 Ó., [1] Ì. ÐÏÒÔÒ. 0aRUbNLRc19980702gPSBO aNLRj97-5/2495 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 400547nam2 2200193 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200006200120210000900182215002600191801002800217899001900245320003200264461005700296RU\NLR\bibl\244919990702160644.0 a19980706d1980 u||y0rusy0102 ca0 arus aUSAaFRA ac z 00|a| ab1 aáÒÈÉÐÅÌÁÇ çõìáç, 1918-1956eïÐÙÔ. ÈÕÄÏÖ. ÉÓÓÌÅÄi[þ.] 1-2 d1980 a589 Ó., [1] Ì. ÐÏÒÔÒ. 0aRUbNLRc19980702gPSBO aNLRj97-5/2495 aâÉÂÌÉÏÇÒ. × ÐÏÄÓÔÒÏÞ. ÐÒÉÍ. 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 500551nam2 2200193 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200006100120210000900181215003100190801002800221899001900249320003200268461005700300RU\NLR\bibl\245019990702160736.0 a19980706d1980 u||y0rusy0102 ca0 arus aUSAaFRA aac z 00|a| ab1 aáÒÈÉÐÅÌÁÇ çõìáç, 1918-1956eïÐÙÔ ÈÕÄÏÖ. ÉÓÓÌÅÄi[þ.] 3-4 d1980 a638 Ó., [8] Ì. ÉÌ., ÐÏÒÔÒ. 0aRUbNLRc19980702gPSBO aNLRj97-5/2495 aâÉÂÌÉÏÇÒ. × ÐÏÄÓÔÒÏÞ. ÐÒÉÍ. 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 600553nam2 2200193 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200006300120210000900183215003100192801002800223899001900251320003200270461005700302RU\NLR\bibl\245119990702160849.0 a19980706d1980 u||y0rusy0102 ca0 arus aUSAaFRA aac z 00|a| ab1 aáÒÈÉÐÅÌÁÇ çõìáç, 1918-1956eïÐÙÔ ÈÕÄÏÖ. ÉÓÓÌÅÄi[þ.] 5-6-7 d1980 a573 Ó., [3] Ì. ÉÌ., ÐÏÒÔÒ. 0aRUbNLRc19980702gPSBO aNLRj97-5/2495 aâÉÂÌÉÏÇÒ. × ÐÏÄÓÔÒÏÞ. ÐÒÉÍ. 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 700777nam2 2200241 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200002500120210000900145215002600154801002800180899001900208327011600227461005700343464004900400464003600449464003000485464002000515RU\NLR\bibl\245219990702160957.0 a19980706d1981 u||y0rusy0102 ca0 arus aUSAaFRA ac z 00|a| ab1 aðØÅÓÙ É ËÉÎÏÓÃÅÎÁÒÉÉ d1981 a594 Ó., [1] Ì. ÐÏÒÔÒ. 0aRUbNLRc19980702gPSBO aNLRj97-5/24951 aóÏÄÅÒÖ.: äÒÁÍÁÔÉÞÅÓËÁÑ ÔÒÉÌÏÇÉÑ "1945 ÇÏÄ"; ó×ÅÔ, ËÏÔÏÒÙÊ × ÔÅÂÅ (ó×ÅÞÁ ÎÁ ×ÅÔÒÕ); úÎÁÀÔ ÉÓÔÉÎÕ ÔÁÎËÉ; ôÕÎÅÑÄÅà 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 8 012001 aó×ÅÔ, ËÏÔÏÒÙÊ × ÔÅÂÅ (ó×ÅÞÁ ÎÁ ×ÅÔÒÕ) 012001 a1945 ÇÏÄeäÒÁÍ. ÔÒÉÌÏÇÉÑ 012001 aúÎÁÀÔ ÉÓÔÉÎÕ ÔÁÎËÉ 012001 aôÕÎÅÑÄÅÃ00615nam2 2200205 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200002900120210000900149215002600158801002800184899001900212320004600231327007500277461005700352RU\NLR\bibl\245319990702161052.0 a19980706d1981 u||y0rusy0102 ca0 arus aUSAaFRA ac z 00|a| ab1 aðÕÂÌÉÃÉÓÔÉËÁeóÔ. É ÒÅÞÉ d1981 a374 Ó., [1] Ì. ÐÏÒÔÒ. 0aRUbNLRc19980702gPSBO aNLRj97-5/2495 aâÉÂÌÉÏÇÒ.: Ó. 367-373 É × ÐÏÄÓÔÒÏÞ. ÐÒÉÍ.1 aóÏÄÅÒÖ.: òÁÚÄÅÌÙ: ÷ óÏ×ÅÔÓËÏÍ óÏÀÚÅ (1969-1974); îÁ úÁÐÁÄÅ (1974-1980) 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 900678nam2 2200205 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200006500120210000900185215002600194801002800220899001900248320003700267327011000304461005800414RU\NLR\bibl\245419990702161206.0 a19980706d1978 u||y0rusy0102 ca0 arus aUSAaFRA ac z 00|a| ab1 aðÕÂÌÉÃÉÓÔÉËÁeïÂÝÅÓÔ×. ÚÁÑ×ÌÅÎÉÑ, ÉÎÔÅÒרÀ, ÐÒÅÓÓËÏÎÆÅÒÅÎÃÉÉ d1983 a594 Ó., [1] Ì. ÐÏÒÔÒ. 0aRUbNLRc19980702gPSBO aNLRj97-5/2495 aâÉÂÌÉÏÇÒ. × ËÏÍÍÅÎÔ.: Ó. 573-5891 aóÏÄÅÒÖ.: òÁÚÄÅÌÙ: ÷ óÏ×ÅÔÓËÏÍ óÏÀÚÅ (1966-1974); îÁ úÁÐÁÄÅ (1974-1981); ðÒÅÄÉÓÌÏ×ÉÑ; ï ÌÉÔÅÒÁÔÕÒÅ É ÑÚÙËÅ 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 1000555nam2 2200181 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200010600120210000900226215003300235801002800268899001900296461005800315RU\NLR\bibl\245519990702162702.0 a19980706d1983 u||y0rusy0102 ca0 arus aUSAaFRA abc z 00|a| ab1 aëÒÁÓÎÏÅ ËÏÌÅÓÏeðÏ×ÅÓÔ×Ï×ÁÎØÅ × ÏÔÍÅÒ. ÓÒÏËÁÈhõÚÅÌ 1iá×ÇÕÓÔ ÞÅÔÙÒÎÁÄÃÁÔÏÇÏ [(10-21 Á×Ç.)içÌ. 1-48] d1983 a467 Ó., [1] Ì. ÐÏÒÔÒ.cËÁÒÔ. 0aRUbNLRc19980702gPSBO aNLRj97-5/2495 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 1100583nam2 2200193 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200010700120210000900227215001100236801002800247899001900275320003700294461005800331RU\NLR\bibl\245619990702162807.0 a19980706d1983 u||y0rusy0102 ca0 arus aUSAaFRA ay z 00|a| ab1 aëÒÁÓÎÏÅ ËÏÌÅÓÏeðÏ×ÅÓÔ×Ï×ÁÎØÅ × ÏÔÍÅÒ. ÓÒÏËÁÈhõÚÅÌ 1iá×ÇÕÓÔ ÞÅÔÙÒÎÁÄÃÁÔÏÇÏ [(10-21 Á×Ç.)içÌ. 49-82] d1983 a546 Ó. 0aRUbNLRc19980702gPSBO aNLRj97-5/2495 aâÉÂÌÉÏÇÒ. × ËÏÍÍÅÎÔ.: Ó. 545-546 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 1200553nam2 2200181 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200011100120210000900231215002600240801002800266899001900294461005800313RU\NLR\bibl\245719990702162855.0 a19980706d1984 u||y0rusy0102 ca0 arus aUSAaFRA ac z 00|a| ab1 aëÒÁÓÎÏÅ ËÏÌÅÓÏeðÏ×ÅÓÔ×Ï×ÁÎØÅ × ÏÔÍÅÒ. ÓÒÏËÁÈhõÚÅÌ 2iïËÔÑÂÒØ ÛÅÓÔÎÁÄÃÁÔÏÇÏ [(14 ÏËÔ.-4 ÎÏÑÂ.)içÌ. 1-37] d1984 a592 Ó., [1] Ì. ÐÏÒÔÒ. 0aRUbNLRc19980702gPSBO aNLRj97-5/2495 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 1300583nam2 2200193 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200011200120210000900232215001100241801002800252899001900280320003200299461005800331RU\NLR\bibl\245819990702162959.0 a19980706d1984 u||y0rusy0102 ca0 arus aUSAaFRA ay z 00|a| ab1 aëÒÁÓÎÏÅ ËÏÌÅÓÏeðÏ×ÅÓÔ×Ï×ÁÎØÅ × ÏÔÍÅÒ. ÓÒÏËÁÈhõÚÅÌ 2iïËÔÑÂÒØ ÛÅÓÔÎÁÄÃÁÔÏÇÏ [(14 ÏËÔ.-4 ÎÏÑÂ.)içÌ. 38-75] d1984 a589 Ó. 0aRUbNLRc19980702gPSBO aNLRj97-5/2495 aâÉÌÉÏÇÒ. × ËÏÍÍÅÎÔ.: Ó. 589 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 1400552nam2 2200181 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200011000120210000900230215002600239801002800265899001900293461005800312RU\NLR\bibl\245919990702163115.0 a19980706d1986 u||y0rusy0102 ca0 arus aUSAaFRA ac z 00|a| ab1 aëÒÁÓÎÏÅ ËÏÌÅÓÏeðÏ×ÅÓÔ×Ï×ÁÎØÅ × ÏÔÍÅÒ. ÓÒÏËÁÈhõÚÅÌ 3iíÁÒÔ ÓÅÍÎÁÄÃÁÔÏÇÏ [(23 ÆÅ×Ò.-18 ÍÁÒÔÁ)içÌ. 1-170] d1986 a712 Ó., [1] Ì. ÐÏÒÔÒ. 0aRUbNLRc19980702gPSBO aNLRj97-5/2495 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 1500538nam2 2200181 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200011100120210000900231215001100240801002800251899001900279461005800298RU\NLR\bibl\246019990702163200.0 a19980706d1986 u||y0rusy0102 ca0 arus aUSAaFRA ay z 00|a| ab1 aëÒÁÓÎÏÅ ËÏÌÅÓÏeðÏ×ÅÓÔ×Ï×ÁÎØÅ × ÏÔÍÅÒ. ÓÒÏËÁÈhõÚÅÌ 3iíÁÒÔ ÓÅÍÎÁÄÃÁÔÏÇÏ [(28 ÆÅ×Ò.-2 ÍÁÒÔÁ)içÌ. 171-353] d1986 a758 Ó. 0aRUbNLRc19980702gPSBO aNLRj97-5/2495 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 1600539nam2 2200181 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200011200120210000900232215001100241801002800252899001900280461005800299RU\NLR\bibl\246119990702163315.0 a19980706d1987 u||y0rusy0102 ca0 arus aUSAaFRA ay z 00|a| ab1 aëÒÁÓÎÏÅ ËÏÌÅÓÏeðÏ×ÅÓÔ×Ï×ÁÎØÅ × ÏÔÍÅÒ. ÓÒÏËÁÈhõÚÅÌ 3iíÁÒÔ ÓÅÍÎÁÄÃÁÔÏÇÏ [(23 ÆÅ×Ò.-18 ÍÁÒÔÁ)içÌ. 354-531] d1987 a748 Ó. 0aRUbNLRc19980702gPSBO aNLRj97-5/2495 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 1700539nam2 2200181 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200011200120210000900232215001100241801002800252899001900280461005800299RU\NLR\bibl\246219990702163411.0 a19980706d1988 u||y0rusy0102 ca0 arus aUSAaFRA ay z 00|a| ab1 aëÒÁÓÎÏÅ ËÏÌÅÓÏeðÏ×ÅÓÔ×Ï×ÁÎØÅ × ÏÔÍÅÒ. ÓÒÏËÁÈhõÚÅÌ 3iíÁÒÔ ÓÅÍÎÁÄÃÁÔÏÇÏ [(23 ÆÅ×Ò.-18 ÍÁÒÔÁ)içÌ. 532-656] d1988 a680 Ó. 0aRUbNLRc19980702gPSBO aNLRj97-5/2495 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 1800549nam2 2200181 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200010700120210000900227215002600236801002800262899001900290461005800309RU\NLR\bibl\246319990702163840.0 a19980706d1991 u||y0rusy0102 ca0 arus aUSAaFRA ac z 00|a| ab1 aëÒÁÓÎÏÅ ËÏÌÅÓÏeðÏ×ÅÓÔ×Ï×ÁÎØÅ × ÏÔÍÅÒ. ÓÒÏËÁÈhõÚÅÌ 4iáÐÒÅÌØ ÓÅÍÎÁÄÃÁÔÏÇÏ [(12 ÁÐÒ.-5 ÍÁÑ)içÌ. 1-91] d1991 a597 Ó., [1] Ì. ÐÏÒÔÒ. 0aRUbNLRc19980702gPSBO aNLRj97-5/2495 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 1900584nam2 2200181 i 450 001001700000005001700017100004100034101000800075102001300083105001800096109000600114200014700120210000900267215002100276801002800297899001900325461005800344RU\NLR\bibl\246419990702164148.0 a19980706d1991 u||y0rusy0102 ca0 arus aUSAaFRA ay z 00|a| ab1 aëÒÁÓÎÏÅ ËÏÌÅÓÏeðÏ×ÅÓÔ×Ï×ÁÎØÅ × ÏÔÍÅÒ. ÓÒÏËÁÈhõÚÅÌ 4iáÐÒÅÌØ ÓÅÍÎÁÄÃÁÔÏÇÏ [(12 ÁÐÒ.-5 ÍÁÑ)içÌ. 92-186]aîÁ ÏÂÒÙ×Å ÐÏ×ÅÓÔ×Ï×ÁÎÉÑh[õÚÌÙ 5-20] d1991 a564, [1], 136 Ó. 0aRUbNLRc19980702gPSBO aNLRj97-5/2495 01001RU\NLR\bibl\258012001 aóÏÂÒÁÎÉÅ ÓÏÞÉÎÅÎÉÊvô. 20idzebra-2.0.44/test/gils/0000755000175000017500000000000011412336535012142 500000000000000idzebra-2.0.44/test/gils/stop01.sh0000755000175000017500000000163711412332551013550 00000000000000#!/bin/sh # test start and stop of the server with -1 srcdir=${srcdir:-"."} if [ "$srcdir" != "." ] then echo "Jumping over test" exit 0 fi LOG=stop01.log rm -f $LOG echo "initializing" >>$LOG test -d reg || mkdir reg ../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg init || exit 1 #create a base to test on ../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg update records || exit 1 echo "Starting server with -1 (one shot)..." >>$LOG ../../index/zebrasrv -D -p z.pid -1 -c $srcdir/zebra1.cfg -l $LOG unix:socket echo " checking that it runs... " >>$LOG test -f z.pid || exit 1 PID=`cat z.pid` kill -CHLD $PID >/dev/null 2>&1 || exit 1 echo " connecting to it..." >>$LOG ../api/testclient unix:socket utah >>$LOG || exit 1 echo " checking that server does not run any more" >>$LOG kill -CHLD $PID >/dev/null 2>&1 && sleep 1 && \ kill -CHLD $PID >/dev/null 2>&1 && exit 1 # clean up rm -rf reg z.pid idzebra-2.0.44/test/gils/test3.sh0000755000175000017500000000733611412332551013466 00000000000000#!/bin/sh # Testing searches with lots of @and operators # in order to test the fast-forward operation of rsets srcdir=${srcdir:-"."} if [ "$srcdir" != "." ] then echo "Jumping over test" exit 0 fi LOG=test3.log DBG="-v 1647" rm -f $LOG # these should not be here, will be created later $srcdir/cleanrecords.sh echo "initializing..." >>$LOG mkdir -p reg ../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg init || exit 1 echo "updating..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg update $srcdir/records || exit 1 echo "starting server..." >>$LOG ../../index/zebrasrv -D -p z.pid -S -c $srcdir/zebra1.cfg $DBG -l $LOG unix:socket echo "checking it runs..." >>$LOG test -f z.pid || exit 1 echo "search A1..." >>$LOG ../api/testclient -c 17 unix:socket utah > log || exit 1 echo "search A2..." >>$LOG ../api/testclient -c 31 unix:socket the > log || exit 1 echo "search A3..." >>$LOG ../api/testclient -c 4 unix:socket deposits > log || exit 1 echo "search B1..." >>$LOG ../api/testclient -c 7 unix:socket "@and utah the" > log || exit 1 echo "search B2..." >>$LOG ../api/testclient -c 7 unix:socket "@and the utah" > log || exit 1 echo "search C1..." >>$LOG ../api/testclient -c 1 unix:socket "@and @and the utah epicenter" > log || exit 1 echo "search C2..." >>$LOG ../api/testclient -c 1 unix:socket "@and @and the epicenter utah" > log || exit 1 echo "search C3..." >>$LOG ../api/testclient -c 1 unix:socket "@and @and utah the epicenter" > log || exit 1 echo "search C4..." >>$LOG ../api/testclient -c 1 unix:socket "@and @and utah epicenter the" > log || exit 1 echo "search C5..." >>$LOG ../api/testclient -c 1 unix:socket "@and @and epicenter the utah" > log || exit 1 echo "search C6..." >>$LOG ../api/testclient -c 1 unix:socket "@and @and epicenter utah the" > log || exit 1 echo "search D1..." >>$LOG ../api/testclient -c 30 unix:socket "@and the of " > log || exit 1 echo "search D2..." >>$LOG ../api/testclient -c 30 unix:socket "@and of the" > log || exit 1 echo "search D3..." >>$LOG ../api/testclient -c 30 unix:socket "@and @and the of of" > log || exit 1 echo "search D4..." >>$LOG ../api/testclient -c 30 unix:socket "@and @and of the the" > log || exit 1 echo "search D5..." >>$LOG ../api/testclient -c 30 unix:socket "@and @and @and the of of the" > log || exit 1 echo "search D6..." >>$LOG ../api/testclient -c 15 unix:socket '@and @and in the data' > log || exit 1 echo "search D7..." >>$LOG ../api/testclient -c 15 unix:socket '@and @and in data the' > log || exit 1 echo "search D8..." >>$LOG ../api/testclient -c 2 unix:socket "@attr 1=4 @and UNPUBLISHED @and REPORTS AND" >log || exit 1 # This one failed at early fast-forwards echo "search E1..." >>$LOG ../api/testclient -c 41 unix:socket "@or the utah" > log || exit 1 echo "search E2..." >>$LOG ../api/testclient -c 41 unix:socket "@or utah the" > log || exit 1 echo "search E3..." >>$LOG ../api/testclient -c 42 unix:socket "@or deposits @or the utah" > log || exit 1 echo "search E4..." >>$LOG ../api/testclient -c 3 unix:socket "@and deposits @or the utah" > log || exit 1 echo "search E5..." >>$LOG ../api/testclient -c 3 unix:socket "@and @or the utah deposits" > log || exit 1 echo "search F1..." >>$LOG ../api/testclient -c 24 unix:socket "@not the utah " > log || exit 1 echo "search F2..." >>$LOG ../api/testclient -c 10 unix:socket "@not utah the " > log || exit 1 echo "search F3..." >>$LOG ../api/testclient -c 1 unix:socket "@and deposits @not utah the " > log || exit 1 echo "search F4..." >>$LOG ../api/testclient -c 1 unix:socket "@and @not utah the deposits" > log || exit 1 echo "stopping server..." >>$LOG test -f z.pid || exit 1 kill `cat z.pid` || exit 1 rm -f z.pid sleep 1 echo "Test successfully completed" >>$LOG idzebra-2.0.44/test/gils/cleanrecords.sh0000755000175000017500000000041211412332551015054 00000000000000#!/bin/sh srcdir=${srcdir:-"."} # these should not be here, will be created later if [ -f $srcdir/records/esdd0001.grs ] then rm -f $srcdir/records/esdd0001.grs fi if [ -f $srcdir/records/esdd0002.grs ] then rm -f $srcdir/records/esdd0002.grs fi idzebra-2.0.44/test/gils/zebra1.cfg0000644000175000017500000000055511412332551013726 00000000000000# Simple Zebra configuration file # # Where the schema files, attribute files, etc are located. profilePath: ${srcdir:-.}/../../tab # Files that describe the attribute sets supported. attset: bib1.att attset: gils.att attset: explain.att recordtype: grs.sgml #storekeys: 1 #storedata: 1 #recordId: (bib1,identifier-standard) isam: b register: reg:20M memmax: 1 idzebra-2.0.44/test/gils/stop04.sh0000755000175000017500000000222211412332551013542 00000000000000#!/bin/sh # test start and stop of the forked server srcdir=${srcdir:-"."} if [ "$srcdir" != "." ] then echo "Jumping over test" exit 0 fi LOG=stop04.log rm -f $LOG echo "initializing" >>$LOG mkdir -p reg ../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg init || exit 1 #create a base to test on ../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg update records || exit 1 echo "Starting server with (forked)..." >>$LOG ../../index/zebrasrv -D -p z.pid -c $srcdir/zebra1.cfg -l $LOG unix:socket echo " checking that it runs... " >>$LOG test -f z.pid || exit 1 PID=`cat z.pid` kill -CHLD $PID >/dev/null 2>&1 || exit 1 echo " connecting to it..." >>$LOG ../api/testclient unix:socket utah >>$LOG || exit 1 sleep 1 echo " checking that it still runs..." >>$LOG kill -CHLD $PID >/dev/null 2>&1 || exit 1 echo " connecting again, with a delay..." >>$LOG ../api/testclient unix:socket utah 5 >>$LOG sleep 1 # let the client connect echo " killing it..." >>$LOG kill $PID sleep 1 echo " checking that it is dead..." >>$LOG kill -CHLD $PID >/dev/null 2>&1 && sleep 1 && \ kill -CHLD $PID >/dev/null 2>&1 && exit 1 # clean up rm -rf reg z.pid idzebra-2.0.44/test/gils/timing2.sh0000755000175000017500000000452411412332551013771 00000000000000#!/bin/sh # Demonstrated that updates depend on file timestamps srcdir=${srcdir:-"."} if [ "$srcdir" != "." ] then echo "Jumping over test" exit 0 fi LOG=timing2.log rm -f $LOG echo " init..." >>$LOG rm -f log timeref[12] # these should not be here, will be created later $srcdir/cleanrecords.sh ../../index/zebraidx -c $srcdir/zebra2.cfg -l $LOG init || exit 1 touch timeref1 # make an early timestamp echo " starting server..." >>$LOG ../../index/zebrasrv -D -p z.pid -S -c $srcdir/zebra2.cfg -l $LOG unix:socket test -f z.pid || exit 1 sleep 1 touch timeref2 # make a later timestamp echo " update 1..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1 echo " search 1..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 grep "^Result count: 9$" log >/dev/null || exit 1 echo "making a test record..." >>$LOG cp $srcdir/records/esdd0006.grs $srcdir/records/esdd0002.grs touch -r timeref1 $srcdir/records/esdd0002.grs echo " indexing it..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1 echo " search 2..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 grep "^Result count: 10$" log >/dev/null || exit 1 echo " modifying a test record (xyz)..." >>$LOG sed 's/UTAH/XYZ/g' <$srcdir/records/esdd0002.grs >$srcdir/records/esdd0002x.grs mv $srcdir/records/esdd0002x.grs $srcdir/records/esdd0002.grs touch -r timeref1 $srcdir/records/esdd0002.grs # reset timestamp to 'early' echo " not indexing it..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1 echo " search 3..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 echo " checking..." >>$LOG grep "^Result count: 10$" log >/dev/null || exit 1 echo " touching its timestamp..." >>$LOG touch -r timeref2 $srcdir/records/esdd0002.grs # set timestamp to 'late' echo " indexing it..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1 echo " search 4..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 echo " checking..." >>$LOG grep "^Result count: 9$" log >/dev/null || exit 1 echo "stopping server..." >>$LOG test -f z.pid || exit 1 kill `cat z.pid` || exit 1 rm -f log timeref[12] $srcdir/cleanrecords.sh rm -f z.pid idzebra-2.0.44/test/gils/stop02.sh0000755000175000017500000000223711412332551013546 00000000000000#!/bin/sh # test start and stop of the server with -S srcdir=${srcdir:-"."} if [ "$srcdir" != "." ] then echo "Jumping over test" exit 0 fi LOG=stop02.log rm -f $LOG echo "initializing" >>$LOG test -d reg || mkdir reg ../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg init || exit 1 #create a base to test on ../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg update records || exit 1 echo "Starting server with -S (static)..." >>$LOG ../../index/zebrasrv -D -p z.pid -S -c $srcdir/zebra1.cfg -l $LOG unix:socket echo " checking that it runs... " >>$LOG test -f z.pid || exit 1 PID=`cat z.pid` kill -CHLD $PID >/dev/null 2>&1 || exit 1 echo " connecting to it..." >>$LOG ../api/testclient unix:socket utah >>$LOG || exit 1 sleep 1 echo " checking that it still runs..." >>$LOG kill -CHLD $PID >/dev/null 2>&1 || exit 1 echo " connecting again, with a delay..." >>$LOG ../api/testclient -d 5 unix:socket utah >>$LOG & sleep 1 # let the client connect echo " killing it..." >>$LOG kill $PID echo " checking that it is dead..." >>$LOG kill -CHLD $PID >/dev/null 2>&1 && sleep 1 && \ kill -CHLD $PID >/dev/null 2>&1 && exit 1 # clean up rm -rf reg z.pid idzebra-2.0.44/test/gils/Makefile.am0000644000175000017500000000057211412332551014114 00000000000000 dist-hook: -mkdir $(distdir)/records cp $(srcdir)/records/*.grs $(distdir)/records check_SCRIPTS = stop01.sh stop02.sh stop03.sh stop04.sh \ test1.sh test2.sh test3.sh timing1.sh timing2.sh TESTS = $(check_SCRIPTS) EXTRA_DIST = cleanrecords.sh zebra1.cfg zebra2.cfg $(check_SCRIPTS) clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf -rm -rf reg/*.mf idzebra-2.0.44/test/gils/stop03.sh0000755000175000017500000000261511412332551013547 00000000000000#!/bin/sh # test start and stop of the threaded server (-T) srcdir=${srcdir:-"."} if [ "$srcdir" != "." ] then echo "Jumping over test" exit 0 fi LOG=stop03.log rm -f $LOG echo "initializing" >>$LOG mkdir -p reg ../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg init || exit 1 #create a base to test on ../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg update records || exit 1 echo "Starting server with -T (threaded)..." >>$LOG ../../index/zebrasrv -D -p z.pid -T -c $srcdir/zebra1.cfg -l $LOG unix:socket 2>out if grep 'not available' out >/dev/null; then test -f z.pid && rm -f z.pid exit 0 fi echo " checking that it runs..." >>$LOG test -f z.pid || exit 1 PID=`cat z.pid` echo " checking that it still runs..." >>$LOG kill -CHLD $PID >/dev/null 2>&1 || exit 1 echo " connecting to it..." >>$LOG ../api/testclient unix:socket utah >>$LOG || exit 1 sleep 1 echo " checking that it still runs..." >>$LOG kill -CHLD $PID >/dev/null 2>&1 || exit 1 echo " connecting again, with a delay..." >>$LOG ../api/testclient unix:socket utah 5 >>$LOG & sleep 1 # let the client connect echo " checking that it still runs..." >>$LOG kill -CHLD $PID >/dev/null 2>&1 || exit 1 echo " killing it..." >>$LOG kill $PID sleep 1 echo " checking that it is dead..." >>$LOG kill -CHLD $PID >/dev/null 2>&1 && sleep 1 && \ kill -CHLD $PID >/dev/null 2>&1 && exit 1 # clean up rm -rf reg z.pid idzebra-2.0.44/test/gils/test1.sh0000755000175000017500000000325411412332551013457 00000000000000#!/bin/sh srcdir=${srcdir:-"."} if [ "$srcdir" != "." ] then echo "Jumping over test" exit 0 fi LOG=test1.log rm -f $LOG echo "initializing..." >>$LOG test -d reg || mkdir reg # these should not be here, will be created later $srcdir/cleanrecords.sh #if [ -f $srcdir/records/esdd0001.grs ] # then # rm -f $srcdir/records/esdd0001.grs #fi #if [ -f $srcdir/records/esdd0002.grs ] # then # rm -f $srcdir/records/esdd0002.grs #fi ../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg init || exit 1 echo "updating..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg update $srcdir/records || exit 1 echo "starting server..." >>$LOG ../../index/zebrasrv -D -p z.pid -S -c $srcdir/zebra1.cfg -l $LOG unix:socket echo "checking it runs..." >>$LOG test -f z.pid || exit 1 echo "search 1..." >>$LOG ../api/testclient unix:socket utah > log || exit 1 grep "^Result count: 17$" log >/dev/null || exit 1 echo "search 2..." >>$LOG ../api/testclient unix:socket "@or utah the" > log || exit 1 grep "^Result count: 41$" log >/dev/null || exit 1 echo "search 3..." >>$LOG ../api/testclient unix:socket "@attr 1=4 the" > log || exit 1 grep "^Result count: 1$" log >/dev/null || exit 1 echo "search 4..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 grep "^Result count: 9$" log >/dev/null || exit 1 echo "reindexing..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra1.cfg update $srcdir/records || exit 1 echo "search 5..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 grep "^Result count: 18$" log >/dev/null || exit 1 echo "stopping server..." >>$LOG test -f z.pid || exit 1 kill `cat z.pid` || exit 1 rm -f z.pid idzebra-2.0.44/test/gils/timing1.sh0000755000175000017500000001057311412332551013771 00000000000000#!/bin/sh # tests that updates are reflected immediately # in the registers. # Repeatedly modifies a record and counts hits. # Test 1: with good sleeps in every between - should pass always srcdir=${srcdir:-"."} if [ "$srcdir" != "." ] then echo "Jumping over test" exit 0 fi LOG=timing1.log rm -f $LOG echo " init..." >>$LOG # these should not be here, will be created later $srcdir/cleanrecords.sh ../../index/zebraidx -c $srcdir/zebra2.cfg -l $LOG init || exit 1 echo " starting server..." >>$LOG ../../index/zebrasrv -D -p z.pid -S -c $srcdir/zebra2.cfg -l $LOG unix:socket test -f z.pid || exit 1 sleep 2 echo " update 1..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1 sleep 2 echo " search 1..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 grep "^Result count: 9$" log >/dev/null || exit 1 sleep 2 echo "making a test record..." >>$LOG cp $srcdir/records/esdd0006.grs $srcdir/records/esdd0002.grs echo " indexing it..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1 sleep 2 echo " search 2..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 grep "^Result count: 10$" log >/dev/null || exit 1 sleep 2 echo " 1a: modifying a test record (xyz)..." >>$LOG sed 's/UTAH/XYZ/g' <$srcdir/records/esdd0002.grs >$srcdir/records/esdd0002x.grs mv $srcdir/records/esdd0002x.grs $srcdir/records/esdd0002.grs echo " indexing it..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1 sleep 2 echo " search 3..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 echo " checking..." >>$LOG grep "^Result count: 9$" log >/dev/null || exit 1 sleep 2 echo " 1b: modifying the test record back (utah)..." >>$LOG sed 's/XYZ/UTAH/g' <$srcdir/records/esdd0002.grs >$srcdir/records/esdd0002x.grs mv $srcdir/records/esdd0002x.grs $srcdir/records/esdd0002.grs echo " indexing it..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1 sleep 2 echo " search 4..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 echo " checking..." >>$LOG grep "^Result count: 10$" log >/dev/null || exit 1 sleep 2 echo " 2a: modifying the test record (xyz)..." >>$LOG sed 's/UTAH/XYZ/g' <$srcdir/records/esdd0002.grs >$srcdir/records/esdd0002x.grs mv $srcdir/records/esdd0002x.grs $srcdir/records/esdd0002.grs echo " indexing it..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1 sleep 2 echo " search 5..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 echo " checking..." >>$LOG grep "^Result count: 9$" log >/dev/null || exit 1 sleep 2 echo " 2b: modifying the test record back (utah)..." >>$LOG sed 's/XYZ/UTAH/g' <$srcdir/records/esdd0002.grs >$srcdir/records/esdd0002x.grs mv $srcdir/records/esdd0002x.grs $srcdir/records/esdd0002.grs sleep 2 echo " indexing it..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1 sleep 2 echo " search 6..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 echo " checking..." >>$LOG grep "^Result count: 10$" log >/dev/null || exit 1 sleep 2 echo " 3a: modifying the test record (xyz)..." >>$LOG sed 's/UTAH/XYZ/g' <$srcdir/records/esdd0002.grs >$srcdir/records/esdd0002x.grs mv $srcdir/records/esdd0002x.grs $srcdir/records/esdd0002.grs sleep 2 echo " indexing it..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1 sleep 2 echo " search 7..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 echo " checking..." >>$LOG grep "^Result count: 9$" log >/dev/null || exit 1 sleep 2 echo " 3b: modifying the test record back (utah)..." >>$LOG sed 's/XYZ/UTAH/g' <$srcdir/records/esdd0002.grs >$srcdir/records/esdd0002x.grs mv $srcdir/records/esdd0002x.grs $srcdir/records/esdd0002.grs echo " indexing it..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1 sleep 2 echo " search 8..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 echo " checking..." >>$LOG grep "^Result count: 10$" log >/dev/null || exit 1 echo "stopping server..." >>$LOG test -f z.pid || exit 1 kill `cat z.pid` || exit 1 rm -f log $srcdir/cleanrecords.sh rm -f z.pid idzebra-2.0.44/test/gils/Makefile.in0000644000175000017500000003262311412336425014133 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = test/gils DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ check_SCRIPTS = stop01.sh stop02.sh stop03.sh stop04.sh \ test1.sh test2.sh test3.sh timing1.sh timing2.sh TESTS = $(check_SCRIPTS) EXTRA_DIST = cleanrecords.sh zebra1.cfg zebra2.cfg $(check_SCRIPTS) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/gils/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/gils/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool clean-local dist-hook distclean \ distclean-generic distclean-libtool distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am dist-hook: -mkdir $(distdir)/records cp $(srcdir)/records/*.grs $(distdir)/records clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf -rm -rf reg/*.mf # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/test/gils/test2.sh0000755000175000017500000000547311412332551013465 00000000000000#!/bin/sh srcdir=${srcdir:-"."} if [ "$srcdir" != "." ] then echo "Jumping over test" exit 0 fi LOG=test2.log rm -f $LOG echo "init..." >>$LOG # these should not be here, will be created later $srcdir/cleanrecords.sh ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg init || exit 1 echo "update 1..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1 echo "update 2..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1 echo "killing old server (if any)..." >>$LOG test -f z.pid && kill -9 `cat z.pid` echo "starting server..." >>$LOG ../../index/zebrasrv -D -p z.pid -S -c $srcdir/zebra2.cfg -l $LOG unix:socket test -f z.pid || exit 1 echo "search 1..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 grep "^Result count: 9$" log >/dev/null || exit 1 echo "update 3..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1 echo "search 2..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 grep "^Result count: 9$" log >/dev/null || exit 1 echo "making test records..." >>$LOG cp $srcdir/records/esdd0006.grs $srcdir/records/esdd0001.grs echo "indexing them..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1 echo "search 3..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 grep "^Result count: 10$" log >/dev/null || exit 1 touch $srcdir/records/esdd0001.grs echo "indexing again..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1 echo "search 4..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 grep "^Result count: 10$" log >/dev/null || exit 1 echo "making another test record..." >>$LOG mv $srcdir/records/esdd0001.grs $srcdir/records/esdd0002.grs echo "indexing it too..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1 echo "search 5..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 grep "^Result count: 10$" log >/dev/null || exit 1 sleep 1 echo "modifying a test record..." >>$LOG sed 's/UTAH/XYZ/g' <$srcdir/records/esdd0002.grs >$srcdir/records/esdd0002x.grs mv $srcdir/records/esdd0002x.grs $srcdir/records/esdd0002.grs echo "indexing it..." >>$LOG ../../index/zebraidx -l $LOG -c $srcdir/zebra2.cfg update $srcdir/records || exit 1 sleep 1 echo "search 6..." >>$LOG ../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 grep "^Result count: 9$" log >/dev/null || exit 1 echo "search 7..." >>$LOG ../api/testclient unix:socket "@attr 1=4 xyz" > log || exit 1 grep "^Result count: 1$" log >/dev/null || exit 1 echo "stosrcdiring server..." >>$LOG test -f z.pid || exit 1 kill `cat z.pid` || exit 1 rm -f log $srcdir/cleanrecords.sh rm -f z.pid idzebra-2.0.44/test/gils/records/0000755000175000017500000000000011412336535013603 500000000000000idzebra-2.0.44/test/gils/records/esdd0036.grs0000644000175000017500000000460211412336535015472 00000000000000 MEASURED GEOLOGIC SECTIONS UTAH GEOLOGICAL AND MINERAL SURVEY FOSSIL; GEOLOGY; LITHOLOGY; PALEONTOLOGY; STRATIGRAPHY; UTAH Selected geologic sections and references to geologic sections concerning Utah geology comprise this data set. Formation, lithologic description, fossils, thickness, location of section, and Utah type sections are included in this data set. FILE FOLDERS US STATE LATITUDE/LONGITUDE; UTM NORTHINGS AND EASTINGS; PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) UTAH -114 -109 42 37 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 MEASURED GEOLOGIC SECTIONS NONAUTOMATED MANUAL NONE UNDER DEVELOPMENT HELLMUT DOELLING UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0036 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/test/gils/records/esdd0050.grs0000644000175000017500000000523611412336535015472 00000000000000 CORE AND CUTTINGS IN NBMG 'LIBRARY' NEVADA BUREAU OF MINES AND GEOLOGY CORE; GEOLOGY; MINE; NEVADA This data set describes the NBMG holdings of core and cuttings for Nevada. It includes driller identification, hole name, location, depth of hole, and log types. FILE FOLDERS; LOGS; CORE/CUTTINGS (SAMPLES) COUNTIES LATITUDE/LONGITUDE; PUBLIC LANE SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA -120 -114 42 35 1960-PRESENT NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 CORE AND CUTTINGS IN NBMG 'LIBRARY' AUTOMATED WORDPERFECT BATCH IBM COMPATIBLE RENO, NV Listed in NBMG Report 30, The Nevada Bureau of Mines and Geology Sample Library - An Index to Drill Core and Cuttings in the Collection and also in Special Publication L3, which updates the list. OPERATIONAL BECKY WEIMER PURKEY NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ESDD0050 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/test/gils/records/esdd0047.grs0000644000175000017500000000467211412336535015503 00000000000000 ISOTOPIC DATES OF ROCKS AND MINERALS NEVADA BUREAU OF MINES AND GEOLOGY GEOLOGY; ISOTOPIC DATE; MINERAL; NEVADA; ROCK Rock type, collection location, sample description, analytical method, analytical data, lab performing analytical work, age in month-year, isotopic method used, comments on reliability of age determination, and collector's identification are components of this data set. CATALOGS/INDEXES; FILE FOLDERS No easy search method; one must search through all the issues of the journal; articles describe new dates or are a compilation of all dates from a particular area, rock type, etc. US STATE; WESTERN HEMISPHERE LATITUDE/LONGITUDE; PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA; UNITED STATES; WESTERN HEMISPHERE 1970-PRESENT NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ISOTOPIC DATES OF ROCKS AND MINERALS NONAUTOMATED MANUAL Data published in Isochron/West, a scientific journal published three times a year. LARRY GARSIDE NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ESDD0047 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/test/gils/records/esdd0039.grs0000644000175000017500000000427511412336535015503 00000000000000 UTAH GEOLOGICAL ASSOCIATION PUBLICATIONS <Acronym> UGA </Acronym> UTAH GEOLOGICAL AND MINERAL SURVEY AREAL GEOLOGY; GEOLOGY; UTAH Guidebooks and field logs of selected Utah sites comprise this data set. REPORT SETS; LOGS Complete set of publications is available in UGMS Library. US STATE UTAH -114 -109 42 37 1970-PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 UTAH GEOLOGICAL ASSOCIATION PUBLICATIONS NONAUTOMATED MANUAL NONE OPERATIONAL UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0039 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/test/gils/records/esdd0078.grs0000644000175000017500000000473111412336535015503 00000000000000 TIDAL (COASTAL) WETLAND OF CONNECTICUT DEPARTMENT OF ENVIRONMENTAL PROTECTION COAST; COASTAL CONNECTICUT; COASTLINE; CONNECTICUT; HYDROLOGY; SOIL; TIDAL WETLAND; WATER; WETLAND Tidal wetlands, as defined by State statute, which are delineated by engineering survey at a scale of 1:24,000 comprise this data set. MAP SETS; REPORT SETS; PHOTOGRAPHS; INDIVIDUAL MAPS; FILE FOLDERS Tidal wetlands are defined by hydrologic characteristics and the presence of particular flora. COASTAL COMMUNITIES CONNECTICUT; COASTAL CONNECTICUT -74 -71 42 41 1972-PRESENT DEPARTMENT OF ENVIRONMENTAL PROTECTION WATER RESOURCES UNIT, 165 CAPITOL AVENUE, ROOM 207 HARTFORD CT 06106 USA (203) 566-7160 TIDAL (COASTAL) WETLAND OF CONNECTICUT NONAUTOMATED MANUAL NONE OPERATIONAL DOUGLAS COOPER DEPARTMENT OF ENVIRONMENTAL PROTECTION WATER RESOURCES UNIT, 165 CAPITOL AVENUE, ROOM 207 HARTFORD CT 06106 USA (203) 566-7160 ESDD0078 DEPARTMENT OF ENVIRONMENTAL PROTECTION 198502 idzebra-2.0.44/test/gils/records/esdd0062.grs0000644000175000017500000000512611412336535015473 00000000000000 BIBLIOGRAPHY OF MAINE GEOLOGY MAINE GEOLOGICAL SURVEY GEOLOGY; MAINE This data base is a computer based bibliography of marine geology. It allows searching by topic and geographic location, similar to GEOREF. It is currently under development to replace the printed Bibliography of Marine Geology. BIBLIOGRAPHIES Software developed by the Maine Geological Survey; documentation developed by the Maine Geological Survey staff and written in ANSI COBOL. 7 1/2' OR 15' QUADS; CITIES; US STATE; COUNTIES MAINE -71 -67 48 43 1692-PRESENT MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 BIBLIOGRAPHY OF MAINE GEOLOGY AUTOMATED INTERACTIVE 3,500 768 BURROUGHS B20 AUGUSTA, ME. NONE UNDER DEVELOPMENT ROBERT MARVINNEY MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 ESDD0062 MAINE GEOLOGICAL SURVEY 198709 idzebra-2.0.44/test/gils/records/esdd0035.grs0000644000175000017500000000502511412336535015471 00000000000000 UTAH GEOLOGIC MAP BIBLIOGRAPHY UTAH GEOLOGICAL AND MINERAL SURVEY ARIZONA; COLORADO; GEOLOGY; IDAHO; MAP; NEVADA; UTAH; WYOMING This collection consists of theses, dissertations, and other unpublished maps as well as published maps of the geology of Utah. Some maps of the collection are xeroxed from limited collections. Cross-sections are included in set. Data file consists of map bibliography. MAP SETS; BIBLIOGRAPHIES Approximately 700 maps are in the set. US STATE UTAH AND NEIGHBORING STATES -120 -102 49 31 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 UTAH GEOLOGIC MAP BIBLIOGRAPHY AUTOMATED INTERACTIVE 1,100 PC NETWORK SALT LAKE CITY, UT NONE OPERATIONAL HELLMUT DOELLING UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0035 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/test/gils/records/esdd0049.grs0000644000175000017500000000516511412336535015503 00000000000000 GEOTHERMAL WELLS DRILLED SINCE 1976 NEVADA BUREAU OF MINES AND GEOLOGY GEOTHERMAL; GEOTHERMAL WELL; NEVADA Well name, operator, location, depth, highest temperature reached are components of these data which describe those geothermal wells that have been drilled since 1976. CATALOGS/INDEXES COUNTIES PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA -120 -114 42 35 1976-PRESENT NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 GEOTHERMAL WELLS DRILLED SINCE 1976 AUTOMATED WORDPERFECT INTERACTIVE 100 IBM COMPATIBLE RENO, NV Nevada Bureau of Mines Open-File Report Special Publication List 4 (updates Appendix 2 of Bulletin 91 Nevada Bureau of Mines and Geology). OPERATIONAL BECKY WEIMER PURKEY NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ESDD0049 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/test/gils/records/esdd0008.grs0000644000175000017500000000451011412336535015467 00000000000000 UTAH GEOCHROMOMETRY <Acronym> UG </Acronym> UTAH GEOLOGICAL AND MINERAL SURVEY ARIZONA; COLORADO; GEOLOGY; IDAHO; IGNEOUS ROCK; NEVADA; RADIOMETRIC; ROCK; UTAH; WYOMING Utah radiometric dates, formations, investigations, constants, references comprise this data set. Searches by formation, age, location, constants, methodology, and rock type will be possible. CATALOGS/INDEXES TERRESTRIAL US STATE UTAH AND NEIGHBORING STATES. -120 -102 49 31 UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 UTAH GEOCHROMOMETRY AUTOMATED INTERACTIVE PC NETWORK SALT LAKE CITY, UT NONE UNDER DEVELOPMENT GRANT WILLIS UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0008 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/test/gils/records/esdd0044.grs0000644000175000017500000000477311412336535015502 00000000000000 OIL IMPREGNATED ROCK DEPOSITS UTAH GEOLOGICAL AND MINERAL SURVEY BASALT; CRUDE OIL; GEOLOGY; LIMESTONE; OIL; PETROLEUM; PETROLEUM WELL; TAR; TAR BASALT; TAR LIMESTONE; TAR SAND; UTAH High viscosity, low volatile content, hydrocarbon deposits which are developed using unconventional petroleum methods comprise this data set. Deposits include tar sands, limestones, basalts but not shales or solid hydrocarbons. This file includes outcrop maps, field notes, references, logs, stratigraphy, geologic report, and production from outside or in-house sources. FILE FOLDERS Much unpublished data. 7 1/2' OR 15' QUADS; US STATE UTAH -114 -109 42 37 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY ECONOMIC PROGRAM, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 OIL IMPREGNATED ROCK DEPOSITS NONAUTOMATED MANUAL NONE OPERATIONAL UTAH GEOLOGICAL AND MINERAL SURVEY ECONOMIC PROGRAM, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0044 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/test/gils/records/esdd0057.grs0000644000175000017500000000443411412336535015500 00000000000000 FRESH WATER WETLANDS MAPS MAINE GEOLOGICAL SURVEY FRESH WATER WETLAND; MAINE; MAP; WETLAND Contained are a series of 1:50,000 scale maps showing regulated and unregulated fresh water wetlands in the organized territories. Included is a table describing each mapped wetland. MAP SETS; TABLES 1:50,000 scale base maps are derived from USGS quadrangle maps; restricted to organized territories. Data from 1980-1981 1:40,000 aerial photography are plotted on 1:50,000 base maps. US STATE MAINE -71 -67 48 43 MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 FRESH WATER WETLANDS MAPS NONAUTOMATED MANUAL NONE OPERATIONAL JOHN WILLIAMS MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 ESDD0057 MAINE GEOLOGICAL SURVEY 198709 idzebra-2.0.44/test/gils/records/esdd0038.grs0000644000175000017500000000474611412336535015505 00000000000000 INTERMOUNTAIN ASSOCIATION OF PETROLEUM GEOLOGISTS/GEOLOGISTS PUBLICATIONS <Acronym> IAPG/IAG </Acronym> UTAH GEOLOGICAL AND MINERAL SURVEY AREAL GEOLOGY; ARIZONA; COLORADO; GEOLOGY; IDAHO; MONTANA; NEVADA; NEW MEXICO; UTAH; WYOMING Guidebooks and field trip logs covering intermountain states: Utah, New Mexico, Colorado, Wyoming, Montana, Nevada, Idaho, Arizona comprise this data set. REPORT SETS; LOGS Society merged into Utah Geological Association in 1970. Complete set of publications is available in UGMS Library. US STATE UTAH AND NEIGHBORING STATES -120 -102 49 31 1950-1970 UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 INTERMOUNTAIN ASSOCIATION OF PETROLEUM GEOLOGISTS/GEOLOGISTS PUBLICATIONS NONAUTOMATED MANUAL NONE OPERATIONAL UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0038 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/test/gils/records/esdd0065.grs0000644000175000017500000000445611412336535015503 00000000000000 BULLETINS, REPORTS, MAPS, SPECIAL PUBLICATIONS, AND URBAN MAPS NEVADA BUREAU OF MINES AND GEOLOGY CARTOGRAPHY; GEOLOGY; GEOTHERMAL; GEOTHERMAL WELL; MAP; MINERAL; NEVADA A collection of varied information sources dealing with geology, mines, and geothermal waters in Nevada comprises this data set. REPORT SETS; CATALOGS/INDEXES; INDIVIDUAL MAPS; BIBLIOGRAPHIES; FILE FOLDERS 7 1/2' OR 15' QUADS; CITIES; US STATE; COUNTIES PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA -120 -114 42 35 NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 BULLETINS, REPORTS, MAPS, SPECIAL PUBLICATIONS, AND URBAN MAPS NONAUTOMATED MANUAL NONE ARLENE KRAMER NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ESDD0065 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/test/gils/records/esdd0031.grs0000644000175000017500000000462711412336535015474 00000000000000 APPLIED GEOLOGY FILE UTAH GEOLOGICAL AND MINERAL SURVEY GEOLOGIC HAZARDS; GEOLOGY; GROUNDWATER; HAZARDOUS WASTE; HEALTH; WASTE Reports and memorandums completed by the Site Investigation Section comprise this data set. Subjects include geotechnical appraisal of public facility sites before and during construction and evaluations of hazardous waste problems. FILE FOLDERS CITIES; US STATE; COUNTIES UTAH -114 -109 42 37 1970-PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 APPLIED GEOLOGY FILE AUTOMATED INTERACTIVE PC NETWORK SALT LAKE CITY, UT Alphabetical and County Listings and 1984 Job Number OPERATIONAL SHARON WAKEFIELD UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0031 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/test/gils/records/esdd0042.grs0000644000175000017500000000520411412336535015466 00000000000000 BIBLIOGRAPHY OF UTAH GEOLOGY UTAH GEOLOGICAL AND MINERAL SURVEY COAL; EARTHQUAKE; GEOLOGY; GREAT SALT LAKE; LANDSLIDE; SEISMOLOGY; STRATIGRAPHY; UTAH Keyworded compilation of 11,300 bibliographic entries consisting of commodities, applied geology, investigation procedures and stratigraphic units related to Utah comprise this data set. Entries are searchable by state, county, quadrangle, as well as keywords. Entries include theses and dissertations referenced in GEOREF to 1980. BIBLIOGRAPHIES Utah Radioactive Occurrences, Great Salt Lake, Landslide, Earthquakes, and Utah Coal Bibliographies are included. US STATE UTAH AND NEIGHBORING STATES -120 -102 49 31 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 BIBLIOGRAPHY OF UTAH GEOLOGY AUTOMATED INTERACTIVE PC NETWORK SALT LAKE CITY, UT NONE OPERATIONAL UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0042 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/test/gils/records/esdd0070.grs0000644000175000017500000000614211412336535015471 00000000000000 CENSUS DATA DEPARTMENT OF ENVIRONMENTAL DEVELOPMENT AGRICULTURE; CENSUS; CONNECTICUT; DEMOGRAPHICS; ECONOMY; POPULATION This data set contains: 1990 Census of Population and Housing; 1987 Economic Census; 1987 Agricultural Census; current population survey; population projections; current and historical data for the State of Connecticut and its subdivisions pursuant to the State Data Center program with the U.S. Bureau of the Census. MAP SETS; REPORT SETS; CATALOGS/INDEXES; DIGITAL DATA SETS; INDIVIDUAL MAPS; MICROGRAPHICS In addition to census data, assistance is provided for identification of available State generated demographic data. Alternate contact: James Palma. CITIES; US STATE; COUNTIES; METROPOLITAN AREAS CONNECTICUT; METROPOLITAN AREAS SUCH AS CENSUS; TRACTS, BLOCK GROUPS, AND STREET BLOCKS -74 -71 42 41 1940-PRESENT DEPARTMENT OF ENVIRONMENTAL DEVELOPMENT OFC. OF POLICY & MGMT., STATE DATA CTR., POLICY DEVELOPMENT & PLANNING DIVISION, 80 WASHINGTON STREET HARTFORD CT 06106-4459 USA (203) 566-8285 CENSUS DATA AUTOMATED SAS, CENSPAC INTERACTIVE 80-1,956 IBM 370/168 HARTFORD, CT Utilize Bureau of the Census technical documentation for each tape file. OPERATIONAL THERON SCHNURE DEPARTMENT OF ENVIRONMENTAL DEVELOPMENT OFC. OF POLICY & MGMT., STATE DATA CTR., POLICY DEVELOPMENT & PLANNING DIVISION, 80 WASHINGTON STREET HARTFORD CT 06106-4459 USA (203) 566-8285 ESDD0070 DEPARTMENT OF ENVIRONMENTAL DEVELOPMENT 199104 idzebra-2.0.44/test/gils/records/esdd0007.grs0000644000175000017500000000511511412336535015470 00000000000000 UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS <Acronym> UGMS </Acronym> UTAH GEOLOGICAL AND MINERAL SURVEY COAL; GAS; GEOLOGY; GREAT SALT LAKE; MINE; MINERAL; OIL; UTAH; WATER Publications of the Utah Geological and Mineral Survey include reports of investigation, special studies, bulletins, open-file reports, geologic map of Utah, publications of geological societies, geologic and oil and mineral maps, coal monographs, circulars, water resource bulletins, and reprints of articles. MAP SETS; REPORT SETS; CATALOGS/INDEXES; INDIVIDUAL MAPS; BIBLIOGRAPHIES TERRESTRIAL Complete collection of publications is available in UGMS Library. US STATE UTAH -114 -109 42 37 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 UTAH GEOLOGICAL AND MINERAL SURVEY PUBLICATIONS NONAUTOMATED MANUAL NONE OPERATIONAL UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0007 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/test/gils/records/esdd0032.grs0000644000175000017500000000551511412336535015472 00000000000000 UTAH CRIB FILE <Acronym> UTAH-CRIB </Acronym> UTAH GEOLOGICAL AND MINERAL SURVEY FUEL; GEOLOGY; LAND USE; MAP; METAL; MINERAL; NON-METAL; TOPOGRAPHY; UTAH CRIB-UTAH is a data base covering mineral occurrences in Utah, including metals, non-metals, and fuels. Each mineral occurrence is plotted on topographic maps and described in a six page report. MAP SETS; REPORT SETS CRIB-UTAH is currently accessible through the BLM, USGS, and Utah Geological and Mineral Survey. Future modes of access to the system are uncertain due to systems changes. Not identical to USGS MRDS/CRIB files; other data available in file folder at UGMS. 7 1/2' OR 15' QUADS; US STATE; COUNTIES UTM NORTHINGS AND EASTINGS; PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) UTAH -114 -109 42 37 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 UTAH CRIB FILE AUTOMATED REVELATION INTERACTIVE AND BATCH 8,000 PC NETWORK SALT LAKE CITY, UT NONE OPERATIONAL BRYCE TRIPP UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0032 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/test/gils/records/esdd0075.grs0000644000175000017500000000431611412336535015477 00000000000000 STREAM CHANNEL ENCROACHMENT LINE STUDIES DEPARTMENT OF ENVIRONMENTAL PROTECTION CHANNEL; CONNECTICUT; FLOOD; FLOOD ZONE; HYDROLOGY; MAP; STREAM; WATER Detailed engineering studies and large-scale mapping delineating high flow zones for regulation by the State are contained in this data set. MAP SETS; REPORT SETS; INDIVIDUAL MAPS; FILE FOLDERS SPECIFIC STREAMS CONNECTICUT -74 -71 42 41 DEPARTMENT OF ENVIRONMENTAL PROTECTION WATER RESOURCES UNIT, 165 CAPITOL AVENUE, ROOM 207 HARTFORD CT 06106 USA (203) 566-7280 STREAM CHANNEL ENCROACHMENT LINE STUDIES NONAUTOMATED MANUAL NONE OPERATIONAL STEVEN DERBY DEPARTMENT OF ENVIRONMENTAL PROTECTION WATER RESOURCES UNIT, 165 CAPITOL AVENUE, ROOM 207 HARTFORD CT 06106 USA (203) 566-7280 ESDD0075 DEPARTMENT OF ENVIRONMENTAL PROTECTION 198502 idzebra-2.0.44/test/gils/records/esdd0046.grs0000644000175000017500000000535211412336535015476 00000000000000 OIL AND GAS WELLS DRILLED SINCE 1986, LIST L8 NEVADA BUREAU OF MINES AND GEOLOGY CRUDE OIL; GAS; GAS WELL; NEVADA; OIL; OIL WELL; PETROLEUM; PETROLEUM WELL This database contains information about oil and gas wells drilled since 1986 such as well name, location, depth, permit number, company (owner), and producing or dry hole. CATALOGS/INDEXES TERRESTRIAL US STATE; COUNTIES PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA -120 -114 42 35 1986-PRESENT NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA, M.S. 178 RENO NV 89557-0088 USA (702) 784-6691 OIL AND GAS WELLS DRILLED SINCE 1986, LIST L8 AUTOMATED PC-FILE VERSION 5.0 INTERACTIVE 200 IBM PC/XT/AT/386 RENO, NV Updates Nevada Bureau of Mines and Geology Bulletin 104, Oil and Gas Developments in Nevada, 1907-1986. OPERATIONAL RONALD HESS NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA, M.S. 178 RENO NV 89557-0088 USA (702) 784-6691 ESDD0046 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/test/gils/records/esdd0077.grs0000644000175000017500000000504111412336535015475 00000000000000 DAM INVENTORY DEPARTMENT OF ENVIRONMENTAL PROTECTION BASIN; CONNECTICUT; DAM; DRAINAGE BASIN; FLOOD; FLOOD ZONE; HYDROLOGY; RIVER; WATER The inventory delineates the following: dam name, drainage basin, water course, inspection record, safety status, ownership, and other information. MAP SETS; REPORT SETS; FILE FOLDERS; LOGS Connecticut's Dam Inventory consists of both mapped dam locations and an automated file of data that describes each dam. Information is updated on an ongoing basis. US STATE LATITUDE/LONGITUDE CONNECTICUT -74 -71 42 41 -PRESENT DEPARTMENT OF ENVIRONMENTAL PROTECTION WATER RESOURCES UNIT, 165 CAPITOL AVENUE, ROOM 207 HARTFORD CT 06106 USA (203) 566-7245 DAM INVENTORY AUTOMATED INTERACTIVE 4,000 NONE OPERATIONAL PHILIP MORESCHI DEPARTMENT OF ENVIRONMENTAL PROTECTION WATER RESOURCES UNIT, 165 CAPITOL AVENUE, ROOM 207 HARTFORD CT 06106 USA (203) 566-7245 ESDD0077 DEPARTMENT OF ENVIRONMENTAL PROTECTION 198502 idzebra-2.0.44/test/gils/records/esdd0054.grs0000644000175000017500000000521311412336535015471 00000000000000 GROUNDWATER RESOURCE MAPS - COUNTY SERIES <Acronym> GRWM </Acronym> MAINE GEOLOGICAL SURVEY AQUIFER; BEDROCK; BEDROCK AQUIFER; BEDROCK WELL; COAST; COASTAL MAINE; COASTLINE; GROUNDWATER; HYDROLOGY; MAINE; MAP; WATER A series of 1:250,000 scale maps showing well yield, well depth, and depth to bedrock for a large number of bedrock wells inventoried by the Maine Geological Survey in the mid-to late 1970's comprises this data set. Some series also show bedrock topography and potentiometric surface. Geographic coverage is restricted to Southern Maine. MAP SETS This is a compilation of bedrock well inventory information. Bedrock inventory data are available on sequential computer tape. No additional maps in this series are planned. COUNTIES MAINE -71 -67 48 43 1972-1978 MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 GROUNDWATER RESOURCE MAPS - COUNTY SERIES NONAUTOMATED MANUAL NONE OPERATIONAL JOHN WILLIAMS MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 ESDD0054 MAINE GEOLOGICAL SURVEY 198709 idzebra-2.0.44/test/gils/records/esdd0006.grs0000644000175000017500000000522111412336535015465 00000000000000 UTAH EARTHQUAKE EPICENTERS <Acronym> UUCCSEIS </Acronym> UTAH GEOLOGICAL AND MINERAL SURVEY APPALACHIAN VALLEY; EARTHQUAKE; EPICENTER; SEISMOLOGY; UTAH Five files of epicenter data arranged by date comprise this data set. These files are searchable by magnitude and longitude/latitude. Hardcopy of listing and plot of requested area available. Epicenter location and date, magnitude, and focal depth available. DIGITAL DATA SETS TERRESTRIAL Data are supplied by the University of Utah Seismograph Station. The Utah Geologcial and Mineral Survey (UGMS) is merely a clearinghouse of the data. US STATE UTAH -114 -109 42 37 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 UTAH EARTHQUAKE EPICENTERS AUTOMATED BATCH 8,700 PC NETWORK SALT LAKE CITY, UT NONE OPERATIONAL BILL CASE UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0006 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/test/gils/records/esdd0034.grs0000644000175000017500000000454111412336535015472 00000000000000 COAL SAMPLE BANK UTAH GEOLOGICAL AND MINERAL SURVEY COAL; MACERAL; METHANE; PETROGRAPHY; UTAH This data set contains methane data, chemical analysis data, and petrographic analysis data on core samples in Utah. DIGITAL DATA SETS; FILE FOLDERS Coal pellets are stored. Future plans are to store coal samples under water. US STATE UTAH -114 -109 42 37 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 COAL SAMPLE BANK AUTOMATED INTERACTIVE 550 COMPACT AT COMPATIBLE SALT LAKE CITY, UT NONE OPERATIONAL ALEX KEITH UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0034 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/test/gils/records/esdd0051.grs0000644000175000017500000000625711412336535015477 00000000000000 OIL/GAS DRILLING <Acronym> NVOILWEL </Acronym> NEVADA BUREAU OF MINES AND GEOLOGY CORE; CRUDE OIL; GAS; GAS WELL; NEVADA; OIL; OIL WELL; PETROLEUM; PETROLEUM WELL This database contains information on oil and gas drilling such as well name, operator, driller, location, depth, copies of logs run, permits, samples (cuttings, core), completion records. REPORT SETS; DIGITAL DATA SETS; FILE FOLDERS; MICROGRAPHICS; LOGS; COMPUTER DATA BASE RECORDS TERRESTRIAL DOCUMENTATION continued: Special Publication l4; Bulletin 104, Oil and Gas Developments in Nevada, 1907-1986; Special Publication l8. COMMENTS: Not all data in this data set is available on-line. US STATE; COUNTIES UTM NORTHINGS AND EASTINGS; PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA -120 -114 42 35 1907-PRESENT NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA, M.S. 178 RENO NV 89557-0088 USA (702) 784-6691 OIL/GAS DRILLING AUTOMATED PC-FILE, VERSION 5.0 INTERACTIVE 700 400 IBM PC/XT/AT/386 RENO, NV Listed and described in NBMG Bulletin 52, Nevada Oil and Gas Drilling Data, 1906-1953; Report 18, Oil and Gas Developments in Nevada, 1953-1967; Report 29;(continued in COMMENTS section) OPERATIONAL RONALD HESS NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA, M.S. 178 RENO NV 89557-0088 USA (702) 784-6691 ESDD0051 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/test/gils/records/esdd0045.grs0000644000175000017500000000417711412336535015501 00000000000000 ENGINEERING GEOLOGY (UNPUBLISHED REPORTS AND MAPS) NEVADA BUREAU OF MINES AND GEOLOGY CARTOGRAPHY; ENGINEERING; GEOLOGY; MAP; NEVADA Project name, location, geologic information, engineering information, firm or individual making report or map are components of this database. MAP SETS; REPORT SETS; INDIVIDUAL MAPS; FILE FOLDERS; LOGS 7 1/2' OR 15' QUADS; COUNTIES; 1 DEG. X 2 DEG. QUAD NEVADA -120 -114 42 35 NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ENGINEERING GEOLOGY (UNPUBLISHED REPORTS AND MAPS) NONAUTOMATED NONE BECKY WEIMER PURKEY NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ESDD0045 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/test/gils/records/esdd0030.grs0000644000175000017500000000441311412336535015464 00000000000000 UTAH OIL FIELD FILE UTAH GEOLOGICAL AND MINERAL SURVEY CRUDE OIL; GEOLOGY; MAP; OIL; OIL WELL; PETROLEUM; PETROLEUM WELL; RESERVOIR; UTAH Complete Utah oil field data including geology, production, recovery methods, structure maps, index map of wells within field, type section logs, operations, field history, bibliography, references, reservoir data, and completion practices comprise this data set. FILE FOLDERS US STATE UTAH -114 -109 42 37 1900-PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 UTAH OIL FIELD FILE NONAUTOMATED MANUAL NONE OPERATIONAL RAY KERNS UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0030 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/test/gils/records/esdd0059.grs0000644000175000017500000000507211412336535015501 00000000000000 SIGNIFICANT AQUIFERS MAP SERIES MAINE GEOLOGICAL SURVEY AQUIFER; GEOCHEMISTRY; GROUNDWATER; HYDROLOGY; MAINE; MAP; SURFICIAL AQUIFER; SURFICIAL DEPOSIT; WATER; WATER WELL The Significant Aquifers Program is a more detailed study of selected major surficial aquifers. Data reported includes outline of aquifers, seismic cross-sections, well yields, logs of borings, and regional groundwater geochemistry. Many are in extreme SW Maine at this time. Areas in North and Central Maine are not yet covered. MAP SETS; REPORT SETS Detailed study of selected major surficial aquifers; replaced Sand and Gravel Aquifer Mapping Program. US STATE MAINE; SOUTHWEST MAINE; SOUTHWESTERN MAINE -71 -67 48 43 1982-PRESENT MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 SIGNIFICANT AQUIFERS MAP SERIES NONAUTOMATED MANUAL NONE OPERATIONAL JOHN WILLIAMS MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 ESDD0059 MAINE GEOLOGICAL SURVEY 198709 idzebra-2.0.44/test/gils/records/esdd0052.grs0000644000175000017500000000452411412336535015473 00000000000000 THESES ON NEVADA GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY GEOLOGY; NEVADA This database contains catalogs and indexes of geology theses in Nevada. Some of the information included are author, title, location, degree, and university. CATALOGS/INDEXES US STATE LATITUDE/LONGITUDE NEVADA -120 -114 42 35 1976-PRESENT NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 THESES ON NEVADA GEOLOGY NONAUTOMATED MANUAL Bibliography of Graduate Theses on Nevada Geology to 1976: Nevada Bureau of Mines and Geology, Report 31. OPERATIONAL BECKY WEIMER PURKEY NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ESDD0052 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/test/gils/records/esdd0053.grs0000644000175000017500000000506411412336535015474 00000000000000 SAMPLES ANALYZED FOR PROSPECTORS IN THE NBMG (NMAL) CHEMICAL LABORATORY NEVADA BUREAU OF MINES AND GEOLOGY GEOLOGY; MINE; NEVADA This database contains reports on samples analyzed in the NBMG (NMAL) Chemical Laboratory. The reports include such information as prospector's name, address, location, sample description, and analytical results. REPORT SETS MINING DISTRICT PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA -120 -114 42 35 1925-PRESENT NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 SAMPLES ANALYZED FOR PROSPECTORS IN THE NBMG (NMAL) CHEMICAL LABORATORY AUTOMATED INTERACTIVE 20,000 PCJR (IBM) RENO, NV NONE OPERATIONAL PAUL LECHLER NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ESDD0053 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/test/gils/records/esdd0058.grs0000644000175000017500000000533411412336535015501 00000000000000 SAND AND GRAVEL AQUIFER MAPS MAINE GEOLOGICAL SURVEY AQUIFER; GROUNDWATER; HYDROLOGY; MAINE; MAP; SURFICIAL AQUIFER; SURFICIAL DEPOSIT; WATER A series of 1:50,000 scale maps showing the outlines of known deposits of coarse surficial material with well yields greater than 10 gallons per minute (gpm) and 50 gpm comprises this data set. Other information pertaining to wells, test pits, borings, etc., are also shown. Tables describe other geologic information pertaining to the deposits. MAP SETS; LOGS; TABLES This program is superseded by the Significant Aquifers Program. More detailed maps of significant surficial aquifers are published for some areas and planned for others. See Significant Aquifer Map Series. 1:50,000 scale base maps derived from USGS quadrangles; no coverage in Northwest and parts of Eastern Maine. US STATE MAINE -71 -67 48 43 1978-1981 MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 SAND AND GRAVEL AQUIFER MAPS NONAUTOMATED MANUAL NONE OPERATIONAL JOHN WILLIAMS MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 ESDD0058 MAINE GEOLOGICAL SURVEY 198709 idzebra-2.0.44/test/gils/records/esdd0048.grs0000644000175000017500000000501711412336535015476 00000000000000 MINERAL OCCURRENCES, DEPOSITS, PROSPECTS, AND MINES NEVADA BUREAU OF MINES AND GEOLOGY GEOLOGY; MINE; MINERAL; NEVADA Name, location, workings, geologic description, history of development and mining (if any), analyses of rocks and minerals, and references are components of this database. MAP SETS; REPORT SETS; CATALOGS/INDEXES; PHOTOGRAPHS; BIBLIOGRAPHIES; FILE FOLDERS; ROCK AND MINERAL SAMPLES COUNTIES UTM NORTHINGS AND EASTINGS; PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA -120 -114 42 35 1970-PRESENT NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 MINERAL OCCURRENCES, DEPOSITS, PROSPECTS, AND MINES NONAUTOMATED MANUAL 20,000 As an area is covered, the data is open-filed at the Nevada Bureau of Mines and Geology. JOE TINGLEY NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ESDD0048 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/test/gils/records/esdd0076.grs0000644000175000017500000000523511412336535015501 00000000000000 AUTOMATED FLOOD WARNING NETWORK <Acronym> ASERT </Acronym> DEPARTMENT OF ENVIRONMENTAL PROTECTION CLIMATE; CONNECTICUT; FLOOD; FLOOD ZONE; HYDROLOGY; METEOROLOGY; PRECIPITATION; RAINFALL; SOIL; STREAM; STREAMFLOW; WIND The new system will collect rainfall, temperature, soil moisture, wind speed and direction, humidity, and streamflow (above certain values). WEATHER AND STREAM DATA Cooperative program with SCS, DEP, COE, and FEMA. Plans call for 19 telemetering precipitation stations and 2 stream gauges. Data will be continuously relayed to a central facility that will predict flood situations. Towns will be encouraged to participate. US STATE CONNECTICUT -74 -71 42 41 1982-PRESENT DEPARTMENT OF ENVIRONMENTAL PROTECTION NATURAL RESOURCES CENTER, 165 CAPITOL AVENUE, ROOM 553 HARTFORD CT 06106 USA (203) 566-3540 AUTOMATED FLOOD WARNING NETWORK AUTOMATED IBM PC HARTFORD, CT NONE OPERATIONAL ALLAN WILLIAMS DEPARTMENT OF ENVIRONMENTAL PROTECTION NATURAL RESOURCES CENTER, 165 CAPITOL AVENUE, ROOM 553 HARTFORD CT 06106 USA (203) 566-3540 ESDD0076 DEPARTMENT OF ENVIRONMENTAL PROTECTION 198502 idzebra-2.0.44/test/gils/records/esdd0074.grs0000644000175000017500000000501511412336535015473 00000000000000 INLAND WETLANDS OF CONNECTICUT DEPARTMENT OF ENVIRONMENTAL PROTECTION CONNECTICUT; HYDROLOGY; INLAND WETLAND; MAP; SOIL; WATER; WETLAND This data set contains inland wetlands, as defined by State statute, which are delineated at a scale of 1:12,000, based predominantly on location of wet soils. MAP SETS; PHOTOGRAPHS; INDIVIDUAL MAPS; FILE FOLDERS Inland wetlands in Connecticut are defined primarily by soil characteristics. Soils which are very poorly drained, alluvial, or flood plain according to the National Cooperative Soil Survey are inland wetland soils. CITIES CONNECTICUT -74 -71 42 41 1972-PRESENT DEPARTMENT OF ENVIRONMENTAL PROTECTION WATER RESOURCES UNIT, 165 CAPITOL AVENUE, ROOM 207 HARTFORD CT 06106 USA (203) 566-7280 INLAND WETLANDS OF CONNECTICUT NONAUTOMATED MANUAL NONE OPERATIONAL DOUGLAS COOPER DEPARTMENT OF ENVIRONMENTAL PROTECTION WATER RESOURCES UNIT, 165 CAPITOL AVENUE, ROOM 207 HARTFORD CT 06106 USA (203) 566-7280 ESDD0074 DEPARTMENT OF ENVIRONMENTAL PROTECTION 198502 idzebra-2.0.44/test/gils/records/esdd0040.grs0000644000175000017500000000455411412336535015473 00000000000000 ELECTRIC LOG LIBRARY UTAH GEOLOGICAL AND MINERAL SURVEY AREAL GEOLOGY; CRUDE OIL; ELECTRICITY; GEOLOGY; GEOPHYSICAL; HYDROCARBON; LITHOLOGY; MUD; OIL; PETROLEUM; PETROLEUM WELL; UTAH Logs for selected petroleum wells include electric (all varieties) and lithologic or hydrocarbon logs. Duplicates from OG&M well records file, supplied by private concerns. The areal coverage is Utah and vicinity. LOGS US STATE PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) UTAH -114 -109 42 37 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY ECONOMIC PROGRAM, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ELECTRIC LOG LIBRARY NONAUTOMATED MANUAL NONE UNDER DEVELOPMENT UTAH GEOLOGICAL AND MINERAL SURVEY ECONOMIC PROGRAM, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0040 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/test/gils/records/esdd0064.grs0000644000175000017500000000471311412336535015476 00000000000000 OPERATING MINES STATE MINE INSPECTOR'S OFFICE INDUSTRY; MINE; NEVADA This database contains information on operating mines in Nevada such as mine name, operator, number of employees, address, manager's name, substance mined or processed. CATALOGS/INDEXES; DIGITAL DATA SETS US STATE; COUNTIES PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA -120 -114 42 35 -PRESENT STATE MINE INSPECTOR'S OFFICE STATE MINE INSPECTOR, NEVADA DEPT. OF INDUSTRIAL RELATIONS, 1380 S. CURRY CARSON CITY NV 89710 USA (702) 687-5243 OPERATING MINES AUTOMATED INTERACTIVE 500 GOLDSTAR CARSON CITY, NV NONE OPERATIONAL KATHY HALL STATE MINE INSPECTOR'S OFFICE STATE MINE INSPECTOR, NEVADA DEPT. OF INDUSTRIAL RELATIONS, 1380 S. CURRY CARSON CITY NV 89710 USA (702) 687-5243 ESDD0064 STATE MINE INSPECTOR'S OFFICE 199101 idzebra-2.0.44/test/gils/records/esdd0033.grs0000644000175000017500000000462611412336535015475 00000000000000 MINE MAP INDEX UTAH GEOLOGICAL AND MINERAL SURVEY AREAL GEOLOGY; COAL; GEOLOGY; MAP; MINE; UTAH Mine Map Index is an index of mine maps located in the UGMS energy section. All maps are rescaled by hand to 1:24,000. Maps show areal extent of mine and coal seams. Maps are used for production, control, and resource calculations. CATALOGS/INDEXES; INDIVIDUAL MAPS Some drill hole information is confidential. 7 1/2' OR 15' QUADS; US STATE UTAH -114 -109 42 37 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 MINE MAP INDEX AUTOMATED INTERACTIVE 200 SALT LAKE CITY, UT NONE OPERATIONAL KEITH ALEX UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0033 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/test/gils/records/esdd0071.grs0000644000175000017500000000567411412336535015503 00000000000000 STATEWIDE PLANNING DEPARTMENT OF ENVIRONMENTAL PROTECTION AGRICULTURE; CONNECTICUT; FLOOD; FLOOD ZONE; HYDROLOGY; INSURANCE; LAND USE; RECREATION; WASTE; WASTE TREATMENT; WASTEWATER; WATER; WATER SUPPLY This data set contains: 1970 digitized land use maps, 1970 digitized zoning maps, active agricultural areas maps (1979-1980), maps displaying current National Flood Insurance Program data, locational guide map of the State Policies Plan for Conservation and Development of Connecticut (1987-1992), 1970 land use statistical data and 1970 municipal zoning data, proposed sewer service areas maps (1978) - DEP has update of this information, water conservation handbooks, and various reports and maps of the areawide Waste Treatment Management Planning Program (208). MAP SETS; REPORT SETS; INDIVIDUAL MAPS; FILE FOLDERS Alternate contact: John Radacsi. 7 1/2' OR 15' QUADS; US STATE; 1:125,000 SCALE MAPS CONNECTICUT -74 -71 42 41 1960-PRESENT DEPARTMENT OF ENVIRONMENTAL PROTECTION OFFICE OF POLICY AND MANAGEMENT, POLICY DEVELOPMENT AND PLANNING DIVISION, 80 WASHINGTON STREET HARTFORD CT 06106-4459 USA (203) 566-8341 STATEWIDE PLANNING NONAUTOMATED MANUAL NONE OPERATIONAL THERON SCHNURE DEPARTMENT OF ENVIRONMENTAL PROTECTION OFFICE OF POLICY AND MANAGEMENT, POLICY DEVELOPMENT AND PLANNING DIVISION, 80 WASHINGTON STREET HARTFORD CT 06106-4459 USA (203) 566-8341 ESDD0071 DEPARTMENT OF ENVIRONMENTAL PROTECTION 199104 idzebra-2.0.44/test/gils/records/esdd0066.grs0000644000175000017500000000456711412336535015507 00000000000000 ORE DEPOSITS (UNPUBLISHED REPORTS AND MAPS) NEVADA BUREAU OF MINES AND GEOLOGY MINE; NEVADA; ORE; ORE DEPOSIT Occurrence, prospect, or mine name, mining district, description of man-made things (workings, buildings, etc.), and a description of geologic setting are descriptive elements of reports and maps on ore deposits in Nevada. MAP SETS; REPORT SETS; PHOTOGRAPHS; INDIVIDUAL MAPS; FILE FOLDERS; LOGS; NEWSPAPER CLIPPINGS US STATE; COUNTIES; MINING DISTRICT NEVADA -120 -114 42 35 1960-PRESENT NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ORE DEPOSITS (UNPUBLISHED REPORTS AND MAPS) NONAUTOMATED MANUAL 25,000 NONE BECKY WEIMER PURKEY NEVADA BUREAU OF MINES AND GEOLOGY NEVADA BUREAU OF MINES AND GEOLOGY, UNIVERSITY OF NEVADA RENO NV 89557 USA (702) 784-6691 ESDD0066 NEVADA BUREAU OF MINES AND GEOLOGY 199101 idzebra-2.0.44/test/gils/records/esdd0072.grs0000644000175000017500000000505711412336535015477 00000000000000 PETROLEUM PRODUCT VENDOR REGISTRATION <Acronym> PPVR </Acronym> DEPARTMENT OF ENVIRONMENTAL PROTECTION CONNECTICUT; CRUDE OIL; ELECTRICITY; MAP; NATURAL GAS; OIL; PETROLEUM; VENDOR This data set is comprised of the following: petroleum product storage and sales by vendor and municipality, petroleum product vendor ownership and affiliation and maps of petroleum product storage tanks, electric transmission lines, and natural gas pipelines - mylar overlays. MAP SETS; REPORT SETS; FILE FOLDERS CITIES; US STATE CONNECTICUT -74 -71 42 41 1975-PRESENT DEPARTMENT OF ENVIRONMENTAL PROTECTION OFFICE OF POLICY AND MANAGEMENT, ENERGY DIVISION, 80 WASHINGTON STREET HARTFORD CT 06106 USA (203) 566-2800 PETROLEUM PRODUCT VENDOR REGISTRATION AUTOMATED FOCUS INTERACTIVE 3,329 NONE OPERATIONAL RUSSELL KAPLAN DEPARTMENT OF ENVIRONMENTAL PROTECTION OFFICE OF POLICY AND MANAGEMENT, ENERGY DIVISION, 80 WASHINGTON STREET HARTFORD CT 06106 USA (203) 566-2800 ESDD0072 DEPARTMENT OF ENVIRONMENTAL PROTECTION 198502 idzebra-2.0.44/test/gils/records/esdd0041.grs0000644000175000017500000000474611412336535015477 00000000000000 WELL SAMPLE LIBRARY UTAH GEOLOGICAL AND MINERAL SURVEY CORE; CORE CHIPS; CRUDE OIL; DRILL CUTTINGS; GEOTHERMAL; GEOTHERMAL WELL; MINE; OIL; PETROLEUM; PETROLEUM WELL; STRATIGRAPHY; UTAH Petroleum, mining, geothermal, and stratigraphic samples, including cores, core chips and drill cuttings comprise this data set. This does not include logs or description. These data are supplied by outside agencies and private organizations. SAMPLE CONTAINERS Samples may be inspected by appointment only. US STATE PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) UTAH AND NEIGHBORING STATES -120 -102 49 31 -PRESENT UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 WELL SAMPLE LIBRARY NONAUTOMATED MANUAL NONE OPERATIONAL CAROLYN OLSEN UTAH GEOLOGICAL AND MINERAL SURVEY 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0041 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/test/gils/records/esdd0079.grs0000644000175000017500000000457511412336535015512 00000000000000 COASTAL BOUNDARY DEPARTMENT OF ENVIRONMENTAL PROTECTION COAST; COASTAL CONNECTICUT; COASTLINE; CONNECTICUT; FLOOD; FLOOD ZONE; HYDROLOGY; MAP; WATER This data set contains maps delineating the coastal boundary of Connecticut as defined in the Coastal Area Management Act. MAP SETS This set of maps serves to define that area of Connecticut's coast subject to special regulatory programs. The boundaries are administrative rather than resource based. 7 1/2' OR 15' QUADS LATITUDE/LONGITUDE CONNECTICUT; COASTAL CONNECTICUT -74 -71 42 41 DEPARTMENT OF ENVIRONMENTAL PROTECTION COASTAL MANAGEMENT UNIT, 71 CAPITOL AVENUE HARTFORD CT 06106 USA (203) 566-7404 COASTAL BOUNDARY NONAUTOMATED MANUAL NONE OPERATIONAL RON ROSZA DEPARTMENT OF ENVIRONMENTAL PROTECTION COASTAL MANAGEMENT UNIT, 71 CAPITOL AVENUE HARTFORD CT 06106 USA (203) 566-7404 ESDD0079 DEPARTMENT OF ENVIRONMENTAL PROTECTION 198502 idzebra-2.0.44/test/gils/records/esdd0067.grs0000644000175000017500000000470611412336535015503 00000000000000 WATER WELL DATA NV DEPT. OF CONS. AND NATURAL RESOURCES HYDROLOGY; LITHOLOGY; NEVADA; WATER; WATER WELL This database contains the following information on water wells in Nevada: driller's name, owner's name, location, formations encountered, lithologic descriptions, water level, and water quality. REPORT SETS; CATALOGS/INDEXES; FILE FOLDERS; LOGS CITIES; COUNTIES UTM NORTHINGS AND EASTINGS; PUBLIC LAND SURVEY (SECTION, TOWNSHIP, AND RANGE) NEVADA -120 -114 42 35 1930-PRESENT NV DEPT. OF CONS. AND NATURAL RESOURCES DCNR, DIVISION OF WATER RESOURCES, 123 W. NYE LANE CARSON CITY NV 89710 USA (702) 687-4380 WATER WELL DATA NONAUTOMATED MANUAL 20,000 NONE OPERATIONAL MIKE TURNIPSEED NV DEPT. OF CONS. AND NATURAL RESOURCES DCNR, DIVISION OF WATER RESOURCES, 123 W. NYE LANE CARSON CITY NV 89710 USA (702) 687-4380 ESDD0067 NV DEPT. OF CONS. AND NATURAL RESOURCES 199101 idzebra-2.0.44/test/gils/records/esdd0063.grs0000644000175000017500000000466511412336535015503 00000000000000 MAINE GEOLOGICAL SURVEY BEDROCK WATER WELL INVENTORY MAINE GEOLOGICAL SURVEY BEDROCK; BEDROCK WELL; GROUNDWATER; HYDROLOGY; MAINE; WATER; WATER WELL This data set contains a series of well inventory maps stored on tape. The series has no indexing. INVENTORY Resumed within the next fiscal year (1985-86). CITIES MAINE -71 -67 48 43 1972-PRESENT MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 MAINE GEOLOGICAL SURVEY BEDROCK WATER WELL INVENTORY AUTOMATED 15,000 400 BURROUGHS B20 AUGUSTA, ME. Format and card image available from the Maine Geological Survey. OPERATIONAL JOHN WILLIAMS MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 ESDD0063 MAINE GEOLOGICAL SURVEY 198709 idzebra-2.0.44/test/gils/records/esdd0055.grs0000644000175000017500000000444011412336535015473 00000000000000 RECONNAISSANCE SURFICIAL GEOLOGIC MAP SERIES MAINE GEOLOGICAL SURVEY GEOLOGY; GLACIAL DEPOSITS; GLACIER; MAINE; MAP; SURFICIAL GEOLOGY This data set contains a series of 1:24,000 and 1:62,500 scale reconnaissance surficial geologic maps prepared with a uniform explanation and format. MAP SETS Sixty percent of the state is at either 1:24,000 or 1:62,500 scale. 7 1/2' OR 15' QUADS MAINE -71 -67 48 43 1978-PRESENT MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 RECONNAISSANCE SURFICIAL GEOLOGIC MAP SERIES NONAUTOMATED MANUAL NONE OPERATIONAL WOODROW THOMPSON MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 ESDD0055 MAINE GEOLOGICAL SURVEY 198709 idzebra-2.0.44/test/gils/records/esdd0037.grs0000644000175000017500000000447211412336535015500 00000000000000 UTAH GEOLOGICAL SOCIETY PUBLICATIONS <Acronym> UGS </Acronym> UTAH GEOLOGICAL AND MINERAL SURVEY ARIZONA; COLORADO; GEOLOGY; IDAHO; NEVADA; UTAH; WYOMING Guidebooks and field logs of selected areas in Utah and neighboring states comprise this data set. REPORT SETS; LOGS Society merged into Utah Geological Association in 1970. Complete set of publications is available in UGMS Library. US STATE UTAH AND NEIGHBORING STATES -120 -102 49 31 1946-1970 UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 UTAH GEOLOGICAL SOCIETY PUBLICATIONS NONAUTOMATED MANUAL NONE OPERATIONAL UTAH GEOLOGICAL AND MINERAL SURVEY INFORMATION SECTION, 606 BLACK HAWK WAY SALT LAKE CITY UT 84108 USA (801) 581-6831 ESDD0037 UTAH GEOLOGICAL AND MINERAL SURVEY 198903 idzebra-2.0.44/test/gils/records/esdd0056.grs0000644000175000017500000000455611412336535015504 00000000000000 COASTAL MARINE GEOLOGIC ENVIRONMENTS MAP SERIES MAINE GEOLOGICAL SURVEY COAST; COASTAL MAINE; COASTLINE; GEOLOGY; HYDROLOGY; MAINE; MAP; MARINE; MARINE GEOLOGY; TIDAL WATER; WATER This data set contains a series of 1:24,000 scale maps of coastal marine geologic environments, including the supratidal, intertidal, and subtidal regimes. The information is derived primarily from air photo interpretation with representative field checking. MAP SETS 7 1/2' OR 15' QUADS MAINE; COASTAL MAINE -71 -67 48 43 1977-1978 MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 COASTAL MARINE GEOLOGIC ENVIRONMENTS MAP SERIES NONAUTOMATED MANUAL NONE OPERATIONAL ROBERT TUCKER MAINE GEOLOGICAL SURVEY MAINE GEOLOGICAL SURVEY, STATE HOUSE STATION 22 AUGUSTA ME 04333 USA (207) 289-2801 ESDD0056 MAINE GEOLOGICAL SURVEY 198709 idzebra-2.0.44/test/gils/records/esdd0073.grs0000644000175000017500000000653111412336535015476 00000000000000 POPULATION PROJECTIONS DEPARTMENT OF ENVIRONMENTAL PROTECTION CENSUS; CONNECTICUT; DEMOGRAPHICS; POPULATION; POPULATION PROJECTIONS This data set contains population projections by age and sex. Records contain identifiers, geographic coding, and population projections for 18 unique 5-year age cohorts for males and females from 0-4 cohort to 85 and over cohort. REPORT SETS; DIGITAL DATA SETS; LOTUS, ASCII This population projections data set is contained on a seven diskettes which contains the June 1989 Projection Series published by this office in the report cited above. Also included are birth rates, survival rates, migration rates, geographic codes and zip codes to municipal conversions. Geographical Coverage: State of Connecticut 8 Counties 16 Planning Regions 5 Health Service Areas 9 Labor Department Service Areas 6 Children and Youth Service Areas 16 Metropolitan/Non Metro Areas 169 Municipalities Alternate contact: James Palma. SEE COMMENTS SECTION. CONNECTICUT -74 -71 42 41 1980-2010 DEPARTMENT OF ENVIRONMENTAL PROTECTION OFFICE OF POLICY AND MANAGEMENT, POLICY DEVELOPMENT AND PLANNING DIVISION, 80 WASHINGTON STREET HARTFORD CT 06106-4459 USA (203) 566-8285 POPULATION PROJECTIONS AUTOMATED INTERACTIVE 2,415 148 IBM COMPATIBLE PC'S HARTFORD, CT State of Connecticut, Office of Policy and Management, Comprehensive Planning Division, 1989: 'Connecticut Population Projections,' Series 89.1. OPERATIONAL THERON SCHNURE DEPARTMENT OF ENVIRONMENTAL PROTECTION OFFICE OF POLICY AND MANAGEMENT, POLICY DEVELOPMENT AND PLANNING DIVISION, 80 WASHINGTON STREET HARTFORD CT 06106-4459 USA (203) 566-8285 ESDD0073 DEPARTMENT OF ENVIRONMENTAL PROTECTION 199104 idzebra-2.0.44/test/gils/zebra2.cfg0000644000175000017500000000062011412332551013720 00000000000000# Simple Zebra configuration file # # Where the schema files, attribute files, etc are located. profilePath: ${srcdir:-.}/../../tab # Files that describe the attribute sets supported. attset: bib1.att attset: gils.att attset: explain.att recordtype: grs.sgml storeData: 1 storeKeys: 1 recordId: file isam: b register: reg:200M memmax: 1 # do not create temp files when indexing #indexchunk: 1M idzebra-2.0.44/test/filters/0000755000175000017500000000000011412336535012654 500000000000000idzebra-2.0.44/test/filters/record.xml0000644000175000017500000000004411057500746014574 00000000000000some text $ text here. idzebra-2.0.44/test/filters/record.mrc0000644000175000017500000000055611057500746014565 0000000000000000366nam 22001698a 4500001001300000003000400013005001700017008004100034010001700179040001300075050001200088100001700100245003000117260001200147263000900159300001100168 11224466 DLC00000000000000.0910710c19910701nju 00010 eng  aDLCcDLC00a123-xyz10aJack Collins10aHow to program a computer1 aPenguin a8710 ap. cm. a 11224466 idzebra-2.0.44/test/filters/Makefile.am0000644000175000017500000000070011412332551014617 00000000000000 check_PROGRAMS = text grs.xml grs.xml.idzebra grs.marc TESTS = $(check_PROGRAMS) EXTRA_DIST = zebra.cfg record.xml record-idzebra.xml record.mrc text_SOURCES = text.c grs_xml_SOURCES = grs.xml.c grs_xml_idzebra_SOURCES = grs.xml.idzebra.c grs_marc_SOURCES = grs.marc.c AM_CPPFLAGS = -I$(top_srcdir)/include $(YAZINC) LDADD = ../api/libtestlib.a ../../$(main_zebralib) $(YAZLALIB) clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf idzebra-2.0.44/test/filters/zebra.cfg0000644000175000017500000000047211412332551014355 00000000000000# Simple Zebra configuration file # # Where the schema files, attribute files, etc are located. profilePath: ${srcdir:-.}:${srcdir:-.}/../../tab # Files that describe the attribute sets supported. attset: bib1.att attset: gils.att attset: explain.att recordtype: grs.xml isam: b modulePath: ../../index/.libs idzebra-2.0.44/test/filters/text.c0000644000175000017500000000362411412332551013723 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "../api/testlib.h" void tst(int argc, char **argv) { ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); char path[256]; tl_check_filter(zs, "text"); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_set_resource(zh, "recordType", "text"); zebra_init(zh); YAZ_CHECK(zebra_begin_trans(zh, 1) == ZEBRA_OK); sprintf(path, "%.200s/record.xml", tl_get_srcdir()); zebra_repository_update(zh, path); YAZ_CHECK(zebra_end_trans(zh) == ZEBRA_OK); zebra_commit(zh); YAZ_CHECK(tl_query(zh, "text", 1)); YAZ_CHECK(tl_query(zh, "test", 0)); zebra_set_resource(zh, "recordType", "text.$"); YAZ_CHECK(zebra_begin_trans(zh, 1) == ZEBRA_OK); sprintf(path, "%.200s/record.xml", tl_get_srcdir()); zebra_repository_update(zh, path); YAZ_CHECK(zebra_end_trans(zh) == ZEBRA_OK); zebra_commit(zh); YAZ_CHECK(tl_query(zh, "text", 3)); YAZ_CHECK(tl_query(zh, "here", 2)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/filters/grs.xml.idzebra.c0000644000175000017500000000375611412332551015756 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include "../api/testlib.h" void tst(int argc, char **argv) { ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); char path[256]; tl_check_filter(zs, "grs.xml"); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_set_resource(zh, "recordType", "grs.xml"); zebra_init(zh); YAZ_CHECK(zebra_begin_trans(zh, 1) == ZEBRA_OK); sprintf(path, "%.200s/record-idzebra.xml", tl_get_srcdir()); zebra_repository_update(zh, path); YAZ_CHECK(zebra_end_trans(zh) == ZEBRA_OK); zebra_commit(zh); YAZ_CHECK(tl_query(zh, "@attr 1=/ text", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=/ notexistent", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=/ 1198", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=/ 18", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=/elem/idzebra/size 1198", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=/elem/idzebra/localnumber 18", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=/elem/idzebra/filename biblio", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=/elem/idzebra/filename data", 0)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/filters/grs.marc.c0000644000175000017500000000314411412332551014450 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "../api/testlib.h" static void tst(int argc, char **argv) { ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); char path[256]; tl_check_filter(zs, "grs.marc"); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_set_resource(zh, "recordType", "grs.marc.usmarc"); zebra_init(zh); YAZ_CHECK(zebra_begin_trans(zh, 1) == ZEBRA_OK); sprintf(path, "%.200s/record.mrc", tl_get_srcdir()); zebra_repository_update(zh, path); YAZ_CHECK(zebra_end_trans(zh) == ZEBRA_OK); zebra_commit(zh); YAZ_CHECK(tl_query(zh, "@attr 1=4 computer", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=4 computee", 0)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/filters/Makefile.in0000644000175000017500000004634311412336425014651 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = text$(EXEEXT) grs.xml$(EXEEXT) \ grs.xml.idzebra$(EXEEXT) grs.marc$(EXEEXT) subdir = test/filters DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_grs_marc_OBJECTS = grs.marc.$(OBJEXT) grs_marc_OBJECTS = $(am_grs_marc_OBJECTS) grs_marc_LDADD = $(LDADD) am__DEPENDENCIES_1 = grs_marc_DEPENDENCIES = ../api/libtestlib.a ../../$(main_zebralib) \ $(am__DEPENDENCIES_1) am_grs_xml_OBJECTS = grs.xml.$(OBJEXT) grs_xml_OBJECTS = $(am_grs_xml_OBJECTS) grs_xml_LDADD = $(LDADD) grs_xml_DEPENDENCIES = ../api/libtestlib.a ../../$(main_zebralib) \ $(am__DEPENDENCIES_1) am_grs_xml_idzebra_OBJECTS = grs.xml.idzebra.$(OBJEXT) grs_xml_idzebra_OBJECTS = $(am_grs_xml_idzebra_OBJECTS) grs_xml_idzebra_LDADD = $(LDADD) grs_xml_idzebra_DEPENDENCIES = ../api/libtestlib.a \ ../../$(main_zebralib) $(am__DEPENDENCIES_1) am_text_OBJECTS = text.$(OBJEXT) text_OBJECTS = $(am_text_OBJECTS) text_LDADD = $(LDADD) text_DEPENDENCIES = ../api/libtestlib.a ../../$(main_zebralib) \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(grs_marc_SOURCES) $(grs_xml_SOURCES) \ $(grs_xml_idzebra_SOURCES) $(text_SOURCES) DIST_SOURCES = $(grs_marc_SOURCES) $(grs_xml_SOURCES) \ $(grs_xml_idzebra_SOURCES) $(text_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ TESTS = $(check_PROGRAMS) EXTRA_DIST = zebra.cfg record.xml record-idzebra.xml record.mrc text_SOURCES = text.c grs_xml_SOURCES = grs.xml.c grs_xml_idzebra_SOURCES = grs.xml.idzebra.c grs_marc_SOURCES = grs.marc.c AM_CPPFLAGS = -I$(top_srcdir)/include $(YAZINC) LDADD = ../api/libtestlib.a ../../$(main_zebralib) $(YAZLALIB) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/filters/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/filters/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list grs.marc$(EXEEXT): $(grs_marc_OBJECTS) $(grs_marc_DEPENDENCIES) @rm -f grs.marc$(EXEEXT) $(LINK) $(grs_marc_OBJECTS) $(grs_marc_LDADD) $(LIBS) grs.xml$(EXEEXT): $(grs_xml_OBJECTS) $(grs_xml_DEPENDENCIES) @rm -f grs.xml$(EXEEXT) $(LINK) $(grs_xml_OBJECTS) $(grs_xml_LDADD) $(LIBS) grs.xml.idzebra$(EXEEXT): $(grs_xml_idzebra_OBJECTS) $(grs_xml_idzebra_DEPENDENCIES) @rm -f grs.xml.idzebra$(EXEEXT) $(LINK) $(grs_xml_idzebra_OBJECTS) $(grs_xml_idzebra_LDADD) $(LIBS) text$(EXEEXT): $(text_OBJECTS) $(text_DEPENDENCIES) @rm -f text$(EXEEXT) $(LINK) $(text_OBJECTS) $(text_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grs.marc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grs.xml.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grs.xml.idzebra.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/test/filters/record-idzebra.xml0000644000175000017500000000035711057500746016221 00000000000000 some text $ text here. 1198 18 data/biblio/2/d/8/biblio-108.tkl idzebra-2.0.44/test/filters/grs.xml.c0000644000175000017500000000314211412332551014324 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include "../api/testlib.h" void tst(int argc, char **argv) { ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); char path[256]; tl_check_filter(zs, "grs.xml"); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_set_resource(zh, "recordType", "grs.xml"); zebra_init(zh); YAZ_CHECK(zebra_begin_trans(zh, 1) == ZEBRA_OK); sprintf(path, "%.200s/record.xml", tl_get_srcdir()); zebra_repository_update(zh, path); YAZ_CHECK(zebra_end_trans(zh) == ZEBRA_OK); zebra_commit(zh); YAZ_CHECK(tl_query(zh, "@attr 1=/ text", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=/ test", 0)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/Makefile.in0000644000175000017500000004241311412336425013173 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = test DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ SUBDIRS = codec api filters xslt xpath malxml config usmarc dmoz \ xelm cddb rusmarc zsh marcxml charmap mbox espec gils all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/test/dmoz/0000755000175000017500000000000011412336535012155 500000000000000idzebra-2.0.44/test/dmoz/zebra-b.cfg0000644000175000017500000000042711057500746014105 00000000000000profilePath: .:../../tab # Files that describe the attribute sets supported. attset: bib1.att attset: gils.att attset: explain.att recordtype: grs.sgml #storekeys: 1 #storedata: 1 #recordId: (bib1,identifier-standard) notimestamps: 1 isam: b register: reg-b:2G #memmax: 64 idzebra-2.0.44/test/dmoz/zebra-c.cfg0000644000175000017500000000041211057500746014100 00000000000000profilePath: .:../../tab # Files that describe the attribute sets supported. attset: bib1.att attset: gils.att attset: explain.att recordtype: grs.sgml #storekeys: 1 #storedata: 1 #recordId: (bib1,identifier-standard) notimestamps: 1 isam: c register: reg-c:2G idzebra-2.0.44/test/dmoz/con1.pl0000755000175000017500000000123711057500746013302 00000000000000#!/usr/bin/perl -w my $state = 'init'; my $topic = ''; my $title = ''; my $description; while ($_ = ) { if (//) { $topic = $1; } elsif (//) { $url = $1; } elsif (/(.*?)<\/d:Title>/) { $title = $1; } elsif (/(.*?)<\/d:Description>/) { $description = $1; } elsif (/<\/ExternalPage>/) { if (length($title) > 0) { print "\n"; print " $title\n"; print " $description\n"; print " $url\n"; print " $topic\n"; print "\n"; } } } idzebra-2.0.44/test/dmoz/all.sh0000755000175000017500000000017311412332551013177 00000000000000#!/bin/sh while true; do ./update.sh b lpr times-b.ps ./update.sh c lpr times-c.ps ./update.sh d lpr times-d.ps done idzebra-2.0.44/test/dmoz/Makefile.am0000644000175000017500000000013311412332551014120 00000000000000 EXTRA_DIST = zebra-b.cfg zebra-c.cfg update.sh all.sh con1.pl con2.pl noinst_PROGRAMS = idzebra-2.0.44/test/dmoz/con2.pl0000755000175000017500000000143711057500746013305 00000000000000#!/usr/bin/perl -w my $state = 'init'; my $topic = ''; my $title; my $description; my $no = 0; while ($_ = ) { if (//) { $topic = $1; } elsif (//) { $url = $1; } elsif (/(.*?)<\/d:Title>/) { $title = $1; } elsif (/(.*?)<\/d:Description>/) { $description = $1; } elsif (/<\/ExternalPage>/) { if (($no % 30000) == 0) { if ($no) { close(XO); } open(XO, ">dmoz." . ($no / 30000) . ".xml"); } print XO "\n"; print XO " $title\n"; print XO " $description\n"; print XO " $url\n"; print XO " $topic\n"; print XO "\n"; $no++; } } if ($no != 0) { close(XO); } idzebra-2.0.44/test/dmoz/README0000644000175000017500000000037711057500746012766 00000000000000 fetch.sh fetches the dmoz archive. con2.pl converts it into xml, multiple files with some 30.000 records in each update.sh is used for testing the performace of the various isams (all but isam-b are soon obsolete!). all.sh runs those tests for ever. idzebra-2.0.44/test/dmoz/Makefile.in0000644000175000017500000002504411412336425014145 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = subdir = test/dmoz DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ EXTRA_DIST = zebra-b.cfg zebra-c.cfg update.sh all.sh con1.pl con2.pl all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/dmoz/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/dmoz/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ clean-noinstPROGRAMS distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/test/dmoz/update.sh0000755000175000017500000000204211412332551013706 00000000000000#!/bin/sh t=$1 test -n "$t" || exit 1 test -d reg-$t && rm -fr reg-$t mkdir reg-$t rm -f *.mf *.LCK *.tmp ../../index/zebraidx -l zebraidx-$t.log init i=0 rm -f times-$t.log stat-$t.log while test -f dmoz.$i.xml; do echo -n "$i " >>times-$1.log rm -f zebraidx-$t.log ../../index/zebraidx -l zebraidx-$t.log -c zebra-$t.cfg -f 10 update dmoz.$i.xml grep ' zebraidx times:' zebraidx-$t.log | sed 's/.*zebraidx times://g' >>times-$t.log i=`expr $i + 1` mod=`expr $i % 50` if test $mod -eq 0; then echo "run $i" >> stat-$t.log ../../index/zebraidx -l zebraidx-$t.log -c zebra-$t.cfg stat >>stat-$t.log fi if test $i = 30; then break fi done title="ISAM-$t `date`" cat >plot.dem <?@\[\\]^_`\{|}~ # Characters to be considered equivalent for searching purposes. equivalent æä(ae) equivalent øö(oe) equivalent Ã¥(aa) equivalent uü # Supplemental mappings # Latin letter with h with dot below map \L1E25 h # Latin letter with H with dot below map \L1E24 h idzebra-2.0.44/test/charmap/default.idx0000644000175000017500000000101311412332551014656 00000000000000# Zebra indexes as referred to from the *.abs-files. # # Traditional word index index w completeness 0 position 1 charmap string.utf8.chr # Phrase index index p completeness 1 charmap string.chr # URX (URL) index index u completeness 0 charmap urx.chr # Numeric index (integer only) index n completeness 0 charmap numeric.chr # Null map index (no mapping at all) index 0 completeness 0 position 1 charmap @ # Sort register (no mapping at all) sort s completeness 1 charmap string.chr index y completeness 0 charmap @ idzebra-2.0.44/test/charmap/zebra.cfg0000644000175000017500000000047211412332551014320 00000000000000# Simple Zebra configuration file # # Where the schema files, attribute files, etc are located. profilePath: ${srcdir:-.}:${srcdir:-.}/../../tab # Files that describe the attribute sets supported. attset: bib1.att attset: gils.att attset: explain.att recordtype: grs.xml isam: b modulePath: ../../index/.libs idzebra-2.0.44/test/charmap/charmap1.c0000644000175000017500000000553111412332551014375 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "../api/testlib.h" static void tst(int argc, char **argv) { ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); char path[256]; tl_check_filter(zs, "grs.xml"); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_init(zh); YAZ_CHECK(zebra_begin_trans(zh, 1) == ZEBRA_OK); sprintf(path, "%.200s/x.xml", tl_get_srcdir()); zebra_repository_update(zh, path); YAZ_CHECK(zebra_end_trans(zh) == ZEBRA_OK); zebra_commit(zh); YAZ_CHECK(tl_query(zh, "@attr 1=4 @term string æ", 1)); /* search for UNICODE 1E25 - letter h with dot below */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @term string ḥ", 1)); /* search for UNICODE A ring */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @term string lÃ¥s", 1)); /* search for aa */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @term string laas", 1)); /* search for aa regular-1 */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=102 @term string lÃ¥s", 1)); /* search for aa regular-2 */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=103 @term string lÃ¥s", 1)); /* search for aa trunc=104 */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=104 @term string laas", 1)); /* search for aa trunc=105 */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=104 @term string laas", 1)); /* search for aaa */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @term string laaas", 0)); /* search ABC in title:0 . */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 4=3 @attr 1=4 ABC", 1)); /* search DEF in title:0 . */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 4=3 @attr 1=4 DEF", 0)); /* search [ in title:0 . */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 4=3 @attr 1=4 [", 1)); /* search \ in title:0 . */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 4=3 @attr 1=4 \\\\\\\\", 1)); /* search { in title:0 . */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 4=3 @attr 1=4 \\{", 1)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/charmap/x.xml0000644000175000017500000000037011057500746013532 00000000000000 h æ laas <Acronym> UUCCSEIS </Acronym> ABC DEF [ \ { idzebra-2.0.44/test/charmap/Makefile.in0000644000175000017500000004330411412336425014606 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = charmap1$(EXEEXT) subdir = test/charmap DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_charmap1_OBJECTS = charmap1.$(OBJEXT) charmap1_OBJECTS = $(am_charmap1_OBJECTS) charmap1_LDADD = $(LDADD) am__DEPENDENCIES_1 = charmap1_DEPENDENCIES = ../api/libtestlib.a ../../$(main_zebralib) \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(charmap1_SOURCES) DIST_SOURCES = $(charmap1_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ TESTS = $(check_PROGRAMS) EXTRA_DIST = zebra.cfg x.xml x.abs default.idx string.utf8.chr charmap1_SOURCES = charmap1.c AM_CPPFLAGS = -I$(top_srcdir)/include $(YAZINC) LDADD = ../api/libtestlib.a ../../$(main_zebralib) $(YAZLALIB) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/charmap/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/charmap/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list charmap1$(EXEEXT): $(charmap1_OBJECTS) $(charmap1_DEPENDENCIES) @rm -f charmap1$(EXEEXT) $(LINK) $(charmap1_OBJECTS) $(charmap1_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/charmap1.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/test/api/0000755000175000017500000000000011412336534011754 500000000000000idzebra-2.0.44/test/api/test_icu_indexing.cfg0000644000175000017500000000030411412332551016051 00000000000000profilepath: ${srcdir:-.}:${srcdir:-.}/../../tab modulePath: ../../index/.libs attset: bib1.att attset: explain.att recordType: grs.xml index: test_icu_indexing.idx isam: b encoding: utf-8 idzebra-2.0.44/test/api/test_search.c0000644000175000017500000004176211412332551014351 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** \file \brief test various search attributes */ #include #include "testlib.h" const char *myrec[] = { "\nMy title\n" " test record with single coordset, negatives\n" " \n" " -120 \n" " -102 \n" " 49 \n" " 31 \n" " \n" "\n", "\nMy x title\n" " second test with two coord sets\n" " \n" " -120 \n" " -102 \n" " 49 \n" " 31 \n" " " " \n" " -125 \n" " -108 \n" " 41 \n" " 25 \n" " \n" "\n", "\nMy title xa b c c c a y\n\n" , "\ntesta1 a2 c a1 a2 a3\n\n" , "\n" " 2107-09-19 00:00:00\n" "\n" , 0} ; static void tst(int argc, char **argv) { ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); YAZ_CHECK(tl_init_data(zh, myrec)); /* simple term */ YAZ_CHECK(tl_query(zh, "@attr 1=4 notfound", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 title", 3)); YAZ_CHECK_EQ(tl_fetch_compare(zh, 1, "zebra::facet::title:w", yaz_oid_recsyn_sutrs, "facet w title\n" "term 3 3: my\n" "term 3 3: title\n" "term 2 2: x\n"), ZEBRA_OK); YAZ_CHECK_EQ(tl_fetch_compare(zh, 1, "zebra::facet::title:s", yaz_oid_recsyn_sutrs, "facet s title\n" "term 1 1: my title\n" "term 1 1: my title x\n" "term 1 1: my x title\n"), ZEBRA_OK); /* trunc right */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=1 titl", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=1 x", 2)); YAZ_CHECK_EQ(tl_fetch_compare(zh, 1, "zebra::facet::title:w", yaz_oid_recsyn_sutrs, "facet w title\n" "term 2 2: my\n" "term 2 2: title\n" "term 2 2: x\n"), ZEBRA_OK); /* trunc left */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=2 titl", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=2 x", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=2 le", 3)); /* trunc left&right */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=3 titl", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=3 x", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=3 le", 3)); /* trunc none */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=100 titl", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=100 x", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=100 le", 0)); /* trunc: process # in term */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=101 titl", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=101 x", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=101 le", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=101 #le", 3)); /* trunc: re-1 */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=102 titl", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=102 x", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=102 le", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=102 .*le", 3)); /* trunc: re-2 */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=103 titl", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=103 titlx", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=103 titlxx", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=103 x", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=103 le", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=103 .*le", 3)); /* trunc: CCL #=. ?=.* (?[0-9] = n times .) */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=104 titl", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=104 tit#e", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=104 x", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=104 le", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=104 ?le", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=104 ?1le", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=104 ?2le", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=104 ?3le", 3)); /* trunc: * = .* ! = . and right truncate */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=105 titl", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=105 tit!e", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=105 x", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=105 le", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=105 *le", 3)); /* trunc: * = .* ! = . and do not truncate */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=106 titl", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=106 tit!e", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=106 x", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=106 le", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 5=106 *le", 3)); /* string relations, < */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 2=1 0", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 2=1 my", 0)); /* string relations, <= */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 2=2 my", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 2=2 mn", 0)); /* = */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 2=3 my", 3)); /* string relations, >= */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 2=4 x", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 2=4 tu", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 2=4 title", 3)); /* string relations, > */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 2=5 x", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 2=5 tu", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 2=5 title", 2)); /* always-matches relation */ YAZ_CHECK(tl_query(zh, "@attr 1=_ALLRECORDS @attr 2=103 {ym}", 5)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 2=103 {x my}", 4)); YAZ_CHECK(tl_query_x(zh, "@attr 1=1 @attr 2=103 {x my}", 0, 114)); /* and searches */ YAZ_CHECK(tl_query(zh, "@and @attr 1=4 notfound @attr 1=4 x", 0)); YAZ_CHECK(tl_query(zh, "@and @attr 1=4 x @attr 1=4 notfound", 0)); YAZ_CHECK(tl_query(zh, "@and @attr 1=4 notfound @attr 1=4 notfound", 0)); YAZ_CHECK(tl_query(zh, "@and @attr 1=4 x @attr 1=4 x", 2)); YAZ_CHECK(tl_query(zh, "@and @attr 1=4 x @attr 1=4 my", 2)); YAZ_CHECK(tl_query(zh, "@and @attr 1=4 my @attr 1=4 x", 2)); YAZ_CHECK(tl_query(zh, "@and @attr 1=4 my @attr 1=4 my", 3)); /* or searches */ YAZ_CHECK(tl_query(zh, "@or @attr 1=4 notfound @attr 1=4 x", 2)); YAZ_CHECK(tl_query(zh, "@or @attr 1=4 x @attr 1=4 notfound", 2)); YAZ_CHECK(tl_query(zh, "@or @attr 1=4 notfound @attr 1=4 notfound", 0)); YAZ_CHECK(tl_query(zh, "@or @attr 1=4 x @attr 1=4 x", 2)); YAZ_CHECK(tl_query(zh, "@or @attr 1=4 x @attr 1=4 my", 3)); YAZ_CHECK(tl_query(zh, "@or @attr 1=4 my @attr 1=4 x", 3)); YAZ_CHECK(tl_query(zh, "@or @attr 1=4 my @attr 1=4 my", 3)); /* not searches */ /* bug 619 */ YAZ_CHECK(tl_query(zh, "@not @attr 1=4 notfound @attr 1=4 x", 0)); YAZ_CHECK(tl_query(zh, "@not @attr 1=4 x @attr 1=4 x", 0)); YAZ_CHECK(tl_query(zh, "@not @attr 1=4 my @attr 1=4 x", 1)); YAZ_CHECK(tl_query(zh, "@not @attr 1=4 my @attr 1=4 notfound", 3)); YAZ_CHECK(tl_query(zh, "@not @attr 1=4 notfound @attr 1=4 notfound", 0)); /* phrase searches */ YAZ_CHECK(tl_query(zh, "@attr 1=4 my", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=4 {my x}", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 4=1 {my x}", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=4 {my x}", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=4 {x my}", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=4 {my x title}", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=4 {my title}", 2)); /* and-list searches */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 4=6 {x my}", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 4=6 {my x}", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 4=6 {my my}", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 4=6 {e x}", 0)); /* or-list searches */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 4=105 {x my}", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 4=105 {my x}", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 4=105 {my my}", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 4=105 {e x}", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 4=106 {e x}", 2)); /* exl=0 distance=2 order=1 relation=2 (<=), known, unit=word */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @prox 0 2 1 2 k 2 my x", 2)); /* exl=0 distance=2 order=1 relation=2 (<=), known, unit=word */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @prox 0 2 1 2 k 2 x my", 0)); /* exl=0 distance=2 order=0 relation=2 (<=), known, unit=word */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @prox 0 2 0 2 k 2 x my", 2)); /* exl=0 distance=2 order=0 relation=3 (=), known, unit=word */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @prox 0 2 1 3 k 2 my x", 1)); /* exl=1 distance=2 order=0 relation=3 (=), known, unit=word */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @prox 1 2 1 3 k 2 my x", 1)); /* exl=0 distance=2 order=1 relation=2 (<=), known, unit=word */ YAZ_CHECK(tl_query(zh, "@attr 1=1016 @prox 0 2 1 2 k 2 a y", 1)); /* exl=0 distance=1 order=1 relation=3 (=), known, unit=word */ YAZ_CHECK(tl_query(zh, "@attr 1=1016 @prox 0 1 1 3 k 2 a b", 1)); /* exl=0 distance=1 order=1 relation=3 (=), known, unit=word */ YAZ_CHECK(tl_query(zh, "@attr 1=1016 @prox 0 1 1 3 k 2 c a", 1)); /* exl=0 distance=1 order=1 relation=2 (<=), known, unit=word */ YAZ_CHECK(tl_query(zh, "@attr 1=1016 @prox 0 1 1 2 k 2 c a", 1)); /* exl=0 distance=1 order=1 relation=2 (<=), known, unit=word */ YAZ_CHECK(tl_query(zh, "@attr 1=1016 @prox 0 1 1 2 k 2 @prox 0 1 1 2 k 2 a1 a2 a3", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=1016 @prox 0 1 1 3 k 2 @prox 0 1 1 3 k 2 a1 a2 a3", 1)); /* 3 term @prox test.. */ YAZ_CHECK(tl_query(zh, "@attr 1=1016 \"a b c\"", 1)); /* exl=0 distance=1 order=1 relation=2 (<=), known, unit=word */ /* right associative (does not work, so zero hits) */ YAZ_CHECK(tl_query(zh, "@attr 1=1016 @prox 0 1 1 2 k 2 a @prox 0 1 1 2 k 2 b c", 0)); /* left associative (works fine) */ YAZ_CHECK(tl_query(zh, "@attr 1=1016 @prox 0 1 1 2 k 2 @prox 0 1 1 2 k 2 a b c", 1)); /* exl=0 distance=1 order=1 relation=3 (=), known, unit=word */ /* right associative (does not work, so zero hits) */ YAZ_CHECK(tl_query(zh, "@attr 1=1016 @prox 0 1 1 3 k 2 a @prox 0 1 1 3 k 2 b c", 0)); /* left associative (works fine) */ YAZ_CHECK(tl_query(zh, "@attr 1=1016 @prox 0 1 1 3 k 2 @prox 0 1 1 3 k 2 a b c", 1)); /* Non-indexed numeric use, but specified in bib1.att (bug #1142) */ YAZ_CHECK(tl_query_x(zh, "@attr 1=1000 x", 0, 114)); YAZ_CHECK(tl_query_x(zh, "@attr 1=1000 @attr 14=0 x", 0, 114)); YAZ_CHECK(tl_query_x(zh, "@attr 1=1000 @attr 14=1 x", 0, 0)); /* Non-indexed numeric use and unspecified in bib1.att */ YAZ_CHECK(tl_query_x(zh, "@attr 1=999 x", 0, 114)); YAZ_CHECK(tl_query_x(zh, "@attr 1=999 @attr 14=1 x", 0, 114)); /* Non-indexed string use attribute */ YAZ_CHECK(tl_query_x(zh, "@attr 1=gyf x", 0, 114)); YAZ_CHECK(tl_query_x(zh, "@attr 1=gyf @attr 14=0 x", 0, 114)); YAZ_CHECK(tl_query_x(zh, "@attr 1=gyf @attr 14=1 x", 0, 0)); /* provoke unsupported use attribute */ YAZ_CHECK(tl_query_x(zh, "@attr 1=999 @attr 4=1 x", 0, 114)); YAZ_CHECK(tl_query_x(zh, "@attr 1=999 @attr 4=6 x", 0, 114)); YAZ_CHECK(tl_query_x(zh, "@attr 1=999 @attr 4=105 x", 0, 114)); YAZ_CHECK(tl_query_x(zh, "@attr 1=999 @attr 4=109 123", 0, 114)); YAZ_CHECK(tl_query_x(zh, "@attrset 1.2.840.10003.3.1 @attr 1=999 x", 0, 114)); /* provoke unsupported attribute set */ YAZ_CHECK(tl_query_x(zh, "@attrset 1.2.8 @attr 1=999 @attr 4=1 x", 0, 121)); YAZ_CHECK(tl_query_x(zh, "@attrset 1.2.8 @attr 1=999 @attr 4=6 x", 0, 121)); YAZ_CHECK(tl_query_x(zh, "@attrset 1.2.8 @attr 1=999 @attr 4=105 x", 0, 121)); YAZ_CHECK(tl_query_x(zh, "@attrset 1.2.8 @attr 1=999 @attr 4=109 123", 0, 121)); /* provoke unsupported relation */ YAZ_CHECK(tl_query_x(zh, "@attr 1=4 @attr 2=6 x", 0, 117)); YAZ_CHECK(tl_query_x(zh, "@attr 1=1016 @attr 2=6 @attr 4=109 x", 0, 114)); /* position , phrase searches */ YAZ_CHECK(tl_query(zh, "@attr 3=1 title", 0)); YAZ_CHECK(tl_query(zh, "@attr 3=1 my", 3)); YAZ_CHECK(tl_query(zh, "@attr 3=1 {my title}", 2)); YAZ_CHECK(tl_query(zh, "@attr 4=1 @attr 3=1 {my title}", 2)); YAZ_CHECK(tl_query(zh, "@attr 3=1 {title my}", 0)); YAZ_CHECK(tl_query(zh, "@attr 4=1 @attr 3=1 {title my}", 0)); YAZ_CHECK(tl_query(zh, "@attr 4=1 @attr 3=1 {title my}", 0)); /* position , or-list */ YAZ_CHECK(tl_query(zh, "@attr 4=105 @attr 3=1 {title my}", 3)); YAZ_CHECK(tl_query(zh, "@attr 4=105 @attr 3=1 {title x}", 0)); /* position, and-list */ YAZ_CHECK(tl_query(zh, "@attr 4=6 @attr 3=1 {title my}", 0)); YAZ_CHECK(tl_query(zh, "@attr 4=6 @attr 3=1 {title x}", 0)); YAZ_CHECK(tl_query(zh, "@attr 4=6 @attr 3=1 my", 3)); /* 1=2038: West-Bounding-Coordinate 2039: East: 2040: North: 2041 South*/ /* 4=109: numeric string */ /* 2=3: equal 2=1: less, 2=4: greater or equal 2=5 greater */ /* N>=25, search attributes work */ YAZ_CHECK(tl_query(zh, "@attr 2=4 @attr gils 1=2040 @attr 4=109 25", 2)); /* N>49, search attributes work */ YAZ_CHECK(tl_query(zh, "@attr 2=5 @attr gils 1=2040 @attr 4=109 49", 0)); /* N>=49, search attributes work */ YAZ_CHECK(tl_query(zh, "@attr 2=4 @attr gils 1=2040 @attr 4=109 49", 2)); /* N>48, search attributes work */ YAZ_CHECK(tl_query(zh, "@attr 2=5 @attr gils 1=2040 @attr 4=109 48", 2)); /* N<48, search attributes work */ YAZ_CHECK(tl_query(zh, "@attr 2=1 @attr gils 1=2040 @attr 4=109 48", 1)); /* N<=48, search attributes work */ YAZ_CHECK(tl_query(zh, "@attr 2=2 @attr gils 1=2040 @attr 4=109 48", 1)); /* N=41, get rec1 only */ YAZ_CHECK(tl_query(zh, "@attr 2=3 @attr gils 1=2040 @attr 4=109 41", 1)); /* N=49, get both records */ YAZ_CHECK(tl_query(zh, "@attr 2=3 @attr gils 1=2040 @attr 4=109 49", 2)); /* W=-120 get both records */ YAZ_CHECK(tl_query(zh, "@attr 2=3 @attr gils 1=2038 @attr 4=109 -120", 2)); /* W<-122 get only rec1 */ YAZ_CHECK(tl_query(zh, "@attr 2=1 @attr gils 1=2038 @attr 4=109 '-120' ", 1)); /* N=41 and N=49 get only rec2 */ YAZ_CHECK(tl_query(zh, "@attr 2=3 @attr gils 1=2040 @attr 4=109 \"41 49\" ", 1)); /* = */ YAZ_CHECK(tl_query(zh, "@attr 1=30 @attr 4=5 @attr 2=3 {2107-09-19 00:00:00}", 1)); /* < */ YAZ_CHECK(tl_query(zh, "@attr 1=30 @attr 4=5 @attr 2=1 {2107-09-19 00:00:00}", 0)); /* <= */ YAZ_CHECK(tl_query(zh, "@attr 1=30 @attr 4=5 @attr 2=2 {2107-09-19 00:00:00}", 1)); /* >= */ YAZ_CHECK(tl_query(zh, "@attr 1=30 @attr 4=5 @attr 2=4 {2107-09-19 00:00:00}", 1)); /* > */ YAZ_CHECK(tl_query(zh, "@attr 1=30 @attr 4=5 @attr 2=5 {2107-09-19 00:00:00}", 0)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/test_sort1.c0000644000175000017500000000470511412332551014150 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "testlib.h" const char *myrec[] = { "\n" " first computer\n" " 2\n" " 2\n" "\n" , "\n" " second computer\n" " 1\n" " 21\n" "\n" , "\n" " 3rd computer\n" " a^3\n" " 15\n" "\n" , "\n" " fourth computer\n" " 4\n" " 11\n" "\n" , 0 }; static void tst(int argc, char **argv) { ZebraService zs = tl_start_up("test_sort1.cfg", argc, argv); ZebraHandle zh = zebra_open(zs, 0); zint ids[5]; YAZ_CHECK(tl_init_data(zh, myrec)); ids[0] = 3; ids[1] = 2; ids[2] = 4; ids[3] = 5; YAZ_CHECK(tl_sort(zh, "@or @attr 1=4 computer @attr 7=1 @attr 1=30 0", 4, ids)); YAZ_CHECK(tl_sort(zh, "@or @attr 1=4 computer @attr 7=1 @attr 1=Date 0", 4, ids)); ids[0] = 5; ids[1] = 4; ids[2] = 2; ids[3] = 3; YAZ_CHECK(tl_sort(zh, "@or @attr 1=4 computer @attr 7=1 @attr 1=1021 0", 4, ids)); YAZ_CHECK(tl_sort(zh, "@or @attr 1=4 computer @attr 7=1 @attr 1=Bib-Level 0", 4, ids)); ids[0] = 2; ids[1] = 5; ids[2] = 4; ids[3] = 3; YAZ_CHECK(tl_sort(zh, "@or @attr 1=4 computer @attr 7=1 @attr 1=1021 @attr 4=109 0", 4, ids)); YAZ_CHECK(tl_sort(zh, "@or @attr 1=4 computer @attr 7=1 @attr 1=Bib-Level @attr 4=109 0", 4, ids)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/test_sort2.idx0000644000175000017500000000177211412332551014514 00000000000000# Zebra indexes as referred to from the *.abs-files. # # Traditional word index # Used if completenss is 'incomplete field' (@attr 6=1) and # structure is word/phrase/word-list/free-form-text/document-text index w completeness 0 position 1 charmap test_sort2.chr # Phrase index # Used if completeness is 'complete {sub}field' (@attr 6=2, @attr 6=1) # and structure is word/phrase/word-list/free-form-text/document-text index p completeness 1 charmap test_sort2.chr # URX (URL) index # Used if structure=urx (@attr 4=104) index u completeness 0 charmap urx.chr # Numeric index # Used if structure=numeric (@attr 4=109) index n completeness 0 charmap numeric.chr # Null map index (no mapping at all) # Used if structure=key (@attr 4=3) index 0 completeness 0 position 1 charmap @ # Year # Used if structure=year (@attr 4=4) index y completeness 0 charmap @ # Date # Used if structure=date (@attr 4=5) index d completeness 0 charmap @ # Sort, with prefixes to ignore sort s completeness 1 charmap test_sort2.chr idzebra-2.0.44/test/api/testclient.c0000644000175000017500000001007411412332551014213 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #ifdef WIN32 #else #include #endif #include #include #include char *prog = "testclient"; int main(int argc, char **argv) { ZOOM_connection z; ZOOM_resultset r; int error; const char *errmsg, *addinfo; char *query = 0; char *target = 0; char *arg; int delay_sec = 0; int ret; int retrieve_number = 0; int retrieve_offset = 0; char *format = 0; int pos; int check_count = -1; int exit_code = 0; while ((ret = options("d:n:o:f:c:", argv, argc, &arg)) != -2) { switch (ret) { case 0: if (!target) target = xstrdup(arg); else if (!query) query = xstrdup(arg); break; case 'd': delay_sec = atoi(arg); break; case 'n': retrieve_number = atoi(arg); break; case 'o': retrieve_offset = atoi(arg); break; case 'f': format = xstrdup(arg); break; case 'c': check_count = atoi(arg); break; default: printf ("%s: unknown option %s\n", prog, arg); printf ("usage:\n%s [options] target query \n", prog); printf (" eg. indexdata.dk/gils computer\n"); exit (1); } } if (!target || !query) { printf ("%s: missing target/query\n", prog); printf ("usage:\n%s [options] target query \n", prog); printf (" eg. bagel.indexdata.dk/gils computer\n"); printf ("Options:\n"); printf (" -n num number of records to fetch. Default: 0.\n"); printf (" -o off offset for records - counting from 0.\n"); printf (" -f format set record syntax. Default: none\n"); printf (" -d sec delay a number of seconds before exit.\n"); printf (" -c count expect count hits, fail if not.\n"); exit (3); } z = ZOOM_connection_new (target, 0); if ((error = ZOOM_connection_error(z, &errmsg, &addinfo))) { printf ("Error: %s (%d) %s\n", errmsg, error, addinfo); exit (2); } r = ZOOM_connection_search_pqf (z, query); if ((error = ZOOM_connection_error(z, &errmsg, &addinfo))) { printf ("Error: %s (%d) %s\n", errmsg, error, addinfo); if (check_count != -1) exit_code = 10; } else { printf ("Result count: %ld\n", (long) ZOOM_resultset_size(r)); if (check_count != -1 && check_count != ZOOM_resultset_size(r)) { printf("Wrong number of hits, expected %d, got %ld\n", check_count, (long) ZOOM_resultset_size(r) ); exit(3); } } if (format) ZOOM_resultset_option_set(r, "preferredRecordSyntax", format); for (pos = 0; pos < retrieve_number; pos++) { int len; const char *rec = ZOOM_record_get( ZOOM_resultset_record(r, pos + retrieve_offset), "render", &len); if (rec) fwrite (rec, 1, len, stdout); } if (delay_sec > 0) sleep(delay_sec); ZOOM_resultset_destroy (r); ZOOM_connection_destroy (z); exit (exit_code); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/private_attset.abs0000644000175000017500000000033411412332551015414 00000000000000# This is the abstract syntax (and most of the top-level profile info) # for GILS version 2. # name my_private_attset attset private_attset.att esetname F @ systag sysno none elm title title title:w,extra_title:w idzebra-2.0.44/test/api/test_trunc.cfg0000644000175000017500000000017411412332551014544 00000000000000profilepath: ${srcdir:-.}/../../tab attset: bib1.att recordType: grs.sgml isam: b recordId: (bib1,identifier-standard) idzebra-2.0.44/test/api/private_attset.att0000644000175000017500000000016011412332551015434 00000000000000# Bib-1 Attribute Set name private_attset reference 1.2.840.10003.3.1000.1000.1 att 7 title att 8 extra_title idzebra-2.0.44/test/api/test_search.abs0000644000175000017500000000022211412332551014656 00000000000000name my reference WAIS-schema attset bib1.att esetname B @ esetname F @ xelm /test_search/title title:p,title:w xelm /test_search/date date:d idzebra-2.0.44/test/api/test_private_attset.c0000644000175000017500000000421611412332551016133 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "testlib.h" const char *myrec[] ={ "\n" " My title\n" "\n", 0}; static void tst(int argc, char **argv) { ZebraService zs = tl_start_up("test_private_attset.cfg", argc, argv); ZebraHandle zh = zebra_open(zs, 0); YAZ_CHECK(tl_init_data(zh, myrec)); zebra_commit(zh); // string attributes in search YAZ_CHECK(tl_query(zh, "@attr 1=title my", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=title my", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=title titlex", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=extra_title my", 1)); // numeric attributes with Bib-1 should produce an error YAZ_CHECK(tl_query_x(zh, "@attr 1=4 my", 0, 121)); YAZ_CHECK(tl_query_x(zh, "@attr 1=7 my", 0, 121)); // private OID with incorrect use attribute YAZ_CHECK(tl_query_x(zh, "@attr 1.2.840.10003.3.1000.1000.1 1=4 my", 0, 114)); // private OID with OK use attribute YAZ_CHECK(tl_query(zh, "@attr 1.2.840.10003.3.1000.1000.1 1=7 my", 1)); YAZ_CHECK(tl_query(zh, "@attr 1.2.840.10003.3.1000.1000.1 1=8 my", 1)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/test_resources.c0000644000175000017500000000605611412332551015113 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** test resources */ #include #include #include "testlib.h" #include static void tst_res(void) { Res default_res; /* default resources */ Res temp_res; /* temporary resources */ ZebraService zs; ZebraHandle zh; const char *val; int i; default_res = res_open(0, 0); /* completely empty */ YAZ_CHECK(default_res); res_set(default_res, "name1", "value1"); temp_res = res_open(0, 0); /* completely empty */ YAZ_CHECK(temp_res); zs = zebra_start_res(0, default_res, temp_res); YAZ_CHECK(zs); zh = zebra_open(zs, 0); YAZ_CHECK(zh); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); /* run this a few times so we can see leaks easier */ for (i = 0; i<10; i++) { /* we should find the name1 from default_res */ val = zebra_get_resource(zh, "name1", 0); YAZ_CHECK(val && !strcmp(val, "value1")); /* make local override */ res_set(temp_res, "name1", "value2"); res_set(temp_res, "name4", "value4"); /* we should find the name1 from temp_res */ val = zebra_get_resource(zh, "name1", 0); YAZ_CHECK(val && !strcmp(val, "value2")); val = zebra_get_resource(zh, "name4", 0); YAZ_CHECK(val && !strcmp(val, "value4")); res_clear(temp_res); } zebra_close(zh); zebra_stop(zs); res_close(temp_res); res_close(default_res); } static void tst_no_config(void) { static char *xml_buf = "myx"; ZebraService zs; ZebraHandle zh; zint sysno = 0; zs = zebra_start_res(0, 0, 0); YAZ_CHECK(zs); zh = zebra_open(zs, 0); YAZ_CHECK(zh); YAZ_CHECK_EQ(zebra_select_database(zh, "Default"), ZEBRA_OK); YAZ_CHECK_EQ(zebra_init(zh), ZEBRA_OK); zebra_set_resource(zh, "profilePath", "${srcdir:-.}/../../tab"); YAZ_CHECK_EQ(zebra_update_record(zh /* handle */, action_insert, "grs.sgml" /* record type */, &sysno, 0 /* match */, 0 /* fname */, xml_buf, strlen(xml_buf)), ZEBRA_OK); zebra_close(zh); zebra_stop(zs); } static void tst(int argc, char **argv) { tst_res(); tst_no_config(); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/testlib.h0000644000175000017500000001134711412332551013514 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** testlib - utilities for the api tests */ #include #include #include #include #include #include #include /** * tl_start_up : Does all the usual start functions * - nmem_init * - build the name of logfile from argv[0], and open it * if no argv passed, do not open a log * - read zebra.cfg from env var srcdir if it exists; otherwise current dir * default to zebra.cfg, if no name is given */ ZebraService tl_start_up(char *cfgname, int argc, char **argv); /** * get_srcdir : returns the source dir. Most often ".", but when * making distcheck, some other dir */ const char *tl_get_srcdir(void); /** * start_log: open a log file */ /* FIXME - parse command line arguments to set log levels etc */ void tl_start_log(int argc, char **argv); /** * tl_zebra_start - do a zebra_start with a decent config name * Takes care of checking the environment for srcdir (as needed by distcheck) * and uses that if need be. * The name defaults to zebra.cfg, if null or emtpy */ ZebraService tl_zebra_start(const char *cfgname); /** * close_down closes it all down * Does a zebra_close on zh, if not null. * Does a zebra_stop on zs, if not null * Writes a log message, OK if retcode is zero, error if not * closes down nmem and xmalloc * returns the retcode, for use in return or exit in main() */ int tl_close_down(ZebraHandle zh, ZebraService zs ) ZEBRA_GCC_ATTR((warn_unused_result)); /** inits the database and inserts test data */ int tl_init_data(ZebraHandle zh, const char **recs ) ZEBRA_GCC_ATTR((warn_unused_result)); /** * tl_query does a simple query, and checks that the number of hits matches */ int tl_query(ZebraHandle zh, const char *query, zint exphits ) ZEBRA_GCC_ATTR((warn_unused_result)); /** * tl_query does a simple query, and checks that error is what is expected */ int tl_query_x(ZebraHandle zh, const char *query, zint exphits, int experror ) ZEBRA_GCC_ATTR((warn_unused_result)); /** * tl_scan is a utility for scan testing */ int tl_scan(ZebraHandle zh, const char *query, int pos, int num, /* input params */ int exp_pos, int exp_num, int exp_partial, /* expected result */ const char **exp_entries /* expected entries (or NULL) */ ) ZEBRA_GCC_ATTR((warn_unused_result)); int tl_sort(ZebraHandle zh, const char *query, zint hits, zint *exp ) ZEBRA_GCC_ATTR((warn_unused_result)); /** * ranking_query makes a query, checks number of hits, and for * the first hit, that it contains the given string, and that it * gets the right score */ int tl_ranking_query(ZebraHandle zh, char *query, int exphits, char *firstrec, int firstscore ) ZEBRA_GCC_ATTR((warn_unused_result)); /** * meta_query makes a query, checks number of hits, and for * checks that the all records in result set has the proper identifiers (ids) */ int tl_meta_query(ZebraHandle zh, char *query, int exphits, zint *ids ) ZEBRA_GCC_ATTR((warn_unused_result)); /** * if filter given by name does not exist, exit nicely but warn in log */ void tl_check_filter(ZebraService zs, const char *name); ZEBRA_RES tl_fetch_first_compare(ZebraHandle zh, const char *element_set, const Odr_oid *format, const char *cmp_rec); ZEBRA_RES tl_fetch(ZebraHandle zh, int position, const char *element_set, const Odr_oid * format, ODR odr, const char **rec_buf, size_t *rec_len); ZEBRA_RES tl_fetch_compare(ZebraHandle zh, int position, const char *element_set, const Odr_oid *format, const char *cmp_rec); #define TL_MAIN int main(int argc, char **argv) { \ YAZ_CHECK_INIT(argc, argv); YAZ_CHECK_LOG(); tst(argc, argv); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/test_trunc.c0000644000175000017500000000461311412332551014231 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* Insert a number of randomly generated words and truncate */ #include "testlib.h" static void tst(int argc, char **argv) { int i; ZebraService zs = tl_start_up("test_trunc.cfg", argc, argv); ZebraHandle zh = zebra_open(zs, 0); srand(17); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_init(zh); zebra_close(zh); for (i = 0; i<10; i++) { int l; zh = zebra_open (zs, 0); YAZ_CHECK(zh); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); YAZ_CHECK(zebra_begin_trans (zh, 1) == ZEBRA_OK); for (l = 0; l<100; l++) { char rec_buf[5120]; int j; *rec_buf = '\0'; strcat(rec_buf, ""); if (i == 0) { sprintf(rec_buf + strlen(rec_buf), "aaa"); } else { j = (rand() & 15) + 1; while (--j >= 0) { int c = 65 + (rand() & 15); sprintf(rec_buf + strlen(rec_buf), "%c", c); } } strcat(rec_buf, ""); j = rand() & 31; sprintf(rec_buf + strlen(rec_buf), "%d", j); strcat(rec_buf, ""); zebra_add_record (zh, rec_buf, strlen(rec_buf)); } YAZ_CHECK(zebra_end_trans(zh) == ZEBRA_OK); zebra_close(zh); } zh = zebra_open(zs, 0); YAZ_CHECK(zh); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_set_resource(zh, "trunclimit", "2"); /* check massive truncation: bug #281 */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @attr 2=1 z", -1)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/test_sort1.chr0000644000175000017500000000135711412332551014502 00000000000000# Generic character map but with ^ as cut char # # Define the basic value-set. *Beware* of changing this without re-indexing # your databases. lowercase {0-9}{a-y}üzæäøöå uppercase {0-9}{A-Y}ÜZÆÄØÖÅ cut ^ # Breaking characters space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]_`\{|}~ # Characters to be considered equivalent for searching purposes. # equivalent æä(ae) # equivalent øö(oe) # equivalent å(aa) # equivalent uü # Supplemental mappings #map (ä) ä #map (æ) æ #map (ø) ø #map (å) å #map (ö) ö #map (Ä) Ä #map (&Aelig;) Æ #map (Ø) Ø #map (Å) Å #map (Ö) Ö #map éÉ e #map á a #map ó o #map í i #map (Aa) (AA) #map (aa) a idzebra-2.0.44/test/api/test_sort2.cfg0000644000175000017500000000044011412332551014456 00000000000000# Simple Zebra configuration file # # Where the schema files, attribute files, etc are located. profilePath: ${srcdir:-.}:${srcdir:-.}/../../tab # Files that describe the attribute sets supported. attset: bib1.att attset: explain.att recordtype: grs.sgml isam: b index: test_sort2.idx idzebra-2.0.44/test/api/sort2.abs0000644000175000017500000000023311412332551013425 00000000000000 name my reference WAIS-schema attset bib1.att tagset generic.tag xpath enable varset var1.var esetname B @ esetname F @ elm title Title !:p,!:w,!:s idzebra-2.0.44/test/api/test_sort_set.c0000644000175000017500000000472111412332551014740 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "testlib.h" #include const char *recs[] = { "\n" " My title\n" "\n", 0}; static void tst(int argc, char **argv) { const char *setname1 = "set1"; const char *setname2 = "set2"; const char *setname3 = "set3"; int status; ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open (zs, 0); ODR odr_input = odr_createmem (ODR_DECODE); ODR odr_output = odr_createmem (ODR_ENCODE); YAZ_PQF_Parser parser = yaz_pqf_create(); Z_RPNQuery *query = yaz_pqf_parse(parser, odr_input, "@attr 1=4 my"); Z_SortKeySpecList *spec = yaz_sort_spec (odr_output, "1=4 #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_UNISTD_H #include #endif #if HAVE_SYS_WAIT_H #include #endif #if HAVE_SYS_UTSNAME_H #include #endif #include #include "testlib.h" static void update_process(ZebraService zs, int iter) { int i; for (i = 0; i= hits_max); if (hits < hits_max) printf("i=%d hits=%lld hits_max=%lld\n", i, hits, hits_max); hits_max = hits; zebra_close(zh); } } static pid_t fork_service(ZebraService zs, int iter, void (*f)(ZebraService zs, int iter)) { pid_t pid = fork(); YAZ_CHECK(pid != -1); if (pid) return pid; (*f)(zs, iter); YAZ_CHECK_TERM; } static void tst(int argc, char **argv) { ZebraService zs; ZebraHandle zh; mkdir("register", 0775); mkdir("shadow", 0775); zs = tl_start_up("test_zebra_fork.cfg", argc, argv); YAZ_CHECK(zs); zh = zebra_open(zs, 0); YAZ_CHECK(zh); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_init(zh); YAZ_CHECK(zebra_create_database (zh, "Default") == ZEBRA_OK); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_close(zh); update_process(zs, 1); #if HAVE_SYS_WAIT_H #if HAVE_UNISTD_H #if HAVE_SYS_UTSNAME_H if (1) { int tst_with_fork = 1; int status[3]; pid_t pids[3]; struct utsname s; uname(&s); if (!strcmp(s.sysname, "FreeBSD")) tst_with_fork = 0; yaz_log(YLOG_LOG, "s.sysname=%s tst_with_fork=%d", s.sysname, tst_with_fork); if (tst_with_fork) { pids[0] = fork_service(zs, 200, search_process); pids[1] = fork_service(zs, 20, update_process); pids[2] = fork_service(zs, 20, update_process); waitpid(pids[0], &status[0], 0); YAZ_CHECK(status[0] == 0); waitpid(pids[1], &status[1], 0); YAZ_CHECK(status[1] == 0); waitpid(pids[2], &status[2], 0); YAZ_CHECK(status[2] == 0); } } #endif #endif #endif YAZ_CHECK(tl_close_down(0, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/sort1.abs0000644000175000017500000000027711412332551013434 00000000000000 name my reference WAIS-schema attset bib1.att tagset generic.tag varset var1.var esetname B @ esetname F @ elm (2,1) Title !:p,!:w elm (2,8) Date !:s elm (2,26) Cost Bib-level:S idzebra-2.0.44/test/api/test_sort2.chr0000644000175000017500000000106511412332551014477 00000000000000# character map that removes some leading prefixes # # Define the basic value-set. *Beware* of changing this without re-indexing # your databases. lowercase {0-9}{a-y}üzæäøöå uppercase {0-9}{A-Y}ÜZÆÄØÖÅ # Breaking characters space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~ # Characters to be considered equivalent for searching purposes. # equivalent æä(ae) # equivalent øö(oe) # equivalent å(aa) # equivalent uü map (^The\s) @ map (^the\s) @ map (^a\s) @ map (^A\s) @ #map éÉ e #map á a #map ó o #map í i #map (Aa) (AA) #map (aa) a idzebra-2.0.44/test/api/Makefile.am0000644000175000017500000000363411412332551013731 00000000000000 noinst_PROGRAMS = testclient testclient_SOURCES = testclient.c check_PROGRAMS = test_start_stop test_result_sets \ test_insert_fetch test_search test_trunc test_sort_set \ test_rank test_private_attset \ test_scan test_create_databases test_resources test_update_record \ test_zebra_fork test_special_elements test_icu_indexing \ test_safari test_sort1 test_sort2 test_sort3 \ test_sortidx TESTS = $(check_PROGRAMS) EXTRA_DIST=zebra.cfg test_trunc.cfg test_private_attset.cfg \ private_attset.att private_attset.abs test_search.abs \ test_zebra_fork.cfg \ test_icu_indexing.cfg test_icu_indexing.idx \ test_sort1.cfg test_sort1.idx test_sort1.chr sort1.abs \ test_sort2.cfg test_sort2.idx test_sort2.chr sort2.abs \ test_safari.cfg test_sort3.cfg noinst_LIBRARIES = libtestlib.a libtestlib_a_SOURCES = testlib.c testlib.h test_start_stop_SOURCES = test_start_stop.c test_result_sets_SOURCES = test_result_sets.c test_insert_fetch_SOURCES = test_insert_fetch.c test_search_SOURCES = test_search.c test_trunc_SOURCES = test_trunc.c test_sort_set_SOURCES = test_sort_set.c test_rank_SOURCES = test_rank.c test_private_attset_SOURCES = test_private_attset.c test_scan_SOURCES = test_scan.c test_create_databases_SOURCES = test_create_databases.c test_resources_SOURCES = test_resources.c test_update_record_SOURCES = test_update_record.c test_zebra_fork_SOURCES = test_zebra_fork.c test_special_elements_SOURCES = test_special_elements.c test_icu_indexing_SOURCES = test_icu_indexing.c test_safari_SOURCES = test_safari.c test_sort1_SOURCES = test_sort1.c test_sort2_SOURCES = test_sort2.c test_sort3_SOURCES = test_sort3.c test_sortidx_SOURCES = test_sortidx.c AM_CPPFLAGS = -I$(top_srcdir)/include $(YAZINC) zebralibs = ../../$(main_zebralib) LDADD = libtestlib.a $(zebralibs) $(YAZLALIB) clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf -rm -rf register/*.LCK -rm -rf register/*.log -rm -rf register/*.mf idzebra-2.0.44/test/api/test_update_record.c0000644000175000017500000000423611412332551015717 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "testlib.h" static void create_search_drop(ZebraHandle zh) { const char *rec = "some"; const char *opaque_id = "9"; YAZ_CHECK(zebra_create_database (zh, "Default") == ZEBRA_OK); /* bug #447 */ YAZ_CHECK(zebra_update_record( zh, action_update, 0 /* record type */, 0 /* sysno */, opaque_id, 0 /* fname */, rec, strlen(rec)) == ZEBRA_OK); /* insert really */ YAZ_CHECK(zebra_update_record( zh, action_update, 0 /* record type */, 0 /* sysno */, opaque_id, 0 /* fname */, rec, strlen(rec)) == ZEBRA_OK); /* replace really */ YAZ_CHECK(tl_query(zh, "@attr 1=4 some", 1)); zebra_drop_database(zh, "Default"); YAZ_CHECK(tl_query_x(zh, "@attr 1=4 some", 0, 109)); } static void tst(int argc, char **argv) { ZebraService zs = tl_start_up("zebra.cfg", argc, argv); ZebraHandle zh = zebra_open(zs, 0); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_init(zh); create_search_drop(zh); /* bug #447 */ create_search_drop(zh); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/test_sort3.cfg0000644000175000017500000000015311412332551014460 00000000000000profilepath: ${srcdir:-.}/../../tab attset: bib1.att attset: explain.att recordType: grs.sgml isam: b idzebra-2.0.44/test/api/test_safari.c0000644000175000017500000001741511412332551014347 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** \file \brief test safari filter */ #include "testlib.h" const char *myrec[] = { "1234\n" /* ID first record */ /* chunk owner seq idx term */ "00024338 125060 0 1 any the\n" "00024338 125060 0 2 any art\n" "00024338 125060 0 3 any mand\n" "s 00024338 125060 0 3 ti a b c\n" , "5678\n" /* other record - same owner id */ "00024339 125060 0 1 any den\n" "00024339 125060 0 2 any gamle\n" "00024339 125060 0 3 any mand\n" "s 00024339 125060 0 3 ti d e f\n" , "5678\n" /* same record chunk id as before .. */ "00024339 125060 0 1 any the\n" "00024339 125060 0 2 any gamle\n" "00024339 125060 0 3 any mand\n" "s 00024339 125060 0 3 ti g h i\n" , "1000\n" /* separate record */ "00024339 125061 0 1 any the\n" "00024339 125061 0 2 any gamle\n" "00024339 125061 0 3 any mand\n" "w 00024339 125661 0 4 any Hello\n" /* index type given */ "s 00024339 125061 0 3 ti j k l\n" , "1001\n" /* separate record */ "00024340 125062 0 1 any the\n" "00024340 125062 0 1 any the\n" /* DUP KEY, bug #432 */ "00024340 125062 0 2 any old\n" "00024340 125062 0 3 any mand\n" "s 00024340 125062 0 3 ti m n o\n" , "1002\n" /* segment testing record */ "00024341 125062 0 1 title a\n" "00024341 125062 0 2 title b\n" "00024341 125062 1 1024 title b\n" "00024341 125062 1 1025 title c\n" "00024341 125062 1 1026 title d\n" "00024341 125062 1 1027 title e\n" "00024341 125062 1 1028 title f\n" "00024341 125062 2 2048 title g\n" "00024341 125062 2 2049 title c\n" , 0 }; static void tst(int argc, char **argv) { zint ids[3]; zint limits[3]; ZebraService zs = tl_start_up("test_safari.cfg", argc, argv); ZebraHandle zh = zebra_open(zs, 0); YAZ_CHECK(tl_init_data(zh, myrec)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=any the", 3)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=any den", 0)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=any @and the art", 1)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=any @and den gamle", 0)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=any @and the gamle", 1)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=any @and the of", 0)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=any @prox 0 3 1 2 k 2 the gamle", 1)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=any @prox 0 3 1 2 k 2 den gamle", 0)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=any @prox 0 3 1 2 k 2 the art", 1)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=any @prox 0 3 1 2 k 2 den gamle", 0)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=any @prox 0 3 1 2 k 2 old mand", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=any hello", 1)); /* verify that we get these records exactly */ ids[0] = 24338; ids[1] = 24339; ids[2] = 24340; YAZ_CHECK(tl_meta_query(zh, "@attr 4=3 @attr 1=any mand", 3, ids)); YAZ_CHECK_EQ(tl_fetch_compare(zh, 1, "R", yaz_oid_recsyn_sutrs, myrec[0]), ZEBRA_OK); YAZ_CHECK_EQ(tl_fetch_compare(zh, 2, "R", yaz_oid_recsyn_sutrs, myrec[2]), ZEBRA_OK); YAZ_CHECK_EQ(tl_fetch_compare(zh, 3, "R", yaz_oid_recsyn_sutrs, myrec[4]), ZEBRA_OK); YAZ_CHECK_EQ(tl_fetch_compare(zh, 1, "zebra::facet::any:0", yaz_oid_recsyn_xml, "\n" " \n" " mand\n" " the\n" " art\n" " gamle\n" " old\n" " \n" "\n"), ZEBRA_OK); YAZ_CHECK_EQ(tl_fetch_compare(zh, 1, "zebra::facet::any:0:2", yaz_oid_recsyn_xml, "\n" " \n" " mand\n" " the\n" " \n" "\n"), ZEBRA_OK); YAZ_CHECK_EQ(tl_fetch_compare(zh, 1, "zebra::facet::ti:s", yaz_oid_recsyn_xml, "\n" " \n" " a b c\n" " j k l\n" " m n o\n" " \n" "\n"), ZEBRA_OK); /* limit to 125061 */ limits[0] = 125061; limits[1] = 0; zebra_set_limit(zh, 0, limits); ids[0] = 24339; YAZ_CHECK(tl_meta_query(zh, "@attr 4=3 @attr 1=any mand", 1, ids)); /* limit to 125060, 125061 */ limits[0] = 125061; limits[1] = 125060; limits[2] = 0; zebra_set_limit(zh, 0, limits); ids[0] = 24338; ids[1] = 24339; YAZ_CHECK(tl_meta_query(zh, "@attr 4=3 @attr 1=any mand", 2, ids)); /* all except 125062 */ limits[0] = 125062; limits[1] = 0; zebra_set_limit(zh, 1, limits); ids[0] = 24338; ids[1] = 24339; YAZ_CHECK(tl_meta_query(zh, "@attr 4=3 @attr 1=any mand", 2, ids)); /* no limit */ zebra_set_limit(zh, 1, 0); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=any mand", 3)); /* test segments */ YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=title a", 1)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=title b", 1)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=title c", 1)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=title @and a b", 1)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=title @and a c", 1)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=title @and c d", 1)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=title @and b f", 1)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=title @and f g", 0)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=title @and g f", 0)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=title @and d g", 0)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=title @and g c", 0)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=title @and c g", 0)); YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=title @and c c", 1)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/test_create_databases.c0000644000175000017500000000411311412332551016343 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** Create many databases */ #include "testlib.h" static void tst(int argc, char **argv) { int i; int no_db = 140; ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); YAZ_CHECK(zebra_init(zh) == ZEBRA_OK); zebra_close(zh); zh = zebra_open(zs, 0); YAZ_CHECK(zh); YAZ_CHECK(zebra_begin_trans (zh, 1) == ZEBRA_OK); for (i = 0; ititle %d\n", i); zebra_add_record (zh, rec_buf, strlen(rec_buf)); } YAZ_CHECK(zebra_end_trans(zh) == ZEBRA_OK); zebra_close(zh); zh = zebra_open(zs, 0); YAZ_CHECK(zh); for (i = 0; i<=no_db; i++) { char dbstr[20]; char querystr[50]; sprintf(dbstr, "%d", i); YAZ_CHECK(zebra_select_database(zh, dbstr) == ZEBRA_OK); sprintf(querystr, "@attr 1=4 %d", i); if (i == no_db) { YAZ_CHECK(tl_query_x(zh, querystr, 0, 109)); } else { YAZ_CHECK(tl_query(zh, querystr, 1)); } } YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/test_rank.c0000644000175000017500000000430411412332551014026 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "testlib.h" const char *recs[] = { "\n" " The first title\n" " \n" " The first common word is the: the the the \n" " The second common word is word \n" " but all have the foo bar \n" " \n" "\n", "\n" " The second title\n" " \n" " The first common word is the: the \n" " The second common word is foo: foo foo \n" " but all have the foo bar \n" " \n" "\n", "\n" " The third title\n" " \n" " The first common word is the: the \n" " The third common word is bar: bar \n" " but all have the foo bar \n" " \n" "\n", 0 }; static void tst(int argc, char **argv) { ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); YAZ_CHECK(tl_init_data(zh, recs)); YAZ_CHECK(tl_ranking_query(zh, "@attr 1=4 @attr 2=102 the", 3, "first title", 936 )); YAZ_CHECK(tl_ranking_query(zh, "@attr 1=62 @attr 2=102 foo", 3, "second title", 850 )); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/test_zebra_fork.cfg0000644000175000017500000000020311412332551015526 00000000000000profilepath: ${srcdir:-.}/../../tab attset: bib1.att recordType: grs.sgml isam: b register: register:100M shadow: shadow:100M idzebra-2.0.44/test/api/zebra.cfg0000644000175000017500000000021111412332551013445 00000000000000profilepath: ${srcdir:-.}:${srcdir:-.}/../../tab attset: bib1.att attset: gils.att attset: explain.att recordType: grs.sgml isam: b idzebra-2.0.44/test/api/test_insert_fetch.c0000644000175000017500000000711511412332551015553 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* insert a small pile of records, search and fetch them */ #include "testlib.h" const char *myrec[] = { "\n" " My title\n" "\n", 0}; #define NUMBER_TO_FETCH_MAX 1000 static void tst(int argc, char **argv) { int i; int number_to_be_inserted = 5; int number_to_fetch = 5; ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); YAZ_CHECK(tl_init_data(zh, myrec)); YAZ_CHECK(zebra_begin_trans (zh, 1) == ZEBRA_OK); for (i = 0; i< number_to_be_inserted-1; i++) { /* -1 since already inserted one in init_data */ zebra_add_record(zh, myrec[0], strlen(myrec[0])); } YAZ_CHECK(zebra_end_trans(zh) == ZEBRA_OK); zebra_close(zh); zebra_stop(zs); zs = tl_zebra_start(""); zh = zebra_open(zs, 0); YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK); zebra_set_resource(zh, "sortmax", "3"); /* make small sort boundary */ for (i = 0; i<2; i++) { ZEBRA_RES ret; ZebraRetrievalRecord retrievalRecord[NUMBER_TO_FETCH_MAX]; char setname[20]; int j; ODR odr_input = odr_createmem(ODR_DECODE); ODR odr_output = odr_createmem(ODR_DECODE); YAZ_PQF_Parser parser = yaz_pqf_create(); Z_RPNQuery *query = yaz_pqf_parse(parser, odr_input, "@attr 1=4 my"); zint hits; sprintf(setname, "s%d", i+1); ret = zebra_search_RPN(zh, odr_input, query, setname, &hits); if (ret != ZEBRA_OK) { int code = zebra_errCode(zh); yaz_log(YLOG_WARN, "Unexpected error code=%d", code); exit(1); } if (hits != number_to_be_inserted) { yaz_log(YLOG_WARN, "Unexpected hit count " ZINT_FORMAT "(should be %d)", hits, number_to_be_inserted); exit(1); } yaz_pqf_destroy(parser); odr_destroy(odr_input); YAZ_CHECK(zebra_begin_trans(zh, 1) == ZEBRA_OK); for (j = 0; j < number_to_fetch; j++) retrievalRecord[j].position = j+1; ret = zebra_records_retrieve(zh, odr_output, setname, 0, yaz_oid_recsyn_xml, number_to_fetch, retrievalRecord); if (ret != ZEBRA_OK) { int code = zebra_errCode(zh); yaz_log(YLOG_FATAL, "zebra_records_retrieve returned error %d", code); exit(1); } for (j = 0; j < number_to_fetch; j++) { if (!retrievalRecord[j].buf) { yaz_log(YLOG_FATAL, "No record buf at position %d", j); exit(1); } if (!retrievalRecord[j].len) { yaz_log(YLOG_FATAL, "No record len at position %d", j); exit(1); } } odr_destroy(odr_output); YAZ_CHECK(zebra_end_trans(zh) == ZEBRA_OK); } zebra_commit(zh); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/test_sort2.c0000644000175000017500000000320711412332551014145 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "testlib.h" const char *myrec[] = { "\n" " first computer\n" "\n" , "\n" " second computer\n" "\n" , "\n" " A third computer\n" "\n" , "\n" " the fourth computer\n" "\n" , 0 }; static void tst(int argc, char **argv) { ZebraService zs = tl_start_up("test_sort2.cfg", argc, argv); ZebraHandle zh = zebra_open(zs, 0); zint ids[5]; YAZ_CHECK(tl_init_data(zh, myrec)); ids[0] = 2; ids[1] = 5; ids[2] = 3; ids[3] = 4; YAZ_CHECK(tl_sort(zh, "@or @attr 1=4 computer @attr 7=1 @attr 1=4 0", 4, ids)); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/test_private_attset.cfg0000644000175000017500000000014611412332551016446 00000000000000profilepath: ${srcdir:-.}:${srcdir:-.}/../../tab attset: private_attset.att recordType: grs.sgml idzebra-2.0.44/test/api/test_sortidx.c0000644000175000017500000001016511412332551014571 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include "testlib.h" static void sort_add_cstr(zebra_sort_index_t si, const char *str, zint section_id) { WRBUF w = wrbuf_alloc(); wrbuf_puts(w, str); wrbuf_putc(w, '\0'); zebra_sort_add(si, section_id, w); wrbuf_destroy(w); } static void tst1(zebra_sort_index_t si) { zint sysno = 12; /* just some sysno */ int my_type = 2; /* just some type ID */ WRBUF w = wrbuf_alloc(); zebra_sort_type(si, my_type); zebra_sort_sysno(si, sysno); YAZ_CHECK_EQ(zebra_sort_read(si, 0, w), 0); sort_add_cstr(si, "abcde1", 0); zebra_sort_sysno(si, sysno); YAZ_CHECK_EQ(zebra_sort_read(si, 0, w), 1); YAZ_CHECK(!strcmp(wrbuf_cstr(w), "abcde1")); zebra_sort_sysno(si, sysno+1); YAZ_CHECK_EQ(zebra_sort_read(si, 0, w), 0); zebra_sort_sysno(si, sysno-1); YAZ_CHECK_EQ(zebra_sort_read(si, 0, w), 0); zebra_sort_sysno(si, sysno); zebra_sort_delete(si, 0); YAZ_CHECK_EQ(zebra_sort_read(si, 0, w), 0); zebra_sort_type(si, my_type); zebra_sort_sysno(si, sysno); YAZ_CHECK_EQ(zebra_sort_read(si, 0, w), 0); wrbuf_rewind(w); sort_add_cstr(si, "abcde1", 0); zebra_sort_sysno(si, sysno); YAZ_CHECK_EQ(zebra_sort_read(si, 0, w), 1); YAZ_CHECK(!strcmp(wrbuf_cstr(w), "abcde1")); zebra_sort_sysno(si, sysno); zebra_sort_delete(si, 0); wrbuf_destroy(w); } static void tst2(zebra_sort_index_t si) { zint sysno = 15; /* just some sysno */ int my_type = 2; /* just some type ID */ int i; zebra_sort_type(si, my_type); for (sysno = 1; sysno < 50; sysno++) { zint input_section_id = 12345; zint output_section_id = 0; WRBUF w1 = wrbuf_alloc(); WRBUF w2 = wrbuf_alloc(); zebra_sort_sysno(si, sysno); YAZ_CHECK_EQ(zebra_sort_read(si, 0, w2), 0); for (i = 0; i < 600; i++) /* 600 * 6 < max size =4K */ wrbuf_write(w1, "12345", 6); zebra_sort_add(si, input_section_id, w1); zebra_sort_sysno(si, sysno); YAZ_CHECK_EQ(zebra_sort_read(si, &output_section_id, w2), 1); YAZ_CHECK_EQ(wrbuf_len(w1), wrbuf_len(w2)); YAZ_CHECK(!memcmp(wrbuf_buf(w1), wrbuf_buf(w2), wrbuf_len(w2))); YAZ_CHECK_EQ(input_section_id, output_section_id); wrbuf_destroy(w1); wrbuf_destroy(w2); } } static void tst(int argc, char **argv) { BFiles bfs = bfs_create(".:50M", 0); zebra_sort_index_t si; YAZ_CHECK(bfs); if (bfs) { bf_reset(bfs); si = zebra_sort_open(bfs, 1, ZEBRA_SORT_TYPE_FLAT); YAZ_CHECK(si); if (si) { tst1(si); zebra_sort_close(si); } } if (bfs) { bf_reset(bfs); si = zebra_sort_open(bfs, 1, ZEBRA_SORT_TYPE_ISAMB); YAZ_CHECK(si); if (si) { tst1(si); zebra_sort_close(si); } } if (bfs) { bf_reset(bfs); si = zebra_sort_open(bfs, 1, ZEBRA_SORT_TYPE_MULTI); YAZ_CHECK(si); if (si) { tst1(si); tst2(si); zebra_sort_close(si); } } if (bfs) bfs_destroy(bfs); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/test_special_elements.c0000644000175000017500000000755611412332551016423 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** \brief test special element set names zebra:: and friends */ #include "testlib.h" const char *myrec[] = { "\n" " My title\n" "\n", 0}; static void tst(int argc, char **argv) { zint hits; ZEBRA_RES res; const char * zebra_xml_sysno = "\n"; const char * zebra_xml_meta = "\n"; const char * zebra_xml_index_title_p = "\n" " my title\n" "\n"; const char * zebra_xml_index_title_s = "\n" " my title\n" "\n"; ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); YAZ_CHECK(tl_init_data(zh, myrec)); res = zebra_search_PQF(zh, "@attr 1=4 my", "rsetname", &hits); YAZ_CHECK_EQ(res, ZEBRA_OK); YAZ_CHECK_EQ(hits, 1); YAZ_CHECK_EQ(tl_fetch_first_compare(zh, "zebra::data", yaz_oid_recsyn_xml, "mismatch"), ZEBRA_FAIL); YAZ_CHECK_EQ(tl_fetch_first_compare(zh, "zebra::data", yaz_oid_recsyn_sutrs, myrec[0]), ZEBRA_OK); YAZ_CHECK_EQ(tl_fetch_first_compare(zh, "zebra::data", yaz_oid_recsyn_xml, myrec[0]), ZEBRA_OK); YAZ_CHECK_EQ(tl_fetch_first_compare(zh, "zebra::meta::sysno", yaz_oid_recsyn_sutrs, "2"), ZEBRA_OK); YAZ_CHECK_EQ(tl_fetch_first_compare(zh, "zebra::meta::sysno", yaz_oid_recsyn_xml, zebra_xml_sysno), ZEBRA_OK); YAZ_CHECK_EQ(tl_fetch_first_compare(zh, "zebra::meta", yaz_oid_recsyn_xml, zebra_xml_meta), ZEBRA_OK); YAZ_CHECK_EQ(tl_fetch_first_compare(zh, "zebra::index::title:p", yaz_oid_recsyn_xml, zebra_xml_index_title_p), ZEBRA_OK); YAZ_CHECK_EQ(tl_fetch_first_compare(zh, "zebra::index::title:s", yaz_oid_recsyn_xml, zebra_xml_index_title_s), ZEBRA_OK); YAZ_CHECK_EQ(tl_fetch_first_compare(zh, "zebra::nonexistent", yaz_oid_recsyn_xml, ""), ZEBRA_OK); YAZ_CHECK_EQ(tl_fetch_first_compare(zh, "zebra::index::nonexistent", yaz_oid_recsyn_xml, ""), ZEBRA_OK); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/test_icu_indexing.c0000644000175000017500000001162211412332551015541 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** \file \brief tests ICU enabled maps */ #include #include "testlib.h" /* utf-8 sequences for some characters */ #define char_ae "\xc3\xa6" #define char_AE "\xc3\x86" #define char_oslash "\xc3\xb8" #define char_Oslash "\xc3\x98" #define char_aring "\xc3\xa5" #define char_Aring "\xc3\x85" #define char_comb_ring_above "\xcc\x8a" #define char_aring1 "a" char_comb_ring_above #define char_Aring1 "A" char_comb_ring_above const char *myrec[] = { "\nMy computer\n\n", "\nMy x computer\n\n", "\nMy computer x\n\n" , "\n" char_ae "\n\n" , "\nB" char_aring "d\n" "זיהוי סדר ×”××¨×•×¢×™× ×‘×¡×™×¤×•×¨ המרד הגדול מ×ת צביה בן-×©×œ×•× æç¤º:直接点击数æ®åº“åç§°,将进入å•库检索 Ngày xá»­a ngày xưa D.W. all wet\n\n" , 0} ; static void tst(int argc, char **argv) { #if YAZ_HAVE_ICU ZebraService zs = tl_start_up("test_icu_indexing.cfg", argc, argv); ZebraHandle zh = zebra_open(zs, 0); tl_check_filter(zs, "grs.xml"); YAZ_CHECK(tl_init_data(zh, myrec)); /* simple term */ YAZ_CHECK(tl_query(zh, "@attr 1=title notfound", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=title computer", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=title @attr 5=1 comput", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=title .computer.", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=title x", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=title my", 3)); YAZ_CHECK(tl_query(zh, "@attr 1=title mY", 3)); YAZ_CHECK(tl_query(zh, char_ae, 1)); YAZ_CHECK(tl_query(zh, char_AE, 1)); YAZ_CHECK(tl_query(zh, "b" char_aring "d", 1)); YAZ_CHECK(tl_query(zh, "B" char_Aring "D", 1)); YAZ_CHECK(tl_query(zh, "b" char_aring1 "d", 1)); YAZ_CHECK(tl_query(zh, "B" char_Aring1 "D", 1)); /* Abstract searches . Chinese mostly */ YAZ_CHECK(tl_query(zh, "@attr 1=abstract בן", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=abstract צביה", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=abstract הגדול", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=abstract בסיפור", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=abstract בסיפ", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=abstract 点", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=abstract wet", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=abstract @attr 5=1 בסיפ", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=abstract @attr 5=1 סיפ", 0)); YAZ_CHECK(tl_query(zh, "@attr 1=abstract @attr 5=1 בסי", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=abstract @attr 5=1 בס", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=abstract @attr 5=1 ב", 1)); /* phrase search */ YAZ_CHECK(tl_query(zh, "@attr 1=title {my computer}", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=title @attr 6=1 {my computer}", 2)); YAZ_CHECK(tl_query(zh, "@attr 1=title {computer x}", 1)); /* complete-subfield search */ YAZ_CHECK(tl_query(zh, "@attr 1=title @attr 6=2 {my computer}", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=title @attr 6=2 {my}", 0)); /* always matches */ YAZ_CHECK(tl_query(zh, "@attr 1=_ALLRECORDS @attr 2=103 {}", 5)); YAZ_CHECK(tl_query(zh, "@attr 1=title @attr 2=103 {}", 5)); YAZ_CHECK(tl_query(zh, "@attr 1=abstract @attr 2=103 {}", 1)); YAZ_CHECK(tl_query(zh, "@attr 1=abstract @attr 2=103 {does not match}", 1)); /* scan */ { /* word search */ const char *ent[] = { char_ae, "B" char_aring "d", "computer", "My", "x", 0 }; YAZ_CHECK(tl_scan(zh, "@attr 1=title 0", 1, 10, 1, 5, 1, ent)); } { /* word search */ const char *ent[] = { "My", "x", 0 }; YAZ_CHECK(tl_scan(zh, "@attr 1=title cp", 1, 10, 1, 2, 1, ent)); } { /* phrase search */ const char *ent[] = { char_ae, "B" char_aring "d", "My computer" }; YAZ_CHECK(tl_scan(zh, "@attr 1=title @attr 6=2 0", 1, 3, 1, 3, 0, ent)); } YAZ_CHECK(tl_close_down(zh, zs)); #endif } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/test_result_sets.c0000644000175000017500000000475611412332551015462 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* Creates a few result sets */ #include "testlib.h" const char *myrec[] ={ "\n" " My title\n" "\n", 0}; static void tst(int argc, char **argv) { int i; ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); YAZ_CHECK(tl_init_data(zh, myrec)); for (i = 0; i<4; i++) { char setname[20]; char *setnamep = setname; int status; ODR odr_input = odr_createmem (ODR_DECODE); ODR odr_output = odr_createmem (ODR_ENCODE); YAZ_PQF_Parser parser = yaz_pqf_create(); Z_RPNQuery *query = yaz_pqf_parse(parser, odr_input, "@attr 1=4 my"); zint hits; if (zebra_begin_trans (zh, 1) != ZEBRA_OK) { fprintf(stderr, "zebra_begin_trans failed\n"); exit(1); } if (zebra_begin_trans (zh, 0) != ZEBRA_OK) { fprintf(stderr, "zebra_begin_trans failed\n"); exit(1); } sprintf(setname, "s%d", i+1); zebra_search_RPN (zh, odr_input, query, setname, &hits); if (zebra_end_trans (zh) != ZEBRA_OK) { fprintf(stderr, "zebra_end_trans failed\n"); exit(1); } if (zebra_end_trans (zh) != ZEBRA_OK) { fprintf(stderr, "zebra_end_trans failed\n"); exit(1); } yaz_pqf_destroy(parser); zebra_deleteResultSet(zh, Z_DeleteResultSetRequest_list, 1, &setnamep, &status); odr_destroy(odr_input); odr_destroy(odr_output); } zebra_commit(zh); YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/test_sort1.cfg0000644000175000017500000000044011412332551014455 00000000000000# Simple Zebra configuration file # # Where the schema files, attribute files, etc are located. profilePath: ${srcdir:-.}:${srcdir:-.}/../../tab # Files that describe the attribute sets supported. attset: bib1.att attset: explain.att recordtype: grs.sgml isam: b index: test_sort1.idx idzebra-2.0.44/test/api/Makefile.in0000644000175000017500000007560211412336425013752 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = testclient$(EXEEXT) check_PROGRAMS = test_start_stop$(EXEEXT) test_result_sets$(EXEEXT) \ test_insert_fetch$(EXEEXT) test_search$(EXEEXT) \ test_trunc$(EXEEXT) test_sort_set$(EXEEXT) test_rank$(EXEEXT) \ test_private_attset$(EXEEXT) test_scan$(EXEEXT) \ test_create_databases$(EXEEXT) test_resources$(EXEEXT) \ test_update_record$(EXEEXT) test_zebra_fork$(EXEEXT) \ test_special_elements$(EXEEXT) test_icu_indexing$(EXEEXT) \ test_safari$(EXEEXT) test_sort1$(EXEEXT) test_sort2$(EXEEXT) \ test_sort3$(EXEEXT) test_sortidx$(EXEEXT) subdir = test/api DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libtestlib_a_AR = $(AR) $(ARFLAGS) libtestlib_a_LIBADD = am_libtestlib_a_OBJECTS = testlib.$(OBJEXT) libtestlib_a_OBJECTS = $(am_libtestlib_a_OBJECTS) PROGRAMS = $(noinst_PROGRAMS) am_test_create_databases_OBJECTS = test_create_databases.$(OBJEXT) test_create_databases_OBJECTS = $(am_test_create_databases_OBJECTS) test_create_databases_LDADD = $(LDADD) am__DEPENDENCIES_1 = test_create_databases_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_test_icu_indexing_OBJECTS = test_icu_indexing.$(OBJEXT) test_icu_indexing_OBJECTS = $(am_test_icu_indexing_OBJECTS) test_icu_indexing_LDADD = $(LDADD) test_icu_indexing_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_test_insert_fetch_OBJECTS = test_insert_fetch.$(OBJEXT) test_insert_fetch_OBJECTS = $(am_test_insert_fetch_OBJECTS) test_insert_fetch_LDADD = $(LDADD) test_insert_fetch_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_test_private_attset_OBJECTS = test_private_attset.$(OBJEXT) test_private_attset_OBJECTS = $(am_test_private_attset_OBJECTS) test_private_attset_LDADD = $(LDADD) test_private_attset_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_test_rank_OBJECTS = test_rank.$(OBJEXT) test_rank_OBJECTS = $(am_test_rank_OBJECTS) test_rank_LDADD = $(LDADD) test_rank_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_test_resources_OBJECTS = test_resources.$(OBJEXT) test_resources_OBJECTS = $(am_test_resources_OBJECTS) test_resources_LDADD = $(LDADD) test_resources_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_test_result_sets_OBJECTS = test_result_sets.$(OBJEXT) test_result_sets_OBJECTS = $(am_test_result_sets_OBJECTS) test_result_sets_LDADD = $(LDADD) test_result_sets_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_test_safari_OBJECTS = test_safari.$(OBJEXT) test_safari_OBJECTS = $(am_test_safari_OBJECTS) test_safari_LDADD = $(LDADD) test_safari_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_test_scan_OBJECTS = test_scan.$(OBJEXT) test_scan_OBJECTS = $(am_test_scan_OBJECTS) test_scan_LDADD = $(LDADD) test_scan_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_test_search_OBJECTS = test_search.$(OBJEXT) test_search_OBJECTS = $(am_test_search_OBJECTS) test_search_LDADD = $(LDADD) test_search_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_test_sort1_OBJECTS = test_sort1.$(OBJEXT) test_sort1_OBJECTS = $(am_test_sort1_OBJECTS) test_sort1_LDADD = $(LDADD) test_sort1_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_test_sort2_OBJECTS = test_sort2.$(OBJEXT) test_sort2_OBJECTS = $(am_test_sort2_OBJECTS) test_sort2_LDADD = $(LDADD) test_sort2_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_test_sort3_OBJECTS = test_sort3.$(OBJEXT) test_sort3_OBJECTS = $(am_test_sort3_OBJECTS) test_sort3_LDADD = $(LDADD) test_sort3_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_test_sort_set_OBJECTS = test_sort_set.$(OBJEXT) test_sort_set_OBJECTS = $(am_test_sort_set_OBJECTS) test_sort_set_LDADD = $(LDADD) test_sort_set_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_test_sortidx_OBJECTS = test_sortidx.$(OBJEXT) test_sortidx_OBJECTS = $(am_test_sortidx_OBJECTS) test_sortidx_LDADD = $(LDADD) test_sortidx_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_test_special_elements_OBJECTS = test_special_elements.$(OBJEXT) test_special_elements_OBJECTS = $(am_test_special_elements_OBJECTS) test_special_elements_LDADD = $(LDADD) test_special_elements_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_test_start_stop_OBJECTS = test_start_stop.$(OBJEXT) test_start_stop_OBJECTS = $(am_test_start_stop_OBJECTS) test_start_stop_LDADD = $(LDADD) test_start_stop_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_test_trunc_OBJECTS = test_trunc.$(OBJEXT) test_trunc_OBJECTS = $(am_test_trunc_OBJECTS) test_trunc_LDADD = $(LDADD) test_trunc_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_test_update_record_OBJECTS = test_update_record.$(OBJEXT) test_update_record_OBJECTS = $(am_test_update_record_OBJECTS) test_update_record_LDADD = $(LDADD) test_update_record_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_test_zebra_fork_OBJECTS = test_zebra_fork.$(OBJEXT) test_zebra_fork_OBJECTS = $(am_test_zebra_fork_OBJECTS) test_zebra_fork_LDADD = $(LDADD) test_zebra_fork_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) am_testclient_OBJECTS = testclient.$(OBJEXT) testclient_OBJECTS = $(am_testclient_OBJECTS) testclient_LDADD = $(LDADD) testclient_DEPENDENCIES = libtestlib.a $(zebralibs) \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libtestlib_a_SOURCES) $(test_create_databases_SOURCES) \ $(test_icu_indexing_SOURCES) $(test_insert_fetch_SOURCES) \ $(test_private_attset_SOURCES) $(test_rank_SOURCES) \ $(test_resources_SOURCES) $(test_result_sets_SOURCES) \ $(test_safari_SOURCES) $(test_scan_SOURCES) \ $(test_search_SOURCES) $(test_sort1_SOURCES) \ $(test_sort2_SOURCES) $(test_sort3_SOURCES) \ $(test_sort_set_SOURCES) $(test_sortidx_SOURCES) \ $(test_special_elements_SOURCES) $(test_start_stop_SOURCES) \ $(test_trunc_SOURCES) $(test_update_record_SOURCES) \ $(test_zebra_fork_SOURCES) $(testclient_SOURCES) DIST_SOURCES = $(libtestlib_a_SOURCES) \ $(test_create_databases_SOURCES) $(test_icu_indexing_SOURCES) \ $(test_insert_fetch_SOURCES) $(test_private_attset_SOURCES) \ $(test_rank_SOURCES) $(test_resources_SOURCES) \ $(test_result_sets_SOURCES) $(test_safari_SOURCES) \ $(test_scan_SOURCES) $(test_search_SOURCES) \ $(test_sort1_SOURCES) $(test_sort2_SOURCES) \ $(test_sort3_SOURCES) $(test_sort_set_SOURCES) \ $(test_sortidx_SOURCES) $(test_special_elements_SOURCES) \ $(test_start_stop_SOURCES) $(test_trunc_SOURCES) \ $(test_update_record_SOURCES) $(test_zebra_fork_SOURCES) \ $(testclient_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ testclient_SOURCES = testclient.c TESTS = $(check_PROGRAMS) EXTRA_DIST = zebra.cfg test_trunc.cfg test_private_attset.cfg \ private_attset.att private_attset.abs test_search.abs \ test_zebra_fork.cfg \ test_icu_indexing.cfg test_icu_indexing.idx \ test_sort1.cfg test_sort1.idx test_sort1.chr sort1.abs \ test_sort2.cfg test_sort2.idx test_sort2.chr sort2.abs \ test_safari.cfg test_sort3.cfg noinst_LIBRARIES = libtestlib.a libtestlib_a_SOURCES = testlib.c testlib.h test_start_stop_SOURCES = test_start_stop.c test_result_sets_SOURCES = test_result_sets.c test_insert_fetch_SOURCES = test_insert_fetch.c test_search_SOURCES = test_search.c test_trunc_SOURCES = test_trunc.c test_sort_set_SOURCES = test_sort_set.c test_rank_SOURCES = test_rank.c test_private_attset_SOURCES = test_private_attset.c test_scan_SOURCES = test_scan.c test_create_databases_SOURCES = test_create_databases.c test_resources_SOURCES = test_resources.c test_update_record_SOURCES = test_update_record.c test_zebra_fork_SOURCES = test_zebra_fork.c test_special_elements_SOURCES = test_special_elements.c test_icu_indexing_SOURCES = test_icu_indexing.c test_safari_SOURCES = test_safari.c test_sort1_SOURCES = test_sort1.c test_sort2_SOURCES = test_sort2.c test_sort3_SOURCES = test_sort3.c test_sortidx_SOURCES = test_sortidx.c AM_CPPFLAGS = -I$(top_srcdir)/include $(YAZINC) zebralibs = ../../$(main_zebralib) LDADD = libtestlib.a $(zebralibs) $(YAZLALIB) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/api/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/api/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libtestlib.a: $(libtestlib_a_OBJECTS) $(libtestlib_a_DEPENDENCIES) -rm -f libtestlib.a $(libtestlib_a_AR) libtestlib.a $(libtestlib_a_OBJECTS) $(libtestlib_a_LIBADD) $(RANLIB) libtestlib.a clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list test_create_databases$(EXEEXT): $(test_create_databases_OBJECTS) $(test_create_databases_DEPENDENCIES) @rm -f test_create_databases$(EXEEXT) $(LINK) $(test_create_databases_OBJECTS) $(test_create_databases_LDADD) $(LIBS) test_icu_indexing$(EXEEXT): $(test_icu_indexing_OBJECTS) $(test_icu_indexing_DEPENDENCIES) @rm -f test_icu_indexing$(EXEEXT) $(LINK) $(test_icu_indexing_OBJECTS) $(test_icu_indexing_LDADD) $(LIBS) test_insert_fetch$(EXEEXT): $(test_insert_fetch_OBJECTS) $(test_insert_fetch_DEPENDENCIES) @rm -f test_insert_fetch$(EXEEXT) $(LINK) $(test_insert_fetch_OBJECTS) $(test_insert_fetch_LDADD) $(LIBS) test_private_attset$(EXEEXT): $(test_private_attset_OBJECTS) $(test_private_attset_DEPENDENCIES) @rm -f test_private_attset$(EXEEXT) $(LINK) $(test_private_attset_OBJECTS) $(test_private_attset_LDADD) $(LIBS) test_rank$(EXEEXT): $(test_rank_OBJECTS) $(test_rank_DEPENDENCIES) @rm -f test_rank$(EXEEXT) $(LINK) $(test_rank_OBJECTS) $(test_rank_LDADD) $(LIBS) test_resources$(EXEEXT): $(test_resources_OBJECTS) $(test_resources_DEPENDENCIES) @rm -f test_resources$(EXEEXT) $(LINK) $(test_resources_OBJECTS) $(test_resources_LDADD) $(LIBS) test_result_sets$(EXEEXT): $(test_result_sets_OBJECTS) $(test_result_sets_DEPENDENCIES) @rm -f test_result_sets$(EXEEXT) $(LINK) $(test_result_sets_OBJECTS) $(test_result_sets_LDADD) $(LIBS) test_safari$(EXEEXT): $(test_safari_OBJECTS) $(test_safari_DEPENDENCIES) @rm -f test_safari$(EXEEXT) $(LINK) $(test_safari_OBJECTS) $(test_safari_LDADD) $(LIBS) test_scan$(EXEEXT): $(test_scan_OBJECTS) $(test_scan_DEPENDENCIES) @rm -f test_scan$(EXEEXT) $(LINK) $(test_scan_OBJECTS) $(test_scan_LDADD) $(LIBS) test_search$(EXEEXT): $(test_search_OBJECTS) $(test_search_DEPENDENCIES) @rm -f test_search$(EXEEXT) $(LINK) $(test_search_OBJECTS) $(test_search_LDADD) $(LIBS) test_sort1$(EXEEXT): $(test_sort1_OBJECTS) $(test_sort1_DEPENDENCIES) @rm -f test_sort1$(EXEEXT) $(LINK) $(test_sort1_OBJECTS) $(test_sort1_LDADD) $(LIBS) test_sort2$(EXEEXT): $(test_sort2_OBJECTS) $(test_sort2_DEPENDENCIES) @rm -f test_sort2$(EXEEXT) $(LINK) $(test_sort2_OBJECTS) $(test_sort2_LDADD) $(LIBS) test_sort3$(EXEEXT): $(test_sort3_OBJECTS) $(test_sort3_DEPENDENCIES) @rm -f test_sort3$(EXEEXT) $(LINK) $(test_sort3_OBJECTS) $(test_sort3_LDADD) $(LIBS) test_sort_set$(EXEEXT): $(test_sort_set_OBJECTS) $(test_sort_set_DEPENDENCIES) @rm -f test_sort_set$(EXEEXT) $(LINK) $(test_sort_set_OBJECTS) $(test_sort_set_LDADD) $(LIBS) test_sortidx$(EXEEXT): $(test_sortidx_OBJECTS) $(test_sortidx_DEPENDENCIES) @rm -f test_sortidx$(EXEEXT) $(LINK) $(test_sortidx_OBJECTS) $(test_sortidx_LDADD) $(LIBS) test_special_elements$(EXEEXT): $(test_special_elements_OBJECTS) $(test_special_elements_DEPENDENCIES) @rm -f test_special_elements$(EXEEXT) $(LINK) $(test_special_elements_OBJECTS) $(test_special_elements_LDADD) $(LIBS) test_start_stop$(EXEEXT): $(test_start_stop_OBJECTS) $(test_start_stop_DEPENDENCIES) @rm -f test_start_stop$(EXEEXT) $(LINK) $(test_start_stop_OBJECTS) $(test_start_stop_LDADD) $(LIBS) test_trunc$(EXEEXT): $(test_trunc_OBJECTS) $(test_trunc_DEPENDENCIES) @rm -f test_trunc$(EXEEXT) $(LINK) $(test_trunc_OBJECTS) $(test_trunc_LDADD) $(LIBS) test_update_record$(EXEEXT): $(test_update_record_OBJECTS) $(test_update_record_DEPENDENCIES) @rm -f test_update_record$(EXEEXT) $(LINK) $(test_update_record_OBJECTS) $(test_update_record_LDADD) $(LIBS) test_zebra_fork$(EXEEXT): $(test_zebra_fork_OBJECTS) $(test_zebra_fork_DEPENDENCIES) @rm -f test_zebra_fork$(EXEEXT) $(LINK) $(test_zebra_fork_OBJECTS) $(test_zebra_fork_LDADD) $(LIBS) testclient$(EXEEXT): $(testclient_OBJECTS) $(testclient_DEPENDENCIES) @rm -f testclient$(EXEEXT) $(LINK) $(testclient_OBJECTS) $(testclient_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_create_databases.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_icu_indexing.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_insert_fetch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_private_attset.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_rank.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_resources.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_result_sets.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_safari.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_scan.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_search.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_sort1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_sort2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_sort3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_sort_set.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_sortidx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_special_elements.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_start_stop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_trunc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_update_record.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_zebra_fork.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testclient.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testlib.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(LIBRARIES) $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ clean-noinstLIBRARIES clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ clean-noinstLIBRARIES clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am clean-local: -rm -rf *.LCK -rm -rf *.log -rm -rf *.mf -rm -rf register/*.LCK -rm -rf register/*.log -rm -rf register/*.mf # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/test/api/test_start_stop.c0000644000175000017500000000246411412332551015302 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include "testlib.h" static void tst(int argc, char **argv) { YAZ_CHECK(!zebra_start("xxxxpoiasdfasfd.cfg")); /* should fail */ { ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = 0; YAZ_CHECK(zs); if (zs) { zh = zebra_open(zs, 0); YAZ_CHECK(zh); } YAZ_CHECK(tl_close_down(zh, zs)); } } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/test_sort3.c0000644000175000017500000000507511412332551014153 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** \file \brief sort using various sortindex types */ #include #include "testlib.h" const char *myrec[] = { /* 2 */ "\n" " My title\n" " X\n" "\n", /* 3 */ "\n" " My x title\n" " B\n" "\n", /* 4 */ "\n" " My title x\n" " A\n" "\n" , 0} ; static void tst_sortindex(int argc, char **argv, const char *type) { zint ids[5]; Res res = res_open(0, 0); ZebraService zs = tl_start_up("test_sort3.cfg", argc, argv); ZebraHandle zh; res_set(res, "sortindex", type); zh = zebra_open(zs, res); YAZ_CHECK(tl_init_data(zh, myrec)); if (strcmp(type, "m")) { /* i, f only takes first title into consideration */ ids[0] = 2; ids[1] = 4; ids[2] = 3; } else { /* m takes all titles into consideration */ ids[0] = 4; ids[1] = 3; ids[2] = 2; } YAZ_CHECK(tl_sort(zh, "@or @attr 1=4 title @attr 7=1 @attr 1=4 0", 3, ids)); if (strcmp(type, "m")) { /* i, f only takes first title into consideration */ ids[0] = 3; ids[1] = 4; ids[2] = 2; } else { /* m takes all titles into consideration */ ids[0] = 2; ids[1] = 3; ids[2] = 4; } YAZ_CHECK(tl_sort(zh, "@or @attr 1=4 title @attr 7=2 @attr 1=4 0", 3, ids)); YAZ_CHECK(tl_close_down(zh, zs)); } static void tst(int argc, char **argv) { tst_sortindex(argc, argv, "i"); tst_sortindex(argc, argv, "f"); tst_sortindex(argc, argv, "m"); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/test_scan.c0000644000175000017500000001012411412332551014014 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** testing of scan */ #include "testlib.h" const char *myrec[] = { "\na b\n\n", "\nc d\n\n", "\ne f\n\n" , 0} ; static void tst(int argc, char **argv) { ZebraService zs = tl_start_up(0, argc, argv); ZebraHandle zh = zebra_open(zs, 0); YAZ_CHECK(zh); YAZ_CHECK(tl_init_data(zh, myrec)); /* int tl_scan ( ZebraHandle zh, const char *query, int pos, int num, int exp_pos, int exp_num, int exp_partial, const char **exp_entries ) */ { /* bad string use attrite, bug #647 */ YAZ_CHECK(tl_scan(zh, "@attr 1=bad 0", 1, 1, 1, 1, 0, 0)); } { /* bad numeric use attributes, bug #647 */ YAZ_CHECK(tl_scan(zh, "@attr 1=1234 0", 1, 1, 1, 1, 0, 0)); } { /* scan before. nothing must be returned */ const char *ent[] = { "a", 0 }; YAZ_CHECK(tl_scan(zh, "@attr 1=4 0", 1, 1, 1, 1, 0, ent)); } { /* scan after. nothing must be returned */ const char *ent[] = { 0 }; YAZ_CHECK(tl_scan(zh, "@attr 1=4 m", 1, 1, 1, 0, 1, ent)); } { const char *ent[] = { "a", 0 }; YAZ_CHECK(tl_scan(zh, "@attr 1=4 a", 1, 1, 1, 1, 0, ent)); } { const char *ent[] = { "b", "c", 0 }; YAZ_CHECK(tl_scan(zh, "@attr 1=4 aa", 1, 2, 1, 2, 0, ent)); } { const char *ent[] = { "b", "c", 0 }; YAZ_CHECK(tl_scan(zh, "@attr 1=4 aa", 1, 2, 1, 2, 0, ent)); } { const char *ent[] = { "e", "f", 0 }; YAZ_CHECK(tl_scan(zh, "@attr 1=4 e", 1, 3, 1, 2, 1, ent)); } { const char *ent[] = { "c", "d", 0 }; YAZ_CHECK(tl_scan(zh, "@attr 1=4 a", -1, 2, -1, 2, 0, ent)); } { const char *ent[] = { "d", 0 }; YAZ_CHECK(tl_scan(zh, "@attr 1=4 a", -2, 1, -2, 1, 0, ent)); } { const char *ent[] = { "f", 0 }; YAZ_CHECK(tl_scan(zh, "@attr 1=4 a", -4, 1, -4, 1, 0, ent)); } { const char *ent[] = { "f", 0 }; YAZ_CHECK(tl_scan(zh, "@attr 1=4 a", -5, 1, -5, 0, 1, ent)); } { const char *ent[] = { "d", "e", "f", 0 }; YAZ_CHECK(tl_scan(zh, "@attr 1=4 a", -2, 3, -2, 3, 0, ent)); } { const char *ent[] = { "d", "e", "f", 0 }; YAZ_CHECK(tl_scan(zh, "@attr 1=4 a", -2, 4, -2, 3, 1, ent)); } { const char *ent[] = { "a", "b", "c", "d", "e", "f", 0 }; YAZ_CHECK(tl_scan(zh, "@attr 1=4 0", 2, 100, 1, 6, 1, ent)); } { const char *ent[] = { "b", "c", "d", "e", "f", 0 }; YAZ_CHECK(tl_scan(zh, "@attr 1=4 0", 0, 100, 0, 5, 1, ent)); } { const char *ent[] = { "a", "b", "c", "d", "e", "f", 0 }; YAZ_CHECK(tl_scan(zh, "@attr 1=4 0", 10, 100, 1, 6, 1, ent)); } { const char *ent[] = { "a", "b", "c", "d", "e", "f", 0 }; YAZ_CHECK(tl_scan(zh, "@attr 1=4 0", 22, 10, 1, 0, 1, ent)); } { const char *ent[] = { 0 }; YAZ_CHECK(tl_scan(zh, "@attr 1=4 z", -22, 10, -22, 0, 1, ent)); } { const char *ent[] = { "c", "d", 0 }; YAZ_CHECK(tl_query(zh, "@attr 1=4 c", 1)); /* must fail, because x is not a result set */ YAZ_CHECK(tl_scan(zh, "@attr 8=x @attr 1=4 a", 1, 3, 0, 0, 0, 0)); /* bug 1114 */ YAZ_CHECK(tl_scan(zh, "@attr 8=rsetname @attr 1=4 0", 1, 20, 1, 2, 1, ent)); } YAZ_CHECK(tl_close_down(zh, zs)); } TL_MAIN /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/test/api/test_safari.cfg0000644000175000017500000000023011412332551014647 00000000000000profilepath: ${srcdir:-.}/../../tab attset: bib1.att recordType: safari2 segment: 1024 isam: b # Set up modulePath modulePath: ../../index/.libs idzebra-2.0.44/test/api/test_sort1.idx0000644000175000017500000000212611412332551014505 00000000000000# Zebra indexes as referred to from the *.abs-files. # # Traditional word index # Used if completenss is 'incomplete field' (@attr 6=1) and # structure is word/phrase/word-list/free-form-text/document-text index w completeness 0 position 1 charmap string.chr # Phrase index # Used if completeness is 'complete {sub}field' (@attr 6=2, @attr 6=1) # and structure is word/phrase/word-list/free-form-text/document-text index p completeness 1 charmap string.chr # URX (URL) index # Used if structure=urx (@attr 4=104) index u completeness 0 charmap urx.chr # Numeric index # Used if structure=numeric (@attr 4=109) index n completeness 0 charmap numeric.chr # Null map index (no mapping at all) # Used if structure=key (@attr 4=3) index 0 completeness 0 position 1 charmap @ # Year # Used if structure=year (@attr 4=4) index y completeness 0 charmap @ # Date # Used if structure=date (@attr 4=5) index d completeness 0 charmap @ # Sort register as usual but specify another map : string-hat. sort s completeness 1 charmap test_sort1.chr # Sort register with no map sort S completeness 1 charmap string.chr idzebra-2.0.44/test/api/testlib.c0000644000175000017500000003204211412332551013502 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** testlib - utilities for the api tests */ #if HAVE_SYS_TIME_H #include #endif #if HAVE_SYS_RESOURCE_H #include #endif #if HAVE_UNISTD_H #include #endif #include #include #include #include #include #include "testlib.h" int log_level = YLOG_LOG; /* * tl_start_up : do common start things, and a zebra_start * - build the name of logfile from argv[0], and open it * if no argv passed, do not open a log * - read zebra.cfg from env var srcdir if it exists; otherwise current dir * default to zebra.cfg, if no name is given */ ZebraService tl_start_up(char *cfgname, int argc, char **argv) { #if HAVE_SYS_RESOURCE_H #if HAVE_SYS_TIME_H struct rlimit rlim; rlim.rlim_cur = 60; rlim.rlim_max = 60; setrlimit(RLIMIT_CPU, &rlim); #endif #endif return tl_zebra_start(cfgname); } /** * get_srcdir: return env srcdir or . (if does does not exist) */ const char *tl_get_srcdir(void) { const char *srcdir = getenv("srcdir"); if (!srcdir || ! *srcdir) srcdir = "."; return srcdir; } /** tl_zebra_start - do a zebra_start with a decent config name */ ZebraService tl_zebra_start(const char *cfgname) { char cfg[256]; const char *srcdir = tl_get_srcdir(); if (!cfgname || ! *cfgname ) cfgname="zebra.cfg"; sprintf(cfg, "%.200s/%.50s", srcdir, cfgname); return zebra_start(cfg); } /** tl_close_down closes down the zebra, logfile, nmem, xmalloc etc. logs an OK */ int tl_close_down(ZebraHandle zh, ZebraService zs) { if (zh) zebra_close(zh); if (zs) zebra_stop(zs); xmalloc_trav("x"); return 1; } /** inits the database and inserts test data */ int tl_init_data(ZebraHandle zh, const char **recs) { ZEBRA_RES res; if (!zh) return 0; if (zebra_select_database(zh, "Default") != ZEBRA_OK) return 0; yaz_log(log_level, "going to call init"); res = zebra_init(zh); if (res == ZEBRA_FAIL) { yaz_log(log_level, "init_data: zebra_init failed with %d", res); printf("init_data failed with %d\n", res); return 0; } if (recs) { int i; if (zebra_begin_trans (zh, 1) != ZEBRA_OK) return 0; for (i = 0; recs[i]; i++) { if (zebra_add_record(zh, recs[i], strlen(recs[i])) != ZEBRA_OK) { if (zebra_end_trans(zh) != ZEBRA_OK) return 0; return 0; } } if (zebra_end_trans(zh) != ZEBRA_OK) return 0; zebra_commit(zh); } return 1; } int tl_query_x(ZebraHandle zh, const char *query, zint exphits, int experror) { ODR odr; YAZ_PQF_Parser parser; Z_RPNQuery *rpn; const char *setname="rsetname"; zint hits; ZEBRA_RES rc; yaz_log(log_level, "======================================"); yaz_log(log_level, "query: %s", query); odr = odr_createmem (ODR_DECODE); if (!odr) return 0; parser = yaz_pqf_create(); rpn = yaz_pqf_parse(parser, odr, query); yaz_pqf_destroy(parser); if (!rpn) { yaz_log(log_level, "could not parse pqf query %s\n", query); printf("could not parse pqf query %s\n", query); odr_destroy(odr); return 0; } rc = zebra_search_RPN(zh, odr, rpn, setname, &hits); odr_destroy(odr); if (experror) { int code; if (rc != ZEBRA_FAIL) { yaz_log(log_level, "search returned %d (OK), but error was " "expected", rc); printf("Error: search returned %d (OK), but error was expected\n" "%s\n", rc, query); return 0; } code = zebra_errCode(zh); if (code != experror) { yaz_log(log_level, "search returned error code %d, but error %d " "was expected", code, experror); printf("Error: search returned error code %d, but error %d was " "expected\n%s\n", code, experror, query); return 0; } } else { if (rc == ZEBRA_FAIL) { int code = zebra_errCode(zh); yaz_log(log_level, "search returned %d. Code %d", rc, code); printf("Error: search returned %d. Code %d\n%s\n", rc, code, query); return 0; } if (exphits != -1 && hits != exphits) { yaz_log(log_level, "search returned " ZINT_FORMAT " hits instead of " ZINT_FORMAT, hits, exphits); printf("Error: search returned " ZINT_FORMAT " hits instead of " ZINT_FORMAT "\n%s\n", hits, exphits, query); return 0; } } return 1; } int tl_query(ZebraHandle zh, const char *query, zint exphits) { return tl_query_x(zh, query, exphits, 0); } int tl_scan(ZebraHandle zh, const char *query, int pos, int num, int exp_pos, int exp_num, int exp_partial, const char **exp_entries) { int ret = 1; ODR odr = odr_createmem(ODR_ENCODE); ZebraScanEntry *entries = 0; int partial = -123; ZEBRA_RES res; yaz_log(log_level, "======================================"); yaz_log(log_level, "scan: pos=%d num=%d %s", pos, num, query); res = zebra_scan_PQF(zh, odr, query, &pos, &num, &entries, &partial, 0 /* setname */); if (partial == -123) { printf("Error: scan returned OK, but partial was not set\n" "%s\n", query); ret = 0; } if (partial != exp_partial) { printf("Error: scan OK, with partial/expected %d/%d\n", partial, exp_partial); ret = 0; } if (res != ZEBRA_OK) /* failure */ { if (exp_entries) { printf("Error: scan failed, but no error was expected\n"); ret = 0; } } else { if (!exp_entries) { printf("Error: scan OK, but error was expected\n"); ret = 0; } else { int fails = 0; if (num != exp_num) { printf("Error: scan OK, with num/expected %d/%d\n", num, exp_num); fails++; } if (pos != exp_pos) { printf("Error: scan OK, with pos/expected %d/%d\n", pos, exp_pos); fails++; } if (!fails) { if (exp_entries) { int i; for (i = 0; iname, name)) f->occurred = 1; } void tl_check_filter(ZebraService zs, const char *name) { struct finfo f; f.name = name; f.occurred = 0; zebra_filter_info(zs, &f, filter_cb); if (!f.occurred) { yaz_log(YLOG_WARN, "Filter %s does not exist.", name); exit(0); } } ZEBRA_RES tl_fetch(ZebraHandle zh, int position, const char *element_set, const Odr_oid * format, ODR odr, const char **rec_buf, size_t *rec_len) { ZebraRetrievalRecord retrievalRecord[1]; Z_RecordComposition *comp; ZEBRA_RES res; retrievalRecord[0].position = position; yaz_set_esn(&comp, element_set, odr->mem); res = zebra_records_retrieve(zh, odr, "rsetname", comp, format, 1, retrievalRecord); if (res != ZEBRA_OK) { int code = zebra_errCode(zh); yaz_log(YLOG_FATAL, "zebra_records_retrieve returned error %d", code); } else { *rec_buf = retrievalRecord[0].buf; *rec_len = retrievalRecord[0].len; } return res; } ZEBRA_RES tl_fetch_compare(ZebraHandle zh, int position, const char *element_set, const Odr_oid *format, const char *cmp_rec) { const char *rec_buf = 0; size_t rec_len = 0; ODR odr = odr_createmem(ODR_ENCODE); ZEBRA_RES res = tl_fetch(zh, position, element_set, format, odr, &rec_buf, &rec_len); if (res == ZEBRA_OK) { if (strlen(cmp_rec) != rec_len) res = ZEBRA_FAIL; else if (memcmp(cmp_rec, rec_buf, rec_len)) res = ZEBRA_FAIL; if (res == ZEBRA_FAIL) { int l = rec_len; yaz_log(YLOG_LOG, "Expected: %s", cmp_rec); yaz_log(YLOG_LOG, "Got: %.*s", l, rec_buf); } } odr_destroy(odr); return res; } ZEBRA_RES tl_fetch_first_compare(ZebraHandle zh, const char *element_set, const Odr_oid *format, const char *cmp_rec) { return tl_fetch_compare(zh, 1, element_set, format, cmp_rec); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/LICENSE.zebra0000644000175000017500000004313311412336551012256 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. idzebra-2.0.44/bfile/0000755000175000017500000000000011412336534011305 500000000000000idzebra-2.0.44/bfile/tstbfile2.c0000644000175000017500000000722411412332551013267 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include void tst(void) { int r; BFiles bfs; BFile bf; char buf[256]; int block_size = 16; zint max_block = 200000; YAZ_CHECK(block_size <= sizeof(buf)); if (!(block_size <= sizeof(buf))) return; YAZ_CHECK(max_block * block_size < 4 * 1000000); /* 4M */ r = mkdir("register", 0777); YAZ_CHECK(r == 0 || (r == -1 && errno == EEXIST)); r = mkdir("shadow", 0777); YAZ_CHECK(r == 0 || (r == -1 && errno == EEXIST)); bfs = bfs_create("register.bad:4M", 0 /* base: current dir */); YAZ_CHECK(!bfs); if (bfs) return; bfs = bfs_create("register:4M", 0 /* base: current dir */); YAZ_CHECK(bfs); if (!bfs) return; r = bf_cache(bfs, "shadow.bad:4M"); YAZ_CHECK_EQ(r, ZEBRA_FAIL); r = bf_cache(bfs, "shadow:4M"); YAZ_CHECK_EQ(r, ZEBRA_OK); bf_reset(bfs); #if 1 /* we have to destroy bfs after reset. Unfortunately! */ bfs_destroy(bfs); bfs = bfs_create("register:4M", 0 /* base: current dir */); YAZ_CHECK(bfs); if (!bfs) return; r = bf_cache(bfs, "shadow:4M"); YAZ_CHECK_EQ(r, ZEBRA_OK); #endif yaz_log(YLOG_LOG, "writing file 1"); bf = bf_open(bfs, "file", block_size, 1); YAZ_CHECK(bf); if (bf) { zint bno[2]; memset(buf, ' ', block_size); bno[0] = 0; bno[1] = 1; while (bno[0] < max_block) { zint next = bno[0] + bno[1]; sprintf(buf, ZINT_FORMAT, bno[0]); YAZ_CHECK_EQ(bf_write(bf, bno[0], 0, 0, buf), 0); bno[0] = bno[1]; bno[1] = next; } bf_close(bf); } yaz_log(YLOG_LOG, "reading file 1"); bf = bf_open(bfs, "file", block_size, 0); YAZ_CHECK(bf); if (bf) { zint bno[2]; bno[0] = 0; bno[1] = 1; while (bno[0] < max_block) { zint next = bno[0] + bno[1]; memset(buf, ' ', block_size); YAZ_CHECK_EQ(bf_read(bf, bno[0], 0, 0, buf), 1); YAZ_CHECK_EQ(atoi(buf), bno[0]); bno[0] = bno[1]; bno[1] = next; } bf_close(bf); } #if 1 yaz_log(YLOG_LOG, "writing file 2"); bf = bf_open(bfs, "file", block_size, 1); YAZ_CHECK(bf); if (bf) { zint bno = 0; while (bno < max_block) { memset(buf, ' ', block_size); sprintf(buf, ZINT_FORMAT, bno); YAZ_CHECK_EQ(bf_write(bf, bno, 0, 0, buf), 0); bno = bno + 2; } bf_close(bf); } yaz_log(YLOG_LOG, "reading file 2"); bf = bf_open(bfs, "file", block_size, 0); YAZ_CHECK(bf); if (bf) { zint bno = 0; int step = max_block / 50; while (bno < max_block) { memset(buf, ' ', block_size); YAZ_CHECK_EQ(bf_read(bf, bno, 0, 0, buf), 1); YAZ_CHECK_EQ(atoi(buf), bno); bno = bno + 2*step; } bf_close(bf); } #endif bfs_destroy(bfs); } int main(int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); YAZ_CHECK_LOG(); tst(); YAZ_CHECK_TERM; } idzebra-2.0.44/bfile/bfile.c0000644000175000017500000002634411412332551012456 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #ifdef WIN32 #include #endif #if HAVE_UNISTD_H #include #endif #include #include #include #include "mfile.h" #include "cfile.h" struct BFile_struct { MFile mf; Zebra_lock_rdwr rdwr_lock; struct CFile_struct *cf; char *alloc_buf; int block_size; int alloc_buf_size; zint last_block; zint free_list; zint root_block; char *magic; int header_dirty; }; struct BFiles_struct { MFile_area commit_area; MFile_area register_area; char *base; char *cache_fname; }; BFiles bfs_create (const char *spec, const char *base) { BFiles bfs = (BFiles) xmalloc(sizeof(*bfs)); bfs->commit_area = 0; bfs->base = 0; bfs->cache_fname = 0; if (base) bfs->base = xstrdup(base); bfs->register_area = mf_init("register", spec, base, 0); if (!bfs->register_area) { bfs_destroy(bfs); return 0; } return bfs; } void bfs_destroy(BFiles bfs) { if (!bfs) return; xfree(bfs->cache_fname); xfree(bfs->base); mf_destroy(bfs->commit_area); mf_destroy(bfs->register_area); xfree(bfs); } static FILE *open_cache(BFiles bfs, const char *flags) { FILE *file; file = fopen(bfs->cache_fname, flags); return file; } static void unlink_cache(BFiles bfs) { if (bfs->cache_fname) unlink(bfs->cache_fname); } ZEBRA_RES bf_cache(BFiles bfs, const char *spec) { if (spec) { yaz_log(YLOG_LOG, "enabling shadow spec=%s", spec); if (!bfs->commit_area) bfs->commit_area = mf_init("shadow", spec, bfs->base, 1); if (bfs->commit_area) { bfs->cache_fname = xmalloc(strlen(bfs->commit_area->dirs->name)+ 8); strcpy(bfs->cache_fname, bfs->commit_area->dirs->name); strcat(bfs->cache_fname, "/cache"); yaz_log(YLOG_LOG, "cache_fname = %s", bfs->cache_fname); } else { yaz_log(YLOG_WARN, "shadow could not be enabled"); return ZEBRA_FAIL; } } else bfs->commit_area = 0; return ZEBRA_OK; } int bf_close2(BFile bf) { int ret = 0; zebra_lock_rdwr_destroy(&bf->rdwr_lock); if (bf->cf) { if (cf_close(bf->cf)) ret = -1; } if (bf->mf) { if (mf_close(bf->mf)) ret = -1; } xfree(bf->alloc_buf); xfree(bf->magic); xfree(bf); return ret; } void bf_close(BFile bf) { if (bf_close2(bf)) { zebra_exit("bf_close"); } } #define HEADER_SIZE 256 BFile bf_xopen(BFiles bfs, const char *name, int block_size, int wrflag, const char *magic, int *read_version, const char **more_info) { char read_magic[40]; int l = 0; int i = 0; char *hbuf; zint pos = 0; BFile bf = bf_open(bfs, name, block_size, wrflag); if (!bf) return 0; /* HEADER_SIZE is considered enough for our header */ if (bf->block_size < HEADER_SIZE) bf->alloc_buf_size = HEADER_SIZE; else bf->alloc_buf_size = bf->block_size; hbuf = bf->alloc_buf = xmalloc(bf->alloc_buf_size); /* fill-in default values */ bf->free_list = 0; bf->root_block = bf->last_block = HEADER_SIZE / bf->block_size + 1; bf->magic = xstrdup(magic); if (!bf_read(bf, pos, 0, 0, hbuf + pos * bf->block_size)) { if (wrflag) bf->header_dirty = 1; return bf; } while(hbuf[pos * bf->block_size + i] != '\0') { if (i == bf->block_size) { /* end of block at pos reached .. */ if (bf->alloc_buf_size < (pos+1) * bf->block_size) { /* not room for all in alloc_buf_size */ yaz_log(YLOG_WARN, "bad header for %s (3)", magic); bf_close(bf); return 0; } /* read next block in header */ pos++; if (!bf_read(bf, pos, 0, 0, hbuf + pos * bf->block_size)) { yaz_log(YLOG_WARN, "missing header block %s (4)", magic); bf_close(bf); return 0; } i = 0; /* pos within block is reset */ } else i++; } if (sscanf(hbuf, "%39s %d " ZINT_FORMAT " " ZINT_FORMAT "%n", read_magic, read_version, &bf->last_block, &bf->free_list, &l) < 4 && l) /* if %n is counted, it's 5 */ { yaz_log(YLOG_WARN, "bad header for %s (1)", magic); bf_close(bf); return 0; } if (strcmp(read_magic, magic)) { yaz_log(YLOG_WARN, "bad header for %s (2)", magic); bf_close(bf); return 0; } if (hbuf[l] == ' ') l++; if (more_info) *more_info = hbuf + l; return bf; } int bf_xclose(BFile bf, int version, const char *more_info) { if (bf->header_dirty) { zint pos = 0; assert(bf->alloc_buf); assert(bf->magic); sprintf(bf->alloc_buf, "%s %d " ZINT_FORMAT " " ZINT_FORMAT " ", bf->magic, version, bf->last_block, bf->free_list); if (more_info) strcat(bf->alloc_buf, more_info); while (1) { bf_write(bf, pos, 0, 0, bf->alloc_buf + pos * bf->block_size); pos++; if (pos * bf->block_size > strlen(bf->alloc_buf)) break; } } return bf_close2(bf); } BFile bf_open(BFiles bfs, const char *name, int block_size, int wflag) { BFile bf = (BFile) xmalloc(sizeof(*bf)); bf->alloc_buf = 0; bf->magic = 0; bf->block_size = block_size; bf->header_dirty = 0; bf->cf = 0; bf->mf = 0; zebra_lock_rdwr_init(&bf->rdwr_lock); if (bfs->commit_area) { int first_time; bf->mf = mf_open(bfs->register_area, name, block_size, 0); bf->cf = cf_open(bf->mf, bfs->commit_area, name, block_size, wflag, &first_time); if (!bf->cf) { yaz_log(YLOG_FATAL, "cf_open failed for %s", name); bf_close(bf); return 0; } if (first_time) { FILE *outf; outf = open_cache(bfs, "ab"); if (!outf) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "open %s", bfs->cache_fname); bf_close(bf); return 0; } fprintf(outf, "%s %d\n", name, block_size); if (fclose(outf)) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "fclose %s", bfs->cache_fname); bf_close(bf); return 0; } } } else { bf->mf = mf_open(bfs->register_area, name, block_size, wflag); } if (!bf->mf) { yaz_log(YLOG_FATAL, "mf_open failed for %s", name); bf_close(bf); return 0; } return bf; } int bf_read(BFile bf, zint no, int offset, int nbytes, void *buf) { int ret = bf_read2(bf, no, offset, nbytes, buf); if (ret == -1) { zebra_exit("bf_read"); } return ret; } int bf_read2(BFile bf, zint no, int offset, int nbytes, void *buf) { int ret; zebra_lock_rdwr_rlock(&bf->rdwr_lock); if (bf->cf) { if ((ret = cf_read(bf->cf, no, offset, nbytes, buf)) == 0) ret = mf_read(bf->mf, no, offset, nbytes, buf); } else ret = mf_read(bf->mf, no, offset, nbytes, buf); zebra_lock_rdwr_runlock(&bf->rdwr_lock); return ret; } int bf_write(BFile bf, zint no, int offset, int nbytes, const void *buf) { int ret = bf_write2(bf, no, offset, nbytes, buf); if (ret == -1) { zebra_exit("bf_write"); } return ret; } int bf_write2(BFile bf, zint no, int offset, int nbytes, const void *buf) { int r; zebra_lock_rdwr_wlock(&bf->rdwr_lock); if (bf->cf) r = cf_write(bf->cf, no, offset, nbytes, buf); else r = mf_write(bf->mf, no, offset, nbytes, buf); zebra_lock_rdwr_wunlock(&bf->rdwr_lock); return r; } int bf_commitExists(BFiles bfs) { FILE *inf; inf = open_cache(bfs, "rb"); if (inf) { fclose(inf); return 1; } return 0; } void bf_reset(BFiles bfs) { if (!bfs) return; mf_reset(bfs->commit_area, 1); mf_reset(bfs->register_area, 1); unlink_cache(bfs); } int bf_commitExec(BFiles bfs) { FILE *inf; int block_size; char path[256]; MFile mf; CFile cf; int first_time; int r = 0; assert(bfs->commit_area); if (!(inf = open_cache(bfs, "rb"))) { yaz_log(YLOG_LOG, "No commit file"); return -1; } while (fscanf(inf, "%s %d", path, &block_size) == 2) { mf = mf_open(bfs->register_area, path, block_size, 1); if (!mf) { r = -1; break; } cf = cf_open(mf, bfs->commit_area, path, block_size, 0, &first_time); if (!cf) { mf_close(mf); r = -1; break; } r = cf_commit(cf); cf_close(cf); mf_close(mf); if (r) break; } fclose(inf); return r; } void bf_commitClean(BFiles bfs, const char *spec) { int mustDisable = 0; if (!bfs->commit_area) { bf_cache(bfs, spec); mustDisable = 1; } mf_reset(bfs->commit_area, 1); unlink_cache(bfs); if (mustDisable) bf_cache(bfs, 0); } int bf_alloc(BFile bf, int no, zint *blocks) { int i; assert(bf->alloc_buf); bf->header_dirty = 1; for (i = 0; i < no; i++) { if (!bf->free_list) blocks[i] = bf->last_block++; else { char buf[16]; const char *cp = buf; memset(buf, '\0', sizeof(buf)); blocks[i] = bf->free_list; if (bf_read(bf, bf->free_list, 0, sizeof(buf), buf) != 1) { yaz_log(YLOG_WARN, "Bad freelist entry " ZINT_FORMAT, bf->free_list); return -1; } zebra_zint_decode(&cp, &bf->free_list); } } return 0; } int bf_free(BFile bf, int no, const zint *blocks) { int i; assert(bf->alloc_buf); bf->header_dirty = 1; for (i = 0; i < no; i++) { char buf[16]; char *cp = buf; memset(buf, '\0', sizeof(buf)); zebra_zint_encode(&cp, bf->free_list); bf->free_list = blocks[i]; bf_write(bf, bf->free_list, 0, sizeof(buf), buf); } return 0; } int bfs_register_directory_stat(BFiles bfs, int no, const char **directory, double *used_bytes, double *max_bytes) { return mf_area_directory_stat(bfs->register_area, no, directory, used_bytes, max_bytes); } int bfs_shadow_directory_stat(BFiles bfs, int no, const char **directory, double *used_bytes, double *max_bytes) { if (!bfs->commit_area) return 0; return mf_area_directory_stat(bfs->commit_area, no, directory, used_bytes, max_bytes); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/bfile/mfile.h0000644000175000017500000001276111412332551012474 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef MFILE_H #define MFILE_H #include #include #include #include #ifdef WIN32 /* 64-bit access .. */ typedef __int64 mfile_off_t; #define mfile_seek _lseeki64 #else #include typedef off_t mfile_off_t; #define mfile_seek lseek #endif #ifndef FILENAME_MAX #include #define FILENAME_MAX MAXPATHLEN #endif #include YAZ_BEGIN_CDECL #define MF_MIN_BLOCKS_CREAT 1 /* minimum free blocks in new dir */ #define MF_MAX_PARTS 28 /* max # of part-files per metafile */ #define mf_blocksize(mf) ((mf)->blocksize) typedef struct mf_dir { char name[FILENAME_MAX+1]; mfile_off_t max_bytes; /* allocated bytes in this dir. */ mfile_off_t avail_bytes; /* bytes left */ struct mf_dir *next; } mf_dir; typedef struct part_file { zint number; zint top; zint blocks; mfile_off_t bytes; mf_dir *dir; char *path; int fd; } part_file; struct MFile_area_struct; typedef struct MFile_area_struct *MFile_area; typedef struct meta_file { char name[FILENAME_MAX+1]; part_file files[MF_MAX_PARTS]; int no_files; int cur_file; int open; /* is this file open? */ int blocksize; mfile_off_t min_bytes_creat; /* minimum bytes required to enter directory */ MFile_area ma; int wr; Zebra_mutex mutex; struct meta_file *next; } *MFile, meta_file; struct MFile_area_struct { char name[FILENAME_MAX+1]; mf_dir *dirs; struct meta_file *mfiles; struct MFile_area_struct *next; /* global list of active areas */ Zebra_mutex mutex; }; /** \brief creates a metafile area \param name of area (does not show up on disk - purely for notation) \param spec area specification (e.g. "/a:1G dir /b:2000M" \param base base directory (NULL for no base) \param only_shadow_files only consider shadow files in area \returns metafile area handle or NULL if error occurs */ MFile_area mf_init(const char *name, const char *spec, const char *base, int only_shadow_files) ZEBRA_GCC_ATTR((warn_unused_result)); /** \brief destroys metafile area handle \param ma metafile area handle */ void mf_destroy(MFile_area ma); /** \brief opens metafile \param ma metafile area handle \param name pseudo filename (name*.mf) \param block_size block size for this file \param wflag write flag, 0=read, 1=write&read \returns metafile handle, or NULL for error (could not be opened) */ MFile mf_open(MFile_area ma, const char *name, int block_size, int wflag) ZEBRA_GCC_ATTR((warn_unused_result)); /** \brief closes metafile \param mf metafile handle \retval 0 OK */ int mf_close(MFile mf); /** \brief reads block from metafile \param mf metafile handle \param no block position \param offset offset within block \param nbytes no of bytes to read (0 for whole block) \param buf content (filled with data if OK) \retval 0 block partially read \retval 1 block fully read \retval -1 block could not be read due to error */ int mf_read(MFile mf, zint no, int offset, int nbytes, void *buf) ZEBRA_GCC_ATTR((warn_unused_result)); /** \brief writes block to metafile \param mf metafile handle \param no block position \param offset offset within block \param nbytes no of bytes to write (0 for whole block) \param buf content to be written \retval 0 block written \retval -1 error (block not written) */ int mf_write(MFile mf, zint no, int offset, int nbytes, const void *buf) ZEBRA_GCC_ATTR((warn_unused_result)); /** \brief reset all files in a metafile area (optionally delete them as well) \param ma metafile area \param unlink_flag if unlink_flag=1 all files are removed from FS */ void mf_reset(MFile_area ma, int unlink_flag); /* \brief gets statistics about directory in metafile area \param ma the area \param no directory number (0=first, 1=second,...) \param directory holds directory name (if found) \param used_bytes used file bytes in directory (if found) \param max_bytes max usage of bytes (if found) \retval 1 no is within range and directory, used, max are set. \retval 0 no is out of range and directory, used, max are unset We are using double, because off_t may have a different size on same platform depending on whether 64-bit is enabled or not. Note that if an area has unlimited size, that is represented as max_bytes = -1. */ int mf_area_directory_stat(MFile_area ma, int no, const char **directory, double *bytes_used, double *bytes_max); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/bfile/cfile.h0000644000175000017500000000701311412332551012454 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef CFILE_H #define CFILE_H #include YAZ_BEGIN_CDECL /** \brief number of blocks in hash bucket */ #define HASH_BUCKET 15 /** \brief CFile hash structure on disc */ struct CFile_ph_bucket { zint no[HASH_BUCKET]; /**< block number in original file */ zint vno[HASH_BUCKET];/**< block number in shadow file */ zint this_bucket; /**< this bucket number */ zint next_bucket; /**< next bucket number */ }; /** \brief CFile hash structure info in memory */ struct CFile_hash_bucket { struct CFile_ph_bucket ph; int dirty; struct CFile_hash_bucket *h_next, **h_prev; struct CFile_hash_bucket *lru_next, *lru_prev; }; #define HASH_BSIZE sizeof(struct CFile_ph_bucket) /** \brief state of CFile is a hash structure */ #define CFILE_STATE_HASH 1 /** \brief state of CFile is a flat file file */ #define CFILE_STATE_FLAT 2 /** \brief CFile file header */ struct CFile_head { int state; /**< CFILE_STATE_HASH, CFILE_STATE_FLAT, .. */ zint next_block; /**< next free block / last block */ int block_size; /**< mfile/bfile block size */ int hash_size; /**< no of chains in hash table */ zint first_bucket; /**< first hash bucket */ zint next_bucket; /**< last hash bucket + 1 = first flat bucket */ zint flat_bucket; /**< last flat bucket + 1 */ }; /** \brief All in-memory information per CFile */ typedef struct CFile_struct { struct CFile_head head; MFile block_mf; /**< block meta file */ MFile hash_mf; /**< hash or index file (depending on state) */ zint *array; /**< array for hash */ struct CFile_hash_bucket **parray; /**< holds all hash bucket in memory */ struct CFile_hash_bucket *bucket_lru_front; /**< LRU front for hash */ struct CFile_hash_bucket *bucket_lru_back; /**< LRU back for hash */ int dirty; /**< whether CFile is dirty / header must be rewritten */ zint bucket_in_memory; /**< number of buckets in memory */ zint max_bucket_in_memory; /**< max number of buckets in memory */ char *iobuf; /**< data block .. of size block size */ MFile rmf; /**< read meta file (original data / not dirty) */ int no_hits; /**< number of bucket cache hits */ int no_miss; /**< number of bucket cache misses */ Zebra_mutex mutex; } *CFile; int cf_close (CFile cf); CFile cf_open (MFile mf, MFile_area area, const char *fname, int block_size, int wflag, int *firstp); int cf_read (CFile cf, zint no, int offset, int nbytes, void *buf); int cf_write (CFile cf, zint no, int offset, int nbytes, const void *buf); int cf_commit (CFile cf) ZEBRA_GCC_ATTR((warn_unused_result)); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/bfile/commit.c0000644000175000017500000001571511412332551012665 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include "mfile.h" #include "cfile.h" #define CF_OPTIMIZE_COMMIT 0 static int log_level = 0; #if CF_OPTIMIZE_COMMIT struct map_cache_entity { int from; int to; }; struct map_cache { int max; int no; struct map_cache_entity *map; char *buf; CFile cf; }; static struct map_cache *map_cache_init (CFile cf) { int mem_max = 2000000; struct map_cache *m_p; m_p = xmalloc (sizeof(*m_p)); m_p->cf = cf; m_p->max = mem_max / cf->head.block_size; m_p->buf = xmalloc (mem_max); m_p->no = 0; m_p->map = xmalloc (sizeof(*m_p->map) * m_p->max); return m_p; } static int map_cache_cmp_from (const void *p1, const void *p2) { return ((struct map_cache_entity*) p1)->from - ((struct map_cache_entity*) p2)->from; } static int map_cache_cmp_to(const void *p1, const void *p2) { return ((struct map_cache_entity*) p1)->to - ((struct map_cache_entity*) p2)->to; } static int map_cache_flush(struct map_cache *m_p) { int i; qsort (m_p->map, m_p->no, sizeof(*m_p->map), map_cache_cmp_from); assert (m_p->no < 2 || m_p->map[0].from < m_p->map[1].from); for (i = 0; ino; i++) { if (mf_read(m_p->cf->block_mf, m_p->map[i].from, 0, 0, m_p->buf + i * m_p->cf->head.block_size) != 1) { yaz_log (YLOG_FATAL, "read commit block at position %d", m_p->map[i].from); return -1; } m_p->map[i].from = i; } qsort (m_p->map, m_p->no, sizeof(*m_p->map), map_cache_cmp_to); assert (m_p->no < 2 || m_p->map[0].to < m_p->map[1].to); for (i = 0; ino; i++) { if (mf_write(m_p->cf->rmf, m_p->map[i].to, 0, 0, m_p->buf + m_p->map[i].from * m_p->cf->head.block_size)) return -1; } m_p->no = 0; return 0; } static int map_cache_del(struct map_cache *m_p) { int r = map_cache_flush(m_p); xfree (m_p->map); xfree (m_p->buf); xfree (m_p); return r; } static int map_cache_add(struct map_cache *m_p, int from, int to) { int i = m_p->no; m_p->map[i].from = from; m_p->map[i].to = to; m_p->no = ++i; if (i == m_p->max) return map_cache_flush(m_p); return 0; } /* CF_OPTIMIZE_COMMIT */ #endif static int cf_commit_hash (CFile cf) { int r = 0; int i; zint bucket_no; int hash_bytes; struct CFile_ph_bucket *p; #if CF_OPTIMIZE_COMMIT struct map_cache *m_p; #endif #if CF_OPTIMIZE_COMMIT m_p = map_cache_init (cf); #endif p = (struct CFile_ph_bucket *) xmalloc (sizeof(*p)); hash_bytes = cf->head.hash_size * sizeof(zint); bucket_no = cf->head.first_bucket; for (; bucket_no < cf->head.next_bucket; bucket_no++) { if (mf_read (cf->hash_mf, bucket_no, 0, 0, p) != 1) { yaz_log (YLOG_FATAL, "read commit hash"); r = -1; goto out; } for (i = 0; ivno[i]; i++) { #if CF_OPTIMIZE_COMMIT if (map_cache_add(m_p, p->vno[i], p->no[i])) { r = -1; goto out; } #else if (mf_read(cf->block_mf, p->vno[i], 0, 0, cf->iobuf) != 1) { yaz_log (YLOG_FATAL, "read commit block"); r = -1; goto out; } if (mf_write(cf->rmf, p->no[i], 0, 0, cf->iobuf)) { yaz_log (YLOG_FATAL, "write commit block"); r = -1; goto out; } #endif } } out: #if CF_OPTIMIZE_COMMIT if (map_cache_del(m_p)) r = -1; #endif xfree(p); return r; } static int cf_commit_flat(CFile cf) { zint *fp; zint hno; int i; int r = 0; zint vno = 0; #if CF_OPTIMIZE_COMMIT struct map_cache *m_p; #endif #if CF_OPTIMIZE_COMMIT m_p = map_cache_init (cf); #endif fp = (zint *) xmalloc (HASH_BSIZE); for (hno = cf->head.next_bucket; hno < cf->head.flat_bucket; hno++) { for (i = 0; i < (int) (HASH_BSIZE/sizeof(zint)); i++) fp[i] = 0; if (!mf_read (cf->hash_mf, hno, 0, 0, fp) && hno != cf->head.flat_bucket-1) { yaz_log (YLOG_FATAL, "read index block hno=" ZINT_FORMAT " (" ZINT_FORMAT "-" ZINT_FORMAT ") commit", hno, cf->head.next_bucket, cf->head.flat_bucket-1); r = -1; goto out; } for (i = 0; i < (int) (HASH_BSIZE/sizeof(zint)); i++) { if (fp[i]) { #if CF_OPTIMIZE_COMMIT if (map_cache_add(m_p, fp[i], vno)) { r = -1; goto out; } #else if (mf_read (cf->block_mf, fp[i], 0, 0, cf->iobuf) != 1) { yaz_log (YLOG_FATAL, "read data block hno=" ZINT_FORMAT " (" ZINT_FORMAT "-" ZINT_FORMAT ") " "i=%d commit block at " ZINT_FORMAT " (->" ZINT_FORMAT")", hno, cf->head.next_bucket, cf->head.flat_bucket-1, i, fp[i], vno); r = -1; goto out; } if (mf_write(cf->rmf, vno, 0, 0, cf->iobuf)) { r = -1; goto out; } #endif } vno++; } } out: #if CF_OPTIMIZE_COMMIT if (map_cache_del(m_p)) r = -1; #endif yaz_log(log_level, "cf_commit_flat r=%d", r); xfree(fp); return r; } int cf_commit(CFile cf) { if (cf->bucket_in_memory) { yaz_log(YLOG_FATAL, "cf_commit: dirty cache"); return -1; } yaz_log(log_level, "cf_commit: state=%d", cf->head.state); if (cf->head.state == CFILE_STATE_HASH) return cf_commit_hash(cf); else if (cf->head.state == CFILE_STATE_FLAT) return cf_commit_flat(cf); else { yaz_log(YLOG_FATAL, "cf_commit: bad state=%d", cf->head.state); return -1; } } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/bfile/Makefile.am0000644000175000017500000000070511412332551013256 00000000000000 noinst_LTLIBRARIES = libidzebra-bfile.la check_PROGRAMS = tstmfile1 tstbfile1 tstbfile2 TESTS = $(check_PROGRAMS) tstmfile1_SOURCES = tstmfile1.c tstbfile1_SOURCES = tstbfile1.c tstbfile2_SOURCES = tstbfile2.c AM_CPPFLAGS = -I$(top_srcdir)/include $(YAZINC) libidzebra_bfile_la_SOURCES = bfile.c mfile.c cfile.c commit.c cfile.h mfile.h LDADD = libidzebra-bfile.la ../util/libidzebra-util.la $(YAZLALIB) clean-local: -rm -fr *.log *.mf shadow idzebra-2.0.44/bfile/cfile.c0000644000175000017500000004012711412332551012452 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include "mfile.h" #include "cfile.h" /** \brief set to 1 if extra commit/shadow check is to be performed */ #define EXTRA_CHECK 0 static int write_head(CFile cf) { int left = cf->head.hash_size * sizeof(zint); int bno = 1; int r = 0; const char *tab = (char*) cf->array; if (!tab) return 0; while (left >= (int) HASH_BSIZE) { r = mf_write(cf->hash_mf, bno++, 0, 0, tab); if (r) return r; tab += HASH_BSIZE; left -= HASH_BSIZE; } if (left > 0) r = mf_write(cf->hash_mf, bno, 0, left, tab); return r; } static int read_head(CFile cf) { int left = cf->head.hash_size * sizeof(zint); int bno = 1; char *tab = (char*) cf->array; if (!tab) return 0; while (left >= (int) HASH_BSIZE) { if (mf_read(cf->hash_mf, bno++, 0, 0, tab) == -1) return -1; tab += HASH_BSIZE; left -= HASH_BSIZE; } if (left > 0) { if (mf_read(cf->hash_mf, bno, 0, left, tab) == -1) return -1; } return 1; } CFile cf_open(MFile mf, MFile_area area, const char *fname, int block_size, int wflag, int *firstp) { char path[1024]; int i, ret; CFile cf = (CFile) xmalloc(sizeof(*cf)); int hash_bytes; /* avoid valgrind warnings, but set to something nasty */ memset(cf, 'Z', sizeof(*cf)); yaz_log(YLOG_DEBUG, "cf: open %s %s", fname, wflag ? "rdwr" : "rd"); cf->block_mf = 0; cf->hash_mf = 0; cf->rmf = mf; assert(firstp); cf->bucket_lru_front = cf->bucket_lru_back = NULL; cf->bucket_in_memory = 0; cf->max_bucket_in_memory = 100; cf->dirty = 0; cf->iobuf = (char *) xmalloc(block_size); memset(cf->iobuf, 0, block_size); cf->no_hits = 0; cf->no_miss = 0; cf->parray = 0; cf->array = 0; cf->block_mf = 0; cf->hash_mf = 0; zebra_mutex_init(&cf->mutex); sprintf(path, "%s-b", fname); if (!(cf->block_mf = mf_open(area, path, block_size, wflag))) { cf_close(cf); return 0; } sprintf(path, "%s-i", fname); if (!(cf->hash_mf = mf_open(area, path, HASH_BSIZE, wflag))) { cf_close(cf); return 0; } ret = mf_read(cf->hash_mf, 0, 0, sizeof(cf->head), &cf->head); if (ret == -1) { cf_close(cf); return 0; } if (ret == 0 || !cf->head.state) { *firstp = 1; cf->head.state = CFILE_STATE_HASH; cf->head.block_size = block_size; cf->head.hash_size = 199; hash_bytes = cf->head.hash_size * sizeof(zint); cf->head.flat_bucket = cf->head.next_bucket = cf->head.first_bucket = (hash_bytes+sizeof(cf->head))/HASH_BSIZE + 2; cf->head.next_block = 1; cf->array = (zint *) xmalloc(hash_bytes); for (i = 0; ihead.hash_size; i++) cf->array[i] = 0; if (wflag) { if (mf_write(cf->hash_mf, 0, 0, sizeof(cf->head), &cf->head)) { cf_close(cf); return 0; } if (write_head(cf)) { cf_close(cf); return 0; } } } else { *firstp = 0; assert(cf->head.block_size == block_size); assert(cf->head.hash_size > 2); hash_bytes = cf->head.hash_size * sizeof(zint); assert(cf->head.next_bucket > 0); assert(cf->head.next_block > 0); if (cf->head.state == CFILE_STATE_HASH) cf->array = (zint *) xmalloc(hash_bytes); else cf->array = NULL; if (read_head(cf) == -1) { cf_close(cf); return 0; } } if (cf->head.state == CFILE_STATE_HASH) { cf->parray = (struct CFile_hash_bucket **) xmalloc(cf->head.hash_size * sizeof(*cf->parray)); for (i = 0; ihead.hash_size; i++) cf->parray[i] = NULL; } return cf; } static int cf_hash(CFile cf, zint no) { return (int) (((no >> 3) % cf->head.hash_size)); } static void release_bucket(CFile cf, struct CFile_hash_bucket *p) { if (p->lru_prev) p->lru_prev->lru_next = p->lru_next; else cf->bucket_lru_back = p->lru_next; if (p->lru_next) p->lru_next->lru_prev = p->lru_prev; else cf->bucket_lru_front = p->lru_prev; *p->h_prev = p->h_next; if (p->h_next) p->h_next->h_prev = p->h_prev; --(cf->bucket_in_memory); xfree(p); } static int flush_bucket(CFile cf, int no_to_flush) { int i; int ret = 0; struct CFile_hash_bucket *p; for (i = 0; i != no_to_flush; i++) { p = cf->bucket_lru_back; if (!p) break; if (p->dirty) { if (ret == 0) { if (mf_write(cf->hash_mf, p->ph.this_bucket, 0, 0, &p->ph)) ret = -1; } cf->dirty = 1; } release_bucket(cf, p); } return ret; } static struct CFile_hash_bucket *alloc_bucket(CFile cf, zint block_no, int hno) { struct CFile_hash_bucket *p, **pp; if (cf->bucket_in_memory == cf->max_bucket_in_memory) { if (flush_bucket(cf, 1)) return 0; } assert(cf->bucket_in_memory < cf->max_bucket_in_memory); ++(cf->bucket_in_memory); p = (struct CFile_hash_bucket *) xmalloc(sizeof(*p)); p->lru_next = NULL; p->lru_prev = cf->bucket_lru_front; if (cf->bucket_lru_front) cf->bucket_lru_front->lru_next = p; else cf->bucket_lru_back = p; cf->bucket_lru_front = p; pp = cf->parray + hno; p->h_next = *pp; p->h_prev = pp; if (*pp) (*pp)->h_prev = &p->h_next; *pp = p; return p; } static struct CFile_hash_bucket *get_bucket(CFile cf, zint block_no, int hno) { struct CFile_hash_bucket *p; p = alloc_bucket(cf, block_no, hno); if (!p) return 0; p->dirty = 0; if (mf_read(cf->hash_mf, block_no, 0, 0, &p->ph) != 1) { yaz_log(YLOG_FATAL, "read get_bucket"); release_bucket(cf, p); return 0; } assert(p->ph.this_bucket == block_no); return p; } static struct CFile_hash_bucket *new_bucket(CFile cf, zint *block_nop, int hno) { struct CFile_hash_bucket *p; int i; zint block_no; block_no = *block_nop = cf->head.next_bucket++; p = alloc_bucket(cf, block_no, hno); if (!p) return 0; p->dirty = 1; for (i = 0; iph.vno[i] = 0; p->ph.no[i] = 0; } p->ph.next_bucket = 0; p->ph.this_bucket = block_no; return p; } static int cf_lookup_flat(CFile cf, zint no, zint *vno) { zint hno = (no*sizeof(zint))/HASH_BSIZE; int off = (int) ((no*sizeof(zint)) - hno*HASH_BSIZE); *vno = 0; if (mf_read(cf->hash_mf, hno+cf->head.next_bucket, off, sizeof(zint), vno) == -1) return -1; if (*vno) return 1; return 0; } static int cf_lookup_hash(CFile cf, zint no, zint *vno) { int hno = cf_hash(cf, no); struct CFile_hash_bucket *hb; zint block_no; int i; for (hb = cf->parray[hno]; hb; hb = hb->h_next) { for (i = 0; iph.vno[i]; i++) if (hb->ph.no[i] == no) { (cf->no_hits)++; *vno = hb->ph.vno[i]; return 1; } } for (block_no = cf->array[hno]; block_no; block_no = hb->ph.next_bucket) { for (hb = cf->parray[hno]; hb; hb = hb->h_next) { if (hb->ph.this_bucket == block_no) break; } if (hb) continue; #if EXTRA_CHECK for (hb = cf->bucket_lru_back; hb; hb = hb->lru_next) { if (hb->ph.this_bucket == block_no) { yaz_log(YLOG_FATAL, "Found hash bucket on other chain(1)"); return -1; } for (i = 0; iph.vno[i]; i++) if (hb->ph.no[i] == no) { yaz_log(YLOG_FATAL, "Found hash bucket on other chain (2)"); return -1; } } #endif (cf->no_miss)++; hb = get_bucket(cf, block_no, hno); if (!hb) return -1; for (i = 0; iph.vno[i]; i++) if (hb->ph.no[i] == no) { *vno = hb->ph.vno[i]; return 1; } } return 0; } static int cf_write_flat(CFile cf, zint no, zint vno) { zint hno = (no*sizeof(zint))/HASH_BSIZE; int off = (int) ((no*sizeof(zint)) - hno*HASH_BSIZE); hno += cf->head.next_bucket; if (hno >= cf->head.flat_bucket) cf->head.flat_bucket = hno+1; cf->dirty = 1; return mf_write(cf->hash_mf, hno, off, sizeof(zint), &vno); } static int cf_moveto_flat(CFile cf) { struct CFile_hash_bucket *p; int j; zint i; yaz_log(YLOG_DEBUG, "cf: Moving to flat shadow: %s", cf->rmf->name); yaz_log(YLOG_DEBUG, "cf: hits=%d miss=%d bucket_in_memory=" ZINT_FORMAT " total=" ZINT_FORMAT, cf->no_hits, cf->no_miss, cf->bucket_in_memory, cf->head.next_bucket - cf->head.first_bucket); assert(cf->head.state == CFILE_STATE_HASH); if (flush_bucket(cf, -1)) return -1; assert(cf->bucket_in_memory == 0); p = (struct CFile_hash_bucket *) xmalloc(sizeof(*p)); for (i = cf->head.first_bucket; i < cf->head.next_bucket; i++) { if (mf_read(cf->hash_mf, i, 0, 0, &p->ph) != 1) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "read bucket moveto flat"); xfree(p); return -1; } for (j = 0; j < HASH_BUCKET && p->ph.vno[j]; j++) { if (cf_write_flat(cf, p->ph.no[j], p->ph.vno[j])) { xfree(p); return -1; } } } xfree(p); xfree(cf->array); cf->array = NULL; xfree(cf->parray); cf->parray = NULL; cf->head.state = CFILE_STATE_FLAT; cf->dirty = 1; return 0; } static int cf_lookup(CFile cf, zint no, zint *vno) { if (cf->head.state > 1) return cf_lookup_flat(cf, no, vno); return cf_lookup_hash(cf, no, vno); } static zint cf_new_flat(CFile cf, zint no) { zint vno = (cf->head.next_block)++; cf_write_flat(cf, no, vno); return vno; } static zint cf_new_hash(CFile cf, zint no) { int hno = cf_hash(cf, no); struct CFile_hash_bucket *hbprev = NULL, *hb = cf->parray[hno]; zint *bucketpp = &cf->array[hno]; int i; zint vno = (cf->head.next_block)++; for (hb = cf->parray[hno]; hb; hb = hb->h_next) if (!hb->ph.vno[HASH_BUCKET-1]) for (i = 0; iph.vno[i]) { (cf->no_hits)++; hb->ph.no[i] = no; hb->ph.vno[i] = vno; hb->dirty = 1; return vno; } while (*bucketpp) { for (hb = cf->parray[hno]; hb; hb = hb->h_next) if (hb->ph.this_bucket == *bucketpp) { bucketpp = &hb->ph.next_bucket; hbprev = hb; break; } if (hb) continue; #if EXTRA_CHECK for (hb = cf->bucket_lru_back; hb; hb = hb->lru_next) { if (hb->ph.this_bucket == *bucketpp) { yaz_log(YLOG_FATAL, "Found hash bucket on other chain"); return 0; } } #endif (cf->no_miss)++; hb = get_bucket(cf, *bucketpp, hno); if (!hb) return 0; for (i = 0; iph.vno[i]) { hb->ph.no[i] = no; hb->ph.vno[i] = vno; hb->dirty = 1; return vno; } bucketpp = &hb->ph.next_bucket; hbprev = hb; } if (hbprev) hbprev->dirty = 1; hb = new_bucket(cf, bucketpp, hno); if (!hb) return 0; hb->ph.no[0] = no; hb->ph.vno[0] = vno; return vno; } zint cf_new(CFile cf, zint no) { if (cf->head.state > 1) return cf_new_flat(cf, no); if (cf->no_miss*2 > cf->no_hits) { if (cf_moveto_flat(cf)) return -1; assert(cf->head.state > 1); return cf_new_flat(cf, no); } return cf_new_hash(cf, no); } /** \brief reads block from commit area \param cf commit file \param no block number \param offset offset in block \param nbytes number of bytes to read \param buf buffer for content (if read was succesful) \retval 0 block could not be fully read \retval 1 block could be read \retval -1 error */ int cf_read(CFile cf, zint no, int offset, int nbytes, void *buf) { zint block; int ret; assert(cf); zebra_mutex_lock(&cf->mutex); ret = cf_lookup(cf, no, &block); zebra_mutex_unlock(&cf->mutex); if (ret == -1) { /* error */ yaz_log(YLOG_FATAL, "cf_lookup failed"); return -1; } else if (ret == 0) { /* block could not be read */ return ret; } else if (mf_read(cf->block_mf, block, offset, nbytes, buf) != 1) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "mf_read no=" ZINT_FORMAT " block=" ZINT_FORMAT, no, block); return -1; } return 1; } /** \brief writes block to commit area \param cf commit file \param no block number \param offset offset in block \param nbytes number of bytes to be written \param buf buffer to be written \retval 0 block written \retval -1 error */ int cf_write(CFile cf, zint no, int offset, int nbytes, const void *buf) { zint block; int ret; assert(cf); zebra_mutex_lock(&cf->mutex); ret = cf_lookup(cf, no, &block); if (ret == -1) { zebra_mutex_unlock(&cf->mutex); return ret; } if (ret == 0) { block = cf_new(cf, no); if (!block) { zebra_mutex_unlock(&cf->mutex); return -1; } if (offset || nbytes) { if (mf_read(cf->rmf, no, 0, 0, cf->iobuf) == -1) return -1; memcpy(cf->iobuf + offset, buf, nbytes); buf = cf->iobuf; offset = 0; nbytes = 0; } } zebra_mutex_unlock(&cf->mutex); return mf_write(cf->block_mf, block, offset, nbytes, buf); } int cf_close(CFile cf) { int ret = 0; yaz_log(YLOG_DEBUG, "cf: close hits=%d miss=%d bucket_in_memory=" ZINT_FORMAT " total=" ZINT_FORMAT, cf->no_hits, cf->no_miss, cf->bucket_in_memory, cf->head.next_bucket - cf->head.first_bucket); if (flush_bucket(cf, -1)) ret = -1; if (cf->hash_mf) { if (cf->dirty) { if (mf_write(cf->hash_mf, 0, 0, sizeof(cf->head), &cf->head)) ret = -1; if (write_head(cf)) ret = -1; } mf_close(cf->hash_mf); } if (cf->block_mf) mf_close(cf->block_mf); xfree(cf->array); xfree(cf->parray); xfree(cf->iobuf); zebra_mutex_destroy(&cf->mutex); xfree(cf); return ret; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/bfile/mfile.c0000644000175000017500000004232311412332551012464 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #ifdef WIN32 #include #endif #if HAVE_UNISTD_H #include #endif #include #include #include #include #include #include #include #include #include #include "mfile.h" static int scan_areadef(MFile_area ma, const char *ad, const char *base) { /* * If no definition is given, use current directory, unlimited. */ char dirname[FILENAME_MAX+1]; mf_dir **dp = &ma->dirs, *dir = *dp; if (!ad) ad = ".:-1b"; for (;;) { const char *ad0 = ad; int i = 0, fact = 1, multi; mfile_off_t size = 0; while (*ad == ' ' || *ad == '\t') ad++; if (!*ad) break; if (!yaz_is_abspath(ad) && base) { strcpy(dirname, base); i = strlen(dirname); dirname[i++] = '/'; } while (*ad) { if (*ad == ':' && strchr("+-0123456789", ad[1])) break; if (i < FILENAME_MAX) dirname[i++] = *ad; ad++; } dirname[i] = '\0'; if (*ad++ != ':') { yaz_log(YLOG_WARN, "Missing colon after path: %s", ad0); return -1; } if (i == 0) { yaz_log(YLOG_WARN, "Empty path: %s", ad0); return -1; } while (*ad == ' ' || *ad == '\t') ad++; if (*ad == '-') { fact = -1; ad++; } else if (*ad == '+') ad++; size = 0; if (*ad < '0' || *ad > '9') { yaz_log(YLOG_FATAL, "Missing size after path: %s", ad0); return -1; } size = 0; while (*ad >= '0' && *ad <= '9') size = size*10 + (*ad++ - '0'); switch (*ad) { case 'B': case 'b': multi = 1; break; case 'K': case 'k': multi = 1024; break; case 'M': case 'm': multi = 1048576; break; case 'G': case 'g': multi = 1073741824; break; case '\0': yaz_log(YLOG_FATAL, "Missing unit: %s", ad0); return -1; default: yaz_log(YLOG_FATAL, "Illegal unit: %c in %s", *ad, ad0); return -1; } ad++; *dp = dir = (mf_dir *) xmalloc(sizeof(mf_dir)); dir->next = 0; strcpy(dir->name, dirname); dir->max_bytes = dir->avail_bytes = fact * size * multi; dp = &dir->next; } return 0; } /** \brief position within metafile (perform seek) \param mf metafile handle \param pos block position \param offset offset within block \retval 0 OK \retval -1 ERROR \retval -2 OK, but file does not created (read-only) */ static zint file_position(MFile mf, zint pos, int offset) { zint off = 0, ps; int c = mf->cur_file; if ((c > 0 && pos <= mf->files[c-1].top) || (c < mf->no_files -1 && pos > mf->files[c].top)) { c = 0; while (c + 1 < mf->no_files && mf->files[c].top < pos) { off += mf->files[c].blocks; c++; } assert(c < mf->no_files); } else off = c ? (mf->files[c-1].top + 1) : 0; if (mf->files[c].fd < 0) { if ((mf->files[c].fd = open(mf->files[c].path, mf->wr ? (O_BINARY|O_RDWR|O_CREAT) : (O_BINARY|O_RDONLY), 0666)) < 0) { if (!mf->wr && errno == ENOENT && off == 0) { /* we can't open it for reading. But not really an error */ return -2; } yaz_log(YLOG_WARN|YLOG_ERRNO, "Failed to open %s", mf->files[c].path); return -1; } } ps = pos - off; if (mfile_seek(mf->files[c].fd, ps *(mfile_off_t) mf->blocksize + offset, SEEK_SET) < 0) { yaz_log(YLOG_WARN|YLOG_ERRNO, "Failed to seek in %s", mf->files[c].path); yaz_log(YLOG_WARN, "pos=" ZINT_FORMAT " off=" ZINT_FORMAT " blocksize=%d offset=%d", pos, off, mf->blocksize, offset); return -1; } mf->cur_file = c; return ps; } static int cmp_part_file(const void *p1, const void *p2) { zint d = ((part_file *)p1)->number - ((part_file *)p2)->number; if (d > 0) return 1; if (d < 0) return -1; return 0; } MFile_area mf_init(const char *name, const char *spec, const char *base, int only_shadow_files) { MFile_area ma = (MFile_area) xmalloc(sizeof(*ma)); mf_dir *dirp; meta_file *meta_f; part_file *part_f = 0; DIR *dd; struct dirent *dent; int fd, number; char metaname[FILENAME_MAX+1], tmpnam[FILENAME_MAX+1]; yaz_log(YLOG_DEBUG, "mf_init(%s)", name); strcpy(ma->name, name); ma->mfiles = 0; ma->dirs = 0; if (scan_areadef(ma, spec, base) < 0) { yaz_log(YLOG_WARN, "Failed to access description of '%s'", name); mf_destroy(ma); return 0; } /* look at each directory */ for (dirp = ma->dirs; dirp; dirp = dirp->next) { if (!(dd = opendir(dirp->name))) { yaz_log(YLOG_WARN|YLOG_ERRNO, "Failed to open directory %s", dirp->name); mf_destroy(ma); return 0; } /* look at each file */ while ((dent = readdir(dd))) { int len = strlen(dent->d_name); const char *cp = strrchr(dent->d_name, '-'); if (strchr(".-", *dent->d_name)) continue; if (len < 5 || !cp || strcmp(dent->d_name + len - 3, ".mf")) continue; number = atoi(cp+1); memcpy(metaname, dent->d_name, cp - dent->d_name); metaname[ cp - dent->d_name] = '\0'; /* only files such as file-i-0.mf and file-i-b-0.mf, bug #739 */ if (only_shadow_files && cp[-2] != '-') continue; if (!only_shadow_files && cp[-2] == '-') continue; for (meta_f = ma->mfiles; meta_f; meta_f = meta_f->next) { /* known metafile */ if (!strcmp(meta_f->name, metaname)) { part_f = &meta_f->files[meta_f->no_files++]; break; } } /* new metafile */ if (!meta_f) { meta_f = (meta_file *) xmalloc(sizeof(*meta_f)); zebra_mutex_init(&meta_f->mutex); meta_f->ma = ma; meta_f->next = ma->mfiles; meta_f->open = 0; meta_f->cur_file = -1; ma->mfiles = meta_f; strcpy(meta_f->name, metaname); part_f = &meta_f->files[0]; meta_f->no_files = 1; } part_f->number = number; part_f->dir = dirp; part_f->fd = -1; sprintf(tmpnam, "%s/%s", dirp->name, dent->d_name); part_f->path = xstrdup(tmpnam); /* get size */ if ((fd = open(part_f->path, O_BINARY|O_RDONLY)) < 0) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "Failed to access %s", dent->d_name); closedir(dd); mf_destroy(ma); return 0; } if ((part_f->bytes = mfile_seek(fd, 0, SEEK_END)) < 0) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "Failed to seek in %s", dent->d_name); close(fd); closedir(dd); mf_destroy(ma); return 0; } close(fd); if (dirp->max_bytes >= 0) dirp->avail_bytes -= part_f->bytes; } closedir(dd); } for (meta_f = ma->mfiles; meta_f; meta_f = meta_f->next) { yaz_log(YLOG_DEBUG, "mf_init: %s consists of %d part(s)", meta_f->name, meta_f->no_files); qsort(meta_f->files, meta_f->no_files, sizeof(part_file), cmp_part_file); } return ma; } void mf_destroy(MFile_area ma) { mf_dir *dp; if (!ma) return; dp = ma->dirs; while (dp) { mf_dir *d = dp; dp = dp->next; xfree(d); } mf_reset(ma, 0); xfree(ma); } void mf_reset(MFile_area ma, int unlink_flag) { meta_file *meta_f; if (!ma) return; meta_f = ma->mfiles; while (meta_f) { int i; meta_file *m = meta_f; meta_f = meta_f->next; assert(!m->open); for (i = 0; ino_files; i++) { if (unlink_flag) unlink(m->files[i].path); xfree(m->files[i].path); } zebra_mutex_destroy(&m->mutex); xfree(m); } ma->mfiles = 0; } MFile mf_open(MFile_area ma, const char *name, int block_size, int wflag) { meta_file *mnew; int i; char tmp[FILENAME_MAX+1]; mf_dir *dp; yaz_log(YLOG_DEBUG, "mf_open(%s bs=%d, %s)", name, block_size, wflag ? "RW" : "RDONLY"); assert(ma); for (mnew = ma->mfiles; mnew; mnew = mnew->next) if (!strcmp(name, mnew->name)) { if (mnew->open) { yaz_log(YLOG_WARN, "metafile %s already open", name); return 0; } break; } if (!mnew) { mnew = (meta_file *) xmalloc(sizeof(*mnew)); strcpy(mnew->name, name); /* allocate one, empty file */ zebra_mutex_init(&mnew->mutex); mnew->no_files = 1; mnew->files[0].bytes = 0; mnew->files[0].blocks = 0; mnew->files[0].top = -1; mnew->files[0].number = 0; mnew->files[0].fd = -1; mnew->min_bytes_creat = MF_MIN_BLOCKS_CREAT * block_size; for (dp = ma->dirs; dp && dp->max_bytes >= 0 && dp->avail_bytes < mnew->min_bytes_creat; dp = dp->next); if (!dp) { yaz_log(YLOG_FATAL, "Insufficient space for file %s", name); xfree(mnew); return 0; } mnew->files[0].dir = dp; sprintf(tmp, "%s/%s-%d.mf", dp->name, mnew->name, 0); mnew->files[0].path = xstrdup(tmp); mnew->ma = ma; mnew->next = ma->mfiles; ma->mfiles = mnew; } else { for (i = 0; i < mnew->no_files; i++) { if (mnew->files[i].bytes % block_size) mnew->files[i].bytes += block_size - mnew->files[i].bytes % block_size; mnew->files[i].blocks = (int) (mnew->files[i].bytes / block_size); } assert(!mnew->open); } mnew->blocksize = block_size; mnew->min_bytes_creat = MF_MIN_BLOCKS_CREAT * block_size; mnew->wr=wflag; mnew->cur_file = 0; mnew->open = 1; for (i = 0; i < mnew->no_files; i++) { mnew->files[i].blocks = (int)(mnew->files[i].bytes / mnew->blocksize); if (i == mnew->no_files - 1) mnew->files[i].top = -1; else mnew->files[i].top = i ? (mnew->files[i-1].top + mnew->files[i].blocks) : (mnew->files[i].blocks - 1); } return mnew; } int mf_close(MFile mf) { int i; yaz_log(YLOG_DEBUG, "mf_close(%s)", mf->name); assert(mf->open); for (i = 0; i < mf->no_files; i++) { if (mf->files[i].fd >= 0) { #ifndef WIN32 if (mf->wr) fsync(mf->files[i].fd); #endif close(mf->files[i].fd); mf->files[i].fd = -1; } } mf->open = 0; return 0; } int mf_read(MFile mf, zint no, int offset, int nbytes, void *buf) { zint rd; int toread; zebra_mutex_lock(&mf->mutex); if ((rd = file_position(mf, no, offset)) < 0) { if (rd == -2) { zebra_mutex_unlock(&mf->mutex); return 0; } else { yaz_log(YLOG_FATAL, "mf_read2 %s internal error", mf->name); return -1; } } toread = nbytes ? nbytes : mf->blocksize; if ((rd = read(mf->files[mf->cur_file].fd, buf, toread)) < 0) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "mf_read2: Read failed (%s)", mf->files[mf->cur_file].path); return -1; } zebra_mutex_unlock(&mf->mutex); if (rd < toread) return 0; else return 1; } int mf_write(MFile mf, zint no, int offset, int nbytes, const void *buf) { int ret = 0; zint ps; zint nblocks; int towrite; mf_dir *dp; char tmp[FILENAME_MAX+1]; unsigned char dummych = '\xff'; zebra_mutex_lock(&mf->mutex); if ((ps = file_position(mf, no, offset)) < 0) { yaz_log(YLOG_FATAL, "mf_write: %s error (1)", mf->name); ret = -1; goto out; } /* file needs to grow */ while (ps >= mf->files[mf->cur_file].blocks) { mfile_off_t needed = (ps - mf->files[mf->cur_file].blocks + 1) * mf->blocksize; /* file overflow - allocate new file */ if (mf->files[mf->cur_file].dir->max_bytes >= 0 && needed > mf->files[mf->cur_file].dir->avail_bytes) { /* cap off file? */ if ((nblocks = (int) (mf->files[mf->cur_file].dir->avail_bytes / mf->blocksize)) > 0) { yaz_log(YLOG_DEBUG, "Capping off file %s at pos " ZINT_FORMAT, mf->files[mf->cur_file].path, nblocks); if ((ps = file_position(mf, (mf->cur_file ? mf->files[mf->cur_file-1].top : 0) + mf->files[mf->cur_file].blocks + nblocks - 1, 0)) < 0) { yaz_log(YLOG_FATAL, "mf_write: %s error (2)", mf->name); ret = -1; goto out; } yaz_log(YLOG_DEBUG, "ps = " ZINT_FORMAT, ps); if (write(mf->files[mf->cur_file].fd, &dummych, 1) < 1) { yaz_log(YLOG_ERRNO|YLOG_FATAL, "mf_write: %s error (3)", mf->name); ret = -1; goto out; } mf->files[mf->cur_file].blocks += nblocks; mf->files[mf->cur_file].bytes += nblocks * mf->blocksize; mf->files[mf->cur_file].dir->avail_bytes -= nblocks * mf->blocksize; } /* get other bit */ yaz_log(YLOG_DEBUG, "Creating new file."); for (dp = mf->ma->dirs; dp && dp->max_bytes >= 0 && dp->avail_bytes < needed; dp = dp->next); if (!dp) { yaz_log(YLOG_FATAL, "mf_write: %s error (4) no more space", mf->name); for (dp = mf->ma->dirs; dp ; dp = dp->next) { yaz_log(YLOG_FATAL,"%s: max=" ZINT_FORMAT " used=" ZINT_FORMAT " available=" ZINT_FORMAT, dp->name, (zint)dp->max_bytes, (zint)(dp->max_bytes - dp->avail_bytes), (zint)dp->avail_bytes ); } yaz_log(YLOG_FATAL,"Adjust the limits in your zebra.cfg"); ret = -1; goto out; } mf->files[mf->cur_file].top = (mf->cur_file ? mf->files[mf->cur_file-1].top : -1) + mf->files[mf->cur_file].blocks; mf->files[++(mf->cur_file)].top = -1; mf->files[mf->cur_file].dir = dp; mf->files[mf->cur_file].number = mf->files[mf->cur_file-1].number + 1; mf->files[mf->cur_file].blocks = 0; mf->files[mf->cur_file].bytes = 0; mf->files[mf->cur_file].fd = -1; sprintf(tmp, "%s/%s-" ZINT_FORMAT ".mf", dp->name, mf->name, mf->files[mf->cur_file].number); mf->files[mf->cur_file].path = xstrdup(tmp); mf->no_files++; /* open new file and position at beginning */ if ((ps = file_position(mf, no, offset)) < 0) { yaz_log(YLOG_FATAL, "mf_write: %s error (5)", mf->name); ret = -1; goto out; } } else { nblocks = ps - mf->files[mf->cur_file].blocks + 1; mf->files[mf->cur_file].blocks += nblocks; mf->files[mf->cur_file].bytes += nblocks * mf->blocksize; if (mf->files[mf->cur_file].dir->max_bytes >= 0) mf->files[mf->cur_file].dir->avail_bytes -= nblocks * mf->blocksize; } } towrite = nbytes ? nbytes : mf->blocksize; if (write(mf->files[mf->cur_file].fd, buf, towrite) < towrite) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "Write failed for file %s part %d", mf->name, mf->cur_file); ret = -1; } out: zebra_mutex_unlock(&mf->mutex); return ret; } /** \brief metafile area statistics \param ma metafile area handle \param no area number (0=first, 1=second, ..) \param directory holds directory upon completion (if non-NULL) \param used_bytes holds used bytes upon completion (if non-NULL) \param max_bytes holds max size bytes upon completion (if non-NULL) \retval 0 area number does not exist \retval 1 area number exists (and directory,used_bytes,.. are set) */ int mf_area_directory_stat(MFile_area ma, int no, const char **directory, double *used_bytes, double *max_bytes) { int i; mf_dir *d = ma->dirs; for (i = 0; d && inext) ; if (!d) return 0; if (directory) *directory = d->name; if (max_bytes) { /* possible loss of data. But it's just statistics and lies */ *max_bytes = (double) d->max_bytes; } if (used_bytes) { /* possible loss of data. But it's just statistics and lies */ *used_bytes = (double) (d->max_bytes - d->avail_bytes); } return 1; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/bfile/Makefile.in0000644000175000017500000004753111412336424013302 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = tstmfile1$(EXEEXT) tstbfile1$(EXEEXT) \ tstbfile2$(EXEEXT) subdir = bfile DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libidzebra_bfile_la_LIBADD = am_libidzebra_bfile_la_OBJECTS = bfile.lo mfile.lo cfile.lo commit.lo libidzebra_bfile_la_OBJECTS = $(am_libidzebra_bfile_la_OBJECTS) am_tstbfile1_OBJECTS = tstbfile1.$(OBJEXT) tstbfile1_OBJECTS = $(am_tstbfile1_OBJECTS) tstbfile1_LDADD = $(LDADD) am__DEPENDENCIES_1 = tstbfile1_DEPENDENCIES = libidzebra-bfile.la \ ../util/libidzebra-util.la $(am__DEPENDENCIES_1) am_tstbfile2_OBJECTS = tstbfile2.$(OBJEXT) tstbfile2_OBJECTS = $(am_tstbfile2_OBJECTS) tstbfile2_LDADD = $(LDADD) tstbfile2_DEPENDENCIES = libidzebra-bfile.la \ ../util/libidzebra-util.la $(am__DEPENDENCIES_1) am_tstmfile1_OBJECTS = tstmfile1.$(OBJEXT) tstmfile1_OBJECTS = $(am_tstmfile1_OBJECTS) tstmfile1_LDADD = $(LDADD) tstmfile1_DEPENDENCIES = libidzebra-bfile.la \ ../util/libidzebra-util.la $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libidzebra_bfile_la_SOURCES) $(tstbfile1_SOURCES) \ $(tstbfile2_SOURCES) $(tstmfile1_SOURCES) DIST_SOURCES = $(libidzebra_bfile_la_SOURCES) $(tstbfile1_SOURCES) \ $(tstbfile2_SOURCES) $(tstmfile1_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ noinst_LTLIBRARIES = libidzebra-bfile.la TESTS = $(check_PROGRAMS) tstmfile1_SOURCES = tstmfile1.c tstbfile1_SOURCES = tstbfile1.c tstbfile2_SOURCES = tstbfile2.c AM_CPPFLAGS = -I$(top_srcdir)/include $(YAZINC) libidzebra_bfile_la_SOURCES = bfile.c mfile.c cfile.c commit.c cfile.h mfile.h LDADD = libidzebra-bfile.la ../util/libidzebra-util.la $(YAZLALIB) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bfile/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bfile/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libidzebra-bfile.la: $(libidzebra_bfile_la_OBJECTS) $(libidzebra_bfile_la_DEPENDENCIES) $(LINK) $(libidzebra_bfile_la_OBJECTS) $(libidzebra_bfile_la_LIBADD) $(LIBS) clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list tstbfile1$(EXEEXT): $(tstbfile1_OBJECTS) $(tstbfile1_DEPENDENCIES) @rm -f tstbfile1$(EXEEXT) $(LINK) $(tstbfile1_OBJECTS) $(tstbfile1_LDADD) $(LIBS) tstbfile2$(EXEEXT): $(tstbfile2_OBJECTS) $(tstbfile2_DEPENDENCIES) @rm -f tstbfile2$(EXEEXT) $(LINK) $(tstbfile2_OBJECTS) $(tstbfile2_LDADD) $(LIBS) tstmfile1$(EXEEXT): $(tstmfile1_OBJECTS) $(tstmfile1_DEPENDENCIES) @rm -f tstmfile1$(EXEEXT) $(LINK) $(tstmfile1_OBJECTS) $(tstmfile1_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bfile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/commit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstbfile1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstbfile2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstmfile1.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ clean-noinstLTLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am clean-local: -rm -fr *.log *.mf shadow # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/bfile/tstmfile1.c0000644000175000017500000000312611412332551013276 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include "mfile.h" #define BLOCK_SIZE 16 void tst1(void) { MFile_area a = mf_init("main", 0 /* spec */, 0 /* base */, 0 /* only sh */); YAZ_CHECK(a); mf_destroy(a); } void tst2(void) { char buf[BLOCK_SIZE]; MFile_area a = mf_init("main", 0 /* spec */, 0 /* base */, 0 /* only sh */); MFile f; YAZ_CHECK(a); mf_reset(a, 1); f = mf_open(a, "mymfile", BLOCK_SIZE, 1); YAZ_CHECK(f); YAZ_CHECK_EQ(mf_read(f, 0, 0, 0, buf), 0); memset(buf, 'a', BLOCK_SIZE); YAZ_CHECK_EQ(mf_write(f, 0, 0, 0, buf), 0); YAZ_CHECK_EQ(mf_read(f, 0, 0, 0, buf), 1); mf_close(f); mf_destroy(a); } int main(int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); tst1(); tst2(); YAZ_CHECK_TERM; } idzebra-2.0.44/bfile/tstbfile1.c0000644000175000017500000001021611412332551013261 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include void tst1(BFiles bfs) { int version = 1; BFile bf; const char *more_info = 0; bf_reset(bfs); bf = bf_xopen(bfs, "tst", /* block size */ 32, /* wr */ 1, "tstmagic", &version, 0 /* more_info */); YAZ_CHECK(bf); if (!bf) return; bf_xclose(bf, version, "more info"); bf = bf_xopen(bfs, "tst", /* block size */ 32, /* wr */ 1, "tstmagic", &version, &more_info); YAZ_CHECK(bf); if (!bf) return; YAZ_CHECK(strcmp(more_info, "more info") == 0); bf_xclose(bf, version, 0 /* no more info */); } void tst2(BFiles bfs) { int version = 1; int bno, i; zint blocks[1000]; BFile bf; bf_reset(bfs); bf = bf_xopen(bfs, "tst", /* block size */ 32, /* wr */ 1, "tstmagic", &version, 0 /* more_info */); YAZ_CHECK(bf); if (!bf) return; bno = 0; for (i = 1; i<30; i++) { int j; for (j = 0; j= 0); YAZ_CHECK(no_in_use <= BLOCKS); if (r < 5 && (BLOCKS - no_in_use) > 0) { /* alloc phase */ int j = 0; zint tblocks[BLOCKS]; int left = BLOCKS - no_in_use; int to_alloc = 1 + (random() % left); bf_alloc(bf, to_alloc, tblocks); /* transfer from tblocks to blocks */ for (i = 0; i 0) { /* free phase */ zint tblocks[BLOCKS]; int to_free = 1 + (random() % no_in_use); int start = random() % to_free; int j = 0; for (i = 0; i= start && j < to_free) { tblocks[j-start] = blocks[i]; blocks[i] = 0; no_in_use--; } j++; } } YAZ_CHECK(tblocks[to_free-start-1]); bf_free(bf, to_free - start, tblocks); } else { bf_xclose(bf, version, 0); bf = bf_xopen(bfs, "tst", /* block size */ 32, /* wr */ 1, "tstmagic", &version, 0 /* more_info */); } } bf_xclose(bf, version, 0); } static void tst(void) { BFiles bfs = bfs_create(0, /* register: current dir, no limit */ 0 /* base: current dir */ ); YAZ_CHECK(bfs); if (!bfs) return; tst1(bfs); tst2(bfs); tst3(bfs); bf_reset(bfs); bfs_destroy(bfs); } int main(int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); YAZ_CHECK_LOG(); tst(); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dfa/0000755000175000017500000000000011412336534010756 500000000000000idzebra-2.0.44/dfa/imalloc.c0000644000175000017500000000724611412332551012466 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include "imalloc.h" #if MEMDEBUG #define MAG1 0x8fe1 #define MAG2 0x91 #define MAG3 0xee long alloc = 0L; long max_alloc = 0L; int alloc_calls = 0; int free_calls = 0; #endif void *imalloc (size_t size) { #if MEMDEBUG size_t words = (4*sizeof(unsigned) -1 + size)/sizeof(unsigned); char *p = (char *)xmalloc( words*sizeof(unsigned) ); if( !p ) yaz_log (YLOG_FATAL, "No memory: imalloc(%u); c/f %d/%d; %ld/%ld", size, alloc_calls, free_calls, alloc, max_alloc ); *((unsigned *)p) = size; ((unsigned *)p)[1] = MAG1; p += sizeof(unsigned)*2; size[(unsigned char *) p] = MAG2; size[(unsigned char *) p+1] = MAG3; if( (alloc+=size) > max_alloc ) max_alloc = alloc; ++alloc_calls; return (void *) p; #else void *p = (void *)xmalloc( size ); if( !p ) yaz_log (YLOG_FATAL, "Out of memory (imalloc)" ); return p; #endif } void *icalloc (size_t size) { #if MEMDEBUG unsigned words = (4*sizeof(unsigned) -1 + size)/sizeof(unsigned); char *p = (char *) xcalloc( words*sizeof(unsigned), 1 ); if( !p ) yaz_log (YLOG_FATAL, "No memory: icalloc(%u); c/f %d/%d; %ld/%ld", size, alloc_calls, free_calls, alloc, max_alloc ); ((unsigned *)p)[0] = size; ((unsigned *)p)[1] = MAG1; p += sizeof(unsigned)*2; size[(unsigned char *) p] = MAG2; size[(unsigned char *) p+1] = MAG3; if( (alloc+=size) > max_alloc ) max_alloc = alloc; ++alloc_calls; return (void *)p; #else void *p = (void *) xcalloc( size, 1 ); if( !p ) yaz_log (YLOG_FATAL, "Out of memory (icalloc)" ); return p; #endif } void ifree (void *p) { #if MEMDEBUG size_t size; if( !p ) return; ++free_calls; size = (-2)[(unsigned *) p]; if( (-1)[(unsigned *) p] != MAG1 ) yaz_log (YLOG_FATAL,"Internal: ifree(%u) magic 1 corrupted", size ); if( size[(unsigned char *) p] != MAG2 ) yaz_log (YLOG_FATAL,"Internal: ifree(%u) magic 2 corrupted", size ); if( (size+1)[(unsigned char *) p] != MAG3 ) yaz_log (YLOG_FATAL,"Internal: ifree(%u) magic 3 corrupted", size ); alloc -= size; if( alloc < 0L ) yaz_log (YLOG_FATAL,"Internal: ifree(%u) negative alloc.", size ); xfree( (unsigned *) p-2 ); #else xfree (p); #endif } #if MEMDEBUG void imemstat (void) { fprintf( stdout, "imalloc: calls malloc/free %d/%d, ", alloc_calls, free_calls ); if( alloc ) fprintf( stdout, "memory cur/max %ld/%ld : unreleased", alloc, max_alloc ); else fprintf( stdout, "memory max %ld", max_alloc ); fputc( '\n', stdout ); } #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dfa/grepper.c0000644000175000017500000002632111412332551012505 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include "imalloc.h" char *prog; static int show_line = 0; typedef unsigned MatchWord; #define WORD_BITS 32 typedef struct { int n; /* no of MatchWord needed */ int range; /* max no. of errors */ MatchWord *Sc; /* Mask Sc */ } MatchContext; #define INFBUF_SIZE 16384 #define INLINE static INLINE void set_bit (MatchContext *mc, MatchWord *m, int ch, int state) { int off = state & (WORD_BITS-1); int wno = state / WORD_BITS; m[mc->n * ch + wno] |= 1<n * ch + wno] &= ~(1<n * ch + wno] & (1<n = (dfa->no_states+WORD_BITS) / WORD_BITS; mc->range = range; mc->Sc = icalloc (sizeof(*mc->Sc) * 256 * mc->n); for (i=0; ino_states; i++) { int j; struct DFA_state *state = dfa->states[i]; for (j=0; jtran_no; j++) { int ch; int ch0 = state->trans[j].ch[0]; int ch1 = state->trans[j].ch[1]; assert (ch0 >= 0 && ch1 >= 0); for (ch = ch0; ch <= ch1; ch++) set_bit (mc, mc->Sc, ch, i); } } return mc; } static void mask_shift (MatchContext *mc, MatchWord *Rdst, MatchWord *Rsrc, struct DFA *dfa, int ch) { int j, s = 0; MatchWord *Rsrc_p = Rsrc, mask; Rdst[0] = 1; for (j = 1; jn; j++) Rdst[j] = 0; while (1) { mask = *Rsrc_p++; for (j = 0; jstates[s]; int i = state->tran_no; while (--i >= 0) if (ch >= state->trans[i].ch[0] && ch <= state->trans[i].ch[1]) set_bit (mc, Rdst, 0, state->trans[i].to); } if (mask & 2) { struct DFA_state *state = dfa->states[s+1]; int i = state->tran_no; while (--i >= 0) if (ch >= state->trans[i].ch[0] && ch <= state->trans[i].ch[1]) set_bit (mc, Rdst, 0, state->trans[i].to); } if (mask & 4) { struct DFA_state *state = dfa->states[s+2]; int i = state->tran_no; while (--i >= 0) if (ch >= state->trans[i].ch[0] && ch <= state->trans[i].ch[1]) set_bit (mc, Rdst, 0, state->trans[i].to); } if (mask & 8) { struct DFA_state *state = dfa->states[s+3]; int i = state->tran_no; while (--i >= 0) if (ch >= state->trans[i].ch[0] && ch <= state->trans[i].ch[1]) set_bit (mc, Rdst, 0, state->trans[i].to); } } s += 4; if (s >= dfa->no_states) return; mask >>= 4; } } } static void shift (MatchContext *mc, MatchWord *Rdst, MatchWord *Rsrc, struct DFA *dfa) { int j, s = 0; MatchWord *Rsrc_p = Rsrc, mask; for (j = 0; jn; j++) Rdst[j] = 0; while (1) { mask = *Rsrc_p++; for (j = 0; jstates[s]; int i = state->tran_no; while (--i >= 0) set_bit (mc, Rdst, 0, state->trans[i].to); } if (mask & 2) { struct DFA_state *state = dfa->states[s+1]; int i = state->tran_no; while (--i >= 0) set_bit (mc, Rdst, 0, state->trans[i].to); } if (mask & 4) { struct DFA_state *state = dfa->states[s+2]; int i = state->tran_no; while (--i >= 0) set_bit (mc, Rdst, 0, state->trans[i].to); } if (mask & 8) { struct DFA_state *state = dfa->states[s+3]; int i = state->tran_no; while (--i >= 0) set_bit (mc, Rdst, 0, state->trans[i].to); } } s += 4; if (s >= dfa->no_states) return; mask >>= 4; } } } static void or (MatchContext *mc, MatchWord *Rdst, MatchWord *Rsrc1, MatchWord *Rsrc2) { int i; for (i = 0; in; i++) Rdst[i] = Rsrc1[i] | Rsrc2[i]; } static int go (MatchContext *mc, struct DFA *dfa, FILE *inf) { MatchWord *Rj, *Rj1, *Rj_a, *Rj_b, *Rj_c; int s, d, ch; int lineno = 1; char *infbuf; int inf_ptr = 1; int no_match = 0; infbuf = imalloc (INFBUF_SIZE); infbuf[0] = '\n'; Rj = icalloc (mc->n * (mc->range+1) * sizeof(*Rj)); Rj1 = icalloc (mc->n * (mc->range+1) * sizeof(*Rj)); Rj_a = icalloc (mc->n * sizeof(*Rj)); Rj_b = icalloc (mc->n * sizeof(*Rj)); Rj_c = icalloc (mc->n * sizeof(*Rj)); set_bit (mc, Rj, 0, 0); for (d = 1; d<=mc->range; d++) { int s; memcpy (Rj + mc->n * d, Rj + mc->n * (d-1), mc->n * sizeof(*Rj)); for (s = 0; sno_states; s++) { if (get_bit (mc, Rj, d-1, s)) { struct DFA_state *state = dfa->states[s]; int i = state->tran_no; while (--i >= 0) set_bit (mc, Rj, d, state->trans[i].to); } } } while ((ch = getc (inf)) != EOF) { MatchWord *Rj_t; infbuf[inf_ptr] = ch; if (ch == '\n') { if (no_match) { int i = inf_ptr; if (show_line) printf ("%5d:", lineno); do { if (--i < 0) i = INFBUF_SIZE-1; } while (infbuf[i] != '\n'); do { if (++i == INFBUF_SIZE) i = 0; putchar (infbuf[i]); } while (infbuf[i] != '\n'); no_match = 0; } lineno++; } if (++inf_ptr == INFBUF_SIZE) inf_ptr = 0; mask_shift (mc, Rj1, Rj, dfa, ch); for (d = 1; d <= mc->range; d++) { mask_shift (mc, Rj_b, Rj+d*mc->n, dfa, ch); /* 1 */ or (mc, Rj_a, Rj+(d-1)*mc->n, Rj1+(d-1)*mc->n); /* 2,3 */ shift (mc, Rj_c, Rj_a, dfa); or (mc, Rj_a, Rj_b, Rj_c); /* 1,2,3*/ or (mc, Rj1+d*mc->n, Rj_a, Rj+(d-1)*mc->n); /* 1,2,3,4 */ } for (s = 0; sno_states; s++) { if (dfa->states[s]->rule_no) if (get_bit (mc, Rj1+mc->range*mc->n, 0, s)) no_match++; } for (d = 0; d <= mc->range; d++) reset_bit (mc, Rj1+d*mc->n, 0, dfa->no_states); Rj_t = Rj1; Rj1 = Rj; Rj = Rj_t; } ifree (Rj); ifree (Rj1); ifree (Rj_a); ifree (Rj_b); ifree (Rj_c); ifree (infbuf); return 0; } static int grep_file (struct DFA *dfa, const char *fname, int range) { FILE *inf; MatchContext *mc; if (fname) { inf = fopen (fname, "r"); if (!inf) { yaz_log (YLOG_FATAL|YLOG_ERRNO, "cannot open `%s'", fname); exit (1); } } else inf = stdin; mc = mk_MatchContext (dfa, range); go (mc, dfa, inf); if (fname) fclose (inf); return 0; } int main (int argc, char **argv) { int ret; int range = 0; char *arg; const char *pattern = NULL; int no_files = 0; struct DFA *dfa = dfa_init(); prog = argv[0]; while ((ret = options ("nr:dsv:", argv, argc, &arg)) != -2) { if (ret == 0) { if (!pattern) { int i; pattern = arg; i = dfa_parse (dfa, &pattern); if (i || *pattern) { fprintf (stderr, "%s: illegal pattern\n", prog); return 1; } dfa_mkstate (dfa); } else { no_files++; grep_file (dfa, arg, range); } } else if (ret == 'v') { yaz_log_init (yaz_log_mask_str(arg), prog, NULL); } else if (ret == 's') { dfa_verbose = 1; } else if (ret == 'd') { debug_dfa_tran = 1; debug_dfa_followpos = 1; debug_dfa_trav = 1; } else if (ret == 'r') { range = atoi (arg); } else if (ret == 'n') { show_line = 1; } else { yaz_log (YLOG_FATAL, "Unknown option '-%s'", arg); exit (1); } } if (!pattern) { fprintf (stderr, "usage:\n " " %s [-d] [-n] [-r n] [-s] [-v n] pattern file ..\n", prog); exit (1); } else if (no_files == 0) { grep_file (dfa, NULL, range); } dfa_delete (&dfa); return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dfa/dfa.c0000644000175000017500000007751411412332551011605 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include "dfap.h" #include "imalloc.h" #define CAT 16000 #define OR 16001 #define STAR 16002 #define PLUS 16003 #define EPSILON 16004 struct Tnode { union { struct Tnode *p[2]; /* CAT,OR,STAR,PLUS (left,right) */ short ch[2]; /* if ch[0] >= 0 then this Tnode represents */ /* a character in range [ch[0]..ch[1]] */ /* otherwise ch[0] represents */ /* accepting no (-acceptno) */ } u; unsigned pos : 15; /* CAT/OR/STAR/EPSILON or non-neg. position */ unsigned nullable : 1; DFASet firstpos; /* first positions */ DFASet lastpos; /* last positions */ }; struct Tblock { /* Tnode bucket (block) */ struct Tblock *next; /* pointer to next bucket */ struct Tnode *tarray; /* array of nodes in bucket */ }; #define TADD 64 #define STATE_HASH 199 #define POSET_CHUNK 100 int debug_dfa_trav = 0; int debug_dfa_tran = 0; int debug_dfa_followpos = 0; int dfa_verbose = 0; static struct Tnode *mk_Tnode (struct DFA_parse *parse_info); static struct Tnode *mk_Tnode_cset (struct DFA_parse *parse_info, BSet charset); static void term_Tnode (struct DFA_parse *parse_info); static void del_followpos (struct DFA_parse *parse_info), init_pos (struct DFA_parse *parse_info), del_pos (struct DFA_parse *parse_info), mk_dfa_tran (struct DFA_parse *parse_info, struct DFA_states *dfas), add_follow (struct DFA_parse *parse_info, DFASet lastpos, DFASet firstpos), dfa_trav (struct DFA_parse *parse_info, struct Tnode *n), init_followpos (struct DFA_parse *parse_info), pr_tran (struct DFA_parse *parse_info, struct DFA_states *dfas), pr_verbose (struct DFA_parse *parse_info, struct DFA_states *dfas), pr_followpos (struct DFA_parse *parse_info), out_char (int c), lex (struct DFA_parse *parse_info); static int nextchar (struct DFA_parse *parse_info, int *esc), read_charset (struct DFA_parse *parse_info); static const char *str_char (unsigned c); #define L_LP 1 #define L_RP 2 #define L_CHAR 3 #define L_CHARS 4 #define L_ANY 5 #define L_ALT 6 #define L_ANYZ 7 #define L_WILD 8 #define L_QUEST 9 #define L_CLOS1 10 #define L_CLOS0 11 #define L_END 12 #define L_START 13 static struct Tnode *expr_1 (struct DFA_parse *parse_info), *expr_2 (struct DFA_parse *parse_info), *expr_3 (struct DFA_parse *parse_info), *expr_4 (struct DFA_parse *parse_info); static struct Tnode *expr_1 (struct DFA_parse *parse_info) { struct Tnode *t1, *t2, *tn; if (!(t1 = expr_2 (parse_info))) return t1; while (parse_info->lookahead == L_ALT) { lex (parse_info); if (!(t2 = expr_2 (parse_info))) return t2; tn = mk_Tnode (parse_info); tn->pos = OR; tn->u.p[0] = t1; tn->u.p[1] = t2; t1 = tn; } return t1; } static struct Tnode *expr_2 (struct DFA_parse *parse_info) { struct Tnode *t1, *t2, *tn; if (!(t1 = expr_3 (parse_info))) return t1; while (parse_info->lookahead == L_WILD || parse_info->lookahead == L_ANYZ || parse_info->lookahead == L_ANY || parse_info->lookahead == L_LP || parse_info->lookahead == L_CHAR || parse_info->lookahead == L_CHARS) { if (!(t2 = expr_3 (parse_info))) return t2; tn = mk_Tnode (parse_info); tn->pos = CAT; tn->u.p[0] = t1; tn->u.p[1] = t2; t1 = tn; } return t1; } static struct Tnode *expr_3 (struct DFA_parse *parse_info) { struct Tnode *t1, *tn; if (!(t1 = expr_4 (parse_info))) return t1; if (parse_info->lookahead == L_CLOS0) { lex (parse_info); tn = mk_Tnode (parse_info); tn->pos = STAR; tn->u.p[0] = t1; t1 = tn; } else if (parse_info->lookahead == L_CLOS1) { lex (parse_info); tn = mk_Tnode (parse_info); tn->pos = PLUS; tn->u.p[0] = t1; t1 = tn; } else if (parse_info->lookahead == L_QUEST) { lex (parse_info); tn = mk_Tnode(parse_info); tn->pos = OR; tn->u.p[0] = t1; tn->u.p[1] = mk_Tnode(parse_info); tn->u.p[1]->pos = EPSILON; t1 = tn; } return t1; } static struct Tnode *expr_4 (struct DFA_parse *parse_info) { struct Tnode *t1; switch (parse_info->lookahead) { case L_LP: lex (parse_info); if (!(t1 = expr_1 (parse_info))) return t1; if (parse_info->lookahead == L_RP) lex (parse_info); else return NULL; break; case L_CHAR: t1 = mk_Tnode(parse_info); t1->pos = ++parse_info->position; t1->u.ch[1] = t1->u.ch[0] = parse_info->look_ch; lex (parse_info); break; case L_CHARS: t1 = mk_Tnode_cset (parse_info, parse_info->look_chars); lex (parse_info); break; case L_ANY: t1 = mk_Tnode_cset (parse_info, parse_info->anyset); lex (parse_info); break; case L_ANYZ: t1 = mk_Tnode(parse_info); t1->pos = OR; t1->u.p[0] = mk_Tnode_cset (parse_info, parse_info->anyset); t1->u.p[1] = mk_Tnode(parse_info); t1->u.p[1]->pos = EPSILON; lex (parse_info); break; case L_WILD: t1 = mk_Tnode(parse_info); t1->pos = STAR; t1->u.p[0] = mk_Tnode_cset (parse_info, parse_info->anyset); lex (parse_info); default: t1 = NULL; } return t1; } static void do_parse (struct DFA_parse *parse_info, const char **s, struct Tnode **tnp) { int start_anchor_flag = 0; struct Tnode *t1, *t2, *tn; parse_info->err_code = 0; parse_info->expr_ptr = * (const unsigned char **) s; parse_info->inside_string = 0; lex (parse_info); if (parse_info->lookahead == L_START) { start_anchor_flag = 1; lex (parse_info); } if (parse_info->lookahead == L_END) { t1 = mk_Tnode (parse_info); t1->pos = ++parse_info->position; t1->u.ch[1] = t1->u.ch[0] = '\n'; lex (parse_info); } else { t1 = expr_1 (parse_info); if (t1 && parse_info->lookahead == L_END) { t2 = mk_Tnode (parse_info); t2->pos = ++parse_info->position; t2->u.ch[1] = t2->u.ch[0] = '\n'; tn = mk_Tnode (parse_info); tn->pos = CAT; tn->u.p[0] = t1; tn->u.p[1] = t2; t1 = tn; lex (parse_info); } } if (t1 && parse_info->lookahead == 0) { t2 = mk_Tnode(parse_info); t2->pos = ++parse_info->position; t2->u.ch[0] = -(++parse_info->rule); t2->u.ch[1] = start_anchor_flag ? 0 : -(parse_info->rule); *tnp = mk_Tnode(parse_info); (*tnp)->pos = CAT; (*tnp)->u.p[0] = t1; (*tnp)->u.p[1] = t2; } else { if (!parse_info->err_code) { if (parse_info->lookahead == L_RP) parse_info->err_code = DFA_ERR_RP; else if (parse_info->lookahead == L_LP) parse_info->err_code = DFA_ERR_LP; else parse_info->err_code = DFA_ERR_SYNTAX; } } *s = (const char *) parse_info->expr_ptr; } static int nextchar (struct DFA_parse *parse_info, int *esc) { *esc = 0; if (*parse_info->expr_ptr == '\0') return 0; else if (*parse_info->expr_ptr != '\\') return *parse_info->expr_ptr++; *esc = 1; switch (*++parse_info->expr_ptr) { case '\r': case '\n': case '\0': return '\\'; case '\t': ++parse_info->expr_ptr; return ' '; case 'n': ++parse_info->expr_ptr; return '\n'; case 't': ++parse_info->expr_ptr; return '\t'; case 'r': ++parse_info->expr_ptr; return '\r'; case 'f': ++parse_info->expr_ptr; return '\f'; default: return *parse_info->expr_ptr++; } } static int nextchar_set (struct DFA_parse *parse_info, int *esc) { if (*parse_info->expr_ptr == ' ') { *esc = 0; return *parse_info->expr_ptr++; } return nextchar (parse_info, esc); } static int read_charset (struct DFA_parse *parse_info) { int i, ch0, esc0, cc = 0; parse_info->look_chars = mk_BSet (&parse_info->charset); res_BSet (parse_info->charset, parse_info->look_chars); ch0 = nextchar_set (parse_info, &esc0); if (!esc0 && ch0 == '^') { cc = 1; ch0 = nextchar_set (parse_info, &esc0); } /** ch0 is last met character ch1 is "next" char */ while (ch0 != 0) { int ch1, esc1; if (!esc0 && ch0 == ']') break; if (!esc0 && ch0 == '-') { ch1 = ch0; esc1 = esc0; ch0 = 1; add_BSet (parse_info->charset, parse_info->look_chars, ch0); } else { if (ch0 == 1) { ch0 = nextchar(parse_info, &esc0); } else { if (parse_info->cmap) { const char **mapto; char mapfrom[2]; const char *mcp = mapfrom; mapfrom[0] = ch0; mapto = parse_info->cmap(parse_info->cmap_data, &mcp, 1); assert (mapto); ch0 = mapto[0][0]; } } add_BSet (parse_info->charset, parse_info->look_chars, ch0); ch1 = nextchar_set (parse_info, &esc1); } if (!esc1 && ch1 == '-') { int open_range = 0; if ((ch1 = nextchar_set (parse_info, &esc1)) == 0) break; if (!esc1 && ch1 == ']') { ch1 = 255; open_range = 1; } else if (ch1 == 1) { ch1 = nextchar(parse_info, &esc1); } else if (parse_info->cmap) { const char **mapto; char mapfrom[2]; const char *mcp = mapfrom; mapfrom[0] = ch1; mapto = (*parse_info->cmap) (parse_info->cmap_data, &mcp, 1); assert (mapto); ch1 = mapto[0][0]; } for (i = ch0; ++i <= ch1;) add_BSet (parse_info->charset, parse_info->look_chars, i); if (open_range) break; ch0 = nextchar_set (parse_info, &esc0); } else { esc0 = esc1; ch0 = ch1; } } if (cc) com_BSet (parse_info->charset, parse_info->look_chars); return L_CHARS; } static int map_l_char (struct DFA_parse *parse_info) { const char **mapto; const char *cp0 = (const char *) (parse_info->expr_ptr-1); int i = 0, len = strlen(cp0); if (cp0[0] == 1 && cp0[1]) { parse_info->expr_ptr++; parse_info->look_ch = ((unsigned char *) cp0)[1]; return L_CHAR; } if (!parse_info->cmap) return L_CHAR; mapto = (*parse_info->cmap) (parse_info->cmap_data, &cp0, len); assert (mapto); parse_info->expr_ptr = (const unsigned char *) cp0; parse_info->look_ch = ((unsigned char **) mapto)[i][0]; yaz_log (YLOG_DEBUG, "map from %c to %d", parse_info->expr_ptr[-1], parse_info->look_ch); return L_CHAR; } static int lex_sub(struct DFA_parse *parse_info) { int esc; while ((parse_info->look_ch = nextchar (parse_info, &esc)) != 0) if (parse_info->look_ch == '\"') { if (esc) return map_l_char (parse_info); parse_info->inside_string = !parse_info->inside_string; } else if (esc || parse_info->inside_string) return map_l_char (parse_info); else if (parse_info->look_ch == '[') return read_charset(parse_info); else { const int *cc; for (cc = parse_info->charMap; *cc; cc += 2) if (*cc == (int) (parse_info->look_ch)) { if (!cc[1]) --parse_info->expr_ptr; return cc[1]; } return map_l_char (parse_info); } return 0; } static void lex (struct DFA_parse *parse_info) { parse_info->lookahead = lex_sub (parse_info); } static const char *str_char (unsigned c) { static char s[6]; s[0] = '\\'; if (c < 32 || c >= 127) switch (c) { case '\r': strcpy (s+1, "r"); break; case '\n': strcpy (s+1, "n"); break; case '\t': strcpy (s+1, "t"); break; default: sprintf (s+1, "x%02x", c); break; } else switch (c) { case '\"': strcpy (s+1, "\""); break; case '\'': strcpy (s+1, "\'"); break; case '\\': strcpy (s+1, "\\"); break; default: s[0] = c; s[1] = '\0'; } return s; } static void out_char (int c) { printf ("%s", str_char (c)); } static void term_Tnode (struct DFA_parse *parse_info) { struct Tblock *t, *t1; for (t = parse_info->start; (t1 = t);) { t=t->next; ifree (t1->tarray); ifree (t1); } } static struct Tnode *mk_Tnode (struct DFA_parse *parse_info) { struct Tblock *tnew; if (parse_info->use_Tnode == parse_info->max_Tnode) { tnew = (struct Tblock *) imalloc (sizeof(struct Tblock)); tnew->tarray = (struct Tnode *) imalloc (TADD*sizeof(struct Tnode)); if (!tnew->tarray) return NULL; if (parse_info->use_Tnode == 0) parse_info->start = tnew; else parse_info->end->next = tnew; parse_info->end = tnew; tnew->next = NULL; parse_info->max_Tnode += TADD; } return parse_info->end->tarray+(parse_info->use_Tnode++ % TADD); } struct Tnode *mk_Tnode_cset (struct DFA_parse *parse_info, BSet charset) { struct Tnode *tn1, *tn0 = mk_Tnode(parse_info); int ch1, ch0 = trav_BSet (parse_info->charset, charset, 0); if (ch0 == -1) tn0->pos = EPSILON; else { tn0->u.ch[0] = ch0; tn0->pos = ++parse_info->position; ch1 = travi_BSet (parse_info->charset, charset, ch0+1) ; if (ch1 == -1) tn0->u.ch[1] = parse_info->charset->size; else { tn0->u.ch[1] = ch1-1; while ((ch0=trav_BSet (parse_info->charset, charset, ch1)) != -1) { tn1 = mk_Tnode(parse_info); tn1->pos = OR; tn1->u.p[0] = tn0; tn0 = tn1; tn1 = tn0->u.p[1] = mk_Tnode(parse_info); tn1->u.ch[0] = ch0; tn1->pos = ++(parse_info->position); if ((ch1 = travi_BSet (parse_info->charset, charset, ch0+1)) == -1) { tn1->u.ch[1] = parse_info->charset->size; break; } tn1->u.ch[1] = ch1-1; } } } return tn0; } static void del_followpos (struct DFA_parse *parse_info) { ifree (parse_info->followpos); } static void init_pos (struct DFA_parse *parse_info) { parse_info->posar = (struct Tnode **) imalloc (sizeof(struct Tnode*) * (1+parse_info->position)); } static void del_pos (struct DFA_parse *parse_info) { ifree (parse_info->posar); } static void add_follow (struct DFA_parse *parse_info, DFASet lastpos, DFASet firstpos) { while (lastpos) { parse_info->followpos[lastpos->value] = union_DFASet (parse_info->poset, parse_info->followpos[lastpos->value], firstpos); lastpos = lastpos->next; } } static void dfa_trav (struct DFA_parse *parse_info, struct Tnode *n) { struct Tnode **posar = parse_info->posar; DFASetType poset = parse_info->poset; switch (n->pos) { case CAT: dfa_trav (parse_info, n->u.p[0]); dfa_trav (parse_info, n->u.p[1]); n->nullable = n->u.p[0]->nullable & n->u.p[1]->nullable; n->firstpos = mk_DFASet (poset); n->firstpos = union_DFASet (poset, n->firstpos, n->u.p[0]->firstpos); if (n->u.p[0]->nullable) n->firstpos = union_DFASet (poset, n->firstpos, n->u.p[1]->firstpos); n->lastpos = mk_DFASet (poset); n->lastpos = union_DFASet (poset, n->lastpos, n->u.p[1]->lastpos); if (n->u.p[1]->nullable) n->lastpos = union_DFASet (poset, n->lastpos, n->u.p[0]->lastpos); add_follow (parse_info, n->u.p[0]->lastpos, n->u.p[1]->firstpos); n->u.p[0]->firstpos = rm_DFASet (poset, n->u.p[0]->firstpos); n->u.p[0]->lastpos = rm_DFASet (poset, n->u.p[0]->lastpos); n->u.p[1]->firstpos = rm_DFASet (poset, n->u.p[1]->firstpos); n->u.p[1]->lastpos = rm_DFASet (poset, n->u.p[1]->lastpos); if (debug_dfa_trav) printf ("CAT"); break; case OR: dfa_trav (parse_info, n->u.p[0]); dfa_trav (parse_info, n->u.p[1]); n->nullable = n->u.p[0]->nullable | n->u.p[1]->nullable; n->firstpos = merge_DFASet (poset, n->u.p[0]->firstpos, n->u.p[1]->firstpos); n->lastpos = merge_DFASet (poset, n->u.p[0]->lastpos, n->u.p[1]->lastpos); n->u.p[0]->firstpos = rm_DFASet (poset, n->u.p[0]->firstpos); n->u.p[0]->lastpos = rm_DFASet (poset, n->u.p[0]->lastpos); n->u.p[1]->firstpos = rm_DFASet (poset, n->u.p[1]->firstpos); n->u.p[1]->lastpos = rm_DFASet (poset, n->u.p[1]->lastpos); if (debug_dfa_trav) printf ("OR"); break; case PLUS: dfa_trav (parse_info, n->u.p[0]); n->nullable = n->u.p[0]->nullable; n->firstpos = n->u.p[0]->firstpos; n->lastpos = n->u.p[0]->lastpos; add_follow (parse_info, n->lastpos, n->firstpos); if (debug_dfa_trav) printf ("PLUS"); break; case STAR: dfa_trav (parse_info, n->u.p[0]); n->nullable = 1; n->firstpos = n->u.p[0]->firstpos; n->lastpos = n->u.p[0]->lastpos; add_follow (parse_info, n->lastpos, n->firstpos); if (debug_dfa_trav) printf ("STAR"); break; case EPSILON: n->nullable = 1; n->lastpos = mk_DFASet (poset); n->firstpos = mk_DFASet (poset); if (debug_dfa_trav) printf ("EPSILON"); break; default: posar[n->pos] = n; n->nullable = 0; n->firstpos = mk_DFASet (poset); n->firstpos = add_DFASet (poset, n->firstpos, n->pos); n->lastpos = mk_DFASet (poset); n->lastpos = add_DFASet (poset, n->lastpos, n->pos); if (debug_dfa_trav) { if (n->u.ch[0] < 0) printf ("#%d (n#%d)", -n->u.ch[0], -n->u.ch[1]); else if (n->u.ch[1] > n->u.ch[0]) { putchar ('['); out_char (n->u.ch[0]); if (n->u.ch[1] > n->u.ch[0]+1) putchar ('-'); out_char (n->u.ch[1]); putchar (']'); } else out_char (n->u.ch[0]); } } if (debug_dfa_trav) { printf ("\n nullable : %c\n", n->nullable ? '1' : '0'); printf (" firstpos :"); pr_DFASet (poset, n->firstpos); printf (" lastpos :"); pr_DFASet (poset, n->lastpos); } } static void init_followpos (struct DFA_parse *parse_info) { DFASet *fa; int i; parse_info->followpos = fa = (DFASet *) imalloc (sizeof(DFASet) * (1+parse_info->position)); for (i = parse_info->position+1; --i >= 0; fa++) *fa = mk_DFASet (parse_info->poset); } static void mk_dfa_tran (struct DFA_parse *parse_info, struct DFA_states *dfas) { int i, j, c; int max_char; short *pos, *pos_i; DFASet tran_set; int char_0, char_1; struct DFA_state *dfa_from, *dfa_to; struct Tnode **posar; DFASetType poset; DFASet *followpos; assert (parse_info); posar = parse_info->posar; max_char = parse_info->charset->size; pos = (short *) imalloc (sizeof(*pos) * (parse_info->position+1)); tran_set = cp_DFASet (parse_info->poset, parse_info->root->firstpos); i = add_DFA_state (dfas, &tran_set, &dfa_from); assert (i); dfa_from->rule_no = 0; poset = parse_info->poset; followpos = parse_info->followpos; while ((dfa_from = get_DFA_state (dfas))) { pos_i = pos; j = i = 0; for (tran_set = dfa_from->set; tran_set; tran_set = tran_set->next) if ((c = posar[tran_set->value]->u.ch[0]) >= 0 && c <= max_char) *pos_i++ = tran_set->value; else if (c < 0) { if (i == 0 || c > i) i = c; c = posar[tran_set->value]->u.ch[1]; if (j == 0 || c > j) j = c; } *pos_i = -1; dfa_from->rule_no = -i; dfa_from->rule_nno = -j; for (char_1 = 0; char_1 <= max_char; char_1++) { char_0 = max_char+1; for (pos_i = pos; (i = *pos_i) != -1; ++pos_i) if (posar[i]->u.ch[1] >= char_1 && (c=posar[i]->u.ch[0]) < char_0) { if (c < char_1) char_0 = char_1; else char_0 = c; } if (char_0 > max_char) break; char_1 = max_char; tran_set = mk_DFASet (poset); for (pos_i = pos; (i = *pos_i) != -1; ++pos_i) { if ((c=posar[i]->u.ch[0]) > char_0 && c <= char_1) char_1 = c - 1; /* forward chunk */ else if ((c=posar[i]->u.ch[1]) >= char_0 && c < char_1) char_1 = c; /* backward chunk */ if (posar[i]->u.ch[1] >= char_0 && posar[i]->u.ch[0] <= char_0) tran_set = union_DFASet (poset, tran_set, followpos[i]); } if (tran_set) { add_DFA_state (dfas, &tran_set, &dfa_to); add_DFA_tran (dfas, dfa_from, char_0, char_1, dfa_to->no); } } } ifree (pos); sort_DFA_states (dfas); } static void pr_tran (struct DFA_parse *parse_info, struct DFA_states *dfas) { struct DFA_state *s; struct DFA_tran *tran; int prev_no, i, c, no; for (no=0; no < dfas->no; ++no) { s = dfas->sortarray[no]; assert (s->no == no); printf ("DFA state %d", no); if (s->rule_no) printf ("#%d", s->rule_no); if (s->rule_nno) printf (" #%d", s->rule_nno); putchar (':'); pr_DFASet (parse_info->poset, s->set); prev_no = -1; for (i=s->tran_no, tran=s->trans; --i >= 0; tran++) { if (prev_no != tran->to) { if (prev_no != -1) printf ("]\n"); printf (" goto %d on [", tran->to); prev_no = tran->to; } for (c = tran->ch[0]; c <= tran->ch[1]; c++) printf ("%s", str_char(c)); } if (prev_no != -1) printf ("]\n"); putchar ('\n'); } } static void pr_verbose (struct DFA_parse *parse_info, struct DFA_states *dfas) { long i, j; int k; printf ("%d/%d tree nodes used, %ld bytes each\n", parse_info->use_Tnode, parse_info->max_Tnode, (long) sizeof (struct Tnode)); k = inf_BSetHandle (parse_info->charset, &i, &j); printf ("%ld/%ld character sets, %ld bytes each\n", i/k, j/k, (long) k*sizeof(BSetWord)); k = inf_DFASetType (parse_info->poset, &i, &j); printf ("%ld/%ld poset items, %d bytes each\n", i, j, k); printf ("%d DFA states\n", dfas->no); } static void pr_followpos (struct DFA_parse *parse_info) { struct Tnode **posar = parse_info->posar; int i; printf ("\nfollowsets:\n"); for (i=1; i <= parse_info->position; i++) { printf ("%3d:", i); pr_DFASet (parse_info->poset, parse_info->followpos[i]); putchar ('\t'); if (posar[i]->u.ch[0] < 0) printf ("#%d", -posar[i]->u.ch[0]); else if (posar[i]->u.ch[1] > posar[i]->u.ch[0]) { putchar ('['); out_char (posar[i]->u.ch[0]); if (posar[i]->u.ch[1] > posar[i]->u.ch[0]+1) putchar ('-'); out_char (posar[i]->u.ch[1]); putchar (']'); } else out_char (posar[i]->u.ch[0]); putchar ('\n'); } putchar ('\n'); } void dfa_parse_cmap_clean (struct DFA *d) { struct DFA_parse *dfa = d->parse_info; assert (dfa); if (!dfa->charMap) { dfa->charMapSize = 7; dfa->charMap = (int *) imalloc (dfa->charMapSize * sizeof(*dfa->charMap)); } dfa->charMap[0] = 0; } void dfa_parse_cmap_new (struct DFA *d, const int *cmap) { struct DFA_parse *dfa = d->parse_info; const int *cp; int size; assert (dfa); for (cp = cmap; *cp; cp += 2) ; size = cp - cmap + 1; if (size > dfa->charMapSize) { if (dfa->charMap) ifree (dfa->charMap); dfa->charMapSize = size; dfa->charMap = (int *) imalloc (size * sizeof(*dfa->charMap)); } memcpy (dfa->charMap, cmap, size * sizeof(*dfa->charMap)); } void dfa_parse_cmap_del (struct DFA *d, int from) { struct DFA_parse *dfa = d->parse_info; int *cc; assert (dfa); for (cc = dfa->charMap; *cc; cc += 2) if (*cc == from) { while ((cc[0] = cc[2])) { cc[1] = cc[3]; cc += 2; } break; } } void dfa_parse_cmap_add (struct DFA *d, int from, int to) { struct DFA_parse *dfa = d->parse_info; int *cc; int indx, size; assert (dfa); for (cc = dfa->charMap; *cc; cc += 2) if (*cc == from) { cc[1] = to; return ; } indx = cc - dfa->charMap; size = dfa->charMapSize; if (indx >= size) { int *cn = (int *) imalloc ((size+16) * sizeof(*dfa->charMap)); memcpy (cn, dfa->charMap, indx*sizeof(*dfa->charMap)); ifree (dfa->charMap); dfa->charMap = cn; dfa->charMapSize = size+16; } dfa->charMap[indx] = from; dfa->charMap[indx+1] = to; dfa->charMap[indx+2] = 0; } void dfa_parse_cmap_thompson (struct DFA *d) { static int thompson_chars[] = { '*', L_CLOS0, '+', L_CLOS1, '|', L_ALT, '^', L_START, '$', L_END, '?', L_QUEST, '.', L_ANY, '(', L_LP, ')', L_RP, ' ', 0, '\t', 0, '\n', 0, 0 }; dfa_parse_cmap_new (d, thompson_chars); } static struct DFA_parse *dfa_parse_init (void) { struct DFA_parse *parse_info = (struct DFA_parse *) imalloc (sizeof (struct DFA_parse)); parse_info->charset = mk_BSetHandle (255, 20); parse_info->position = 0; parse_info->rule = 0; parse_info->root = NULL; /* initialize the anyset which by default does not include \n */ parse_info->anyset = mk_BSet (&parse_info->charset); res_BSet (parse_info->charset, parse_info->anyset); add_BSet (parse_info->charset, parse_info->anyset, '\n'); com_BSet (parse_info->charset, parse_info->anyset); parse_info->use_Tnode = parse_info->max_Tnode = 0; parse_info->start = parse_info->end = NULL; parse_info->charMap = NULL; parse_info->charMapSize = 0; parse_info->cmap = NULL; return parse_info; } static void rm_dfa_parse (struct DFA_parse **dfap) { struct DFA_parse *parse_info = *dfap; assert (parse_info); term_Tnode(parse_info); rm_BSetHandle (&parse_info->charset); ifree (parse_info->charMap); ifree (parse_info); *dfap = NULL; } static struct DFA_states *mk_dfas (struct DFA_parse *dfap, int poset_chunk) { struct DFA_states *dfas; struct DFA_parse *parse_info = dfap; assert (poset_chunk > 10); assert (dfap); parse_info->poset = mk_DFASetType (poset_chunk); init_pos(parse_info); init_followpos(parse_info); assert (parse_info->root); dfa_trav (parse_info, parse_info->root); if (debug_dfa_followpos) pr_followpos(parse_info); init_DFA_states (&dfas, parse_info->poset, (int) (STATE_HASH)); mk_dfa_tran (parse_info, dfas); if (debug_dfa_tran) { pr_tran (parse_info, dfas); } if (dfa_verbose) pr_verbose (parse_info, dfas); del_pos(parse_info); del_followpos(parse_info); rm_DFASetType (parse_info->poset); return dfas; } struct DFA *dfa_init (void) { struct DFA *dfa; dfa = (struct DFA *) imalloc (sizeof(*dfa)); dfa->parse_info = dfa_parse_init (); dfa->state_info = NULL; dfa->states = NULL; dfa_parse_cmap_thompson (dfa); return dfa; } void dfa_anyset_includes_nl(struct DFA *dfa) { add_BSet (dfa->parse_info->charset, dfa->parse_info->anyset, '\n'); } void dfa_set_cmap (struct DFA *dfa, void *vp, const char **(*cmap)(void *vp, const char **from, int len)) { dfa->parse_info->cmap = cmap; dfa->parse_info->cmap_data = vp; } int dfa_get_last_rule (struct DFA *dfa) { return dfa->parse_info->rule; } int dfa_parse (struct DFA *dfa, const char **pattern) { struct Tnode *top; struct DFA_parse *parse_info; assert (dfa); assert (dfa->parse_info); parse_info = dfa->parse_info; do_parse (parse_info, pattern, &top); if (parse_info->err_code) return parse_info->err_code; if ( !dfa->parse_info->root ) dfa->parse_info->root = top; else { struct Tnode *n; n = mk_Tnode (parse_info); n->pos = OR; n->u.p[0] = dfa->parse_info->root; n->u.p[1] = top; dfa->parse_info->root = n; } return 0; } void dfa_mkstate (struct DFA *dfa) { assert (dfa); dfa->state_info = mk_dfas (dfa->parse_info, POSET_CHUNK); dfa->no_states = dfa->state_info->no; dfa->states = dfa->state_info->sortarray; rm_dfa_parse (&dfa->parse_info); } void dfa_delete (struct DFA **dfap) { assert (dfap); assert (*dfap); if ((*dfap)->parse_info) rm_dfa_parse (&(*dfap)->parse_info); if ((*dfap)->state_info) rm_DFA_states (&(*dfap)->state_info); ifree (*dfap); *dfap = NULL; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dfa/states.c0000644000175000017500000001215211412332551012341 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include "dfap.h" #include "imalloc.h" #define DFA_CHUNK 40 #define TRAN_CHUNK 100 int init_DFA_states (struct DFA_states **dfasp, DFASetType st, int hash) { struct DFA_states *dfas; struct DFA_trans *tm; int i; dfas = (struct DFA_states *) imalloc (sizeof(struct DFA_states)); assert (dfas); dfas->hasharray = (struct DFA_state **) imalloc (sizeof(struct DFA_state*) * hash); assert (dfas->hasharray); *dfasp = dfas; dfas->freelist = dfas->unmarked = dfas->marked = NULL; dfas->statemem = NULL; dfas->hash = hash; dfas->st = st; dfas->no = 0; dfas->transmem = tm = (struct DFA_trans *) imalloc (sizeof(struct DFA_trans)); assert (tm); tm->next = NULL; tm->size = TRAN_CHUNK; tm->ptr = 0; tm->tran_block = (struct DFA_tran *) imalloc (sizeof(struct DFA_tran) * tm->size); assert (tm->tran_block); dfas->sortarray = NULL; for (i=0; ihash; i++) dfas->hasharray[i] = NULL; return 0; } int rm_DFA_states (struct DFA_states **dfasp) { struct DFA_states *dfas = *dfasp; DFA_stateb *sm, *sm1; struct DFA_trans *tm, *tm1; assert (dfas); if (dfas->hasharray) ifree (dfas->hasharray); ifree (dfas->sortarray); for (tm=dfas->transmem; tm; tm=tm1) { ifree (tm->tran_block); tm1 = tm->next; ifree (tm); } for (sm=dfas->statemem; sm; sm=sm1) { ifree (sm->state_block); sm1 = sm->next; ifree (sm); } ifree (dfas); *dfasp = NULL; return 0; } int add_DFA_state (struct DFA_states *dfas, DFASet *s, struct DFA_state **sp) { int i; struct DFA_state *si, **sip; DFA_stateb *sb; assert (dfas); assert (*s); assert (dfas->hasharray); sip = dfas->hasharray + (hash_DFASet (dfas->st, *s) % dfas->hash); for (si = *sip; si; si=si->link) if (eq_DFASet (dfas->st, si->set, *s)) { *sp = si; *s = rm_DFASet (dfas->st, *s); return 0; } if (!dfas->freelist) { sb = (DFA_stateb *) imalloc (sizeof(*sb)); sb->next = dfas->statemem; dfas->statemem = sb; sb->state_block = si = dfas->freelist = (struct DFA_state *) imalloc (sizeof(struct DFA_state)*DFA_CHUNK); for (i = 0; inext = si+1; si->next = NULL; } si = dfas->freelist; dfas->freelist = si->next; si->next = dfas->unmarked; dfas->unmarked = si; si->link = *sip; *sip = si; si->no = (dfas->no)++; si->tran_no = 0; si->set = *s; *s = NULL; *sp = si; return 1; } void add_DFA_tran (struct DFA_states *dfas, struct DFA_state *s, int ch0, int ch1, int to) { struct DFA_trans *tm; struct DFA_tran *t; tm = dfas->transmem; if (tm->ptr == tm->size) { tm = (struct DFA_trans *) imalloc (sizeof(struct DFA_trans)); assert (tm); tm->next = dfas->transmem; dfas->transmem = tm; tm->size = s->tran_no >= TRAN_CHUNK ? s->tran_no+8 : TRAN_CHUNK; tm->tran_block = (struct DFA_tran *) imalloc (sizeof(struct DFA_tran) * tm->size); assert (tm->tran_block); if (s->tran_no) memcpy (tm->tran_block, s->trans, s->tran_no*sizeof (struct DFA_tran)); tm->ptr = s->tran_no; s->trans = tm->tran_block; } s->tran_no++; t = tm->tran_block + tm->ptr++; t->ch[0] = ch0; t->ch[1] = ch1; t->to = to; } struct DFA_state *get_DFA_state (struct DFA_states *dfas) { struct DFA_state *si; assert (dfas); if (!(si = dfas->unmarked)) return NULL; dfas->unmarked = si->next; si->next = dfas->marked; dfas->marked = si; si->trans = dfas->transmem->tran_block + dfas->transmem->ptr; return si; } void sort_DFA_states (struct DFA_states *dfas) { struct DFA_state *s; assert (dfas); dfas->sortarray = (struct DFA_state **) imalloc (sizeof(struct DFA_state *)*dfas->no); for (s = dfas->marked; s; s=s->next) dfas->sortarray[s->no] = s; ifree (dfas->hasharray); dfas->hasharray = NULL; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dfa/dfap.h0000644000175000017500000000611111412332551011753 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef DFAP_H #define DFAP_H #include #ifdef __cplusplus extern "C" { #endif struct DFA_parse { struct Tnode *root; /* root of regular syntax tree */ int position; /* no of positions so far */ int rule; /* no of rules so far */ BSetHandle *charset; /* character set type */ BSet anyset; /* character recognized by `.' */ int use_Tnode; /* used Tnodes */ int max_Tnode; /* allocated Tnodes */ struct Tblock *start; /* start block of Tnodes */ struct Tblock *end; /* end block of Tnodes */ int *charMap; int charMapSize; void *cmap_data; unsigned look_ch; int lookahead; BSet look_chars; int err_code; int inside_string; const unsigned char *expr_ptr; struct Tnode **posar; DFASetType poset; DFASet *followpos; const char **(*cmap)(void *vp, const char **from, int len); }; typedef struct DFA_stateb_ { struct DFA_stateb_ *next; struct DFA_state *state_block; } DFA_stateb; struct DFA_states { struct DFA_state *freelist; /* chain of unused (but allocated) states */ struct DFA_state *unmarked; /* chain of unmarked DFA states */ struct DFA_state *marked; /* chain of marked DFA states */ DFA_stateb *statemem; /* state memory */ int no; /* no of states (unmarked+marked) */ DFASetType st; /* Position set type */ int hash; /* no hash entries in hasharray */ struct DFA_state **hasharray; /* hash pointers */ struct DFA_state **sortarray; /* sorted DFA states */ struct DFA_trans *transmem; /* transition memory */ }; int init_DFA_states (struct DFA_states **dfasp, DFASetType st, int hash); int rm_DFA_states (struct DFA_states **dfasp); int add_DFA_state (struct DFA_states *dfas, DFASet *s, struct DFA_state **sp); struct DFA_state *get_DFA_state (struct DFA_states *dfas); void sort_DFA_states (struct DFA_states *dfas); void add_DFA_tran (struct DFA_states *, struct DFA_state *, int, int, int); #ifdef __cplusplus } #endif #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dfa/imalloc.h0000644000175000017500000000225211412332551012463 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef __cplusplus extern "C" { #endif void *imalloc (size_t); void *icalloc (size_t); void ifree (void *); #if MEMDEBUG void imemstat (void); extern long alloc; extern long max_alloc; extern int alloc_calls; extern int free_calls; #endif #ifdef __cplusplus } #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dfa/bset.c0000644000175000017500000001371011412332551011774 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include "imalloc.h" #define GET_BIT(s,m) (s[(m)/(sizeof(BSetWord)*8)]&(1<<(m&(sizeof(BSetWord)*8-1)))) #define SET_BIT(s,m) (s[(m)/(sizeof(BSetWord)*8)]|=(1<<(m&(sizeof(BSetWord)*8-1)))) BSetHandle *mk_BSetHandle (int size, int chunk) { int wsize = 1+size/(sizeof(BSetWord)*8); BSetHandle *sh; if (chunk <= 1) chunk = 32; sh = (BSetHandle *) imalloc (sizeof(BSetHandle) + chunk*sizeof(BSetWord)*wsize); sh->size = size; sh->wsize = wsize; sh->chunk = chunk * wsize; sh->offset = 0; sh->setchain = NULL; return sh; } void rm_BSetHandle (BSetHandle **shp) { BSetHandle *sh, *sh1; assert (shp); sh = *shp; assert (sh); while (sh) { sh1 = sh->setchain; ifree (sh); sh = sh1; } } int inf_BSetHandle (BSetHandle *sh, long *used, long *allocated) { int wsize; assert (sh); *used = 0; *allocated = 0; wsize = sh->wsize; do { *used += sh->offset; *allocated += sh->chunk; } while ((sh = sh->setchain)); return wsize; } BSet mk_BSet (BSetHandle **shp) { BSetHandle *sh, *sh1; unsigned off; assert (shp); sh = *shp; assert (sh); off = sh->offset; if ((off + sh->wsize) > sh->chunk) { sh1 = (BSetHandle *) imalloc (sizeof(BSetHandle) + sh->chunk*sizeof(BSetWord)); sh1->size = sh->size; sh1->wsize = sh->wsize; sh1->chunk = sh->chunk; off = sh1->offset = 0; sh1->setchain = sh; sh = *shp = sh1; } sh->offset = off + sh->wsize; return sh->setarray + off; } void add_BSet (BSetHandle *sh, BSet dst, unsigned member) { assert (dst); assert (sh); assert (member <= sh->size); SET_BIT(dst, member); } unsigned test_BSet (BSetHandle *sh, BSet src, unsigned member) { assert (src); assert (sh); assert (member <= sh->size); return GET_BIT (src , member) != 0; } BSet cp_BSet (BSetHandle *sh, BSet dst, BSet src) { assert (sh); assert (dst); assert (src); memcpy (dst, src, sh->wsize * sizeof(BSetWord)); return dst; } void res_BSet (BSetHandle *sh, BSet dst) { assert (dst); memset (dst, 0, sh->wsize * sizeof(BSetWord)); } void union_BSet (BSetHandle *sh, BSet dst, BSet src) { int i; assert (sh); assert (dst); assert (src); for (i=sh->wsize; --i >= 0;) *dst++ |= *src++; } unsigned hash_BSet (BSetHandle *sh, BSet src) { int i; unsigned s = 0; assert (sh); assert (src); for (i=sh->wsize; --i >= 0;) s += *src++; return s; } void com_BSet (BSetHandle *sh, BSet dst) { int i; assert (sh); assert (dst); for (i=sh->wsize; --i >= 0; dst++) *dst = ~*dst; } int eq_BSet (BSetHandle *sh, BSet dst, BSet src) { int i; assert (sh); assert (dst); assert (src); for (i=sh->wsize; --i >= 0;) if (*dst++ != *src++) return 0; return 1; } int trav_BSet (BSetHandle *sh, BSet src, unsigned member) { int i = sh->size - member; BSetWord *sw = src+member/(sizeof(BSetWord)*8); unsigned b = member & (sizeof(BSetWord)*8-1); while(i >= 0) if (b == 0 && *sw == 0) { member += sizeof(BSetWord)*8; ++sw; i -= sizeof(BSetWord)*8; } else if (*sw & (1<size - member; BSetWord *sw = src+member/(sizeof(BSetWord)*8); unsigned b = member & (sizeof(BSetWord)*8-1); while(i >= 0) if (b == 0 && *sw == (BSetWord) ~ 0) { member += sizeof(BSetWord)*8; ++sw; i -= sizeof(BSetWord)*8; } else if ((*sw & (1< #include #include #include #include #include "imalloc.h" static DFASet mk_DFASetElement (DFASetType st, int n); DFASetType mk_DFASetType (int chunk) { DFASetType st; assert (chunk > 8 && chunk < 8000); st = (DFASetType) imalloc (sizeof(*st)); assert (st); st->alloclist = st->freelist = NULL; st->used = 0; st->chunk = chunk; return st; } int inf_DFASetType (DFASetType st, long *used, long *allocated) { DFASet s; assert (st); *used = st->used; *allocated = 0; for (s = st->alloclist; s; s = s->next) *allocated += st->chunk; return sizeof (DFASetElement); } DFASetType rm_DFASetType (DFASetType st) { DFASet s, s1; for (s = st->alloclist; (s1 = s);) { s = s->next; ifree (s1); } ifree (st); return NULL; } DFASet mk_DFASet (DFASetType st) { assert (st); return NULL; } static DFASet mk_DFASetElement (DFASetType st, int n) { DFASet s; int i; assert (st); assert (st->chunk > 8); if (! st->freelist) { s = (DFASet) imalloc (sizeof(*s) * (1+st->chunk)); assert (s); s->next = st->alloclist; st->alloclist = s; st->freelist = ++s; for (i=st->chunk; --i > 0; s++) s->next = s+1; s->next = NULL; } st->used++; s = st->freelist; st->freelist = s->next; s->value = n; return s; } #if 0 static void rm_DFASetElement (DFASetType st, DFASetElement *p) { assert (st); assert (st->used > 0); p->next = st->freelist; st->freelist = p; st->used--; } #endif DFASet rm_DFASet (DFASetType st, DFASet s) { DFASet s1 = s; int i = 1; if (s) { while (s->next) { s = s->next; ++i; } s->next = st->freelist; st->freelist = s1; st->used -= i; assert (st->used >= 0); } return NULL; } DFASet add_DFASet (DFASetType st, DFASet s, int n) { DFASetElement dummy; DFASet p = &dummy, snew; p->next = s; while (p->next && p->next->value < n) p = p->next; assert (p); if (!(p->next && p->next->value == n)) { snew = mk_DFASetElement (st, n); snew->next = p->next; p->next = snew; } return dummy.next; } DFASet union_DFASet (DFASetType st, DFASet s1, DFASet s2) { DFASetElement dummy; DFASet p; assert (st); for (p = &dummy; s1 && s2;) if (s1->value < s2->value) { p = p->next = s1; s1 = s1->next; } else if (s1->value > s2->value) { p = p->next = mk_DFASetElement (st, s2->value); s2 = s2->next; } else { p = p->next = s1; s1 = s1->next; s2 = s2->next; } if (s1) p->next = s1; else { while (s2) { p = p->next = mk_DFASetElement (st, s2->value); s2 = s2->next; } p->next = NULL; } return dummy.next; } DFASet cp_DFASet (DFASetType st, DFASet s) { return merge_DFASet (st, s, NULL); } DFASet merge_DFASet (DFASetType st, DFASet s1, DFASet s2) { DFASetElement dummy; DFASet p; assert (st); for (p = &dummy; s1 && s2; p = p->next) if (s1->value < s2->value) { p->next = mk_DFASetElement (st, s1->value); s1 = s1->next; } else if (s1->value > s2->value) { p->next = mk_DFASetElement (st, s2->value); s2 = s2->next; } else { p->next = mk_DFASetElement (st, s1->value); s1 = s1->next; s2 = s2->next; } if (!s1) s1 = s2; while (s1) { p = p->next = mk_DFASetElement (st, s1->value); s1 = s1->next; } p->next = NULL; return dummy.next; } void pr_DFASet (DFASetType st, DFASet s) { assert (st); while (s) { printf (" %d", s->value); s = s->next; } putchar ('\n'); } unsigned hash_DFASet (DFASetType st, DFASet s) { unsigned n = 0; while (s) { n += 11*s->value; s = s->next; } return n; } int eq_DFASet (DFASetType st, DFASet s1, DFASet s2) { for (; s1 && s2; s1=s1->next, s2=s2->next) if (s1->value != s2->value) return 0; return s1 == s2; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dfa/Makefile.am0000644000175000017500000000075111412332551012730 00000000000000 noinst_LTLIBRARIES = libidzebra-dfa.la noinst_PROGRAMS = agrep lexer grepper check_PROGRAMS = test_dfa TESTS = $(check_PROGRAMS) test_dfa_SOURCES = test_dfa.c AM_CPPFLAGS = -I$(srcdir)/../include $(YAZINC) LDADD = libidzebra-dfa.la ../util/libidzebra-util.la $(YAZLALIB) agrep_SOURCES = agrep.c lexer_SOURCES = lexer.c readfile.c grepper_SOURCES = grepper.c libidzebra_dfa_la_SOURCES = dfa.c imalloc.c states.c set.c bset.c \ dfap.h imalloc.h lexer.h clean-local: -rm -f *.log idzebra-2.0.44/dfa/lexer.h0000644000175000017500000000207611412332551012166 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef __cplusplus extern "C" { #endif int read_file ( const char *, struct DFA * ); void error ( const char *, ... ); extern int ccluse; #ifdef __cplusplus } #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dfa/agrep.c0000644000175000017500000001620411412332551012136 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #ifdef WIN32 #include #endif #if HAVE_UNISTD_H #include #endif #include #include #include "imalloc.h" #ifndef O_BINARY #define O_BINARY 0 #endif static char *prog; void error (const char *format, ...) { va_list argptr; va_start (argptr, format); fprintf (stderr, "%s error: ", prog); (void) vfprintf (stderr, format, argptr); putc ('\n', stderr); exit (1); } static int show_lines = 0; int agrep_options (int argc, char **argv) { while (--argc > 0) if (**++argv == '-') while (*++*argv) { switch (**argv) { case 'V': fprintf (stderr, "%s: %s %s\n", prog, __DATE__, __TIME__); continue; case 'v': dfa_verbose = 1; continue; case 'n': show_lines = 1; continue; case 'd': switch (*++*argv) { case 's': debug_dfa_tran = 1; break; case 't': debug_dfa_trav = 1; break; case 'f': debug_dfa_followpos = 1; break; default: --*argv; debug_dfa_tran = 1; debug_dfa_followpos = 1; debug_dfa_trav = 1; } continue; default: fprintf (stderr, "%s: unknown option `-%s'\n", prog, *argv); return 1; } break; } return 0; } #define INF_BUF_SIZE 32768U static char *inf_buf; static char *inf_ptr, *inf_flsh; static int inf_eof, line_no; static int inf_flush (int fd) { char *p; unsigned b, r; r = (unsigned) (inf_buf+INF_BUF_SIZE - inf_ptr); /* no of `wrap' bytes */ if (r) memcpy (inf_buf, inf_ptr, r); inf_ptr = p = inf_buf + r; b = INF_BUF_SIZE - r; do if ((r = read (fd, p, b)) == (unsigned) -1) return -1; else if (r) p += r; else { *p++ = '\n'; inf_eof = 1; break; } while ((b -= r) > 0); while (p != inf_buf && *--p != '\n') ; while (p != inf_buf && *--p != '\n') ; inf_flsh = p+1; return 0; } static char *prline (char *p) { char *p0; --p; while (p != inf_buf && p[-1] != '\n') --p; p0 = p; while (*p++ != '\n') ; p[-1] = '\0'; if (show_lines) printf ("%5d:\t%s\n", line_no, p0); else puts (p0); p[-1] = '\n'; return p; } static int go (int fd, struct DFA_state **dfaar) { struct DFA_state *s = dfaar[0]; struct DFA_tran *t; char *p; int i; unsigned char c; int start_line = 1; while (1) { for (c = *inf_ptr++, t=s->trans, i=s->tran_no; --i >= 0; t++) if (c >= t->ch[0] && c <= t->ch[1]) { p = inf_ptr; do { if ((s = dfaar[t->to])->rule_no && (start_line || s->rule_nno)) { inf_ptr = prline (inf_ptr); c = '\n'; break; } for (t=s->trans, i=s->tran_no; --i >= 0; t++) if ((unsigned) *p >= t->ch[0] && (unsigned) *p <= t->ch[1]) break; p++; } while (i >= 0); s = dfaar[0]; break; } if (c == '\n') { start_line = 1; ++line_no; if (inf_ptr == inf_flsh) { if (inf_eof) break; ++line_no; if (inf_flush (fd)) { fprintf (stderr, "%s: read error\n", prog); return -1; } } } else start_line = 0; } return 0; } int agrep (struct DFA_state **dfas, int fd) { inf_buf = imalloc (sizeof(char)*INF_BUF_SIZE); inf_eof = 0; inf_ptr = inf_buf+INF_BUF_SIZE; inf_flush (fd); line_no = 1; go (fd, dfas); ifree (inf_buf); return 0; } int main (int argc, char **argv) { const char *pattern = NULL; char outbuf[BUFSIZ]; int fd, i, no = 0; struct DFA *dfa = dfa_init(); prog = *argv; if (argc < 2) { fprintf (stderr, "usage: agrep [options] pattern file..\n"); fprintf (stderr, " -v dfa verbose\n"); fprintf (stderr, " -n show lines\n"); fprintf (stderr, " -d debug\n"); fprintf (stderr, " -V show version\n"); exit (1); } setbuf (stdout, outbuf); i = agrep_options (argc, argv); if (i) return i; while (--argc > 0) if (**++argv != '-' && **argv) { if (!pattern) { pattern = *argv; i = dfa_parse (dfa, &pattern); if (i || *pattern) { fprintf (stderr, "%s: illegal pattern\n", prog); return 1; } dfa_mkstate (dfa); } else { ++no; fd = open (*argv, O_RDONLY | O_BINARY); if (fd == -1) { fprintf (stderr, "%s: couldn't open `%s'\n", prog, *argv); return 1; } i = agrep (dfa->states, fd); close (fd); if (i) return i; } } if (!no) { fprintf (stderr, "usage:\n " " %s [-d] [-v] [-n] [-f] pattern file ..\n", prog); return 2; } fflush(stdout); dfa_delete (&dfa); return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dfa/Makefile.in0000644000175000017500000005125511412336424012751 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = agrep$(EXEEXT) lexer$(EXEEXT) grepper$(EXEEXT) check_PROGRAMS = test_dfa$(EXEEXT) subdir = dfa DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libidzebra_dfa_la_LIBADD = am_libidzebra_dfa_la_OBJECTS = dfa.lo imalloc.lo states.lo set.lo \ bset.lo libidzebra_dfa_la_OBJECTS = $(am_libidzebra_dfa_la_OBJECTS) PROGRAMS = $(noinst_PROGRAMS) am_agrep_OBJECTS = agrep.$(OBJEXT) agrep_OBJECTS = $(am_agrep_OBJECTS) agrep_LDADD = $(LDADD) am__DEPENDENCIES_1 = agrep_DEPENDENCIES = libidzebra-dfa.la ../util/libidzebra-util.la \ $(am__DEPENDENCIES_1) am_grepper_OBJECTS = grepper.$(OBJEXT) grepper_OBJECTS = $(am_grepper_OBJECTS) grepper_LDADD = $(LDADD) grepper_DEPENDENCIES = libidzebra-dfa.la ../util/libidzebra-util.la \ $(am__DEPENDENCIES_1) am_lexer_OBJECTS = lexer.$(OBJEXT) readfile.$(OBJEXT) lexer_OBJECTS = $(am_lexer_OBJECTS) lexer_LDADD = $(LDADD) lexer_DEPENDENCIES = libidzebra-dfa.la ../util/libidzebra-util.la \ $(am__DEPENDENCIES_1) am_test_dfa_OBJECTS = test_dfa.$(OBJEXT) test_dfa_OBJECTS = $(am_test_dfa_OBJECTS) test_dfa_LDADD = $(LDADD) test_dfa_DEPENDENCIES = libidzebra-dfa.la ../util/libidzebra-util.la \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libidzebra_dfa_la_SOURCES) $(agrep_SOURCES) \ $(grepper_SOURCES) $(lexer_SOURCES) $(test_dfa_SOURCES) DIST_SOURCES = $(libidzebra_dfa_la_SOURCES) $(agrep_SOURCES) \ $(grepper_SOURCES) $(lexer_SOURCES) $(test_dfa_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ noinst_LTLIBRARIES = libidzebra-dfa.la TESTS = $(check_PROGRAMS) test_dfa_SOURCES = test_dfa.c AM_CPPFLAGS = -I$(srcdir)/../include $(YAZINC) LDADD = libidzebra-dfa.la ../util/libidzebra-util.la $(YAZLALIB) agrep_SOURCES = agrep.c lexer_SOURCES = lexer.c readfile.c grepper_SOURCES = grepper.c libidzebra_dfa_la_SOURCES = dfa.c imalloc.c states.c set.c bset.c \ dfap.h imalloc.h lexer.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu dfa/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu dfa/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libidzebra-dfa.la: $(libidzebra_dfa_la_OBJECTS) $(libidzebra_dfa_la_DEPENDENCIES) $(LINK) $(libidzebra_dfa_la_OBJECTS) $(libidzebra_dfa_la_LIBADD) $(LIBS) clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list agrep$(EXEEXT): $(agrep_OBJECTS) $(agrep_DEPENDENCIES) @rm -f agrep$(EXEEXT) $(LINK) $(agrep_OBJECTS) $(agrep_LDADD) $(LIBS) grepper$(EXEEXT): $(grepper_OBJECTS) $(grepper_DEPENDENCIES) @rm -f grepper$(EXEEXT) $(LINK) $(grepper_OBJECTS) $(grepper_LDADD) $(LIBS) lexer$(EXEEXT): $(lexer_OBJECTS) $(lexer_DEPENDENCIES) @rm -f lexer$(EXEEXT) $(LINK) $(lexer_OBJECTS) $(lexer_LDADD) $(LIBS) test_dfa$(EXEEXT): $(test_dfa_OBJECTS) $(test_dfa_DEPENDENCIES) @rm -f test_dfa$(EXEEXT) $(LINK) $(test_dfa_OBJECTS) $(test_dfa_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agrep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grepper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imalloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lexer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readfile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/states.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_dfa.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ clean-noinstLTLIBRARIES clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am clean-local: -rm -f *.log # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/dfa/test_dfa.c0000644000175000017500000000337411412332551012635 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include int test_parse(struct DFA *dfa, const char *pattern) { int i; const char *cp = pattern; i = dfa_parse(dfa, &cp); return i; } static void tst(int argc, char **argv) { struct DFA *dfa = dfa_init(); YAZ_CHECK(dfa); YAZ_CHECK_EQ(test_parse(dfa, ""), 1); YAZ_CHECK_EQ(test_parse(dfa, "a"), 0); YAZ_CHECK_EQ(test_parse(dfa, "ab"), 0); YAZ_CHECK_EQ(test_parse(dfa, "(a)"), 0); YAZ_CHECK_EQ(test_parse(dfa, "(a"), 1); YAZ_CHECK_EQ(test_parse(dfa, "a)"), 3); YAZ_CHECK_EQ(test_parse(dfa, "a\001)"), 0); YAZ_CHECK_EQ(test_parse(dfa, "a\\x01"), 0); YAZ_CHECK_EQ(test_parse(dfa, "(\x01\x02)(CEO3EQC/\\x01\\x0C\\x01\\x0C)"), 0); dfa_delete(&dfa); YAZ_CHECK(!dfa); } int main(int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); YAZ_CHECK_LOG(); tst(argc, argv); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dfa/lexer.c0000644000175000017500000000667011412332551012165 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include "imalloc.h" #include "lexer.h" static char *prog; void error (const char *format, ...) { va_list argptr; va_start (argptr, format); fprintf (stderr, "%s error: ", prog); (void) vfprintf (stderr, format, argptr); putc ('\n', stderr); exit (1); } int ccluse = 0; static int lexer_options (int argc, char **argv) { while (--argc > 0) if (**++argv == '-') while (*++*argv) { switch (**argv) { case 'V': fprintf (stderr, "%s: %s %s\n", prog, __DATE__, __TIME__); continue; case 's': dfa_verbose = 1; continue; case 'c': ccluse = 1; continue; case 'd': switch (*++*argv) { case 's': debug_dfa_tran = 1; break; case 't': debug_dfa_trav = 1; break; case 'f': debug_dfa_followpos = 1; break; default: --*argv; debug_dfa_tran = 1; debug_dfa_followpos = 1; debug_dfa_trav = 1; } continue; default: fprintf (stderr, "%s: unknown option `-%s'\n", prog, *argv); return 1; } break; } return 0; } int main (int argc, char **argv) { int i, no = 0; struct DFA *dfa; prog = *argv; dfa = dfa_init (); i = lexer_options (argc, argv); if (i) return i; if (argc < 2) { fprintf (stderr, "usage\n %s [-c] [-V] [-s] [-t] [-d[stf]] file\n", prog); return 1; } else while (--argc > 0) if (**++argv != '-' && **argv) { ++no; i = read_file (*argv, dfa); if (i) return i; dfa_mkstate (dfa); #if MEMDEBUG imemstat(); #endif } dfa_delete (&dfa); #if MEMDEBUG imemstat(); #endif if (!no) { fprintf (stderr, "%s: no files specified\n", prog); return 2; } return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/dfa/readfile.c0000644000175000017500000000742611412332551012621 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include "lexer.h" #define MAXLINE 512 static FILE *inf; static FILE *outf; static const char *inf_name; static int line_no; static int err_no; static void prep (char **s), read_defs (void), read_rules (struct DFA *dfap), read_tail (void); static char *read_line (void); static void prep (char **s) { static char expr_buf[MAXLINE+1]; char *dst = expr_buf; const char *src = *s; int c; while ((c = *src++)) *dst++ = c; *dst = '\0'; *s = expr_buf; } static char *read_line (void) { static char linebuf[MAXLINE+1]; ++line_no; return fgets (linebuf, MAXLINE, inf); } static void read_defs (void) { const char *s; while ((s=read_line())) { if (*s == '%' && s[1] == '%') return; else if (*s == '\0' || isspace (*s)) fputs (s, outf); } error ("missing rule section"); } static void read_rules (struct DFA *dfa) { char *s; const char *sc; int i; int no = 0; fputs ("\n#ifndef YY_BREAK\n#define YY_BREAK break;\n#endif\n", outf); fputs ("void lexact (int no)\n{\n", outf); fputs ( "\tswitch (no)\n\t{\n", outf); while ((s=read_line())) { if (*s == '%' && s[1] == '%') break; else if (*s == '\0' || isspace (*s)) /* copy rest of line to output */ fputs (s, outf); else { /* preprocess regular expression */ prep (&s); /* now parse regular expression */ sc = s; i = dfa_parse (dfa, &sc); if (i) { fprintf (stderr, "%s #%d: regular expression syntax error\n", inf_name, line_no); assert (0); err_no++; } else { if (no) fputs ("\t\tYY_BREAK\n", outf); no++; fprintf (outf, "\tcase %d:\n#line %d\n\t\t", no, line_no); } while (*sc == '\t' || *sc == ' ') sc++; fputs (sc, outf); } } fputs ("\tYY_BREAK\n\t}\n}\n", outf); if (!no) error ("no regular expressions in rule section"); } static void read_tail (void) { const char *s; while ((s=read_line())) fputs (s, outf); } int read_file (const char *s, struct DFA *dfa) { inf_name = s; if (!(inf=fopen (s,"r"))) { error ("cannot open `%s'", s); return -1; } if (!(outf=fopen ("lex.yy.c", "w"))) { error ("cannot open `%s'", "lex.yy.c"); return -2; } line_no = 0; err_no = 0; read_defs (); read_rules (dfa); read_tail (); fclose (outf); fclose (inf); return err_no; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/README0000644000175000017500000000221311412332551011015 00000000000000Zebra server, Copyright (c) 1994-2010, Index Data ApS Introduction ------------ Zebra is a high-performance, general-purpose structured text indexing and retrieval engine. It reads structured records in a variety of input formats (eg. email, XML, MARC) and allows access to them through exact boolean search expressions and relevance-ranked free-text queries. Documentation ------------- You'll find documentation in subdirectory 'doc' in various formats (HTML, Docbook XML). You can also browse the documentation from the zebra home page. Installation ------------ Install YAZ. Optional external packages: Tcl, iconv, EXPAT, libxml2 and libxslt1. Quick compile and install: ./configure make make install For detailed instructions and Windows installation refer to the documentation. License ------- Zebra is covered by the GNU GPL v2. See LICENSE.zebra. Support ------ To get more information or assistance, send mail to info@indexdata.dk We maintain a mailing-list for the purpose of announcing new versions of the software, bug-reports, discussion etc. You can sign up at the URL http://lists.indexdata.dk/cgi-bin/mailman/listinfo/zebralist idzebra-2.0.44/index/0000755000175000017500000000000011412336534011333 500000000000000idzebra-2.0.44/index/recgrs.c0000644000175000017500000011235611412332551012707 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #define GRS_MAX_WORD 512 struct source_parser { int len; const char *tok; const char *src; int lookahead; NMEM nmem; }; static int sp_lex(struct source_parser *sp) { while (*sp->src == ' ') (sp->src)++; sp->tok = sp->src; sp->len = 0; while (*sp->src && !strchr("<>();,-: ", *sp->src)) { sp->src++; sp->len++; } if (sp->len) sp->lookahead = 't'; else { sp->lookahead = *sp->src; if (*sp->src) sp->src++; } return sp->lookahead; } static int sp_expr(struct source_parser *sp, data1_node *n, RecWord *wrd); static int sp_range(struct source_parser *sp, data1_node *n, RecWord *wrd) { int start, len; RecWord tmp_w; /* ( */ sp_lex(sp); if (sp->lookahead != '(') return 0; sp_lex(sp); /* skip ( */ /* 1st arg: string */ if (!sp_expr(sp, n, wrd)) return 0; if (sp->lookahead != ',') return 0; sp_lex(sp); /* skip , */ /* 2nd arg: start */ if (!sp_expr(sp, n, &tmp_w)) return 0; start = atoi_n(tmp_w.term_buf, tmp_w.term_len); if (sp->lookahead == ',') { sp_lex(sp); /* skip , */ /* 3rd arg: length */ if (!sp_expr(sp, n, &tmp_w)) return 0; len = atoi_n(tmp_w.term_buf, tmp_w.term_len); } else len = wrd->term_len; /* ) */ if (sp->lookahead != ')') return 0; sp_lex(sp); if (wrd->term_buf) { if (start >= wrd->term_len) wrd->term_len = 0; else { wrd->term_len -= start; wrd->term_buf += start; if (wrd->term_len > len) wrd->term_len = len; } } return 1; } static int sp_first(struct source_parser *sp, data1_node *n, RecWord *wrd) { char num_str[20]; int min_pos = -1; sp_lex(sp); if (sp->lookahead != '(') return 0; sp_lex(sp); /* skip ( */ if (!sp_expr(sp, n, wrd)) return 0; while (sp->lookahead == ',') { RecWord search_w; int i; sp_lex(sp); /* skip , */ if (!sp_expr(sp, n, &search_w)) return 0; for (i = 0; iterm_len; i++) { int j; for (j = 0; jterm_len; j++) if (wrd->term_buf[i+j] != search_w.term_buf[j]) break; if (j == search_w.term_len) /* match ? */ { if (min_pos == -1 || i < min_pos) min_pos = i; break; } } } if (sp->lookahead != ')') return 0; sp_lex(sp); if (min_pos == -1) min_pos = 0; /* the default if not found */ sprintf(num_str, "%d", min_pos); wrd->term_buf = nmem_strdup(sp->nmem, num_str); wrd->term_len = strlen(wrd->term_buf); return 1; } static int sp_expr(struct source_parser *sp, data1_node *n, RecWord *wrd) { if (sp->lookahead != 't') return 0; if (sp->len == 4 && !memcmp(sp->tok, "data", sp->len)) { if (n->which == DATA1N_data) { wrd->term_buf = n->u.data.data; wrd->term_len = n->u.data.len; } sp_lex(sp); } else if (sp->len == 3 && !memcmp(sp->tok, "tag", sp->len)) { if (n->which == DATA1N_tag) { wrd->term_buf = n->u.tag.tag; wrd->term_len = strlen(n->u.tag.tag); } sp_lex(sp); } else if (sp->len == 4 && !memcmp(sp->tok, "attr", sp->len)) { RecWord tmp_w; sp_lex(sp); if (sp->lookahead != '(') return 0; sp_lex(sp); if (!sp_expr(sp, n, &tmp_w)) return 0; wrd->term_buf = ""; wrd->term_len = 0; if (n->which == DATA1N_tag) { data1_xattr *p = n->u.tag.attributes; while (p && strlen(p->name) != tmp_w.term_len && memcmp (p->name, tmp_w.term_buf, tmp_w.term_len)) p = p->next; if (p) { wrd->term_buf = p->value; wrd->term_len = strlen(p->value); } } if (sp->lookahead != ')') return 0; sp_lex(sp); } else if (sp->len == 5 && !memcmp(sp->tok, "first", sp->len)) { return sp_first(sp, n, wrd); } else if (sp->len == 5 && !memcmp(sp->tok, "range", sp->len)) { return sp_range(sp, n, wrd); } else if (sp->len > 0 && isdigit(*(unsigned char *)sp->tok)) { char *b; wrd->term_len = sp->len; b = nmem_malloc(sp->nmem, sp->len); memcpy(b, sp->tok, sp->len); wrd->term_buf = b; sp_lex(sp); } else if (sp->len > 2 && sp->tok[0] == '\'' && sp->tok[sp->len-1] == '\'') { char *b; wrd->term_len = sp->len - 2; b = nmem_malloc(sp->nmem, wrd->term_len); memcpy(b, sp->tok+1, wrd->term_len); wrd->term_buf = b; sp_lex(sp); } else { wrd->term_buf = ""; wrd->term_len = 0; sp_lex(sp); } return 1; } static struct source_parser *source_parser_create(void) { struct source_parser *sp = xmalloc(sizeof(*sp)); sp->nmem = nmem_create(); return sp; } static void source_parser_destroy(struct source_parser *sp) { if (!sp) return; nmem_destroy(sp->nmem); xfree(sp); } static int sp_parse(struct source_parser *sp, data1_node *n, RecWord *wrd, const char *src) { sp->len = 0; sp->tok = 0; sp->src = src; sp->lookahead = 0; nmem_reset(sp->nmem); sp_lex(sp); return sp_expr(sp, n, wrd); } int d1_check_xpath_predicate(data1_node *n, struct xpath_predicate *p) { int res = 1; char *attname; data1_xattr *attr; if (!p) { return 1; } else { if (p->which == XPATH_PREDICATE_RELATION) { if (p->u.relation.name[0]) { if (*p->u.relation.name != '@') { yaz_log(YLOG_WARN, " Only attributes (@) are supported in xelm xpath predicates"); yaz_log(YLOG_WARN, "predicate %s ignored", p->u.relation.name); return 1; } attname = p->u.relation.name + 1; res = 0; /* looking for the attribute with a specified name */ for (attr = n->u.tag.attributes; attr; attr = attr->next) { if (!strcmp(attr->name, attname)) { if (p->u.relation.op[0]) { if (*p->u.relation.op != '=') { yaz_log(YLOG_WARN, "Only '=' relation is supported (%s)",p->u.relation.op); yaz_log(YLOG_WARN, "predicate %s ignored", p->u.relation.name); res = 1; break; } else { if (!strcmp(attr->value, p->u.relation.value)) { res = 1; break; } } } else { /* attribute exists, no value specified */ res = 1; break; } } } return res; } else { return 1; } } else if (p->which == XPATH_PREDICATE_BOOLEAN) { if (!strcmp(p->u.boolean.op,"and")) { return d1_check_xpath_predicate(n, p->u.boolean.left) && d1_check_xpath_predicate(n, p->u.boolean.right); } else if (!strcmp(p->u.boolean.op,"or")) { return (d1_check_xpath_predicate(n, p->u.boolean.left) || d1_check_xpath_predicate(n, p->u.boolean.right)); } else { yaz_log(YLOG_WARN, "Unknown boolean relation %s, ignored",p->u.boolean.op); return 1; } } } return 0; } static int dfa_match_first(struct DFA_state **dfaar, const char *text) { struct DFA_state *s = dfaar[0]; /* start state */ struct DFA_tran *t; int i; const char *p = text; unsigned char c; for (c = *p++, t = s->trans, i = s->tran_no; --i >= 0; t++) { if (c >= t->ch[0] && c <= t->ch[1]) { while (i >= 0) { /* move to next state and return if we get a match */ s = dfaar[t->to]; if (s->rule_no) return 1; /* next char */ if (!c) return 0; c = *p++; for (t = s->trans, i = s->tran_no; --i >= 0; t++) if (c >= t->ch[0] && c <= t->ch[1]) break; } } } return 0; } /* *ostrich* New function, looking for xpath "element" definitions in abs, by tagpath, using a kind of ugly regxp search.The DFA was built while parsing abs, so here we just go trough them and try to match against the given tagpath. The first matching entry is returned. pop, 2002-12-13 Added support for enhanced xelm. Now [] predicates are considered as well, when selecting indexing rules... (why the hell it's called termlist???) pop, 2003-01-17 */ data1_termlist *xpath_termlist_by_tagpath(char *tagpath, data1_node *n) { data1_absyn *abs = n->root->u.root.absyn; data1_xpelement *xpe = 0; data1_node *nn; #ifdef ENHANCED_XELM struct xpath_location_step *xp; #endif char *pexpr = xmalloc(strlen(tagpath)+5); sprintf(pexpr, "/%s\n", tagpath); for (xpe = abs->xp_elements; xpe; xpe = xpe->next) xpe->match_state = -1; /* don't know if it matches yet */ for (xpe = abs->xp_elements; xpe; xpe = xpe->next) { int i; int ok = xpe->match_state; if (ok == -1) { /* don't know whether there is a match yet */ data1_xpelement *xpe1; assert(xpe->dfa); ok = dfa_match_first(xpe->dfa->states, pexpr); #if OPTIMIZE_MELM /* mark this and following ones with same regexp */ for (xpe1 = xpe; xpe1; xpe1 = xpe1->match_next) xpe1->match_state = ok; #endif } assert(ok == 0 || ok == 1); if (ok) { #ifdef ENHANCED_XELM /* we have to check the perdicates up to the root node */ xp = xpe->xpath; /* find the first tag up in the node structure */ for (nn = n; nn && nn->which != DATA1N_tag; nn = nn->parent) ; /* go from inside out in the node structure, while going backwards trough xpath location steps ... */ for (i = xpe->xpath_len - 1; i>0; i--) { if (!d1_check_xpath_predicate(nn, xp[i].predicate)) { ok = 0; break; } if (nn->which == DATA1N_tag) nn = nn->parent; } #endif if (ok) break; } } xfree(pexpr); if (xpe) { return xpe->termlists; } else { return NULL; } } /* use 1 start element (tag) 2 end element 3 start attr (and attr-exact) 4 end attr 1016 cdata 1015 attr data *ostrich* Now, if there is a matching xelm described in abs, for the indexed element or the attribute, then the data is handled according to those definitions... modified by pop, 2002-12-13 */ /* add xpath index for an attribute */ static void index_xpath_attr(char *tag_path, char *name, char *value, char *structure, struct recExtractCtrl *p, RecWord *wrd) { wrd->index_name = ZEBRA_XPATH_ELM_BEGIN; wrd->index_type = "0"; wrd->term_buf = tag_path; wrd->term_len = strlen(tag_path); (*p->tokenAdd)(wrd); if (value) { wrd->index_name = ZEBRA_XPATH_ATTR_CDATA; wrd->index_type = "w"; wrd->term_buf = value; wrd->term_len = strlen(value); (*p->tokenAdd)(wrd); } wrd->index_name = ZEBRA_XPATH_ELM_END; wrd->index_type = "0"; wrd->term_buf = tag_path; wrd->term_len = strlen(tag_path); (*p->tokenAdd)(wrd); } static void mk_tag_path_full(char *tag_path_full, size_t max, data1_node *n) { size_t flen = 0; data1_node *nn; /* we have to fetch the whole path to the data tag */ for (nn = n; nn; nn = nn->parent) { if (nn->which == DATA1N_tag) { size_t tlen = strlen(nn->u.tag.tag); if (tlen + flen > (max - 2)) break; memcpy(tag_path_full + flen, nn->u.tag.tag, tlen); flen += tlen; tag_path_full[flen++] = '/'; } else if (nn->which == DATA1N_root) break; } tag_path_full[flen] = 0; } static void index_xpath(struct source_parser *sp, data1_node *n, struct recExtractCtrl *p, int level, RecWord *wrd, char *xpath_index, int xpath_is_start ) { int i; char tag_path_full[1024]; int termlist_only = 1; data1_termlist *tl; if (!n->root->u.root.absyn || n->root->u.root.absyn->xpath_indexing == DATA1_XPATH_INDEXING_ENABLE) { termlist_only = 0; } switch (n->which) { case DATA1N_data: wrd->term_buf = n->u.data.data; wrd->term_len = n->u.data.len; mk_tag_path_full(tag_path_full, sizeof(tag_path_full), n); /* If we have a matching termlist... */ if (n->root->u.root.absyn && (tl = xpath_termlist_by_tagpath(tag_path_full, n))) { zint max_seqno = 0; for (; tl; tl = tl->next) { /* need to copy recword because it may be changed */ RecWord wrd_tl; wrd->index_type = tl->structure; memcpy(&wrd_tl, wrd, sizeof(*wrd)); if (tl->source) sp_parse(sp, n, &wrd_tl, tl->source); /* this is just the old fashioned attribute based index */ wrd_tl.index_name = tl->index_name; if (p->flagShowRecords) { int i; printf("%*sIdx: [%s]", (level + 1) * 4, "", tl->structure); printf("%s %s", tl->index_name, tl->source); printf(" XData:\""); for (i = 0; i 40) printf(" ..."); fputc('\n', stdout); } else { (*p->tokenAdd)(&wrd_tl); } if (wrd_tl.seqno > max_seqno) max_seqno = wrd_tl.seqno; } if (max_seqno) wrd->seqno = max_seqno; } /* xpath indexing is done, if there was no termlist given, or no ! in the termlist, and default indexing is enabled... */ if (!p->flagShowRecords && !termlist_only) { wrd->index_name = xpath_index; wrd->index_type = "w"; (*p->tokenAdd)(wrd); } break; case DATA1N_tag: mk_tag_path_full(tag_path_full, sizeof(tag_path_full), n); wrd->index_type = "0"; wrd->term_buf = tag_path_full; wrd->term_len = strlen(tag_path_full); wrd->index_name = xpath_index; if (p->flagShowRecords) { printf("%*s tag=", (level + 1) * 4, ""); for (i = 0; iterm_len && i < 40; i++) fputc(wrd->term_buf[i], stdout); if (i == 40) printf(" .."); printf("\n"); } else { data1_xattr *xp; if (!termlist_only) (*p->tokenAdd)(wrd); /* index element pag (AKA tag path) */ if (xpath_is_start == 1) /* only for the starting tag... */ { #define MAX_ATTR_COUNT 50 data1_termlist *tll[MAX_ATTR_COUNT]; int i = 0; for (xp = n->u.tag.attributes; xp; xp = xp->next) { char comb[512]; char attr_tag_path_full[1024]; /* this could be cached as well */ sprintf(attr_tag_path_full, "@%s/%s", xp->name, tag_path_full); tll[i] = xpath_termlist_by_tagpath(attr_tag_path_full,n); if (!termlist_only) { /* attribute (no value) */ wrd->index_type = "0"; wrd->index_name = ZEBRA_XPATH_ATTR_NAME; wrd->term_buf = xp->name; wrd->term_len = strlen(xp->name); wrd->seqno--; (*p->tokenAdd)(wrd); if (xp->value && strlen(xp->name) + strlen(xp->value) < sizeof(comb)-2) { /* attribute value exact */ strcpy(comb, xp->name); strcat(comb, "="); strcat(comb, xp->value); wrd->index_name = ZEBRA_XPATH_ATTR_NAME; wrd->index_type = "0"; wrd->term_buf = comb; wrd->term_len = strlen(comb); wrd->seqno--; (*p->tokenAdd)(wrd); } } i++; } i = 0; for (xp = n->u.tag.attributes; xp; xp = xp->next) { data1_termlist *tl; char attr_tag_path_full[1024]; int xpdone = 0; sprintf(attr_tag_path_full, "@%s/%s", xp->name, tag_path_full); if ((tl = tll[i])) { /* If there is a termlist given (=xelm directive) */ for (; tl; tl = tl->next) { if (!tl->index_name) { /* add xpath index for the attribute */ index_xpath_attr(attr_tag_path_full, xp->name, xp->value, tl->structure, p, wrd); xpdone = 1; } else { /* index attribute value (only path/@attr) */ if (xp->value) { wrd->index_name = tl->index_name; wrd->index_type = tl->structure; wrd->term_buf = xp->value; wrd->term_len = strlen(xp->value); (*p->tokenAdd)(wrd); } } } } /* if there was no termlist for the given path, or the termlist didn't have a ! element, index the attribute as "w" */ if (!xpdone && !termlist_only) { index_xpath_attr(attr_tag_path_full, xp->name, xp->value, "w", p, wrd); } i++; } } } } } static void index_termlist(struct source_parser *sp, data1_node *par, data1_node *n, struct recExtractCtrl *p, int level, RecWord *wrd) { data1_termlist *tlist = 0; data1_datatype dtype = DATA1K_string; /* * cycle up towards the root until we find a tag with an att.. * this has the effect of indexing locally defined tags with * the attribute of their ancestor in the record. */ while (!par->u.tag.element) if (!par->parent || !(par=get_parent_tag(p->dh, par->parent))) break; if (!par || !(tlist = par->u.tag.element->termlists)) return; if (par->u.tag.element->tag) dtype = par->u.tag.element->tag->kind; for (; tlist; tlist = tlist->next) { /* consider source */ wrd->term_buf = 0; assert(tlist->source); sp_parse(sp, n, wrd, tlist->source); if (wrd->term_buf && wrd->term_len) { if (p->flagShowRecords) { int i; printf("%*sIdx: [%s]", (level + 1) * 4, "", tlist->structure); printf("%s %s", tlist->index_name, tlist->source); printf(" XData:\""); for (i = 0; iterm_len && i < 40; i++) fputc(wrd->term_buf[i], stdout); fputc('"', stdout); if (wrd->term_len > 40) printf(" ..."); fputc('\n', stdout); } else { wrd->index_type = tlist->structure; wrd->index_name = tlist->index_name; (*p->tokenAdd)(wrd); } } } } static int dumpkeys_r(struct source_parser *sp, data1_node *n, struct recExtractCtrl *p, int level, RecWord *wrd) { for (; n; n = n->next) { if (p->flagShowRecords) /* display element description to user */ { if (n->which == DATA1N_root) { printf("%*s", level * 4, ""); printf("Record type: '%s'\n", n->u.root.type); } else if (n->which == DATA1N_tag) { data1_element *e; printf("%*s", level * 4, ""); if (!(e = n->u.tag.element)) printf("Local tag: '%s'\n", n->u.tag.tag); else { printf("Elm: '%s' ", e->name); if (e->tag) { data1_tag *t = e->tag; printf("TagNam: '%s' ", t->names->name); printf("("); if (t->tagset) printf("%s[%d],", t->tagset->name, t->tagset->type); else printf("?,"); if (t->which == DATA1T_numeric) printf("%d)", t->value.numeric); else printf("'%s')", t->value.string); } printf("\n"); } } } if (n->which == DATA1N_tag) { index_termlist(sp, n, n, p, level, wrd); /* index start tag */ if (n->root->u.root.absyn) index_xpath(sp, n, p, level, wrd, ZEBRA_XPATH_ELM_BEGIN, 1 /* is start */); } if (n->child) if (dumpkeys_r(sp, n->child, p, level + 1, wrd) < 0) return -1; if (n->which == DATA1N_data) { data1_node *par = get_parent_tag(p->dh, n); if (p->flagShowRecords) { printf("%*s", level * 4, ""); printf("Data: "); if (n->u.data.len > 256) printf("'%.170s ... %.70s'\n", n->u.data.data, n->u.data.data + n->u.data.len-70); else if (n->u.data.len > 0) printf("'%.*s'\n", n->u.data.len, n->u.data.data); else printf("NULL\n"); } if (par) index_termlist(sp, par, n, p, level, wrd); index_xpath(sp, n, p, level, wrd, ZEBRA_XPATH_CDATA, 0 /* is start */); } if (n->which == DATA1N_tag) { /* index end tag */ index_xpath(sp, n, p, level, wrd, ZEBRA_XPATH_ELM_END, 0 /* is start */); } if (p->flagShowRecords && n->which == DATA1N_root) { printf("%*s-------------\n\n", level * 4, ""); } } return 0; } static int dumpkeys(data1_node *n, struct recExtractCtrl *p, RecWord *wrd) { struct source_parser *sp = source_parser_create(); int r = dumpkeys_r(sp, n, p, 0, wrd); source_parser_destroy(sp); return r; } int grs_extract_tree(struct recExtractCtrl *p, data1_node *n) { RecWord wrd; if (n->u.root.absyn && n->u.root.absyn->oid) (*p->schemaAdd)(p, n->u.root.absyn->oid); (*p->init)(p, &wrd); /* data1_pr_tree(p->dh, n, stdout); */ return dumpkeys(n, p, &wrd); } static int grs_extract_sub(void *clientData, struct recExtractCtrl *p, NMEM mem, data1_node *(*grs_read)(struct grs_read_info *)) { data1_node *n; struct grs_read_info gri; RecWord wrd; gri.stream = p->stream; gri.mem = mem; gri.dh = p->dh; gri.clientData = clientData; n = (*grs_read)(&gri); if (!n) return RECCTRL_EXTRACT_EOF; if (n->u.root.absyn && n->u.root.absyn->oid) (*p->schemaAdd)(p, n->u.root.absyn->oid); data1_concat_text(p->dh, mem, n); /* ensure our data1 tree is UTF-8 */ data1_iconv(p->dh, mem, n, "UTF-8", data1_get_encoding(p->dh, n)); data1_remove_idzebra_subtree(p->dh, n); #if 0 data1_pr_tree(p->dh, n, stdout); #endif (*p->init)(p, &wrd); if (dumpkeys(n, p, &wrd) < 0) { return RECCTRL_EXTRACT_ERROR_GENERIC; } return RECCTRL_EXTRACT_OK; } int zebra_grs_extract(void *clientData, struct recExtractCtrl *p, data1_node *(*grs_read)(struct grs_read_info *)) { int ret; NMEM mem = nmem_create(); ret = grs_extract_sub(clientData, p, mem, grs_read); nmem_destroy(mem); return ret; } /* * Return: -1: Nothing done. 0: Ok. >0: Bib-1 diagnostic. */ static int process_comp(data1_handle dh, data1_node *n, Z_RecordComposition *c, char **addinfo, ODR o) { data1_esetname *eset; Z_Espec1 *espec = 0; Z_ElementSpec *p; switch (c->which) { case Z_RecordComp_simple: if (c->u.simple->which != Z_ElementSetNames_generic) return 26; /* only generic form supported. Fix this later */ if (!(eset = data1_getesetbyname(dh, n->u.root.absyn, c->u.simple->u.generic))) { yaz_log(YLOG_LOG, "Unknown esetname '%s'", c->u.simple->u.generic); *addinfo = odr_strdup(o, c->u.simple->u.generic); return 25; /* invalid esetname */ } yaz_log(YLOG_DEBUG, "Esetname '%s' in simple compspec", c->u.simple->u.generic); espec = eset->spec; break; case Z_RecordComp_complex: if (c->u.complex->generic) { /* insert check for schema */ if ((p = c->u.complex->generic->elementSpec)) { switch (p->which) { case Z_ElementSpec_elementSetName: if (!(eset = data1_getesetbyname(dh, n->u.root.absyn, p->u.elementSetName))) { yaz_log(YLOG_DEBUG, "Unknown esetname '%s'", p->u.elementSetName); *addinfo = odr_strdup(o, p->u.elementSetName); return 25; /* invalid esetname */ } yaz_log(YLOG_DEBUG, "Esetname '%s' in complex compspec", p->u.elementSetName); espec = eset->spec; break; case Z_ElementSpec_externalSpec: if (p->u.externalSpec->which == Z_External_espec1) { yaz_log(YLOG_DEBUG, "Got Espec-1"); espec = p->u.externalSpec-> u.espec1; } else { yaz_log(YLOG_LOG, "Unknown external espec."); return 25; /* bad. what is proper diagnostic? */ } break; } } } else return 26; /* fix */ } if (espec) { yaz_log(YLOG_DEBUG, "Element: Espec-1 match"); return data1_doespec1(dh, n, espec); } else { yaz_log(YLOG_DEBUG, "Element: all match"); return -1; } } /* Add Zebra info in separate namespace ... 359 447 records/genera.xml */ static void zebra_xml_metadata(struct recRetrieveCtrl *p, data1_node *top, NMEM mem) { const char *idzebra_ns[3]; const char *i2 = "\n "; const char *i4 = "\n "; data1_node *n; idzebra_ns[0] = "xmlns"; idzebra_ns[1] = "http://www.indexdata.dk/zebra/"; idzebra_ns[2] = 0; data1_mk_text(p->dh, mem, i2, top); n = data1_mk_tag(p->dh, mem, "idzebra", idzebra_ns, top); data1_mk_text(p->dh, mem, "\n", top); data1_mk_text(p->dh, mem, i4, n); data1_mk_tag_data_int(p->dh, n, "size", p->recordSize, mem); if (p->score != -1) { data1_mk_text(p->dh, mem, i4, n); data1_mk_tag_data_int(p->dh, n, "score", p->score, mem); } data1_mk_text(p->dh, mem, i4, n); data1_mk_tag_data_zint(p->dh, n, "localnumber", p->localno, mem); if (p->fname) { data1_mk_text(p->dh, mem, i4, n); data1_mk_tag_data_text(p->dh, n, "filename", p->fname, mem); } data1_mk_text(p->dh, mem, i2, n); } int zebra_grs_retrieve(void *clientData, struct recRetrieveCtrl *p, data1_node *(*grs_read)(struct grs_read_info *)) { data1_node *node = 0, *onode = 0, *top; data1_node *dnew; data1_maptab *map; int res, selected = 0; NMEM mem; struct grs_read_info gri; const char *tagname; const Odr_oid *requested_schema = 0; data1_marctab *marctab; int dummy; mem = nmem_create(); gri.stream = p->stream; gri.mem = mem; gri.dh = p->dh; gri.clientData = clientData; yaz_log(YLOG_DEBUG, "grs_retrieve"); node = (*grs_read)(&gri); if (!node) { p->diagnostic = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS; nmem_destroy(mem); return 0; } data1_concat_text(p->dh, mem, node); data1_remove_idzebra_subtree(p->dh, node); #if 0 data1_pr_tree(p->dh, node, stdout); #endif top = data1_get_root_tag(p->dh, node); yaz_log(YLOG_DEBUG, "grs_retrieve: size"); tagname = data1_systag_lookup(node->u.root.absyn, "size", "size"); if (tagname && (dnew = data1_mk_tag_data_wd(p->dh, top, tagname, mem))) { dnew->u.data.what = DATA1I_text; dnew->u.data.data = dnew->lbuf; sprintf(dnew->u.data.data, "%d", p->recordSize); dnew->u.data.len = strlen(dnew->u.data.data); } tagname = data1_systag_lookup(node->u.root.absyn, "rank", "rank"); if (tagname && p->score >= 0 && (dnew = data1_mk_tag_data_wd(p->dh, top, tagname, mem))) { yaz_log(YLOG_DEBUG, "grs_retrieve: %s", tagname); dnew->u.data.what = DATA1I_num; dnew->u.data.data = dnew->lbuf; sprintf(dnew->u.data.data, "%d", p->score); dnew->u.data.len = strlen(dnew->u.data.data); } tagname = data1_systag_lookup(node->u.root.absyn, "sysno", "localControlNumber"); if (tagname && p->localno > 0 && (dnew = data1_mk_tag_data_wd(p->dh, top, tagname, mem))) { yaz_log(YLOG_DEBUG, "grs_retrieve: %s", tagname); dnew->u.data.what = DATA1I_text; dnew->u.data.data = dnew->lbuf; sprintf(dnew->u.data.data, ZINT_FORMAT, p->localno); dnew->u.data.len = strlen(dnew->u.data.data); } if (!p->input_format) { /* SUTRS is default input_format */ p->input_format = yaz_oid_recsyn_sutrs; } assert(p->input_format); if (!oid_oidcmp(p->input_format, yaz_oid_recsyn_xml)) zebra_xml_metadata(p, top, mem); #if 0 data1_pr_tree(p->dh, node, stdout); #endif if (p->comp && p->comp->which == Z_RecordComp_complex && p->comp->u.complex->generic && p->comp->u.complex->generic->which == Z_Schema_oid && p->comp->u.complex->generic->schema.oid) { requested_schema = p->comp->u.complex->generic->schema.oid; } /* If schema has been specified, map if possible, then check that * we got the right one */ if (requested_schema) { yaz_log(YLOG_DEBUG, "grs_retrieve: schema mapping"); for (map = node->u.root.absyn->maptabs; map; map = map->next) { if (!oid_oidcmp(map->oid, requested_schema)) { onode = node; if (!(node = data1_map_record(p->dh, onode, map, mem))) { p->diagnostic = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS; nmem_destroy(mem); return 0; } break; } } if (node->u.root.absyn && oid_oidcmp(requested_schema, node->u.root.absyn->oid)) { p->diagnostic = YAZ_BIB1_RECORD_NOT_AVAILABLE_IN_REQUESTED_SYNTAX; nmem_destroy(mem); return 0; } } /* * Does the requested format match a known syntax-mapping? (this reflects * the overlap of schema and formatting which is inherent in the MARC * family) */ yaz_log(YLOG_DEBUG, "grs_retrieve: syntax mapping"); if (node->u.root.absyn) for (map = node->u.root.absyn->maptabs; map; map = map->next) { if (!oid_oidcmp(map->oid, p->input_format)) { onode = node; if (!(node = data1_map_record(p->dh, onode, map, mem))) { p->diagnostic = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS; nmem_destroy(mem); return 0; } break; } } yaz_log(YLOG_DEBUG, "grs_retrieve: schemaIdentifier"); if (node->u.root.absyn && node->u.root.absyn->oid && !oid_oidcmp(p->input_format, yaz_oid_recsyn_grs_1)) { char oid_str[OID_STR_MAX]; char *dot_str = oid_oid_to_dotstring(node->u.root.absyn->oid, oid_str); if (dot_str && (dnew = data1_mk_tag_data_wd(p->dh, top, "schemaIdentifier", mem))) { dnew->u.data.what = DATA1I_oid; dnew->u.data.data = (char *) nmem_strdup(mem, dot_str); dnew->u.data.len = strlen(dot_str); } } yaz_log(YLOG_DEBUG, "grs_retrieve: element spec"); if (p->comp && (res = process_comp(p->dh, node, p->comp, &p->addinfo, p->odr)) > 0) { p->diagnostic = res; nmem_destroy(mem); return 0; } else if (p->comp && !res) selected = 1; #if 0 data1_pr_tree(p->dh, node, stdout); #endif yaz_log(YLOG_DEBUG, "grs_retrieve: transfer syntax mapping"); p->output_format = p->input_format; assert(p->input_format); if (!oid_oidcmp(p->input_format, yaz_oid_recsyn_xml)) { #if 0 data1_pr_tree(p->dh, node, stdout); #endif /* default output encoding for XML is UTF-8 */ data1_iconv(p->dh, mem, node, p->encoding ? p->encoding : "UTF-8", data1_get_encoding(p->dh, node)); if (!(p->rec_buf = data1_nodetoidsgml(p->dh, node, selected, &p->rec_len))) p->diagnostic = YAZ_BIB1_RECORD_NOT_AVAILABLE_IN_REQUESTED_SYNTAX; else { char *new_buf = (char*) odr_malloc(p->odr, p->rec_len); memcpy(new_buf, p->rec_buf, p->rec_len); p->rec_buf = new_buf; } } else if (!oid_oidcmp(p->input_format, yaz_oid_recsyn_grs_1)) { data1_iconv(p->dh, mem, node, "UTF-8", data1_get_encoding(p->dh, node)); dummy = 0; if (!(p->rec_buf = data1_nodetogr(p->dh, node, selected, p->odr, &dummy))) p->diagnostic = YAZ_BIB1_RECORD_NOT_AVAILABLE_IN_REQUESTED_SYNTAX; else p->rec_len = -1; } else if (!oid_oidcmp(p->input_format, yaz_oid_recsyn_explain)) { /* ensure our data1 tree is UTF-8 */ data1_iconv(p->dh, mem, node, "UTF-8", data1_get_encoding(p->dh, node)); if (!(p->rec_buf = data1_nodetoexplain(p->dh, node, selected, p->odr))) p->diagnostic = YAZ_BIB1_RECORD_NOT_AVAILABLE_IN_REQUESTED_SYNTAX; else p->rec_len = -1; } else if (!oid_oidcmp(p->input_format, yaz_oid_recsyn_summary)) { /* ensure our data1 tree is UTF-8 */ data1_iconv(p->dh, mem, node, "UTF-8", data1_get_encoding(p->dh, node)); if (!(p->rec_buf = data1_nodetosummary(p->dh, node, selected, p->odr))) p->diagnostic = YAZ_BIB1_RECORD_NOT_AVAILABLE_IN_REQUESTED_SYNTAX; else p->rec_len = -1; } else if (!oid_oidcmp(p->input_format, yaz_oid_recsyn_sutrs)) { if (p->encoding) data1_iconv(p->dh, mem, node, p->encoding, data1_get_encoding(p->dh, node)); if (!(p->rec_buf = data1_nodetobuf(p->dh, node, selected, &p->rec_len))) p->diagnostic = YAZ_BIB1_RECORD_NOT_AVAILABLE_IN_REQUESTED_SYNTAX; else { char *new_buf = (char*) odr_malloc(p->odr, p->rec_len); memcpy(new_buf, p->rec_buf, p->rec_len); p->rec_buf = new_buf; } } else if (!oid_oidcmp(p->input_format, yaz_oid_recsyn_soif)) { if (p->encoding) data1_iconv(p->dh, mem, node, p->encoding, data1_get_encoding(p->dh, node)); if (!(p->rec_buf = data1_nodetosoif(p->dh, node, selected, &p->rec_len))) p->diagnostic = YAZ_BIB1_RECORD_NOT_AVAILABLE_IN_REQUESTED_SYNTAX; else { char *new_buf = (char*) odr_malloc(p->odr, p->rec_len); memcpy(new_buf, p->rec_buf, p->rec_len); p->rec_buf = new_buf; } } else { if (!node->u.root.absyn) p->diagnostic = YAZ_BIB1_RECORD_NOT_AVAILABLE_IN_REQUESTED_SYNTAX; else { for (marctab = node->u.root.absyn->marc; marctab; marctab = marctab->next) if (marctab->oid && !oid_oidcmp(marctab->oid, p->input_format)) break; if (!marctab) p->diagnostic = YAZ_BIB1_RECORD_NOT_AVAILABLE_IN_REQUESTED_SYNTAX; else { if (p->encoding) data1_iconv(p->dh, mem, node, p->encoding, data1_get_encoding(p->dh, node)); if (!(p->rec_buf = data1_nodetomarc(p->dh, marctab, node, selected, &p->rec_len))) p->diagnostic = YAZ_BIB1_RECORD_NOT_AVAILABLE_IN_REQUESTED_SYNTAX; else { char *new_buf = (char*) odr_malloc(p->odr, p->rec_len); memcpy(new_buf, p->rec_buf, p->rec_len); p->rec_buf = new_buf; } } } } nmem_destroy(mem); return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/trunc.c0000644000175000017500000003113611412332551012551 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include "index.h" #include struct trunc_info { int *ptr; int *indx; char **heap; int heapnum; int (*cmp)(const void *p1, const void *p2); int keysize; char *swapbuf; char *tmpbuf; char *buf; }; static void heap_swap(struct trunc_info *ti, int i1, int i2) { int swap; swap = ti->ptr[i1]; ti->ptr[i1] = ti->ptr[i2]; ti->ptr[i2] = swap; } static void heap_delete(struct trunc_info *ti) { int cur = 1, child = 2; heap_swap(ti, 1, ti->heapnum--); while (child <= ti->heapnum) { if (child < ti->heapnum && (*ti->cmp)(ti->heap[ti->ptr[child]], ti->heap[ti->ptr[1+child]]) > 0) child++; if ((*ti->cmp)(ti->heap[ti->ptr[cur]], ti->heap[ti->ptr[child]]) > 0) { heap_swap(ti, cur, child); cur = child; child = 2*cur; } else break; } } static void heap_insert(struct trunc_info *ti, const char *buf, int indx) { int cur, parent; cur = ++(ti->heapnum); memcpy(ti->heap[ti->ptr[cur]], buf, ti->keysize); ti->indx[ti->ptr[cur]] = indx; parent = cur/2; while (parent && (*ti->cmp)(ti->heap[ti->ptr[parent]], ti->heap[ti->ptr[cur]]) > 0) { heap_swap(ti, cur, parent); cur = parent; parent = cur/2; } } static struct trunc_info *heap_init(int size, int key_size, int (*cmp)(const void *p1, const void *p2)) { struct trunc_info *ti = (struct trunc_info *) xmalloc(sizeof(*ti)); int i; ++size; ti->heapnum = 0; ti->keysize = key_size; ti->cmp = cmp; ti->indx = (int *) xmalloc(size * sizeof(*ti->indx)); ti->heap = (char **) xmalloc(size * sizeof(*ti->heap)); ti->ptr = (int *) xmalloc(size * sizeof(*ti->ptr)); ti->swapbuf = (char *) xmalloc(ti->keysize); ti->tmpbuf = (char *) xmalloc(ti->keysize); ti->buf = (char *) xmalloc(size * ti->keysize); for (i = size; --i >= 0; ) { ti->ptr[i] = i; ti->heap[i] = ti->buf + ti->keysize * i; } return ti; } static void heap_close(struct trunc_info *ti) { xfree(ti->ptr); xfree(ti->indx); xfree(ti->heap); xfree(ti->swapbuf); xfree(ti->tmpbuf); xfree(ti->buf); xfree(ti); } static RSET rset_trunc_r(ZebraHandle zi, const char *term, int length, const char *flags, ISAM_P *isam_p, int from, int to, int merge_chunk, int preserve_position, int term_type, NMEM rset_nmem, struct rset_key_control *kctrl, int scope, TERMID termid) { RSET result; RSFD result_rsfd; int nn = 0; result = rset_create_temp(rset_nmem, kctrl, scope, res_get(zi->res, "setTmpDir"), termid); result_rsfd = rset_open(result, RSETF_WRITE); if (to - from > merge_chunk) { RSFD *rsfd; RSET *rset; int i, i_add = (to-from)/merge_chunk + 1; struct trunc_info *ti; int rscur = 0; int rsmax = (to-from)/i_add + 1; int cmp_border = preserve_position ? 0 : 1; NMEM rset_nmem_sub = nmem_create(); /* all sub rsets not needed after this */ rset = (RSET *) xmalloc(sizeof(*rset) * rsmax); rsfd = (RSFD *) xmalloc(sizeof(*rsfd) * rsmax); for (i = from; i < to; i += i_add) { if (i_add <= to - i) rset[rscur] = rset_trunc_r(zi, term, length, flags, isam_p, i, i+i_add, merge_chunk, preserve_position, term_type, rset_nmem_sub, kctrl, scope, 0); else rset[rscur] = rset_trunc_r(zi, term, length, flags, isam_p, i, to, merge_chunk, preserve_position, term_type, rset_nmem_sub, kctrl, scope, 0); rscur++; } ti = heap_init (rscur, sizeof(struct it_key), key_compare_it); for (i = rscur; --i >= 0; ) { rsfd[i] = rset_open(rset[i], RSETF_READ); if (rset_read(rsfd[i], ti->tmpbuf, 0)) heap_insert(ti, ti->tmpbuf, i); else { rset_close(rsfd[i]); rset_delete(rset[i]); } } while (ti->heapnum) { int n = ti->indx[ti->ptr[1]]; rset_write(result_rsfd, ti->heap[ti->ptr[1]]); nn++; while (1) { if(!rset_read (rsfd[n], ti->tmpbuf,0)) { heap_delete(ti); rset_close(rsfd[n]); rset_delete(rset[n]); break; } if ((*ti->cmp)(ti->tmpbuf, ti->heap[ti->ptr[1]]) > cmp_border) { heap_delete(ti); heap_insert(ti, ti->tmpbuf, n); break; } } } xfree(rset); xfree(rsfd); heap_close(ti); nmem_destroy(rset_nmem_sub); } else if (zi->reg->isamc) { ISAMC_PP *ispt; int i; struct trunc_info *ti; ispt = (ISAMC_PP *) xmalloc(sizeof(*ispt) * (to-from)); ti = heap_init(to-from, sizeof(struct it_key), key_compare_it); for (i = to-from; --i >= 0; ) { ispt[i] = isamc_pp_open(zi->reg->isamc, isam_p[from+i]); if (isamc_pp_read(ispt[i], ti->tmpbuf)) heap_insert(ti, ti->tmpbuf, i); else isamc_pp_close(ispt[i]); } while (ti->heapnum) { int n = ti->indx[ti->ptr[1]]; rset_write(result_rsfd, ti->heap[ti->ptr[1]]); nn++; if (preserve_position) { heap_delete(ti); if (isamc_pp_read(ispt[n], ti->tmpbuf)) heap_insert(ti, ti->tmpbuf, n); else isamc_pp_close(ispt[n]); } else { while (1) { if (!isamc_pp_read(ispt[n], ti->tmpbuf)) { heap_delete(ti); isamc_pp_close(ispt[n]); break; } if ((*ti->cmp)(ti->tmpbuf, ti->heap[ti->ptr[1]]) > 1) { heap_delete(ti); heap_insert(ti, ti->tmpbuf, n); break; } } } } heap_close(ti); xfree(ispt); } else if (zi->reg->isams) { ISAMS_PP *ispt; int i; struct trunc_info *ti; int nn = 0; ispt = (ISAMS_PP *) xmalloc(sizeof(*ispt) * (to-from)); ti = heap_init(to-from, sizeof(struct it_key), key_compare_it); for (i = to-from; --i >= 0; ) { ispt[i] = isams_pp_open(zi->reg->isams, isam_p[from+i]); if (isams_pp_read(ispt[i], ti->tmpbuf)) heap_insert(ti, ti->tmpbuf, i); else isams_pp_close(ispt[i]); } while (ti->heapnum) { int n = ti->indx[ti->ptr[1]]; rset_write(result_rsfd, ti->heap[ti->ptr[1]]); nn++; while (1) { if (!isams_pp_read(ispt[n], ti->tmpbuf)) { heap_delete(ti); isams_pp_close(ispt[n]); break; } if ((*ti->cmp)(ti->tmpbuf, ti->heap[ti->ptr[1]]) > 1) { heap_delete(ti); heap_insert(ti, ti->tmpbuf, n); break; } } } heap_close(ti); xfree(ispt); } else if (zi->reg->isamb) { ISAMB_PP *ispt; int i; struct trunc_info *ti; ispt = (ISAMB_PP *) xmalloc(sizeof(*ispt) * (to-from)); ti = heap_init(to-from, sizeof(struct it_key), key_compare_it); for (i = to-from; --i >= 0; ) { if (isam_p[from+i]) { ispt[i] = isamb_pp_open(zi->reg->isamb, isam_p[from+i], scope); if (isamb_pp_read(ispt[i], ti->tmpbuf)) heap_insert(ti, ti->tmpbuf, i); else isamb_pp_close(ispt[i]); } } while (ti->heapnum) { int n = ti->indx[ti->ptr[1]]; rset_write(result_rsfd, ti->heap[ti->ptr[1]]); nn++; if (preserve_position) { heap_delete(ti); if (isamb_pp_read(ispt[n], ti->tmpbuf)) heap_insert(ti, ti->tmpbuf, n); else isamb_pp_close(ispt[n]); } else { while (1) { if (!isamb_pp_read(ispt[n], ti->tmpbuf)) { heap_delete(ti); isamb_pp_close(ispt[n]); break; } if ((*ti->cmp)(ti->tmpbuf, ti->heap[ti->ptr[1]]) > 1) { heap_delete(ti); heap_insert(ti, ti->tmpbuf, n); break; } } } } heap_close(ti); xfree(ispt); } else yaz_log(YLOG_WARN, "Unknown isam set in rset_trunc_r"); rset_close(result_rsfd); return result; } static int isams_trunc_cmp(const void *p1, const void *p2) { ISAM_P i1 = *(ISAM_P*) p1; ISAM_P i2 = *(ISAM_P*) p2; if (i1 > i2) return 1; else if (i1 < i2) return -1; return 0; } static int isamc_trunc_cmp(const void *p1, const void *p2) { ISAM_P i1 = *(ISAM_P*) p1; ISAM_P i2 = *(ISAM_P*) p2; zint d; d = (isamc_type(i1) - isamc_type(i2)); if (d == 0) d = isamc_block(i1) - isamc_block(i2); if (d > 0) return 1; else if (d < 0) return -1; return 0; } RSET rset_trunc(ZebraHandle zh, ISAM_P *isam_p, int no, const char *term, int length, const char *flags, int preserve_position, int term_type, NMEM rset_nmem, struct rset_key_control *kctrl, int scope, struct ord_list *ol, const char *index_type, zint hits_limit, const char *term_ref_id) { TERMID termid; RSET result; int trunc_chunk; int trunc_limit = atoi(res_get_def(zh->res, "trunclimit", "10000")); termid = rset_term_create(term, length, flags, term_type, rset_nmem, ol, *index_type, hits_limit, term_ref_id); if (no < 1) return rset_create_null(rset_nmem, kctrl, termid); else if (no == 1) return zebra_create_rset_isam(zh, rset_nmem, kctrl, scope, *isam_p, termid); else if (zh->reg->isamb && no > 1 && no < trunc_limit) { RSET r; RSET *rsets = xmalloc(no*sizeof(RSET)); /* use nmem! */ int i; for (i = 0; ireg->isamb, isam_p[i], 0 /* termid */); r = rset_create_or(rset_nmem, kctrl, scope, termid, no, rsets); xfree(rsets); return r; } if (zh->reg->isamc) qsort(isam_p, no, sizeof(*isam_p), isamc_trunc_cmp); else qsort(isam_p, no, sizeof(*isam_p), isams_trunc_cmp); trunc_chunk = atoi(res_get_def(zh->res, "truncchunk", "20")); result = rset_trunc_r(zh, term, length, flags, isam_p, 0, no, trunc_chunk, preserve_position, term_type, rset_nmem, kctrl, scope, termid); return result; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/mod_grs_xml.c0000644000175000017500000003601011412332551013724 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #if HAVE_EXPAT_H #include #include #include #if HAVE_ICONV_H #include #include #endif #include #include #include #include #include #define XML_CHUNK 1024 struct user_info { data1_node *d1_stack[256]; int level; data1_handle dh; NMEM nmem; int loglevel; }; static void report_xml_error(XML_Parser parser) { zint line = XML_GetCurrentLineNumber(parser); zint col = XML_GetCurrentColumnNumber(parser); yaz_log (YLOG_WARN, ZINT_FORMAT ":" ZINT_FORMAT ":XML error: %s", line, col, XML_ErrorString(XML_GetErrorCode(parser))); } static void cb_start (void *user, const char *el, const char **attr) { struct user_info *ui = (struct user_info*) user; if (ui->level == 1) data1_set_root (ui->dh, ui->d1_stack[0], ui->nmem, el); ui->d1_stack[ui->level] = data1_mk_tag (ui->dh, ui->nmem, el, attr, ui->d1_stack[ui->level-1]); ui->level++; yaz_log (ui->loglevel, "cb_start %s", el); } static void cb_end (void *user, const char *el) { struct user_info *ui = (struct user_info*) user; ui->level--; yaz_log (ui->loglevel, "cb_end %s", el); } static void cb_chardata (void *user, const char *s, int len) { struct user_info *ui = (struct user_info*) user; #if 0 yaz_log (ui->loglevel, "cb_chardata %.*s", len, s); #endif ui->d1_stack[ui->level] = data1_mk_text_n (ui->dh, ui->nmem, s, len, ui->d1_stack[ui->level -1]); } static void cb_decl (void *user, const char *version, const char *encoding, int standalone) { struct user_info *ui = (struct user_info*) user; const char *attr_list[7]; attr_list[0] = "version"; attr_list[1] = version; attr_list[2] = "encoding"; attr_list[3] = "UTF-8"; /* internally it's always UTF-8 */ attr_list[4] = "standalone"; attr_list[5] = standalone ? "yes" : "no"; attr_list[6] = 0; data1_mk_preprocess (ui->dh, ui->nmem, "xml", attr_list, ui->d1_stack[ui->level-1]); #if 0 yaz_log (YLOG_LOG, "decl version=%s encoding=%s", version ? version : "null", encoding ? encoding : "null"); #endif } static void cb_processing (void *user, const char *target, const char *data) { struct user_info *ui = (struct user_info*) user; data1_node *res = data1_mk_preprocess (ui->dh, ui->nmem, target, 0, ui->d1_stack[ui->level-1]); data1_mk_text_nf (ui->dh, ui->nmem, data, strlen(data), res); yaz_log (ui->loglevel, "decl processing target=%s data=%s", target ? target : "null", data ? data : "null"); } static void cb_comment (void *user, const char *data) { struct user_info *ui = (struct user_info*) user; yaz_log (ui->loglevel, "decl comment data=%s", data ? data : "null"); data1_mk_comment (ui->dh, ui->nmem, data, ui->d1_stack[ui->level-1]); } static void cb_doctype_start (void *userData, const char *doctypeName, const char *sysid, const char *pubid, int has_internal_subset) { struct user_info *ui = (struct user_info*) userData; yaz_log (ui->loglevel, "doctype start doctype=%s sysid=%s pubid=%s", doctypeName, sysid, pubid); } static void cb_doctype_end (void *userData) { struct user_info *ui = (struct user_info*) userData; yaz_log (ui->loglevel, "doctype end"); } static void cb_entity_decl (void *userData, const char *entityName, int is_parameter_entity, const char *value, int value_length, const char *base, const char *systemId, const char *publicId, const char *notationName) { struct user_info *ui = (struct user_info*) userData; yaz_log (ui->loglevel, "entity decl %s is_para_entry=%d value=%.*s base=%s systemId=%s" " publicId=%s notationName=%s", entityName, is_parameter_entity, value_length, value, base, systemId, publicId, notationName); } static int cb_external_entity(XML_Parser pparser, const char *context, const char *base, const char *systemId, const char *publicId) { struct user_info *ui = (struct user_info*) XML_GetUserData(pparser); FILE *inf; int done = 0; XML_Parser parser; yaz_log (ui->loglevel, "external entity context=%s base=%s systemid=%s publicid=%s", context, base, systemId, publicId); if (!systemId) return 1; if (!(inf = fopen (systemId, "rb"))) { yaz_log (YLOG_WARN|YLOG_ERRNO, "fopen %s", systemId); return 0; } parser = XML_ExternalEntityParserCreate (pparser, "", 0); while (!done) { int r; void *buf = XML_GetBuffer (parser, XML_CHUNK); if (!buf) { yaz_log (YLOG_WARN, "XML_GetBuffer fail"); break; } r = fread (buf, 1, XML_CHUNK, inf); if (r == 0) { if (ferror(inf)) { yaz_log (YLOG_WARN|YLOG_ERRNO, "fread %s", systemId); break; } done = 1; } if (!XML_ParseBuffer (parser, r, done)) { done = 1; report_xml_error(parser); } } fclose (inf); XML_ParserFree (parser); return done; } #if HAVE_ICONV_H static int cb_encoding_convert (void *data, const char *s) { iconv_t t = (iconv_t) data; size_t ret; size_t outleft = 2; char outbuf_[2], *outbuf = outbuf_; size_t inleft = 4; char *inbuf = (char *) s; unsigned short code; #if 1 yaz_log(YLOG_LOG, "------------------------- cb_encoding_convert --- "); #endif ret = iconv (t, &inbuf, &inleft, &outbuf, &outleft); if (ret == (size_t) (-1) && errno != E2BIG) { iconv (t, 0, 0, 0, 0); return -1; } if (outleft != 0) return -1; memcpy (&code, outbuf_, sizeof(short)); return code; } static void cb_encoding_release (void *data) { iconv_t t = (iconv_t) data; iconv_close (t); } static int cb_encoding_handler (void *userData, const char *name, XML_Encoding *info) { int i = 0; int no_ok = 0; struct user_info *ui = (struct user_info*) userData; iconv_t t = iconv_open ("UNICODE", name); if (t == (iconv_t) (-1)) return 0; info->data = 0; /* signal that multibyte is not in use */ yaz_log (ui->loglevel, "Encoding handler of %s", name); for (i = 0; i<256; i++) { size_t ret; char outbuf_[5]; char inbuf_[5]; char *inbuf = inbuf_; char *outbuf = outbuf_; size_t inleft = 1; size_t outleft = 2; inbuf_[0] = i; iconv (t, 0, 0, 0, 0); /* reset iconv */ ret = iconv(t, &inbuf, &inleft, &outbuf, &outleft); if (ret == (size_t) (-1)) { if (errno == EILSEQ) { yaz_log (ui->loglevel, "Encoding %d: invalid sequence", i); info->map[i] = -1; /* invalid sequence */ } if (errno == EINVAL) { /* multi byte input */ int len = 2; int j = 0; info->map[i] = -1; while (len <= 4) { char sbuf[80]; int k; inbuf = inbuf_; inleft = len; outbuf = outbuf_; outleft = 2; inbuf_[len-1] = j; iconv (t, 0,0,0,0); assert (i >= 0 && i<255); *sbuf = 0; for (k = 0; k 255) break; } else if (errno == EINVAL) { len++; j = 7; } } else if (outleft == 0) { info->map[i] = -len; info->data = t; /* signal that multibyte is in use */ break; } else { break; } } if (info->map[i] < -1) yaz_log (ui->loglevel, "Encoding %d: multibyte input %d", i, -info->map[i]); else yaz_log (ui->loglevel, "Encoding %d: multibyte input failed", i); } if (errno == E2BIG) { info->map[i] = -1; /* no room for output */ if (i != 0) yaz_log (YLOG_WARN, "Encoding %d: no room for output", i); } } else if (outleft == 0) { unsigned short code; memcpy (&code, outbuf_, sizeof(short)); info->map[i] = code; no_ok++; } else { /* should never happen */ info->map[i] = -1; yaz_log (YLOG_DEBUG, "Encoding %d: bad state", i); } } if (info->data) { /* at least one multi byte */ info->convert = cb_encoding_convert; info->release = cb_encoding_release; } else { /* no multi byte - we no longer need iconv handler */ iconv_close(t); info->convert = 0; info->release = 0; } if (!no_ok) return 0; return 1; } /* HAVE_ICONV_H */ #endif static void cb_ns_start(void *userData, const char *prefix, const char *uri) { struct user_info *ui = (struct user_info*) userData; if (prefix && uri) yaz_log(ui->loglevel, "cb_ns_start %s %s", prefix, uri); } static void cb_ns_end(void *userData, const char *prefix) { struct user_info *ui = (struct user_info*) userData; if (prefix) yaz_log(ui->loglevel, "cb_ns_end %s", prefix); } data1_node *zebra_read_xml(data1_handle dh, struct ZebraRecStream *stream, NMEM m) { XML_Parser parser; struct user_info uinfo; int done = 0; data1_node *first_node; int no_read = 0; uinfo.loglevel = YLOG_DEBUG; uinfo.level = 1; uinfo.dh = dh; uinfo.nmem = m; uinfo.d1_stack[0] = data1_mk_node2 (dh, m, DATA1N_root, 0); uinfo.d1_stack[1] = 0; /* indicate no children (see end of routine) */ parser = XML_ParserCreate (0 /* encoding */); XML_SetElementHandler (parser, cb_start, cb_end); XML_SetCharacterDataHandler (parser, cb_chardata); XML_SetXmlDeclHandler (parser, cb_decl); XML_SetProcessingInstructionHandler (parser, cb_processing); XML_SetUserData (parser, &uinfo); XML_SetCommentHandler (parser, cb_comment); XML_SetDoctypeDeclHandler (parser, cb_doctype_start, cb_doctype_end); XML_SetEntityDeclHandler (parser, cb_entity_decl); XML_SetExternalEntityRefHandler (parser, cb_external_entity); XML_SetNamespaceDeclHandler(parser, cb_ns_start, cb_ns_end); #if HAVE_ICONV_H XML_SetUnknownEncodingHandler (parser, cb_encoding_handler, &uinfo); #endif while (!done) { int r; void *buf = XML_GetBuffer (parser, XML_CHUNK); if (!buf) { /* error */ yaz_log (YLOG_WARN, "XML_GetBuffer fail"); break; } r = stream->readf(stream, buf, XML_CHUNK); if (r < 0) { /* error */ yaz_log (YLOG_WARN, "XML read fail"); break; } else if (r == 0) done = 1; else no_read += r; if (no_read && !XML_ParseBuffer (parser, r, done)) { done = 1; report_xml_error(parser); } } XML_ParserFree (parser); if (no_read == 0) return 0; if (!uinfo.d1_stack[1] || !done) return 0; /* insert XML header if not present .. */ first_node = uinfo.d1_stack[0]->child; if (first_node->which != DATA1N_preprocess || strcmp(first_node->u.preprocess.target, "xml")) { const char *attr_list[5]; attr_list[0] = "version"; attr_list[1] = "1.0"; attr_list[2] = "encoding"; attr_list[3] = "UTF-8"; /* encoding */ attr_list[4] = 0; data1_insert_preprocess (uinfo.dh, uinfo.nmem, "xml", attr_list, uinfo.d1_stack[0]); } return uinfo.d1_stack[0]; } struct xml_info { XML_Expat_Version expat_version; }; static data1_node *grs_read_xml(struct grs_read_info *p) { return zebra_read_xml(p->dh, p->stream, p->mem); } static void *filter_init(Res res, RecType recType) { struct xml_info *p = (struct xml_info *) xmalloc (sizeof(*p)); p->expat_version = XML_ExpatVersionInfo(); return p; } static void filter_destroy(void *clientData) { struct xml_info *p = (struct xml_info *) clientData; xfree (p); } static int filter_extract(void *clientData, struct recExtractCtrl *ctrl) { return zebra_grs_extract(clientData, ctrl, grs_read_xml); } static int filter_retrieve(void *clientData, struct recRetrieveCtrl *ctrl) { return zebra_grs_retrieve(clientData, ctrl, grs_read_xml); } static struct recType filter_type = { 0, "grs.xml", filter_init, 0, filter_destroy, filter_extract, filter_retrieve, }; RecType #ifdef IDZEBRA_STATIC_GRS_XML idzebra_filter_grs_xml #else idzebra_filter #endif [] = { &filter_type, 0, }; #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/index.h0000644000175000017500000003324611412332551012536 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef ZEBRA_INDEX_H #define ZEBRA_INDEX_H #include #include #include #include #include #include #if HAVE_SYS_TIMES_H #include #endif #include #include #include #include #include #include #include #include #include "recindex.h" #include #include "zinfo.h" #include #include #include #include #include YAZ_BEGIN_CDECL #define ISAM_DEFAULT "b" enum dirsKind { dirs_dir, dirs_file }; struct dir_entry { enum dirsKind kind; char *name; time_t mtime; }; struct dirs_entry { enum dirsKind kind; char path[256]; zint sysno; time_t mtime; }; void getFnameTmp(Res res, char *fname, int no); struct dirs_info *dirs_open(Dict dict, const char *rep, int rw); struct dirs_info *dirs_fopen(Dict dict, const char *path, int rw); struct dirs_entry *dirs_read(struct dirs_info *p); struct dirs_entry *dirs_last(struct dirs_info *p); void dirs_mkdir(struct dirs_info *p, const char *src, time_t mtime); void dirs_rmdir(struct dirs_info *p, const char *src); void dirs_add(struct dirs_info *p, const char *src, zint sysno, time_t mtime); void dirs_del(struct dirs_info *p, const char *src); void dirs_free(struct dirs_info **pp); struct dir_entry *dir_open(const char *rep, const char *base, int follow_links); void dir_sort(struct dir_entry *e); void dir_free(struct dir_entry **e_p); void repositoryUpdate(ZebraHandle zh, const char *path); void repositoryAdd(ZebraHandle zh, const char *path); void repositoryDelete(ZebraHandle zh, const char *path); void repositoryShow(ZebraHandle zh, const char *path); void inv_prstat(ZebraHandle zh); void inv_compact(BFiles bfs); void key_input(ZebraHandle zh, int nkeys, int cache, Res res); ISAMS_M *key_isams_m(Res res, ISAMS_M *me); ISAMC_M *key_isamc_m(Res res, ISAMC_M *me); #define FNAME_DICT "dict" #define FNAME_ISAM "isam" #define FNAME_ISAMC "isamc" #define FNAME_ISAMS "isams" #define FNAME_CONFIG "zebra.cfg" #define GMATCH_DICT "gmatch" #define FMATCH_DICT "fmatch%d" void zebra_lock_prefix(Res res, char *dst); #define FNAME_MAIN_LOCK "zebraidx.LCK" #define FNAME_COMMIT_LOCK "zebracmt.LCK" #define FNAME_ORG_LOCK "zebraorg.LCK" #define FNAME_TOUCH_TIME "zebraidx.time" typedef struct zebra_set *ZebraSet; typedef struct zebra_rank_class { struct rank_control *control; int init_flag; void *class_handle; struct zebra_rank_class *next; } *ZebraRankClass; #include "reckeys.h" #include "key_block.h" struct zebra_register { char *name; ISAMS isams; ISAMC isamc; ISAMB isamb; Dict dict; Dict matchDict; zebra_sort_index_t sort_index; int registerState; /* 0 (no commit pages), 1 (use commit pages) */ time_t registerChange; BFiles bfs; Records records; ZebraExplainInfo zei; char *server_path_prefix; data1_handle dh; zebra_maps_t zebra_maps; ZebraRankClass rank_classes; RecTypes recTypes; int seqno; int last_val; int stop_flag; zebra_rec_keys_t keys; zebra_rec_keys_t sortKeys; zebra_key_block_t key_block; }; struct zebra_service { int stop_flag; Res global_res; struct zebra_session *sessions; struct zebra_register *regs; Zebra_mutex_cond session_lock; Passwd_db passwd_db; Res dbaccess; const char *path_root; RecTypeClass record_classes; NMEM nmem; yaz_timing_t timing; }; struct zebra_session { struct zebra_session *next; struct zebra_service *service; struct zebra_register *reg; char *xadmin_databaseName; char **basenames; int num_basenames; zint approx_limit; char *reg_name; char *path_reg; ZebraLockHandle lock_normal; ZebraLockHandle lock_shadow; int trans_no; int trans_w_no; int destroyed; ZebraSet sets; Res res; Res session_res; char *user_perm; char *dbaccesslist; int errCode; char *errString; int partial_result; #if HAVE_SYS_TIMES_H struct tms tms1; struct tms tms2; #endif int shadow_enable; int m_staticrank; int m_segment_indexing; zint records_inserted; zint records_updated; zint records_deleted; zint records_processed; zint records_skipped; char *record_encoding; yaz_iconv_t iconv_to_utf8; yaz_iconv_t iconv_from_utf8; int m_follow_links; const char *m_group; const char *m_record_id; const char *m_record_type; int m_store_data; int m_store_keys; int m_explain_database; int m_flag_rw; int m_file_verbose_limit; void *store_data_buf; size_t store_data_size; NMEM nmem_error; struct zebra_limit *m_limit; int (*break_handler_func)(void *client_data); void *break_handler_data; }; struct term_set_entry { char *term; struct term_set_entry *next; }; struct term_set_list { struct term_set_entry *first; struct term_set_entry *last; }; void zebra_limit_destroy(struct zebra_limit *zl); struct zebra_limit *zebra_limit_create(int exclude_flag, zint *ids); void zebra_limit_for_rset(struct zebra_limit *zl, int (**filter_func)(const void *buf, void *data), void (**filter_destroy)(void *data), void **filter_data); struct rset_key_control *zebra_key_control_create(ZebraHandle zh); ZEBRA_RES rpn_search_top(ZebraHandle zh, Z_RPNStructure *zs, const Odr_oid *attributeSet, zint hits_limit, NMEM stream, NMEM rset_nmem, Z_SortKeySpecList *sort_sequence, int num_bases, const char **basenames, RSET *result_set); ZEBRA_RES rpn_get_top_approx_limit(ZebraHandle zh, Z_RPNStructure *zs, zint *approx_limit); ZEBRA_RES rpn_scan(ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt, const Odr_oid *attributeset, int num_bases, char **basenames, int *position, int *num_entries, ZebraScanEntry **list, int *is_partial, const char *set_name); RSET rset_trunc(ZebraHandle zh, ISAM_P *isam_p, int no, const char *term, int length_term, const char *flags, int preserve_position, int term_type, NMEM rset_nmem, struct rset_key_control *kctrl, int scope, struct ord_list *ol, const char *index_type, zint hits_limit, const char *term_ref_id); ZEBRA_RES resultSetGetBaseNames(ZebraHandle zh, const char *setname, const char ***basenames, int *num_bases); void resultSetAddTerm(ZebraHandle zh, ZebraSet s, int reg_type, const char *db, const char *index_name, const char *term); ZebraSet resultSetAdd(ZebraHandle zh, const char *name, int ov); ZebraSet resultSetGet(ZebraHandle zh, const char *name); ZEBRA_RES resultSetAddRPN(ZebraHandle zh, NMEM m, Z_RPNQuery *rpn, int num_bases, char **basenames, const char *setname, zint *hits, int *estimated_hit_count); RSET resultSetRef(ZebraHandle zh, const char *resultSetId); void resultSetDestroy(ZebraHandle zh, int num_names, char **names, int *statuses); ZEBRA_RES resultSetSort(ZebraHandle zh, NMEM nmem, int num_input_setnames, const char **input_setnames, const char *output_setname, Z_SortKeySpecList *sort_sequence, int *sort_status); ZEBRA_RES resultSetSortSingle(ZebraHandle zh, NMEM nmem, ZebraSet sset, RSET rset, Z_SortKeySpecList *sort_sequence, int *sort_status); ZEBRA_RES resultSetRank(ZebraHandle zh, ZebraSet zebraSet, RSET rset, NMEM nmem); void resultSetInvalidate(ZebraHandle zh); int zebra_record_fetch(ZebraHandle zh, const char *setname, zint sysno, int score, ODR stream, const Odr_oid *input_format, Z_RecordComposition *comp, const Odr_oid **output_format, char **rec_bufp, int *rec_lenp, char **basenamep, WRBUF addinfo_w); void extract_get_fname_tmp(ZebraHandle zh, char *fname, int no); void extract_snippet(ZebraHandle zh, zebra_snippets *sn, struct ZebraRecStream *stream, RecType rt, void *recTypeClientData); int zebra_get_rec_snippets(ZebraHandle zh, zint sysno, zebra_snippets *snippets); void zebra_index_merge(ZebraHandle zh); ZEBRA_RES zebra_buffer_extract_record(ZebraHandle zh, const char *buf, size_t buf_size, enum zebra_recctrl_action_t action, const char *recordType, zint *sysno, const char *match_criteria, const char *fname); YAZ_EXPORT void zebra_create_stream_mem(struct ZebraRecStream *stream, const char *buf, size_t sz); YAZ_EXPORT void zebra_create_stream_fd(struct ZebraRecStream *stream, int fd, off_t start_offset); void print_rec_keys(ZebraHandle zh, zebra_rec_keys_t reckeys); ZEBRA_RES zebra_rec_keys_to_snippets(ZebraHandle zh, zebra_rec_keys_t reckeys, zebra_snippets *snippets); ZEBRA_RES zebra_snippets_hit_vector(ZebraHandle zh, const char *setname, zint sysno, zebra_snippets *snippets); ZEBRA_RES zebra_extract_explain(void *handle, Record rec, data1_node *n); ZEBRA_RES zebra_extract_file(ZebraHandle zh, zint *sysno, const char *fname, enum zebra_recctrl_action_t action); ZEBRA_RES zebra_begin_read(ZebraHandle zh); ZEBRA_RES zebra_end_read(ZebraHandle zh); int zebra_file_stat(const char *file_name, struct stat *buf, int follow_links); Dict dict_open_res(BFiles bfs, const char *name, int cache, int rw, int compact_flag, Res res); void zebra_setError(ZebraHandle zh, int code, const char *addinfo); void zebra_setError_zint(ZebraHandle zh, int code, zint i); int zebra_term_untrans_iconv(ZebraHandle zh, NMEM stream, const char *index_type, char **dst, const char *src); ZEBRA_RES zebra_get_hit_vector(ZebraHandle zh, const char *setname, zint sysno); int zebra_term_untrans(ZebraHandle zh, const char *index_type, char *dst, const char *src); ZEBRA_RES zebra_apt_get_ord(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char *index_type, const char *xpath_use, const Odr_oid *curAttributeSet, int *ord); ZEBRA_RES zebra_attr_list_get_ord(ZebraHandle zh, Z_AttributeList *attr_list, zinfo_index_category_t cat, const char *index_type, const Odr_oid *curAttributeSet, int *ord); ZEBRA_RES zebra_sort_get_ord(ZebraHandle zh, Z_SortAttributes *sortAttributes, int *ord, int *numerical); ZEBRA_RES zebra_update_file_match(ZebraHandle zh, const char *path); ZEBRA_RES zebra_update_from_path(ZebraHandle zh, const char *path, enum zebra_recctrl_action_t action); ZEBRA_RES zebra_remove_file_match(ZebraHandle zh); struct rpn_char_map_info { zebra_map_t zm; int reg_type; }; void rpn_char_map_prepare(struct zebra_register *reg, zebra_map_t zm, struct rpn_char_map_info *map_info); ZEBRA_RES zapt_term_to_utf8(ZebraHandle zh, Z_AttributesPlusTerm *zapt, char *termz); void zebra_set_partial_result(ZebraHandle zh); int zebra_check_res(Res res); #define FIRST_IN_FIELD_STR "\001^" #define FIRST_IN_FIELD_CHAR 1 #define FIRST_IN_FIELD_LEN 2 ZEBRA_RES zebra_term_limits_APT(ZebraHandle zh, Z_AttributesPlusTerm *zapt, zint *hits_limit_value, const char **term_ref_id_str, NMEM nmem); ZEBRA_RES zebra_result_recid_to_sysno(ZebraHandle zh, const char *setname, zint recid, zint *sysnos, int *no_sysnos); void zebra_count_set(ZebraHandle zh, RSET rset, zint *count, zint approx_limit); RSET zebra_create_rset_isam(ZebraHandle zh, NMEM rset_nmem, struct rset_key_control *kctl, int scope, ISAM_P pos, TERMID termid); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/check_res.c0000644000175000017500000000473711412332551013353 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include "index.h" int zebra_check_res(Res res) { int errors = 0; Res v = res_open(0, 0); res_add(v, "attset", ""); res_add(v, "chdir", ""); res_add(v, "dbaccess", ""); res_add(v, "encoding", ""); res_add(v, "estimatehits", ""); res_add(v, "group", ""); res_add(v, "index", ""); res_add(v, "isam", ""); res_add(v, "isamcDebug", ""); res_add(v, "isamsDebug", ""); res_add(v, "keyTmpDir", ""); res_add(v, "lockDir", ""); res_add(v, "memmax", ""); res_add(v, "modulePath", ""); res_add(v, "perm", "s"); res_add(v, "passwd", ""); res_add(v, "passwd.c", ""); res_add(v, "profilePath", ""); res_add(v, "rank", ""); res_add(v, "recordCompression", ""); res_add(v, "register", ""); res_add(v, "root", ""); res_add(v, "shadow", ""); res_add(v, "segment", ""); res_add(v, "setTmpDir", ""); res_add(v, "sortindex", ""); res_add(v, "sortmax", ""); res_add(v, "staticrank", ""); res_add(v, "threads", ""); res_add(v, "trunclimit", ""); res_add(v, "truncmax", ""); res_add(v, "database", "p"); res_add(v, "explainDatabase", "p"); res_add(v, "fileVerboseLimit", "p"); res_add(v, "followLinks", "p"); res_add(v, "recordId", "p"); res_add(v, "recordType", "ps"); res_add(v, "storeKeys", "p"); res_add(v, "storeData", "p"); res_add(v, "openRW", "p"); res_add(v, "facetNumRecs", ""); res_add(v, "facetMaxChunks", ""); errors = res_check(res, v); res_close(v); return errors; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/zsets.c0000644000175000017500000013064611412332551012574 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #ifdef WIN32 #include #else #include #endif #include "index.h" #include "rank.h" #include #include #define ZSET_SORT_MAX_LEVEL 10 struct zebra_set_term_entry { int reg_type; char *db; char *index_name; char *term; }; struct zebra_set { char *name; RSET rset; NMEM nmem; NMEM rset_nmem; /* for creating the rsets in */ zint hits; int num_bases; const char **basenames; Z_RPNQuery *rpn; Z_SortKeySpecList *sortSpec; struct zset_sort_info *sort_info; struct zebra_set_term_entry *term_entries; int term_entries_max; struct zebra_set *next; int locked; int estimated_hit_count; zint cache_position; /* last position */ RSFD cache_rfd; /* rfd (NULL if not existing) */ zint cache_psysno; /* sysno for last position */ zint approx_limit; /* limit before we do approx */ }; struct zset_sort_entry { zint sysno; int score; }; struct zset_sort_info { int max_entries; int num_entries; struct zset_sort_entry *all_entries; struct zset_sort_entry **entries; }; static int log_level_set=0; static int log_level_sort=0; static int log_level_searchhits=0; static int log_level_searchterms=0; static int log_level_resultsets=0; static void loglevels(void) { if (log_level_set) return; log_level_sort = yaz_log_module_level("sorting"); log_level_searchhits = yaz_log_module_level("searchhits"); log_level_searchterms = yaz_log_module_level("searchterms"); log_level_resultsets = yaz_log_module_level("resultsets"); log_level_set = 1; } static ZEBRA_RES resultSetSearch(ZebraHandle zh, NMEM nmem, NMEM rset_nmem, Z_RPNQuery *rpn, ZebraSet sset) { RSET rset = 0; Z_SortKeySpecList *sort_sequence; int sort_status, i; ZEBRA_RES res = ZEBRA_OK; sort_sequence = (Z_SortKeySpecList *) nmem_malloc(nmem, sizeof(*sort_sequence)); sort_sequence->num_specs = 10; /* FIXME - Hard-coded number */ sort_sequence->specs = (Z_SortKeySpec **) nmem_malloc(nmem, sort_sequence->num_specs * sizeof(*sort_sequence->specs)); for (i = 0; inum_specs; i++) sort_sequence->specs[i] = 0; rpn_get_top_approx_limit(zh, rpn->RPNStructure, &sset->approx_limit); res = rpn_search_top(zh, rpn->RPNStructure, rpn->attributeSetId, sset->approx_limit, nmem, rset_nmem, sort_sequence, sset->num_bases, sset->basenames, &rset); if (res != ZEBRA_OK) { sset->rset = 0; return res; } for (i = 0; sort_sequence->specs[i]; i++) ; sort_sequence->num_specs = i; rset_set_hits_limit(rset, sset->approx_limit); if (!i) { res = resultSetRank(zh, sset, rset, rset_nmem); } else { res = resultSetSortSingle(zh, nmem, sset, rset, sort_sequence, &sort_status); } sset->rset = rset; return res; } ZEBRA_RES resultSetAddRPN(ZebraHandle zh, NMEM m, Z_RPNQuery *rpn, int num_bases, char **basenames, const char *setname, zint *hits, int *estimated_hit_count) { ZebraSet zebraSet; int i; ZEBRA_RES res; *hits = 0; *estimated_hit_count = 0; zebraSet = resultSetAdd(zh, setname, 1); if (!zebraSet) return ZEBRA_FAIL; zebraSet->locked = 1; zebraSet->rpn = 0; zebraSet->nmem = m; zebraSet->rset_nmem = nmem_create(); zebraSet->num_bases = num_bases; zebraSet->basenames = nmem_malloc(zebraSet->nmem, num_bases * sizeof(*zebraSet->basenames)); for (i = 0; ibasenames[i] = nmem_strdup(zebraSet->nmem, basenames[i]); res = resultSetSearch(zh, zebraSet->nmem, zebraSet->rset_nmem, rpn, zebraSet); *hits = zebraSet->hits; if (zebraSet->estimated_hit_count) *estimated_hit_count = 1; if (zebraSet->rset) zebraSet->rpn = rpn; zebraSet->locked = 0; if (!zebraSet->rset) return ZEBRA_FAIL; return res; } void resultSetAddTerm(ZebraHandle zh, ZebraSet s, int reg_type, const char *db, const char *index_name, const char *term) { assert(zh); /* compiler shut up */ if (!s->nmem) s->nmem = nmem_create(); if (!s->term_entries) { int i; s->term_entries_max = 1000; s->term_entries = nmem_malloc(s->nmem, s->term_entries_max * sizeof(*s->term_entries)); for (i = 0; i < s->term_entries_max; i++) s->term_entries[i].term = 0; } if (s->hits < s->term_entries_max) { s->term_entries[s->hits].reg_type = reg_type; s->term_entries[s->hits].db = nmem_strdup(s->nmem, db); s->term_entries[s->hits].index_name = nmem_strdup(s->nmem, index_name); s->term_entries[s->hits].term = nmem_strdup(s->nmem, term); } (s->hits)++; } ZebraSet resultSetAdd(ZebraHandle zh, const char *name, int ov) { ZebraSet s; int i; for (s = zh->sets; s; s = s->next) if (!strcmp(s->name, name)) break; if (!log_level_set) loglevels(); if (s) { yaz_log(log_level_resultsets, "updating result set %s", name); if (!ov || s->locked) return NULL; if (s->rset) { if (s->cache_rfd) rset_close(s->cache_rfd); rset_delete(s->rset); } if (s->rset_nmem) nmem_destroy(s->rset_nmem); if (s->nmem) nmem_destroy(s->nmem); } else { const char *sort_max_str = zebra_get_resource(zh, "sortmax", "1000"); yaz_log(log_level_resultsets, "adding result set %s", name); s = (ZebraSet) xmalloc(sizeof(*s)); s->next = zh->sets; zh->sets = s; s->name = xstrdup(name); s->sort_info = (struct zset_sort_info *) xmalloc(sizeof(*s->sort_info)); s->sort_info->max_entries = atoi(sort_max_str); if (s->sort_info->max_entries < 2) s->sort_info->max_entries = 2; s->sort_info->entries = (struct zset_sort_entry **) xmalloc(sizeof(*s->sort_info->entries) * s->sort_info->max_entries); s->sort_info->all_entries = (struct zset_sort_entry *) xmalloc(sizeof(*s->sort_info->all_entries) * s->sort_info->max_entries); for (i = 0; i < s->sort_info->max_entries; i++) s->sort_info->entries[i] = s->sort_info->all_entries + i; } s->locked = 0; s->term_entries = 0; s->hits = 0; s->rset = 0; s->rset_nmem = 0; s->nmem = 0; s->rpn = 0; s->sortSpec = 0; s->cache_position = 0; s->cache_rfd = 0; s->approx_limit = zh->approx_limit; s->estimated_hit_count = 0; return s; } ZebraSet resultSetGet(ZebraHandle zh, const char *name) { ZebraSet s; for (s = zh->sets; s; s = s->next) if (!strcmp(s->name, name)) { if (!s->term_entries && !s->rset && s->rpn) { NMEM nmem = nmem_create(); yaz_log(log_level_resultsets, "research %s", name); if (!s->rset_nmem) s->rset_nmem = nmem_create(); resultSetSearch(zh, nmem, s->rset_nmem, s->rpn, s); if (s->rset && s->sortSpec) { int sort_status; yaz_log(log_level_resultsets, "resort %s", name); resultSetSortSingle(zh, nmem, s, s->rset, s->sortSpec, &sort_status); } nmem_destroy(nmem); } return s; } return NULL; } ZEBRA_RES resultSetGetBaseNames(ZebraHandle zh, const char *setname, const char ***basenames, int *num_bases) { ZebraSet sset = resultSetGet(zh, setname); if (!sset) return ZEBRA_FAIL; *basenames = sset->basenames; *num_bases = sset->num_bases; return ZEBRA_OK; } void resultSetInvalidate(ZebraHandle zh) { ZebraSet s = zh->sets; yaz_log(log_level_resultsets, "invalidating result sets"); for (; s; s = s->next) { if (s->rset) { if (s->cache_rfd) rset_close(s->cache_rfd); rset_delete(s->rset); } s->rset = 0; s->cache_rfd = 0; s->cache_position = 0; if (s->rset_nmem) nmem_destroy(s->rset_nmem); s->rset_nmem=0; } } void resultSetDestroy(ZebraHandle zh, int num, char **names,int *statuses) { ZebraSet * ss = &zh->sets; int i; if (statuses) for (i = 0; i= 0) { for (i = 0; iname, names[i])) { if (statuses) statuses[i] = Z_DeleteStatus_success; i = -1; break; } } if (i < 0) { *ss = s->next; xfree(s->sort_info->all_entries); xfree(s->sort_info->entries); xfree(s->sort_info); if (s->nmem) nmem_destroy(s->nmem); if (s->rset) { if (s->cache_rfd) rset_close(s->cache_rfd); rset_delete(s->rset); } if (s->rset_nmem) nmem_destroy(s->rset_nmem); xfree(s->name); xfree(s); } else ss = &s->next; } } ZebraMetaRecord *zebra_meta_records_create_range(ZebraHandle zh, const char *name, zint start, int num) { zint pos_small[10]; zint *pos = pos_small; ZebraMetaRecord *mr; int i; if (num > 10000 || num <= 0) return 0; if (num > 10) pos = xmalloc(sizeof(*pos) * num); for (i = 0; i 10) xfree(pos); return mr; } ZebraMetaRecord *zebra_meta_records_create(ZebraHandle zh, const char *name, int num, zint *positions) { ZebraSet sset; ZebraMetaRecord *sr = 0; RSET rset; int i; struct zset_sort_info *sort_info; size_t sysno_mem_index = 0; if (zh->m_staticrank) sysno_mem_index = 1; if (!log_level_set) loglevels(); if (!(sset = resultSetGet(zh, name))) return NULL; if (!(rset = sset->rset)) { if (!sset->term_entries) return 0; sr = (ZebraMetaRecord *) xmalloc(sizeof(*sr) * num); for (i = 0; iterm_entries_max) { sr[i].term = sset->term_entries[positions[i]-1].term; sr[i].db = sset->term_entries[positions[i]-1].db; } } } else { sr = (ZebraMetaRecord *) xmalloc(sizeof(*sr) * num); for (i = 0; isort_info; if (sort_info) { zint position; for (i = 0; i 0 && position <= sort_info->num_entries) { yaz_log(log_level_sort, "got pos=" ZINT_FORMAT " (sorted)", position); sr[i].sysno = sort_info->entries[position-1]->sysno; sr[i].score = sort_info->entries[position-1]->score; } } } /* did we really get all entries using sort ? */ for (i = 0; inum_entries; while (num_i < num && positions[num_i] <= position) num_i++; if (sset->cache_rfd && num_i < num && positions[num_i] > sset->cache_position) { position = sset->cache_position; rfd = sset->cache_rfd; psysno = sset->cache_psysno; } else { if (sset->cache_rfd) rset_close(sset->cache_rfd); rfd = rset_open(rset, RSETF_READ); } while (num_i < num && rset_read(rfd, &key, 0)) { zint this_sys = key.mem[sysno_mem_index]; if (this_sys != psysno) { psysno = this_sys; if (sort_info) { /* determine we alreay have this in our set */ for (i = sort_info->num_entries; --i >= 0; ) if (psysno == sort_info->entries[i]->sysno) break; if (i >= 0) continue; } position++; assert(num_i < num); if (position == positions[num_i]) { sr[num_i].sysno = psysno; yaz_log(log_level_sort, "got pos=" ZINT_FORMAT " (unsorted)", position); sr[num_i].score = -1; num_i++; } } } sset->cache_position = position; sset->cache_psysno = psysno; sset->cache_rfd = rfd; } } return sr; } void zebra_meta_records_destroy(ZebraHandle zh, ZebraMetaRecord *records, int num) { assert(zh); /* compiler shut up about unused arg */ xfree(records); } struct sortKeyInfo { int relation; int *ord; /* array of ord for each database searched */ int *numerical; /* array of ord for each database searched */ const char *index_type; }; void resultSetInsertSort(ZebraHandle zh, ZebraSet sset, int database_no, struct sortKeyInfo *criteria, int num_criteria, zint sysno, char *cmp_buf[], char *tmp_cmp_buf[]) { struct zset_sort_entry *new_entry = NULL; struct zset_sort_info *sort_info = sset->sort_info; int i, j; WRBUF w = wrbuf_alloc(); zebra_sort_sysno(zh->reg->sort_index, sysno); for (i = 0; ireg->sort_index, criteria[i].ord[database_no]); wrbuf_rewind(w); if (zebra_sort_read(zh->reg->sort_index, 0, w)) { /* consider each sort entry and take lowest/highest one of the one as sorting key depending on whether sort is ascending/descending */ int off = 0; while (off != wrbuf_len(w)) { size_t l = strlen(wrbuf_buf(w)+off); assert(off < wrbuf_len(w)); if (l >= SORT_IDX_ENTRYSIZE) l = SORT_IDX_ENTRYSIZE-1; if ( (off == 0) || (criteria[i].relation == 'A' && strcmp(wrbuf_buf(w)+off, this_entry_buf) < 0) || (criteria[i].relation == 'D' && strcmp(wrbuf_buf(w)+off, this_entry_buf) > 0) ) { memcpy(this_entry_buf, wrbuf_buf(w)+off, l); this_entry_buf[l] = '\0'; } off += 1 + strlen(wrbuf_buf(w)+off); } } } else { yaz_log(log_level_sort, "criteria[i].ord is -1 so not reading from sort index"); } } wrbuf_destroy(w); i = sort_info->num_entries; while (--i >= 0) { int rel = 0; for (j = 0; j 0.0) rel = 1; else if (diff < 0.0) rel = -1; else rel = 0; } else { rel = memcmp(this_entry_buf, other_entry_buf, SORT_IDX_ENTRYSIZE); } /* when the compare is equal, continue to next criteria, else break out */ if (rel) break; } if (!rel) break; if (criteria[j].relation == 'A') { if (rel > 0) break; } else if (criteria[j].relation == 'D') { if (rel < 0) break; } } ++i; yaz_log(log_level_sort, "ok, we want to insert record at position %d",i); j = sort_info->max_entries; if (i == j){ yaz_log(log_level_sort, "sort_info->max_entries reached (%d) abort sort",j); return; } if (sort_info->num_entries == j) --j; else j = (sort_info->num_entries)++; new_entry = sort_info->entries[j]; /* move up all higher entries (to make room) */ while (j != i) { int k; for (k = 0; kentries[j] = sort_info->entries[j-1]; --j; } /* and insert the new entry at the correct place */ sort_info->entries[i] = new_entry; assert(new_entry); /* and add this to the compare buffer */ for (i = 0; isysno = sysno; new_entry->score = -1; } void resultSetInsertRank(ZebraHandle zh, struct zset_sort_info *sort_info, zint sysno, int score, int relation) { struct zset_sort_entry *new_entry = NULL; int i, j; assert(zh); /* compiler shut up about unused arg */ i = sort_info->num_entries; while (--i >= 0) { int rel = 0; rel = score - sort_info->entries[i]->score; if (relation == 'D') { if (rel >= 0) break; } else if (relation == 'A') { if (rel <= 0) break; } } ++i; j = sort_info->max_entries; if (i == j) return; if (sort_info->num_entries == j) --j; else j = (sort_info->num_entries)++; new_entry = sort_info->entries[j]; while (j != i) { sort_info->entries[j] = sort_info->entries[j-1]; --j; } sort_info->entries[i] = new_entry; assert(new_entry); new_entry->sysno = sysno; new_entry->score = score; } static Z_RPNQuery *copy_RPNQuery(Z_RPNQuery *src, NMEM nmem) { Z_RPNQuery *dst = 0; ODR encode = odr_createmem(ODR_ENCODE); ODR decode = odr_createmem(ODR_DECODE); if (z_RPNQuery(encode, &src, 0, 0)) { int len; char *buf = odr_getbuf(encode, &len, 0); if (buf) { odr_setbuf(decode, buf, len, 0); z_RPNQuery(decode, &dst, 0, 0); } } nmem_transfer(nmem, decode->mem); odr_destroy(encode); odr_destroy(decode); return dst; } static Z_SortKeySpecList *copy_SortKeySpecList(Z_SortKeySpecList *src, NMEM nmem) { Z_SortKeySpecList *dst = 0; ODR encode = odr_createmem(ODR_ENCODE); ODR decode = odr_createmem(ODR_DECODE); if (z_SortKeySpecList(encode, &src, 0, 0)) { int len; char *buf = odr_getbuf(encode, &len, 0); if (buf) { odr_setbuf(decode, buf, len, 0); z_SortKeySpecList(decode, &dst, 0, 0); } } nmem_transfer(nmem, decode->mem); odr_destroy(encode); odr_destroy(decode); return dst; } ZebraSet resultSetClone(ZebraHandle zh, const char *setname, ZebraSet rset) { ZebraSet nset; int i; nset = resultSetAdd(zh, setname, 1); if (!nset) return 0; nset->nmem = nmem_create(); nset->num_bases = rset->num_bases; nset->basenames = nmem_malloc(nset->nmem, nset->num_bases * sizeof(*rset->basenames)); for (i = 0; inum_bases; i++) nset->basenames[i] = nmem_strdup(nset->nmem, rset->basenames[i]); if (rset->rset) nset->rset = rset_dup(rset->rset); if (rset->rpn) nset->rpn = copy_RPNQuery(rset->rpn, nset->nmem); return nset; } ZEBRA_RES resultSetSort(ZebraHandle zh, NMEM nmem, int num_input_setnames, const char **input_setnames, const char *output_setname, Z_SortKeySpecList *sort_sequence, int *sort_status) { ZebraSet sset; RSET rset; if (num_input_setnames == 0) { zebra_setError(zh, YAZ_BIB1_NO_RESULT_SET_NAME_SUPPLIED_ON_SORT, 0); return ZEBRA_FAIL; } if (num_input_setnames > 1) { zebra_setError(zh, YAZ_BIB1_SORT_TOO_MANY_INPUT_RESULTS, 0); return ZEBRA_FAIL; } if (!log_level_set) loglevels(); yaz_log(log_level_sort, "result set sort input=%s output=%s", *input_setnames, output_setname); sset = resultSetGet(zh, input_setnames[0]); if (!sset) { zebra_setError(zh, YAZ_BIB1_SPECIFIED_RESULT_SET_DOES_NOT_EXIST, input_setnames[0]); return ZEBRA_FAIL; } if (!(rset = sset->rset)) { zebra_setError(zh, YAZ_BIB1_SPECIFIED_RESULT_SET_DOES_NOT_EXIST, input_setnames[0]); return ZEBRA_FAIL; } if (strcmp(output_setname, input_setnames[0])) sset = resultSetClone(zh, output_setname, sset); sset->sortSpec = copy_SortKeySpecList(sort_sequence, sset->nmem); return resultSetSortSingle(zh, nmem, sset, rset, sort_sequence, sort_status); } ZEBRA_RES resultSetSortSingle(ZebraHandle zh, NMEM nmem, ZebraSet sset, RSET rset, Z_SortKeySpecList *sort_sequence, int *sort_status) { int i; int ib; int n = 0; zint kno = 0; zint psysno = 0; struct it_key key; struct sortKeyInfo sort_criteria[ZSET_SORT_MAX_LEVEL]; char *cmp_buf[ZSET_SORT_MAX_LEVEL]; char *tmp_cmp_buf[ZSET_SORT_MAX_LEVEL]; int num_criteria; RSFD rfd; TERMID termid; TERMID *terms; int numTerms = 0; size_t sysno_mem_index = 0; int numbases = zh->num_basenames; yaz_log(log_level_sort, "searching %d databases",numbases); if (zh->m_staticrank) sysno_mem_index = 1; assert(nmem); /* compiler shut up about unused param */ sset->sort_info->num_entries = 0; rset_getterms(rset, 0, 0, &n); terms = (TERMID *) nmem_malloc(nmem, sizeof(*terms)*n); rset_getterms(rset, terms, n, &numTerms); sset->hits = 0; num_criteria = sort_sequence->num_specs; if (num_criteria > ZSET_SORT_MAX_LEVEL) num_criteria = ZSET_SORT_MAX_LEVEL; /* set up the search criteria */ for (i = 0; i < num_criteria; i++) { Z_SortKeySpec *sks = sort_sequence->specs[i]; Z_SortKey *sk; ZEBRA_RES res; sort_criteria[i].ord = (int *) nmem_malloc(nmem, sizeof(int)*numbases); sort_criteria[i].numerical = (int *) nmem_malloc(nmem, sizeof(int)*numbases); /* initialize ord and numerical for each database */ for (ib = 0; ib < numbases; ib++) { sort_criteria[i].ord[ib] = -1; sort_criteria[i].numerical[ib] = 0; } if (sks->which == Z_SortKeySpec_missingValueData) { zebra_setError(zh, YAZ_BIB1_UNSUPP_MISSING_DATA_ACTION, 0); return ZEBRA_FAIL; } if (*sks->sortRelation == Z_SortKeySpec_ascending) sort_criteria[i].relation = 'A'; else if (*sks->sortRelation == Z_SortKeySpec_descending) sort_criteria[i].relation = 'D'; else { zebra_setError(zh, YAZ_BIB1_ILLEGAL_SORT_RELATION, 0); return ZEBRA_FAIL; } if (sks->sortElement->which == Z_SortElement_databaseSpecific) { zebra_setError(zh, YAZ_BIB1_DATABASE_SPECIFIC_SORT_UNSUPP, 0); return ZEBRA_FAIL; } else if (sks->sortElement->which != Z_SortElement_generic) { zebra_setError(zh, YAZ_BIB1_SORT_ILLEGAL_SORT, 0); return ZEBRA_FAIL; } sk = sks->sortElement->u.generic; switch (sk->which) { case Z_SortKey_sortField: yaz_log(log_level_sort, "key %d is of type sortField", i+1); for (ib = 0; ib < numbases; ib++) { zebraExplain_curDatabase(zh->reg->zei, zh->basenames[ib]); sort_criteria[i].numerical[ib] = 0; sort_criteria[i].ord[ib] = zebraExplain_lookup_attr_str(zh->reg->zei, zinfo_index_category_sort, 0, sk->u.sortField); if (sks->which != Z_SortKeySpec_null && sort_criteria[i].ord[ib] == -1) { zebra_setError(zh, YAZ_BIB1_CANNOT_SORT_ACCORDING_TO_SEQUENCE, 0); return ZEBRA_FAIL; } } break; case Z_SortKey_elementSpec: yaz_log(log_level_sort, "key %d is of type elementSpec", i+1); zebra_setError(zh, YAZ_BIB1_CANNOT_SORT_ACCORDING_TO_SEQUENCE, 0); return ZEBRA_FAIL; case Z_SortKey_sortAttributes: yaz_log(log_level_sort, "key %d is of type sortAttributes", i+1); /* for every database we searched, get the sort index file id (ord) and its numerical indication and store them in the sort_criteria */ for (ib = 0; ib < numbases; ib++) { zebraExplain_curDatabase(zh->reg->zei, zh->basenames[ib]); res = zebra_sort_get_ord(zh, sk->u.sortAttributes, &sort_criteria[i].ord[ib], &sort_criteria[i].numerical[ib]); } if (sks->which != Z_SortKeySpec_null && res != ZEBRA_OK) return ZEBRA_FAIL; break; } /* right now we look up the index type based on the first database if the index_type's can differ between the indexes of different databases (which i guess they can?) then we have to store the index types for each database, just like the ord and numerical */ if (zebraExplain_lookup_ord(zh->reg->zei, sort_criteria[i].ord[0], &sort_criteria[i].index_type, 0, 0)) { zebra_setError(zh, YAZ_BIB1_CANNOT_SORT_ACCORDING_TO_SEQUENCE, 0); return ZEBRA_FAIL; } } /* allocate space for each cmpare buf + one extra for tmp comparison */ /* cmp_buf is an array of array, the first dimension is the criteria and the second dimension are all other result entries to compare against. This is slowly filled when records are processed. tmp_cmp_buf is an array with a value of the current record for each criteria */ for (i = 0; isort_info->max_entries * SORT_IDX_ENTRYSIZE); tmp_cmp_buf[i] = xmalloc(SORT_IDX_ENTRYSIZE); } rfd = rset_open(rset, RSETF_READ); while (rset_read(rfd, &key, &termid)) { zint this_sys = key.mem[sysno_mem_index]; if (log_level_searchhits) key_logdump_txt(log_level_searchhits, &key, termid->name); kno++; if (this_sys != psysno) { int database_no = 0; if ((sset->hits & 255) == 0 && zh->break_handler_func) { if (zh->break_handler_func(zh->break_handler_data)) { rset_set_hits_limit(rset, 0); break; } } (sset->hits)++; psysno = this_sys; /* determine database from the term, but only bother if more than one database is in use*/ if (numbases > 1 && termid->ol) { const char *this_db = 0; if (zebraExplain_lookup_ord(zh->reg->zei, termid->ol->ord, 0, &this_db, 0) == 0 && this_db) { for (ib = 0; ib < numbases; ib++) if (!strcmp(this_db, zh->basenames[ib])) database_no = ib; } } #if 0 yaz_log(YLOG_LOG, "sysno=" ZINT_FORMAT " database_no=%d", this_sys, database_no); ord_list_print(termid->ol); #endif resultSetInsertSort(zh, sset, database_no, sort_criteria, num_criteria, psysno, cmp_buf, tmp_cmp_buf); } } rset_close(rfd); /* free the compare buffers */ for (i = 0; ihits); for (i = 0; i < numTerms; i++) yaz_log(log_level_sort, "term=\"%s\" type=%s count=" ZINT_FORMAT, terms[i]->name, terms[i]->flags, terms[i]->rset->hits_count); *sort_status = Z_SortResponse_success; return ZEBRA_OK; } RSET resultSetRef(ZebraHandle zh, const char *resultSetId) { ZebraSet s; if ((s = resultSetGet(zh, resultSetId))) return s->rset; return NULL; } ZEBRA_RES resultSetRank(ZebraHandle zh, ZebraSet zebraSet, RSET rset, NMEM nmem) { struct it_key key; TERMID termid; TERMID *terms; zint kno = 0; int numTerms = 0; int n = 0; int i; ZebraRankClass rank_class; struct zset_sort_info *sort_info; const char *rank_handler_name = res_get_def(zh->res, "rank", "rank-1"); size_t sysno_mem_index = 0; if (zh->m_staticrank) sysno_mem_index = 1; if (!log_level_set) loglevels(); sort_info = zebraSet->sort_info; sort_info->num_entries = 0; zebraSet->hits = 0; zebraSet->estimated_hit_count = 0; rset_getterms(rset, 0, 0, &n); terms = (TERMID *) nmem_malloc(nmem, sizeof(*terms)*n); rset_getterms(rset, terms, n, &numTerms); rank_class = zebraRankLookup(zh, rank_handler_name); if (!rank_class) { yaz_log(YLOG_WARN, "No such rank handler: %s", rank_handler_name); zebra_setError(zh, YAZ_BIB1_UNSUPP_SEARCH, "Cannot find rank handler"); return ZEBRA_FAIL; } else { RSFD rfd = rset_open(rset, RSETF_READ); struct rank_control *rc = rank_class->control; int score; zint count = 0; void *handle = (*rc->begin) (zh->reg, rank_class->class_handle, rset, nmem, terms, numTerms); zint psysno = 0; /* previous doc id / sys no */ zint pstaticrank = 0; /* previous static rank */ int stop_flag = 0; while (rset_read(rfd, &key, &termid)) { zint this_sys = key.mem[sysno_mem_index]; zint seqno = key.mem[key.len-1]; kno++; if (log_level_searchhits) key_logdump_txt(log_level_searchhits, &key, termid->name); if (this_sys != psysno) { /* new record .. */ if (!(rfd->counted_items & 255) && zh->break_handler_func) { if (zh->break_handler_func(zh->break_handler_data)) { yaz_log(YLOG_LOG, "Aborted search"); stop_flag = 1; } } if (rfd->counted_items > rset->hits_limit) stop_flag = 1; if (stop_flag) { zebraSet->estimated_hit_count = 1; break; } if (psysno) { /* only if we did have a previous record */ score = (*rc->calc)(handle, psysno, pstaticrank, &stop_flag); /* insert the hit. A=Ascending */ resultSetInsertRank(zh, sort_info, psysno, score, 'A'); count++; } psysno = this_sys; if (zh->m_staticrank) pstaticrank = key.mem[0]; } (*rc->add)(handle, CAST_ZINT_TO_INT(seqno), termid); } /* no more items */ if (psysno) { /* we had - at least - one record */ score = (*rc->calc)(handle, psysno, pstaticrank, &stop_flag); /* insert the hit. A=Ascending */ resultSetInsertRank(zh, sort_info, psysno, score, 'A'); count++; } (*rc->end)(zh->reg, handle); rset_close(rfd); } zebraSet->hits = rset->hits_count; yaz_log(log_level_searchterms, ZINT_FORMAT " keys, " ZINT_FORMAT " sysnos, rank", kno, zebraSet->hits); for (i = 0; i < numTerms; i++) { yaz_log(log_level_searchterms, "term=\"%s\" type=%s count=" ZINT_FORMAT, terms[i]->name, terms[i]->flags, terms[i]->rset->hits_count); } return ZEBRA_OK; } ZebraRankClass zebraRankLookup(ZebraHandle zh, const char *name) { ZebraRankClass p = zh->reg->rank_classes; while (p && strcmp(p->control->name, name)) p = p->next; if (p && !p->init_flag) { if (p->control->create) p->class_handle = (*p->control->create)(zh); p->init_flag = 1; } return p; } void zebraRankInstall(struct zebra_register *reg, struct rank_control *ctrl) { ZebraRankClass p = (ZebraRankClass) xmalloc(sizeof(*p)); p->control = (struct rank_control *) xmalloc(sizeof(*p->control)); memcpy(p->control, ctrl, sizeof(*p->control)); p->control->name = xstrdup(ctrl->name); p->init_flag = 0; p->next = reg->rank_classes; reg->rank_classes = p; } void zebraRankDestroy(struct zebra_register *reg) { ZebraRankClass p = reg->rank_classes; while (p) { ZebraRankClass p_next = p->next; if (p->init_flag && p->control->destroy) (*p->control->destroy)(reg, p->class_handle); xfree(p->control->name); xfree(p->control); xfree(p); p = p_next; } reg->rank_classes = NULL; } static int trav_rset_for_termids(RSET rset, TERMID *termid_array, zint *hits_array, int *approx_array) { int no = 0; int i; for (i = 0; ino_children; i++) no += trav_rset_for_termids(rset->children[i], (termid_array ? termid_array + no : 0), (hits_array ? hits_array + no : 0), (approx_array ? approx_array + no : 0)); if (rset->term) { if (termid_array) termid_array[no] = rset->term; if (hits_array) hits_array[no] = rset->hits_count; if (approx_array) approx_array[no] = rset->hits_approx; #if 0 yaz_log(YLOG_LOG, "rset=%p term=%s limit=" ZINT_FORMAT " count=" ZINT_FORMAT, rset, rset->term->name, rset->hits_limit, rset->hits_count); #endif no++; } return no; } ZEBRA_RES zebra_result_set_term_no(ZebraHandle zh, const char *setname, int *num_terms) { ZebraSet sset = resultSetGet(zh, setname); *num_terms = 0; if (sset) { *num_terms = trav_rset_for_termids(sset->rset, 0, 0, 0); return ZEBRA_OK; } return ZEBRA_FAIL; } ZEBRA_RES zebra_result_set_term_info(ZebraHandle zh, const char *setname, int no, zint *count, int *approx, char *termbuf, size_t *termlen, const char **term_ref_id) { ZebraSet sset = resultSetGet(zh, setname); if (sset) { int num_terms = trav_rset_for_termids(sset->rset, 0, 0, 0); if (no >= 0 && no < num_terms) { TERMID *term_array = xmalloc(num_terms * sizeof(*term_array)); zint *hits_array = xmalloc(num_terms * sizeof(*hits_array)); int *approx_array = xmalloc(num_terms * sizeof(*approx_array)); trav_rset_for_termids(sset->rset, term_array, hits_array, approx_array); if (count) *count = hits_array[no]; if (approx) *approx = approx_array[no]; if (termbuf) { char *inbuf = term_array[no]->name; size_t inleft = strlen(inbuf); size_t outleft = *termlen - 1; if (zh->iconv_from_utf8 != 0) { char *outbuf = termbuf; size_t ret; ret = yaz_iconv(zh->iconv_from_utf8, &inbuf, &inleft, &outbuf, &outleft); if (ret == (size_t)(-1)) *termlen = 0; else { yaz_iconv(zh->iconv_from_utf8, 0, 0, &outbuf, &outleft); *termlen = outbuf - termbuf; } } else { if (inleft > outleft) inleft = outleft; *termlen = inleft; memcpy(termbuf, inbuf, *termlen); } termbuf[*termlen] = '\0'; } if (term_ref_id) *term_ref_id = term_array[no]->ref_id; xfree(term_array); xfree(hits_array); xfree(approx_array); return ZEBRA_OK; } } return ZEBRA_FAIL; } ZEBRA_RES zebra_snippets_hit_vector(ZebraHandle zh, const char *setname, zint sysno, zebra_snippets *snippets) { ZebraSet sset = resultSetGet(zh, setname); yaz_log(YLOG_DEBUG, "zebra_get_hit_vector setname=%s zysno=" ZINT_FORMAT, setname, sysno); if (!sset) return ZEBRA_FAIL; else { struct rset_key_control *kc = zebra_key_control_create(zh); NMEM nmem = nmem_create(); struct it_key key; RSET rsets[2], rset_comb; RSET rset_temp = rset_create_temp(nmem, kc, kc->scope, res_get(zh->res, "setTmpDir"),0 ); TERMID termid; RSFD rsfd = rset_open(rset_temp, RSETF_WRITE); key.mem[0] = sysno; key.mem[1] = 0; key.mem[2] = 0; key.mem[3] = 0; key.len = 2; rset_write(rsfd, &key); rset_close(rsfd); rsets[0] = rset_temp; rsets[1] = rset_dup(sset->rset); rset_comb = rset_create_and(nmem, kc, kc->scope, 2, rsets); rsfd = rset_open(rset_comb, RSETF_READ); while (rset_read(rsfd, &key, &termid)) { if (termid) { struct ord_list *ol; for (ol = termid->ol; ol; ol = ol->next) { zebra_snippets_append(snippets, key.mem[key.len-1], 0, ol->ord, termid->name); } } } rset_close(rsfd); rset_delete(rset_comb); nmem_destroy(nmem); kc->dec(kc); } return ZEBRA_OK; } static ZEBRA_RES zebra_recid_to_sysno(ZebraHandle zh, const char **basenames, int num_bases, zint recid, zint *sysnos, int *no_sysnos) { ZEBRA_RES res = ZEBRA_OK; int sysnos_offset = 0; int i; if (!zh->reg->isamb || !zh->m_segment_indexing) { if (sysnos_offset < *no_sysnos) *sysnos = recid; sysnos_offset++; } else { for (i = 0; res == ZEBRA_OK && i < num_bases; i++) { const char *database = basenames[i]; if (zebraExplain_curDatabase(zh->reg->zei, database) == 0) { const char *index_type = "w"; const char *use_string = "_ALLRECORDS"; int ord; zinfo_index_category_t cat = zinfo_index_category_alwaysmatches; ord = zebraExplain_lookup_attr_str(zh->reg->zei, cat, index_type, use_string); if (ord != -1) { char ord_buf[32]; int ord_len = key_SU_encode(ord, ord_buf); char *info; ord_buf[ord_len] = '\0'; info = dict_lookup(zh->reg->dict, ord_buf); if (info) { if (*info != sizeof(ISAM_P)) { res = ZEBRA_FAIL; } else { ISAM_P isam_p; ISAMB_PP pt; struct it_key key_until, key_found; int i = 0; int r; memcpy(&isam_p, info+1, sizeof(ISAM_P)); pt = isamb_pp_open(zh->reg->isamb, isam_p, 2); if (!pt) res = ZEBRA_FAIL; else { key_until.mem[i++] = recid; key_until.mem[i++] = 0; /* section_id */ if (zh->m_segment_indexing) key_until.mem[i++] = 0; /* segment */ key_until.mem[i++] = 0; key_until.len = i; r = isamb_pp_forward(pt, &key_found, &key_until); while (r && key_found.mem[0] == recid) { if (sysnos_offset < *no_sysnos) sysnos[sysnos_offset++] = key_found.mem[key_found.len-1]; r = isamb_pp_read(pt, &key_found); } isamb_pp_close(pt); } } } } } } } *no_sysnos = sysnos_offset; return res; } ZEBRA_RES zebra_result_recid_to_sysno(ZebraHandle zh, const char *setname, zint recid, zint *sysnos, int *no_sysnos) { const char **basenames; int num_bases; ZEBRA_RES res; res = resultSetGetBaseNames(zh, setname, &basenames, &num_bases); if (res != ZEBRA_OK) return ZEBRA_FAIL; return zebra_recid_to_sysno(zh, basenames, num_bases, recid, sysnos, no_sysnos); } void zebra_count_set(ZebraHandle zh, RSET rset, zint *count, zint approx_limit) { zint psysno = 0; struct it_key key; RSFD rfd; yaz_log(YLOG_DEBUG, "count_set"); rset->hits_limit = approx_limit; *count = 0; rfd = rset_open(rset, RSETF_READ); while (rset_read(rfd, &key,0 /* never mind terms */)) { if (key.mem[0] != psysno) { psysno = key.mem[0]; if (rfd->counted_items >= rset->hits_limit) break; } } rset_close(rfd); *count = rset->hits_count; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/update_file.c0000644000175000017500000002237511412332551013704 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #ifdef WIN32 #include #define S_ISREG(x) (x & _S_IFREG) #define S_ISDIR(x) (x & _S_IFDIR) #endif #if HAVE_UNISTD_H #include #endif #include #include #include #include "index.h" #if 0 static int dump_file_dict_func(char *name, const char *info, int pos, void *client) { yaz_log(YLOG_LOG, "%s", name); return 0; } static void dump_file_dict(Dict dict) { int before = 10; int after = 1000; char term[1000]; strcpy(term, "0"); dict_scan(dict, term, &before, &after, 0, dump_file_dict_func); } #endif static int repComp(const char *a, const char *b, size_t len) { if (!len) return 0; return memcmp(a, b, len); } static void fileDelete_r(ZebraHandle zh, struct dirs_info *di, struct dirs_entry *dst, const char *base, char *src) { char tmppath[1024]; size_t src_len = strlen(src); while (dst && !repComp(dst->path, src, src_len+1)) { switch (dst->kind) { case dirs_file: sprintf(tmppath, "%s%s", base, dst->path); zebra_extract_file(zh, &dst->sysno, tmppath, action_delete); strcpy(tmppath, dst->path); dst = dirs_read(di); dirs_del(di, tmppath); break; case dirs_dir: strcpy(tmppath, dst->path); dst = dirs_read(di); dirs_rmdir(di, tmppath); break; default: dst = dirs_read(di); } } } static void file_update_r(ZebraHandle zh, struct dirs_info *di, struct dirs_entry *dst, const char *base, char *src, int level) { struct dir_entry *e_src; int i_src = 0; static char tmppath[1024]; size_t src_len = strlen(src); sprintf(tmppath, "%s%s", base, src); e_src = dir_open(tmppath, zh->path_reg, zh->m_follow_links); yaz_log(YLOG_LOG, "dir %s", tmppath); #if 0 if (!dst || repComp(dst->path, src, src_len)) #else if (!dst || strcmp(dst->path, src)) #endif { if (!e_src) return; if (src_len && src[src_len-1] != '/') { src[src_len] = '/'; src[++src_len] = '\0'; } dirs_mkdir(di, src, 0); if (dst && repComp(dst->path, src, src_len)) dst = NULL; } else if (!e_src) { strcpy(src, dst->path); fileDelete_r(zh, di, dst, base, src); return; } else { if (src_len && src[src_len-1] != '/') { src[src_len] = '/'; src[++src_len] = '\0'; } dst = dirs_read(di); } dir_sort(e_src); while (1) { int sd; if (dst && !repComp(dst->path, src, src_len)) { if (e_src[i_src].name) { yaz_log(YLOG_DEBUG, "dst=%s src=%s", dst->path + src_len, e_src[i_src].name); sd = strcmp(dst->path + src_len, e_src[i_src].name); } else sd = -1; } else if (e_src[i_src].name) sd = 1; else break; yaz_log(YLOG_DEBUG, "trav sd=%d", sd); if (sd == 0) { strcpy(src + src_len, e_src[i_src].name); sprintf(tmppath, "%s%s", base, src); switch(e_src[i_src].kind) { case dirs_file: if (e_src[i_src].mtime > dst->mtime) { if (zebra_extract_file(zh, &dst->sysno, tmppath, action_update) == ZEBRA_OK) { dirs_add(di, src, dst->sysno, e_src[i_src].mtime); } yaz_log(YLOG_DEBUG, "old: %s", ctime(&dst->mtime)); yaz_log(YLOG_DEBUG, "new: %s", ctime(&e_src[i_src].mtime)); } dst = dirs_read(di); break; case dirs_dir: file_update_r(zh, di, dst, base, src, level+1); dst = dirs_last(di); yaz_log(YLOG_DEBUG, "last is %s", dst ? dst->path : "null"); break; default: dst = dirs_read(di); } i_src++; } else if (sd > 0) { zint sysno = 0; strcpy(src + src_len, e_src[i_src].name); sprintf(tmppath, "%s%s", base, src); switch (e_src[i_src].kind) { case dirs_file: if (zebra_extract_file(zh, &sysno, tmppath, action_update) == ZEBRA_OK) dirs_add(di, src, sysno, e_src[i_src].mtime); break; case dirs_dir: file_update_r(zh, di, dst, base, src, level+1); if (dst) dst = dirs_last(di); break; } i_src++; } else /* sd < 0 */ { strcpy(src, dst->path); sprintf(tmppath, "%s%s", base, dst->path); switch (dst->kind) { case dirs_file: zebra_extract_file(zh, &dst->sysno, tmppath, action_delete); dirs_del(di, dst->path); dst = dirs_read(di); break; case dirs_dir: fileDelete_r(zh, di, dst, base, src); dst = dirs_last(di); } } } dir_free(&e_src); } static void file_update_top(ZebraHandle zh, Dict dict, const char *path) { struct dirs_info *di; struct stat sbuf; char src[1024]; char dst[1024]; int src_len, ret; assert(path); if (zh->path_reg && !yaz_is_abspath(path)) { strcpy(src, zh->path_reg); strcat(src, "/"); } else *src = '\0'; strcat(src, path); ret = zebra_file_stat(src, &sbuf, zh->m_follow_links); strcpy(src, path); src_len = strlen(src); if (ret == -1) { yaz_log(YLOG_WARN|YLOG_ERRNO, "Cannot access path %s", src); } else if (S_ISREG(sbuf.st_mode)) { struct dirs_entry *e_dst; di = dirs_fopen(dict, src, zh->m_flag_rw); e_dst = dirs_read(di); if (e_dst) { if (sbuf.st_mtime > e_dst->mtime) if (zebra_extract_file(zh, &e_dst->sysno, src, action_update) == ZEBRA_OK) dirs_add(di, src, e_dst->sysno, sbuf.st_mtime); } else { zint sysno = 0; if (zebra_extract_file(zh, &sysno, src, action_update) == ZEBRA_OK) dirs_add(di, src, sysno, sbuf.st_mtime); } dirs_free(&di); } else if (S_ISDIR(sbuf.st_mode)) { if (src_len && src[src_len-1] != '/') { src[src_len] = '/'; src[++src_len] = '\0'; } di = dirs_open(dict, src, zh->m_flag_rw); *dst = '\0'; file_update_r(zh, di, dirs_read(di), src, dst, 0); dirs_free (&di); } else { yaz_log(YLOG_WARN, "Skipping path %s", src); } } static ZEBRA_RES zebra_open_fmatch(ZebraHandle zh, Dict *dictp) { char fmatch_fname[1024]; int ord; ord = zebraExplain_get_database_ord(zh->reg->zei); sprintf(fmatch_fname, FMATCH_DICT, ord); if (!(*dictp = dict_open_res(zh->reg->bfs, fmatch_fname, 50, zh->m_flag_rw, 0, zh->res))) { yaz_log(YLOG_FATAL, "dict_open fail of %s", fmatch_fname); return ZEBRA_FAIL; } return ZEBRA_OK; } ZEBRA_RES zebra_remove_file_match(ZebraHandle zh) { Dict dict; if (zebra_open_fmatch(zh, &dict) != ZEBRA_OK) return ZEBRA_FAIL; dict_clean(dict); dict_close(dict); return ZEBRA_OK; } ZEBRA_RES zebra_update_file_match(ZebraHandle zh, const char *path) { Dict dict; if (zebraExplain_curDatabase(zh->reg->zei, zh->basenames[0])) { if (zebraExplain_newDatabase(zh->reg->zei, zh->basenames[0], 0)) return ZEBRA_FAIL; } if (zebra_open_fmatch(zh, &dict) != ZEBRA_OK) return ZEBRA_FAIL; if (!strcmp(path, "") || !strcmp(path, "-")) { char src[1024]; while (scanf("%s", src) == 1) file_update_top(zh, dict, src); } else file_update_top(zh, dict, path); #if 0 dump_file_dict(dict); #endif dict_close(dict); return ZEBRA_OK; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/mod_dom.c0000644000175000017500000013564311412332551013044 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if YAZ_HAVE_EXSLT #include #endif #include #include #include /* DOM filter style indexing */ #define ZEBRA_DOM_NS "http://indexdata.com/zebra-2.0" static const char *zebra_dom_ns = ZEBRA_DOM_NS; /* DOM filter style indexing */ #define ZEBRA_PI_NAME "zebra-2.0" static const char *zebra_pi_name = ZEBRA_PI_NAME; enum convert_type { convert_xslt_type, convert_meta_type }; struct convert_xslt { const char *stylesheet; xsltStylesheetPtr stylesheet_xsp; }; struct convert_meta { int dummy; }; struct convert_s { enum convert_type which; union { struct convert_xslt xslt; struct convert_meta meta; } u; struct convert_s *next; }; struct filter_extract { const char *name; struct convert_s *convert; }; struct filter_store { struct convert_s *convert; }; struct filter_retrieve { const char *name; const char *identifier; struct convert_s *convert; struct filter_retrieve *next; }; #define DOM_INPUT_XMLREADER 1 #define DOM_INPUT_MARC 2 struct filter_input { const char *syntax; const char *name; struct convert_s *convert; int type; union { struct { xmlTextReaderPtr reader; int split_level; } xmlreader; struct { const char *input_charset; yaz_marc_t handle; yaz_iconv_t iconv; } marc; } u; struct filter_input *next; }; struct filter_info { char *fname; char *full_name; const char *profile_path; NMEM nmem_record; NMEM nmem_config; xmlDocPtr doc_config; struct filter_extract *extract; struct filter_retrieve *retrieve_list; struct filter_input *input_list; struct filter_store *store; int record_info_invoked; }; #define XML_STRCMP(a,b) strcmp((char*)a, b) #define XML_STRLEN(a) strlen((char*)a) #define FOR_EACH_ELEMENT(ptr) for (; ptr; ptr = ptr->next) if (ptr->type == XML_ELEMENT_NODE) static void dom_log(int level, struct filter_info *tinfo, xmlNodePtr ptr, const char *fmt, ...) #ifdef __GNUC__ __attribute__ ((format (printf, 4, 5))) #endif ; static void dom_log(int level, struct filter_info *tinfo, xmlNodePtr ptr, const char *fmt, ...) { va_list ap; char buf[4096]; va_start(ap, fmt); yaz_vsnprintf(buf, sizeof(buf)-1, fmt, ap); if (ptr) { yaz_log(level, "%s:%ld: %s", tinfo->fname ? tinfo->fname : "none", xmlGetLineNo(ptr), buf); } else { yaz_log(level, "%s: %s", tinfo->fname ? tinfo->fname : "none", buf); } va_end(ap); } static void set_param_str(const char **params, const char *name, const char *value, NMEM nmem) { char *quoted = nmem_malloc(nmem, 3 + strlen(value)); sprintf(quoted, "'%s'", value); while (*params) params++; params[0] = name; params[1] = quoted; params[2] = 0; } static void set_param_int(const char **params, const char *name, zint value, NMEM nmem) { char *quoted = nmem_malloc(nmem, 30); /* 25 digits enough for 2^64 */ while (*params) params++; sprintf(quoted, "'" ZINT_FORMAT "'", value); params[0] = name; params[1] = quoted; params[2] = 0; } static void *filter_init(Res res, RecType recType) { struct filter_info *tinfo = (struct filter_info *) xmalloc(sizeof(*tinfo)); tinfo->fname = 0; tinfo->full_name = 0; tinfo->profile_path = 0; tinfo->nmem_record = nmem_create(); tinfo->nmem_config = nmem_create(); tinfo->extract = 0; tinfo->retrieve_list = 0; tinfo->input_list = 0; tinfo->store = 0; tinfo->doc_config = 0; tinfo->record_info_invoked = 0; #if YAZ_HAVE_EXSLT exsltRegisterAll(); #endif return tinfo; } static int attr_content(struct _xmlAttr *attr, const char *name, const char **dst_content) { if (!XML_STRCMP(attr->name, name) && attr->children && attr->children->type == XML_TEXT_NODE) { *dst_content = (const char *)(attr->children->content); return 1; } return 0; } static void destroy_xsp(struct convert_s *c) { while (c) { if (c->which == convert_xslt_type) { if (c->u.xslt.stylesheet_xsp) xsltFreeStylesheet(c->u.xslt.stylesheet_xsp); } c = c->next; } } static void destroy_dom(struct filter_info *tinfo) { if (tinfo->extract) { destroy_xsp(tinfo->extract->convert); tinfo->extract = 0; } if (tinfo->store) { destroy_xsp(tinfo->store->convert); tinfo->store = 0; } if (tinfo->input_list) { struct filter_input *i_ptr; for (i_ptr = tinfo->input_list; i_ptr; i_ptr = i_ptr->next) { switch(i_ptr->type) { case DOM_INPUT_XMLREADER: if (i_ptr->u.xmlreader.reader) xmlFreeTextReader(i_ptr->u.xmlreader.reader); break; case DOM_INPUT_MARC: yaz_iconv_close(i_ptr->u.marc.iconv); yaz_marc_destroy(i_ptr->u.marc.handle); break; } destroy_xsp(i_ptr->convert); } tinfo->input_list = 0; } if (tinfo->retrieve_list) { struct filter_retrieve *r_ptr; for (r_ptr = tinfo->retrieve_list; r_ptr; r_ptr = r_ptr->next) destroy_xsp(r_ptr->convert); tinfo->retrieve_list = 0; } if (tinfo->doc_config) { xmlFreeDoc(tinfo->doc_config); tinfo->doc_config = 0; } nmem_reset(tinfo->nmem_config); } static ZEBRA_RES parse_convert(struct filter_info *tinfo, xmlNodePtr ptr, struct convert_s **l) { *l = 0; FOR_EACH_ELEMENT(ptr) { if (!XML_STRCMP(ptr->name, "xslt")) { struct _xmlAttr *attr; struct convert_s *p = nmem_malloc(tinfo->nmem_config, sizeof(*p)); p->next = 0; p->which = convert_xslt_type; p->u.xslt.stylesheet = 0; p->u.xslt.stylesheet_xsp = 0; for (attr = ptr->properties; attr; attr = attr->next) if (attr_content(attr, "stylesheet", &p->u.xslt.stylesheet)) ; else { dom_log(YLOG_WARN, tinfo, ptr, "bad attribute @%s", attr->name); } if (p->u.xslt.stylesheet) { char tmp_xslt_full_name[1024]; if (!yaz_filepath_resolve(p->u.xslt.stylesheet, tinfo->profile_path, NULL, tmp_xslt_full_name)) { dom_log(YLOG_WARN, tinfo, 0, "stylesheet %s not found in " "path %s", p->u.xslt.stylesheet, tinfo->profile_path); return ZEBRA_FAIL; } p->u.xslt.stylesheet_xsp = xsltParseStylesheetFile((const xmlChar*) tmp_xslt_full_name); if (!p->u.xslt.stylesheet_xsp) { dom_log(YLOG_WARN, tinfo, 0, "could not parse xslt stylesheet %s", tmp_xslt_full_name); return ZEBRA_FAIL; } } else { dom_log(YLOG_WARN, tinfo, ptr, "missing attribute 'stylesheet'"); return ZEBRA_FAIL; } *l = p; l = &p->next; } else if (!XML_STRCMP(ptr->name, "process-meta")) { struct _xmlAttr *attr; struct convert_s *p = nmem_malloc(tinfo->nmem_config, sizeof(*p)); p->next = 0; p->which = convert_meta_type; for (attr = ptr->properties; attr; attr = attr->next) dom_log(YLOG_WARN, tinfo, ptr, "bad attribute @%s", attr->name); *l = p; l = &p->next; } else { dom_log(YLOG_WARN, tinfo, ptr, "bad element '%s', expected ", ptr->name); return ZEBRA_FAIL; } } return ZEBRA_OK; } static int process_meta(struct filter_info *tinfo, xmlDocPtr doc, xmlNodePtr node, struct recRetrieveCtrl *retctr) { if (node->type == XML_ELEMENT_NODE && node->ns && node->ns->href && 0 == XML_STRCMP(node->ns->href, zebra_dom_ns)) { if (0 == XML_STRCMP(node->name, "meta")) { const char *element_set_name = 0; struct _xmlAttr *attr; for (attr = node->properties; attr; attr = attr->next) { if (attr_content(attr, "name", &element_set_name)) ; else { dom_log(YLOG_WARN, tinfo, node, "bad attribute @%s, expected @name", attr->name); } } if (element_set_name) { WRBUF result = wrbuf_alloc(); WRBUF addinfo = wrbuf_alloc(); const Odr_oid *input_format = yaz_oid_recsyn_xml; const Odr_oid *output_format = 0; int ret; ret = retctr->special_fetch(retctr->handle, element_set_name, input_format, &output_format, result, addinfo); if (ret == 0) { xmlDocPtr sub_doc = xmlParseMemory(wrbuf_buf(result), wrbuf_len(result)); if (sub_doc) { xmlNodePtr t = xmlDocGetRootElement(sub_doc); xmlReplaceNode(node, xmlCopyNode(t, 1)); xmlFreeDoc(sub_doc); } } wrbuf_destroy(result); wrbuf_destroy(addinfo); } } } for (node = node->children; node; node = node->next) process_meta(tinfo, doc, node, retctr); return 0; } static ZEBRA_RES perform_convert(struct filter_info *tinfo, struct recExtractCtrl *extctr, struct recRetrieveCtrl *retctr, struct convert_s *convert, const char **params, xmlDocPtr *doc, xsltStylesheetPtr *last_xsp) { for (; convert; convert = convert->next) { if (convert->which == convert_xslt_type) { xmlChar *buf_out = 0; int len_out = 0; xmlDocPtr res_doc = xsltApplyStylesheet(convert->u.xslt.stylesheet_xsp, *doc, params); if (last_xsp) *last_xsp = convert->u.xslt.stylesheet_xsp; if (!res_doc) break; /* now saving into buffer and re-reading into DOM to avoid annoing XSLT problem with thrown-out indentation text nodes */ xsltSaveResultToString(&buf_out, &len_out, res_doc, convert->u.xslt.stylesheet_xsp); xmlFreeDoc(res_doc); xmlFreeDoc(*doc); *doc = xmlParseMemory((const char *) buf_out, len_out); /* writing debug info out */ if (extctr && extctr->flagShowRecords) yaz_log(YLOG_LOG, "%s: XSLT %s\n %.*s", tinfo->fname ? tinfo->fname : "(none)", convert->u.xslt.stylesheet, len_out, buf_out); xmlFree(buf_out); } else if (convert->which == convert_meta_type) { if (retctr) /* only execute meta on retrieval */ { process_meta(tinfo, *doc, xmlDocGetRootElement(*doc), retctr); /* last stylesheet absent */ if (last_xsp) *last_xsp = 0; } } } return ZEBRA_OK; } static struct filter_input *new_input(struct filter_info *tinfo, int type) { struct filter_input *p; struct filter_input **np = &tinfo->input_list; for (;*np; np = &(*np)->next) ; p = *np = nmem_malloc(tinfo->nmem_config, sizeof(*p)); p->next = 0; p->syntax = 0; p->name = 0; p->convert = 0; p->type = type; return p; } static ZEBRA_RES parse_input(struct filter_info *tinfo, xmlNodePtr ptr, const char *syntax, const char *name) { FOR_EACH_ELEMENT(ptr) { if (!XML_STRCMP(ptr->name, "marc")) { yaz_iconv_t iconv = 0; const char *input_charset = "marc-8"; struct _xmlAttr *attr; for (attr = ptr->properties; attr; attr = attr->next) { if (attr_content(attr, "inputcharset", &input_charset)) ; else { dom_log(YLOG_WARN, tinfo, ptr, "bad attribute @%s, expected @inputcharset", attr->name); } } iconv = yaz_iconv_open("utf-8", input_charset); if (!iconv) { dom_log(YLOG_WARN, tinfo, ptr, "unsupported @charset '%s'", input_charset); return ZEBRA_FAIL; } else { struct filter_input *p = new_input(tinfo, DOM_INPUT_MARC); p->u.marc.handle = yaz_marc_create(); p->u.marc.iconv = iconv; yaz_marc_iconv(p->u.marc.handle, p->u.marc.iconv); ptr = ptr->next; parse_convert(tinfo, ptr, &p->convert); } break; } else if (!XML_STRCMP(ptr->name, "xmlreader")) { struct filter_input *p = new_input(tinfo, DOM_INPUT_XMLREADER); struct _xmlAttr *attr; const char *level_str = 0; p->u.xmlreader.split_level = 0; p->u.xmlreader.reader = 0; for (attr = ptr->properties; attr; attr = attr->next) { if (attr_content(attr, "level", &level_str)) ; else { dom_log(YLOG_WARN, tinfo, ptr, "bad attribute @%s, expected @level", attr->name); } } if (level_str) p->u.xmlreader.split_level = atoi(level_str); ptr = ptr->next; parse_convert(tinfo, ptr, &p->convert); break; } else { dom_log(YLOG_WARN, tinfo, ptr, "bad element <%s>, expected |", ptr->name); return ZEBRA_FAIL; } } return ZEBRA_OK; } static ZEBRA_RES parse_dom(struct filter_info *tinfo, const char *fname) { char tmp_full_name[1024]; xmlNodePtr ptr; xmlDocPtr doc; tinfo->fname = nmem_strdup(tinfo->nmem_config, fname); if (yaz_filepath_resolve(tinfo->fname, tinfo->profile_path, NULL, tmp_full_name)) tinfo->full_name = nmem_strdup(tinfo->nmem_config, tmp_full_name); else tinfo->full_name = nmem_strdup(tinfo->nmem_config, tinfo->fname); yaz_log(YLOG_LOG, "%s dom filter: " "loading config file %s", tinfo->fname, tinfo->full_name); doc = xmlParseFile(tinfo->full_name); if (!doc) { yaz_log(YLOG_WARN, "%s: dom filter: " "failed to parse config file %s", tinfo->fname, tinfo->full_name); return ZEBRA_FAIL; } /* save because we store ptrs to the content */ tinfo->doc_config = doc; ptr = xmlDocGetRootElement(doc); if (!ptr || ptr->type != XML_ELEMENT_NODE || XML_STRCMP(ptr->name, "dom")) { dom_log(YLOG_WARN, tinfo, ptr, "bad root element <%s>, expected root element ", ptr->name); return ZEBRA_FAIL; } ptr = ptr->children; FOR_EACH_ELEMENT(ptr) { if (!XML_STRCMP(ptr->name, "extract")) { /* */ struct _xmlAttr *attr; struct filter_extract *f = nmem_malloc(tinfo->nmem_config, sizeof(*f)); tinfo->extract = f; f->name = 0; f->convert = 0; for (attr = ptr->properties; attr; attr = attr->next) { if (attr_content(attr, "name", &f->name)) ; else { dom_log(YLOG_WARN, tinfo, ptr, "bad attribute @%s, expected @name", attr->name); } } parse_convert(tinfo, ptr->children, &f->convert); } else if (!XML_STRCMP(ptr->name, "retrieve")) { /* */ struct _xmlAttr *attr; struct filter_retrieve **fp = &tinfo->retrieve_list; struct filter_retrieve *f = nmem_malloc(tinfo->nmem_config, sizeof(*f)); while (*fp) fp = &(*fp)->next; *fp = f; f->name = 0; f->identifier = 0; f->convert = 0; f->next = 0; for (attr = ptr->properties; attr; attr = attr->next) { if (attr_content(attr, "identifier", &f->identifier)) ; else if (attr_content(attr, "name", &f->name)) ; else { dom_log(YLOG_WARN, tinfo, ptr, "bad attribute @%s, expected @identifier|@name", attr->name); } } parse_convert(tinfo, ptr->children, &f->convert); } else if (!XML_STRCMP(ptr->name, "store")) { /* */ struct filter_store *f = nmem_malloc(tinfo->nmem_config, sizeof(*f)); tinfo->store = f; f->convert = 0; parse_convert(tinfo, ptr->children, &f->convert); } else if (!XML_STRCMP(ptr->name, "input")) { /* */ struct _xmlAttr *attr; const char *syntax = 0; const char *name = 0; for (attr = ptr->properties; attr; attr = attr->next) { if (attr_content(attr, "syntax", &syntax)) ; else if (attr_content(attr, "name", &name)) ; else { dom_log(YLOG_WARN, tinfo, ptr, "bad attribute @%s, expected @syntax|@name", attr->name); } } parse_input(tinfo, ptr->children, syntax, name); } else { dom_log(YLOG_WARN, tinfo, ptr, "bad element <%s>, " "expected |||", ptr->name); return ZEBRA_FAIL; } } if (!tinfo->input_list) { struct filter_input *p = new_input(tinfo, DOM_INPUT_XMLREADER); p->u.xmlreader.split_level = 0; p->u.xmlreader.reader = 0; } return ZEBRA_OK; } static struct filter_retrieve *lookup_retrieve(struct filter_info *tinfo, const char *est) { struct filter_retrieve *f = tinfo->retrieve_list; /* return first schema if no est is provided */ if (!est) return f; for (; f; f = f->next) { /* find requested schema */ if (est) { if (f->identifier && !strcmp(f->identifier, est)) return f; if (f->name && !strcmp(f->name, est)) return f; } } return 0; } static ZEBRA_RES filter_config(void *clientData, Res res, const char *args) { struct filter_info *tinfo = clientData; if (!args || !*args) { yaz_log(YLOG_WARN, "dom filter: need config file"); return ZEBRA_FAIL; } if (tinfo->fname && !strcmp(args, tinfo->fname)) return ZEBRA_OK; tinfo->profile_path = res_get(res, "profilePath"); destroy_dom(tinfo); return parse_dom(tinfo, args); } static void filter_destroy(void *clientData) { struct filter_info *tinfo = clientData; destroy_dom(tinfo); nmem_destroy(tinfo->nmem_config); nmem_destroy(tinfo->nmem_record); xfree(tinfo); } static int ioread_ex(void *context, char *buffer, int len) { struct recExtractCtrl *p = context; return p->stream->readf(p->stream, buffer, len); } static int ioclose_ex(void *context) { return 0; } /* DOM filter style indexing */ static void index_value_of(struct filter_info *tinfo, struct recExtractCtrl *extctr, RecWord* recword, xmlNodePtr node, const char *index_p) { if (tinfo->record_info_invoked == 1) { xmlChar *text = xmlNodeGetContent(node); size_t text_len = strlen((const char *)text); /* if there is no text, we do not need to proceed */ if (text_len) { /* keep seqno base so that all text will have identical seqno's for multiple fields , e.g .. */ zint seqno_base = recword->seqno; zint seqno_max = recword->seqno; const char *look = index_p; const char *bval; const char *eval; xmlChar index[256]; xmlChar type[256]; /* assingning text to be indexed */ recword->term_buf = (const char *)text; recword->term_len = text_len; /* parsing all index name/type pairs */ /* may not start with ' ' or ':' */ while (*look && ' ' != *look && ':' != *look) { /* setting name and type to zero */ *index = '\0'; *type = '\0'; /* parsing one index name */ bval = look; while (*look && ':' != *look && ' ' != *look) { look++; } eval = look; strncpy((char *)index, (const char *)bval, eval - bval); index[eval - bval] = '\0'; /* parsing one index type, if existing */ if (':' == *look) { look++; bval = look; while (*look && ' ' != *look) { look++; } eval = look; strncpy((char *)type, (const char *)bval, eval - bval); type[eval - bval] = '\0'; } /* actually indexing the text given */ recword->seqno = seqno_base; recword->index_name = (const char *)index; if (*type) recword->index_type = (const char *) type; /* writing debug out */ if (extctr->flagShowRecords) dom_log(YLOG_LOG, tinfo, 0, "INDEX '%s:%s' '%s'", (const char *) index, (const char *) type, (const char *) text); (extctr->tokenAdd)(recword); if (seqno_max < recword->seqno) seqno_max = recword->seqno; /* eat whitespaces */ if (*look && ' ' == *look) { look++; } } recword->seqno = seqno_max; } xmlFree(text); } } /* DOM filter style indexing */ static void set_record_info(struct filter_info *tinfo, struct recExtractCtrl *extctr, xmlNodePtr node, const char * id_p, const char * rank_p, const char * type_p) { /* writing debug info out */ if (extctr && extctr->flagShowRecords) dom_log(YLOG_LOG, tinfo, node, "RECORD id=%s rank=%s type=%s", id_p ? (const char *) id_p : "(null)", rank_p ? (const char *) rank_p : "(null)", type_p ? (const char *) type_p : "(null)"); if (id_p && *id_p) { size_t l = strlen(id_p); if (l >= sizeof(extctr->match_criteria)) l = sizeof(extctr->match_criteria)-1; memcpy(extctr->match_criteria, id_p, l); extctr->match_criteria[l] = '\0'; } if (rank_p && *rank_p) extctr->staticrank = atozint((const char *)rank_p); if (type_p && *type_p) { enum zebra_recctrl_action_t action = action_update; if (!strcmp(type_p, "insert")) action = action_insert; else if (!strcmp(type_p, "delete")) action = action_delete; else if (!strcmp(type_p, "replace")) action = action_replace; else if (!strcmp(type_p, "update")) action = action_update; else dom_log(YLOG_WARN, tinfo, node, "bad @type value: %s", type_p); extctr->action = action; } if (tinfo->record_info_invoked == 1) { /* warn about multiple only once */ dom_log(YLOG_WARN, tinfo, node, "multiple record elements"); } tinfo->record_info_invoked++; } /* DOM filter style indexing */ static void process_xml_element_zebra_node(struct filter_info *tinfo, struct recExtractCtrl *extctr, RecWord* recword, xmlNodePtr node) { if (node->type == XML_ELEMENT_NODE && node->ns && node->ns->href && 0 == XML_STRCMP(node->ns->href, zebra_dom_ns)) { if (0 == XML_STRCMP(node->name, "index")) { const char *index_p = 0; struct _xmlAttr *attr; for (attr = node->properties; attr; attr = attr->next) { if (attr_content(attr, "name", &index_p)) { index_value_of(tinfo, extctr, recword, node, index_p); } else { dom_log(YLOG_WARN, tinfo, node, "bad attribute @%s, expected @name", attr->name); } } } else if (0 == XML_STRCMP(node->name, "record")) { const char *id_p = 0; const char *rank_p = 0; const char *type_p = 0; struct _xmlAttr *attr; for (attr = node->properties; attr; attr = attr->next) { if (attr_content(attr, "id", &id_p)) ; else if (attr_content(attr, "rank", &rank_p)) ; else if (attr_content(attr, "type", &type_p)) ; else { dom_log(YLOG_WARN, tinfo, node, "bad attribute @%s, expected @id|@rank|@type", attr->name); } } set_record_info(tinfo, extctr, node, id_p, rank_p, type_p); } else { dom_log(YLOG_WARN, tinfo, node, "bad element <%s>," " expected | in namespace '%s'", node->name, zebra_dom_ns); } } } static int attr_content_pi(const char **c_ptr, const char *name, char *value, size_t value_max) { size_t name_len = strlen(name); const char *look = *c_ptr; int ret = 0; if (strlen(look) > name_len) { if (look[name_len] == '=' && !memcmp(look, name, name_len)) { size_t i = 0; look += name_len+1; while (*look && ' ' != *look) { if (i < value_max-1) value[i++] = *look; look++; } value[i] = '\0'; ret = 1; } } *c_ptr = look; return ret; } /* DOM filter style indexing */ static void process_xml_pi_node(struct filter_info *tinfo, struct recExtractCtrl *extctr, xmlNodePtr node, const char **index_pp) { /* if right PI name, continue parsing PI */ if (0 == strcmp(zebra_pi_name, (const char *)node->name)) { xmlChar *pi_p = node->content; const char *look = (const char *) node->content; /* parsing PI record instructions */ if (0 == strncmp((const char *)look, "record", 6)) { char id[256]; char rank[256]; char type[256]; *id = '\0'; *rank = '\0'; *type = '\0'; look += 6; for (;;) { /* eat whitespace */ while (' ' == *look) look++; if (*look == '\0') break; if (attr_content_pi(&look, "id", id, sizeof(id))) ; else if (attr_content_pi(&look, "rank", rank, sizeof(rank))) ; else if (attr_content_pi(&look, "type", type, sizeof(type))) ; else { dom_log(YLOG_WARN, tinfo, node, "content '%s', can not parse '%s'", pi_p, look); break; } } set_record_info(tinfo, extctr, node, id, rank, type); } /* parsing index instruction */ else if (0 == strncmp((const char *)look, "index", 5)) { look += 5; /* eat whitespace */ while (*look && ' ' == *look) look++; /* export index instructions to outside */ *index_pp = look; } else { dom_log(YLOG_WARN, tinfo, node, "content '%s', can not parse '%s'", pi_p, look); } } } /* DOM filter style indexing */ static void process_xml_element_node(struct filter_info *tinfo, struct recExtractCtrl *extctr, RecWord* recword, xmlNodePtr node) { /* remember indexing instruction from PI to next element node */ const char *index_p = 0; /* check if we are an element node in the special zebra namespace and either set record data or index value-of node content*/ process_xml_element_zebra_node(tinfo, extctr, recword, node); /* loop through kid nodes */ for (node = node->children; node; node = node->next) { /* check and set PI record and index index instructions */ if (node->type == XML_PI_NODE) { process_xml_pi_node(tinfo, extctr, node, &index_p); } else if (node->type == XML_ELEMENT_NODE) { /* if there was a PI index instruction before this element */ if (index_p) { index_value_of(tinfo, extctr, recword, node, index_p); index_p = 0; } process_xml_element_node(tinfo, extctr, recword,node); } else continue; } } /* DOM filter style indexing */ static void extract_dom_doc_node(struct filter_info *tinfo, struct recExtractCtrl *extctr, xmlDocPtr doc) { /* only need to do the initialization once, reuse recword for all terms */ RecWord recword; (*extctr->init)(extctr, &recword); process_xml_element_node(tinfo, extctr, &recword, (xmlNodePtr)doc); } static int convert_extract_doc(struct filter_info *tinfo, struct filter_input *input, struct recExtractCtrl *p, xmlDocPtr doc) { xmlChar *buf_out; int len_out; const char *params[10]; xsltStylesheetPtr last_xsp = 0; /* per default do not ingest record */ tinfo->record_info_invoked = 0; /* exit if empty document given */ if (!doc) return RECCTRL_EXTRACT_SKIP; /* we actuallu have a document which needs to be processed further */ params[0] = 0; set_param_str(params, "schema", zebra_dom_ns, tinfo->nmem_record); if (p && p->flagShowRecords) { xmlChar *buf_out; int len_out; xmlDocDumpMemory(doc, &buf_out, &len_out); #if 0 FILE *outf = fopen("extract.xml", "w"); fwrite(buf_out, 1, len_out, outf); fclose(outf); #endif yaz_log(YLOG_LOG, "Extract Doc: %.*s", len_out, buf_out); } if (p->setStoreData) { xmlDocPtr store_doc = 0; /* input conversion */ perform_convert(tinfo, p, 0, input->convert, params, &doc, 0); if (tinfo->store) { /* store conversion */ store_doc = xmlCopyDoc(doc, 1); perform_convert(tinfo, p, 0, tinfo->store->convert, params, &store_doc, &last_xsp); } /* saving either store doc or original doc in case no store doc exists */ if (last_xsp) xsltSaveResultToString(&buf_out, &len_out, store_doc ? store_doc : doc, last_xsp); else xmlDocDumpMemory(store_doc ? store_doc : doc, &buf_out, &len_out); if (p->setStoreData) (*p->setStoreData)(p, buf_out, len_out); xmlFree(buf_out); if (store_doc) xmlFreeDoc(store_doc); } /* extract conversion */ perform_convert(tinfo, p, 0, tinfo->extract->convert, params, &doc, 0); /* finally, do the indexing */ if (doc){ extract_dom_doc_node(tinfo, p, doc); xmlFreeDoc(doc); } /* there was nothing to index, so there is no inserted/updated record */ if (tinfo->record_info_invoked == 0) return RECCTRL_EXTRACT_SKIP; return RECCTRL_EXTRACT_OK; } static int extract_xml_split(struct filter_info *tinfo, struct filter_input *input, struct recExtractCtrl *p) { int ret; if (p->first_record) { if (input->u.xmlreader.reader) xmlFreeTextReader(input->u.xmlreader.reader); input->u.xmlreader.reader = xmlReaderForIO(ioread_ex, ioclose_ex, p /* I/O handler */, 0 /* URL */, 0 /* encoding */, XML_PARSE_XINCLUDE | XML_PARSE_NOENT | XML_PARSE_NONET); } if (!input->u.xmlreader.reader) return RECCTRL_EXTRACT_ERROR_GENERIC; ret = xmlTextReaderRead(input->u.xmlreader.reader); while (ret == 1) { int type = xmlTextReaderNodeType(input->u.xmlreader.reader); int depth = xmlTextReaderDepth(input->u.xmlreader.reader); if (type == XML_READER_TYPE_ELEMENT && input->u.xmlreader.split_level == depth) { xmlNodePtr ptr; /* per default do not ingest record */ tinfo->record_info_invoked = 0; ptr = xmlTextReaderExpand(input->u.xmlreader.reader); if (ptr) { /* we have a new document */ xmlNodePtr ptr2 = xmlCopyNode(ptr, 1); xmlDocPtr doc = xmlNewDoc((const xmlChar*) "1.0"); xmlDocSetRootElement(doc, ptr2); /* writing debug info out */ if (p->flagShowRecords) { xmlChar *buf_out = 0; int len_out = 0; xmlDocDumpMemory(doc, &buf_out, &len_out); yaz_log(YLOG_LOG, "%s: XMLREADER level: %i\n%.*s", tinfo->fname ? tinfo->fname : "(none)", depth, len_out, buf_out); xmlFree(buf_out); } return convert_extract_doc(tinfo, input, p, doc); } else { xmlFreeTextReader(input->u.xmlreader.reader); input->u.xmlreader.reader = 0; return RECCTRL_EXTRACT_ERROR_GENERIC; } } ret = xmlTextReaderRead(input->u.xmlreader.reader); } xmlFreeTextReader(input->u.xmlreader.reader); input->u.xmlreader.reader = 0; return RECCTRL_EXTRACT_EOF; } static int extract_xml_full(struct filter_info *tinfo, struct filter_input *input, struct recExtractCtrl *p) { if (p->first_record) /* only one record per stream */ { xmlDocPtr doc = xmlReadIO(ioread_ex, ioclose_ex, p /* I/O handler */, 0 /* URL */, 0 /* encoding */, XML_PARSE_XINCLUDE | XML_PARSE_NOENT | XML_PARSE_NONET); if (!doc) { return RECCTRL_EXTRACT_ERROR_GENERIC; } return convert_extract_doc(tinfo, input, p, doc); } else return RECCTRL_EXTRACT_EOF; } static int extract_iso2709(struct filter_info *tinfo, struct filter_input *input, struct recExtractCtrl *p) { char buf[100000]; int record_length; int read_bytes, r; if (p->stream->readf(p->stream, buf, 5) != 5) return RECCTRL_EXTRACT_EOF; while (*buf < '0' || *buf > '9') { int i; dom_log(YLOG_WARN, tinfo, 0, "MARC: Skipping bad byte %d (0x%02X)", *buf & 0xff, *buf & 0xff); for (i = 0; i<4; i++) buf[i] = buf[i+1]; if (p->stream->readf(p->stream, buf+4, 1) != 1) return RECCTRL_EXTRACT_EOF; } record_length = atoi_n (buf, 5); if (record_length < 25) { dom_log(YLOG_WARN, tinfo, 0, "MARC record length < 25, is %d", record_length); return RECCTRL_EXTRACT_ERROR_GENERIC; } read_bytes = p->stream->readf(p->stream, buf+5, record_length-5); if (read_bytes < record_length-5) { dom_log(YLOG_WARN, tinfo, 0, "couldn't read whole MARC record"); return RECCTRL_EXTRACT_ERROR_GENERIC; } r = yaz_marc_read_iso2709(input->u.marc.handle, buf, record_length); if (r < record_length) { dom_log (YLOG_WARN, tinfo, 0, "parsing of MARC record failed r=%d length=%d", r, record_length); return RECCTRL_EXTRACT_ERROR_GENERIC; } else { xmlDocPtr rdoc; xmlNode *root_ptr; yaz_marc_write_xml(input->u.marc.handle, &root_ptr, "http://www.loc.gov/MARC21/slim", 0, 0); rdoc = xmlNewDoc((const xmlChar*) "1.0"); xmlDocSetRootElement(rdoc, root_ptr); return convert_extract_doc(tinfo, input, p, rdoc); } return RECCTRL_EXTRACT_OK; } static int filter_extract(void *clientData, struct recExtractCtrl *p) { struct filter_info *tinfo = clientData; struct filter_input *input = tinfo->input_list; if (!input) return RECCTRL_EXTRACT_ERROR_GENERIC; nmem_reset(tinfo->nmem_record); if (p->setStoreData == 0) return extract_xml_full(tinfo, input, p); switch(input->type) { case DOM_INPUT_XMLREADER: if (input->u.xmlreader.split_level == 0) return extract_xml_full(tinfo, input, p); else return extract_xml_split(tinfo, input, p); break; case DOM_INPUT_MARC: return extract_iso2709(tinfo, input, p); } return RECCTRL_EXTRACT_ERROR_GENERIC; } static int ioread_ret(void *context, char *buffer, int len) { struct recRetrieveCtrl *p = context; int r = p->stream->readf(p->stream, buffer, len); return r; } static int ioclose_ret(void *context) { return 0; } static int filter_retrieve(void *clientData, struct recRetrieveCtrl *p) { /* const char *esn = zebra_dom_ns; */ const char *esn = 0; const char *params[32]; struct filter_info *tinfo = clientData; xmlDocPtr doc; struct filter_retrieve *retrieve; xsltStylesheetPtr last_xsp = 0; if (p->comp) { if (p->comp->which == Z_RecordComp_simple && p->comp->u.simple->which == Z_ElementSetNames_generic) { esn = p->comp->u.simple->u.generic; } else if (p->comp->which == Z_RecordComp_complex && p->comp->u.complex->generic->elementSpec && p->comp->u.complex->generic->elementSpec->which == Z_ElementSpec_elementSetName) { esn = p->comp->u.complex->generic->elementSpec->u.elementSetName; } } retrieve = lookup_retrieve(tinfo, esn); if (!retrieve) { p->diagnostic = YAZ_BIB1_SPECIFIED_ELEMENT_SET_NAME_NOT_VALID_FOR_SPECIFIED_; p->addinfo = odr_strdup_null(p->odr, esn); return 0; } params[0] = 0; set_param_int(params, "id", p->localno, p->odr->mem); if (p->fname) set_param_str(params, "filename", p->fname, p->odr->mem); if (p->staticrank >= 0) set_param_int(params, "rank", p->staticrank, p->odr->mem); if (esn) set_param_str(params, "schema", esn, p->odr->mem); else if (retrieve->name) set_param_str(params, "schema", retrieve->name, p->odr->mem); else if (retrieve->identifier) set_param_str(params, "schema", retrieve->identifier, p->odr->mem); else set_param_str(params, "schema", "", p->odr->mem); if (p->score >= 0) set_param_int(params, "score", p->score, p->odr->mem); set_param_int(params, "size", p->recordSize, p->odr->mem); doc = xmlReadIO(ioread_ret, ioclose_ret, p /* I/O handler */, 0 /* URL */, 0 /* encoding */, XML_PARSE_XINCLUDE | XML_PARSE_NOENT | XML_PARSE_NONET); if (!doc) { p->diagnostic = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS; return 0; } /* retrieve conversion */ perform_convert(tinfo, 0, p, retrieve->convert, params, &doc, &last_xsp); if (!doc) { p->diagnostic = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS; } else if (!p->input_format || !oid_oidcmp(p->input_format, yaz_oid_recsyn_xml)) { xmlChar *buf_out; int len_out; if (last_xsp) xsltSaveResultToString(&buf_out, &len_out, doc, last_xsp); else xmlDocDumpMemory(doc, &buf_out, &len_out); p->output_format = yaz_oid_recsyn_xml; p->rec_len = len_out; p->rec_buf = odr_malloc(p->odr, p->rec_len); memcpy(p->rec_buf, buf_out, p->rec_len); xmlFree(buf_out); } else if (!oid_oidcmp(p->output_format, yaz_oid_recsyn_sutrs)) { xmlChar *buf_out; int len_out; if (last_xsp) xsltSaveResultToString(&buf_out, &len_out, doc, last_xsp); else xmlDocDumpMemory(doc, &buf_out, &len_out); p->output_format = yaz_oid_recsyn_sutrs; p->rec_len = len_out; p->rec_buf = odr_malloc(p->odr, p->rec_len); memcpy(p->rec_buf, buf_out, p->rec_len); xmlFree(buf_out); } else { p->diagnostic = YAZ_BIB1_RECORD_SYNTAX_UNSUPP; } xmlFreeDoc(doc); return 0; } static struct recType filter_type = { 0, "dom", filter_init, filter_config, filter_destroy, filter_extract, filter_retrieve }; RecType #ifdef IDZEBRA_STATIC_DOM idzebra_filter_dom #else idzebra_filter #endif [] = { &filter_type, 0, }; /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/limit.c0000644000175000017500000000572411412332551012540 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include "index.h" #define ZEBRA_LIMIT_DEBUG 0 struct zebra_limit { int complement_flag; zint *ids; }; void zebra_limit_destroy(struct zebra_limit *zl) { if (zl) { xfree(zl->ids); xfree(zl); } } struct zebra_limit *zebra_limit_create(int complement_flag, zint *ids) { struct zebra_limit *zl = 0; size_t i; if (ids) { for (i = 0; ids[i]; i++) ; zl = xmalloc(sizeof(*zl)); zl->ids = xmalloc((i+1) * sizeof(*ids)); memcpy(zl->ids, ids, (i+1) * sizeof(*ids)); zl->complement_flag = complement_flag; } return zl; } static int zebra_limit_filter_cb(const void *buf, void *data) { struct zebra_limit *zl = data; const struct it_key *key = buf; size_t i; #if ZEBRA_LIMIT_DEBUG yaz_log(YLOG_LOG, "zebra_limit_filter_cb zl=%p key->len=%d", zl, key->len); #endif for (i = 0; zl->ids[i]; i++) { #if ZEBRA_LIMIT_DEBUG yaz_log(YLOG_LOG, " i=%d ids=" ZINT_FORMAT " mem=" ZINT_FORMAT, i, zl->ids[i], key->mem[1]); #endif if (zl->ids[i] == key->mem[1]) { #if ZEBRA_LIMIT_DEBUG yaz_log(YLOG_LOG, " match. Ret=%d", zl->complement_flag ? 0:1); #endif return zl->complement_flag ? 0 : 1; } } #if ZEBRA_LIMIT_DEBUG yaz_log(YLOG_LOG, " no match. Ret=%d", zl->complement_flag ? 1:0); #endif return zl->complement_flag ? 1 : 0; } static void zebra_limit_destroy_cb(void *data) { zebra_limit_destroy(data); } void zebra_limit_for_rset(struct zebra_limit *zl, int (**filter_func)(const void *buf, void *data), void (**filter_destroy)(void *data), void **filter_data) { #if ZEBRA_LIMIT_DEBUG yaz_log(YLOG_LOG, "zebra_limit_for_rset debug enabled zl=%p", zl); #endif if (zl && zl->ids) { struct zebra_limit *hl; #if ZEBRA_LIMIT_DEBUG yaz_log(YLOG_LOG, "enable limit"); #endif hl = zebra_limit_create(zl->complement_flag, zl->ids); *filter_data = hl; *filter_func = zebra_limit_filter_cb; *filter_destroy = zebra_limit_destroy_cb; } else { *filter_data = 0; *filter_func = 0; *filter_destroy = 0; } } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/recctrl.c0000644000175000017500000001551511412332551013057 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #if HAVE_DLFCN_H #include #endif #include #include #include struct recTypeClass { RecType recType; struct recTypeClass *next; void *module_handle; }; struct recTypeInstance { RecType recType; struct recTypeInstance *next; int init_flag; void *clientData; }; struct recTypes { data1_handle dh; struct recTypeInstance *entries; }; static void recTypeClass_add (struct recTypeClass **rts, RecType *rt, NMEM nmem, void *module_handle); RecTypeClass recTypeClass_create (Res res, NMEM nmem) { struct recTypeClass *rts = 0; #ifdef IDZEBRA_STATIC_GRS_SGML if (1) { extern RecType idzebra_filter_grs_sgml[]; recTypeClass_add (&rts, idzebra_filter_grs_sgml, nmem, 0); } #endif #ifdef IDZEBRA_STATIC_TEXT if (1) { extern RecType idzebra_filter_text[]; recTypeClass_add (&rts, idzebra_filter_text, nmem, 0); } #endif #ifdef IDZEBRA_STATIC_GRS_XML #if HAVE_EXPAT_H if (1) { extern RecType idzebra_filter_grs_xml[]; recTypeClass_add (&rts, idzebra_filter_grs_xml, nmem, 0); } #endif #endif #ifdef IDZEBRA_STATIC_GRS_REGX if (1) { extern RecType idzebra_filter_grs_regx[]; recTypeClass_add (&rts, idzebra_filter_grs_regx, nmem, 0); } #endif #ifdef IDZEBRA_STATIC_GRS_MARC if (1) { extern RecType idzebra_filter_grs_marc[]; recTypeClass_add (&rts, idzebra_filter_grs_marc, nmem, 0); } #endif #ifdef IDZEBRA_STATIC_SAFARI if (1) { extern RecType idzebra_filter_safari[]; recTypeClass_add (&rts, idzebra_filter_safari, nmem, 0); } #endif #ifdef IDZEBRA_STATIC_ALVIS if (1) { extern RecType idzebra_filter_alvis[]; recTypeClass_add (&rts, idzebra_filter_alvis, nmem, 0); } #endif #ifdef IDZEBRA_STATIC_DOM if (1) { extern RecType idzebra_filter_dom[]; recTypeClass_add (&rts, idzebra_filter_dom, nmem, 0); } #endif return rts; } static void load_from_dir(RecTypeClass *rts, NMEM nmem, const char *dirname) { #if HAVE_DLFCN_H DIR *dir = opendir(dirname); if (dir) { struct dirent *de; while ((de = readdir(dir))) { size_t dlen = strlen(de->d_name); if (dlen >= 5 && !memcmp(de->d_name, "mod-", 4) && !strcmp(de->d_name + dlen - 3, ".so")) { void *mod_p, *fl; char fname[FILENAME_MAX*2+1]; sprintf(fname, "%.*s/%.*s", FILENAME_MAX, dirname, FILENAME_MAX, de->d_name); mod_p = dlopen(fname, RTLD_NOW|RTLD_GLOBAL); if (mod_p && (fl = dlsym(mod_p, "idzebra_filter"))) { yaz_log(YLOG_LOG, "Loaded filter module %s", fname); recTypeClass_add(rts, fl, nmem, mod_p); } else if (mod_p) { const char *err = dlerror(); yaz_log(YLOG_WARN, "dlsym failed %s %s", fname, err ? err : "none"); dlclose(mod_p); } else { const char *err = dlerror(); yaz_log(YLOG_WARN, "dlopen failed %s %s", fname, err ? err : "none"); } } } closedir(dir); } #endif } void recTypeClass_load_modules(RecTypeClass *rts, NMEM nmem, const char *module_path) { while (module_path) { const char *comp_ptr; char comp[FILENAME_MAX+1]; size_t len; len = yaz_filepath_comp(&module_path, &comp_ptr); if (!len || len >= FILENAME_MAX) break; memcpy(comp, comp_ptr, len); comp[len] = '\0'; load_from_dir(rts, nmem, comp); } } static void recTypeClass_add(struct recTypeClass **rts, RecType *rt, NMEM nmem, void *module_handle) { while (*rt) { struct recTypeClass *r = (struct recTypeClass *) nmem_malloc (nmem, sizeof(*r)); r->next = *rts; *rts = r; r->module_handle = module_handle; module_handle = 0; /* so that we only store module_handle once */ r->recType = *rt; rt++; } } void recTypeClass_info(RecTypeClass rtc, void *cd, void (*cb)(void *cd, const char *s)) { for (; rtc; rtc = rtc->next) (*cb)(cd, rtc->recType->name); } void recTypeClass_destroy(RecTypeClass rtc) { for (; rtc; rtc = rtc->next) { #if HAVE_DLFCN_H if (rtc->module_handle) dlclose(rtc->module_handle); #endif } } RecTypes recTypes_init(RecTypeClass rtc, data1_handle dh) { RecTypes rts = (RecTypes) nmem_malloc(data1_nmem_get(dh), sizeof(*rts)); struct recTypeInstance **rti = &rts->entries; rts->dh = dh; for (; rtc; rtc = rtc->next) { *rti = nmem_malloc(data1_nmem_get(dh), sizeof(**rti)); (*rti)->recType = rtc->recType; (*rti)->init_flag = 0; rti = &(*rti)->next; } *rti = 0; return rts; } void recTypes_destroy (RecTypes rts) { struct recTypeInstance *rti; for (rti = rts->entries; rti; rti = rti->next) { if (rti->init_flag) (*(rti->recType)->destroy)(rti->clientData); } } RecType recType_byName (RecTypes rts, Res res, const char *name, void **clientDataP) { struct recTypeInstance *rti; for (rti = rts->entries; rti; rti = rti->next) { size_t slen = strlen(rti->recType->name); if (!strncmp (rti->recType->name, name, slen) && (name[slen] == '\0' || name[slen] == '.')) { if (!rti->init_flag) { rti->init_flag = 1; rti->clientData = (*(rti->recType)->init)(res, rti->recType); } *clientDataP = rti->clientData; if (name[slen]) slen++; /* skip . */ if (rti->recType->config) { if ((*(rti->recType)->config) (rti->clientData, res, name+slen) != ZEBRA_OK) return 0; } return rti->recType; } } return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/recindex.c0000644000175000017500000002033111412332551013212 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include "recindex.h" #define RIDX_CHUNK 128 struct recindex { char *index_fname; BFile index_BFile; ISAMB isamb; ISAM_P isam_p; }; struct record_index_entry { zint next; /* first block of record info / next free entry */ int size; /* size of record or 0 if free entry */ } ent; static void rect_log_item(int level, const void *b, const char *txt) { zint sys; int len; memcpy(&sys, b, sizeof(sys)); len = ((const char *) b)[sizeof(sys)]; if (len == sizeof(struct record_index_entry)) { memcpy(&ent, (const char *)b + sizeof(sys) + 1, len); yaz_log(YLOG_LOG, "%s " ZINT_FORMAT " next=" ZINT_FORMAT " sz=%d", txt, sys, ent.next, ent.size); } else yaz_log(YLOG_LOG, "%s " ZINT_FORMAT, txt, sys); } int rect_compare(const void *a, const void *b) { zint s_a, s_b; memcpy(&s_a, a, sizeof(s_a)); memcpy(&s_b, b, sizeof(s_b)); if (s_a > s_b) return 1; else if (s_a < s_b) return -1; return 0; } void *rect_code_start(void) { return 0; } void rect_encode(void *p, char **dst, const char **src) { zint sys; int len; memcpy(&sys, *src, sizeof(sys)); zebra_zint_encode(dst, sys); (*src) += sizeof(sys); len = **src; **dst = len; (*src)++; (*dst)++; memcpy(*dst, *src, len); *dst += len; *src += len; } void rect_decode(void *p, char **dst, const char **src) { zint sys; int len; zebra_zint_decode(src, &sys); memcpy(*dst, &sys, sizeof(sys)); *dst += sizeof(sys); len = **src; **dst = len; (*src)++; (*dst)++; memcpy(*dst, *src, len); *dst += len; *src += len; } void rect_code_reset(void *p) { } void rect_code_stop(void *p) { } recindex_t recindex_open(BFiles bfs, int rw, int use_isamb) { recindex_t p = xmalloc(sizeof(*p)); p->index_BFile = 0; p->isamb = 0; p->index_fname = "reci"; p->index_BFile = bf_open(bfs, p->index_fname, RIDX_CHUNK, rw); if (p->index_BFile == NULL) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "open %s", p->index_fname); xfree(p); return 0; } if (use_isamb) { int isam_block_size = 4096; ISAMC_M method; method.compare_item = rect_compare; method.log_item = rect_log_item; method.codec.start = rect_code_start; method.codec.encode = rect_encode; method.codec.decode = rect_decode; method.codec.reset = rect_code_reset; method.codec.stop = rect_code_stop; p->index_fname = "rect"; p->isamb = isamb_open2(bfs, p->index_fname, rw, &method, /* cache */ 0, /* no_cat */ 1, &isam_block_size, /* use_root_ptr */ 1); p->isam_p = 0; if (p->isamb) p->isam_p = isamb_get_root_ptr(p->isamb); } return p; } static void log_pr(const char *txt) { yaz_log(YLOG_LOG, "%s", txt); } void recindex_close(recindex_t p) { if (p) { if (p->index_BFile) bf_close(p->index_BFile); if (p->isamb) { isamb_set_root_ptr(p->isamb, p->isam_p); isamb_dump(p->isamb, p->isam_p, log_pr); isamb_close(p->isamb); } xfree(p); } } int recindex_read_head(recindex_t p, void *buf) { return bf_read(p->index_BFile, 0, 0, 0, buf); } const char *recindex_get_fname(recindex_t p) { return p->index_fname; } ZEBRA_RES recindex_write_head(recindex_t p, const void *buf, size_t len) { int r; assert(p); assert(p->index_BFile); r = bf_write(p->index_BFile, 0, 0, len, buf); if (r) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "write head of %s", p->index_fname); return ZEBRA_FAIL; } return ZEBRA_OK; } int recindex_read_indx(recindex_t p, zint sysno, void *buf, int itemsize, int ignoreError) { int r = 0; if (p->isamb) { if (p->isam_p) { char item[256]; char *st = item; char untilbuf[sizeof(zint) + 1]; ISAMB_PP isam_pp = isamb_pp_open(p->isamb, p->isam_p, 1); memcpy(untilbuf, &sysno, sizeof(sysno)); untilbuf[sizeof(sysno)] = 0; r = isamb_pp_forward(isam_pp, st, untilbuf); isamb_pp_close(isam_pp); if (!r) return 0; if (item[sizeof(sysno)] != itemsize) { yaz_log(YLOG_WARN, "unexpected entry size %d != %d", item[sizeof(sysno)], itemsize); return 0; } memcpy(buf, item + sizeof(sysno) + 1, itemsize); } } else { zint pos = (sysno-1)*itemsize; int off = CAST_ZINT_TO_INT(pos%RIDX_CHUNK); int sz1 = RIDX_CHUNK - off; /* sz1 is size of buffer to read.. */ if (sz1 > itemsize) sz1 = itemsize; /* no more than itemsize bytes */ r = bf_read(p->index_BFile, 1+pos/RIDX_CHUNK, off, sz1, buf); if (r == 1 && sz1 < itemsize) /* boundary? - must read second part */ r = bf_read(p->index_BFile, 2+pos/RIDX_CHUNK, 0, itemsize - sz1, (char*) buf + sz1); if (r != 1 && !ignoreError) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "read in %s at pos %ld", p->index_fname, (long) pos); } } #if 0 { struct record_index_entry *ep = buf; yaz_log(YLOG_LOG, "read r=%d sysno=" ZINT_FORMAT " next=" ZINT_FORMAT " sz=%d", r, sysno, ep->next, ep->size); } #endif return r; } struct code_read_data { int no; zint sysno; void *buf; int itemsize; int insert_flag; }; int bt_code_read(void *vp, char **dst, int *insertMode) { struct code_read_data *s = (struct code_read_data *) vp; if (s->no == 0) return 0; (s->no)--; memcpy(*dst, &s->sysno, sizeof(zint)); *dst += sizeof(zint); **dst = s->itemsize; (*dst)++; memcpy(*dst, s->buf, s->itemsize); *dst += s->itemsize; *insertMode = s->insert_flag; return 1; } void recindex_write_indx(recindex_t p, zint sysno, void *buf, int itemsize) { #if 0 yaz_log(YLOG_LOG, "write_indx sysno=" ZINT_FORMAT, sysno); #endif if (p->isamb) { struct code_read_data input; ISAMC_I isamc_i; input.sysno = sysno; input.buf = buf; input.itemsize = itemsize; isamc_i.clientData = &input; isamc_i.read_item = bt_code_read; input.no = 1; input.insert_flag = 2; isamb_merge(p->isamb, &p->isam_p, &isamc_i); } else { zint pos = (sysno-1)*itemsize; int off = CAST_ZINT_TO_INT(pos%RIDX_CHUNK); int sz1 = RIDX_CHUNK - off; /* sz1 is size of buffer to read.. */ if (sz1 > itemsize) sz1 = itemsize; /* no more than itemsize bytes */ bf_write(p->index_BFile, 1+pos/RIDX_CHUNK, off, sz1, buf); if (sz1 < itemsize) /* boundary? must write second part */ bf_write(p->index_BFile, 2+pos/RIDX_CHUNK, 0, itemsize - sz1, (char*) buf + sz1); } } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/mod_safari.c0000644000175000017500000001744211412332551013526 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include struct filter_info { int segments; }; static void *filter_init(Res res, RecType recType) { struct filter_info *tinfo = (struct filter_info *) xmalloc(sizeof(*tinfo)); tinfo->segments = 0; return tinfo; } static void *filter_init2(Res res, RecType recType) { struct filter_info *tinfo = (struct filter_info *) xmalloc(sizeof(*tinfo)); tinfo->segments = 1; return tinfo; } static ZEBRA_RES filter_config(void *clientData, Res res, const char *args) { return ZEBRA_OK; } static void filter_destroy(void *clientData) { struct filter_info *tinfo = clientData; xfree (tinfo); } struct fi_info { struct recExtractCtrl *p; char *buf; int offset; int max; }; static struct fi_info *fi_open(struct recExtractCtrl *p) { struct fi_info *fi = (struct fi_info *) xmalloc (sizeof(*fi)); fi->p = p; fi->buf = (char *) xmalloc (4096); fi->offset = 1; fi->max = 1; return fi; } static int fi_getchar(struct fi_info *fi, char *dst) { if (fi->offset >= fi->max) { if (fi->max <= 0) return 0; fi->max = fi->p->stream->readf(fi->p->stream, fi->buf, 4096); fi->offset = 0; if (fi->max <= 0) return 0; } *dst = fi->buf[(fi->offset)++]; return 1; } static int fi_gets(struct fi_info *fi, char *dst, int max) { int l = 0; while(1) { char dstbyte; if (!fi_getchar(fi, &dstbyte)) return 0; if (dstbyte == '\n') break; if (l < max) dst[l++] = dstbyte; } dst[l] = '\0'; return 1; } static void fi_close (struct fi_info *fi) { xfree (fi->buf); xfree (fi); } static int filter_extract(void *clientData, struct recExtractCtrl *p) { struct filter_info *tinfo = clientData; char line[512]; RecWord recWord; int ret = RECCTRL_EXTRACT_OK; struct fi_info *fi = fi_open(p); #if 0 yaz_log(YLOG_LOG, "filter_extract off=%ld", (long) (*fi->p->tellf)(fi->p->fh)); #endif (*p->init)(p, &recWord); if (!fi_gets(fi, line, sizeof(line)-1)) ret = RECCTRL_EXTRACT_EOF; else { sscanf(line, "%255s", p->match_criteria); while (fi_gets(fi, line, sizeof(line)-1)) { int nor = 0; char field[40]; const char *cp = line; char type_cstr[2]; #if 0 yaz_log(YLOG_LOG, "safari line: %s", line); #endif type_cstr[1] = '\0'; if (*cp >= '0' && *cp <= '9') type_cstr[0] = '0'; /* the default is 0 (raw) */ else type_cstr[0] = *cp++; /* type given */ type_cstr[1] = '\0'; recWord.index_type = type_cstr; if (tinfo->segments) { if (sscanf(cp, ZINT_FORMAT " " ZINT_FORMAT " " ZINT_FORMAT ZINT_FORMAT " %39s %n", &recWord.record_id, &recWord.section_id, &recWord.segment, &recWord.seqno, field, &nor) < 5) { yaz_log(YLOG_WARN, "Bad safari record line: %s", line); ret = RECCTRL_EXTRACT_ERROR_GENERIC; break; } } else { if (sscanf(cp, ZINT_FORMAT " " ZINT_FORMAT " " ZINT_FORMAT " %39s %n", &recWord.record_id, &recWord.section_id, &recWord.seqno, field, &nor) < 4) { yaz_log(YLOG_WARN, "Bad safari record line: %s", line); ret = RECCTRL_EXTRACT_ERROR_GENERIC; break; } } for (cp = cp + nor; *cp == ' '; cp++) ; recWord.index_name = field; recWord.term_buf = cp; recWord.term_len = strlen(cp); (*p->tokenAdd)(&recWord); } } fi_close(fi); return ret; } static int filter_retrieve (void *clientData, struct recRetrieveCtrl *p) { int r, filter_ptr = 0; static char *filter_buf = NULL; static int filter_size = 0; int make_header = 1; int make_body = 1; const char *elementSetName = NULL; int no_lines = 0; if (p->comp && p->comp->which == Z_RecordComp_simple && p->comp->u.simple->which == Z_ElementSetNames_generic) elementSetName = p->comp->u.simple->u.generic; if (elementSetName) { /* don't make header for the R(aw) element set name */ if (!strcmp(elementSetName, "R")) { make_header = 0; make_body = 1; } /* only make header for the H(eader) element set name */ else if (!strcmp(elementSetName, "H")) { make_header = 1; make_body = 0; } } while (1) { if (filter_ptr + 4096 >= filter_size) { char *nb; filter_size = 2*filter_size + 8192; nb = (char *) xmalloc (filter_size); if (filter_buf) { memcpy (nb, filter_buf, filter_ptr); xfree (filter_buf); } filter_buf = nb; } if (make_header && filter_ptr == 0) { if (p->score >= 0) { sprintf (filter_buf, "Rank: %d\n", p->score); filter_ptr = strlen(filter_buf); } sprintf (filter_buf + filter_ptr, "Local Number: " ZINT_FORMAT "\n", p->localno); filter_ptr = strlen(filter_buf); if (p->fname) { sprintf (filter_buf + filter_ptr, "Filename: %s\n", p->fname); filter_ptr = strlen(filter_buf); } strcpy(filter_buf+filter_ptr++, "\n"); } if (!make_body) break; r = p->stream->readf(p->stream, filter_buf + filter_ptr, 4096); if (r <= 0) break; filter_ptr += r; } filter_buf[filter_ptr] = '\0'; if (elementSetName) { if (!strcmp (elementSetName, "B")) no_lines = 4; if (!strcmp (elementSetName, "M")) no_lines = 20; } if (no_lines) { char *p = filter_buf; int i = 0; while (++i <= no_lines && (p = strchr (p, '\n'))) p++; if (p) { p[1] = '\0'; filter_ptr = p-filter_buf; } } p->output_format = yaz_oid_recsyn_sutrs; p->rec_buf = filter_buf; p->rec_len = filter_ptr; return 0; } static struct recType filter_type = { 0, "safari", filter_init, filter_config, filter_destroy, filter_extract, filter_retrieve }; static struct recType filter_type2 = { 0, "safari2", filter_init2, filter_config, filter_destroy, filter_extract, filter_retrieve }; RecType #ifdef IDZEBRA_STATIC_SAFARI idzebra_filter_safari #else idzebra_filter #endif [] = { &filter_type, &filter_type2, 0, }; /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/retrieve.c0000644000175000017500000012163311412332551013245 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #ifdef WIN32 #include #include #endif #if HAVE_UNISTD_H #include #endif #include "index.h" #include #include #include #include #include #define MAX_SYSNOS_PER_RECORD 40 #define ZEBRA_XML_HEADER_STR "reg->zei, *rec); if ((*rec)->size[recInfo_storeData] > 0 || (*rec)->info[recInfo_filename] == 0) zebra_create_stream_mem(stream, (*rec)->info[recInfo_storeData], (*rec)->size[recInfo_storeData]); else { char full_rep[1024]; int fd; if (zh->path_reg && !yaz_is_abspath((*rec)->info[recInfo_filename])){ strcpy(full_rep, zh->path_reg); strcat(full_rep, "/"); strcat(full_rep, (*rec)->info[recInfo_filename]); } else strcpy(full_rep, (*rec)->info[recInfo_filename]); if ((fd = open(full_rep, O_BINARY|O_RDONLY)) == -1){ yaz_log(YLOG_WARN|YLOG_ERRNO, "Retrieve fail; missing file: %s", full_rep); rec_free(rec); return YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS; } zebra_create_stream_fd(stream, fd, recordAttr->recordOffset); } return 0; } struct index_spec { const char *index_name; const char *index_type; const char *extra; struct index_spec *next; }; struct index_spec *parse_index_spec(const char *elem, NMEM nmem, int *error) { struct index_spec *first = 0; struct index_spec **last = &first; const char *cp = elem; *error = 0; if (cp[0] == ':' && cp[1] == ':') { cp++; /* skip first ':' */ for (;;) { const char *cp0; struct index_spec *spec = nmem_malloc(nmem, sizeof(*spec)); spec->index_type = 0; spec->next = 0; spec->extra = 0; if (!first) first = spec; *last = spec; last = &spec->next; cp++; /* skip ',' or second ':' */ cp0 = cp; while (*cp != ':' && *cp != '\0' && *cp != ',') cp++; spec->index_name = nmem_strdupn(nmem, cp0, cp - cp0); if (*cp == ':') /* type as well */ { cp++; cp0 = cp; while (*cp != '\0' && *cp != ',' && *cp != ':') cp++; spec->index_type = nmem_strdupn(nmem, cp0, cp - cp0); } if (*cp == ':') /* extra arguments */ { cp++; cp0 = cp; while (*cp != '\0' && *cp != ',' && *cp != ':') cp++; spec->extra = nmem_strdupn(nmem, cp0, cp - cp0); } if (*cp != ',') break; } } if (*cp != '\0') *error = 1; return first; } static int sort_fetch( struct special_fetch_s *fi, const char *elemsetname, const Odr_oid *input_format, const Odr_oid **output_format, WRBUF result, WRBUF addinfo) { int ord; ZebraHandle zh = fi->zh; int error; struct index_spec *spec; spec = parse_index_spec(elemsetname, fi->nmem, &error); if (error) return YAZ_BIB1_SPECIFIED_ELEMENT_SET_NAME_NOT_VALID_FOR_SPECIFIED_; /* for sort fetches.. We allow only one index and type must be given */ if (!spec || spec->next || !spec->index_type) return -1; ord = zebraExplain_lookup_attr_str(zh->reg->zei, zinfo_index_category_sort, spec->index_type, spec->index_name); if (ord == -1) return -1; /* is not a sort index */ else { WRBUF wrbuf_str = wrbuf_alloc(); const char *index_type; const char *db = 0; const char *string_index = 0; WRBUF wrbuf_result = result; int off = 0; zebraExplain_lookup_ord(zh->reg->zei, ord, &index_type, &db, &string_index); if (!oid_oidcmp(input_format, yaz_oid_recsyn_xml)) { *output_format = yaz_oid_recsyn_xml; wrbuf_printf(wrbuf_result, ZEBRA_XML_HEADER_STR " sysno=\"" ZINT_FORMAT "\"" " set=\"zebra::index%s\">\n", fi->sysno, elemsetname); } else if (!oid_oidcmp(input_format, yaz_oid_recsyn_sutrs)) { *output_format = yaz_oid_recsyn_sutrs; } else { yaz_log(YLOG_WARN, "unsupported format for element set zebra::%s", elemsetname); *output_format = 0; wrbuf_destroy(wrbuf_str); return YAZ_BIB1_NO_SYNTAXES_AVAILABLE_FOR_THIS_REQUEST; } zebra_sort_type(zh->reg->sort_index, ord); zebra_sort_sysno(zh->reg->sort_index, fi->sysno); zebra_sort_read(zh->reg->sort_index, 0, wrbuf_str); while (off != wrbuf_len(wrbuf_str)) { char dst_buf[IT_MAX_WORD]; assert(off < wrbuf_len(wrbuf_str)); zebra_term_untrans(zh, index_type, dst_buf, wrbuf_buf(wrbuf_str)+off); if (!oid_oidcmp(input_format, yaz_oid_recsyn_xml)) { wrbuf_printf(wrbuf_result, " ", index_type); wrbuf_xmlputs(wrbuf_result, dst_buf); wrbuf_printf(wrbuf_result, "\n"); } else if (!oid_oidcmp(input_format, yaz_oid_recsyn_sutrs)) { wrbuf_printf(wrbuf_result, "%s %s %s\n", string_index, index_type, dst_buf); } off += strlen(wrbuf_buf(wrbuf_str)+off) + 1; } if (!oid_oidcmp(input_format, yaz_oid_recsyn_xml)) { wrbuf_printf(wrbuf_result, "\n"); } wrbuf_destroy(wrbuf_str); return 0; } } static int special_index_fetch( struct special_fetch_s *fi, const char *elemsetname, const Odr_oid *input_format, const Odr_oid **output_format, WRBUF result, WRBUF addinfo, Record rec) { zebra_rec_keys_t keys; int ret_code = 0; ZebraHandle zh = fi->zh; struct index_spec *spec, *spec_list; int error; /* set output variables before processing possible error states */ /* *rec_lenp = 0; */ /* only accept XML and SUTRS requests */ if (oid_oidcmp(input_format, yaz_oid_recsyn_xml) && oid_oidcmp(input_format, yaz_oid_recsyn_sutrs)) { yaz_log(YLOG_WARN, "unsupported format for element set zebra::%s", elemsetname); *output_format = 0; return YAZ_BIB1_NO_SYNTAXES_AVAILABLE_FOR_THIS_REQUEST; } spec_list = parse_index_spec(elemsetname, fi->nmem, &error); if (error) { return YAZ_BIB1_SPECIFIED_ELEMENT_SET_NAME_NOT_VALID_FOR_SPECIFIED_; } for (spec = spec_list; spec; spec = spec->next) { if (zebraExplain_lookup_attr_str(zh->reg->zei, zinfo_index_category_index, spec->index_type, spec->index_name) == -1) return YAZ_BIB1_SPECIFIED_ELEMENT_SET_NAME_NOT_VALID_FOR_SPECIFIED_; } keys = zebra_rec_keys_open(); zebra_rec_keys_set_buf(keys, rec->info[recInfo_delKeys], rec->size[recInfo_delKeys], 0); if (!zebra_rec_keys_rewind(keys)) { ret_code = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS; } else { size_t slen; const char *str; struct it_key key_in; WRBUF wrbuf = result; if (!oid_oidcmp(input_format, yaz_oid_recsyn_xml)) { *output_format = input_format; wrbuf_printf(wrbuf, ZEBRA_XML_HEADER_STR " sysno=\"" ZINT_FORMAT "\"" " set=\"zebra::index%s\">\n", fi->sysno, elemsetname); } else if (!oid_oidcmp(input_format, yaz_oid_recsyn_sutrs)) *output_format = input_format; while (zebra_rec_keys_read(keys, &str, &slen, &key_in)) { int i; int ord = CAST_ZINT_TO_INT(key_in.mem[0]); const char *index_type; const char *db = 0; const char *string_index = 0; char dst_buf[IT_MAX_WORD]; int match = 0; zebraExplain_lookup_ord(zh->reg->zei, ord, &index_type, &db, &string_index); if (!spec_list) match = 1; /* match all if no specs were given */ else { for (spec = spec_list; spec; spec = spec->next) { if ((!spec->index_type || !yaz_matchstr(spec->index_type, index_type)) && !yaz_matchstr(spec->index_name, string_index)) match = 1; } } if (match) { if (zebra_term_untrans(zh, index_type, dst_buf, str)) *dst_buf = '\0'; /* untrans failed */ if (!oid_oidcmp(input_format, yaz_oid_recsyn_xml)) { wrbuf_printf(wrbuf, " ", key_in.mem[key_in.len -1]); wrbuf_xmlputs(wrbuf, dst_buf); wrbuf_printf(wrbuf, "\n"); } else { wrbuf_printf(wrbuf, "%s ", string_index); wrbuf_printf(wrbuf, "%s", index_type); for (i = 1; i < key_in.len; i++) wrbuf_printf(wrbuf, " " ZINT_FORMAT, key_in.mem[i]); wrbuf_printf(wrbuf, " %s", dst_buf); wrbuf_printf(wrbuf, "\n"); } } } if (!oid_oidcmp(input_format, yaz_oid_recsyn_xml)) wrbuf_printf(wrbuf, "\n"); } zebra_rec_keys_close(keys); return ret_code; } static void retrieve_puts_attr(WRBUF wrbuf, const char *name, const char *value) { if (value) { wrbuf_printf(wrbuf, " %s=\"", name); wrbuf_xmlputs(wrbuf, value); wrbuf_printf(wrbuf, "\""); } } static void retrieve_puts_attr_int(WRBUF wrbuf, const char *name, const int value) { wrbuf_printf(wrbuf, " %s=\"%i\"", name, value); } static void retrieve_puts_str(WRBUF wrbuf, const char *name, const char *value) { if (value) wrbuf_printf(wrbuf, "%s %s\n", name, value); } static void retrieve_puts_int(WRBUF wrbuf, const char *name, const int value) { wrbuf_printf(wrbuf, "%s %i\n", name, value); } static void snippet_check_fields(ZebraHandle zh, WRBUF wrbuf, zebra_snippets *doc, const zebra_snippet_word *doc_w, const char *w_index_type) { /* beginning of snippet. See which fields the snippet also occur */ const zebra_snippet_word *w; int no = 0; for (w = zebra_snippets_constlist(doc); w; w = w->next) { /* same sequence but other field? */ if (w->seqno == doc_w->seqno && w->ord != doc_w->ord) { const char *index_type; const char *db = 0; const char *string_index = 0; zebraExplain_lookup_ord(zh->reg->zei, w->ord, &index_type, &db, &string_index); /* only report for same index type */ if (!strcmp(w_index_type, index_type)) { if (no == 0) wrbuf_printf(wrbuf, " fields=\"%s", string_index); else wrbuf_printf(wrbuf, " %s", string_index); no++; } } } if (no) wrbuf_printf(wrbuf, "\""); } static void snippet_xml_record(ZebraHandle zh, WRBUF wrbuf, zebra_snippets *doc) { const zebra_snippet_word *doc_w; int mark_state = 0; wrbuf_printf(wrbuf, "%s>\n", ZEBRA_XML_HEADER_STR); for (doc_w = zebra_snippets_constlist(doc); doc_w; doc_w = doc_w->next) { if (doc_w->mark) { const char *index_type; const char *db = 0; const char *string_index = 0; zebraExplain_lookup_ord(zh->reg->zei, doc_w->ord, &index_type, &db, &string_index); if (mark_state == 0) { wrbuf_printf(wrbuf, " "); } if (doc_w->match) wrbuf_puts(wrbuf, ""); /* not printing leading ws */ if (mark_state || !doc_w->ws || doc_w->match) wrbuf_xmlputs(wrbuf, doc_w->term); if (doc_w->match) wrbuf_puts(wrbuf, ""); } else if (mark_state == 1) { wrbuf_puts(wrbuf, "\n"); } mark_state = doc_w->mark; } if (mark_state == 1) { wrbuf_puts(wrbuf, "\n"); } wrbuf_printf(wrbuf, ""); } int zebra_get_rec_snippets(ZebraHandle zh, zint sysno, zebra_snippets *snippets) { int return_code = 0; Record rec = rec_get(zh->reg->records, sysno); if (!rec) { yaz_log(YLOG_WARN, "rec_get fail on sysno=" ZINT_FORMAT, sysno); return_code = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS; } else { const char *file_type = rec->info[recInfo_fileType]; void *recTypeClientData; RecType rt = recType_byName(zh->reg->recTypes, zh->res, file_type, &recTypeClientData); if (!rt) return_code = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS; else { struct ZebraRecStream stream; return_code = zebra_create_record_stream(zh, &rec, &stream); if (return_code == 0) { extract_snippet(zh, snippets, &stream, rt, recTypeClientData); stream.destroy(&stream); } } rec_free(&rec); } return return_code; } static int snippet_fetch( struct special_fetch_s *fi, const char *elemsetname, const Odr_oid *input_format, const Odr_oid **output_format, WRBUF result, WRBUF addinfo) { ZebraHandle zh = fi->zh; zebra_snippets *rec_snippets = zebra_snippets_create(); int return_code = zebra_get_rec_snippets(zh, fi->sysno, rec_snippets); if (!return_code) { WRBUF wrbuf = result; zebra_snippets *hit_snippet = zebra_snippets_create(); zebra_snippets_hit_vector(zh, fi->setname, fi->sysno, hit_snippet); #if 0 /* for debugging purposes */ yaz_log(YLOG_LOG, "---------------------------"); yaz_log(YLOG_LOG, "REC SNIPPET:"); zebra_snippets_log(rec_snippets, YLOG_LOG, 1); yaz_log(YLOG_LOG, "---------------------------"); yaz_log(YLOG_LOG, "HIT SNIPPET:"); zebra_snippets_log(hit_snippet, YLOG_LOG, 1); #endif zebra_snippets_ring(rec_snippets, hit_snippet, 5, 5); #if 0 yaz_log(YLOG_LOG, "---------------------------"); yaz_log(YLOG_LOG, "RING SNIPPET:"); zebra_snippets_log(rec_snippets, YLOG_LOG, 1); #endif snippet_xml_record(zh, wrbuf, rec_snippets); *output_format = yaz_oid_recsyn_xml; zebra_snippets_destroy(hit_snippet); } zebra_snippets_destroy(rec_snippets); return return_code; } struct term_collect { const char *term; int oc; zint set_occur; }; static zint freq_term(ZebraHandle zh, int ord, const char *term, RSET rset_set) { struct rset_key_control *kc = zebra_key_control_create(zh); char ord_buf[IT_MAX_WORD]; int ord_len = key_SU_encode(ord, ord_buf); char *info; zint hits = 0; NMEM nmem = nmem_create(); strcpy(ord_buf + ord_len, term); info = dict_lookup(zh->reg->dict, ord_buf); if (info) { ISAM_P isam_p; RSET rsets[2], rset; memcpy(&isam_p, info+1, sizeof(ISAM_P)); rsets[0] = zebra_create_rset_isam(zh, nmem, kc, kc->scope, isam_p, 0); rsets[1] = rset_dup(rset_set); rset = rset_create_and(nmem, kc, kc->scope, 2, rsets); zebra_count_set(zh, rset, &hits, zh->approx_limit); rset_delete(rsets[0]); rset_delete(rset); } (*kc->dec)(kc); nmem_destroy(nmem); return hits; } static int term_qsort_handle(const void *a, const void *b) { const struct term_collect *l = a; const struct term_collect *r = b; if (l->set_occur < r->set_occur) return 1; else if (l->set_occur > r->set_occur) return -1; else { const char *lterm = l->term ? l->term : ""; const char *rterm = r->term ? r->term : ""; return strcmp(lterm, rterm); } } static void term_collect_freq(ZebraHandle zh, struct term_collect *col, int no_terms_collect, int ord, RSET rset, double scale_factor) { int i; for (i = 0; i < no_terms_collect; i++) { if (col[i].term) { if (scale_factor < 0.0) { col[i].set_occur = freq_term(zh, ord, col[i].term, rset); } else col[i].set_occur = scale_factor * col[i].oc; } } qsort(col, no_terms_collect, sizeof(*col), term_qsort_handle); } static struct term_collect *term_collect_create(zebra_strmap_t sm, int no_terms_collect, NMEM nmem) { const char *term; void *data_buf; size_t data_len; zebra_strmap_it it; struct term_collect *col = nmem_malloc(nmem, sizeof *col *no_terms_collect); int i; for (i = 0; i < no_terms_collect; i++) { col[i].term = 0; col[i].oc = 0; col[i].set_occur = 0; } /* iterate over terms and collect the most frequent ones */ it = zebra_strmap_it_create(sm); while ((term = zebra_strmap_it_next(it, &data_buf, &data_len))) { /* invariant: col[0] has lowest oc . col[no_terms_collect-1] has highest oc */ int oc = *(int*) data_buf; int j = 0; /* insertion may be slow but terms terms will be "infrequent" and thus number of iterations should be small below */ while (j < no_terms_collect && oc > col[j].oc) j++; if (j) { /* oc <= col[j] and oc > col[j-1] */ --j; memmove(col, col+1, sizeof(*col) * j); col[j].term = term; col[j].oc = oc; } } zebra_strmap_it_destroy(it); return col; } static int perform_facet_sort(ZebraHandle zh, int no_ord, int *ord_array, zebra_strmap_t *map_array, int num_recs, ZebraMetaRecord *poset) { int rec_i; WRBUF w = wrbuf_alloc(); int ord_i; for (ord_i = 0; ord_i < no_ord; ord_i++) { for (rec_i = 0; rec_i < num_recs; rec_i++) { if (!poset[rec_i].sysno) continue; zebra_sort_sysno(zh->reg->sort_index, poset[rec_i].sysno); zebra_sort_type(zh->reg->sort_index, ord_array[ord_i]); wrbuf_rewind(w); if (zebra_sort_read(zh->reg->sort_index, 0, w)) { zebra_strmap_t sm = map_array[ord_i]; int off = 0; while (off != wrbuf_len(w)) { const char *str = wrbuf_buf(w) + off; int *freq = zebra_strmap_lookup(sm, str, 0, 0); if (freq) (*freq)++; else { int v = 1; zebra_strmap_add(sm, str, &v, sizeof v); } off += strlen(str)+1; } } } } wrbuf_destroy(w); return 0; } static int perform_facet_index(ZebraHandle zh, struct special_fetch_s *fi, int no_ord, int *ord_array, zebra_strmap_t *map_array, int num_recs, ZebraMetaRecord *poset, struct index_spec *spec_list) { int max_chunks = 2; int rec_i; res_get_int(zh->res, "facetMaxChunks", &max_chunks); for (rec_i = 0; rec_i < num_recs; rec_i++) { int ret; int j; zint sysnos[MAX_SYSNOS_PER_RECORD]; int no_sysnos = MAX_SYSNOS_PER_RECORD; if (!poset[rec_i].sysno) continue; ret = zebra_result_recid_to_sysno(zh, fi->setname, poset[rec_i].sysno, sysnos, &no_sysnos); assert(no_sysnos > 0); yaz_log(YLOG_DEBUG, "Analyzing rec=%d ISAM sysno=" ZINT_FORMAT " chunks=%d", rec_i, poset[rec_i].sysno, no_sysnos); for (j = 0; j < no_sysnos && j < max_chunks; j++) { size_t slen; const char *str; struct it_key key_in; Record rec = rec_get(zh->reg->records, sysnos[j]); zebra_rec_keys_t keys = zebra_rec_keys_open(); zebra_rec_keys_set_buf(keys, rec->info[recInfo_delKeys], rec->size[recInfo_delKeys], 0); yaz_log(YLOG_DEBUG, "rec %d " ZINT_FORMAT " %s", j, sysnos[j], zebra_rec_keys_empty(keys) ? "empty" : "non-empty"); if (zebra_rec_keys_rewind(keys)) { while (zebra_rec_keys_read(keys, &str, &slen, &key_in)) { int ord_i; struct index_spec *spec; for (spec = spec_list, ord_i = 0; ord_i < no_ord; ord_i++, spec = spec->next) { int ord = CAST_ZINT_TO_INT(key_in.mem[0]); if (ord == ord_array[ord_i] && str[0] != FIRST_IN_FIELD_CHAR) { int *freq; zebra_strmap_t sm = map_array[ord_i]; freq = zebra_strmap_lookup(sm, str, 0, 0); if (freq) (*freq)++; else { int v = 1; zebra_strmap_add(sm, str, &v, sizeof v); } } } } } zebra_rec_keys_close(keys); rec_free(&rec); } } return 0; } static int perform_facet(ZebraHandle zh, struct special_fetch_s *fi, WRBUF result, int num_recs, ZebraMetaRecord *poset, struct index_spec *spec_list, int no_ord, int *ord_array, int use_xml, zinfo_index_category_t cat) { int i; int ret = 0; WRBUF wr = result; struct index_spec *spec; yaz_timing_t timing = yaz_timing_create(); zebra_strmap_t *map_array = nmem_malloc(fi->nmem, sizeof *map_array * no_ord); for (i = 0; i < no_ord; i++) map_array[i] = zebra_strmap_create(); if (cat == zinfo_index_category_sort) perform_facet_sort(zh, no_ord, ord_array, map_array, num_recs, poset); else perform_facet_index(zh, fi, no_ord, ord_array, map_array, num_recs, poset, spec_list); yaz_timing_stop(timing); yaz_log(YLOG_LOG, "facet first phase real=%4.2f cat=%s", yaz_timing_get_real(timing), (cat == zinfo_index_category_sort) ? "sort" : "index"); yaz_timing_start(timing); for (spec = spec_list, i = 0; i < no_ord; i++, spec = spec->next) { int j; NMEM nmem = nmem_create(); struct term_collect *col; int no_collect_terms = 20; if (spec->extra) no_collect_terms = atoi(spec->extra); if (no_collect_terms < 1) no_collect_terms = 1; col = term_collect_create(map_array[i], no_collect_terms, nmem); term_collect_freq(zh, col, no_collect_terms, ord_array[i], resultSetRef(zh, fi->setname), cat == zinfo_index_category_sort ? 1.0 : -1.0); if (use_xml) wrbuf_printf(wr, " \n", spec->index_type, spec->index_name); else wrbuf_printf(wr, "facet %s %s\n", spec->index_type, spec->index_name); for (j = 0; j < no_collect_terms; j++) { if (col[j].term) { char dst_buf[IT_MAX_WORD]; zebra_term_untrans(zh, spec->index_type, dst_buf, col[j].term); if (use_xml) { wrbuf_printf(wr, " "); wrbuf_xmlputs(wr, dst_buf); wrbuf_printf(wr, "\n"); } else { wrbuf_printf(wr, "term %d", col[j].oc); if (col[j].set_occur) wrbuf_printf(wr, " " ZINT_FORMAT, col[j].set_occur); wrbuf_printf(wr, ": %s\n", dst_buf); } } } if (use_xml) wrbuf_puts(wr, " \n"); nmem_destroy(nmem); } for (i = 0; i < no_ord; i++) zebra_strmap_destroy(map_array[i]); yaz_timing_stop(timing); yaz_log(YLOG_LOG, "facet second phase real=%4.2f", yaz_timing_get_real(timing)); yaz_timing_destroy(&timing); return ret; } static int facet_fetch( struct special_fetch_s *fi, const char *elemsetname, const Odr_oid *input_format, const Odr_oid **output_format, WRBUF result, WRBUF addinfo) { zint *pos_array; int i; int num_recs = 10; /* number of records to analyze */ ZebraMetaRecord *poset; ZEBRA_RES ret = ZEBRA_OK; int *ord_array; int use_xml = 0; int no_ord = 0; struct index_spec *spec, *spec_list; int error; ZebraHandle zh = fi->zh; /* whether sort or index based */ zinfo_index_category_t cat = zinfo_index_category_sort; /* see if XML is required for response */ if (oid_oidcmp(input_format, yaz_oid_recsyn_xml) == 0) use_xml = 1; spec_list = parse_index_spec(elemsetname, fi->nmem, &error); if (!spec_list || error) { return YAZ_BIB1_SPECIFIED_ELEMENT_SET_NAME_NOT_VALID_FOR_SPECIFIED_; } for (spec = spec_list; spec; spec = spec->next) { if (!spec->index_type) return YAZ_BIB1_SPECIFIED_ELEMENT_SET_NAME_NOT_VALID_FOR_SPECIFIED_; no_ord++; } /* try to see if all specs are sort based.. If not, try the index based ones */ ord_array = nmem_malloc(fi->nmem, sizeof(*ord_array) * no_ord); for (spec = spec_list, i = 0; spec; spec = spec->next, i++) { int ord = zebraExplain_lookup_attr_str(zh->reg->zei, zinfo_index_category_sort, spec->index_type, spec->index_name); if (ord == -1) break; ord_array[i] = ord; num_recs = 10000; } if (spec) { cat = zinfo_index_category_index; for (spec = spec_list, i = 0; spec; spec = spec->next, i++) { int ord = zebraExplain_lookup_attr_str(zh->reg->zei, zinfo_index_category_index, spec->index_type, spec->index_name); if (ord == -1) break; ord_array[i] = ord; } } if (spec) return YAZ_BIB1_SPECIFIED_ELEMENT_SET_NAME_NOT_VALID_FOR_SPECIFIED_; res_get_int(zh->res, "facetNumRecs", &num_recs); pos_array = (zint *) nmem_malloc(fi->nmem, num_recs * sizeof(*pos_array)); for (i = 0; i < num_recs; i++) pos_array[i] = i+1; poset = zebra_meta_records_create(zh, fi->setname, num_recs, pos_array); if (!poset) { wrbuf_puts(addinfo, fi->setname); return YAZ_BIB1_SPECIFIED_RESULT_SET_DOES_NOT_EXIST; } else { if (use_xml) { wrbuf_printf(result, ZEBRA_XML_HEADER_STR ">\n"); } ret = perform_facet(zh, fi, result, num_recs, poset, spec_list, no_ord, ord_array, use_xml, cat); if (use_xml) wrbuf_puts(result, "\n"); } *output_format = yaz_oid_recsyn_xml; zebra_meta_records_destroy(zh, poset, num_recs); return ret; } static int zebra_special_fetch( void *handle, const char *elemsetname, const Odr_oid *input_format, const Odr_oid **output_format, WRBUF result, WRBUF addinfo) { Record rec = 0; struct special_fetch_s *fi = (struct special_fetch_s *) handle; ZebraHandle zh = fi->zh; zint sysno = fi->sysno; /* processing zebra::facet */ if (elemsetname && 0 == strncmp(elemsetname, "facet", 5)) { return facet_fetch(fi, elemsetname + 5, input_format, output_format, result, addinfo); } if (elemsetname && 0 == strcmp(elemsetname, "snippet")) { return snippet_fetch(fi, elemsetname + 7, input_format, output_format, result, addinfo); } /* processing zebra::meta::sysno */ if (elemsetname && 0 == strcmp(elemsetname, "meta::sysno")) { int ret = 0; if (!oid_oidcmp(input_format, yaz_oid_recsyn_sutrs)) { wrbuf_printf(result, ZINT_FORMAT, fi->sysno); *output_format = input_format; } else if (!oid_oidcmp(input_format, yaz_oid_recsyn_xml)) { wrbuf_printf(result, ZEBRA_XML_HEADER_STR " sysno=\"" ZINT_FORMAT "\"/>\n", fi->sysno); *output_format = input_format; } else ret = YAZ_BIB1_NO_SYNTAXES_AVAILABLE_FOR_THIS_REQUEST; return ret; } /* processing special elementsetname zebra::index:: for sort elements */ if (elemsetname && 0 == strncmp(elemsetname, "index", 5)) { int ret = sort_fetch( fi, elemsetname + 5, input_format, output_format, result, addinfo); if (ret != -1) return ret; /* not a sort index so we continue to get the full record */ } /* fetching binary record up for all other display elementsets */ rec = rec_get(zh->reg->records, sysno); if (!rec) { yaz_log(YLOG_WARN, "rec_get fail on sysno=" ZINT_FORMAT, sysno); return YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS; } /* processing special elementsetnames zebra::data */ if (elemsetname && 0 == strcmp(elemsetname, "data")) { struct ZebraRecStream stream; RecordAttr *recordAttr = rec_init_attr(zh->reg->zei, rec); char *b; zebra_create_record_stream(zh, &rec, &stream); *output_format = input_format; b = nmem_malloc(fi->nmem, recordAttr->recordSize); stream.readf(&stream, b, recordAttr->recordSize); wrbuf_write(result, b, recordAttr->recordSize); stream.destroy(&stream); rec_free(&rec); return 0; } /* processing special elementsetnames zebra::meta:: */ if (elemsetname && 0 == strcmp(elemsetname, "meta")) { int ret = 0; RecordAttr *recordAttr = rec_init_attr(zh->reg->zei, rec); if (!oid_oidcmp(input_format, yaz_oid_recsyn_xml)) { *output_format = input_format; wrbuf_printf(result, ZEBRA_XML_HEADER_STR " sysno=\"" ZINT_FORMAT "\"", sysno); retrieve_puts_attr(result, "base", rec->info[recInfo_databaseName]); retrieve_puts_attr(result, "file", rec->info[recInfo_filename]); retrieve_puts_attr(result, "type", rec->info[recInfo_fileType]); if (fi->score >= 0) retrieve_puts_attr_int(result, "score", fi->score); wrbuf_printf(result, " rank=\"" ZINT_FORMAT "\"" " size=\"%i\"" " set=\"zebra::%s\"/>\n", recordAttr->staticrank, recordAttr->recordSize, elemsetname); } else if (!oid_oidcmp(input_format, yaz_oid_recsyn_sutrs)) { *output_format = input_format; wrbuf_printf(result, "sysno " ZINT_FORMAT "\n", sysno); retrieve_puts_str(result, "base", rec->info[recInfo_databaseName]); retrieve_puts_str(result, "file", rec->info[recInfo_filename]); retrieve_puts_str(result, "type", rec->info[recInfo_fileType]); if (fi->score >= 0) retrieve_puts_int(result, "score", fi->score); wrbuf_printf(result, "rank " ZINT_FORMAT "\n" "size %i\n" "set zebra::%s\n", recordAttr->staticrank, recordAttr->recordSize, elemsetname); } else ret = YAZ_BIB1_NO_SYNTAXES_AVAILABLE_FOR_THIS_REQUEST; rec_free(&rec); return ret; } /* processing special elementsetnames zebra::index:: */ if (elemsetname && 0 == strncmp(elemsetname, "index", 5)) { int ret = special_index_fetch( fi, elemsetname + 5, input_format, output_format, result, addinfo, rec); rec_free(&rec); return ret; } if (rec) rec_free(&rec); return YAZ_BIB1_SPECIFIED_ELEMENT_SET_NAME_NOT_VALID_FOR_SPECIFIED_; } int zebra_record_fetch(ZebraHandle zh, const char *setname, zint sysno, int score, ODR odr, const Odr_oid *input_format, Z_RecordComposition *comp, const Odr_oid **output_format, char **rec_bufp, int *rec_lenp, char **basenamep, WRBUF addinfo_w) { Record rec; char *fname, *file_type, *basename; const char *elemsetname; struct ZebraRecStream stream; RecordAttr *recordAttr; void *clientData; int return_code = 0; zint sysnos[MAX_SYSNOS_PER_RECORD]; int no_sysnos = MAX_SYSNOS_PER_RECORD; ZEBRA_RES res; struct special_fetch_s fetch_info; res = zebra_result_recid_to_sysno(zh, setname, sysno, sysnos, &no_sysnos); if (res != ZEBRA_OK) return ZEBRA_FAIL; sysno = sysnos[0]; *basenamep = 0; elemsetname = yaz_get_esn(comp); fetch_info.zh = zh; fetch_info.setname = setname; fetch_info.sysno = sysno; fetch_info.score = score; fetch_info.nmem = odr->mem; /* processing zebra special elementset names of form 'zebra:: */ if (elemsetname && 0 == strncmp(elemsetname, "zebra::", 7)) { WRBUF result = wrbuf_alloc(); int r = zebra_special_fetch(&fetch_info, elemsetname + 7, input_format, output_format, result, addinfo_w); if (r == 0) { *rec_bufp = odr_strdup(odr, wrbuf_cstr(result)); *rec_lenp = wrbuf_len(result); } wrbuf_destroy(result); return r; } /* processing all other element set names */ rec = rec_get(zh->reg->records, sysno); if (!rec) { yaz_log(YLOG_WARN, "rec_get fail on sysno=" ZINT_FORMAT, sysno); *basenamep = 0; return YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS; } recordAttr = rec_init_attr(zh->reg->zei, rec); file_type = rec->info[recInfo_fileType]; fname = rec->info[recInfo_filename]; basename = rec->info[recInfo_databaseName]; *basenamep = (char *) odr_malloc(odr, strlen(basename)+1); strcpy(*basenamep, basename); yaz_log(YLOG_DEBUG, "retrieve localno=" ZINT_FORMAT " score=%d", sysno, score); return_code = zebra_create_record_stream(zh, &rec, &stream); if (rec) { RecType rt; struct recRetrieveCtrl retrieveCtrl; retrieveCtrl.stream = &stream; retrieveCtrl.fname = fname; retrieveCtrl.localno = sysno; retrieveCtrl.staticrank = recordAttr->staticrank; retrieveCtrl.score = score; retrieveCtrl.recordSize = recordAttr->recordSize; retrieveCtrl.odr = odr; retrieveCtrl.input_format = retrieveCtrl.output_format = input_format; retrieveCtrl.comp = comp; retrieveCtrl.encoding = zh->record_encoding; retrieveCtrl.diagnostic = 0; retrieveCtrl.addinfo = 0; retrieveCtrl.dh = zh->reg->dh; retrieveCtrl.res = zh->res; retrieveCtrl.rec_buf = 0; retrieveCtrl.rec_len = -1; retrieveCtrl.handle = &fetch_info; retrieveCtrl.special_fetch = zebra_special_fetch; if (!(rt = recType_byName(zh->reg->recTypes, zh->res, file_type, &clientData))) { wrbuf_printf(addinfo_w, "Could not handle record type %.40s", file_type); return_code = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS; } else { (*rt->retrieve)(clientData, &retrieveCtrl); return_code = retrieveCtrl.diagnostic; *output_format = retrieveCtrl.output_format; *rec_bufp = (char *) retrieveCtrl.rec_buf; *rec_lenp = retrieveCtrl.rec_len; if (retrieveCtrl.addinfo) wrbuf_puts(addinfo_w, retrieveCtrl.addinfo); } stream.destroy(&stream); rec_free(&rec); } return return_code; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/rank1.c0000644000175000017500000001614111412332551012431 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #ifdef WIN32 #include #endif #if HAVE_UNISTD_H #include #endif #include "index.h" #include "rank.h" static int log_level = 0; static int log_initialized = 0; struct rank_class_info { int dummy; }; struct rank_term_info { int local_occur; zint global_occur; int global_inv; int rank_flag; int rank_weight; TERMID term; int term_index; }; struct rank_set_info { int last_pos; int no_entries; int no_rank_entries; struct rank_term_info *entries; NMEM nmem; }; static int log2_int(zint g) { int n = 0; if (g < 0) return 0; while ((g = g>>1)) n++; return n; } /* * create: Creates/Initialises this rank handler. This routine is * called exactly once. The routine returns the class_handle. */ static void *create(ZebraHandle zh) { struct rank_class_info *ci = (struct rank_class_info *) xmalloc(sizeof(*ci)); if (!log_initialized) { log_level = yaz_log_module_level("rank1"); log_initialized = 1; } yaz_log(log_level, "rank-1 create"); return ci; } /* * destroy: Destroys this rank handler. This routine is called * when the handler is no longer needed - i.e. when the server * dies. The class_handle was previously returned by create. */ static void destroy(struct zebra_register *reg, void *class_handle) { struct rank_class_info *ci = (struct rank_class_info *) class_handle; yaz_log(log_level, "rank-1 destroy"); xfree(ci); } /** * begin: Prepares beginning of "real" ranking. Called once for * each result set. The returned handle is a "set handle" and * will be used in each of the handlers below. */ static void *begin(struct zebra_register *reg, void *class_handle, RSET rset, NMEM nmem, TERMID *terms, int numterms) { struct rank_set_info *si = (struct rank_set_info *) nmem_malloc(nmem,sizeof(*si)); int i; yaz_log(log_level, "rank-1 begin"); si->no_entries = numterms; si->no_rank_entries = 0; si->nmem=nmem; si->entries = (struct rank_term_info *) nmem_malloc(si->nmem, sizeof(*si->entries)*numterms); for (i = 0; i < numterms; i++) { zint g = rset_count(terms[i]->rset); yaz_log(log_level, "i=%d flags=%s '%s'", i, terms[i]->flags, terms[i]->name ); if (!strncmp(terms[i]->flags, "rank,", 5)) { const char *cp = strstr(terms[i]->flags+4, ",w="); si->entries[i].rank_flag = 1; if (cp) si->entries[i].rank_weight = atoi(cp+3); else si->entries[i].rank_weight = 34; /* sqrroot of 1000 */ yaz_log(log_level, " i=%d weight=%d g="ZINT_FORMAT, i, si->entries[i].rank_weight, g); (si->no_rank_entries)++; } else si->entries[i].rank_flag = 0; si->entries[i].local_occur = 0; /* FIXME */ si->entries[i].global_occur = g; si->entries[i].global_inv = 32 - log2_int(g); yaz_log(log_level, " global_inv = %d g = " ZINT_FORMAT, (int) (32-log2_int(g)), g); si->entries[i].term = terms[i]; si->entries[i].term_index=i; terms[i]->rankpriv = &(si->entries[i]); } return si; } /* * end: Terminates ranking process. Called after a result set * has been ranked. */ static void end(struct zebra_register *reg, void *set_handle) { yaz_log(log_level, "rank-1 end"); /* no need to free anything, they are in nmems */ } /** * add: Called for each word occurence in a result set. This routine * should be as fast as possible. This routine should "incrementally" * update the score. */ static void add(void *set_handle, int seqno, TERMID term) { struct rank_set_info *si = (struct rank_set_info *) set_handle; struct rank_term_info *ti; assert(si); if (!term) { yaz_log(log_level, "rank-1 add NULL term"); return; } ti= (struct rank_term_info *) term->rankpriv; assert(ti); si->last_pos = seqno; ti->local_occur++; yaz_log(log_level, "rank-1 add seqno=%d term=%s count=%d", seqno, term->name,ti->local_occur); } /* * calc: Called for each document in a result. This handler should * produce a score based on previous call(s) to the add handler. The * score should be between 0 and 1000. If score cannot be obtained * -1 should be returned. */ static int calc_1(void *set_handle, zint sysno, zint staticrank, int *stop_flag) { int i, lo, divisor, score = 0; struct rank_set_info *si = (struct rank_set_info *) set_handle; if (!si->no_rank_entries) return -1; /* ranking not enabled for any terms */ for (i = 0; i < si->no_entries; i++) { yaz_log(log_level, "calc: i=%d rank_flag=%d lo=%d", i, si->entries[i].rank_flag, si->entries[i].local_occur); if (si->entries[i].rank_flag && (lo = si->entries[i].local_occur)) score += (8+log2_int (lo)) * si->entries[i].global_inv * si->entries[i].rank_weight; } divisor = si->no_rank_entries * (8+log2_int(si->last_pos/si->no_entries)); score = score / divisor; yaz_log(log_level, "calc sysno=" ZINT_FORMAT " score=%d", sysno, score); if (score > 1000) score = 1000; /* reset the counts for the next term */ for (i = 0; i < si->no_entries; i++) si->entries[i].local_occur = 0; return score; } static int calc_2(void *set_handle, zint sysno, zint staticrank, int *stop_flag) { int score = calc_1(set_handle, sysno, staticrank, stop_flag); return score - staticrank; } /* * Pseudo-meta code with sequence of calls as they occur in a * server. Handlers are prefixed by --: * * server init * -- create * foreach search * rank result set * -- begin * foreach record * foreach word * -- add * -- calc * -- end * -- destroy * server close */ static struct rank_control rank_1_control = { "rank-1", create, destroy, begin, end, calc_1, add, }; struct rank_control *rank_1_class = &rank_1_control; static struct rank_control rank_2_control = { "rank-2", create, destroy, begin, end, calc_2, add, }; struct rank_control *rank_2_class = &rank_2_control; /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/inline.h0000644000175000017500000000265511412332551012705 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef INLINE_H #define INLINE_H #include "marcomp.h" #ifdef __cplusplus extern "C" { #endif typedef struct inline_field { char *name; char *ind1; char *ind2; struct inline_subfield *list; } inline_field; typedef struct inline_subfield { char *name; char *data; struct inline_subfield *next; struct inline_subfield *parent; } inline_subfield; inline_field *inline_mk_field(void); int inline_parse(inline_field *pf, const char *tag, const char *s); void inline_destroy_field(inline_field *p); #ifdef __cplusplus } #endif #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/reckeys.c0000644000175000017500000001462011412332551013062 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include "reckeys.h" #include #include struct zebra_rec_key_entry { char *buf; size_t len; struct it_key key; struct zebra_rec_key_entry *next; }; struct zebra_rec_keys_t_ { size_t buf_used; size_t buf_max; size_t fetch_offset; char *buf; void *encode_handle; void *decode_handle; char owner_of_buffer; zint custom_record_id; NMEM nmem; size_t hash_size; struct zebra_rec_key_entry **entries; }; struct zebra_rec_key_entry **zebra_rec_keys_mk_hash(zebra_rec_keys_t p, const char *buf, size_t len, const struct it_key *key) { unsigned h = 0; size_t i; int j; #if 0 h = key->mem[key->len-1]; #else for (i = 0; ilen; j++) h = h * 65509 + CAST_ZINT_TO_INT(key->mem[j]); #endif return &p->entries[h % (unsigned) p->hash_size]; } static void init_hash(zebra_rec_keys_t p) { p->entries = 0; nmem_reset(p->nmem); if (p->hash_size) { size_t i; p->entries = nmem_malloc(p->nmem, p->hash_size * sizeof(*p->entries)); for (i = 0; ihash_size; i++) p->entries[i] = 0; } } zebra_rec_keys_t zebra_rec_keys_open(void) { zebra_rec_keys_t p = xmalloc(sizeof(*p)); p->buf_used = 0; p->buf_max = 0; p->fetch_offset = 0; p->buf = 0; p->owner_of_buffer = 1; p->encode_handle = iscz1_start(); p->decode_handle = iscz1_start(); p->custom_record_id = 0; p->nmem = nmem_create(); p->hash_size = 32767; p->entries = 0; init_hash(p); return p; } void zebra_rec_keys_set_buf(zebra_rec_keys_t p, char *buf, size_t sz, int copy_buf) { if (p->owner_of_buffer) xfree(p->buf); p->buf_used = sz; p->buf_max = sz; if (!copy_buf) { p->buf = buf; } else { if (!sz) p->buf = 0; else { p->buf = xmalloc(sz); memcpy(p->buf, buf, sz); } } p->owner_of_buffer = copy_buf; } void zebra_rec_keys_get_buf(zebra_rec_keys_t p, char **buf, size_t *sz) { *buf = p->buf; *sz = p->buf_used; p->buf = 0; p->buf_max = 0; p->buf_used = 0; } void zebra_rec_keys_close(zebra_rec_keys_t p) { if (!p) return; if (p->owner_of_buffer) xfree(p->buf); if (p->encode_handle) iscz1_stop(p->encode_handle); if (p->decode_handle) iscz1_stop(p->decode_handle); nmem_destroy(p->nmem); xfree(p); } int zebra_rec_keys_add_hash(zebra_rec_keys_t keys, const char *str, size_t slen, const struct it_key *key) { struct zebra_rec_key_entry **kep_first = zebra_rec_keys_mk_hash(keys, str, slen, key); struct zebra_rec_key_entry **kep = kep_first; while (*kep) { struct zebra_rec_key_entry *e = *kep; if (slen == e->len && !memcmp(str, e->buf, slen) && !key_compare(key, &e->key)) { *kep = (*kep)->next; /* out of queue */ e->next = *kep_first; /* move to front */ *kep_first = e; return 0; } kep = &(*kep)->next; } *kep = nmem_malloc(keys->nmem, sizeof(**kep)); (*kep)->next = 0; (*kep)->len = slen; memcpy(&(*kep)->key, key, sizeof(*key)); (*kep)->buf = nmem_malloc(keys->nmem, slen); memcpy((*kep)->buf, str, slen); return 1; } void zebra_rec_keys_write(zebra_rec_keys_t keys, const char *str, size_t slen, const struct it_key *key) { char *dst; const char *src = (char*) key; assert(keys->owner_of_buffer); if (key->mem[1]) /* record_id custom */ { keys->custom_record_id = key->mem[1]; } #if 1 if (!zebra_rec_keys_add_hash(keys, str, slen, key)) { #if 0 yaz_log(YLOG_LOG, "dup key slen=%d %.*s " "ord=" ZINT_FORMAT " seq=" ZINT_FORMAT, slen, slen, str, key->mem[0], key->mem[key->len-1]); #endif return; /* key already there . Omit it */ } #endif if (keys->buf_used+1024 > keys->buf_max) { char *b = (char *) xmalloc (keys->buf_max += 128000); if (keys->buf_used > 0) memcpy (b, keys->buf, keys->buf_used); xfree (keys->buf); keys->buf = b; } dst = keys->buf + keys->buf_used; iscz1_encode(keys->encode_handle, &dst, &src); memcpy (dst, str, slen); dst += slen; *dst++ = '\0'; keys->buf_used = dst - keys->buf; } void zebra_rec_keys_reset(zebra_rec_keys_t keys) { assert(keys); keys->buf_used = 0; iscz1_reset(keys->encode_handle); init_hash(keys); } int zebra_rec_keys_rewind(zebra_rec_keys_t keys) { assert(keys); iscz1_reset(keys->decode_handle); keys->fetch_offset = 0; if (keys->buf_used == 0) return 0; return 1; } int zebra_rec_keys_empty(zebra_rec_keys_t keys) { if (keys->buf_used == 0) return 1; return 0; } int zebra_rec_keys_read(zebra_rec_keys_t keys, const char **str, size_t *slen, struct it_key *key) { assert(keys); if (keys->fetch_offset == keys->buf_used) return 0; else { const char *src = keys->buf + keys->fetch_offset; char *dst = (char*) key; assert (keys->fetch_offset < keys->buf_used); /* store the destination key */ iscz1_decode(keys->decode_handle, &dst, &src); /* store pointer to string and length of it */ *str = src; *slen = strlen(src); src += *slen + 1; keys->fetch_offset = src - keys->buf; } return 1; } zint zebra_rec_keys_get_custom_record_id(zebra_rec_keys_t keys) { return keys->custom_record_id; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/zebrasrv.c0000644000175000017500000006125611412332551013262 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #ifdef WIN32 #include #include #include #endif #if HAVE_UNISTD_H #include #endif #include #include #include #include #include #include #include #include #include static int bend_sort(void *handle, bend_sort_rr *rr); static int bend_delete(void *handle, bend_delete_rr *rr); static int bend_esrequest(void *handle, bend_esrequest_rr *rr); static int bend_segment(void *handle, bend_segment_rr *rr); static int bend_search(void *handle, bend_search_rr *r); static int bend_fetch(void *handle, bend_fetch_rr *r); static int bend_scan(void *handle, bend_scan_rr *r); bend_initresult *bend_init(bend_initrequest *q) { bend_initresult *r = (bend_initresult *) odr_malloc(q->stream, sizeof(*r)); ZebraHandle zh; struct statserv_options_block *sob; char *user = NULL; char *passwd = NULL; char version_str[16]; r->errcode = 0; r->errstring = 0; q->bend_sort = bend_sort; q->bend_delete = bend_delete; q->bend_esrequest = bend_esrequest; q->bend_segment = bend_segment; q->bend_search = bend_search; q->bend_fetch = bend_fetch; q->bend_scan = bend_scan; zebra_get_version(version_str, 0); q->implementation_name = "Zebra Information Server"; q->implementation_version = odr_strdup(q->stream, version_str); yaz_log(YLOG_DEBUG, "bend_init"); sob = statserv_getcontrol(); if (!(zh = zebra_open(sob->handle, 0))) { yaz_log(YLOG_WARN, "Failed to read config `%s'", sob->configname); r->errcode = YAZ_BIB1_PERMANENT_SYSTEM_ERROR; return r; } r->handle = zh; q->query_charset = odr_strdup(q->stream, zebra_get_encoding(zh)); if (q->auth) { if (q->auth->which == Z_IdAuthentication_open) { char *openpass = xstrdup(q->auth->u.open); char *cp = strchr(openpass, '/'); if (cp) { *cp = '\0'; user = nmem_strdup(odr_getmem(q->stream), openpass); passwd = nmem_strdup(odr_getmem(q->stream), cp+1); } xfree(openpass); } else if (q->auth->which == Z_IdAuthentication_idPass) { Z_IdPass *idPass = q->auth->u.idPass; user = idPass->userId; passwd = idPass->password; } } if (zebra_auth(zh, user, passwd) != ZEBRA_OK) { r->errcode = YAZ_BIB1_INIT_AC_BAD_USERID_AND_OR_PASSWORD; r->errstring = user; return r; } if (q->charneg_request) /* characater set and language negotiation? */ { char **charsets = 0; int num_charsets; char **langs = 0; int num_langs = 0; int selected = 0; int i; NMEM nmem = nmem_create(); yaz_get_proposal_charneg(nmem, q->charneg_request, &charsets, &num_charsets, &langs, &num_langs, &selected); for (i = 0; i < num_charsets; i++) { const char *right_name = ""; /* * FIXME! It is like rudiment :-)) * We have to support this short names of character sets, * because a lot servers in Russia to use own in during * character set and language negotiation still. */ if (!yaz_matchstr(charsets[i], "win")) { right_name = "WINDOWS-1251"; } else if (!yaz_matchstr(charsets[i], "koi")) { right_name = "KOI8-R"; } else if (!yaz_matchstr(charsets[i], "iso")) { right_name = "ISO-8859-5"; } else if (!yaz_matchstr(charsets[i], "dos")) { right_name = "CP866"; } else if (!yaz_matchstr(charsets[i], "uni")) { right_name = "UTF-8"; } else { right_name = charsets[i]; } if (odr_set_charset(q->decode, "UTF-8", right_name) == 0) { yaz_log(YLOG_LOG, "charset %d %s (proper name %s): OK", i, charsets[i], right_name); odr_set_charset(q->stream, right_name, "UTF-8"); if (selected) zebra_record_encoding(zh, right_name); zebra_octet_term_encoding(zh, right_name); q->charneg_response = yaz_set_response_charneg(q->stream, charsets[i], 0, selected); break; } else { yaz_log(YLOG_LOG, "charset %d %s (proper name %s): unsupported", i, charsets[i], right_name); } } nmem_destroy(nmem); } return r; } static void search_terms(ZebraHandle zh, bend_search_rr *r) { int no_terms; int i; int type = Z_Term_general; struct Z_External *ext; Z_SearchInfoReport *sr; zebra_result_set_term_no(zh, r->setname, &no_terms); if (!no_terms) return; r->search_info = odr_malloc(r->stream, sizeof(*r->search_info)); r->search_info->num_elements = 1; r->search_info->list = odr_malloc(r->stream, sizeof(*r->search_info->list)); r->search_info->list[0] = odr_malloc(r->stream, sizeof(**r->search_info->list)); r->search_info->list[0]->category = 0; r->search_info->list[0]->which = Z_OtherInfo_externallyDefinedInfo; ext = odr_malloc(r->stream, sizeof(*ext)); r->search_info->list[0]->information.externallyDefinedInfo = ext; ext->direct_reference = odr_oiddup(r->stream, yaz_oid_userinfo_searchresult_1); ext->indirect_reference = 0; ext->descriptor = 0; ext->which = Z_External_searchResult1; sr = odr_malloc(r->stream, sizeof(Z_SearchInfoReport)); ext->u.searchResult1 = sr; sr->num = no_terms; sr->elements = odr_malloc(r->stream, sr->num * sizeof(*sr->elements)); for (i = 0; isetname, i, &count, &approx, outbuf, &len, &term_ref_id); se = sr->elements[i] = odr_malloc(r->stream, sizeof(**sr->elements)); se->subqueryId = term_ref_id ? odr_strdup(r->stream, term_ref_id) : 0; se->fullQuery = odr_booldup(r->stream, 0); se->subqueryExpression = odr_malloc(r->stream, sizeof(Z_QueryExpression)); se->subqueryExpression->which = Z_QueryExpression_term; se->subqueryExpression->u.term = odr_malloc(r->stream, sizeof(Z_QueryExpressionTerm)); term = odr_malloc(r->stream, sizeof(Z_Term)); se->subqueryExpression->u.term->queryTerm = term; switch (type) { case Z_Term_characterString: term->which = Z_Term_characterString; term->u.characterString = odr_strdup(r->stream, outbuf); break; case Z_Term_general: term->which = Z_Term_general; term->u.general = odr_malloc(r->stream, sizeof(*term->u.general)); term->u.general->size = term->u.general->len = len; term->u.general->buf = odr_malloc(r->stream, len); memcpy(term->u.general->buf, outbuf, len); break; default: term->which = Z_Term_general; term->u.null = odr_nullval(); } se->subqueryExpression->u.term->termComment = 0; se->subqueryInterpretation = 0; se->subqueryRecommendation = 0; if (count > 2147483646) count = 2147483647; se->subqueryCount = odr_intdup(r->stream, CAST_ZINT_TO_INT(count)); se->subqueryWeight = 0; se->resultsByDB = 0; } } static int break_handler(void *client_data) { bend_association assoc =(bend_association) client_data; if (!bend_assoc_is_alive(assoc)) return 1; return 0; } int bend_search(void *handle, bend_search_rr *r) { ZebraHandle zh = (ZebraHandle) handle; zint zhits = 0; ZEBRA_RES res; res = zebra_select_databases(zh, r->num_bases, (const char **) r->basenames); if (res != ZEBRA_OK) { zebra_result(zh, &r->errcode, &r->errstring); return 0; } zebra_set_break_handler(zh, break_handler, r->association); yaz_log(YLOG_DEBUG, "ResultSet '%s'", r->setname); switch (r->query->which) { case Z_Query_type_1: case Z_Query_type_101: res = zebra_search_RPN_x(zh, r->stream, r->query->u.type_1, r->setname, &zhits, &r->estimated_hit_count, &r->partial_resultset); if (res != ZEBRA_OK) zebra_result(zh, &r->errcode, &r->errstring); else { if (zhits > 2147483646) zhits = 2147483647; r->hits = CAST_ZINT_TO_INT(zhits); search_terms(zh, r); } break; case Z_Query_type_2: r->errcode = YAZ_BIB1_QUERY_TYPE_UNSUPP; r->errstring = "type-2"; break; default: r->errcode = YAZ_BIB1_QUERY_TYPE_UNSUPP; } zebra_set_break_handler(zh, 0, 0); return 0; } int bend_fetch(void *handle, bend_fetch_rr *r) { ZebraHandle zh = (ZebraHandle) handle; ZebraRetrievalRecord retrievalRecord; ZEBRA_RES res; retrievalRecord.position = r->number; r->last_in_set = 0; res = zebra_records_retrieve(zh, r->stream, r->setname, r->comp, r->request_format, 1, &retrievalRecord); if (res != ZEBRA_OK) { /* non-surrogate diagnostic */ zebra_result(zh, &r->errcode, &r->errstring); } else if (retrievalRecord.errCode) { /* surrogate diagnostic (diagnostic per record) */ r->surrogate_flag = 1; r->errcode = retrievalRecord.errCode; r->errstring = retrievalRecord.errString; r->basename = retrievalRecord.base; } else { r->basename = retrievalRecord.base; r->record = retrievalRecord.buf; r->len = retrievalRecord.len; r->output_format = odr_oiddup(r->stream, retrievalRecord.format); } return 0; } static int bend_scan(void *handle, bend_scan_rr *r) { ZebraScanEntry *entries; ZebraHandle zh = (ZebraHandle) handle; int is_partial, i; ZEBRA_RES res; res = zebra_select_databases(zh, r->num_bases, (const char **) r->basenames); if (res != ZEBRA_OK) { zebra_result(zh, &r->errcode, &r->errstring); return 0; } if (r->step_size != 0 && *r->step_size != 0) { r->errcode = YAZ_BIB1_ONLY_ZERO_STEP_SIZE_SUPPORTED_FOR_SCAN; r->errstring = 0; return 0; } res = zebra_scan(zh, r->stream, r->term, r->attributeset, &r->term_position, &r->num_entries, &entries, &is_partial, 0 /* setname */); if (res == ZEBRA_OK) { if (is_partial) r->status = BEND_SCAN_PARTIAL; else r->status = BEND_SCAN_SUCCESS; for (i = 0; i < r->num_entries; i++) { r->entries[i].term = entries[i].term; r->entries[i].display_term = entries[i].display_term; r->entries[i].occurrences = CAST_ZINT_TO_INT(entries[i].occurrences); } } else { r->status = BEND_SCAN_PARTIAL; zebra_result(zh, &r->errcode, &r->errstring); } return 0; } void bend_close(void *handle) { zebra_close((ZebraHandle) handle); xmalloc_trav("bend_close"); } int bend_sort(void *handle, bend_sort_rr *rr) { ZebraHandle zh = (ZebraHandle) handle; if (zebra_sort(zh, rr->stream, rr->num_input_setnames, (const char **) rr->input_setnames, rr->output_setname, rr->sort_sequence, &rr->sort_status) != ZEBRA_OK) zebra_result(zh, &rr->errcode, &rr->errstring); return 0; } int bend_delete(void *handle, bend_delete_rr *rr) { ZebraHandle zh = (ZebraHandle) handle; rr->delete_status = zebra_deleteResultSet(zh, rr->function, rr->num_setnames, rr->setnames, rr->statuses); return 0; } static void es_admin_request(bend_esrequest_rr *rr, ZebraHandle zh, Z_AdminEsRequest *r) { ZEBRA_RES res = ZEBRA_OK; if (r->toKeep->databaseName) { yaz_log(YLOG_LOG, "adm request database %s", r->toKeep->databaseName); } switch (r->toKeep->which) { case Z_ESAdminOriginPartToKeep_reIndex: yaz_log(YLOG_LOG, "adm-reindex"); rr->errcode = YAZ_BIB1_ES_IMMEDIATE_EXECUTION_FAILED; rr->errstring = "adm-reindex not implemented yet"; break; case Z_ESAdminOriginPartToKeep_truncate: rr->errcode = YAZ_BIB1_ES_IMMEDIATE_EXECUTION_FAILED; rr->errstring = "adm-reindex not implemented yet"; yaz_log(YLOG_LOG, "adm-truncate"); break; case Z_ESAdminOriginPartToKeep_drop: yaz_log(YLOG_LOG, "adm-drop"); res = zebra_drop_database(zh, r->toKeep->databaseName); break; case Z_ESAdminOriginPartToKeep_create: yaz_log(YLOG_LOG, "adm-create %s", r->toKeep->databaseName); res = zebra_create_database(zh, r->toKeep->databaseName); break; case Z_ESAdminOriginPartToKeep_import: yaz_log(YLOG_LOG, "adm-import"); res = zebra_admin_import_begin(zh, r->toKeep->databaseName, r->toKeep->u.import->recordType); break; case Z_ESAdminOriginPartToKeep_refresh: yaz_log(YLOG_LOG, "adm-refresh"); break; case Z_ESAdminOriginPartToKeep_commit: yaz_log(YLOG_LOG, "adm-commit"); if (r->toKeep->databaseName) { if (zebra_select_database(zh, r->toKeep->databaseName) != ZEBRA_OK) yaz_log(YLOG_WARN, "zebra_select_database failed in " "adm-commit"); } zebra_commit(zh); break; case Z_ESAdminOriginPartToKeep_shutdown: yaz_log(YLOG_LOG, "shutdown"); res = zebra_admin_shutdown(zh); break; case Z_ESAdminOriginPartToKeep_start: yaz_log(YLOG_LOG, "start"); zebra_admin_start(zh); break; default: yaz_log(YLOG_LOG, "unknown admin"); rr->errcode = YAZ_BIB1_ES_IMMEDIATE_EXECUTION_FAILED; rr->errstring = "adm-reindex not implemented yet"; } if (res != ZEBRA_OK) zebra_result(zh, &rr->errcode, &rr->errstring); } static void es_admin(bend_esrequest_rr *rr, ZebraHandle zh, Z_Admin *r) { switch (r->which) { case Z_Admin_esRequest: es_admin_request(rr, zh, r->u.esRequest); return; default: break; } yaz_log(YLOG_WARN, "adm taskpackage (unhandled)"); rr->errcode = YAZ_BIB1_ES_IMMEDIATE_EXECUTION_FAILED; rr->errstring = "adm-task package (unhandled)"; } int bend_segment(void *handle, bend_segment_rr *rr) { ZebraHandle zh = (ZebraHandle) handle; Z_Segment *segment = rr->segment; if (segment->num_segmentRecords) zebra_admin_import_segment(zh, rr->segment); else zebra_admin_import_end(zh); return 0; } int bend_esrequest(void *handle, bend_esrequest_rr *rr) { ZebraHandle zh = (ZebraHandle) handle; yaz_log(YLOG_LOG, "function: " ODR_INT_PRINTF, *rr->esr->function); if (rr->esr->packageName) yaz_log(YLOG_LOG, "packagename: %s", rr->esr->packageName); yaz_log(YLOG_LOG, "Waitaction: " ODR_INT_PRINTF, *rr->esr->waitAction); if (!rr->esr->taskSpecificParameters) { yaz_log(YLOG_WARN, "No task specific parameters"); } else if (rr->esr->taskSpecificParameters->which == Z_External_ESAdmin) { es_admin(rr, zh, rr->esr->taskSpecificParameters->u.adminService); } else if (rr->esr->taskSpecificParameters->which == Z_External_update) { Z_IUUpdate *up = rr->esr->taskSpecificParameters->u.update; yaz_log(YLOG_LOG, "Received DB Update"); if (up->which == Z_IUUpdate_esRequest) { Z_IUUpdateEsRequest *esRequest = up->u.esRequest; Z_IUOriginPartToKeep *toKeep = esRequest->toKeep; Z_IUSuppliedRecords *notToKeep = esRequest->notToKeep; yaz_log(YLOG_LOG, "action"); if (toKeep->action) { switch (*toKeep->action) { case Z_IUOriginPartToKeep_recordInsert: yaz_log(YLOG_LOG, "recordInsert"); break; case Z_IUOriginPartToKeep_recordReplace: yaz_log(YLOG_LOG, "recordUpdate"); break; case Z_IUOriginPartToKeep_recordDelete: yaz_log(YLOG_LOG, "recordDelete"); break; case Z_IUOriginPartToKeep_elementUpdate: yaz_log(YLOG_LOG, "elementUpdate"); break; case Z_IUOriginPartToKeep_specialUpdate: yaz_log(YLOG_LOG, "specialUpdate"); break; case Z_ESAdminOriginPartToKeep_shutdown: yaz_log(YLOG_LOG, "shutDown"); break; case Z_ESAdminOriginPartToKeep_start: yaz_log(YLOG_LOG, "start"); break; default: yaz_log(YLOG_LOG, " unknown (" ODR_INT_PRINTF ")", *toKeep->action); } } if (toKeep->databaseName) { yaz_log(YLOG_LOG, "database: %s", toKeep->databaseName); if (zebra_select_database(zh, toKeep->databaseName)) return 0; } else { yaz_log(YLOG_WARN, "no database supplied for ES Update"); rr->errcode = YAZ_BIB1_ES_MISSING_MANDATORY_PARAMETER_FOR_SPECIFIED_FUNCTION_; rr->errstring = "database"; return 0; } if (zebra_begin_trans(zh, 1) != ZEBRA_OK) { zebra_result(zh, &rr->errcode, &rr->errstring); } else { int i; for (i = 0; notToKeep && i < notToKeep->num; i++) { Z_External *rec = notToKeep->elements[i]->record; Odr_oct *opaque_recid = 0; zint *sysno = 0; zint sysno_tmp; if (notToKeep->elements[i]->u.opaque) { switch(notToKeep->elements[i]->which) { case Z_IUSuppliedRecords_elem_opaque: opaque_recid = notToKeep->elements[i]->u.opaque; break; /* OK, recid already set */ case Z_IUSuppliedRecords_elem_number: sysno_tmp = *notToKeep->elements[i]->u.number; sysno = &sysno_tmp; break; } } if (rec->direct_reference) { char oid_name_str[OID_STR_MAX]; const char *oid_name = yaz_oid_to_string_buf( rec->direct_reference, 0, oid_name_str); if (oid_name) yaz_log(YLOG_LOG, "record %d type %s", i, oid_name); } switch (rec->which) { case Z_External_sutrs: if (rec->u.octet_aligned->len > 170) yaz_log(YLOG_LOG, "%d bytes:\n%.168s ...", rec->u.sutrs->len, rec->u.sutrs->buf); else yaz_log(YLOG_LOG, "%d bytes:\n%s", rec->u.sutrs->len, rec->u.sutrs->buf); break; case Z_External_octet: if (rec->u.octet_aligned->len > 170) yaz_log(YLOG_LOG, "%d bytes:\n%.168s ...", rec->u.octet_aligned->len, rec->u.octet_aligned->buf); else yaz_log(YLOG_LOG, "%d bytes\n%s", rec->u.octet_aligned->len, rec->u.octet_aligned->buf); } if (rec->which == Z_External_octet) { enum zebra_recctrl_action_t action = action_update; char recid_str[256]; const char *match_criteria = 0; ZEBRA_RES res; if (*toKeep->action == Z_IUOriginPartToKeep_recordInsert) action = action_insert; else if (*toKeep->action == Z_IUOriginPartToKeep_recordReplace) action = action_replace; else if (*toKeep->action == Z_IUOriginPartToKeep_recordDelete) action = action_delete; else if (*toKeep->action == Z_IUOriginPartToKeep_specialUpdate) action = action_update; else { rr->errcode = YAZ_BIB1_ES_IMMEDIATE_EXECUTION_FAILED; rr->errstring = "unsupported ES Update action"; break; } if (opaque_recid) { size_t l = opaque_recid->len; if (l >= sizeof(recid_str)) { rr->errcode = YAZ_BIB1_ES_IMMEDIATE_EXECUTION_FAILED; rr->errstring = "opaque record ID too large"; break; } memcpy(recid_str, opaque_recid->buf, l); recid_str[l] = '\0'; match_criteria = recid_str; } res = zebra_update_record( zh, action, 0, /* recordType */ sysno, match_criteria, 0, /* fname */ (const char *) rec->u.octet_aligned->buf, rec->u.octet_aligned->len); if (res == ZEBRA_FAIL) { rr->errcode = YAZ_BIB1_ES_IMMEDIATE_EXECUTION_FAILED; rr->errstring = "update_record failed"; } } } if (zebra_end_trans(zh) != ZEBRA_OK) { yaz_log(YLOG_WARN, "zebra_end_trans failed for" " extended service operation"); } } } } else { yaz_log(YLOG_WARN, "Unknown Extended Service(%d)", rr->esr->taskSpecificParameters->which); rr->errcode = YAZ_BIB1_ES_EXTENDED_SERVICE_TYPE_UNSUPP; } return 0; } static void bend_start(struct statserv_options_block *sob) { Res default_res = res_open(0, 0); if (sob->handle) zebra_stop((ZebraService) sob->handle); res_set(default_res, "profilePath", DEFAULT_PROFILE_PATH); res_set(default_res, "modulePath", DEFAULT_MODULE_PATH); sob->handle = zebra_start_res(sob->configname, default_res, 0); res_close(default_res); if (!sob->handle) { yaz_log(YLOG_FATAL, "Failed to read config `%s'", sob->configname); exit(1); } #ifdef WIN32 #else if (!sob->inetd && !sob->background) { char pidfname[4096]; struct flock area; int fd; zebra_pidfname(sob->handle, pidfname); fd = open(pidfname, O_EXCL|O_WRONLY|O_CREAT, 0666); if (fd == -1) { if (errno != EEXIST) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "lock file %s", pidfname); exit(1); } fd = open(pidfname, O_RDWR, 0666); if (fd == -1) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "lock file %s", pidfname); exit(1); } } area.l_type = F_WRLCK; area.l_whence = SEEK_SET; area.l_len = area.l_start = 0L; if (fcntl(fd, F_SETLK, &area) == -1) { yaz_log(YLOG_ERRNO|YLOG_FATAL, "Zebra server already running"); exit(1); } else { char pidstr[30]; sprintf(pidstr, "%ld", (long) getpid()); if (write(fd, pidstr, strlen(pidstr)) != strlen(pidstr)) { yaz_log(YLOG_ERRNO|YLOG_FATAL, "write fail %s", pidfname); exit(1); } } } #endif } static void bend_stop(struct statserv_options_block *sob) { #ifdef WIN32 #else if (!sob->inetd && !sob->background && sob->handle) { char pidfname[4096]; zebra_pidfname(sob->handle, pidfname); unlink(pidfname); } #endif if (sob->handle) { ZebraService service = sob->handle; zebra_stop(service); } } int main(int argc, char **argv) { struct statserv_options_block *sob; sob = statserv_getcontrol(); strcpy(sob->configname, "zebra.cfg"); sob->bend_start = bend_start; sob->bend_stop = bend_stop; #ifdef WIN32 strcpy(sob->service_name, "zebrasrv"); strcpy(sob->service_display_name, "Zebra Server"); #endif statserv_setcontrol(sob); return statserv_main(argc, argv, bend_init, bend_close); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/rpnsearch.c0000644000175000017500000023572311412332551013413 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #ifdef WIN32 #include #endif #if HAVE_UNISTD_H #include #endif #include #include #include "index.h" #include #include #include #include static int log_level_set = 0; static int log_level_rpn = 0; #define TERMSET_DISABLE 1 static const char **rpn_char_map_handler(void *vp, const char **from, int len) { struct rpn_char_map_info *p = (struct rpn_char_map_info *) vp; const char **out = zebra_maps_input(p->zm, from, len, 0); #if 0 if (out && *out) { const char *outp = *out; yaz_log(YLOG_LOG, "---"); while (*outp) { yaz_log(YLOG_LOG, "%02X", *outp); outp++; } } #endif return out; } void rpn_char_map_prepare(struct zebra_register *reg, zebra_map_t zm, struct rpn_char_map_info *map_info) { map_info->zm = zm; if (zebra_maps_is_icu(zm)) dict_grep_cmap(reg->dict, 0, 0); else dict_grep_cmap(reg->dict, map_info, rpn_char_map_handler); } #define TERM_COUNT struct grep_info { #ifdef TERM_COUNT int *term_no; #endif ISAM_P *isam_p_buf; int isam_p_size; int isam_p_indx; int trunc_max; ZebraHandle zh; const char *index_type; ZebraSet termset; }; static int add_isam_p(const char *name, const char *info, struct grep_info *p) { if (!log_level_set) { log_level_rpn = yaz_log_module_level("rpn"); log_level_set = 1; } /* we may have to stop this madness.. NOTE: -1 so that if truncmax == trunxlimit we do *not* generate result sets */ if (p->isam_p_indx >= p->trunc_max - 1) return 1; if (p->isam_p_indx == p->isam_p_size) { ISAM_P *new_isam_p_buf; #ifdef TERM_COUNT int *new_term_no; #endif p->isam_p_size = 2*p->isam_p_size + 100; new_isam_p_buf = (ISAM_P *) xmalloc(sizeof(*new_isam_p_buf) * p->isam_p_size); if (p->isam_p_buf) { memcpy(new_isam_p_buf, p->isam_p_buf, p->isam_p_indx * sizeof(*p->isam_p_buf)); xfree(p->isam_p_buf); } p->isam_p_buf = new_isam_p_buf; #ifdef TERM_COUNT new_term_no = (int *) xmalloc(sizeof(*new_term_no) * p->isam_p_size); if (p->term_no) { memcpy(new_term_no, p->isam_p_buf, p->isam_p_indx * sizeof(*p->term_no)); xfree(p->term_no); } p->term_no = new_term_no; #endif } assert(*info == sizeof(*p->isam_p_buf)); memcpy(p->isam_p_buf + p->isam_p_indx, info+1, sizeof(*p->isam_p_buf)); if (p->termset) { const char *db; char term_tmp[IT_MAX_WORD]; int ord = 0; const char *index_name; int len = key_SU_decode(&ord, (const unsigned char *) name); zebra_term_untrans (p->zh, p->index_type, term_tmp, name+len); yaz_log(log_level_rpn, "grep: %d %c %s", ord, name[len], term_tmp); zebraExplain_lookup_ord(p->zh->reg->zei, ord, 0 /* index_type */, &db, &index_name); yaz_log(log_level_rpn, "grep: db=%s index=%s", db, index_name); resultSetAddTerm(p->zh, p->termset, name[len], db, index_name, term_tmp); } (p->isam_p_indx)++; return 0; } static int grep_handle(char *name, const char *info, void *p) { return add_isam_p(name, info, (struct grep_info *) p); } static int term_pre(zebra_map_t zm, const char **src, const char *ct1, const char *ct2, int first) { const char *s1, *s0 = *src; const char **map; /* skip white space */ while (*s0) { if (ct1 && strchr(ct1, *s0)) break; if (ct2 && strchr(ct2, *s0)) break; s1 = s0; map = zebra_maps_input(zm, &s1, strlen(s1), first); if (**map != *CHR_SPACE) break; s0 = s1; } *src = s0; return *s0; } static void esc_str(char *out_buf, size_t out_size, const char *in_buf, int in_size) { int k; assert(out_buf); assert(in_buf); assert(out_size > 20); *out_buf = '\0'; for (k = 0; k 126) pc = '?'; else pc = c; sprintf(out_buf +strlen(out_buf), "%02X:%c ", c, pc); if (strlen(out_buf) > out_size-20) { strcat(out_buf, ".."); break; } } } #define REGEX_CHARS " ^[]()|.*+?!\"$" static void add_non_space(const char *start, const char *end, WRBUF term_dict, WRBUF display_term, const char **map, int q_map_match) { size_t sz = end - start; wrbuf_write(display_term, start, sz); if (!q_map_match) { while (start < end) { if (strchr(REGEX_CHARS, *start)) wrbuf_putc(term_dict, '\\'); wrbuf_putc(term_dict, *start); start++; } } else { char tmpbuf[80]; esc_str(tmpbuf, sizeof(tmpbuf), map[0], strlen(map[0])); wrbuf_puts(term_dict, map[0]); } } static int term_100_icu(zebra_map_t zm, const char **src, WRBUF term_dict, int space_split, WRBUF display_term, int right_trunc) { int i; const char *res_buf = 0; size_t res_len = 0; const char *display_buf; size_t display_len; if (!zebra_map_tokenize_next(zm, &res_buf, &res_len, &display_buf, &display_len)) { *src += strlen(*src); return 0; } wrbuf_write(display_term, display_buf, display_len); if (right_trunc) { /* ICU sort keys seem to be of the form basechars \x01 accents \x01 length For now we'll just right truncate from basechars . This may give false hits due to accents not being used. */ i = res_len; while (--i >= 0 && res_buf[i] != '\x01') ; if (i > 0) { while (--i >= 0 && res_buf[i] != '\x01') ; } if (i == 0) { /* did not find base chars at all. Throw error */ return -1; } res_len = i; /* reduce res_len */ } for (i = 0; i < res_len; i++) { if (strchr(REGEX_CHARS "\\", res_buf[i])) wrbuf_putc(term_dict, '\\'); if (res_buf[i] < 32) wrbuf_putc(term_dict, 1); wrbuf_putc(term_dict, res_buf[i]); } if (right_trunc) wrbuf_puts(term_dict, ".*"); return 1; } /* term_100: handle term, where trunc = none(no operators at all) */ static int term_100(zebra_map_t zm, const char **src, WRBUF term_dict, int space_split, WRBUF display_term) { const char *s0; const char **map; int i = 0; const char *space_start = 0; const char *space_end = 0; if (!term_pre(zm, src, NULL, NULL, !space_split)) return 0; s0 = *src; while (*s0) { const char *s1 = s0; int q_map_match = 0; map = zebra_maps_search(zm, &s0, strlen(s0), &q_map_match); if (space_split) { if (**map == *CHR_SPACE) break; } else /* complete subfield only. */ { if (**map == *CHR_SPACE) { /* save space mapping for later .. */ space_start = s1; space_end = s0; continue; } else if (space_start) { /* reload last space */ while (space_start < space_end) { if (strchr(REGEX_CHARS, *space_start)) wrbuf_putc(term_dict, '\\'); wrbuf_putc(display_term, *space_start); wrbuf_putc(term_dict, *space_start); space_start++; } /* and reset */ space_start = space_end = 0; } } i++; add_non_space(s1, s0, term_dict, display_term, map, q_map_match); } *src = s0; return i; } /* term_101: handle term, where trunc = Process # */ static int term_101(zebra_map_t zm, const char **src, WRBUF term_dict, int space_split, WRBUF display_term) { const char *s0; const char **map; int i = 0; if (!term_pre(zm, src, "#", "#", !space_split)) return 0; s0 = *src; while (*s0) { if (*s0 == '#') { i++; wrbuf_puts(term_dict, ".*"); wrbuf_putc(display_term, *s0); s0++; } else { const char *s1 = s0; int q_map_match = 0; map = zebra_maps_search(zm, &s0, strlen(s0), &q_map_match); if (space_split && **map == *CHR_SPACE) break; i++; add_non_space(s1, s0, term_dict, display_term, map, q_map_match); } } *src = s0; return i; } /* term_103: handle term, where trunc = re-2 (regular expressions) */ static int term_103(zebra_map_t zm, const char **src, WRBUF term_dict, int *errors, int space_split, WRBUF display_term) { int i = 0; const char *s0; const char **map; if (!term_pre(zm, src, "^\\()[].*+?|", "(", !space_split)) return 0; s0 = *src; if (errors && *s0 == '+' && s0[1] && s0[2] == '+' && s0[3] && isdigit(((const unsigned char *)s0)[1])) { *errors = s0[1] - '0'; s0 += 3; if (*errors > 3) *errors = 3; } while (*s0) { if (strchr("^\\()[].*+?|-", *s0)) { wrbuf_putc(display_term, *s0); wrbuf_putc(term_dict, *s0); s0++; i++; } else { const char *s1 = s0; int q_map_match = 0; map = zebra_maps_search(zm, &s0, strlen(s0), &q_map_match); if (space_split && **map == *CHR_SPACE) break; i++; add_non_space(s1, s0, term_dict, display_term, map, q_map_match); } } *src = s0; return i; } /* term_103: handle term, where trunc = re-1 (regular expressions) */ static int term_102(zebra_map_t zm, const char **src, WRBUF term_dict, int space_split, WRBUF display_term) { return term_103(zm, src, term_dict, NULL, space_split, display_term); } /* term_104: handle term, process # and ! */ static int term_104(zebra_map_t zm, const char **src, WRBUF term_dict, int space_split, WRBUF display_term) { const char *s0; const char **map; int i = 0; if (!term_pre(zm, src, "?*#", "?*#", !space_split)) return 0; s0 = *src; while (*s0) { if (*s0 == '?') { i++; wrbuf_putc(display_term, *s0); s0++; if (*s0 >= '0' && *s0 <= '9') { int limit = 0; while (*s0 >= '0' && *s0 <= '9') { limit = limit * 10 + (*s0 - '0'); wrbuf_putc(display_term, *s0); s0++; } if (limit > 20) limit = 20; while (--limit >= 0) { wrbuf_puts(term_dict, ".?"); } } else { wrbuf_puts(term_dict, ".*"); } } else if (*s0 == '*') { i++; wrbuf_puts(term_dict, ".*"); wrbuf_putc(display_term, *s0); s0++; } else if (*s0 == '#') { i++; wrbuf_puts(term_dict, "."); wrbuf_putc(display_term, *s0); s0++; } else { const char *s1 = s0; int q_map_match = 0; map = zebra_maps_search(zm, &s0, strlen(s0), &q_map_match); if (space_split && **map == *CHR_SPACE) break; i++; add_non_space(s1, s0, term_dict, display_term, map, q_map_match); } } *src = s0; return i; } /* term_105/106: handle term, where trunc = Process * and ! and right trunc */ static int term_105(zebra_map_t zm, const char **src, WRBUF term_dict, int space_split, WRBUF display_term, int right_truncate) { const char *s0; const char **map; int i = 0; if (!term_pre(zm, src, "*!", "*!", !space_split)) return 0; s0 = *src; while (*s0) { if (*s0 == '*') { i++; wrbuf_puts(term_dict, ".*"); wrbuf_putc(display_term, *s0); s0++; } else if (*s0 == '!') { i++; wrbuf_putc(term_dict, '.'); wrbuf_putc(display_term, *s0); s0++; } else { const char *s1 = s0; int q_map_match = 0; map = zebra_maps_search(zm, &s0, strlen(s0), &q_map_match); if (space_split && **map == *CHR_SPACE) break; i++; add_non_space(s1, s0, term_dict, display_term, map, q_map_match); } } if (right_truncate) wrbuf_puts(term_dict, ".*"); *src = s0; return i; } /* gen_regular_rel - generate regular expression from relation * val: border value (inclusive) * islt: 1 if <=; 0 if >=. */ static void gen_regular_rel(WRBUF term_dict, int val, int islt) { char dst_buf[20*5*20]; /* assuming enough for expansion */ char *dst = dst_buf; int dst_p; int w, d, i; int pos = 0; char numstr[20]; yaz_log(YLOG_DEBUG, "gen_regular_rel. val=%d, islt=%d", val, islt); if (val >= 0) { if (islt) strcpy(dst, "(-[0-9]+|("); else strcpy(dst, "(("); } else { if (!islt) { strcpy(dst, "([0-9]+|-("); islt = 1; } else { strcpy(dst, "(-("); islt = 0; } val = -val; } dst_p = strlen(dst); sprintf(numstr, "%d", val); for (w = strlen(numstr); --w >= 0; pos++) { d = numstr[w]; if (pos > 0) { if (islt) { if (d == '0') continue; d--; } else { if (d == '9') continue; d++; } } strcpy(dst + dst_p, numstr); dst_p = strlen(dst) - pos - 1; if (islt) { if (d != '0') { dst[dst_p++] = '['; dst[dst_p++] = '0'; dst[dst_p++] = '-'; dst[dst_p++] = d; dst[dst_p++] = ']'; } else dst[dst_p++] = d; } else { if (d != '9') { dst[dst_p++] = '['; dst[dst_p++] = d; dst[dst_p++] = '-'; dst[dst_p++] = '9'; dst[dst_p++] = ']'; } else dst[dst_p++] = d; } for (i = 0; i abc ([b-].*|a[c-].*|ab[d-].*|abc.+) * ([^-a].*|a[^-b].*ab[^-c].*|abc.+) * >= abc ([b-].*|a[c-].*|ab[c-].*) * ([^-a].*|a[^-b].*|ab[c-].*) * < abc ([-0].*|a[-a].*|ab[-b].*) * ([^a-].*|a[^b-].*|ab[^c-].*) * <= abc ([-0].*|a[-a].*|ab[-b].*|abc) * ([^a-].*|a[^b-].*|ab[^c-].*|abc) */ static int string_relation(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char **term_sub, WRBUF term_dict, const Odr_oid *attributeSet, zebra_map_t zm, int space_split, WRBUF display_term, int *error_code) { AttrType relation; int relation_value; int i; WRBUF term_component = wrbuf_alloc(); attr_init_APT(&relation, zapt, 2); relation_value = attr_find(&relation, NULL); *error_code = 0; yaz_log(YLOG_DEBUG, "string relation value=%d", relation_value); switch (relation_value) { case 1: if (!term_100(zm, term_sub, term_component, space_split, display_term)) { wrbuf_destroy(term_component); return 0; } yaz_log(log_level_rpn, "Relation <"); wrbuf_putc(term_dict, '('); for (i = 0; i < wrbuf_len(term_component); ) { int j = 0; if (i) wrbuf_putc(term_dict, '|'); while (j < i) string_rel_add_char(term_dict, term_component, &j); wrbuf_putc(term_dict, '['); wrbuf_putc(term_dict, '^'); wrbuf_putc(term_dict, 1); wrbuf_putc(term_dict, FIRST_IN_FIELD_CHAR); string_rel_add_char(term_dict, term_component, &i); wrbuf_putc(term_dict, '-'); wrbuf_putc(term_dict, ']'); wrbuf_putc(term_dict, '.'); wrbuf_putc(term_dict, '*'); } wrbuf_putc(term_dict, ')'); break; case 2: if (!term_100(zm, term_sub, term_component, space_split, display_term)) { wrbuf_destroy(term_component); return 0; } yaz_log(log_level_rpn, "Relation <="); wrbuf_putc(term_dict, '('); for (i = 0; i < wrbuf_len(term_component); ) { int j = 0; while (j < i) string_rel_add_char(term_dict, term_component, &j); wrbuf_putc(term_dict, '['); wrbuf_putc(term_dict, '^'); wrbuf_putc(term_dict, 1); wrbuf_putc(term_dict, FIRST_IN_FIELD_CHAR); string_rel_add_char(term_dict, term_component, &i); wrbuf_putc(term_dict, '-'); wrbuf_putc(term_dict, ']'); wrbuf_putc(term_dict, '.'); wrbuf_putc(term_dict, '*'); wrbuf_putc(term_dict, '|'); } for (i = 0; i < wrbuf_len(term_component); ) string_rel_add_char(term_dict, term_component, &i); wrbuf_putc(term_dict, ')'); break; case 5: if (!term_100(zm, term_sub, term_component, space_split, display_term)) { wrbuf_destroy(term_component); return 0; } yaz_log(log_level_rpn, "Relation >"); wrbuf_putc(term_dict, '('); for (i = 0; i < wrbuf_len(term_component); ) { int j = 0; while (j < i) string_rel_add_char(term_dict, term_component, &j); wrbuf_putc(term_dict, '['); wrbuf_putc(term_dict, '^'); wrbuf_putc(term_dict, '-'); string_rel_add_char(term_dict, term_component, &i); wrbuf_putc(term_dict, ']'); wrbuf_putc(term_dict, '.'); wrbuf_putc(term_dict, '*'); wrbuf_putc(term_dict, '|'); } for (i = 0; i < wrbuf_len(term_component); ) string_rel_add_char(term_dict, term_component, &i); wrbuf_putc(term_dict, '.'); wrbuf_putc(term_dict, '+'); wrbuf_putc(term_dict, ')'); break; case 4: if (!term_100(zm, term_sub, term_component, space_split, display_term)) { wrbuf_destroy(term_component); return 0; } yaz_log(log_level_rpn, "Relation >="); wrbuf_putc(term_dict, '('); for (i = 0; i < wrbuf_len(term_component); ) { int j = 0; if (i) wrbuf_putc(term_dict, '|'); while (j < i) string_rel_add_char(term_dict, term_component, &j); wrbuf_putc(term_dict, '['); if (i < wrbuf_len(term_component)-1) { wrbuf_putc(term_dict, '^'); wrbuf_putc(term_dict, '-'); string_rel_add_char(term_dict, term_component, &i); } else { string_rel_add_char(term_dict, term_component, &i); wrbuf_putc(term_dict, '-'); } wrbuf_putc(term_dict, ']'); wrbuf_putc(term_dict, '.'); wrbuf_putc(term_dict, '*'); } wrbuf_putc(term_dict, ')'); break; case 3: case 102: case -1: if (!**term_sub) return 1; yaz_log(log_level_rpn, "Relation ="); if (!term_100(zm, term_sub, term_component, space_split, display_term)) { wrbuf_destroy(term_component); return 0; } wrbuf_puts(term_dict, "("); wrbuf_puts(term_dict, wrbuf_cstr(term_component)); wrbuf_puts(term_dict, ")"); break; case 103: yaz_log(log_level_rpn, "Relation always matches"); /* skip to end of term (we don't care what it is) */ while (**term_sub != '\0') (*term_sub)++; break; default: *error_code = YAZ_BIB1_UNSUPP_RELATION_ATTRIBUTE; wrbuf_destroy(term_component); return 0; } wrbuf_destroy(term_component); return 1; } static ZEBRA_RES string_term(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char **term_sub, WRBUF term_dict, const Odr_oid *attributeSet, NMEM stream, struct grep_info *grep_info, const char *index_type, int complete_flag, WRBUF display_term, const char *xpath_use, struct ord_list **ol, zebra_map_t zm); ZEBRA_RES zebra_term_limits_APT(ZebraHandle zh, Z_AttributesPlusTerm *zapt, zint *hits_limit_value, const char **term_ref_id_str, NMEM nmem) { AttrType term_ref_id_attr; AttrType hits_limit_attr; int term_ref_id_int; zint hits_limit_from_attr; attr_init_APT(&hits_limit_attr, zapt, 11); hits_limit_from_attr = attr_find(&hits_limit_attr, NULL); attr_init_APT(&term_ref_id_attr, zapt, 10); term_ref_id_int = attr_find_ex(&term_ref_id_attr, NULL, term_ref_id_str); if (term_ref_id_int >= 0) { char *res = nmem_malloc(nmem, 20); sprintf(res, "%d", term_ref_id_int); *term_ref_id_str = res; } if (hits_limit_from_attr != -1) *hits_limit_value = hits_limit_from_attr; yaz_log(YLOG_DEBUG, "term_limits_APT ref_id=%s limit=" ZINT_FORMAT, *term_ref_id_str ? *term_ref_id_str : "none", *hits_limit_value); return ZEBRA_OK; } /** \brief search for term (which may be truncated) */ static ZEBRA_RES search_term(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char **term_sub, const Odr_oid *attributeSet, zint hits_limit, NMEM stream, struct grep_info *grep_info, const char *index_type, int complete_flag, const char *rank_type, const char *xpath_use, NMEM rset_nmem, RSET *rset, struct rset_key_control *kc, zebra_map_t zm) { ZEBRA_RES res; struct ord_list *ol; zint hits_limit_value = hits_limit; const char *term_ref_id_str = 0; WRBUF term_dict = wrbuf_alloc(); WRBUF display_term = wrbuf_alloc(); *rset = 0; zebra_term_limits_APT(zh, zapt, &hits_limit_value, &term_ref_id_str, stream); grep_info->isam_p_indx = 0; res = string_term(zh, zapt, term_sub, term_dict, attributeSet, stream, grep_info, index_type, complete_flag, display_term, xpath_use, &ol, zm); wrbuf_destroy(term_dict); if (res == ZEBRA_OK && *term_sub) { yaz_log(log_level_rpn, "term: %s", wrbuf_cstr(display_term)); *rset = rset_trunc(zh, grep_info->isam_p_buf, grep_info->isam_p_indx, wrbuf_buf(display_term), wrbuf_len(display_term), rank_type, 1 /* preserve pos */, zapt->term->which, rset_nmem, kc, kc->scope, ol, index_type, hits_limit_value, term_ref_id_str); if (!*rset) res = ZEBRA_FAIL; } wrbuf_destroy(display_term); return res; } static ZEBRA_RES string_term(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char **term_sub, WRBUF term_dict, const Odr_oid *attributeSet, NMEM stream, struct grep_info *grep_info, const char *index_type, int complete_flag, WRBUF display_term, const char *xpath_use, struct ord_list **ol, zebra_map_t zm) { int r; AttrType truncation; int truncation_value; const char *termp; struct rpn_char_map_info rcmi; int space_split = complete_flag ? 0 : 1; int ord = -1; int regex_range = 0; int max_pos, prefix_len = 0; int relation_error; char ord_buf[32]; int ord_len, i; *ol = ord_list_create(stream); rpn_char_map_prepare(zh->reg, zm, &rcmi); attr_init_APT(&truncation, zapt, 5); truncation_value = attr_find(&truncation, NULL); yaz_log(log_level_rpn, "truncation value %d", truncation_value); termp = *term_sub; /* start of term for each database */ if (zebra_apt_get_ord(zh, zapt, index_type, xpath_use, attributeSet, &ord) != ZEBRA_OK) { *term_sub = 0; return ZEBRA_FAIL; } wrbuf_rewind(term_dict); /* new dictionary regexp term */ *ol = ord_list_append(stream, *ol, ord); ord_len = key_SU_encode(ord, ord_buf); wrbuf_putc(term_dict, '('); for (i = 0; ireg->dict, wrbuf_cstr(term_dict), regex_range, grep_info, &max_pos, ord_len /* number of "exact" chars */, grep_handle); if (r == 1) zebra_set_partial_result(zh); else if (r) yaz_log(YLOG_WARN, "dict_lookup_grep fail %d", r); *term_sub = termp; yaz_log(YLOG_DEBUG, "%d positions", grep_info->isam_p_indx); return ZEBRA_OK; } static void grep_info_delete(struct grep_info *grep_info) { #ifdef TERM_COUNT xfree(grep_info->term_no); #endif xfree(grep_info->isam_p_buf); } static ZEBRA_RES grep_info_prepare(ZebraHandle zh, Z_AttributesPlusTerm *zapt, struct grep_info *grep_info, const char *index_type) { #ifdef TERM_COUNT grep_info->term_no = 0; #endif grep_info->trunc_max = atoi(res_get_def(zh->res, "truncmax", "10000")); grep_info->isam_p_size = 0; grep_info->isam_p_buf = NULL; grep_info->zh = zh; grep_info->index_type = index_type; grep_info->termset = 0; if (zapt) { AttrType truncmax; int truncmax_value; attr_init_APT(&truncmax, zapt, 13); truncmax_value = attr_find(&truncmax, NULL); if (truncmax_value != -1) grep_info->trunc_max = truncmax_value; } if (zapt) { AttrType termset; int termset_value_numeric; const char *termset_value_string; attr_init_APT(&termset, zapt, 8); termset_value_numeric = attr_find_ex(&termset, NULL, &termset_value_string); if (termset_value_numeric != -1) { #if TERMSET_DISABLE zebra_setError(zh, YAZ_BIB1_UNSUPP_SEARCH, "termset"); return ZEBRA_FAIL; #else char resname[32]; const char *termset_name = 0; if (termset_value_numeric != -2) { sprintf(resname, "%d", termset_value_numeric); termset_name = resname; } else termset_name = termset_value_string; yaz_log(log_level_rpn, "creating termset set %s", termset_name); grep_info->termset = resultSetAdd(zh, termset_name, 1); if (!grep_info->termset) { zebra_setError(zh, YAZ_BIB1_ILLEGAL_RESULT_SET_NAME, termset_name); return ZEBRA_FAIL; } #endif } } return ZEBRA_OK; } static ZEBRA_RES search_terms_chrmap(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char *termz, const Odr_oid *attributeSet, zint hits_limit, NMEM stream, const char *index_type, int complete_flag, const char *rank_type, const char *xpath_use, NMEM rset_nmem, RSET **result_sets, int *num_result_sets, struct rset_key_control *kc, zebra_map_t zm) { struct grep_info grep_info; const char *termp = termz; int alloc_sets = 0; *num_result_sets = 0; if (grep_info_prepare(zh, zapt, &grep_info, index_type) == ZEBRA_FAIL) return ZEBRA_FAIL; while (1) { ZEBRA_RES res; if (alloc_sets == *num_result_sets) { int add = 10; RSET *rnew = (RSET *) nmem_malloc(stream, (alloc_sets+add) * sizeof(*rnew)); if (alloc_sets) memcpy(rnew, *result_sets, alloc_sets * sizeof(*rnew)); alloc_sets = alloc_sets + add; *result_sets = rnew; } res = search_term(zh, zapt, &termp, attributeSet, hits_limit, stream, &grep_info, index_type, complete_flag, rank_type, xpath_use, rset_nmem, &(*result_sets)[*num_result_sets], kc, zm); if (res != ZEBRA_OK) { int i; for (i = 0; i < *num_result_sets; i++) rset_delete((*result_sets)[i]); grep_info_delete(&grep_info); return res; } if ((*result_sets)[*num_result_sets] == 0) break; (*num_result_sets)++; if (!*termp) break; } grep_info_delete(&grep_info); return ZEBRA_OK; } /** \brief Create result set(s) for list of terms \param zh Zebra Handle \param zapt Attributes Plust Term (RPN leaf) \param termz term as used in query but converted to UTF-8 \param attributeSet default attribute set \param stream memory for result \param index_type register type ("w", "p",..) \param complete_flag whether it's phrases or not \param rank_type term flags for ranking \param xpath_use use attribute for X-Path (-1 for no X-path) \param rset_nmem memory for result sets \param result_sets output result set for each term in list (output) \param num_result_sets number of output result sets \param kc rset key control to be used for created result sets */ static ZEBRA_RES search_terms_list(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char *termz, const Odr_oid *attributeSet, zint hits_limit, NMEM stream, const char *index_type, int complete_flag, const char *rank_type, const char *xpath_use, NMEM rset_nmem, RSET **result_sets, int *num_result_sets, struct rset_key_control *kc) { zebra_map_t zm = zebra_map_get_or_add(zh->reg->zebra_maps, index_type); if (zebra_maps_is_icu(zm)) zebra_map_tokenize_start(zm, termz, strlen(termz)); return search_terms_chrmap(zh, zapt, termz, attributeSet, hits_limit, stream, index_type, complete_flag, rank_type, xpath_use, rset_nmem, result_sets, num_result_sets, kc, zm); } /** \brief limit a search by position - returns result set */ static ZEBRA_RES search_position(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const Odr_oid *attributeSet, const char *index_type, NMEM rset_nmem, RSET *rset, struct rset_key_control *kc) { int position_value; AttrType position; int ord = -1; char ord_buf[32]; char term_dict[100]; int ord_len; char *val; ISAM_P isam_p; zebra_map_t zm = zebra_map_get_or_add(zh->reg->zebra_maps, index_type); attr_init_APT(&position, zapt, 3); position_value = attr_find(&position, NULL); switch(position_value) { case 3: case -1: return ZEBRA_OK; case 1: case 2: break; default: zebra_setError_zint(zh, YAZ_BIB1_UNSUPP_POSITION_ATTRIBUTE, position_value); return ZEBRA_FAIL; } if (!zebra_maps_is_first_in_field(zm)) { zebra_setError_zint(zh, YAZ_BIB1_UNSUPP_POSITION_ATTRIBUTE, position_value); return ZEBRA_FAIL; } if (zebra_apt_get_ord(zh, zapt, index_type, 0, attributeSet, &ord) != ZEBRA_OK) { return ZEBRA_FAIL; } ord_len = key_SU_encode(ord, ord_buf); memcpy(term_dict, ord_buf, ord_len); strcpy(term_dict+ord_len, FIRST_IN_FIELD_STR); val = dict_lookup(zh->reg->dict, term_dict); if (val) { assert(*val == sizeof(ISAM_P)); memcpy(&isam_p, val+1, sizeof(isam_p)); *rset = zebra_create_rset_isam(zh, rset_nmem, kc, kc->scope, isam_p, 0); } return ZEBRA_OK; } /** \brief returns result set for phrase search */ static ZEBRA_RES rpn_search_APT_phrase(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char *termz_org, const Odr_oid *attributeSet, zint hits_limit, NMEM stream, const char *index_type, int complete_flag, const char *rank_type, const char *xpath_use, NMEM rset_nmem, RSET *rset, struct rset_key_control *kc) { RSET *result_sets = 0; int num_result_sets = 0; ZEBRA_RES res = search_terms_list(zh, zapt, termz_org, attributeSet, hits_limit, stream, index_type, complete_flag, rank_type, xpath_use, rset_nmem, &result_sets, &num_result_sets, kc); if (res != ZEBRA_OK) return res; if (num_result_sets > 0) { RSET first_set = 0; res = search_position(zh, zapt, attributeSet, index_type, rset_nmem, &first_set, kc); if (res != ZEBRA_OK) { int i; for (i = 0; iscope, num_result_sets, result_sets, 1 /* ordered */, 0 /* exclusion */, 3 /* relation */, 1 /* distance */); if (!*rset) return ZEBRA_FAIL; return ZEBRA_OK; } /** \brief returns result set for or-list search */ static ZEBRA_RES rpn_search_APT_or_list(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char *termz_org, const Odr_oid *attributeSet, zint hits_limit, NMEM stream, const char *index_type, int complete_flag, const char *rank_type, const char *xpath_use, NMEM rset_nmem, RSET *rset, struct rset_key_control *kc) { RSET *result_sets = 0; int num_result_sets = 0; int i; ZEBRA_RES res = search_terms_list(zh, zapt, termz_org, attributeSet, hits_limit, stream, index_type, complete_flag, rank_type, xpath_use, rset_nmem, &result_sets, &num_result_sets, kc); if (res != ZEBRA_OK) return res; for (i = 0; iscope, 2, tmp_set, 1 /* ordered */, 0 /* exclusion */, 3 /* relation */, 1 /* distance */); } } if (num_result_sets == 0) *rset = rset_create_null(rset_nmem, kc, 0); else if (num_result_sets == 1) *rset = result_sets[0]; else *rset = rset_create_or(rset_nmem, kc, kc->scope, 0 /* termid */, num_result_sets, result_sets); if (!*rset) return ZEBRA_FAIL; return ZEBRA_OK; } /** \brief returns result set for and-list search */ static ZEBRA_RES rpn_search_APT_and_list(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char *termz_org, const Odr_oid *attributeSet, zint hits_limit, NMEM stream, const char *index_type, int complete_flag, const char *rank_type, const char *xpath_use, NMEM rset_nmem, RSET *rset, struct rset_key_control *kc) { RSET *result_sets = 0; int num_result_sets = 0; int i; ZEBRA_RES res = search_terms_list(zh, zapt, termz_org, attributeSet, hits_limit, stream, index_type, complete_flag, rank_type, xpath_use, rset_nmem, &result_sets, &num_result_sets, kc); if (res != ZEBRA_OK) return res; for (i = 0; iscope, 2, tmp_set, 1 /* ordered */, 0 /* exclusion */, 3 /* relation */, 1 /* distance */); } } if (num_result_sets == 0) *rset = rset_create_null(rset_nmem, kc, 0); else if (num_result_sets == 1) *rset = result_sets[0]; else *rset = rset_create_and(rset_nmem, kc, kc->scope, num_result_sets, result_sets); if (!*rset) return ZEBRA_FAIL; return ZEBRA_OK; } static int numeric_relation(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char **term_sub, WRBUF term_dict, const Odr_oid *attributeSet, struct grep_info *grep_info, int *max_pos, zebra_map_t zm, WRBUF display_term, int *error_code) { AttrType relation; int relation_value; int term_value; int r; WRBUF term_num = wrbuf_alloc(); *error_code = 0; attr_init_APT(&relation, zapt, 2); relation_value = attr_find(&relation, NULL); yaz_log(log_level_rpn, "numeric relation value=%d", relation_value); switch (relation_value) { case 1: yaz_log(log_level_rpn, "Relation <"); if (!term_100(zm, term_sub, term_num, 1, display_term)) { wrbuf_destroy(term_num); return 0; } term_value = atoi(wrbuf_cstr(term_num)); gen_regular_rel(term_dict, term_value-1, 1); break; case 2: yaz_log(log_level_rpn, "Relation <="); if (!term_100(zm, term_sub, term_num, 1, display_term)) { wrbuf_destroy(term_num); return 0; } term_value = atoi(wrbuf_cstr(term_num)); gen_regular_rel(term_dict, term_value, 1); break; case 4: yaz_log(log_level_rpn, "Relation >="); if (!term_100(zm, term_sub, term_num, 1, display_term)) { wrbuf_destroy(term_num); return 0; } term_value = atoi(wrbuf_cstr(term_num)); gen_regular_rel(term_dict, term_value, 0); break; case 5: yaz_log(log_level_rpn, "Relation >"); if (!term_100(zm, term_sub, term_num, 1, display_term)) { wrbuf_destroy(term_num); return 0; } term_value = atoi(wrbuf_cstr(term_num)); gen_regular_rel(term_dict, term_value+1, 0); break; case -1: case 3: yaz_log(log_level_rpn, "Relation ="); if (!term_100(zm, term_sub, term_num, 1, display_term)) { wrbuf_destroy(term_num); return 0; } term_value = atoi(wrbuf_cstr(term_num)); wrbuf_printf(term_dict, "(0*%d)", term_value); break; case 103: /* term_tmp untouched.. */ while (**term_sub != '\0') (*term_sub)++; break; default: *error_code = YAZ_BIB1_UNSUPP_RELATION_ATTRIBUTE; wrbuf_destroy(term_num); return 0; } r = dict_lookup_grep(zh->reg->dict, wrbuf_cstr(term_dict), 0, grep_info, max_pos, 0, grep_handle); if (r == 1) zebra_set_partial_result(zh); else if (r) yaz_log(YLOG_WARN, "dict_lookup_grep fail, rel = gt: %d", r); yaz_log(log_level_rpn, "%d positions", grep_info->isam_p_indx); wrbuf_destroy(term_num); return 1; } static ZEBRA_RES numeric_term(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char **term_sub, WRBUF term_dict, const Odr_oid *attributeSet, NMEM stream, struct grep_info *grep_info, const char *index_type, int complete_flag, WRBUF display_term, const char *xpath_use, struct ord_list **ol) { const char *termp; struct rpn_char_map_info rcmi; int max_pos; int relation_error = 0; int ord, ord_len, i; char ord_buf[32]; zebra_map_t zm = zebra_map_get_or_add(zh->reg->zebra_maps, index_type); *ol = ord_list_create(stream); rpn_char_map_prepare(zh->reg, zm, &rcmi); termp = *term_sub; if (zebra_apt_get_ord(zh, zapt, index_type, xpath_use, attributeSet, &ord) != ZEBRA_OK) { return ZEBRA_FAIL; } wrbuf_rewind(term_dict); *ol = ord_list_append(stream, *ol, ord); ord_len = key_SU_encode(ord, ord_buf); wrbuf_putc(term_dict, '('); for (i = 0; i < ord_len; i++) { wrbuf_putc(term_dict, 1); wrbuf_putc(term_dict, ord_buf[i]); } wrbuf_putc(term_dict, ')'); if (!numeric_relation(zh, zapt, &termp, term_dict, attributeSet, grep_info, &max_pos, zm, display_term, &relation_error)) { if (relation_error) { zebra_setError(zh, relation_error, 0); return ZEBRA_FAIL; } *term_sub = 0; return ZEBRA_OK; } *term_sub = termp; yaz_log(YLOG_DEBUG, "%d positions", grep_info->isam_p_indx); return ZEBRA_OK; } static ZEBRA_RES rpn_search_APT_numeric(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char *termz, const Odr_oid *attributeSet, NMEM stream, const char *index_type, int complete_flag, const char *rank_type, const char *xpath_use, NMEM rset_nmem, RSET *rset, struct rset_key_control *kc) { const char *termp = termz; RSET *result_sets = 0; int num_result_sets = 0; ZEBRA_RES res; struct grep_info grep_info; int alloc_sets = 0; zint hits_limit_value; const char *term_ref_id_str = 0; zebra_term_limits_APT(zh, zapt, &hits_limit_value, &term_ref_id_str, stream); yaz_log(log_level_rpn, "APT_numeric t='%s'", termz); if (grep_info_prepare(zh, zapt, &grep_info, index_type) == ZEBRA_FAIL) return ZEBRA_FAIL; while (1) { struct ord_list *ol; WRBUF term_dict = wrbuf_alloc(); WRBUF display_term = wrbuf_alloc(); if (alloc_sets == num_result_sets) { int add = 10; RSET *rnew = (RSET *) nmem_malloc(stream, (alloc_sets+add) * sizeof(*rnew)); if (alloc_sets) memcpy(rnew, result_sets, alloc_sets * sizeof(*rnew)); alloc_sets = alloc_sets + add; result_sets = rnew; } yaz_log(YLOG_DEBUG, "APT_numeric termp=%s", termp); grep_info.isam_p_indx = 0; res = numeric_term(zh, zapt, &termp, term_dict, attributeSet, stream, &grep_info, index_type, complete_flag, display_term, xpath_use, &ol); wrbuf_destroy(term_dict); if (res == ZEBRA_FAIL || termp == 0) { wrbuf_destroy(display_term); break; } yaz_log(YLOG_DEBUG, "term: %s", wrbuf_cstr(display_term)); result_sets[num_result_sets] = rset_trunc(zh, grep_info.isam_p_buf, grep_info.isam_p_indx, wrbuf_buf(display_term), wrbuf_len(display_term), rank_type, 0 /* preserve position */, zapt->term->which, rset_nmem, kc, kc->scope, ol, index_type, hits_limit_value, term_ref_id_str); wrbuf_destroy(display_term); if (!result_sets[num_result_sets]) break; num_result_sets++; if (!*termp) break; } grep_info_delete(&grep_info); if (res != ZEBRA_OK) return res; if (num_result_sets == 0) *rset = rset_create_null(rset_nmem, kc, 0); else if (num_result_sets == 1) *rset = result_sets[0]; else *rset = rset_create_and(rset_nmem, kc, kc->scope, num_result_sets, result_sets); if (!*rset) return ZEBRA_FAIL; return ZEBRA_OK; } static ZEBRA_RES rpn_search_APT_local(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char *termz, const Odr_oid *attributeSet, NMEM stream, const char *rank_type, NMEM rset_nmem, RSET *rset, struct rset_key_control *kc) { Record rec; zint sysno = atozint(termz); if (sysno <= 0) sysno = 0; rec = rec_get(zh->reg->records, sysno); if (!rec) sysno = 0; rec_free(&rec); if (sysno <= 0) { *rset = rset_create_null(rset_nmem, kc, 0); } else { RSFD rsfd; struct it_key key; *rset = rset_create_temp(rset_nmem, kc, kc->scope, res_get(zh->res, "setTmpDir"), 0); rsfd = rset_open(*rset, RSETF_WRITE); key.mem[0] = sysno; key.mem[1] = 1; key.len = 2; rset_write(rsfd, &key); rset_close(rsfd); } return ZEBRA_OK; } static ZEBRA_RES rpn_sort_spec(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const Odr_oid *attributeSet, NMEM stream, Z_SortKeySpecList *sort_sequence, const char *rank_type, NMEM rset_nmem, RSET *rset, struct rset_key_control *kc) { int i; int sort_relation_value; AttrType sort_relation_type; Z_SortKeySpec *sks; Z_SortKey *sk; char termz[20]; attr_init_APT(&sort_relation_type, zapt, 7); sort_relation_value = attr_find(&sort_relation_type, &attributeSet); if (!sort_sequence->specs) { sort_sequence->num_specs = 10; sort_sequence->specs = (Z_SortKeySpec **) nmem_malloc(stream, sort_sequence->num_specs * sizeof(*sort_sequence->specs)); for (i = 0; inum_specs; i++) sort_sequence->specs[i] = 0; } if (zapt->term->which != Z_Term_general) i = 0; else i = atoi_n((char *) zapt->term->u.general->buf, zapt->term->u.general->len); if (i >= sort_sequence->num_specs) i = 0; sprintf(termz, "%d", i); sks = (Z_SortKeySpec *) nmem_malloc(stream, sizeof(*sks)); sks->sortElement = (Z_SortElement *) nmem_malloc(stream, sizeof(*sks->sortElement)); sks->sortElement->which = Z_SortElement_generic; sk = sks->sortElement->u.generic = (Z_SortKey *) nmem_malloc(stream, sizeof(*sk)); sk->which = Z_SortKey_sortAttributes; sk->u.sortAttributes = (Z_SortAttributes *) nmem_malloc(stream, sizeof(*sk->u.sortAttributes)); sk->u.sortAttributes->id = odr_oiddup_nmem(stream, attributeSet); sk->u.sortAttributes->list = zapt->attributes; sks->sortRelation = (Odr_int *) nmem_malloc(stream, sizeof(*sks->sortRelation)); if (sort_relation_value == 1) *sks->sortRelation = Z_SortKeySpec_ascending; else if (sort_relation_value == 2) *sks->sortRelation = Z_SortKeySpec_descending; else *sks->sortRelation = Z_SortKeySpec_ascending; sks->caseSensitivity = (Odr_int *) nmem_malloc(stream, sizeof(*sks->caseSensitivity)); *sks->caseSensitivity = 0; sks->which = Z_SortKeySpec_null; sks->u.null = odr_nullval (); sort_sequence->specs[i] = sks; *rset = rset_create_null(rset_nmem, kc, 0); return ZEBRA_OK; } static int rpn_check_xpath(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const Odr_oid *attributeSet, struct xpath_location_step *xpath, int max, NMEM mem) { const Odr_oid *curAttributeSet = attributeSet; AttrType use; const char *use_string = 0; attr_init_APT(&use, zapt, 1); attr_find_ex(&use, &curAttributeSet, &use_string); if (!use_string || *use_string != '/') return -1; return zebra_parse_xpath_str(use_string, xpath, max, mem); } static RSET xpath_trunc(ZebraHandle zh, NMEM stream, const char *index_type, const char *term, const char *xpath_use, NMEM rset_nmem, struct rset_key_control *kc) { struct grep_info grep_info; int ord = zebraExplain_lookup_attr_str(zh->reg->zei, zinfo_index_category_index, index_type, xpath_use); if (grep_info_prepare(zh, 0 /* zapt */, &grep_info, "0") == ZEBRA_FAIL) return rset_create_null(rset_nmem, kc, 0); if (ord < 0) return rset_create_null(rset_nmem, kc, 0); else { int i, r, max_pos; char ord_buf[32]; RSET rset; WRBUF term_dict = wrbuf_alloc(); int ord_len = key_SU_encode(ord, ord_buf); int term_type = Z_Term_characterString; const char *flags = "void"; wrbuf_putc(term_dict, '('); for (i = 0; ireg->dict, wrbuf_cstr(term_dict), 0, &grep_info, &max_pos, 0, grep_handle); yaz_log(YLOG_DEBUG, "%s %d positions", term, grep_info.isam_p_indx); rset = rset_trunc(zh, grep_info.isam_p_buf, grep_info.isam_p_indx, term, strlen(term), flags, 1, term_type, rset_nmem, kc, kc->scope, 0, index_type, 0 /* hits_limit */, 0 /* term_ref_id_str */); grep_info_delete(&grep_info); wrbuf_destroy(term_dict); return rset; } } static ZEBRA_RES rpn_search_xpath(ZebraHandle zh, NMEM stream, const char *rank_type, RSET rset, int xpath_len, struct xpath_location_step *xpath, NMEM rset_nmem, RSET *rset_out, struct rset_key_control *kc) { int i; int always_matches = rset ? 0 : 1; if (xpath_len < 0) { *rset_out = rset; return ZEBRA_OK; } yaz_log(YLOG_DEBUG, "xpath len=%d", xpath_len); for (i = 0; i a/.* //a/b -> b/a/.* /a -> a/ /a/b -> b/a/ / -> none a[@attr = value]/b[@other = othervalue] /e/@a val range(e/,range(@a,freetext(w,1015,val),@a),e/) /a/b val range(b/a/,freetext(w,1016,val),b/a/) /a/b/@c val range(b/a/,range(@c,freetext(w,1016,val),@c),b/a/) /a/b[@c = y] val range(b/a/,freetext(w,1016,val),b/a/,@c = y) /a[@c = y]/b val range(a/,range(b/a/,freetext(w,1016,val),b/a/),a/,@c = y) /a[@c = x]/b[@c = y] range(a/,range(b/a/,freetext(w,1016,val),b/a/,@c = y),a/,@c = x) */ dict_grep_cmap(zh->reg->dict, 0, 0); { int level = xpath_len; int first_path = 1; while (--level >= 0) { WRBUF xpath_rev = wrbuf_alloc(); int i; RSET rset_start_tag = 0, rset_end_tag = 0, rset_attr = 0; for (i = level; i >= 1; --i) { const char *cp = xpath[i].part; if (*cp) { for (; *cp; cp++) { if (*cp == '*') wrbuf_puts(xpath_rev, "[^/]*"); else if (*cp == ' ') wrbuf_puts(xpath_rev, "\001 "); else wrbuf_putc(xpath_rev, *cp); /* wrbuf_putc does not null-terminate , but wrbuf_puts below ensures it does.. so xpath_rev is OK iff length is > 0 */ } wrbuf_puts(xpath_rev, "/"); } else if (i == 1) /* // case */ wrbuf_puts(xpath_rev, ".*"); } if (xpath[level].predicate && xpath[level].predicate->which == XPATH_PREDICATE_RELATION && xpath[level].predicate->u.relation.name[0]) { WRBUF wbuf = wrbuf_alloc(); wrbuf_puts(wbuf, xpath[level].predicate->u.relation.name+1); if (xpath[level].predicate->u.relation.value) { const char *cp = xpath[level].predicate->u.relation.value; wrbuf_putc(wbuf, '='); while (*cp) { if (strchr(REGEX_CHARS, *cp)) wrbuf_putc(wbuf, '\\'); wrbuf_putc(wbuf, *cp); cp++; } } rset_attr = xpath_trunc( zh, stream, "0", wrbuf_cstr(wbuf), ZEBRA_XPATH_ATTR_NAME, rset_nmem, kc); wrbuf_destroy(wbuf); } else { if (!first_path) { wrbuf_destroy(xpath_rev); continue; } } yaz_log(log_level_rpn, "xpath_rev (%d) = %s", level, wrbuf_cstr(xpath_rev)); if (wrbuf_len(xpath_rev)) { rset_start_tag = xpath_trunc(zh, stream, "0", wrbuf_cstr(xpath_rev), ZEBRA_XPATH_ELM_BEGIN, rset_nmem, kc); if (always_matches) rset = rset_start_tag; else { rset_end_tag = xpath_trunc(zh, stream, "0", wrbuf_cstr(xpath_rev), ZEBRA_XPATH_ELM_END, rset_nmem, kc); rset = rset_create_between(rset_nmem, kc, kc->scope, rset_start_tag, rset, rset_end_tag, rset_attr); } } wrbuf_destroy(xpath_rev); first_path = 0; } } *rset_out = rset; return ZEBRA_OK; } #define MAX_XPATH_STEPS 10 static ZEBRA_RES rpn_search_database(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const Odr_oid *attributeSet, zint hits_limit, NMEM stream, Z_SortKeySpecList *sort_sequence, NMEM rset_nmem, RSET *rset, struct rset_key_control *kc); static ZEBRA_RES rpn_search_APT(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const Odr_oid *attributeSet, zint hits_limit, NMEM stream, Z_SortKeySpecList *sort_sequence, int num_bases, const char **basenames, NMEM rset_nmem, RSET *rset, struct rset_key_control *kc) { RSET *rsets = nmem_malloc(stream, num_bases * sizeof(*rsets)); ZEBRA_RES res = ZEBRA_OK; int i; for (i = 0; i < num_bases; i++) { if (zebraExplain_curDatabase(zh->reg->zei, basenames[i])) { zebra_setError(zh, YAZ_BIB1_DATABASE_UNAVAILABLE, basenames[i]); res = ZEBRA_FAIL; break; } res = rpn_search_database(zh, zapt, attributeSet, hits_limit, stream, sort_sequence, rset_nmem, rsets+i, kc); if (res != ZEBRA_OK) break; } if (res != ZEBRA_OK) { /* must clean up the already created sets */ while (--i >= 0) rset_delete(rsets[i]); *rset = 0; } else { if (num_bases == 1) *rset = rsets[0]; else if (num_bases == 0) *rset = rset_create_null(rset_nmem, kc, 0); else *rset = rset_create_or(rset_nmem, kc, kc->scope, 0 /* TERMID */, num_bases, rsets); } return res; } static ZEBRA_RES rpn_search_database(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const Odr_oid *attributeSet, zint hits_limit, NMEM stream, Z_SortKeySpecList *sort_sequence, NMEM rset_nmem, RSET *rset, struct rset_key_control *kc) { ZEBRA_RES res = ZEBRA_OK; const char *index_type; char *search_type = NULL; char rank_type[128]; int complete_flag; int sort_flag; char termz[IT_MAX_WORD+1]; int xpath_len; const char *xpath_use = 0; struct xpath_location_step xpath[MAX_XPATH_STEPS]; if (!log_level_set) { log_level_rpn = yaz_log_module_level("rpn"); log_level_set = 1; } zebra_maps_attr(zh->reg->zebra_maps, zapt, &index_type, &search_type, rank_type, &complete_flag, &sort_flag); yaz_log(YLOG_DEBUG, "index_type=%s", index_type); yaz_log(YLOG_DEBUG, "complete_flag=%d", complete_flag); yaz_log(YLOG_DEBUG, "search_type=%s", search_type); yaz_log(YLOG_DEBUG, "rank_type=%s", rank_type); if (zapt_term_to_utf8(zh, zapt, termz) == ZEBRA_FAIL) return ZEBRA_FAIL; if (sort_flag) return rpn_sort_spec(zh, zapt, attributeSet, stream, sort_sequence, rank_type, rset_nmem, rset, kc); /* consider if an X-Path query is used */ xpath_len = rpn_check_xpath(zh, zapt, attributeSet, xpath, MAX_XPATH_STEPS, stream); if (xpath_len >= 0) { if (xpath[xpath_len-1].part[0] == '@') xpath_use = ZEBRA_XPATH_ATTR_CDATA; /* last step is attribute */ else xpath_use = ZEBRA_XPATH_CDATA; /* searching for cdata */ if (1) { AttrType relation; int relation_value; attr_init_APT(&relation, zapt, 2); relation_value = attr_find(&relation, NULL); if (relation_value == 103) /* alwaysmatches */ { *rset = 0; /* signal no "term" set */ return rpn_search_xpath(zh, stream, rank_type, *rset, xpath_len, xpath, rset_nmem, rset, kc); } } } /* search using one of the various search type strategies termz is our UTF-8 search term attributeSet is top-level default attribute set stream is ODR for search reg_id is the register type complete_flag is 1 for complete subfield, 0 for incomplete xpath_use is use-attribute to be used for X-Path search, 0 for none */ if (!strcmp(search_type, "phrase")) { res = rpn_search_APT_phrase(zh, zapt, termz, attributeSet, hits_limit, stream, index_type, complete_flag, rank_type, xpath_use, rset_nmem, rset, kc); } else if (!strcmp(search_type, "and-list")) { res = rpn_search_APT_and_list(zh, zapt, termz, attributeSet, hits_limit, stream, index_type, complete_flag, rank_type, xpath_use, rset_nmem, rset, kc); } else if (!strcmp(search_type, "or-list")) { res = rpn_search_APT_or_list(zh, zapt, termz, attributeSet, hits_limit, stream, index_type, complete_flag, rank_type, xpath_use, rset_nmem, rset, kc); } else if (!strcmp(search_type, "local")) { res = rpn_search_APT_local(zh, zapt, termz, attributeSet, stream, rank_type, rset_nmem, rset, kc); } else if (!strcmp(search_type, "numeric")) { res = rpn_search_APT_numeric(zh, zapt, termz, attributeSet, stream, index_type, complete_flag, rank_type, xpath_use, rset_nmem, rset, kc); } else { zebra_setError(zh, YAZ_BIB1_UNSUPP_SEARCH, 0); res = ZEBRA_FAIL; } if (res != ZEBRA_OK) return res; if (!*rset) return ZEBRA_FAIL; return rpn_search_xpath(zh, stream, rank_type, *rset, xpath_len, xpath, rset_nmem, rset, kc); } static ZEBRA_RES rpn_search_structure(ZebraHandle zh, Z_RPNStructure *zs, const Odr_oid *attributeSet, zint hits_limit, NMEM stream, NMEM rset_nmem, Z_SortKeySpecList *sort_sequence, int num_bases, const char **basenames, RSET **result_sets, int *num_result_sets, Z_Operator *parent_op, struct rset_key_control *kc); ZEBRA_RES rpn_get_top_approx_limit(ZebraHandle zh, Z_RPNStructure *zs, zint *approx_limit) { ZEBRA_RES res = ZEBRA_OK; if (zs->which == Z_RPNStructure_complex) { if (res == ZEBRA_OK) res = rpn_get_top_approx_limit(zh, zs->u.complex->s1, approx_limit); if (res == ZEBRA_OK) res = rpn_get_top_approx_limit(zh, zs->u.complex->s2, approx_limit); } else if (zs->which == Z_RPNStructure_simple) { if (zs->u.simple->which == Z_Operand_APT) { Z_AttributesPlusTerm *zapt = zs->u.simple->u.attributesPlusTerm; AttrType global_hits_limit_attr; int l; attr_init_APT(&global_hits_limit_attr, zapt, 12); l = attr_find(&global_hits_limit_attr, NULL); if (l != -1) *approx_limit = l; } } return res; } ZEBRA_RES rpn_search_top(ZebraHandle zh, Z_RPNStructure *zs, const Odr_oid *attributeSet, zint hits_limit, NMEM stream, NMEM rset_nmem, Z_SortKeySpecList *sort_sequence, int num_bases, const char **basenames, RSET *result_set) { RSET *result_sets = 0; int num_result_sets = 0; ZEBRA_RES res; struct rset_key_control *kc = zebra_key_control_create(zh); res = rpn_search_structure(zh, zs, attributeSet, hits_limit, stream, rset_nmem, sort_sequence, num_bases, basenames, &result_sets, &num_result_sets, 0 /* no parent op */, kc); if (res != ZEBRA_OK) { int i; for (i = 0; idec)(kc); return res; } ZEBRA_RES rpn_search_structure(ZebraHandle zh, Z_RPNStructure *zs, const Odr_oid *attributeSet, zint hits_limit, NMEM stream, NMEM rset_nmem, Z_SortKeySpecList *sort_sequence, int num_bases, const char **basenames, RSET **result_sets, int *num_result_sets, Z_Operator *parent_op, struct rset_key_control *kc) { *num_result_sets = 0; if (zs->which == Z_RPNStructure_complex) { ZEBRA_RES res; Z_Operator *zop = zs->u.complex->roperator; RSET *result_sets_l = 0; int num_result_sets_l = 0; RSET *result_sets_r = 0; int num_result_sets_r = 0; res = rpn_search_structure(zh, zs->u.complex->s1, attributeSet, hits_limit, stream, rset_nmem, sort_sequence, num_bases, basenames, &result_sets_l, &num_result_sets_l, zop, kc); if (res != ZEBRA_OK) { int i; for (i = 0; iu.complex->s2, attributeSet, hits_limit, stream, rset_nmem, sort_sequence, num_bases, basenames, &result_sets_r, &num_result_sets_r, zop, kc); if (res != ZEBRA_OK) { int i; for (i = 0; iwhich != zop->which || (zop->which != Z_Operator_and && zop->which != Z_Operator_or)) { /* parent node different from this one (or non-present) */ /* we must combine result sets now */ RSET rset; switch (zop->which) { case Z_Operator_and: rset = rset_create_and(rset_nmem, kc, kc->scope, *num_result_sets, *result_sets); break; case Z_Operator_or: rset = rset_create_or(rset_nmem, kc, kc->scope, 0, /* termid */ *num_result_sets, *result_sets); break; case Z_Operator_and_not: rset = rset_create_not(rset_nmem, kc, kc->scope, (*result_sets)[0], (*result_sets)[1]); break; case Z_Operator_prox: if (zop->u.prox->which != Z_ProximityOperator_known) { zebra_setError(zh, YAZ_BIB1_UNSUPP_PROX_UNIT_CODE, 0); return ZEBRA_FAIL; } if (*zop->u.prox->u.known != Z_ProxUnit_word) { zebra_setError_zint(zh, YAZ_BIB1_UNSUPP_PROX_UNIT_CODE, *zop->u.prox->u.known); return ZEBRA_FAIL; } else { rset = rset_create_prox(rset_nmem, kc, kc->scope, *num_result_sets, *result_sets, *zop->u.prox->ordered, (!zop->u.prox->exclusion ? 0 : *zop->u.prox->exclusion), *zop->u.prox->relationType, *zop->u.prox->distance ); } break; default: zebra_setError(zh, YAZ_BIB1_OPERATOR_UNSUPP, 0); return ZEBRA_FAIL; } *num_result_sets = 1; *result_sets = nmem_malloc(stream, *num_result_sets * sizeof(**result_sets)); (*result_sets)[0] = rset; } } else if (zs->which == Z_RPNStructure_simple) { RSET rset; ZEBRA_RES res; if (zs->u.simple->which == Z_Operand_APT) { yaz_log(YLOG_DEBUG, "rpn_search_APT"); res = rpn_search_APT(zh, zs->u.simple->u.attributesPlusTerm, attributeSet, hits_limit, stream, sort_sequence, num_bases, basenames, rset_nmem, &rset, kc); if (res != ZEBRA_OK) return res; } else if (zs->u.simple->which == Z_Operand_resultSetId) { yaz_log(YLOG_DEBUG, "rpn_search_ref"); rset = resultSetRef(zh, zs->u.simple->u.resultSetId); if (!rset) { zebra_setError(zh, YAZ_BIB1_SPECIFIED_RESULT_SET_DOES_NOT_EXIST, zs->u.simple->u.resultSetId); return ZEBRA_FAIL; } rset_dup(rset); } else { zebra_setError(zh, YAZ_BIB1_UNSUPP_SEARCH, 0); return ZEBRA_FAIL; } *num_result_sets = 1; *result_sets = nmem_malloc(stream, *num_result_sets * sizeof(**result_sets)); (*result_sets)[0] = rset; } else { zebra_setError(zh, YAZ_BIB1_UNSUPP_SEARCH, 0); return ZEBRA_FAIL; } return ZEBRA_OK; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/sortidx.c0000644000175000017500000003161011412332551013107 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include "recindex.h" #define SORT_MAX_TERM 110 #define SORT_MAX_MULTI 4096 #define SORT_IDX_BLOCKSIZE 64 struct sort_term { zint sysno; zint section_id; zint length; char term[SORT_MAX_MULTI]; }; static void sort_term_log_item(int level, const void *b, const char *txt) { struct sort_term a1; memcpy(&a1, b, sizeof(a1)); yaz_log(level, "%s " ZINT_FORMAT " " ZINT_FORMAT " %.*s", txt, a1.sysno, a1.section_id, (int) a1.length-1, a1.term); } static int sort_term_compare(const void *a, const void *b) { struct sort_term a1, b1; memcpy(&a1, a, sizeof(a1)); memcpy(&b1, b, sizeof(b1)); if (a1.sysno > b1.sysno) return 1; else if (a1.sysno < b1.sysno) return -1; if (a1.section_id > b1.section_id) return 1; else if (a1.section_id < b1.section_id) return -1; return 0; } static void *sort_term_code_start(void) { return 0; } static void sort_term_encode1(void *p, char **dst, const char **src) { struct sort_term a1; memcpy(&a1, *src, sizeof(a1)); *src += sizeof(a1); zebra_zint_encode(dst, a1.sysno); /* encode record id */ strcpy(*dst, a1.term); /* then sort term, 0 terminated */ *dst += strlen(a1.term) + 1; } static void sort_term_encode2(void *p, char **dst, const char **src) { struct sort_term a1; memcpy(&a1, *src, sizeof(a1)); *src += sizeof(a1); zebra_zint_encode(dst, a1.sysno); zebra_zint_encode(dst, a1.section_id); zebra_zint_encode(dst, a1.length); /* encode length */ memcpy(*dst, a1.term, a1.length); *dst += a1.length; } static void sort_term_decode1(void *p, char **dst, const char **src) { struct sort_term a1; size_t slen; zebra_zint_decode(src, &a1.sysno); a1.section_id = 0; strcpy(a1.term, *src); slen = 1 + strlen(a1.term); *src += slen; a1.length = slen; memcpy(*dst, &a1, sizeof(a1)); *dst += sizeof(a1); } static void sort_term_decode2(void *p, char **dst, const char **src) { struct sort_term a1; zebra_zint_decode(src, &a1.sysno); zebra_zint_decode(src, &a1.section_id); zebra_zint_decode(src, &a1.length); memcpy(a1.term, *src, a1.length); *src += a1.length; memcpy(*dst, &a1, sizeof(a1)); *dst += sizeof(a1); } static void sort_term_code_reset(void *p) { } static void sort_term_code_stop(void *p) { } struct sort_term_stream { int no; int insert_flag; struct sort_term st; }; static int sort_term_code_read(void *vp, char **dst, int *insertMode) { struct sort_term_stream *s = (struct sort_term_stream *) vp; if (s->no == 0) return 0; (s->no)--; *insertMode = s->insert_flag; memcpy(*dst, &s->st, sizeof(s->st)); *dst += sizeof(s->st); return 1; } struct sortFileHead { zint sysno_max; }; struct sortFile { int id; union { BFile bf; ISAMB isamb; } u; ISAM_P isam_p; ISAMB_PP isam_pp; struct sortFile *next; struct sortFileHead head; int no_inserted; int no_deleted; }; struct zebra_sort_index { BFiles bfs; int write_flag; zint sysno; int type; char *entry_buf; struct sortFile *current_file; struct sortFile *files; }; zebra_sort_index_t zebra_sort_open(BFiles bfs, int write_flag, int type) { zebra_sort_index_t si = (zebra_sort_index_t) xmalloc(sizeof(*si)); si->bfs = bfs; si->write_flag = write_flag; si->current_file = NULL; si->files = NULL; si->type = type; si->entry_buf = (char *) xmalloc(SORT_IDX_ENTRYSIZE); return si; } void zebra_sort_close(zebra_sort_index_t si) { struct sortFile *sf = si->files; while (sf) { struct sortFile *sf_next = sf->next; switch(si->type) { case ZEBRA_SORT_TYPE_FLAT: bf_close(sf->u.bf); break; case ZEBRA_SORT_TYPE_ISAMB: case ZEBRA_SORT_TYPE_MULTI: if (sf->isam_pp) isamb_pp_close(sf->isam_pp); isamb_set_root_ptr(sf->u.isamb, sf->isam_p); isamb_close(sf->u.isamb); break; } xfree(sf); sf = sf_next; } xfree(si->entry_buf); xfree(si); } int zebra_sort_type(zebra_sort_index_t si, int id) { int isam_block_size = 4096; ISAMC_M method; char fname[80]; struct sortFile *sf; method.compare_item = sort_term_compare; method.log_item = sort_term_log_item; method.codec.reset = sort_term_code_reset; method.codec.start = sort_term_code_start; method.codec.stop = sort_term_code_stop; if (si->current_file && si->current_file->id == id) return 0; for (sf = si->files; sf; sf = sf->next) if (sf->id == id) { si->current_file = sf; return 0; } sf = (struct sortFile *) xmalloc(sizeof(*sf)); sf->id = id; switch(si->type) { case ZEBRA_SORT_TYPE_FLAT: sf->u.bf = NULL; sprintf(fname, "sort%d", id); yaz_log(YLOG_DEBUG, "sort idx %s wr=%d", fname, si->write_flag); sf->u.bf = bf_open(si->bfs, fname, SORT_IDX_BLOCKSIZE, si->write_flag); if (!sf->u.bf) { xfree(sf); return -1; } if (!bf_read(sf->u.bf, 0, 0, sizeof(sf->head), &sf->head)) { sf->head.sysno_max = 0; if (!si->write_flag) { bf_close(sf->u.bf); xfree(sf); return -1; } } break; case ZEBRA_SORT_TYPE_ISAMB: method.codec.encode = sort_term_encode1; method.codec.decode = sort_term_decode1; sprintf(fname, "sortb%d", id); sf->u.isamb = isamb_open2(si->bfs, fname, si->write_flag, &method, /* cache */ 0, /* no_cat */ 1, &isam_block_size, /* use_root_ptr */ 1); if (!sf->u.isamb) { xfree(sf); return -1; } else { sf->isam_p = isamb_get_root_ptr(sf->u.isamb); } break; case ZEBRA_SORT_TYPE_MULTI: isam_block_size = 32768; method.codec.encode = sort_term_encode2; method.codec.decode = sort_term_decode2; sprintf(fname, "sortm%d", id); sf->u.isamb = isamb_open2(si->bfs, fname, si->write_flag, &method, /* cache */ 0, /* no_cat */ 1, &isam_block_size, /* use_root_ptr */ 1); if (!sf->u.isamb) { xfree(sf); return -1; } else { sf->isam_p = isamb_get_root_ptr(sf->u.isamb); } break; } sf->isam_pp = 0; sf->no_inserted = 0; sf->no_deleted = 0; sf->next = si->files; si->current_file = si->files = sf; return 0; } static void zebra_sortf_rewind(struct sortFile *sf) { if (sf->isam_pp) isamb_pp_close(sf->isam_pp); sf->isam_pp = 0; sf->no_inserted = 0; sf->no_deleted = 0; } void zebra_sort_sysno(zebra_sort_index_t si, zint sysno) { zint new_sysno = rec_sysno_to_int(sysno); struct sortFile *sf; for (sf = si->files; sf; sf = sf->next) { if (sf->no_inserted || sf->no_deleted) zebra_sortf_rewind(sf); else if (sf->isam_pp && new_sysno <= si->sysno) zebra_sortf_rewind(sf); } si->sysno = new_sysno; } void zebra_sort_delete(zebra_sort_index_t si, zint section_id) { struct sortFile *sf = si->current_file; if (!sf || !sf->u.bf) return; switch(si->type) { case ZEBRA_SORT_TYPE_FLAT: memset(si->entry_buf, 0, SORT_IDX_ENTRYSIZE); bf_write(sf->u.bf, si->sysno+1, 0, 0, si->entry_buf); break; case ZEBRA_SORT_TYPE_ISAMB: case ZEBRA_SORT_TYPE_MULTI: assert(sf->u.isamb); if (sf->no_deleted == 0) { struct sort_term_stream s; ISAMC_I isamc_i; s.st.sysno = si->sysno; s.st.section_id = section_id; s.st.length = 0; s.st.term[0] = '\0'; s.no = 1; s.insert_flag = 0; isamc_i.clientData = &s; isamc_i.read_item = sort_term_code_read; isamb_merge(sf->u.isamb, &sf->isam_p, &isamc_i); sf->no_deleted++; } break; } } void zebra_sort_add(zebra_sort_index_t si, zint section_id, WRBUF wrbuf) { struct sortFile *sf = si->current_file; int len; if (!sf || !sf->u.bf) return; switch(si->type) { case ZEBRA_SORT_TYPE_FLAT: /* take first entry from wrbuf - itself is 0-terminated */ len = strlen(wrbuf_buf(wrbuf)); if (len > SORT_IDX_ENTRYSIZE) len = SORT_IDX_ENTRYSIZE; memcpy(si->entry_buf, wrbuf_buf(wrbuf), len); if (len < SORT_IDX_ENTRYSIZE-len) memset(si->entry_buf+len, 0, SORT_IDX_ENTRYSIZE-len); bf_write(sf->u.bf, si->sysno+1, 0, 0, si->entry_buf); break; case ZEBRA_SORT_TYPE_ISAMB: assert(sf->u.isamb); if (sf->no_inserted == 0) { struct sort_term_stream s; ISAMC_I isamc_i; /* take first entry from wrbuf - itself is 0-terminated */ len = wrbuf_len(wrbuf); if (len > SORT_MAX_TERM) { len = SORT_MAX_TERM; wrbuf_buf(wrbuf)[len-1] = '\0'; } memcpy(s.st.term, wrbuf_buf(wrbuf), len); s.st.length = len; s.st.sysno = si->sysno; s.st.section_id = 0; s.no = 1; s.insert_flag = 1; isamc_i.clientData = &s; isamc_i.read_item = sort_term_code_read; isamb_merge(sf->u.isamb, &sf->isam_p, &isamc_i); sf->no_inserted++; } break; case ZEBRA_SORT_TYPE_MULTI: assert(sf->u.isamb); if (sf->no_inserted == 0) { struct sort_term_stream s; ISAMC_I isamc_i; len = wrbuf_len(wrbuf); if (len > SORT_MAX_MULTI) { len = SORT_MAX_MULTI; wrbuf_buf(wrbuf)[len-1] = '\0'; } memcpy(s.st.term, wrbuf_buf(wrbuf), len); s.st.length = len; s.st.sysno = si->sysno; s.st.section_id = section_id; s.no = 1; s.insert_flag = 1; isamc_i.clientData = &s; isamc_i.read_item = sort_term_code_read; isamb_merge(sf->u.isamb, &sf->isam_p, &isamc_i); sf->no_inserted++; } break; } } int zebra_sort_read(zebra_sort_index_t si, zint *section_id, WRBUF w) { int r; struct sortFile *sf = si->current_file; char tbuf[SORT_IDX_ENTRYSIZE]; assert(sf); assert(sf->u.bf); switch(si->type) { case ZEBRA_SORT_TYPE_FLAT: r = bf_read(sf->u.bf, si->sysno+1, 0, 0, tbuf); if (r && *tbuf) { wrbuf_puts(w, tbuf); wrbuf_putc(w, '\0'); return 1; } break; case ZEBRA_SORT_TYPE_ISAMB: case ZEBRA_SORT_TYPE_MULTI: if (sf->isam_p) { if (!sf->isam_pp) sf->isam_pp = isamb_pp_open(sf->u.isamb, sf->isam_p, 1); if (sf->isam_pp) { struct sort_term st, st_untilbuf; st_untilbuf.sysno = si->sysno; st_untilbuf.section_id = 0; st_untilbuf.length = 0; st_untilbuf.term[0] = '\0'; r = isamb_pp_forward(sf->isam_pp, &st, &st_untilbuf); if (r && st.sysno == si->sysno) { wrbuf_write(w, st.term, st.length); if (section_id) *section_id = st.section_id; return 1; } } } break; } return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/compact.c0000644000175000017500000000206011412332551013036 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include "index.h" #include "recindex.h" void inv_compact (BFiles bfs) { dict_copy_compact (bfs, FNAME_DICT, "out"); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/marcomp.h0000644000175000017500000000516711412332551013066 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef MARCOMP_H #define MARCOMP_H #ifdef __cplusplus extern "C" { #endif typedef struct mc_subfield { char *name; char *prefix; char *suffix; struct { int start; int end; } interval; int which; union { #define MC_SF 1 #define MC_SFGROUP 2 #define MC_SFVARIANT 3 struct mc_field *in_line; struct mc_subfield *child; } u; struct mc_subfield *next; struct mc_subfield *parent; } mc_subfield; #define SZ_FNAME 3 #define SZ_IND 1 #define SZ_SFNAME 1 #define SZ_PREFIX 1 #define SZ_SUFFIX 1 typedef struct mc_field { char *name; char *ind1; char *ind2; struct { int start; int end; } interval; struct mc_subfield *list; } mc_field; typedef enum { NOP, REGULAR, LVARIANT, RVARIANT, LGROUP, RGROUP, LINLINE, RINLINE, SUBFIELD, LINTERVAL, RINTERVAL, } mc_token; typedef enum { EMCOK = 0, /* first always, mondatory */ EMCNOMEM, EMCF, EMCSF, EMCSFGROUP, EMCSFVAR, EMCSFINLINE, EMCEND /* last always, mondatory */ } mc_errcode; typedef struct mc_context { int offset; int crrval; mc_token crrtok; mc_errcode errcode; int len; const char *data; } mc_context; mc_context *mc_mk_context(const char *s); void mc_destroy_context(mc_context *c); mc_field *mc_getfield(mc_context *c); void mc_destroy_field(mc_field *p); void mc_pr_field(mc_field *p, int offset); mc_subfield *mc_getsubfields(mc_context *c, mc_subfield *parent); void mc_destroy_subfield(mc_subfield *p); void mc_destroy_subfields_recursive(mc_subfield *p); void mc_pr_subfields(mc_subfield *p, int offset); mc_errcode mc_errno(mc_context *c); const char *mc_error(mc_errcode no); #ifdef __cplusplus } #endif #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/records.c0000644000175000017500000007077511412332551013073 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Format of first block (assumes a 512 block size) * next (8 bytes) * ref_count (2 bytes) * block (500 bytes) * * Format of subsequent blocks * next (8 bytes) * block (502 bytes) * * Format of each record * sysno * (length, data) - pairs * length = 0 if same as previous */ #include #include #include #include #include #include #include "recindex.h" #if HAVE_BZLIB_H #include #endif #if HAVE_ZLIB_H #include #endif #define REC_BLOCK_TYPES 2 #define REC_HEAD_MAGIC "recindex" #define REC_VERSION 5 struct records_info { int rw; int compression_method; recindex_t recindex; char *data_fname[REC_BLOCK_TYPES]; BFile data_BFile[REC_BLOCK_TYPES]; char *tmp_buf; int tmp_size; struct record_cache_entry *record_cache; int cache_size; int cache_cur; int cache_max; int compression_chunk_size; Zebra_mutex mutex; struct records_head { char magic[8]; char version[4]; zint block_size[REC_BLOCK_TYPES]; zint block_free[REC_BLOCK_TYPES]; zint block_last[REC_BLOCK_TYPES]; zint block_used[REC_BLOCK_TYPES]; zint block_move[REC_BLOCK_TYPES]; zint total_bytes; zint index_last; zint index_free; zint no_records; } head; }; enum recordCacheFlag { recordFlagNop, recordFlagWrite, recordFlagNew, recordFlagDelete }; struct record_cache_entry { Record rec; enum recordCacheFlag flag; }; struct record_index_entry { zint next; /* first block of record info / next free entry */ int size; /* size of record or 0 if free entry */ }; Record rec_cp(Record rec); /* Modify argument to if below: 1=normal, 0=sysno testing */ #if 1 /* If this is used sysno are not converted (no testing) */ #define FAKE_OFFSET 0 #define USUAL_RANGE 6000000000LL #else /* Use a fake > 2^32 offset so we can test for proper 64-bit handling */ #define FAKE_OFFSET 6000000000LL #define USUAL_RANGE 2000000000LL #endif static zint rec_sysno_to_ext(zint sysno) { assert(sysno >= 0 && sysno <= USUAL_RANGE); return sysno + FAKE_OFFSET; } zint rec_sysno_to_int(zint sysno) { assert(sysno >= FAKE_OFFSET && sysno <= FAKE_OFFSET + USUAL_RANGE); return sysno - FAKE_OFFSET; } static void rec_tmp_expand(Records p, int size) { if (p->tmp_size < size + 2048 || p->tmp_size < p->head.block_size[REC_BLOCK_TYPES-1]*2) { xfree(p->tmp_buf); p->tmp_size = size + (int) (p->head.block_size[REC_BLOCK_TYPES-1])*2 + 2048; p->tmp_buf = (char *) xmalloc(p->tmp_size); } } static ZEBRA_RES rec_release_blocks(Records p, zint sysno) { struct record_index_entry entry; zint freeblock; char block_and_ref[sizeof(zint) + sizeof(short)]; int dst_type; int first = 1; if (recindex_read_indx(p->recindex, sysno, &entry, sizeof(entry), 1) != 1) return ZEBRA_FAIL; freeblock = entry.next; assert(freeblock > 0); dst_type = CAST_ZINT_TO_INT(freeblock & 7); assert(dst_type < REC_BLOCK_TYPES); freeblock = freeblock / 8; while (freeblock) { if (bf_read(p->data_BFile[dst_type], freeblock, 0, first ? sizeof(block_and_ref) : sizeof(zint), block_and_ref) != 1) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "read in rec_del_single"); return ZEBRA_FAIL; } if (first) { short ref; memcpy(&ref, block_and_ref + sizeof(freeblock), sizeof(ref)); --ref; memcpy(block_and_ref + sizeof(freeblock), &ref, sizeof(ref)); if (ref) { /* there is still a reference to this block.. */ if (bf_write(p->data_BFile[dst_type], freeblock, 0, sizeof(block_and_ref), block_and_ref)) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "write in rec_del_single"); return ZEBRA_FAIL; } return ZEBRA_OK; } /* the list of blocks can all be removed (ref == 0) */ first = 0; } if (bf_write(p->data_BFile[dst_type], freeblock, 0, sizeof(freeblock), &p->head.block_free[dst_type])) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "write in rec_del_single"); return ZEBRA_FAIL; } p->head.block_free[dst_type] = freeblock; memcpy(&freeblock, block_and_ref, sizeof(freeblock)); p->head.block_used[dst_type]--; } p->head.total_bytes -= entry.size; return ZEBRA_OK; } static ZEBRA_RES rec_delete_single(Records p, Record rec) { struct record_index_entry entry; /* all data in entry must be reset, since it's written verbatim */ memset(&entry, '\0', sizeof(entry)); if (rec_release_blocks(p, rec_sysno_to_int(rec->sysno)) != ZEBRA_OK) return ZEBRA_FAIL; entry.next = p->head.index_free; entry.size = 0; p->head.index_free = rec_sysno_to_int(rec->sysno); recindex_write_indx(p->recindex, rec_sysno_to_int(rec->sysno), &entry, sizeof(entry)); return ZEBRA_OK; } static ZEBRA_RES rec_write_tmp_buf(Records p, int size, zint *sysnos) { struct record_index_entry entry; int no_written = 0; char *cptr = p->tmp_buf; zint block_prev = -1, block_free; int dst_type = 0; int i; /* all data in entry must be reset, since it's written verbatim */ memset(&entry, '\0', sizeof(entry)); for (i = 1; i= p->head.block_move[i]) dst_type = i; while (no_written < size) { block_free = p->head.block_free[dst_type]; if (block_free) { if (bf_read(p->data_BFile[dst_type], block_free, 0, sizeof(*p->head.block_free), &p->head.block_free[dst_type]) != 1) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "read in %s at free block " ZINT_FORMAT, p->data_fname[dst_type], block_free); return ZEBRA_FAIL; } } else block_free = p->head.block_last[dst_type]++; if (block_prev == -1) { entry.next = block_free*8 + dst_type; entry.size = size; p->head.total_bytes += size; while (*sysnos > 0) { recindex_write_indx(p->recindex, *sysnos, &entry, sizeof(entry)); sysnos++; } } else { memcpy(cptr, &block_free, sizeof(block_free)); bf_write(p->data_BFile[dst_type], block_prev, 0, 0, cptr); cptr = p->tmp_buf + no_written; } block_prev = block_free; no_written += CAST_ZINT_TO_INT(p->head.block_size[dst_type]) - sizeof(zint); p->head.block_used[dst_type]++; } assert(block_prev != -1); block_free = 0; memcpy(cptr, &block_free, sizeof(block_free)); bf_write(p->data_BFile[dst_type], block_prev, 0, sizeof(block_free) + (p->tmp_buf+size) - cptr, cptr); return ZEBRA_OK; } int rec_check_compression_method(int compression_method) { switch(compression_method) { case REC_COMPRESS_ZLIB: #if HAVE_ZLIB_H return 1; #else return 0; #endif case REC_COMPRESS_BZIP2: #if HAVE_BZLIB_H return 1; #else return 0; #endif case REC_COMPRESS_NONE: return 1; } return 0; } Records rec_open(BFiles bfs, int rw, int compression_method) { Records p; int i, r; int version; ZEBRA_RES ret = ZEBRA_OK; p = (Records) xmalloc(sizeof(*p)); memset(&p->head, '\0', sizeof(p->head)); p->compression_method = compression_method; p->rw = rw; p->tmp_size = 4096; p->tmp_buf = (char *) xmalloc(p->tmp_size); p->compression_chunk_size = 0; if (compression_method == REC_COMPRESS_BZIP2) p->compression_chunk_size = 90000; p->recindex = recindex_open(bfs, rw, 0 /* 1=isamb for recindex */); r = recindex_read_head(p->recindex, p->tmp_buf); switch (r) { case 0: memcpy(p->head.magic, REC_HEAD_MAGIC, sizeof(p->head.magic)); sprintf(p->head.version, "%3d", REC_VERSION); p->head.index_free = 0; p->head.index_last = 1; p->head.no_records = 0; p->head.total_bytes = 0; for (i = 0; ihead.block_free[i] = 0; p->head.block_last[i] = 1; p->head.block_used[i] = 0; } p->head.block_size[0] = 256; p->head.block_move[0] = 0; for (i = 1; ihead.block_size[i] = p->head.block_size[i-1] * 8; p->head.block_move[i] = p->head.block_size[i] * 2; } if (rw) { if (recindex_write_head(p->recindex, &p->head, sizeof(p->head)) != ZEBRA_OK) ret = ZEBRA_FAIL; } break; case 1: memcpy(&p->head, p->tmp_buf, sizeof(p->head)); if (memcmp(p->head.magic, REC_HEAD_MAGIC, sizeof(p->head.magic))) { yaz_log(YLOG_FATAL, "file %s has bad format", recindex_get_fname(p->recindex)); ret = ZEBRA_FAIL; } version = atoi(p->head.version); if (version != REC_VERSION) { yaz_log(YLOG_FATAL, "file %s is version %d, but version" " %d is required", recindex_get_fname(p->recindex), version, REC_VERSION); ret = ZEBRA_FAIL; } break; } for (i = 0; idata_fname[i] = (char *) xmalloc(strlen(str)+1); strcpy(p->data_fname[i], str); p->data_BFile[i] = NULL; } for (i = 0; idata_BFile[i] = bf_open(bfs, p->data_fname[i], CAST_ZINT_TO_INT(p->head.block_size[i]), rw))) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "bf_open %s", p->data_fname[i]); ret = ZEBRA_FAIL; break; } } p->cache_max = 400; p->cache_cur = 0; p->record_cache = (struct record_cache_entry *) xmalloc(sizeof(*p->record_cache)*p->cache_max); zebra_mutex_init(&p->mutex); if (ret == ZEBRA_FAIL) rec_close(&p); return p; } static void rec_encode_unsigned(unsigned n, unsigned char *buf, int *len) { (*len) = 0; while (n > 127) { buf[*len] = 128 + (n & 127); n = n >> 7; (*len)++; } buf[*len] = n; (*len)++; } static void rec_decode_unsigned(unsigned *np, unsigned char *buf, int *len) { unsigned n = 0; unsigned w = 1; (*len) = 0; while (buf[*len] > 127) { n += w*(buf[*len] & 127); w = w << 7; (*len)++; } n += w * buf[*len]; (*len)++; *np = n; } static void rec_encode_zint(zint n, unsigned char *buf, int *len) { (*len) = 0; while (n > 127) { buf[*len] = (unsigned) (128 + (n & 127)); n = n >> 7; (*len)++; } buf[*len] = (unsigned) n; (*len)++; } static void rec_decode_zint(zint *np, unsigned char *buf, int *len) { zint n = 0; zint w = 1; (*len) = 0; while (buf[*len] > 127) { n += w*(buf[*len] & 127); w = w << 7; (*len)++; } n += w * buf[*len]; (*len)++; *np = n; } static void rec_cache_flush_block1(Records p, Record rec, Record last_rec, char **out_buf, int *out_size, int *out_offset) { int i; int len; for (i = 0; isize[i]) + 20 > *out_size) { int new_size = *out_offset + rec->size[i] + 65536; char *np = (char *) xmalloc(new_size); if (*out_offset) memcpy(np, *out_buf, *out_offset); xfree(*out_buf); *out_size = new_size; *out_buf = np; } if (i == 0) { rec_encode_zint(rec_sysno_to_int(rec->sysno), (unsigned char *) *out_buf + *out_offset, &len); (*out_offset) += len; } if (rec->size[i] == 0) { rec_encode_unsigned(1, (unsigned char *) *out_buf + *out_offset, &len); (*out_offset) += len; } else if (last_rec && rec->size[i] == last_rec->size[i] && !memcmp(rec->info[i], last_rec->info[i], rec->size[i])) { rec_encode_unsigned(0, (unsigned char *) *out_buf + *out_offset, &len); (*out_offset) += len; } else { rec_encode_unsigned(rec->size[i]+1, (unsigned char *) *out_buf + *out_offset, &len); (*out_offset) += len; memcpy(*out_buf + *out_offset, rec->info[i], rec->size[i]); (*out_offset) += rec->size[i]; } } } static ZEBRA_RES rec_flush_shared(Records p, short ref_count, zint *sysnos, char *out_buf, int out_offset) { ZEBRA_RES ret = ZEBRA_OK; if (ref_count) { int i; unsigned int csize = 0; /* indicate compression "not performed yet" */ char compression_method = p->compression_method; switch (compression_method) { case REC_COMPRESS_ZLIB: #if HAVE_ZLIB_H csize = out_offset + (out_offset >> 6) + 620; while (1) { int r; uLongf destLen = csize; rec_tmp_expand(p, csize); r = compress((Bytef *) p->tmp_buf+sizeof(zint)+sizeof(short)+ sizeof(char), &destLen, (const Bytef *) out_buf, out_offset); csize = destLen; if (r == Z_OK) { break; } if (r != Z_MEM_ERROR) { yaz_log(YLOG_WARN, "compress error: %d", r); csize = 0; break; } csize = csize * 2; } #endif break; case REC_COMPRESS_BZIP2: #if HAVE_BZLIB_H csize = out_offset + (out_offset >> 6) + 620; rec_tmp_expand(p, csize); #ifdef BZ_CONFIG_ERROR i = BZ2_bzBuffToBuffCompress #else i = bzBuffToBuffCompress #endif (p->tmp_buf+sizeof(zint)+sizeof(short)+ sizeof(char), &csize, out_buf, out_offset, 1, 0, 30); if (i != BZ_OK) { yaz_log(YLOG_WARN, "bzBuffToBuffCompress error code=%d", i); csize = 0; } #endif break; case REC_COMPRESS_NONE: break; } if (!csize) { /* either no compression or compression not supported ... */ csize = out_offset; rec_tmp_expand(p, csize); memcpy(p->tmp_buf + sizeof(zint) + sizeof(short) + sizeof(char), out_buf, out_offset); csize = out_offset; compression_method = REC_COMPRESS_NONE; } memcpy(p->tmp_buf + sizeof(zint), &ref_count, sizeof(ref_count)); memcpy(p->tmp_buf + sizeof(zint)+sizeof(short), &compression_method, sizeof(compression_method)); /* -------- compression */ if (rec_write_tmp_buf(p, csize + sizeof(short) + sizeof(char), sysnos) != ZEBRA_OK) ret = ZEBRA_FAIL; } return ret; } static ZEBRA_RES rec_write_multiple(Records p, int saveCount) { int i; short ref_count = 0; Record last_rec = 0; int out_size = 1000; int out_offset = 0; char *out_buf = (char *) xmalloc(out_size); zint *sysnos = (zint *) xmalloc(sizeof(*sysnos) * (p->cache_cur + 1)); zint *sysnop = sysnos; ZEBRA_RES ret = ZEBRA_OK; for (i = 0; icache_cur - saveCount; i++) { struct record_cache_entry *e = p->record_cache + i; switch (e->flag) { case recordFlagNew: rec_cache_flush_block1(p, e->rec, last_rec, &out_buf, &out_size, &out_offset); *sysnop++ = rec_sysno_to_int(e->rec->sysno); ref_count++; e->flag = recordFlagNop; last_rec = e->rec; break; case recordFlagWrite: if (rec_release_blocks(p, rec_sysno_to_int(e->rec->sysno)) != ZEBRA_OK) ret = ZEBRA_FAIL; rec_cache_flush_block1(p, e->rec, last_rec, &out_buf, &out_size, &out_offset); *sysnop++ = rec_sysno_to_int(e->rec->sysno); ref_count++; e->flag = recordFlagNop; last_rec = e->rec; break; case recordFlagDelete: if (rec_delete_single(p, e->rec) != ZEBRA_OK) ret = ZEBRA_FAIL; e->flag = recordFlagNop; break; case recordFlagNop: break; default: break; } } *sysnop = -1; rec_flush_shared(p, ref_count, sysnos, out_buf, out_offset); xfree(out_buf); xfree(sysnos); return ret; } static ZEBRA_RES rec_cache_flush(Records p, int saveCount) { int i, j; ZEBRA_RES ret; if (saveCount >= p->cache_cur) saveCount = 0; ret = rec_write_multiple(p, saveCount); for (i = 0; icache_cur - saveCount; i++) { struct record_cache_entry *e = p->record_cache + i; rec_free(&e->rec); } /* i still being used ... */ for (j = 0; jrecord_cache+j, p->record_cache+i, sizeof(*p->record_cache)); p->cache_cur = saveCount; return ret; } static Record *rec_cache_lookup(Records p, zint sysno, enum recordCacheFlag flag) { int i; for (i = 0; icache_cur; i++) { struct record_cache_entry *e = p->record_cache + i; if (e->rec->sysno == sysno) { if (flag != recordFlagNop && e->flag == recordFlagNop) e->flag = flag; return &e->rec; } } return NULL; } static ZEBRA_RES rec_cache_insert(Records p, Record rec, enum recordCacheFlag flag) { struct record_cache_entry *e; ZEBRA_RES ret = ZEBRA_OK; if (p->cache_cur == p->cache_max) ret = rec_cache_flush(p, 1); else if (p->cache_cur > 0) { int i, j; int used = 0; for (i = 0; icache_cur; i++) { Record r = (p->record_cache + i)->rec; for (j = 0; jsize[j]; } if (used > p->compression_chunk_size) ret = rec_cache_flush(p, 1); } assert(p->cache_cur < p->cache_max); e = p->record_cache + (p->cache_cur)++; e->flag = flag; e->rec = rec_cp(rec); return ret; } ZEBRA_RES rec_close(Records *pp) { Records p = *pp; int i; ZEBRA_RES ret = ZEBRA_OK; if (!p) return ret; zebra_mutex_destroy(&p->mutex); if (rec_cache_flush(p, 0) != ZEBRA_OK) ret = ZEBRA_FAIL; xfree(p->record_cache); if (p->rw) { if (recindex_write_head(p->recindex, &p->head, sizeof(p->head)) != ZEBRA_OK) ret = ZEBRA_FAIL; } recindex_close(p->recindex); for (i = 0; idata_BFile[i]) bf_close(p->data_BFile[i]); xfree(p->data_fname[i]); } xfree(p->tmp_buf); xfree(p); *pp = NULL; return ret; } static Record rec_get_int(Records p, zint sysno) { int i, in_size, r; Record rec, *recp; struct record_index_entry entry; zint freeblock; int dst_type; char *nptr, *cptr; char *in_buf = 0; char *bz_buf = 0; char compression_method; assert(sysno > 0); assert(p); if ((recp = rec_cache_lookup(p, sysno, recordFlagNop))) return rec_cp(*recp); if (recindex_read_indx(p->recindex, rec_sysno_to_int(sysno), &entry, sizeof(entry), 1) < 1) return NULL; /* record is not there! */ if (!entry.size) return NULL; /* record is deleted */ dst_type = (int) (entry.next & 7); assert(dst_type < REC_BLOCK_TYPES); freeblock = entry.next / 8; assert(freeblock > 0); rec_tmp_expand(p, entry.size); cptr = p->tmp_buf; r = bf_read(p->data_BFile[dst_type], freeblock, 0, 0, cptr); if (r < 0) return 0; memcpy(&freeblock, cptr, sizeof(freeblock)); while (freeblock) { zint tmp; cptr += p->head.block_size[dst_type] - sizeof(freeblock); memcpy(&tmp, cptr, sizeof(tmp)); r = bf_read(p->data_BFile[dst_type], freeblock, 0, 0, cptr); if (r < 0) return 0; memcpy(&freeblock, cptr, sizeof(freeblock)); memcpy(cptr, &tmp, sizeof(tmp)); } rec = (Record) xmalloc(sizeof(*rec)); rec->sysno = sysno; memcpy(&compression_method, p->tmp_buf + sizeof(zint) + sizeof(short), sizeof(compression_method)); in_buf = p->tmp_buf + sizeof(zint) + sizeof(short) + sizeof(char); in_size = entry.size - sizeof(short) - sizeof(char); switch (compression_method) { case REC_COMPRESS_ZLIB: #if HAVE_ZLIB_H if (1) { unsigned int bz_size = entry.size * 20 + 100; while (1) { uLongf destLen = bz_size; bz_buf = (char *) xmalloc(bz_size); i = uncompress((Bytef *) bz_buf, &destLen, (const Bytef *) in_buf, in_size); if (i == Z_OK) { bz_size = destLen; break; } yaz_log(YLOG_LOG, "failed"); xfree(bz_buf); bz_size *= 2; } in_buf = bz_buf; in_size = bz_size; } #else yaz_log(YLOG_FATAL, "cannot decompress record(s) in ZLIB format"); return 0; #endif break; case REC_COMPRESS_BZIP2: #if HAVE_BZLIB_H if (1) { unsigned int bz_size = entry.size * 20 + 100; while (1) { bz_buf = (char *) xmalloc(bz_size); #ifdef BZ_CONFIG_ERROR i = BZ2_bzBuffToBuffDecompress #else i = bzBuffToBuffDecompress #endif (bz_buf, &bz_size, in_buf, in_size, 0, 0); if (i == BZ_OK) break; yaz_log(YLOG_LOG, "failed"); xfree(bz_buf); bz_size *= 2; } in_buf = bz_buf; in_size = bz_size; } #else yaz_log(YLOG_FATAL, "cannot decompress record(s) in BZIP2 format"); return 0; #endif break; case REC_COMPRESS_NONE: break; } for (i = 0; iinfo[i] = 0; nptr = in_buf; /* skip ref count */ while (nptr < in_buf + in_size) { zint this_sysno; int len; rec_decode_zint(&this_sysno, (unsigned char *) nptr, &len); nptr += len; for (i = 0; i < REC_NO_INFO; i++) { unsigned int this_size; rec_decode_unsigned(&this_size, (unsigned char *) nptr, &len); nptr += len; if (this_size == 0) continue; rec->size[i] = this_size-1; if (rec->size[i]) { rec->info[i] = nptr; nptr += rec->size[i]; } else rec->info[i] = NULL; } if (this_sysno == rec_sysno_to_int(sysno)) break; } for (i = 0; iinfo[i] && rec->size[i]) { char *np = xmalloc(rec->size[i]+1); memcpy(np, rec->info[i], rec->size[i]); np[rec->size[i]] = '\0'; rec->info[i] = np; } else { assert(rec->info[i] == 0); assert(rec->size[i] == 0); } } xfree(bz_buf); if (rec_cache_insert(p, rec, recordFlagNop) != ZEBRA_OK) return 0; return rec; } Record rec_get(Records p, zint sysno) { Record rec; zebra_mutex_lock(&p->mutex); rec = rec_get_int(p, sysno); zebra_mutex_unlock(&p->mutex); return rec; } Record rec_get_root(Records p) { return rec_get(p, rec_sysno_to_ext(1)); } static Record rec_new_int(Records p) { int i; zint sysno; Record rec; assert(p); rec = (Record) xmalloc(sizeof(*rec)); if (1 || p->head.index_free == 0) sysno = (p->head.index_last)++; else { struct record_index_entry entry; if (recindex_read_indx(p->recindex, p->head.index_free, &entry, sizeof(entry), 0) < 1) { xfree(rec); return 0; } sysno = p->head.index_free; p->head.index_free = entry.next; } (p->head.no_records)++; rec->sysno = rec_sysno_to_ext(sysno); for (i = 0; i < REC_NO_INFO; i++) { rec->info[i] = NULL; rec->size[i] = 0; } rec_cache_insert(p, rec, recordFlagNew); return rec; } Record rec_new(Records p) { Record rec; zebra_mutex_lock(&p->mutex); rec = rec_new_int(p); zebra_mutex_unlock(&p->mutex); return rec; } ZEBRA_RES rec_del(Records p, Record *recpp) { Record *recp; ZEBRA_RES ret = ZEBRA_OK; zebra_mutex_lock(&p->mutex); (p->head.no_records)--; if ((recp = rec_cache_lookup(p, (*recpp)->sysno, recordFlagDelete))) { rec_free(recp); *recp = *recpp; } else { ret = rec_cache_insert(p, *recpp, recordFlagDelete); rec_free(recpp); } zebra_mutex_unlock(&p->mutex); *recpp = NULL; return ret; } ZEBRA_RES rec_put(Records p, Record *recpp) { Record *recp; ZEBRA_RES ret = ZEBRA_OK; zebra_mutex_lock(&p->mutex); if ((recp = rec_cache_lookup(p, (*recpp)->sysno, recordFlagWrite))) { rec_free(recp); *recp = *recpp; } else { ret = rec_cache_insert(p, *recpp, recordFlagWrite); rec_free(recpp); } zebra_mutex_unlock(&p->mutex); *recpp = NULL; return ret; } void rec_free(Record *recpp) { int i; if (!*recpp) return ; for (i = 0; i < REC_NO_INFO; i++) xfree((*recpp)->info[i]); xfree(*recpp); *recpp = NULL; } Record rec_cp(Record rec) { Record n; int i; n = (Record) xmalloc(sizeof(*n)); n->sysno = rec->sysno; for (i = 0; i < REC_NO_INFO; i++) if (!rec->info[i]) { n->info[i] = NULL; n->size[i] = 0; } else { n->size[i] = rec->size[i]; n->info[i] = (char *) xmalloc(rec->size[i]+1); memcpy(n->info[i], rec->info[i], rec->size[i]); n->info[i][rec->size[i]] = '\0'; } return n; } char *rec_strdup(const char *s, size_t *len) { char *p; if (!s) { *len = 0; return NULL; } *len = strlen(s)+1; p = (char *) xmalloc(*len); strcpy(p, s); return p; } void rec_prstat(Records records, int verbose) { int i; zint total_bytes = 0; yaz_log (YLOG_LOG, "Total records %8" ZINT_FORMAT0, records->head.no_records); for (i = 0; i< REC_BLOCK_TYPES; i++) { yaz_log (YLOG_LOG, "Record blocks of size "ZINT_FORMAT, records->head.block_size[i]); yaz_log (YLOG_LOG, " Used/Total/Bytes used " ZINT_FORMAT "/" ZINT_FORMAT "/" ZINT_FORMAT, records->head.block_used[i], records->head.block_last[i]-1, records->head.block_used[i] * records->head.block_size[i]); total_bytes += records->head.block_used[i] * records->head.block_size[i]; yaz_log(YLOG_LOG, " Block Last " ZINT_FORMAT, records->head.block_last[i]); if (verbose) { /* analyse free lists */ zint no_free = 0; zint block_free = records->head.block_free[i]; WRBUF w = wrbuf_alloc(); while (block_free) { zint nblock; no_free++; wrbuf_printf(w, " " ZINT_FORMAT, block_free); if (bf_read(records->data_BFile[i], block_free, 0, sizeof(nblock), &nblock) != 1) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "read in %s at free block " ZINT_FORMAT, records->data_fname[i], block_free); break; } block_free = nblock; } yaz_log (YLOG_LOG, " Number in free list %8" ZINT_FORMAT0, no_free); if (no_free) yaz_log(YLOG_LOG, "%s", wrbuf_cstr(w)); wrbuf_destroy(w); } } yaz_log (YLOG_LOG, "Total size of record index in bytes %8" ZINT_FORMAT0, records->head.total_bytes); yaz_log (YLOG_LOG, "Total size with overhead %8" ZINT_FORMAT0, total_bytes); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/rpnscan.c0000644000175000017500000004077211412332551013070 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #ifdef WIN32 #include #endif #if HAVE_UNISTD_H #include #endif #include #include #include "index.h" #include #include #include #include #include #include #define RPN_MAX_ORDS 32 /* convert APT SCAN term to internal cmap */ static ZEBRA_RES trans_scan_term(ZebraHandle zh, Z_AttributesPlusTerm *zapt, char *termz, zebra_map_t zm) { char term_utf8[IT_MAX_WORD]; if (zapt_term_to_utf8(zh, zapt, term_utf8) == ZEBRA_FAIL) return ZEBRA_FAIL; /* error */ else if (zebra_maps_is_icu(zm)) { const char *res_buf; size_t res_len; zebra_map_tokenize_start(zm, term_utf8, strlen(term_utf8)); if (zebra_map_tokenize_next(zm, &res_buf, &res_len, 0, 0)) { memcpy(termz, res_buf, res_len); termz[res_len] = '\0'; } else termz[0] = '\0'; } else { const char **map; const char *cp = (const char *) term_utf8; const char *cp_end = cp + strlen(cp); const char *src; int i = 0; const char *space_map = NULL; int len; while ((len = (cp_end - cp)) > 0) { map = zebra_maps_input(zm, &cp, len, 0); if (**map == *CHR_SPACE) space_map = *map; else { if (i && space_map) for (src = space_map; *src; src++) termz[i++] = *src; space_map = NULL; for (src = *map; *src; src++) termz[i++] = *src; } } termz[i] = '\0'; } return ZEBRA_OK; } static void get_first_snippet_from_rset(ZebraHandle zh, RSET rset, zebra_snippets *snippets, zint *sysno) { struct it_key key; RSFD rfd; TERMID termid; size_t sysno_mem_index = 0; if (zh->m_staticrank) sysno_mem_index = 1; yaz_log(YLOG_DEBUG, "get_first_snippet_from_rset"); rfd = rset_open(rset, RSETF_READ); *sysno = 0; while (rset_read(rfd, &key, &termid)) { if (key.mem[sysno_mem_index] != *sysno) { if (*sysno) break; *sysno = key.mem[sysno_mem_index]; } if (termid) { struct ord_list *ol; for (ol = termid->ol; ol; ol = ol->next) { zebra_snippets_append(snippets, key.mem[key.len-1], 0, ol->ord, termid->name); } } } rset_close(rfd); } struct scan2_info_entry { WRBUF term; char prefix[20]; ISAM_P isam_p; int pos_to_save; int ord; }; static int scan_handle2(char *name, const char *info, int pos, void *client) { int len_prefix; struct scan2_info_entry *scan_info = (struct scan2_info_entry *) client; if (scan_info->pos_to_save != pos) return 0; len_prefix = strlen(scan_info->prefix); if (memcmp(name, scan_info->prefix, len_prefix)) return 1; /* skip special terms such as first-in-field specials */ if (name[len_prefix] < CHR_BASE_CHAR) return 1; wrbuf_rewind(scan_info->term); wrbuf_puts(scan_info->term, name+len_prefix); assert(*info == sizeof(ISAM_P)); memcpy(&scan_info->isam_p, info+1, sizeof(ISAM_P)); return 0; } static int scan_save_set(ZebraHandle zh, ODR stream, NMEM nmem, struct rset_key_control *kc, Z_AttributesPlusTerm *zapt, RSET limit_set, const char *term, const char *index_type, struct scan2_info_entry *ar, int ord_no, ZebraScanEntry *glist, int pos) { int i; RSET rset = 0; zint approx_limit = zh->approx_limit; AttrType global_hits_limit_attr; int l; attr_init_APT(&global_hits_limit_attr, zapt, 12); l = attr_find(&global_hits_limit_attr, NULL); if (l != -1) approx_limit = l; for (i = 0; i < ord_no; i++) { if (ar[i].isam_p && strcmp(wrbuf_cstr(ar[i].term), term) == 0) { struct ord_list *ol = ord_list_create(nmem); RSET rset_t; ol = ord_list_append(nmem, ol, ar[i].ord); assert(ol); rset_t = rset_trunc( zh, &ar[i].isam_p, 1, wrbuf_buf(ar[i].term), wrbuf_len(ar[i].term), NULL, 1, zapt->term->which, nmem, kc, kc->scope, ol, index_type, 0 /* hits_limit_value */, 0 /* term_ref_id_str */); if (!rset) rset = rset_t; else { RSET rsets[2]; rsets[0] = rset; rsets[1] = rset_t; rset = rset_create_or(nmem, kc, kc->scope, 0 /* termid */, 2, rsets); } ar[i].isam_p = 0; } } if (rset) { zint count; /* merge with limit_set if given */ if (limit_set) { RSET rsets[2]; rsets[0] = rset; rsets[1] = rset_dup(limit_set); rset = rset_create_and(nmem, kc, kc->scope, 2, rsets); } /* count it */ zebra_count_set(zh, rset, &count, approx_limit); if (pos != -1) { zint sysno; zebra_snippets *hit_snippets = zebra_snippets_create(); glist[pos].term = 0; glist[pos].display_term = 0; get_first_snippet_from_rset(zh, rset, hit_snippets, &sysno); if (sysno) { zebra_snippets *rec_snippets = zebra_snippets_create(); int code = zebra_get_rec_snippets(zh, sysno, rec_snippets); if (code == 0) { const struct zebra_snippet_word *w = zebra_snippets_lookup(rec_snippets, hit_snippets); if (w) { glist[pos].display_term = odr_strdup(stream, w->term); } else { yaz_log(YLOG_WARN, "zebra_snippets_lookup failed for pos=%d", pos); } } zebra_snippets_destroy(rec_snippets); } if (zebra_term_untrans_iconv(zh, stream->mem, index_type, &glist[pos].term, term)) { /* failed.. use display_term instead (which could be 0) */ glist[pos].term = glist[pos].display_term; } if (!glist[pos].term) { yaz_log(YLOG_WARN, "Could not generate scan term for pos=%d", pos); glist[pos].term = "None"; } glist[pos].occurrences = count; zebra_snippets_destroy(hit_snippets); } rset_delete(rset); if (count > 0) return 1; else return 0; } return 0; } static ZEBRA_RES rpn_scan_norm(ZebraHandle zh, ODR stream, NMEM nmem, struct rset_key_control *kc, Z_AttributesPlusTerm *zapt, int *position, int *num_entries, ZebraScanEntry **list, int *is_partial, RSET limit_set, const char *index_type, int ord_no, int *ords) { struct scan2_info_entry *ar = nmem_malloc(nmem, sizeof(*ar) * ord_no); struct rpn_char_map_info rcmi; zebra_map_t zm = zebra_map_get_or_add(zh->reg->zebra_maps, index_type); int i, dif; int after_pos; int pos = 0; ZebraScanEntry *glist = (ZebraScanEntry *) odr_malloc(stream, *num_entries * sizeof(*glist)); *is_partial = 0; if (*position > *num_entries+1) { *is_partial = 1; *position = 1; *num_entries = 0; return ZEBRA_OK; } rpn_char_map_prepare(zh->reg, zm, &rcmi); for (i = 0; i < ord_no; i++) ar[i].term = wrbuf_alloc(); for (i = 0; i < ord_no; i++) { char termz[IT_MAX_WORD+20]; int prefix_len = 0; prefix_len = key_SU_encode(ords[i], termz); termz[prefix_len] = 0; strcpy(ar[i].prefix, termz); if (trans_scan_term(zh, zapt, termz+prefix_len, zm) == ZEBRA_FAIL) { for (i = 0; i < ord_no; i++) wrbuf_destroy(ar[i].term); return ZEBRA_FAIL; } wrbuf_rewind(ar[i].term); wrbuf_puts(ar[i].term, termz + prefix_len); ar[i].isam_p = 0; ar[i].ord = ords[i]; } /** deal with terms before position .. */ /* the glist index starts at zero (unlike scan positions */ for (pos = *position-2; pos >= 0; ) { const char *hi = 0; /* scan on all maximum terms */ for (i = 0; i < ord_no; i++) { if (ar[i].isam_p == 0) { char termz[IT_MAX_WORD+20]; int before = 1; int after = 0; ar[i].pos_to_save = -1; strcpy(termz, ar[i].prefix); strcat(termz, wrbuf_cstr(ar[i].term)); dict_scan(zh->reg->dict, termz, &before, &after, ar+i, scan_handle2); } } /* get maximum after scan */ for (i = 0; i < ord_no; i++) { if (ar[i].isam_p && (hi == 0 || strcmp(wrbuf_cstr(ar[i].term), hi) > 0)) hi = wrbuf_cstr(ar[i].term); } if (!hi) break; if (scan_save_set(zh, stream, nmem, kc, zapt, limit_set, hi, index_type, ar, ord_no, glist, (pos >= 0 && pos < *num_entries) ? pos : -1)) --pos; } /* see if we got all terms before.. */ dif = 1 + pos; if (dif > 0) { /* did not get all terms; adjust the real position and reduce number of entries */ yaz_log(YLOG_LOG, "before terms dif=%d", dif); glist = glist + dif; *num_entries -= dif; *position -= dif; *is_partial = 1; } for (i = 0; i < ord_no; i++) { char termz[IT_MAX_WORD+20]; int prefix_len = 0; prefix_len = key_SU_encode(ords[i], termz); termz[prefix_len] = 0; strcpy(ar[i].prefix, termz); if (trans_scan_term(zh, zapt, termz+prefix_len, zm) == ZEBRA_FAIL) return ZEBRA_FAIL; wrbuf_rewind(ar[i].term); wrbuf_puts(ar[i].term, termz + prefix_len); ar[i].isam_p = 0; ar[i].ord = ords[i]; } after_pos = 1; /* immediate term first.. */ for (pos = *position-1; pos < *num_entries; ) { const char *lo = 0; /* scan on all minimum terms */ for (i = 0; i < ord_no; i++) { if (ar[i].isam_p == 0) { char termz[IT_MAX_WORD+20]; int before = 0; int after = after_pos; ar[i].pos_to_save = 1; strcpy(termz, ar[i].prefix); strcat(termz, wrbuf_cstr(ar[i].term)); dict_scan(zh->reg->dict, termz, &before, &after, ar+i, scan_handle2); } } after_pos = 2; /* next round we grab following term */ /* get minimum after scan */ for (i = 0; i < ord_no; i++) { if (ar[i].isam_p && (lo == 0 || strcmp(wrbuf_cstr(ar[i].term), lo) < 0)) lo = wrbuf_cstr(ar[i].term); } if (!lo) break; if (scan_save_set(zh, stream, nmem, kc, zapt, limit_set, lo, index_type, ar, ord_no, glist, (pos >= 0 && pos < *num_entries) ? pos : -1)) pos++; } if (pos != *num_entries) { if (pos >= 0) *num_entries = pos; else *num_entries = 0; *is_partial = 1; } *list = glist; for (i = 0; i < ord_no; i++) wrbuf_destroy(ar[i].term); return ZEBRA_OK; } struct scan1_info_entry { char *term; ISAM_P isam_p; }; struct scan_info { struct scan1_info_entry *list; ODR odr; int before, after; char prefix[20]; }; ZEBRA_RES rpn_scan(ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt, const Odr_oid *attributeset, int num_bases, char **basenames, int *position, int *num_entries, ZebraScanEntry **list, int *is_partial, const char *set_name) { int base_no; int ords[RPN_MAX_ORDS], ord_no = 0; const char *index_type; char *search_type = NULL; char rank_type[128]; int complete_flag; int sort_flag; NMEM nmem; ZEBRA_RES res; struct rset_key_control *kc = 0; RSET limit_set = 0; *list = 0; *is_partial = 0; if (!attributeset) attributeset = yaz_oid_attset_bib_1; if (!set_name) { /* see if there is a @attr 8=set */ AttrType termset; int termset_value_numeric; const char *termset_value_string = 0; attr_init_APT(&termset, zapt, 8); termset_value_numeric = attr_find_ex(&termset, NULL, &termset_value_string); if (termset_value_numeric != -1) { if (termset_value_numeric != -2) { char resname[32]; sprintf(resname, "%d", termset_value_numeric); set_name = odr_strdup(stream, resname); } else set_name = odr_strdup(stream, termset_value_string); } } if (set_name) { limit_set = resultSetRef(zh, set_name); if (!limit_set) { zebra_setError(zh, YAZ_BIB1_SPECIFIED_RESULT_SET_DOES_NOT_EXIST, set_name); return ZEBRA_FAIL; } } yaz_log(YLOG_DEBUG, "position = %d, num = %d", *position, *num_entries); if (zebra_maps_attr(zh->reg->zebra_maps, zapt, &index_type, &search_type, rank_type, &complete_flag, &sort_flag)) { *num_entries = 0; zebra_setError(zh, YAZ_BIB1_UNSUPP_ATTRIBUTE_TYPE, 0); return ZEBRA_FAIL; } if (num_bases > RPN_MAX_ORDS) { zebra_setError(zh, YAZ_BIB1_TOO_MANY_DATABASES_SPECIFIED, 0); return ZEBRA_FAIL; } for (base_no = 0; base_no < num_bases; base_no++) { int ord; if (zebraExplain_curDatabase(zh->reg->zei, basenames[base_no])) { zebra_setError(zh, YAZ_BIB1_DATABASE_UNAVAILABLE, basenames[base_no]); *num_entries = 0; return ZEBRA_FAIL; } if (zebra_apt_get_ord(zh, zapt, index_type, 0, attributeset, &ord) != ZEBRA_OK) continue; ords[ord_no++] = ord; } if (ord_no == 0) { *num_entries = 0; /* zebra_apt_get_ord should set error reason */ return ZEBRA_FAIL; } if (*num_entries < 1) { *num_entries = 0; return ZEBRA_OK; } nmem = nmem_create(); kc = zebra_key_control_create(zh); res = rpn_scan_norm(zh, stream, nmem, kc, zapt, position, num_entries, list, is_partial, limit_set, index_type, ord_no, ords); nmem_destroy(nmem); (*kc->dec)(kc); return res; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/update_path.c0000644000175000017500000000756411412332551013724 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #ifdef WIN32 #include #define S_ISREG(x) (x & _S_IFREG) #define S_ISDIR(x) (x & _S_IFDIR) #endif #if HAVE_UNISTD_H #include #endif #include #include #include #include "index.h" static void repositoryExtractR(ZebraHandle zh, char *rep, int level, enum zebra_recctrl_action_t action) { struct dir_entry *e; int i; size_t rep_len = strlen(rep); e = dir_open(rep, zh->path_reg, zh->m_follow_links); if (!e) return; yaz_log(YLOG_LOG, "dir %s", rep); if (rep[rep_len-1] != '/') rep[rep_len] = '/'; else --rep_len; for (i=0; e[i].name; i++) { char *ecp; strcpy(rep +rep_len+1, e[i].name); if ((ecp = strrchr(e[i].name, '/'))) *ecp = '\0'; switch (e[i].kind) { case dirs_file: zebra_extract_file(zh, NULL, rep, action); break; case dirs_dir: repositoryExtractR(zh, rep, level+1, action); break; } } dir_free(&e); } void repositoryShow(ZebraHandle zh, const char *path) { char src[1024]; int src_len; struct dirs_entry *dst; Dict dict; struct dirs_info *di; if (!(dict = dict_open_res(zh->reg->bfs, FMATCH_DICT, 50, 0, 0, zh->res))) { yaz_log(YLOG_FATAL, "dict_open fail of %s", FMATCH_DICT); return; } strncpy(src, path, sizeof(src)-1); src[sizeof(src)-1]='\0'; src_len = strlen(src); if (src_len && src[src_len-1] != '/') { src[src_len] = '/'; src[++src_len] = '\0'; } di = dirs_open(dict, src, zh->m_flag_rw); while ((dst = dirs_read(di))) yaz_log(YLOG_LOG, "%s", dst->path); dirs_free(&di); dict_close(dict); } static void repositoryExtract(ZebraHandle zh, const char *path, enum zebra_recctrl_action_t action) { struct stat sbuf; char src[1024]; int ret; assert (path); if (zh->path_reg && !yaz_is_abspath(path)) { strcpy(src, zh->path_reg); strcat(src, "/"); } else *src = '\0'; strcat(src, path); ret = zebra_file_stat(src, &sbuf, zh->m_follow_links); strcpy(src, path); if (ret == -1) yaz_log(YLOG_WARN|YLOG_ERRNO, "Cannot access path %s", src); else if (S_ISREG(sbuf.st_mode)) zebra_extract_file(zh, NULL, src, action); else if (S_ISDIR(sbuf.st_mode)) repositoryExtractR(zh, src, 0, action); else yaz_log(YLOG_WARN, "Skipping path %s", src); } ZEBRA_RES zebra_update_from_path(ZebraHandle zh, const char *path, enum zebra_recctrl_action_t action) { if (!strcmp(path, "") || !strcmp(path, "-")) { char src[1024]; while (scanf("%1020s", src) == 1) repositoryExtract(zh, src, action); } else repositoryExtract(zh, path, action); return ZEBRA_OK; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/orddict.h0000644000175000017500000000257111412332551013054 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef ORDDICT_H #define ORDDICT_H #include #include #include YAZ_BEGIN_CDECL WRBUF zebra_mk_ord_str(int ord, const char *str); char *dict_lookup_ord(Dict d, int ord, const char *str); int dict_insert_ord(Dict dict, int ord, const char *p, int userlen, void *userinfo); int dict_delete_ord(Dict dict, int ord, const char *p); int dict_delete_subtree_ord(Dict d, int ord, void *client, int (*f)(const char *info, void *client)); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/rset_isam.c0000644000175000017500000000331611412332551013403 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** \file \brief factory function for RSET from ISAM */ #include #include #include "index.h" #include RSET zebra_create_rset_isam(ZebraHandle zh, NMEM rset_nmem, struct rset_key_control *kctrl, int scope, ISAM_P pos, TERMID termid) { assert(zh); assert(zh->reg); if (zh->reg->isamb) return rsisamb_create(rset_nmem, kctrl, scope, zh->reg->isamb, pos, termid); else if (zh->reg->isams) return rsisams_create(rset_nmem, kctrl, scope, zh->reg->isams, pos, termid); else if (zh->reg->isamc) return rsisamc_create(rset_nmem, kctrl, scope, zh->reg->isamc, pos, termid); else return rset_create_null(rset_nmem, kctrl, termid); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/rankstatic.c0000644000175000017500000001162711412332551013564 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #ifdef WIN32 #include #endif #if HAVE_UNISTD_H #include #endif #include "index.h" #include "rank.h" static int log_level = 0; static int log_initialized = 0; struct rank_set_info { int no_rank_entries; }; /* * create: Creates/Initialises this rank handler. This routine is * called exactly once. The routine returns the class_handle. */ static void *create (ZebraHandle zh) { if (!log_initialized) { log_level = yaz_log_module_level("rankstatic"); log_initialized = 1; } yaz_log(log_level, "rank-static create"); return 0; } /* * destroy: Destroys this rank handler. This routine is called * when the handler is no longer needed - i.e. when the server * dies. The class_handle was previously returned by create. */ static void destroy (struct zebra_register *reg, void *class_handle) { yaz_log(log_level, "rank-static destroy"); } /** * begin: Prepares beginning of "real" ranking. Called once for * each result set. The returned handle is a "set handle" and * will be used in each of the handlers below. */ static void *begin (struct zebra_register *reg, void *class_handle, RSET rset, NMEM nmem, TERMID *terms, int numterms) { struct rank_set_info *si = (struct rank_set_info *) nmem_malloc (nmem, sizeof(*si)); int i; yaz_log(log_level, "rank-static begin"); /* count how many terms are ranked (2=102 or similar) */ si->no_rank_entries = 0; for (i = 0; i < numterms; i++) { struct ord_list *ol = terms[i]->ol; yaz_log(log_level, "i=%d flags=%s '%s'", i, terms[i]->flags, terms[i]->name ); for (; ol; ol = ol->next) { const char *index_type = 0; const char *db = 0; const char *string_index = 0; int set = -1; int use = -1; zebraExplain_lookup_ord(reg->zei, ol->ord, &index_type, &db, &string_index); if (string_index) yaz_log(log_level, " ord=%d index_type=%s db=%s str-index=%s", ol->ord, index_type, db, string_index); else yaz_log(log_level, " ord=%d index_type=%s db=%s set=%d use=%d", ol->ord, index_type, db, set, use); } if (!strncmp (terms[i]->flags, "rank,", 5)) (si->no_rank_entries)++; } return si; } /* * end: Terminates ranking process. Called after a result set * has been ranked. */ static void end (struct zebra_register *reg, void *set_handle) { yaz_log(log_level, "rank-static end"); } /** * add: Called for each word occurence in a result set. This routine * should be as fast as possible. This routine should "incrementally" * update the score. */ static void add (void *set_handle, int seqno, TERMID term) { } /* * calc: Called for each document in a result. This handler should * produce a score based on previous call(s) to the add handler. The * score should be between 0 and 1000. If score cannot be obtained * -1 should be returned. */ static int calc (void *set_handle, zint sysno, zint staticrank, int *stop_flag) { struct rank_set_info *si = (struct rank_set_info *) set_handle; if (!si->no_rank_entries) return -1; /* ranking not enabled for any terms */ /* if we set *stop_flag = 1, we stop processing (of result set list) */ /* staticrank = 0 is highest, MAXINT lowest */ if (staticrank >= INT_MAX) return 0; /* but score is reverse (logical) */ return INT_MAX - CAST_ZINT_TO_INT(staticrank); } /* * Pseudo-meta code with sequence of calls as they occur in a * server. Handlers are prefixed by --: * * server init * -- create * foreach search * rank result set * -- begin * foreach record * foreach word * -- add * -- calc * -- end * -- destroy * server close */ static struct rank_control rank_control = { "rank-static", create, destroy, begin, end, calc, add, }; struct rank_control *rank_static_class = &rank_control; /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/Makefile.am0000644000175000017500000000732611412332551013312 00000000000000 aux_libs = \ ../rset/libidzebra-rset.la \ ../dict/libidzebra-dict.la \ ../isams/libidzebra-isams.la \ ../isamc/libidzebra-isamc.la \ ../isamb/libidzebra-isamb.la \ ../data1/libidzebra-data1.la \ ../bfile/libidzebra-bfile.la \ ../dfa/libidzebra-dfa.la \ ../util/libidzebra-util.la # Should match the main_zebralib in configure.ac # Should also match the libidzebra_..._la lines..! zebralib = libidzebra-2.0.la noinst_PROGRAMS = kdump zebrash modlibdir=$(libdir)/$(PACKAGE)$(PACKAGE_SUFFIX)/modules tabdatadir = $(datadir)/$(PACKAGE)$(PACKAGE_SUFFIX)/tab # The shared modules mod_grs_regx_la_SOURCES = mod_grs_regx.c mod_grs_regx_la_LDFLAGS = -rpath $(modlibdir) -module -avoid-version mod_grs_regx_la_LADD = $(TCL_LIB) mod_grs_regx_la_LIBADD = $(zebralib) $(mod_grs_regx_la_LADD) mod_grs_xml_la_SOURCES = mod_grs_xml.c mod_grs_xml_la_LDFLAGS = -rpath $(modlibdir) -module -avoid-version mod_grs_xml_la_LADD = $(EXPAT_LIBS) mod_grs_xml_la_LIBADD = $(zebralib) $(mod_grs_xml_la_LADD) mod_grs_marc_la_SOURCES = mod_grs_marc.c marcomp.c marcomp.h inline.c inline.h mod_grs_marc_la_LDFLAGS = -rpath $(modlibdir) -module -avoid-version mod_grs_marc_la_LADD = mod_grs_marc_la_LIBADD = $(zebralib) $(mod_grs_marc_la_LADD) mod_safari_la_SOURCES = mod_safari.c mod_safari_la_LDFLAGS = -rpath $(modlibdir) -module -avoid-version mod_safari_la_LADD = mod_safari_la_LIBADD = $(zebralib) $(mod_safari_la_LADD) mod_alvis_la_SOURCES = mod_alvis.c mod_alvis_la_LDFLAGS = -rpath $(modlibdir) -module -avoid-version mod_alvis_la_LADD = mod_alvis_la_LIBADD = $(zebralib) $(mod_alvis_la_LADD) mod_dom_la_SOURCES = mod_dom.c mod_dom_la_LDFLAGS = -rpath $(modlibdir) -module -avoid-version mod_dom_la_LADD = mod_dom_la_LIBADD = $(zebralib) $(mod_dom_la_LADD) mod_text_la_SOURCES = mod_text.c mod_text_la_LDFLAGS = -rpath $(modlibdir) -module -avoid-version mod_text_la_LADD = mod_text_la_LIBADD = $(zebralib) $(mod_text_la_LADD) modlib_LTLIBRARIES = $(SHARED_MODULE_LA) EXTRA_LTLIBRARIES = \ mod-grs-regx.la \ mod-grs-xml.la \ mod-grs-marc.la \ mod-safari.la \ mod-alvis.la \ mod-dom.la \ mod-text.la EXTRA_libidzebra_2_0_la_SOURCES = \ $(mod_grs_regx_la_SOURCES) \ $(mod_grs_xml_la_SOURCES) \ $(mod_grs_marc_la_SOURCES) \ $(mod_safari_la_SOURCES) \ $(mod_alvis_la_SOURCES) \ $(mod_dom_la_SOURCES) \ $(mod_text_la_SOURCES) lib_LTLIBRARIES = $(zebralib) libidzebra_2_0_la_DEPENDENCIES = $(STATIC_MODULE_OBJ) $(aux_libs) libidzebra_2_0_la_LIBADD = $(STATIC_MODULE_OBJ) $(aux_libs) $(STATIC_MODULE_LADD) libidzebra_2_0_la_LDFLAGS=-export-dynamic -version-info $(ZEBRALIBS_VERSION_INFO) libidzebra_2_0_la_SOURCES = \ recctrl.c \ recgrs.c \ mod_grs_sgml.c \ attribute.c \ compact.c \ dir.c dirs.c \ extract.c \ index.h invstat.c \ kinput.c kcontrol.c \ limit.c \ orddict.c orddict.h \ rank.h rank1.c ranksimilarity.c rankstatic.c \ records.c recindex.c recindex.h reckeys.c reckeys.h \ retrieve.c \ rpnscan.c rpnsearch.c sortidx.c stream.c \ update_path.c update_file.c trunc.c untrans.c isam_methods.c \ zaptterm.c zebraapi.c zinfo.c zinfo.h zsets.c key_block.c key_block.h \ check_res.c rset_isam.c bin_PROGRAMS = zebraidx zebrasrv zebraidx_SOURCES = zebraidx.c zebrasrv_SOURCES = zebrasrv.c zebrash_SOURCES = zebrash.c kdump_SOURCES = kdump.c AM_CPPFLAGS = -I$(srcdir)/../include $(YAZINC) \ -DDEFAULT_PROFILE_PATH=\"$(tabdatadir)\" \ -DDEFAULT_MODULE_PATH=\"$(modlibdir)\" \ $(TCL_INCLUDE) LDADD = $(zebralib) $(YAZLALIB) zebrash_LDADD= $(LDADD) $(READLINE_LIBS) install-exec-hook: cd $(DESTDIR)$(bindir); for p in $(bin_PROGRAMS); do \ mv -f $$p $$p$(PACKAGE_SUFFIX); \ ln -sf $$p$(PACKAGE_SUFFIX) $$p; \ done uninstall-hook: cd $(DESTDIR)$(bindir) && for p in $(bin_PROGRAMS); do \ rm -f $$p$(PACKAGE_SUFFIX); \ done idzebra-2.0.44/index/isam_methods.c0000644000175000017500000000340311412332551014066 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include "index.h" ISAMS_M *key_isams_m (Res res, ISAMS_M *me) { isams_getmethod (me); me->compare_item = key_compare; me->log_item = key_logdump_txt; me->codec.start = iscz1_start; me->codec.decode = iscz1_decode; me->codec.encode = iscz1_encode; me->codec.stop = iscz1_stop; me->codec.reset = iscz1_reset; me->debug = atoi(res_get_def (res, "isamsDebug", "0")); return me; } ISAMC_M *key_isamc_m (Res res, ISAMC_M *me) { isamc_getmethod (me); me->compare_item = key_compare; me->log_item = key_logdump_txt; me->codec.start = iscz1_start; me->codec.decode = iscz1_decode; me->codec.encode = iscz1_encode; me->codec.stop = iscz1_stop; me->codec.reset = iscz1_reset; me->debug = atoi(res_get_def (res, "isamcDebug", "0")); return me; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/zebraapi.c0000644000175000017500000017443411412332551013224 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #ifdef WIN32 #include #include #include #endif #if HAVE_UNISTD_H #include #endif #include #include #include #include "index.h" #include "rank.h" #include "orddict.h" #include #include #include #define DEFAULT_APPROX_LIMIT 2000000000 /* simple asserts to validate the most essential input args */ #define ASSERTZH assert(zh && zh->service) #define ASSERTZHRES assert(zh && zh->service && zh->res) #define ASSERTZS assert(zs) static int log_level = 0; static int log_level_initialized = 0; static void zebra_open_res(ZebraHandle zh); static void zebra_close_res(ZebraHandle zh); static ZEBRA_RES zebra_check_handle(ZebraHandle zh) { if (zh) return ZEBRA_OK; return ZEBRA_FAIL; } #define ZEBRA_CHECK_HANDLE(zh) if (zebra_check_handle(zh) != ZEBRA_OK) return ZEBRA_FAIL static int zebra_chdir(ZebraService zs) { const char *dir ; int r; ASSERTZS; yaz_log(log_level, "zebra_chdir"); dir = res_get(zs->global_res, "chdir"); if (!dir) return 0; yaz_log(YLOG_DEBUG, "chdir %s", dir); #ifdef WIN32 r = _chdir(dir); #else r = chdir(dir); #endif if (r) yaz_log(YLOG_FATAL|YLOG_ERRNO, "chdir %s", dir); return r; } static ZEBRA_RES zebra_flush_reg(ZebraHandle zh) { ZEBRA_CHECK_HANDLE(zh); yaz_log(log_level, "zebra_flush_reg"); zebraExplain_flush(zh->reg->zei, zh); key_block_flush(zh->reg->key_block, 1); zebra_index_merge(zh); return ZEBRA_OK; } static struct zebra_register *zebra_register_open(ZebraService zs, const char *name, int rw, int useshadow, Res res, const char *reg_path); static void zebra_register_close(ZebraService zs, struct zebra_register *reg); const char *zebra_get_encoding(ZebraHandle zh) { assert(zh && zh->session_res); return res_get_def(zh->session_res, "encoding", "ISO-8859-1"); } ZebraHandle zebra_open(ZebraService zs, Res res) { ZebraHandle zh; const char *default_encoding; if (!log_level_initialized) { log_level = yaz_log_module_level("zebraapi"); log_level_initialized = 1; } yaz_log(log_level, "zebra_open"); if (!zs) return 0; zh = (ZebraHandle) xmalloc(sizeof(*zh)); yaz_log(YLOG_DEBUG, "zebra_open zs=%p returns %p", zs, zh); zh->service = zs; zh->reg = 0; /* no register attached yet */ zh->sets = 0; zh->destroyed = 0; zh->errCode = 0; zh->errString = 0; zh->res = 0; zh->session_res = res_open(zs->global_res, res); zh->user_perm = 0; zh->dbaccesslist = 0; zh->reg_name = xstrdup(""); zh->path_reg = 0; zh->num_basenames = 0; zh->basenames = 0; zh->approx_limit = DEFAULT_APPROX_LIMIT; zh->trans_no = 0; zh->trans_w_no = 0; zh->lock_normal = 0; zh->lock_shadow = 0; zh->shadow_enable = 1; zh->m_staticrank = 0; zh->m_segment_indexing = 0; zh->break_handler_func = 0; zh->break_handler_data = 0; default_encoding = zebra_get_encoding(zh); zh->iconv_to_utf8 = yaz_iconv_open("UTF-8", default_encoding); if (zh->iconv_to_utf8 == 0) yaz_log(YLOG_WARN, "iconv: %s to UTF-8 unsupported", default_encoding); zh->iconv_from_utf8 = yaz_iconv_open(default_encoding, "UTF-8"); if (zh->iconv_to_utf8 == 0) yaz_log(YLOG_WARN, "iconv: UTF-8 to %s unsupported", default_encoding); zh->record_encoding = 0; zebra_mutex_cond_lock(&zs->session_lock); zh->next = zs->sessions; zs->sessions = zh; zebra_mutex_cond_unlock(&zs->session_lock); zh->store_data_buf = 0; zh->m_limit = zebra_limit_create(1, 0); zh->nmem_error = nmem_create(); return zh; } ZebraService zebra_start(const char *configName) { return zebra_start_res(configName, 0, 0); } ZebraService zebra_start_res(const char *configName, Res def_res, Res over_res) { Res res; char version_str[16]; char system_str[80]; zebra_flock_init(); if (!log_level_initialized) { log_level = yaz_log_module_level("zebraapi"); log_level_initialized = 1; } *system_str = '\0'; *version_str = '\0'; zebra_get_version(version_str, system_str); yaz_log(YLOG_LOG, "zebra_start %s %s", version_str, system_str); if (configName) yaz_log(YLOG_LOG, "config %s", configName); if ((res = res_open(def_res, over_res))) { const char *passwd_plain = 0; const char *passwd_encrypt = 0; const char *dbaccess = 0; ZebraService zh = 0; if (configName) { ZEBRA_RES ret = res_read_file(res, configName); if (ret != ZEBRA_OK) { res_close(res); return 0; } if (zebra_check_res(res)) { yaz_log(YLOG_FATAL, "Configuration error(s) for %s", configName); return 0; } } else { zebra_check_res(res); } zh = xmalloc(sizeof(*zh)); zh->global_res = res; zh->sessions = 0; if (zebra_chdir(zh)) { xfree(zh); return 0; } zebra_mutex_cond_init(&zh->session_lock); passwd_plain = res_get(zh->global_res, "passwd"); passwd_encrypt = res_get(zh->global_res, "passwd.c"); dbaccess = res_get(zh->global_res, "dbaccess"); if (!passwd_plain && !passwd_encrypt) zh->passwd_db = NULL; else { zh->passwd_db = passwd_db_open(); if (!zh->passwd_db) yaz_log(YLOG_WARN|YLOG_ERRNO, "passwd_db_open failed"); else { if (passwd_plain) passwd_db_file_plain(zh->passwd_db, passwd_plain); if (passwd_encrypt) passwd_db_file_crypt(zh->passwd_db, passwd_encrypt); } } if (!dbaccess) zh->dbaccess = NULL; else { zh->dbaccess = res_open(NULL, NULL); if (res_read_file(zh->dbaccess, dbaccess) != ZEBRA_OK) { yaz_log(YLOG_FATAL, "Failed to read %s", dbaccess); return NULL; } } zh->timing = yaz_timing_create(); zh->path_root = res_get(zh->global_res, "root"); zh->nmem = nmem_create(); zh->record_classes = recTypeClass_create(zh->global_res, zh->nmem); if (1) { const char *module_path = res_get(res, "modulePath"); if (module_path) recTypeClass_load_modules(&zh->record_classes, zh->nmem, module_path); } return zh; } return 0; } void zebra_filter_info(ZebraService zs, void *cd, void(*cb)(void *cd, const char *name)) { ASSERTZS; assert(cb); recTypeClass_info(zs->record_classes, cd, cb); } void zebra_pidfname(ZebraService zs, char *path) { ASSERTZS; zebra_lock_prefix(zs->global_res, path); strcat(path, "zebrasrv.pid"); } Dict dict_open_res(BFiles bfs, const char *name, int cache, int rw, int compact_flag, Res res) { int page_size = 4096; char resource_str[200]; sprintf(resource_str, "dict.%.100s.pagesize", name); assert(bfs); assert(name); if (res_get_int(res, resource_str, &page_size) == ZEBRA_OK) yaz_log(YLOG_LOG, "Using custom dictionary page size %d for %s", page_size, name); return dict_open(bfs, name, cache, rw, compact_flag, page_size); } static struct zebra_register *zebra_register_open(ZebraService zs, const char *name, int rw, int useshadow, Res res, const char *reg_path) { struct zebra_register *reg; int record_compression = REC_COMPRESS_NONE; const char *compression_str = 0; const char *profilePath; int sort_type = ZEBRA_SORT_TYPE_FLAT; ZEBRA_RES ret = ZEBRA_OK; ASSERTZS; reg = xmalloc(sizeof(*reg)); assert(name); reg->name = xstrdup(name); reg->seqno = 0; reg->last_val = 0; assert(res); yaz_log(YLOG_DEBUG, "zebra_register_open rw=%d useshadow=%d p=%p n=%s rp=%s", rw, useshadow, reg, name, reg_path ? reg_path : "(none)"); reg->dh = data1_create(); if (!reg->dh) { xfree(reg->name); xfree(reg); return 0; } reg->bfs = bfs_create(res_get(res, "register"), reg_path); if (!reg->bfs) { data1_destroy(reg->dh); xfree(reg->name); xfree(reg); return 0; } if (useshadow) { if (bf_cache(reg->bfs, res_get(res, "shadow")) == ZEBRA_FAIL) { bfs_destroy(reg->bfs); data1_destroy(reg->dh); xfree(reg->name); xfree(reg); return 0; } } profilePath = res_get_def(res, "profilePath", 0); data1_set_tabpath(reg->dh, profilePath); data1_set_tabroot(reg->dh, reg_path); reg->recTypes = recTypes_init(zs->record_classes, reg->dh); reg->zebra_maps = zebra_maps_open(res, reg_path, profilePath); if (!reg->zebra_maps) { recTypes_destroy(reg->recTypes); bfs_destroy(reg->bfs); data1_destroy(reg->dh); xfree(reg->name); xfree(reg); return 0; } reg->rank_classes = NULL; reg->key_block = 0; reg->keys = zebra_rec_keys_open(); reg->sortKeys = zebra_rec_keys_open(); reg->records = 0; reg->dict = 0; reg->sort_index = 0; reg->isams = 0; reg->matchDict = 0; reg->isamc = 0; reg->isamb = 0; reg->zei = 0; /* installing rank classes */ zebraRankInstall(reg, rank_1_class); zebraRankInstall(reg, rank_2_class); zebraRankInstall(reg, rank_similarity_class); zebraRankInstall(reg, rank_static_class); compression_str = res_get_def(res, "recordCompression", "none"); if (!strcmp(compression_str, "none")) record_compression = REC_COMPRESS_NONE; else if (!strcmp(compression_str, "bzip2")) record_compression = REC_COMPRESS_BZIP2; else if (!strcmp(compression_str, "zlib")) record_compression = REC_COMPRESS_ZLIB; else { yaz_log(YLOG_FATAL, "invalid recordCompression: %s", compression_str); ret = ZEBRA_FAIL; } if (!rec_check_compression_method(record_compression)) { yaz_log(YLOG_FATAL, "unsupported recordCompression: %s", compression_str); ret = ZEBRA_FAIL; } { const char *index_fname = res_get_def(res, "index", "default.idx"); if (index_fname && *index_fname && strcmp(index_fname, "none")) { if (zebra_maps_read_file(reg->zebra_maps, index_fname) != ZEBRA_OK) ret = ZEBRA_FAIL; } else { zebra_maps_define_default_sort(reg->zebra_maps); } } if (!(reg->records = rec_open(reg->bfs, rw, record_compression))) { yaz_log(YLOG_WARN, "rec_open failed"); ret = ZEBRA_FAIL; } if (rw) { reg->matchDict = dict_open_res(reg->bfs, GMATCH_DICT, 20, 1, 0, res); } if (!(reg->dict = dict_open_res(reg->bfs, FNAME_DICT, 40, rw, 0, res))) { yaz_log(YLOG_WARN, "dict_open failed"); ret = ZEBRA_FAIL; } if (res_get_match(res, "sortindex", "f", "f")) sort_type = ZEBRA_SORT_TYPE_FLAT; else if (res_get_match(res, "sortindex", "i", "f")) sort_type = ZEBRA_SORT_TYPE_ISAMB; else if (res_get_match(res, "sortindex", "m", "f")) sort_type = ZEBRA_SORT_TYPE_MULTI; else { yaz_log(YLOG_WARN, "bad_value for 'sortindex'"); ret = ZEBRA_FAIL; } if (!(reg->sort_index = zebra_sort_open(reg->bfs, rw, sort_type))) { yaz_log(YLOG_WARN, "zebra_sort_open failed"); ret = ZEBRA_FAIL; } if (res_get_match(res, "isam", "s", ISAM_DEFAULT)) { struct ISAMS_M_s isams_m; if (!(reg->isams = isams_open(reg->bfs, FNAME_ISAMS, rw, key_isams_m(res, &isams_m)))) { yaz_log(YLOG_WARN, "isams_open failed"); ret = ZEBRA_FAIL; } } if (res_get_match(res, "isam", "c", ISAM_DEFAULT)) { struct ISAMC_M_s isamc_m; if (!(reg->isamc = isamc_open(reg->bfs, FNAME_ISAMC, rw, key_isamc_m(res, &isamc_m)))) { yaz_log(YLOG_WARN, "isamc_open failed"); ret = ZEBRA_FAIL; } } if (res_get_match(res, "isam", "b", ISAM_DEFAULT)) { struct ISAMC_M_s isamc_m; if (!(reg->isamb = isamb_open(reg->bfs, "isamb", rw, key_isamc_m(res, &isamc_m), 0))) { yaz_log(YLOG_WARN, "isamb_open failed"); ret = ZEBRA_FAIL; } } if (res_get_match(res, "isam", "bc", ISAM_DEFAULT)) { struct ISAMC_M_s isamc_m; if (!(reg->isamb = isamb_open(reg->bfs, "isamb", rw, key_isamc_m(res, &isamc_m), 1))) { yaz_log(YLOG_WARN, "isamb_open failed"); ret = ZEBRA_FAIL; } } if (res_get_match(res, "isam", "null", ISAM_DEFAULT)) { struct ISAMC_M_s isamc_m; if (!(reg->isamb = isamb_open(reg->bfs, "isamb", rw, key_isamc_m(res, &isamc_m), -1))) { yaz_log(YLOG_WARN, "isamb_open failed"); ret = ZEBRA_FAIL; } } if (ret == ZEBRA_OK) { reg->zei = zebraExplain_open(reg->records, reg->dh, res, rw, reg, zebra_extract_explain); if (!reg->zei) { yaz_log(YLOG_WARN, "Cannot obtain EXPLAIN information"); ret = ZEBRA_FAIL; } } if (ret != ZEBRA_OK) { zebra_register_close(zs, reg); return 0; } yaz_log(YLOG_DEBUG, "zebra_register_open ok p=%p", reg); return reg; } ZEBRA_RES zebra_admin_shutdown(ZebraHandle zh) { ZEBRA_CHECK_HANDLE(zh); yaz_log(log_level, "zebra_admin_shutdown"); zebra_mutex_cond_lock(&zh->service->session_lock); zh->service->stop_flag = 1; zebra_mutex_cond_unlock(&zh->service->session_lock); return ZEBRA_OK; } ZEBRA_RES zebra_admin_start(ZebraHandle zh) { ZebraService zs; ZEBRA_CHECK_HANDLE(zh); yaz_log(log_level, "zebra_admin_start"); zs = zh->service; zebra_mutex_cond_lock(&zs->session_lock); zebra_mutex_cond_unlock(&zs->session_lock); return ZEBRA_OK; } static void zebra_register_close(ZebraService zs, struct zebra_register *reg) { ASSERTZS; assert(reg); yaz_log(YLOG_DEBUG, "zebra_register_close p=%p", reg); reg->stop_flag = 0; zebra_chdir(zs); zebraExplain_close(reg->zei); dict_close(reg->dict); if (reg->matchDict) dict_close(reg->matchDict); zebra_sort_close(reg->sort_index); if (reg->isams) isams_close(reg->isams); if (reg->isamc) isamc_close(reg->isamc); if (reg->isamb) isamb_close(reg->isamb); rec_close(®->records); recTypes_destroy(reg->recTypes); zebra_maps_close(reg->zebra_maps); zebraRankDestroy(reg); bfs_destroy(reg->bfs); data1_destroy(reg->dh); zebra_rec_keys_close(reg->keys); zebra_rec_keys_close(reg->sortKeys); key_block_destroy(®->key_block); xfree(reg->name); xfree(reg); } ZEBRA_RES zebra_stop(ZebraService zs) { if (!zs) return ZEBRA_OK; while (zs->sessions) { zebra_close(zs->sessions); } zebra_mutex_cond_destroy(&zs->session_lock); if (zs->passwd_db) passwd_db_close(zs->passwd_db); recTypeClass_destroy(zs->record_classes); nmem_destroy(zs->nmem); res_close(zs->global_res); yaz_timing_stop(zs->timing); yaz_log(YLOG_LOG, "zebra_stop: %4.2f %4.2f %4.2f", yaz_timing_get_real(zs->timing), yaz_timing_get_user(zs->timing), yaz_timing_get_sys(zs->timing)); yaz_timing_destroy(&zs->timing); xfree(zs); return ZEBRA_OK; } ZEBRA_RES zebra_close(ZebraHandle zh) { ZebraService zs; struct zebra_session **sp; int i; yaz_log(log_level, "zebra_close"); ZEBRA_CHECK_HANDLE(zh); zh->errCode = 0; zs = zh->service; yaz_log(YLOG_DEBUG, "zebra_close zh=%p", zh); resultSetDestroy(zh, -1, 0, 0); if (zh->reg) zebra_register_close(zh->service, zh->reg); zebra_close_res(zh); res_close(zh->session_res); xfree(zh->record_encoding); xfree(zh->dbaccesslist); for (i = 0; i < zh->num_basenames; i++) xfree(zh->basenames[i]); xfree(zh->basenames); if (zh->iconv_to_utf8 != 0) yaz_iconv_close(zh->iconv_to_utf8); if (zh->iconv_from_utf8 != 0) yaz_iconv_close(zh->iconv_from_utf8); zebra_mutex_cond_lock(&zs->session_lock); zebra_lock_destroy(zh->lock_normal); zebra_lock_destroy(zh->lock_shadow); sp = &zs->sessions; while (1) { assert(*sp); if (*sp == zh) { *sp = (*sp)->next; break; } sp = &(*sp)->next; } zebra_mutex_cond_unlock(&zs->session_lock); xfree(zh->reg_name); xfree(zh->user_perm); zh->service = 0; /* more likely to trigger an assert */ zebra_limit_destroy(zh->m_limit); nmem_destroy(zh->nmem_error); xfree(zh->path_reg); xfree(zh); return ZEBRA_OK; } struct map_baseinfo { ZebraHandle zh; NMEM mem; int num_bases; char **basenames; int new_num_bases; char **new_basenames; int new_num_max; }; static void zebra_open_res(ZebraHandle zh) { char fname[512]; ASSERTZH; zh->errCode = 0; if (zh->path_reg) { sprintf(fname, "%.200s/zebra.cfg", zh->path_reg); zh->res = res_open(zh->session_res, 0); res_read_file(zh->res, fname); } else if (*zh->reg_name == 0) { zh->res = res_open(zh->session_res, 0); } else { yaz_log(YLOG_WARN, "no register root specified"); zh->res = 0; /* no path for register - fail! */ } } static void zebra_close_res(ZebraHandle zh) { ASSERTZH; zh->errCode = 0; res_close(zh->res); zh->res = 0; } static void zebra_select_register(ZebraHandle zh, const char *new_reg) { ASSERTZH; zh->errCode = 0; if (zh->res && strcmp(zh->reg_name, new_reg) == 0) return; if (!zh->res) { assert(zh->reg == 0); assert(*zh->reg_name == 0); } else { if (zh->reg) { resultSetInvalidate(zh); zebra_register_close(zh->service, zh->reg); zh->reg = 0; } zebra_close_res(zh); } xfree(zh->reg_name); zh->reg_name = xstrdup(new_reg); xfree(zh->path_reg); zh->path_reg = 0; if (zh->service->path_root) { zh->path_reg = xmalloc(strlen(zh->service->path_root) + strlen(zh->reg_name) + 3); strcpy(zh->path_reg, zh->service->path_root); if (*zh->reg_name) { strcat(zh->path_reg, "/"); strcat(zh->path_reg, zh->reg_name); } } zebra_open_res(zh); if (zh->lock_normal) zebra_lock_destroy(zh->lock_normal); zh->lock_normal = 0; if (zh->lock_shadow) zebra_lock_destroy(zh->lock_shadow); zh->lock_shadow = 0; if (zh->res) { char fname[512]; const char *lock_area = res_get(zh->res, "lockDir"); if (!lock_area && zh->path_reg) res_set(zh->res, "lockDir", zh->path_reg); sprintf(fname, "norm.%s.LCK", zh->reg_name); zh->lock_normal = zebra_lock_create(res_get(zh->res, "lockDir"), fname); sprintf(fname, "shadow.%s.LCK", zh->reg_name); zh->lock_shadow = zebra_lock_create(res_get(zh->res, "lockDir"), fname); if (!zh->lock_normal || !zh->lock_shadow) { if (zh->lock_normal) { zebra_lock_destroy(zh->lock_normal); zh->lock_normal = 0; } if (zh->lock_shadow) { zebra_lock_destroy(zh->lock_shadow); zh->lock_shadow = 0; } zebra_close_res(zh); } } if (zh->res) { int approx = 0; if (res_get_int(zh->res, "estimatehits", &approx) == ZEBRA_OK) zebra_set_approx_limit(zh, approx); } if (zh->res) { if (res_get_int(zh->res, "staticrank", &zh->m_staticrank) == ZEBRA_OK) yaz_log(YLOG_LOG, "static rank set and is %d", zh->m_staticrank); } if (zh->res) { if (res_get_int(zh->res, "segment", &zh->m_segment_indexing) == ZEBRA_OK) { yaz_log(YLOG_DEBUG, "segment indexing set and is %d", zh->m_segment_indexing); } } } void map_basenames_func(void *vp, const char *name, const char *value) { struct map_baseinfo *p = (struct map_baseinfo *) vp; int i, no; char fromdb[128], todb[8][128]; assert(value); assert(name); assert(vp); no = sscanf(value, "%127s %127s %127s %127s %127s %127s %127s %127s %127s", fromdb, todb[0], todb[1], todb[2], todb[3], todb[4], todb[5], todb[6], todb[7]); if (no < 2) return ; no--; for (i = 0; inum_bases; i++) if (p->basenames[i] && !STRCASECMP(p->basenames[i], fromdb)) { p->basenames[i] = 0; for (i = 0; i < no; i++) { if (p->new_num_bases == p->new_num_max) return; p->new_basenames[(p->new_num_bases)++] = nmem_strdup(p->mem, todb[i]); } return; } } int zebra_select_default_database(ZebraHandle zh) { if (!zh->res) { /* no database has been selected - so we select based on resource setting (including group) */ const char *group = res_get(zh->session_res, "group"); const char *v = res_get_prefix(zh->session_res, "database", group, "Default"); return zebra_select_database(zh, v); } return 0; } void map_basenames(ZebraHandle zh, ODR stream, int *num_bases, char ***basenames) { struct map_baseinfo info; struct map_baseinfo *p = &info; int i; ASSERTZH; yaz_log(log_level, "map_basenames "); assert(stream); info.zh = zh; info.num_bases = *num_bases; info.basenames = *basenames; info.new_num_max = 128; info.new_num_bases = 0; info.new_basenames = (char **) odr_malloc(stream, sizeof(*info.new_basenames) * info.new_num_max); info.mem = stream->mem; res_trav(zh->session_res, "mapdb", &info, map_basenames_func); for (i = 0; inum_bases; i++) if (p->basenames[i] && p->new_num_bases < p->new_num_max) { p->new_basenames[(p->new_num_bases)++] = nmem_strdup(p->mem, p->basenames[i]); } *num_bases = info.new_num_bases; *basenames = info.new_basenames; for (i = 0; i<*num_bases; i++) yaz_log(YLOG_DEBUG, "base %s", (*basenames)[i]); } ZEBRA_RES zebra_select_database(ZebraHandle zh, const char *basename) { ZEBRA_CHECK_HANDLE(zh); yaz_log(log_level, "zebra_select_database %s",basename); assert(basename); return zebra_select_databases(zh, 1, &basename); } ZEBRA_RES zebra_select_databases(ZebraHandle zh, int num_bases, const char **basenames) { int i; const char *cp; int len = 0; char *new_reg = 0; ZEBRA_CHECK_HANDLE(zh); assert(basenames); yaz_log(log_level, "zebra_select_databases n=%d [0]=%s", num_bases,basenames[0]); zh->errCode = 0; if (num_bases < 1) { zh->errCode = YAZ_BIB1_COMBI_OF_SPECIFIED_DATABASES_UNSUPP; return ZEBRA_FAIL; } /* Check if the user has access to all databases (Seb) */ /* You could argue that this should happen later, after we have * determined that the database(s) exist. */ if (zh->dbaccesslist) { for (i = 0; i < num_bases; i++) { const char *db = basenames[i]; char *p, *pp; for (p = zh->dbaccesslist; p && *p; p = pp) { int len; if ((pp = strchr(p, '+'))) { len = pp - p; pp++; } else len = strlen(p); if (len == strlen(db) && !strncmp(db, p, len)) break; } if (!p) { zh->errCode = YAZ_BIB1_ACCESS_TO_SPECIFIED_DATABASE_DENIED; return ZEBRA_FAIL; } } } for (i = 0; i < zh->num_basenames; i++) xfree(zh->basenames[i]); xfree(zh->basenames); zh->num_basenames = num_bases; zh->basenames = xmalloc(zh->num_basenames * sizeof(*zh->basenames)); for (i = 0; i < zh->num_basenames; i++) zh->basenames[i] = xstrdup(basenames[i]); cp = strrchr(basenames[0], '/'); if (cp) { len = cp - basenames[0]; new_reg = xmalloc(len + 1); memcpy(new_reg, basenames[0], len); new_reg[len] = '\0'; } else new_reg = xstrdup(""); for (i = 1; ierrCode = YAZ_BIB1_COMBI_OF_SPECIFIED_DATABASES_UNSUPP; return -1; } if (len != cp1 - basenames[i] || memcmp(basenames[i], new_reg, len)) { zh->errCode = YAZ_BIB1_COMBI_OF_SPECIFIED_DATABASES_UNSUPP; return -1; } } else { if (cp1) { zh->errCode = YAZ_BIB1_COMBI_OF_SPECIFIED_DATABASES_UNSUPP; return ZEBRA_FAIL; } } } zebra_select_register(zh, new_reg); xfree(new_reg); if (!zh->res) { zh->errCode = YAZ_BIB1_DATABASE_UNAVAILABLE; return ZEBRA_FAIL; } if (!zh->lock_normal || !zh->lock_shadow) { zh->errCode = YAZ_BIB1_TEMPORARY_SYSTEM_ERROR; return ZEBRA_FAIL; } return ZEBRA_OK; } ZEBRA_RES zebra_set_approx_limit(ZebraHandle zh, zint approx_limit) { if (approx_limit == 0) approx_limit = DEFAULT_APPROX_LIMIT; zh->approx_limit = approx_limit; return ZEBRA_OK; } void zebra_set_partial_result(ZebraHandle zh) { zh->partial_result = 1; } ZEBRA_RES zebra_set_break_handler(ZebraHandle zh, int (*f)(void *client_data), void *client_data) { zh->break_handler_func = f; zh->break_handler_data = client_data; return ZEBRA_OK; } ZEBRA_RES zebra_search_RPN_x(ZebraHandle zh, ODR o, Z_RPNQuery *query, const char *setname, zint *hits, int *estimated_hit_count, int *partial_resultset) { ZEBRA_RES r; ZEBRA_CHECK_HANDLE(zh); assert(o); assert(query); assert(hits); assert(setname); yaz_log(log_level, "zebra_search_rpn"); zh->partial_result = 0; if (zebra_begin_read(zh) == ZEBRA_FAIL) return ZEBRA_FAIL; r = resultSetAddRPN(zh, odr_extract_mem(o), query, zh->num_basenames, zh->basenames, setname, hits, estimated_hit_count); *partial_resultset = zh->partial_result; zebra_end_read(zh); return r; } ZEBRA_RES zebra_search_RPN(ZebraHandle zh, ODR o, Z_RPNQuery *query, const char *setname, zint *hits) { int estimated_hit_count; int partial_resultset; return zebra_search_RPN_x(zh, o, query, setname, hits, &estimated_hit_count, &partial_resultset); } ZEBRA_RES zebra_records_retrieve(ZebraHandle zh, ODR stream, const char *setname, Z_RecordComposition *comp, const Odr_oid *input_format, int num_recs, ZebraRetrievalRecord *recs) { ZebraMetaRecord *poset; int i; ZEBRA_RES ret = ZEBRA_OK; zint *pos_array; ZEBRA_CHECK_HANDLE(zh); assert(stream); assert(setname); assert(recs); assert(num_recs>0); yaz_log(log_level, "zebra_records_retrieve n=%d", num_recs); if (!zh->res) { zebra_setError(zh, YAZ_BIB1_SPECIFIED_RESULT_SET_DOES_NOT_EXIST, setname); return ZEBRA_FAIL; } if (zebra_begin_read(zh) == ZEBRA_FAIL) return ZEBRA_FAIL; pos_array = (zint *) xmalloc(num_recs * sizeof(*pos_array)); for (i = 0; i 0) { recs[i].buf = (char*) odr_malloc(stream, len); memcpy(recs[i].buf, buf, len); } else recs[i].buf = buf; recs[i].score = poset[i].score; zebra_snippets_destroy(hit_snippet); } else { /* only need to set it once */ if (pos_array[i] < zh->approx_limit && ret == ZEBRA_OK) { zebra_setError_zint(zh, YAZ_BIB1_PRESENT_REQUEST_OUT_OF_RANGE, pos_array[i]); ret = ZEBRA_FAIL; break; } } } zebra_meta_records_destroy(zh, poset, num_recs); wrbuf_destroy(addinfo_w); } zebra_end_read(zh); xfree(pos_array); return ret; } ZEBRA_RES zebra_scan_PQF(ZebraHandle zh, ODR stream, const char *query, int *position, int *num_entries, ZebraScanEntry **entries, int *is_partial, const char *setname) { YAZ_PQF_Parser pqf_parser = yaz_pqf_create(); Z_AttributesPlusTerm *zapt; Odr_oid *attributeSet; ZEBRA_RES res; if (!(zapt = yaz_pqf_scan(pqf_parser, stream, &attributeSet, query))) { res = ZEBRA_FAIL; zh->errCode = YAZ_BIB1_SCAN_MALFORMED_SCAN; } else { res = zebra_scan(zh, stream, zapt, yaz_oid_attset_bib_1, position, num_entries, entries, is_partial, setname); } yaz_pqf_destroy(pqf_parser); return res; } ZEBRA_RES zebra_scan(ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt, const Odr_oid *attributeset, int *position, int *num_entries, ZebraScanEntry **entries, int *is_partial, const char *setname) { ZEBRA_RES res; ZEBRA_CHECK_HANDLE(zh); assert(stream); assert(zapt); assert(position); assert(num_entries); assert(is_partial); assert(entries); yaz_log(log_level, "zebra_scan"); if (zebra_begin_read(zh) == ZEBRA_FAIL) { *entries = 0; *num_entries = 0; return ZEBRA_FAIL; } res = rpn_scan(zh, stream, zapt, attributeset, zh->num_basenames, zh->basenames, position, num_entries, entries, is_partial, setname); zebra_end_read(zh); return res; } ZEBRA_RES zebra_sort(ZebraHandle zh, ODR stream, int num_input_setnames, const char **input_setnames, const char *output_setname, Z_SortKeySpecList *sort_sequence, int *sort_status) { ZEBRA_RES res; ZEBRA_CHECK_HANDLE(zh); assert(stream); assert(num_input_setnames>0); assert(input_setnames); assert(sort_sequence); assert(sort_status); yaz_log(log_level, "zebra_sort"); if (zebra_begin_read(zh) == ZEBRA_FAIL) return ZEBRA_FAIL; res = resultSetSort(zh, stream->mem, num_input_setnames, input_setnames, output_setname, sort_sequence, sort_status); zebra_end_read(zh); return res; } int zebra_deleteResultSet(ZebraHandle zh, int function, int num_setnames, char **setnames, int *statuses) { int i, status; ASSERTZH; yaz_log(log_level, "zebra_deleteResultSet n=%d", num_setnames); if (zebra_begin_read(zh)) return Z_DeleteStatus_systemProblemAtTarget; switch (function) { case Z_DeleteResultSetRequest_list: assert(num_setnames>0); assert(setnames); resultSetDestroy(zh, num_setnames, setnames, statuses); break; case Z_DeleteResultSetRequest_all: resultSetDestroy(zh, -1, 0, statuses); break; } zebra_end_read(zh); status = Z_DeleteStatus_success; for (i = 0; ierrCode); return zh->errCode; } yaz_log(log_level, "zebra_errCode: o"); return 0; } const char *zebra_errString(ZebraHandle zh) { const char *e = 0; if (zh) e= diagbib1_str(zh->errCode); yaz_log(log_level, "zebra_errString: %s",e); return e; } char *zebra_errAdd(ZebraHandle zh) { char *a = 0; if (zh) a= zh->errString; yaz_log(log_level, "zebra_errAdd: %s",a); return a; } ZEBRA_RES zebra_auth(ZebraHandle zh, const char *user, const char *pass) { const char *p; const char *astring; char u[40]; ZebraService zs; ZEBRA_CHECK_HANDLE(zh); zs = zh->service; sprintf(u, "perm.%.30s", user ? user : "anonymous"); p = res_get(zs->global_res, u); xfree(zh->user_perm); zh->user_perm = xstrdup(p ? p : "r"); /* Determine database access list */ astring = res_get(zs->dbaccess, user ? user : "anonymous"); if (astring) zh->dbaccesslist = xstrdup(astring); else zh->dbaccesslist = 0; /* users that don't require a password .. */ if (zh->user_perm && strchr(zh->user_perm, 'a')) return ZEBRA_OK; if (!zs->passwd_db || !passwd_db_auth(zs->passwd_db, user, pass)) return ZEBRA_OK; return ZEBRA_FAIL; } ZEBRA_RES zebra_admin_import_begin(ZebraHandle zh, const char *database, const char *record_type) { yaz_log(log_level, "zebra_admin_import_begin db=%s rt=%s", database, record_type); if (zebra_select_database(zh, database) == ZEBRA_FAIL) return ZEBRA_FAIL; return zebra_begin_trans(zh, 1); } ZEBRA_RES zebra_admin_import_end(ZebraHandle zh) { ZEBRA_CHECK_HANDLE(zh); yaz_log(log_level, "zebra_admin_import_end"); return zebra_end_trans(zh); } ZEBRA_RES zebra_admin_import_segment(ZebraHandle zh, Z_Segment *segment) { ZEBRA_RES res = ZEBRA_OK; zint sysno; int i; ZEBRA_CHECK_HANDLE(zh); yaz_log(log_level, "zebra_admin_import_segment"); for (i = 0; inum_segmentRecords; i++) { Z_NamePlusRecord *npr = segment->segmentRecords[i]; if (npr->which == Z_NamePlusRecord_intermediateFragment) { Z_FragmentSyntax *fragment = npr->u.intermediateFragment; if (fragment->which == Z_FragmentSyntax_notExternallyTagged) { Odr_oct *oct = fragment->u.notExternallyTagged; sysno = 0; if(zebra_update_record( zh, action_update, 0, /* record Type */ &sysno, 0, /* match */ 0, /* fname */ (const char *) oct->buf, oct->len) == ZEBRA_FAIL) res = ZEBRA_FAIL; } } } return res; } int delete_w_handle(const char *info, void *handle) { ZebraHandle zh = (ZebraHandle) handle; ISAM_P pos; if (*info == sizeof(pos)) { memcpy(&pos, info+1, sizeof(pos)); isamb_unlink(zh->reg->isamb, pos); } return 0; } int delete_w_all_handle(const char *info, void *handle) { ZebraHandle zh = (ZebraHandle) handle; ISAM_P pos; if (*info == sizeof(pos)) { ISAMB_PP pt; memcpy(&pos, info+1, sizeof(pos)); pt = isamb_pp_open(zh->reg->isamb, pos, 2); if (pt) { struct it_key key; key.mem[0] = 0; while (isamb_pp_read(pt, &key)) { Record rec; rec = rec_get(zh->reg->records, key.mem[0]); rec_del(zh->reg->records, &rec); } isamb_pp_close(pt); } } return delete_w_handle(info, handle); } static int delete_SU_handle(void *handle, int ord, const char *index_type, const char *string_index, zinfo_index_category_t cat) { ZebraHandle zh = (ZebraHandle) handle; char ord_buf[20]; int ord_len; #if 0 yaz_log(YLOG_LOG, "ord=%d index_type=%s index=%s cat=%d", ord, index_type, string_index, (int) cat); #endif ord_len = key_SU_encode(ord, ord_buf); ord_buf[ord_len] = '\0'; assert(zh->reg->isamb); assert(zh->reg->records); dict_delete_subtree(zh->reg->dict, ord_buf, zh, !strcmp(string_index, "_ALLRECORDS") ? delete_w_all_handle : delete_w_handle); return 0; } ZEBRA_RES zebra_drop_database(ZebraHandle zh, const char *db) { ZEBRA_RES ret = ZEBRA_OK; yaz_log(log_level, "zebra_drop_database %s", db); ZEBRA_CHECK_HANDLE(zh); if (zebra_select_database(zh, db) == ZEBRA_FAIL) return ZEBRA_FAIL; if (zebra_begin_trans(zh, 1) == ZEBRA_FAIL) return ZEBRA_FAIL; if (zh->reg->isamb) { int db_ord; if (zebraExplain_curDatabase(zh->reg->zei, db)) { zebra_setError(zh, YAZ_BIB1_DATABASE_DOES_NOT_EXIST, db); ret = ZEBRA_FAIL; } else { db_ord = zebraExplain_get_database_ord(zh->reg->zei); dict_delete_subtree_ord(zh->reg->matchDict, db_ord, 0 /* handle */, 0 /* func */); zebraExplain_trav_ord(zh->reg->zei, zh, delete_SU_handle); zebraExplain_removeDatabase(zh->reg->zei, zh); zebra_remove_file_match(zh); } } else { yaz_log(YLOG_WARN, "drop database only supported for isam:b"); zebra_setError(zh, YAZ_BIB1_ES_IMMEDIATE_EXECUTION_FAILED, "drop database only supported for isam:b"); ret = ZEBRA_FAIL; } if (zebra_end_trans(zh) != ZEBRA_OK) { yaz_log(YLOG_WARN, "zebra_end_trans failed"); ret = ZEBRA_FAIL; } return ret; } ZEBRA_RES zebra_create_database(ZebraHandle zh, const char *db) { yaz_log(log_level, "zebra_create_database %s", db); ZEBRA_CHECK_HANDLE(zh); assert(db); if (zebra_select_database(zh, db) == ZEBRA_FAIL) return ZEBRA_FAIL; if (zebra_begin_trans(zh, 1)) return ZEBRA_FAIL; /* announce database */ if (zebraExplain_newDatabase(zh->reg->zei, db, 0 /* explainDatabase */)) { if (zebra_end_trans(zh) != ZEBRA_OK) { yaz_log(YLOG_WARN, "zebra_end_trans failed"); } zebra_setError(zh, YAZ_BIB1_ES_IMMEDIATE_EXECUTION_FAILED, db); return ZEBRA_FAIL; } return zebra_end_trans(zh); } int zebra_string_norm(ZebraHandle zh, const char *index_type, const char *input_str, int input_len, char *output_str, int output_len) { WRBUF wrbuf; zebra_map_t zm = zebra_map_get(zh->reg->zebra_maps, index_type); ASSERTZH; assert(input_str); assert(output_str); yaz_log(log_level, "zebra_string_norm "); if (!zh->reg->zebra_maps) return -1; wrbuf = zebra_replace(zm, "", input_str, input_len); if (!wrbuf) return -2; if (wrbuf_len(wrbuf) >= output_len) return -3; if (wrbuf_len(wrbuf)) memcpy(output_str, wrbuf_buf(wrbuf), wrbuf_len(wrbuf)); output_str[wrbuf_len(wrbuf)] = '\0'; return wrbuf_len(wrbuf); } /** \brief set register state (state*.LCK) \param zh Zebra handle \param val state \param seqno sequence number val is one of: d=writing to shadow(shadow enabled); writing to register (shadow disabled) o=reading only c=commit (writing to register, reading from shadow, shadow mode only) */ static void zebra_set_state(ZebraHandle zh, int val, int seqno) { char state_fname[256]; char *fname; long p = getpid(); FILE *f; ASSERTZH; yaz_log(log_level, "zebra_set_state v=%c seq=%d", val, seqno); sprintf(state_fname, "state.%s.LCK", zh->reg_name); fname = zebra_mk_fname(res_get(zh->res, "lockDir"), state_fname); f = fopen(fname, "w"); yaz_log(YLOG_DEBUG, "zebra_set_state: %c %d %ld", val, seqno, p); fprintf(f, "%c %d %ld\n", val, seqno, p); fclose(f); xfree(fname); } static void zebra_get_state(ZebraHandle zh, char *val, int *seqno) { char state_fname[256]; char *fname; FILE *f; ASSERTZH; yaz_log(log_level, "zebra_get_state "); sprintf(state_fname, "state.%s.LCK", zh->reg_name); fname = zebra_mk_fname(res_get(zh->res, "lockDir"), state_fname); f = fopen(fname, "r"); *val = 'o'; *seqno = 0; if (f) { if (fscanf(f, "%c %d", val, seqno) != 2) { yaz_log(YLOG_ERRNO|YLOG_WARN, "fscan fail %s", state_fname); } fclose(f); } xfree(fname); } ZEBRA_RES zebra_begin_read(ZebraHandle zh) { return zebra_begin_trans(zh, 0); } ZEBRA_RES zebra_end_read(ZebraHandle zh) { return zebra_end_trans(zh); } static void read_res_for_transaction(ZebraHandle zh) { const char *group = res_get(zh->res, "group"); const char *v; /* FIXME - do we still use groups ?? */ zh->m_group = group; v = res_get_prefix(zh->res, "followLinks", group, "1"); zh->m_follow_links = atoi(v); zh->m_record_id = res_get_prefix(zh->res, "recordId", group, 0); zh->m_record_type = res_get_prefix(zh->res, "recordType", group, 0); v = res_get_prefix(zh->res, "storeKeys", group, "1"); zh->m_store_keys = atoi(v); v = res_get_prefix(zh->res, "storeData", group, "1"); zh->m_store_data = atoi(v); v = res_get_prefix(zh->res, "explainDatabase", group, "0"); zh->m_explain_database = atoi(v); v = res_get_prefix(zh->res, "openRW", group, "1"); zh->m_flag_rw = atoi(v); v = res_get_prefix(zh->res, "fileVerboseLimit", group, "1000"); zh->m_file_verbose_limit = atoi(v); } ZEBRA_RES zebra_begin_trans(ZebraHandle zh, int rw) { ZEBRA_CHECK_HANDLE(zh); zebra_select_default_database(zh); if (!zh->res) { zebra_setError(zh, YAZ_BIB1_TEMPORARY_SYSTEM_ERROR, "zebra_begin_trans: no database selected"); return ZEBRA_FAIL; } ASSERTZHRES; yaz_log(log_level, "zebra_begin_trans rw=%d",rw); if (zh->user_perm) { if (rw && !strchr(zh->user_perm, 'w')) { zebra_setError( zh, YAZ_BIB1_ES_PERMISSION_DENIED_ON_ES_CANNOT_MODIFY_OR_DELETE, 0); return ZEBRA_FAIL; } } assert(zh->res); if (rw) { int seqno = 0; char val = '?'; const char *rval = 0; (zh->trans_no++); if (zh->trans_w_no) { read_res_for_transaction(zh); return 0; } if (zh->trans_no != 1) { zebra_setError(zh, YAZ_BIB1_TEMPORARY_SYSTEM_ERROR, "zebra_begin_trans: no write trans within read"); return ZEBRA_FAIL; } if (zh->reg) { resultSetInvalidate(zh); zebra_register_close(zh->service, zh->reg); } zh->trans_w_no = zh->trans_no; zh->records_inserted = 0; zh->records_updated = 0; zh->records_deleted = 0; zh->records_processed = 0; zh->records_skipped = 0; #if HAVE_SYS_TIMES_H times(&zh->tms1); #endif /* lock */ if (zh->shadow_enable) rval = res_get(zh->res, "shadow"); if (rval) { zebra_lock_r(zh->lock_normal); zebra_lock_w(zh->lock_shadow); } else { zebra_lock_w(zh->lock_normal); zebra_lock_w(zh->lock_shadow); } zebra_get_state(zh, &val, &seqno); if (val != 'o') { /* either we didn't finish commit or shadow is dirty */ if (!rval) { yaz_log(YLOG_WARN, "previous transaction did not finish " "(shadow disabled)"); } zebra_unlock(zh->lock_shadow); zebra_unlock(zh->lock_normal); if (zebra_commit(zh)) { zh->trans_no--; zh->trans_w_no = 0; return ZEBRA_FAIL; } if (rval) { zebra_lock_r(zh->lock_normal); zebra_lock_w(zh->lock_shadow); } else { zebra_lock_w(zh->lock_normal); zebra_lock_w(zh->lock_shadow); } } zebra_set_state(zh, 'd', seqno); zh->reg = zebra_register_open(zh->service, zh->reg_name, 1, rval ? 1 : 0, zh->res, zh->path_reg); if (zh->reg) zh->reg->seqno = seqno; else { zebra_set_state(zh, 'o', seqno); zebra_unlock(zh->lock_shadow); zebra_unlock(zh->lock_normal); zh->trans_no--; zh->trans_w_no = 0; zebra_setError(zh, YAZ_BIB1_TEMPORARY_SYSTEM_ERROR, "zebra_begin_trans: cannot open register"); yaz_log(YLOG_FATAL, "%s", zh->errString); return ZEBRA_FAIL; } zebraExplain_curDatabase(zh->reg->zei, zh->basenames[0]); } else { int dirty = 0; char val; int seqno; (zh->trans_no)++; if (zh->trans_no != 1) { return zebra_flush_reg(zh); } #if HAVE_SYS_TIMES_H times(&zh->tms1); #endif if (!zh->res) { (zh->trans_no)--; zh->errCode = YAZ_BIB1_DATABASE_UNAVAILABLE; return ZEBRA_FAIL; } if (!zh->lock_normal || !zh->lock_shadow) { (zh->trans_no)--; zh->errCode = YAZ_BIB1_TEMPORARY_SYSTEM_ERROR; return ZEBRA_FAIL; } zebra_get_state(zh, &val, &seqno); if (val == 'd') val = 'o'; if (!zh->reg) dirty = 1; else if (seqno != zh->reg->seqno) { yaz_log(YLOG_DEBUG, "reopen seqno cur/old %d/%d", seqno, zh->reg->seqno); dirty = 1; } else if (zh->reg->last_val != val) { yaz_log(YLOG_DEBUG, "reopen last cur/old %d/%d", val, zh->reg->last_val); dirty = 1; } if (!dirty) return ZEBRA_OK; if (val == 'c') zebra_lock_r(zh->lock_shadow); else zebra_lock_r(zh->lock_normal); if (zh->reg) { resultSetInvalidate(zh); zebra_register_close(zh->service, zh->reg); } zh->reg = zebra_register_open(zh->service, zh->reg_name, 0, val == 'c' ? 1 : 0, zh->res, zh->path_reg); if (!zh->reg) { zebra_unlock(zh->lock_normal); zebra_unlock(zh->lock_shadow); zh->trans_no--; zh->errCode = YAZ_BIB1_DATABASE_UNAVAILABLE; return ZEBRA_FAIL; } zh->reg->last_val = val; zh->reg->seqno = seqno; } read_res_for_transaction(zh); return ZEBRA_OK; } ZEBRA_RES zebra_end_trans(ZebraHandle zh) { ZebraTransactionStatus dummy; yaz_log(log_level, "zebra_end_trans"); ZEBRA_CHECK_HANDLE(zh); return zebra_end_transaction(zh, &dummy); } ZEBRA_RES zebra_end_transaction(ZebraHandle zh, ZebraTransactionStatus *status) { char val; int seqno; const char *rval; ZEBRA_CHECK_HANDLE(zh); assert(status); yaz_log(log_level, "zebra_end_transaction"); status->processed = 0; status->inserted = 0; status->updated = 0; status->deleted = 0; status->utime = 0; status->stime = 0; if (!zh->res || !zh->reg) { zebra_setError(zh, YAZ_BIB1_TEMPORARY_SYSTEM_ERROR, "zebra_end_trans: no open transaction"); return ZEBRA_FAIL; } if (zh->trans_no != zh->trans_w_no) { zh->trans_no--; if (zh->trans_no != 0) return ZEBRA_OK; /* release read lock */ zebra_unlock(zh->lock_normal); zebra_unlock(zh->lock_shadow); } else { /* release write lock */ zh->trans_no--; zh->trans_w_no = 0; yaz_log(YLOG_DEBUG, "zebra_end_trans"); rval = res_get(zh->res, "shadow"); zebraExplain_runNumberIncrement(zh->reg->zei, 1); zebra_flush_reg(zh); resultSetInvalidate(zh); zebra_register_close(zh->service, zh->reg); zh->reg = 0; yaz_log(YLOG_LOG, "Records: "ZINT_FORMAT" i/u/d " ZINT_FORMAT"/"ZINT_FORMAT"/"ZINT_FORMAT, zh->records_processed, zh->records_inserted, zh->records_updated, zh->records_deleted); status->processed = zh->records_processed; status->inserted = zh->records_inserted; status->updated = zh->records_updated; status->deleted = zh->records_deleted; zebra_get_state(zh, &val, &seqno); if (val != 'd') { BFiles bfs = bfs_create(rval, zh->path_reg); bf_commitClean(bfs, rval); bfs_destroy(bfs); } if (!rval) seqno++; zebra_set_state(zh, 'o', seqno); zebra_unlock(zh->lock_shadow); zebra_unlock(zh->lock_normal); } #if HAVE_SYS_TIMES_H times(&zh->tms2); yaz_log(log_level, "user/system: %ld/%ld", (long) (zh->tms2.tms_utime - zh->tms1.tms_utime), (long) (zh->tms2.tms_stime - zh->tms1.tms_stime)); status->utime = (long) (zh->tms2.tms_utime - zh->tms1.tms_utime); status->stime = (long) (zh->tms2.tms_stime - zh->tms1.tms_stime); #endif return ZEBRA_OK; } ZEBRA_RES zebra_repository_update(ZebraHandle zh, const char *path) { return zebra_repository_index(zh, path, action_update); } ZEBRA_RES zebra_repository_delete(ZebraHandle zh, const char *path) { return zebra_repository_index(zh, path, action_delete); } ZEBRA_RES zebra_repository_index(ZebraHandle zh, const char *path, enum zebra_recctrl_action_t action) { ASSERTZH; assert(path); if (action == action_update) yaz_log(log_level, "updating %s", path); else if (action == action_delete) yaz_log(log_level, "deleting %s", path); else if (action == action_a_delete) yaz_log(log_level, "attempt deleting %s", path); else yaz_log(log_level, "update action=%d", (int) action); if (zh->m_record_id && !strcmp(zh->m_record_id, "file")) return zebra_update_file_match(zh, path); else return zebra_update_from_path(zh, path, action); } ZEBRA_RES zebra_repository_show(ZebraHandle zh, const char *path) { ASSERTZH; assert(path); yaz_log(log_level, "zebra_repository_show"); repositoryShow(zh, path); return ZEBRA_OK; } static ZEBRA_RES zebra_commit_ex(ZebraHandle zh, int clean_only) { int seqno; char val; const char *rval; BFiles bfs; ZEBRA_RES res = ZEBRA_OK; ASSERTZH; yaz_log(log_level, "zebra_commit_ex clean_only=%d", clean_only); zebra_select_default_database(zh); if (!zh->res) { zh->errCode = YAZ_BIB1_DATABASE_UNAVAILABLE; return ZEBRA_FAIL; } rval = res_get(zh->res, "shadow"); if (!rval) { yaz_log(YLOG_WARN, "Cannot perform commit - No shadow area defined"); return ZEBRA_OK; } zebra_lock_w(zh->lock_normal); zebra_lock_r(zh->lock_shadow); bfs = bfs_create(res_get(zh->res, "register"), zh->path_reg); if (!bfs) { zebra_unlock(zh->lock_shadow); zebra_unlock(zh->lock_normal); return ZEBRA_FAIL; } zebra_get_state(zh, &val, &seqno); if (val == 'd') { /* shadow area is dirty and so we must throw it away */ yaz_log(YLOG_WARN, "previous transaction didn't reach commit"); clean_only = 1; } else if (val == 'c') { /* commit has started. We can not remove it anymore */ clean_only = 0; } if (rval && *rval) bf_cache(bfs, rval); if (bf_commitExists(bfs)) { if (clean_only) zebra_set_state(zh, 'd', seqno); else { zebra_set_state(zh, 'c', seqno); yaz_log(log_level, "commit start"); if (bf_commitExec(bfs)) res = ZEBRA_FAIL; } if (res == ZEBRA_OK) { seqno++; zebra_set_state(zh, 'o', seqno); zebra_unlock(zh->lock_shadow); zebra_unlock(zh->lock_normal); zebra_lock_w(zh->lock_shadow); bf_commitClean(bfs, rval); zebra_unlock(zh->lock_shadow); } else { zebra_unlock(zh->lock_shadow); zebra_unlock(zh->lock_normal); yaz_log(YLOG_WARN, "zebra_commit: failed"); } } else { zebra_unlock(zh->lock_shadow); zebra_unlock(zh->lock_normal); yaz_log(log_level, "nothing to commit"); } bfs_destroy(bfs); return res; } ZEBRA_RES zebra_clean(ZebraHandle zh) { yaz_log(log_level, "zebra_clean"); ZEBRA_CHECK_HANDLE(zh); return zebra_commit_ex(zh, 1); } ZEBRA_RES zebra_commit(ZebraHandle zh) { yaz_log(log_level, "zebra_commit"); ZEBRA_CHECK_HANDLE(zh); return zebra_commit_ex(zh, 0); } ZEBRA_RES zebra_init(ZebraHandle zh) { const char *rval; BFiles bfs = 0; yaz_log(log_level, "zebra_init"); ZEBRA_CHECK_HANDLE(zh); zebra_select_default_database(zh); if (!zh->res) { zebra_setError(zh, YAZ_BIB1_TEMPORARY_SYSTEM_ERROR, "cannot select default database"); return ZEBRA_FAIL; } rval = res_get(zh->res, "shadow"); bfs = bfs_create(res_get(zh->res, "register"), zh->path_reg); if (!bfs) { zebra_setError(zh, YAZ_BIB1_TEMPORARY_SYSTEM_ERROR, "bfs_create"); return ZEBRA_FAIL; } if (rval && *rval) bf_cache(bfs, rval); bf_reset(bfs); bfs_destroy(bfs); zebra_set_state(zh, 'o', 0); return ZEBRA_OK; } ZEBRA_RES zebra_compact(ZebraHandle zh) { BFiles bfs; yaz_log(log_level, "zebra_compact"); ZEBRA_CHECK_HANDLE(zh); if (!zh->res) { zh->errCode = YAZ_BIB1_DATABASE_UNAVAILABLE; return ZEBRA_FAIL; } bfs = bfs_create(res_get(zh->res, "register"), zh->path_reg); inv_compact(bfs); bfs_destroy(bfs); return ZEBRA_OK; } void zebra_result(ZebraHandle zh, int *code, char **addinfo) { yaz_log(log_level, "zebra_result"); if (zh) { *code = zh->errCode; *addinfo = zh->errString; } else { *code = YAZ_BIB1_TEMPORARY_SYSTEM_ERROR; *addinfo ="ZebraHandle is NULL"; } } void zebra_shadow_enable(ZebraHandle zh, int value) { ASSERTZH; yaz_log(log_level, "zebra_shadow_enable"); zh->shadow_enable = value; } ZEBRA_RES zebra_octet_term_encoding(ZebraHandle zh, const char *encoding) { yaz_log(log_level, "zebra_octet_term_encoding %s", encoding); ZEBRA_CHECK_HANDLE(zh); assert(encoding); if (zh->iconv_to_utf8 != 0) yaz_iconv_close(zh->iconv_to_utf8); if (zh->iconv_from_utf8 != 0) yaz_iconv_close(zh->iconv_from_utf8); zh->iconv_to_utf8 = yaz_iconv_open("UTF-8", encoding); if (zh->iconv_to_utf8 == 0) yaz_log(YLOG_WARN, "iconv: %s to UTF-8 unsupported", encoding); zh->iconv_from_utf8 = yaz_iconv_open(encoding, "UTF-8"); if (zh->iconv_to_utf8 == 0) yaz_log(YLOG_WARN, "iconv: UTF-8 to %s unsupported", encoding); return ZEBRA_OK; } ZEBRA_RES zebra_record_encoding(ZebraHandle zh, const char *encoding) { yaz_log(log_level, "zebra_record_encoding"); ZEBRA_CHECK_HANDLE(zh); xfree(zh->record_encoding); zh->record_encoding = 0; if (encoding) zh->record_encoding = xstrdup(encoding); return ZEBRA_OK; } void zebra_set_resource(ZebraHandle zh, const char *name, const char *value) { assert(name); assert(value); yaz_log(log_level, "zebra_set_resource %s:%s", name, value); ASSERTZH; res_set(zh->res, name, value); } const char *zebra_get_resource(ZebraHandle zh, const char *name, const char *defaultvalue) { const char *v; ASSERTZH; assert(name); v = res_get_def(zh->res, name,(char *)defaultvalue); yaz_log(log_level, "zebra_get_resource %s:%s", name, v); return v; } /* moved from zebra_api_ext.c by pop */ /* FIXME: Should this really be public??? -Heikki */ int zebra_trans_no(ZebraHandle zh) { yaz_log(log_level, "zebra_trans_no"); ASSERTZH; return zh->trans_no; } int zebra_get_shadow_enable(ZebraHandle zh) { yaz_log(log_level, "zebra_get_shadow_enable"); ASSERTZH; return zh->shadow_enable; } void zebra_set_shadow_enable(ZebraHandle zh, int value) { yaz_log(log_level, "zebra_set_shadow_enable %d",value); ASSERTZH; zh->shadow_enable = value; } ZEBRA_RES zebra_add_record(ZebraHandle zh, const char *buf, int buf_size) { return zebra_update_record(zh, action_update, 0 /* record type */, 0 /* sysno */ , 0 /* match */, 0 /* fname */, buf, buf_size); } ZEBRA_RES zebra_update_record(ZebraHandle zh, enum zebra_recctrl_action_t action, const char *recordType, zint *sysno, const char *match, const char *fname, const char *buf, int buf_size) { ZEBRA_RES res; ZEBRA_CHECK_HANDLE(zh); assert(buf); yaz_log(log_level, "zebra_update_record"); if (sysno) yaz_log(log_level, " sysno=" ZINT_FORMAT, *sysno); if (buf_size < 1) buf_size = strlen(buf); if (zebra_begin_trans(zh, 1) == ZEBRA_FAIL) return ZEBRA_FAIL; res = zebra_buffer_extract_record(zh, buf, buf_size, action, recordType, sysno, match, fname); if (zebra_end_trans(zh) != ZEBRA_OK) { yaz_log(YLOG_WARN, "zebra_end_trans failed"); res = ZEBRA_FAIL; } return res; } /* --------------------------------------------------------------------------- Searching */ ZEBRA_RES zebra_search_PQF(ZebraHandle zh, const char *pqf_query, const char *setname, zint *hits) { zint lhits = 0; ZEBRA_RES res = ZEBRA_OK; Z_RPNQuery *query; ODR odr; ZEBRA_CHECK_HANDLE(zh); odr = odr_createmem(ODR_ENCODE); assert(pqf_query); assert(setname); yaz_log(log_level, "zebra_search_PQF s=%s q=%s", setname, pqf_query); query = p_query_rpn(odr, pqf_query); if (!query) { yaz_log(YLOG_WARN, "bad query %s\n", pqf_query); zh->errCode = YAZ_BIB1_MALFORMED_QUERY; res = ZEBRA_FAIL; } else res = zebra_search_RPN(zh, odr, query, setname, &lhits); odr_destroy(odr); yaz_log(log_level, "Hits: " ZINT_FORMAT, lhits); if (hits) *hits = lhits; return res; } /* --------------------------------------------------------------------------- Sort - a simplified interface, with optional read locks. */ int zebra_sort_by_specstr(ZebraHandle zh, ODR stream, const char *sort_spec, const char *output_setname, const char **input_setnames) { int num_input_setnames = 0; int sort_status = 0; Z_SortKeySpecList *sort_sequence; ZEBRA_CHECK_HANDLE(zh); assert(stream); assert(sort_spec); assert(output_setname); assert(input_setnames); sort_sequence = yaz_sort_spec(stream, sort_spec); yaz_log(log_level, "sort (FIXME) "); if (!sort_sequence) { yaz_log(YLOG_WARN, "invalid sort specs '%s'", sort_spec); zh->errCode = YAZ_BIB1_CANNOT_SORT_ACCORDING_TO_SEQUENCE; return -1; } /* we can do this, since the perl typemap code for char** will put a NULL at the end of list */ while (input_setnames[num_input_setnames]) num_input_setnames++; if (zebra_begin_read(zh)) return -1; resultSetSort(zh, stream->mem, num_input_setnames, input_setnames, output_setname, sort_sequence, &sort_status); zebra_end_read(zh); return sort_status; } /* --------------------------------------------------------------------------- Get BFS for Zebra system (to make alternative storage methods) */ struct BFiles_struct *zebra_get_bfs(ZebraHandle zh) { if (zh && zh->reg) return zh->reg->bfs; return 0; } /* --------------------------------------------------------------------------- Set limit for search/scan */ ZEBRA_RES zebra_set_limit(ZebraHandle zh, int complement_flag, zint *ids) { ZEBRA_CHECK_HANDLE(zh); zebra_limit_destroy(zh->m_limit); zh->m_limit = zebra_limit_create(complement_flag, ids); return ZEBRA_OK; } /* Set Error code + addinfo */ void zebra_setError(ZebraHandle zh, int code, const char *addinfo) { if (!zh) return; zh->errCode = code; nmem_reset(zh->nmem_error); zh->errString = addinfo ? nmem_strdup(zh->nmem_error, addinfo) : 0; } void zebra_setError_zint(ZebraHandle zh, int code, zint i) { char vstr[60]; sprintf(vstr, ZINT_FORMAT, i); zh->errCode = code; nmem_reset(zh->nmem_error); zh->errString = nmem_strdup(zh->nmem_error, vstr); } void zebra_lock_prefix(Res res, char *path) { const char *lock_dir = res_get_def(res, "lockDir", ""); strcpy(path, lock_dir); if (*path && path[strlen(path)-1] != '/') strcat(path, "/"); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/dir.c0000644000175000017500000001022711412332551012172 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #if HAVE_UNISTD_H #include #endif #include #include #include #include #include "index.h" int zebra_file_stat(const char *file_name, struct stat *buf, int follow_links) { #ifndef WIN32 if (!follow_links) return lstat(file_name, buf); #endif return stat(file_name, buf); } struct dir_entry *dir_open(const char *rep, const char *base, int follow_links) { DIR *dir; char path[1024]; char full_rep[1024]; size_t pathpos; struct dirent dent_s, *dent = &dent_s; size_t entry_max = 500; size_t idx = 0; struct dir_entry *entry; if (base && !yaz_is_abspath(rep)) { strcpy(full_rep, base); strcat(full_rep, "/"); } else *full_rep = '\0'; strcat(full_rep, rep); yaz_log(YLOG_DEBUG, "dir_open %s", full_rep); if (!(dir = opendir(full_rep))) { yaz_log(YLOG_WARN|YLOG_ERRNO, "opendir %s", rep); return NULL; } entry = (struct dir_entry *) xmalloc(sizeof(*entry) * entry_max); strcpy(path, rep); pathpos = strlen(path); if (!pathpos || path[pathpos-1] != '/') path[pathpos++] = '/'; while ( (dent = readdir(dir)) ) { struct stat finfo; if (strcmp(dent->d_name, ".") == 0 || strcmp(dent->d_name, "..") == 0) continue; if (idx == entry_max-1) { struct dir_entry *entry_n; entry_n = (struct dir_entry *) xmalloc(sizeof(*entry) * (entry_max += 1000)); memcpy(entry_n, entry, idx * sizeof(*entry)); xfree(entry); entry = entry_n; } strcpy(path + pathpos, dent->d_name); if (base && !yaz_is_abspath(path)) { strcpy(full_rep, base); strcat(full_rep, "/"); strcat(full_rep, path); zebra_file_stat(full_rep, &finfo, follow_links); } else zebra_file_stat(path, &finfo, follow_links); switch (finfo.st_mode & S_IFMT) { case S_IFREG: entry[idx].kind = dirs_file; entry[idx].mtime = finfo.st_mtime; entry[idx].name = (char *) xmalloc(strlen(dent->d_name)+1); strcpy(entry[idx].name, dent->d_name); idx++; break; case S_IFDIR: entry[idx].kind = dirs_dir; entry[idx].mtime = finfo.st_mtime; entry[idx].name = (char *) xmalloc(strlen(dent->d_name)+2); strcpy(entry[idx].name, dent->d_name); strcat(entry[idx].name, "/"); idx++; break; } } entry[idx].name = NULL; closedir(dir); yaz_log(YLOG_DEBUG, "dir_close"); return entry; } static int dir_cmp(const void *p1, const void *p2) { return strcmp(((struct dir_entry *) p1)->name, ((struct dir_entry *) p2)->name); } void dir_sort(struct dir_entry *e) { size_t nmemb = 0; while (e[nmemb].name) nmemb++; qsort(e, nmemb, sizeof(*e), dir_cmp); } void dir_free(struct dir_entry **e_p) { size_t i = 0; struct dir_entry *e = *e_p; assert(e); while (e[i].name) xfree(e[i++].name); xfree(e); *e_p = NULL; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/mod_text.c0000644000175000017500000001415211412332551013240 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include struct filter_info { char *sep; }; static void *filter_init(Res res, RecType recType) { struct filter_info *tinfo = (struct filter_info *) xmalloc(sizeof(*tinfo)); tinfo->sep = 0; return tinfo; } static ZEBRA_RES filter_config(void *clientData, Res res, const char *args) { struct filter_info *tinfo = (struct filter_info*) clientData; xfree(tinfo->sep); tinfo->sep = 0; if (args && *args) tinfo->sep = xstrdup(args); return ZEBRA_OK; } static void filter_destroy(void *clientData) { struct filter_info *tinfo = clientData; xfree(tinfo->sep); xfree(tinfo); } struct buf_info { struct recExtractCtrl *p; char *buf; int offset; int max; }; static struct buf_info *buf_open(struct recExtractCtrl *p) { struct buf_info *fi = (struct buf_info *) xmalloc(sizeof(*fi)); fi->p = p; fi->buf = (char *) xmalloc(4096); fi->offset = 1; fi->max = 1; return fi; } static int buf_getchar(struct filter_info *tinfo, struct buf_info *fi, char *dst) { if (fi->offset >= fi->max) { if (fi->max <= 0) return 0; fi->max = fi->p->stream->readf(fi->p->stream, fi->buf, 4096); fi->offset = 0; if (fi->max <= 0) return 0; } *dst = fi->buf[(fi->offset)++]; if (tinfo->sep && *dst == *tinfo->sep) { off_t off = fi->p->stream->tellf(fi->p->stream); off_t end_offset = off - (fi->max - fi->offset); fi->p->stream->endf(fi->p->stream, &end_offset); return 0; } return 1; } static void buf_close(struct buf_info *fi) { xfree(fi->buf); xfree(fi); } static int filter_extract(void *clientData, struct recExtractCtrl *p) { struct filter_info *tinfo = clientData; char w[512]; RecWord recWord; int r; struct buf_info *fi = buf_open(p); int no_read = 0; #if 0 yaz_log(YLOG_LOG, "filter_extract off=%ld", (long) (*fi->p->tellf)(fi->p->fh)); #endif (*p->init)(p, &recWord); do { int i = 0; r = buf_getchar(tinfo, fi, w); while (r > 0 && i < 511 && w[i] != '\n' && w[i] != '\r') { i++; r = buf_getchar(tinfo, fi, w + i); } if (i) { no_read += i; recWord.term_buf = w; recWord.term_len = i; (*p->tokenAdd)(&recWord); } } while (r > 0); buf_close(fi); if (no_read == 0) return RECCTRL_EXTRACT_EOF; return RECCTRL_EXTRACT_OK; } static int filter_retrieve(void *clientData, struct recRetrieveCtrl *p) { int r, filter_ptr = 0; static char *filter_buf = NULL; static int filter_size = 0; int make_header = 1; int make_body = 1; const char *elementSetName = NULL; int no_lines = 0; if (p->comp && p->comp->which == Z_RecordComp_simple && p->comp->u.simple->which == Z_ElementSetNames_generic) elementSetName = p->comp->u.simple->u.generic; if (elementSetName) { /* don't make header for the R(aw) element set name */ if (!strcmp(elementSetName, "R")) { make_header = 0; make_body = 1; } /* only make header for the H(eader) element set name */ else if (!strcmp(elementSetName, "H")) { make_header = 1; make_body = 0; } } while (1) { if (filter_ptr + 4096 >= filter_size) { char *nb; filter_size = 2*filter_size + 8192; nb = (char *) xmalloc(filter_size); if (filter_buf) { memcpy(nb, filter_buf, filter_ptr); xfree(filter_buf); } filter_buf = nb; } if (make_header && filter_ptr == 0) { if (p->score >= 0) { sprintf(filter_buf, "Rank: %d\n", p->score); filter_ptr = strlen(filter_buf); } sprintf(filter_buf + filter_ptr, "Local Number: " ZINT_FORMAT "\n", p->localno); filter_ptr = strlen(filter_buf); if (p->fname) { sprintf(filter_buf + filter_ptr, "Filename: %s\n", p->fname); filter_ptr = strlen(filter_buf); } strcpy(filter_buf+filter_ptr++, "\n"); } if (!make_body) break; r = p->stream->readf(p->stream, filter_buf + filter_ptr, 4096); if (r <= 0) break; filter_ptr += r; } filter_buf[filter_ptr] = '\0'; if (elementSetName) { if (!strcmp(elementSetName, "B")) no_lines = 4; if (!strcmp(elementSetName, "M")) no_lines = 20; } if (no_lines) { char *p = filter_buf; int i = 0; while (++i <= no_lines && (p = strchr(p, '\n'))) p++; if (p) { p[1] = '\0'; filter_ptr = p-filter_buf; } } p->output_format = yaz_oid_recsyn_sutrs; p->rec_buf = filter_buf; p->rec_len = filter_ptr; return 0; } static struct recType filter_type = { 0, "text", filter_init, filter_config, filter_destroy, filter_extract, filter_retrieve }; RecType #ifdef IDZEBRA_STATIC_TEXT idzebra_filter_text #else idzebra_filter #endif [] = { &filter_type, 0, }; /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/mod_grs_regx.c0000644000175000017500000014616311412332551014104 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #if HAVE_TCL_H #include #if MAJOR_VERSION >= 8 #define HAVE_TCL_OBJECTS #endif #endif #define REGX_DEBUG 0 #define F_WIN_EOF 2000000000 #define F_WIN_READ 1 #define REGX_EOF 0 #define REGX_PATTERN 1 #define REGX_BODY 2 #define REGX_BEGIN 3 #define REGX_END 4 #define REGX_CODE 5 #define REGX_CONTEXT 6 #define REGX_INIT 7 struct regxCode { char *str; #if HAVE_TCL_OBJECTS Tcl_Obj *tcl_obj; #endif }; struct lexRuleAction { int which; union { struct { struct DFA *dfa; /* REGX_PATTERN */ int body; } pattern; struct regxCode *code; /* REGX_CODE */ } u; struct lexRuleAction *next; }; struct lexRuleInfo { int no; struct lexRuleAction *actionList; }; struct lexRule { struct lexRuleInfo info; struct lexRule *next; }; struct lexContext { char *name; struct DFA *dfa; struct lexRule *rules; struct lexRuleInfo **fastRule; int ruleNo; int initFlag; struct lexRuleAction *beginActionList; struct lexRuleAction *endActionList; struct lexRuleAction *initActionList; struct lexContext *next; }; struct lexConcatBuf { int max; char *buf; }; struct lexSpec { char *name; struct lexContext *context; struct lexContext **context_stack; int context_stack_size; int context_stack_top; int lineNo; NMEM m; data1_handle dh; #if HAVE_TCL_H Tcl_Interp *tcl_interp; #endif struct ZebraRecStream *stream; off_t (*f_win_ef)(struct ZebraRecStream *s, off_t *); int f_win_start; /* first byte of buffer is this file offset */ int f_win_end; /* last byte of buffer is this offset - 1 */ int f_win_size; /* size of buffer */ char *f_win_buf; /* buffer itself */ int (*f_win_rf)(struct ZebraRecStream *, char *, size_t); off_t (*f_win_sf)(struct ZebraRecStream *, off_t); struct lexConcatBuf *concatBuf; int maxLevel; data1_node **d1_stack; int d1_level; int stop_flag; int *arg_start; int *arg_end; int arg_no; int ptr; }; struct lexSpecs { struct lexSpec *spec; char type[256]; }; static char *f_win_get (struct lexSpec *spec, off_t start_pos, off_t end_pos, int *size) { int i, r, off = start_pos - spec->f_win_start; if (off >= 0 && end_pos <= spec->f_win_end) { *size = end_pos - start_pos; return spec->f_win_buf + off; } if (off < 0 || start_pos >= spec->f_win_end) { (*spec->f_win_sf)(spec->stream, start_pos); spec->f_win_start = start_pos; if (!spec->f_win_buf) spec->f_win_buf = (char *) xmalloc (spec->f_win_size); *size = (*spec->f_win_rf)(spec->stream, spec->f_win_buf, spec->f_win_size); spec->f_win_end = spec->f_win_start + *size; if (*size > end_pos - start_pos) *size = end_pos - start_pos; return spec->f_win_buf; } for (i = 0; if_win_end - start_pos; i++) spec->f_win_buf[i] = spec->f_win_buf[i + off]; r = (*spec->f_win_rf)(spec->stream, spec->f_win_buf + i, spec->f_win_size - i); spec->f_win_start = start_pos; spec->f_win_end += r; *size = i + r; if (*size > end_pos - start_pos) *size = end_pos - start_pos; return spec->f_win_buf; } static int f_win_advance (struct lexSpec *spec, int *pos) { int size; char *buf; if (*pos >= spec->f_win_start && *pos < spec->f_win_end) return spec->f_win_buf[(*pos)++ - spec->f_win_start]; if (*pos == F_WIN_EOF) return 0; buf = f_win_get (spec, *pos, *pos+1, &size); if (size == 1) { (*pos)++; return *buf; } *pos = F_WIN_EOF; return 0; } static void regxCodeDel (struct regxCode **pp) { struct regxCode *p = *pp; if (p) { #if HAVE_TCL_OBJECTS if (p->tcl_obj) Tcl_DecrRefCount (p->tcl_obj); #endif xfree (p->str); xfree (p); *pp = NULL; } } static void regxCodeMk (struct regxCode **pp, const char *buf, int len) { struct regxCode *p; p = (struct regxCode *) xmalloc (sizeof(*p)); p->str = (char *) xmalloc (len+1); memcpy (p->str, buf, len); p->str[len] = '\0'; #if HAVE_TCL_OBJECTS p->tcl_obj = Tcl_NewStringObj ((char *) buf, len); if (p->tcl_obj) Tcl_IncrRefCount (p->tcl_obj); #endif *pp = p; } static struct DFA *lexSpecDFA (void) { struct DFA *dfa; dfa = dfa_init (); dfa_parse_cmap_del (dfa, ' '); dfa_parse_cmap_del (dfa, '\t'); dfa_parse_cmap_add (dfa, '/', 0); return dfa; } static void actionListDel (struct lexRuleAction **rap) { struct lexRuleAction *ra1, *ra; for (ra = *rap; ra; ra = ra1) { ra1 = ra->next; switch (ra->which) { case REGX_PATTERN: dfa_delete (&ra->u.pattern.dfa); break; case REGX_CODE: regxCodeDel (&ra->u.code); break; } xfree (ra); } *rap = NULL; } static struct lexContext *lexContextCreate (const char *name) { struct lexContext *p = (struct lexContext *) xmalloc (sizeof(*p)); p->name = xstrdup (name); p->ruleNo = 1; p->initFlag = 0; p->dfa = lexSpecDFA (); p->rules = NULL; p->fastRule = NULL; p->beginActionList = NULL; p->endActionList = NULL; p->initActionList = NULL; p->next = NULL; return p; } static void lexContextDestroy (struct lexContext *p) { struct lexRule *rp, *rp1; dfa_delete (&p->dfa); xfree (p->fastRule); for (rp = p->rules; rp; rp = rp1) { rp1 = rp->next; actionListDel (&rp->info.actionList); xfree (rp); } actionListDel (&p->beginActionList); actionListDel (&p->endActionList); actionListDel (&p->initActionList); xfree (p->name); xfree (p); } static struct lexSpec *lexSpecCreate (const char *name, data1_handle dh) { struct lexSpec *p; int i; p = (struct lexSpec *) xmalloc (sizeof(*p)); p->name = (char *) xmalloc (strlen(name)+1); strcpy (p->name, name); #if HAVE_TCL_H p->tcl_interp = 0; #endif p->dh = dh; p->context = NULL; p->context_stack_size = 100; p->context_stack = (struct lexContext **) xmalloc (sizeof(*p->context_stack) * p->context_stack_size); p->f_win_buf = NULL; p->maxLevel = 128; p->concatBuf = (struct lexConcatBuf *) xmalloc (sizeof(*p->concatBuf) * p->maxLevel); for (i = 0; i < p->maxLevel; i++) { p->concatBuf[i].max = 0; p->concatBuf[i].buf = 0; } p->d1_stack = (data1_node **) xmalloc (sizeof(*p->d1_stack) * p->maxLevel); p->d1_level = 0; return p; } static void lexSpecDestroy (struct lexSpec **pp) { struct lexSpec *p; struct lexContext *lt; int i; assert (pp); p = *pp; if (!p) return ; for (i = 0; i < p->maxLevel; i++) xfree (p->concatBuf[i].buf); xfree (p->concatBuf); lt = p->context; while (lt) { struct lexContext *lt_next = lt->next; lexContextDestroy (lt); lt = lt_next; } #if HAVE_TCL_OBJECTS if (p->tcl_interp) Tcl_DeleteInterp (p->tcl_interp); #endif xfree (p->name); xfree (p->f_win_buf); xfree (p->context_stack); xfree (p->d1_stack); xfree (p); *pp = NULL; } static int readParseToken (const char **cpp, int *len) { const char *cp = *cpp; char cmd[32]; int i, level; while (*cp == ' ' || *cp == '\t' || *cp == '\n' || *cp == '\r') cp++; switch (*cp) { case '\0': return 0; case '/': *cpp = cp+1; return REGX_PATTERN; case '{': *cpp = cp+1; level = 1; while (*++cp) { if (*cp == '{') level++; else if (*cp == '}') { level--; if (level == 0) break; } } *len = cp - *cpp; return REGX_CODE; default: i = 0; while (1) { if (*cp >= 'a' && *cp <= 'z') cmd[i] = *cp; else if (*cp >= 'A' && *cp <= 'Z') cmd[i] = *cp + 'a' - 'A'; else break; if (i < (int) sizeof(cmd)-2) i++; cp++; } cmd[i] = '\0'; if (i == 0) { yaz_log (YLOG_WARN, "bad character %d %c", *cp, *cp); cp++; while (*cp && *cp != ' ' && *cp != '\t' && *cp != '\n' && *cp != '\r') cp++; *cpp = cp; return 0; } *cpp = cp; if (!strcmp (cmd, "begin")) return REGX_BEGIN; else if (!strcmp (cmd, "end")) return REGX_END; else if (!strcmp (cmd, "body")) return REGX_BODY; else if (!strcmp (cmd, "context")) return REGX_CONTEXT; else if (!strcmp (cmd, "init")) return REGX_INIT; else { yaz_log (YLOG_WARN, "bad command %s", cmd); return 0; } } } static int actionListMk (struct lexSpec *spec, const char *s, struct lexRuleAction **ap) { int r, tok, len; int bodyMark = 0; const char *s0; while ((tok = readParseToken (&s, &len))) { switch (tok) { case REGX_BODY: bodyMark = 1; continue; case REGX_CODE: *ap = (struct lexRuleAction *) xmalloc (sizeof(**ap)); (*ap)->which = tok; regxCodeMk (&(*ap)->u.code, s, len); s += len+1; break; case REGX_PATTERN: *ap = (struct lexRuleAction *) xmalloc (sizeof(**ap)); (*ap)->which = tok; (*ap)->u.pattern.body = bodyMark; bodyMark = 0; (*ap)->u.pattern.dfa = lexSpecDFA (); s0 = s; r = dfa_parse ((*ap)->u.pattern.dfa, &s); if (r || *s != '/') { int pos = s - s0; xfree (*ap); *ap = NULL; yaz_log(YLOG_WARN, "regular expression error '%.*s'", pos, s0); return -1; } else { int pos = s - s0; if (debug_dfa_tran) printf("pattern: %.*s\n", pos, s0); dfa_mkstate((*ap)->u.pattern.dfa); s++; } break; case REGX_BEGIN: yaz_log (YLOG_WARN, "cannot use BEGIN here"); continue; case REGX_INIT: yaz_log (YLOG_WARN, "cannot use INIT here"); continue; case REGX_END: *ap = (struct lexRuleAction *) xmalloc (sizeof(**ap)); (*ap)->which = tok; break; } ap = &(*ap)->next; } *ap = NULL; return 0; } int readOneSpec (struct lexSpec *spec, const char *s) { int len, r, tok; struct lexRule *rp; struct lexContext *lc; tok = readParseToken (&s, &len); if (tok == REGX_CONTEXT) { char context_name[32]; tok = readParseToken (&s, &len); if (tok != REGX_CODE) { yaz_log (YLOG_WARN, "missing name after CONTEXT keyword"); return 0; } if (len > 31) len = 31; memcpy (context_name, s, len); context_name[len] = '\0'; lc = lexContextCreate (context_name); lc->next = spec->context; spec->context = lc; return 0; } if (!spec->context) spec->context = lexContextCreate ("main"); switch (tok) { case REGX_BEGIN: actionListDel (&spec->context->beginActionList); actionListMk (spec, s, &spec->context->beginActionList); break; case REGX_END: actionListDel (&spec->context->endActionList); actionListMk (spec, s, &spec->context->endActionList); break; case REGX_INIT: actionListDel (&spec->context->initActionList); actionListMk (spec, s, &spec->context->initActionList); break; case REGX_PATTERN: #if REGX_DEBUG yaz_log (YLOG_LOG, "rule %d %s", spec->context->ruleNo, s); #endif r = dfa_parse (spec->context->dfa, &s); if (r) { yaz_log (YLOG_WARN, "regular expression error. r=%d", r); return -1; } if (*s != '/') { yaz_log (YLOG_WARN, "expects / at end of pattern. got %c", *s); return -1; } s++; rp = (struct lexRule *) xmalloc (sizeof(*rp)); rp->info.no = spec->context->ruleNo++; rp->next = spec->context->rules; spec->context->rules = rp; actionListMk (spec, s, &rp->info.actionList); } return 0; } int readFileSpec (struct lexSpec *spec) { struct lexContext *lc; int c, i, errors = 0; FILE *spec_inf = 0; WRBUF lineBuf; char fname[256]; #if HAVE_TCL_H if (spec->tcl_interp) { sprintf (fname, "%s.tflt", spec->name); spec_inf = data1_path_fopen (spec->dh, fname, "r"); } #endif if (!spec_inf) { sprintf (fname, "%s.flt", spec->name); spec_inf = data1_path_fopen (spec->dh, fname, "r"); } if (!spec_inf) { yaz_log (YLOG_ERRNO|YLOG_WARN, "cannot read spec file %s", spec->name); return -1; } yaz_log (YLOG_LOG, "reading regx filter %s", fname); #if HAVE_TCL_H if (spec->tcl_interp) yaz_log (YLOG_LOG, "Tcl enabled"); #endif #if 0 debug_dfa_trav = 0; debug_dfa_tran = 1; debug_dfa_followpos = 0; dfa_verbose = 1; #endif lineBuf = wrbuf_alloc(); spec->lineNo = 0; c = getc (spec_inf); while (c != EOF) { wrbuf_rewind (lineBuf); if (c == '#' || c == '\n' || c == ' ' || c == '\t' || c == '\r') { while (c != '\n' && c != EOF) c = getc (spec_inf); spec->lineNo++; if (c == '\n') c = getc (spec_inf); } else { int addLine = 0; while (1) { int c1 = c; wrbuf_putc(lineBuf, c); c = getc (spec_inf); while (c == '\r') c = getc (spec_inf); if (c == EOF) break; if (c1 == '\n') { if (c != ' ' && c != '\t') break; addLine++; } } wrbuf_putc(lineBuf, '\0'); readOneSpec (spec, wrbuf_buf(lineBuf)); spec->lineNo += addLine; } } fclose (spec_inf); wrbuf_destroy(lineBuf); for (lc = spec->context; lc; lc = lc->next) { struct lexRule *rp; lc->fastRule = (struct lexRuleInfo **) xmalloc (sizeof(*lc->fastRule) * lc->ruleNo); for (i = 0; i < lc->ruleNo; i++) lc->fastRule[i] = NULL; for (rp = lc->rules; rp; rp = rp->next) lc->fastRule[rp->info.no] = &rp->info; dfa_mkstate (lc->dfa); } if (errors) return -1; return 0; } #if 0 static struct lexSpec *curLexSpec = NULL; #endif static void execData (struct lexSpec *spec, const char *ebuf, int elen, int formatted_text, const char *attribute_str, int attribute_len) { struct data1_node *res, *parent; int org_len; if (elen == 0) /* shouldn't happen, but it does! */ return ; #if REGX_DEBUG if (elen > 80) yaz_log (YLOG_LOG, "data(%d bytes) %.40s ... %.*s", elen, ebuf, 40, ebuf + elen-40); else if (elen == 1 && ebuf[0] == '\n') { yaz_log (YLOG_LOG, "data(new line)"); } else if (elen > 0) yaz_log (YLOG_LOG, "data(%d bytes) %.*s", elen, elen, ebuf); else yaz_log (YLOG_LOG, "data(%d bytes)", elen); #endif if (spec->d1_level <= 1) return; parent = spec->d1_stack[spec->d1_level -1]; assert (parent); if (attribute_str) { data1_xattr **ap; res = parent; if (res->which != DATA1N_tag) return; /* sweep through exising attributes.. */ for (ap = &res->u.tag.attributes; *ap; ap = &(*ap)->next) if (strlen((*ap)->name) == attribute_len && !memcmp((*ap)->name, attribute_str, attribute_len)) break; if (!*ap) { /* new attribute. Create it with name + value */ *ap = nmem_malloc(spec->m, sizeof(**ap)); (*ap)->name = nmem_malloc(spec->m, attribute_len+1); memcpy((*ap)->name, attribute_str, attribute_len); (*ap)->name[attribute_len] = '\0'; (*ap)->value = nmem_malloc(spec->m, elen+1); memcpy((*ap)->value, ebuf, elen); (*ap)->value[elen] = '\0'; (*ap)->next = 0; } else { /* append to value if attribute already exists */ char *nv = nmem_malloc(spec->m, elen + 1 + strlen((*ap)->value)); strcpy(nv, (*ap)->value); memcpy (nv + strlen(nv), ebuf, elen); nv[strlen(nv)+elen] = '\0'; (*ap)->value = nv; } } else { if ((res = spec->d1_stack[spec->d1_level]) && res->which == DATA1N_data) org_len = res->u.data.len; else { org_len = 0; res = data1_mk_node2 (spec->dh, spec->m, DATA1N_data, parent); res->u.data.what = DATA1I_text; res->u.data.len = 0; res->u.data.formatted_text = formatted_text; res->u.data.data = 0; if (spec->d1_stack[spec->d1_level]) spec->d1_stack[spec->d1_level]->next = res; spec->d1_stack[spec->d1_level] = res; } if (org_len + elen >= spec->concatBuf[spec->d1_level].max) { char *old_buf, *new_buf; spec->concatBuf[spec->d1_level].max = org_len + elen + 256; new_buf = (char *) xmalloc (spec->concatBuf[spec->d1_level].max); if ((old_buf = spec->concatBuf[spec->d1_level].buf)) { memcpy (new_buf, old_buf, org_len); xfree (old_buf); } spec->concatBuf[spec->d1_level].buf = new_buf; } memcpy (spec->concatBuf[spec->d1_level].buf + org_len, ebuf, elen); res->u.data.len += elen; } } static void execDataP (struct lexSpec *spec, const char *ebuf, int elen, int formatted_text) { execData (spec, ebuf, elen, formatted_text, 0, 0); } static void tagDataRelease (struct lexSpec *spec) { data1_node *res; if ((res = spec->d1_stack[spec->d1_level]) && res->which == DATA1N_data && res->u.data.what == DATA1I_text) { assert (!res->u.data.data); assert (res->u.data.len > 0); if (res->u.data.len > DATA1_LOCALDATA) res->u.data.data = (char *) nmem_malloc (spec->m, res->u.data.len); else res->u.data.data = res->lbuf; memcpy (res->u.data.data, spec->concatBuf[spec->d1_level].buf, res->u.data.len); } } static void variantBegin (struct lexSpec *spec, const char *class_str, int class_len, const char *type_str, int type_len, const char *value_str, int value_len) { struct data1_node *parent = spec->d1_stack[spec->d1_level -1]; char tclass[DATA1_MAX_SYMBOL], ttype[DATA1_MAX_SYMBOL]; data1_vartype *tp; int i; data1_node *res; if (spec->d1_level == 0) { yaz_log (YLOG_WARN, "in variant begin. No record type defined"); return ; } if (class_len >= DATA1_MAX_SYMBOL) class_len = DATA1_MAX_SYMBOL-1; memcpy (tclass, class_str, class_len); tclass[class_len] = '\0'; if (type_len >= DATA1_MAX_SYMBOL) type_len = DATA1_MAX_SYMBOL-1; memcpy (ttype, type_str, type_len); ttype[type_len] = '\0'; #if REGX_DEBUG yaz_log (YLOG_LOG, "variant begin(%s,%s,%d)", tclass, ttype, spec->d1_level); #endif if (!(tp = data1_getvartypeby_absyn(spec->dh, parent->root->u.root.absyn, tclass, ttype))) return; if (parent->which != DATA1N_variant) { res = data1_mk_node2 (spec->dh, spec->m, DATA1N_variant, parent); if (spec->d1_stack[spec->d1_level]) tagDataRelease (spec); spec->d1_stack[spec->d1_level] = res; spec->d1_stack[++(spec->d1_level)] = NULL; } for (i = spec->d1_level-1; spec->d1_stack[i]->which == DATA1N_variant; i--) if (spec->d1_stack[i]->u.variant.type == tp) { spec->d1_level = i; break; } #if REGX_DEBUG yaz_log (YLOG_LOG, "variant node(%d)", spec->d1_level); #endif parent = spec->d1_stack[spec->d1_level-1]; res = data1_mk_node2 (spec->dh, spec->m, DATA1N_variant, parent); res->u.variant.type = tp; if (value_len >= DATA1_LOCALDATA) value_len =DATA1_LOCALDATA-1; memcpy (res->lbuf, value_str, value_len); res->lbuf[value_len] = '\0'; res->u.variant.value = res->lbuf; if (spec->d1_stack[spec->d1_level]) tagDataRelease (spec); spec->d1_stack[spec->d1_level] = res; spec->d1_stack[++(spec->d1_level)] = NULL; } static void tagStrip (const char **tag, int *len) { int i; for (i = *len; i > 0 && isspace((*tag)[i-1]); --i) ; *len = i; for (i = 0; i < *len && isspace((*tag)[i]); i++) ; *tag += i; *len -= i; } static void tagBegin (struct lexSpec *spec, const char *tag, int len) { if (spec->d1_level == 0) { yaz_log (YLOG_WARN, "in element begin. No record type defined"); return ; } tagStrip (&tag, &len); if (spec->d1_stack[spec->d1_level]) tagDataRelease (spec); #if REGX_DEBUG yaz_log (YLOG_LOG, "begin tag(%.*s, %d)", len, tag, spec->d1_level); #endif spec->d1_stack[spec->d1_level] = data1_mk_tag_n ( spec->dh, spec->m, tag, len, 0, spec->d1_stack[spec->d1_level -1]); spec->d1_stack[++(spec->d1_level)] = NULL; } static void tagEnd (struct lexSpec *spec, int min_level, const char *tag, int len) { tagStrip (&tag, &len); while (spec->d1_level > min_level) { tagDataRelease (spec); (spec->d1_level)--; if (spec->d1_level == 0) break; if ((spec->d1_stack[spec->d1_level]->which == DATA1N_tag) && (!tag || (strlen(spec->d1_stack[spec->d1_level]->u.tag.tag) == (size_t) len && !memcmp (spec->d1_stack[spec->d1_level]->u.tag.tag, tag, len)))) break; } #if REGX_DEBUG yaz_log (YLOG_LOG, "end tag(%d)", spec->d1_level); #endif } static int tryMatch (struct lexSpec *spec, int *pptr, int *mptr, struct DFA *dfa, int greedy) { struct DFA_state *state = dfa->states[0]; struct DFA_tran *t; unsigned char c = 0; unsigned char c_prev = 0; int ptr = *pptr; /* current pointer */ int start_ptr = *pptr; /* first char of match */ int last_ptr = 0; /* last char of match */ int last_rule = 0; /* rule number of current match */ int restore_ptr = 0; int i; if (ptr) { --ptr; c = f_win_advance (spec, &ptr); } while (1) { if (dfa->states[0] == state) { c_prev = c; restore_ptr = ptr; } c = f_win_advance (spec, &ptr); if (ptr == F_WIN_EOF) { if (last_rule) { *mptr = start_ptr; *pptr = last_ptr; return 1; } break; } t = state->trans; i = state->tran_no; while (1) if (--i < 0) /* no transition for character c */ { if (last_rule) { *mptr = start_ptr; /* match starts here */ *pptr = last_ptr; /* match end here (+1) */ return 1; } state = dfa->states[0]; ptr = restore_ptr; c = f_win_advance (spec, &ptr); start_ptr = ptr; break; } else if (c >= t->ch[0] && c <= t->ch[1]) { state = dfa->states[t->to]; if (state->rule_no && c_prev == '\n') { last_rule = state->rule_no; last_ptr = ptr; } else if (state->rule_nno) { last_rule = state->rule_nno; last_ptr = ptr; } break; } else t++; } return 0; } static int execTok (struct lexSpec *spec, const char **src, const char **tokBuf, int *tokLen) { const char *s = *src; while (*s == ' ' || *s == '\t') s++; if (!*s) return 0; if (*s == '$' && s[1] >= '0' && s[1] <= '9') { int n = 0; s++; while (*s >= '0' && *s <= '9') n = n*10 + (*s++ -'0'); if (spec->arg_no == 0) { *tokBuf = ""; *tokLen = 0; } else { if (n >= spec->arg_no) n = spec->arg_no-1; *tokBuf = f_win_get (spec, spec->arg_start[n], spec->arg_end[n], tokLen); } } else if (*s == '\"') { *tokBuf = ++s; while (*s && *s != '\"') s++; *tokLen = s - *tokBuf; if (*s) s++; *src = s; } else if (*s == '\n' || *s == ';') { *src = s+1; return 1; } else if (*s == '-') { *tokBuf = s++; while (*s && *s != ' ' && *s != '\t' && *s != '\n' && *s != '\r' && *s != ';') s++; *tokLen = s - *tokBuf; *src = s; return 3; } else { *tokBuf = s++; while (*s && *s != ' ' && *s != '\t' && *s != '\n' && *s != '\r' && *s != ';') s++; *tokLen = s - *tokBuf; } *src = s; return 2; } static char *regxStrz (const char *src, int len, char *str) { if (len > 63) len = 63; memcpy (str, src, len); str[len] = '\0'; return str; } #if HAVE_TCL_H static int cmd_tcl_begin (ClientData clientData, Tcl_Interp *interp, int argc, const char **argv) { struct lexSpec *spec = (struct lexSpec *) clientData; if (argc < 2) return TCL_ERROR; if (!strcmp(argv[1], "record") && argc == 3) { const char *absynName = argv[2]; data1_node *res; #if REGX_DEBUG yaz_log (YLOG_LOG, "begin record %s", absynName); #endif res = data1_mk_root (spec->dh, spec->m, absynName); spec->d1_level = 0; spec->d1_stack[spec->d1_level++] = res; res = data1_mk_tag (spec->dh, spec->m, absynName, 0, res); spec->d1_stack[spec->d1_level++] = res; spec->d1_stack[spec->d1_level] = NULL; } else if (!strcmp(argv[1], "element") && argc == 3) { tagBegin (spec, argv[2], strlen(argv[2])); } else if (!strcmp (argv[1], "variant") && argc == 5) { variantBegin (spec, argv[2], strlen(argv[2]), argv[3], strlen(argv[3]), argv[4], strlen(argv[4])); } else if (!strcmp (argv[1], "context") && argc == 3) { struct lexContext *lc = spec->context; #if REGX_DEBUG yaz_log (YLOG_LOG, "begin context %s",argv[2]); #endif while (lc && strcmp (argv[2], lc->name)) lc = lc->next; if (lc) { spec->context_stack[++(spec->context_stack_top)] = lc; } else yaz_log (YLOG_WARN, "unknown context %s", argv[2]); } else return TCL_ERROR; return TCL_OK; } static int cmd_tcl_end (ClientData clientData, Tcl_Interp *interp, int argc, const char **argv) { struct lexSpec *spec = (struct lexSpec *) clientData; if (argc < 2) return TCL_ERROR; if (!strcmp (argv[1], "record")) { while (spec->d1_level) { tagDataRelease (spec); (spec->d1_level)--; } #if REGX_DEBUG yaz_log (YLOG_LOG, "end record"); #endif spec->stop_flag = 1; } else if (!strcmp (argv[1], "element")) { int min_level = 2; const char *element = 0; if (argc >= 3 && !strcmp(argv[2], "-record")) { min_level = 0; if (argc == 4) element = argv[3]; } else if (argc == 3) element = argv[2]; tagEnd (spec, min_level, element, (element ? strlen(element) : 0)); if (spec->d1_level <= 1) { #if REGX_DEBUG yaz_log (YLOG_LOG, "end element end records"); #endif spec->stop_flag = 1; } } else if (!strcmp (argv[1], "context")) { #if REGX_DEBUG yaz_log (YLOG_LOG, "end context"); #endif if (spec->context_stack_top) (spec->context_stack_top)--; } else return TCL_ERROR; return TCL_OK; } static int cmd_tcl_data (ClientData clientData, Tcl_Interp *interp, int argc, const char **argv) { int argi = 1; int textFlag = 0; const char *element = 0; const char *attribute = 0; struct lexSpec *spec = (struct lexSpec *) clientData; while (argi < argc) { if (!strcmp("-text", argv[argi])) { textFlag = 1; argi++; } else if (!strcmp("-element", argv[argi])) { argi++; if (argi < argc) element = argv[argi++]; } else if (!strcmp("-attribute", argv[argi])) { argi++; if (argi < argc) attribute = argv[argi++]; } else break; } if (element) tagBegin (spec, element, strlen(element)); while (argi < argc) { #if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION > 0) Tcl_DString ds; char *native = Tcl_UtfToExternalDString(0, argv[argi], -1, &ds); execData (spec, native, strlen(native), textFlag, attribute, attribute ? strlen(attribute) : 0); Tcl_DStringFree (&ds); #else execData (spec, argv[argi], strlen(argv[argi]), textFlag, attribute, attribute ? strlen(attribute) : 0); #endif argi++; } if (element) tagEnd (spec, 2, NULL, 0); return TCL_OK; } static int cmd_tcl_unread (ClientData clientData, Tcl_Interp *interp, int argc, const char **argv) { struct lexSpec *spec = (struct lexSpec *) clientData; int argi = 1; int offset = 0; int no; while (argi < argc) { if (!strcmp("-offset", argv[argi])) { argi++; if (argi < argc) { offset = atoi(argv[argi]); argi++; } } else break; } if (argi != argc-1) return TCL_ERROR; no = atoi(argv[argi]); if (no >= spec->arg_no) no = spec->arg_no - 1; spec->ptr = spec->arg_start[no] + offset; return TCL_OK; } static void execTcl (struct lexSpec *spec, struct regxCode *code) { int i; int ret; for (i = 0; i < spec->arg_no; i++) { char var_name[10], *var_buf; int var_len, ch; sprintf (var_name, "%d", i); var_buf = f_win_get (spec, spec->arg_start[i], spec->arg_end[i], &var_len); if (var_buf) { ch = var_buf[var_len]; var_buf[var_len] = '\0'; Tcl_SetVar (spec->tcl_interp, var_name, var_buf, 0); var_buf[var_len] = ch; } } #if HAVE_TCL_OBJECTS ret = Tcl_GlobalEvalObj(spec->tcl_interp, code->tcl_obj); #else ret = Tcl_GlobalEval (spec->tcl_interp, code->str); #endif if (ret != TCL_OK) { const char *err = Tcl_GetVar(spec->tcl_interp, "errorInfo", 0); yaz_log(YLOG_FATAL, "Tcl error, line=%d, \"%s\"\n%s", spec->tcl_interp->errorLine, spec->tcl_interp->result, err ? err : "[NO ERRORINFO]"); } } /* HAVE_TCL_H */ #endif static void execCode (struct lexSpec *spec, struct regxCode *code) { const char *s = code->str; int cmd_len, r; const char *cmd_str; r = execTok (spec, &s, &cmd_str, &cmd_len); while (r) { char *p, ptmp[64]; if (r == 1) { r = execTok (spec, &s, &cmd_str, &cmd_len); continue; } p = regxStrz (cmd_str, cmd_len, ptmp); if (!strcmp (p, "begin")) { r = execTok (spec, &s, &cmd_str, &cmd_len); if (r < 2) { yaz_log (YLOG_WARN, "missing keyword after 'begin'"); continue; } p = regxStrz (cmd_str, cmd_len, ptmp); if (!strcmp (p, "record")) { r = execTok (spec, &s, &cmd_str, &cmd_len); if (r < 2) continue; if (spec->d1_level <= 1) { static char absynName[64]; data1_node *res; if (cmd_len > 63) cmd_len = 63; memcpy (absynName, cmd_str, cmd_len); absynName[cmd_len] = '\0'; #if REGX_DEBUG yaz_log (YLOG_LOG, "begin record %s", absynName); #endif res = data1_mk_root (spec->dh, spec->m, absynName); spec->d1_level = 0; spec->d1_stack[spec->d1_level++] = res; res = data1_mk_tag (spec->dh, spec->m, absynName, 0, res); spec->d1_stack[spec->d1_level++] = res; spec->d1_stack[spec->d1_level] = NULL; } r = execTok (spec, &s, &cmd_str, &cmd_len); } else if (!strcmp (p, "element")) { r = execTok (spec, &s, &cmd_str, &cmd_len); if (r < 2) continue; tagBegin (spec, cmd_str, cmd_len); r = execTok (spec, &s, &cmd_str, &cmd_len); } else if (!strcmp (p, "variant")) { int class_len; const char *class_str = NULL; int type_len; const char *type_str = NULL; int value_len; const char *value_str = NULL; r = execTok (spec, &s, &cmd_str, &cmd_len); if (r < 2) continue; class_str = cmd_str; class_len = cmd_len; r = execTok (spec, &s, &cmd_str, &cmd_len); if (r < 2) continue; type_str = cmd_str; type_len = cmd_len; r = execTok (spec, &s, &cmd_str, &cmd_len); if (r < 2) continue; value_str = cmd_str; value_len = cmd_len; variantBegin (spec, class_str, class_len, type_str, type_len, value_str, value_len); r = execTok (spec, &s, &cmd_str, &cmd_len); } else if (!strcmp (p, "context")) { if (r > 1) { struct lexContext *lc = spec->context; r = execTok (spec, &s, &cmd_str, &cmd_len); p = regxStrz (cmd_str, cmd_len, ptmp); #if REGX_DEBUG yaz_log (YLOG_LOG, "begin context %s", p); #endif while (lc && strcmp (p, lc->name)) lc = lc->next; if (lc) spec->context_stack[++(spec->context_stack_top)] = lc; else yaz_log (YLOG_WARN, "unknown context %s", p); } r = execTok (spec, &s, &cmd_str, &cmd_len); } else { yaz_log (YLOG_WARN, "bad keyword '%s' after begin", p); } } else if (!strcmp (p, "end")) { r = execTok (spec, &s, &cmd_str, &cmd_len); if (r < 2) { yaz_log (YLOG_WARN, "missing keyword after 'end'"); continue; } p = regxStrz (cmd_str, cmd_len, ptmp); if (!strcmp (p, "record")) { while (spec->d1_level) { tagDataRelease (spec); (spec->d1_level)--; } r = execTok (spec, &s, &cmd_str, &cmd_len); #if REGX_DEBUG yaz_log (YLOG_LOG, "end record"); #endif spec->stop_flag = 1; } else if (!strcmp (p, "element")) { int min_level = 2; while ((r = execTok (spec, &s, &cmd_str, &cmd_len)) == 3) { if (cmd_len==7 && !memcmp ("-record", cmd_str, cmd_len)) min_level = 0; } if (r > 2) { tagEnd (spec, min_level, cmd_str, cmd_len); r = execTok (spec, &s, &cmd_str, &cmd_len); } else tagEnd (spec, min_level, NULL, 0); if (spec->d1_level <= 1) { #if REGX_DEBUG yaz_log (YLOG_LOG, "end element end records"); #endif spec->stop_flag = 1; } } else if (!strcmp (p, "context")) { #if REGX_DEBUG yaz_log (YLOG_LOG, "end context"); #endif if (spec->context_stack_top) (spec->context_stack_top)--; r = execTok (spec, &s, &cmd_str, &cmd_len); } else yaz_log (YLOG_WARN, "bad keyword '%s' after end", p); } else if (!strcmp (p, "data")) { int textFlag = 0; int element_len; const char *element_str = NULL; int attribute_len; const char *attribute_str = NULL; while ((r = execTok (spec, &s, &cmd_str, &cmd_len)) == 3) { if (cmd_len==5 && !memcmp ("-text", cmd_str, cmd_len)) textFlag = 1; else if (cmd_len==8 && !memcmp ("-element", cmd_str, cmd_len)) { r = execTok (spec, &s, &element_str, &element_len); if (r < 2) break; } else if (cmd_len==10 && !memcmp ("-attribute", cmd_str, cmd_len)) { r = execTok (spec, &s, &attribute_str, &attribute_len); if (r < 2) break; } else yaz_log (YLOG_WARN, "bad data option: %.*s", cmd_len, cmd_str); } if (r != 2) { yaz_log (YLOG_WARN, "missing data item after data"); continue; } if (element_str) tagBegin (spec, element_str, element_len); do { execData (spec, cmd_str, cmd_len, textFlag, attribute_str, attribute_len); r = execTok (spec, &s, &cmd_str, &cmd_len); } while (r > 1); if (element_str) tagEnd (spec, 2, NULL, 0); } else if (!strcmp (p, "unread")) { int no, offset; r = execTok (spec, &s, &cmd_str, &cmd_len); if (r==3 && cmd_len == 7 && !memcmp ("-offset", cmd_str, cmd_len)) { r = execTok (spec, &s, &cmd_str, &cmd_len); if (r < 2) { yaz_log (YLOG_WARN, "missing number after -offset"); continue; } p = regxStrz (cmd_str, cmd_len, ptmp); offset = atoi (p); r = execTok (spec, &s, &cmd_str, &cmd_len); } else offset = 0; if (r < 2) { yaz_log (YLOG_WARN, "missing index after unread command"); continue; } if (cmd_len != 1 || *cmd_str < '0' || *cmd_str > '9') { yaz_log (YLOG_WARN, "bad index after unread command"); continue; } else { no = *cmd_str - '0'; if (no >= spec->arg_no) no = spec->arg_no - 1; spec->ptr = spec->arg_start[no] + offset; } r = execTok (spec, &s, &cmd_str, &cmd_len); } else if (!strcmp (p, "context")) { if (r > 1) { struct lexContext *lc = spec->context; r = execTok (spec, &s, &cmd_str, &cmd_len); p = regxStrz (cmd_str, cmd_len, ptmp); while (lc && strcmp (p, lc->name)) lc = lc->next; if (lc) spec->context_stack[spec->context_stack_top] = lc; else yaz_log (YLOG_WARN, "unknown context %s", p); } r = execTok (spec, &s, &cmd_str, &cmd_len); } else { yaz_log (YLOG_WARN, "unknown code command '%.*s'", cmd_len, cmd_str); r = execTok (spec, &s, &cmd_str, &cmd_len); continue; } if (r > 1) { yaz_log (YLOG_WARN, "ignoring token %.*s", cmd_len, cmd_str); do { r = execTok (spec, &s, &cmd_str, &cmd_len); } while (r > 1); } } } static int execAction (struct lexSpec *spec, struct lexRuleAction *ap, int start_ptr, int *pptr) { int sptr; int arg_start[20]; int arg_end[20]; int arg_no = 1; if (!ap) return 1; arg_start[0] = start_ptr; arg_end[0] = *pptr; spec->arg_start = arg_start; spec->arg_end = arg_end; while (ap) { switch (ap->which) { case REGX_PATTERN: if (ap->u.pattern.body) { arg_start[arg_no] = *pptr; if (!tryMatch (spec, pptr, &sptr, ap->u.pattern.dfa, 0)) { arg_end[arg_no] = F_WIN_EOF; arg_no++; arg_start[arg_no] = F_WIN_EOF; arg_end[arg_no] = F_WIN_EOF; yaz_log(YLOG_DEBUG, "Pattern match rest of record"); *pptr = F_WIN_EOF; } else { arg_end[arg_no] = sptr; arg_no++; arg_start[arg_no] = sptr; arg_end[arg_no] = *pptr; } } else { arg_start[arg_no] = *pptr; if (!tryMatch (spec, pptr, &sptr, ap->u.pattern.dfa, 1)) return 1; if (sptr != arg_start[arg_no]) return 1; arg_end[arg_no] = *pptr; } arg_no++; break; case REGX_CODE: spec->arg_no = arg_no; spec->ptr = *pptr; #if HAVE_TCL_H if (spec->tcl_interp) execTcl(spec, ap->u.code); else execCode (spec, ap->u.code); #else execCode (spec, ap->u.code); #endif *pptr = spec->ptr; if (spec->stop_flag) return 0; break; case REGX_END: arg_start[arg_no] = *pptr; arg_end[arg_no] = F_WIN_EOF; arg_no++; *pptr = F_WIN_EOF; } ap = ap->next; } return 1; } static int execRule (struct lexSpec *spec, struct lexContext *context, int ruleNo, int start_ptr, int *pptr) { #if REGX_DEBUG yaz_log (YLOG_LOG, "exec rule %d", ruleNo); #endif return execAction (spec, context->fastRule[ruleNo]->actionList, start_ptr, pptr); } int lexNode (struct lexSpec *spec, int *ptr) { struct lexContext *context = spec->context_stack[spec->context_stack_top]; struct DFA_state *state = context->dfa->states[0]; struct DFA_tran *t; unsigned char c; unsigned char c_prev = '\n'; int i; int last_rule = 0; /* rule number of current match */ int last_ptr = *ptr; /* last char of match */ int start_ptr = *ptr; /* first char of match */ int skip_ptr = *ptr; /* first char of run */ int more = 0; while (1) { c = f_win_advance (spec, ptr); if (*ptr == F_WIN_EOF) { /* end of file met */ if (last_rule) { /* there was a match */ if (skip_ptr < start_ptr) { /* deal with chars that didn't match */ int size; char *buf; buf = f_win_get (spec, skip_ptr, start_ptr, &size); execDataP (spec, buf, size, 0); } /* restore pointer */ *ptr = last_ptr; /* execute rule */ if (!execRule (spec, context, last_rule, start_ptr, ptr)) return more; /* restore skip pointer */ skip_ptr = *ptr; last_rule = 0; } else if (skip_ptr < *ptr) { /* deal with chars that didn't match */ int size; char *buf; buf = f_win_get (spec, skip_ptr, *ptr, &size); execDataP (spec, buf, size, 0); } state = context->dfa->states[0]; if (*ptr == F_WIN_EOF) return more; } t = state->trans; i = state->tran_no; while (1) if (--i < 0) { /* no transition for character c ... */ if (last_rule) { if (skip_ptr < start_ptr) { /* deal with chars that didn't match */ int size; char *buf; buf = f_win_get (spec, skip_ptr, start_ptr, &size); execDataP (spec, buf, size, 0); } /* restore pointer */ *ptr = last_ptr; if (!execRule (spec, context, last_rule, start_ptr, ptr)) { if (spec->f_win_ef && *ptr != F_WIN_EOF) { off_t end_offset = *ptr; #if REGX_DEBUG yaz_log (YLOG_LOG, "regx: endf ptr=%d", *ptr); #endif (*spec->f_win_ef)(spec->stream, &end_offset); } return more; } context = spec->context_stack[spec->context_stack_top]; skip_ptr = *ptr; last_rule = 0; last_ptr = start_ptr = *ptr; if (start_ptr > 0) { --start_ptr; c_prev = f_win_advance (spec, &start_ptr); } } else { c_prev = f_win_advance (spec, &start_ptr); *ptr = start_ptr; } state = context->dfa->states[0]; break; } else if (c >= t->ch[0] && c <= t->ch[1]) { /* transition ... */ state = context->dfa->states[t->to]; if (state->rule_no) { if (c_prev == '\n') { last_rule = state->rule_no; last_ptr = *ptr; } else if (state->rule_nno) { last_rule = state->rule_nno; last_ptr = *ptr; } more = 1; } break; } else t++; } return more; } static data1_node *lexRoot (struct lexSpec *spec, off_t offset, const char *context_name) { struct lexContext *lt = spec->context; int ptr = offset; int ret; spec->stop_flag = 0; spec->d1_level = 0; spec->context_stack_top = 0; while (lt) { if (!strcmp (lt->name, context_name)) break; lt = lt->next; } if (!lt) { yaz_log (YLOG_WARN, "cannot find context %s", context_name); return NULL; } spec->context_stack[spec->context_stack_top] = lt; spec->d1_stack[spec->d1_level] = NULL; #if 1 if (!lt->initFlag) { lt->initFlag = 1; execAction (spec, lt->initActionList, ptr, &ptr); } #endif execAction (spec, lt->beginActionList, ptr, &ptr); ret = lexNode (spec, &ptr); while (spec->d1_level) { tagDataRelease (spec); (spec->d1_level)--; } if (!ret) return 0; execAction (spec, lt->endActionList, ptr, &ptr); return spec->d1_stack[0]; } void grs_destroy(void *clientData) { struct lexSpecs *specs = (struct lexSpecs *) clientData; if (specs->spec) { lexSpecDestroy(&specs->spec); } xfree (specs); } void *grs_init(Res res, RecType recType) { struct lexSpecs *specs = (struct lexSpecs *) xmalloc (sizeof(*specs)); specs->spec = 0; strcpy(specs->type, ""); return specs; } ZEBRA_RES grs_config(void *clientData, Res res, const char *args) { struct lexSpecs *specs = (struct lexSpecs *) clientData; if (strlen(args) < sizeof(specs->type)) strcpy(specs->type, args); return ZEBRA_OK; } data1_node *grs_read_regx (struct grs_read_info *p) { int res; struct lexSpecs *specs = (struct lexSpecs *) p->clientData; struct lexSpec **curLexSpec = &specs->spec; off_t start_offset; #if REGX_DEBUG yaz_log (YLOG_LOG, "grs_read_regx"); #endif if (!*curLexSpec || strcmp ((*curLexSpec)->name, specs->type)) { if (*curLexSpec) lexSpecDestroy (curLexSpec); *curLexSpec = lexSpecCreate (specs->type, p->dh); res = readFileSpec (*curLexSpec); if (res) { lexSpecDestroy (curLexSpec); return NULL; } } (*curLexSpec)->dh = p->dh; start_offset = p->stream->tellf(p->stream); if (start_offset == 0) { (*curLexSpec)->f_win_start = 0; (*curLexSpec)->f_win_end = 0; (*curLexSpec)->f_win_rf = p->stream->readf; (*curLexSpec)->f_win_sf = p->stream->seekf; (*curLexSpec)->stream = p->stream; (*curLexSpec)->f_win_ef = p->stream->endf; (*curLexSpec)->f_win_size = 500000; } (*curLexSpec)->m = p->mem; return lexRoot (*curLexSpec, start_offset, "main"); } static int extract_regx(void *clientData, struct recExtractCtrl *ctrl) { return zebra_grs_extract(clientData, ctrl, grs_read_regx); } static int retrieve_regx(void *clientData, struct recRetrieveCtrl *ctrl) { return zebra_grs_retrieve(clientData, ctrl, grs_read_regx); } static struct recType regx_type = { 0, "grs.regx", grs_init, grs_config, grs_destroy, extract_regx, retrieve_regx, }; #if HAVE_TCL_H data1_node *grs_read_tcl (struct grs_read_info *p) { int res; struct lexSpecs *specs = (struct lexSpecs *) p->clientData; struct lexSpec **curLexSpec = &specs->spec; off_t start_offset; #if REGX_DEBUG yaz_log (YLOG_LOG, "grs_read_tcl"); #endif if (!*curLexSpec || strcmp ((*curLexSpec)->name, specs->type)) { Tcl_Interp *tcl_interp; if (*curLexSpec) lexSpecDestroy (curLexSpec); *curLexSpec = lexSpecCreate (specs->type, p->dh); Tcl_FindExecutable(""); tcl_interp = (*curLexSpec)->tcl_interp = Tcl_CreateInterp(); Tcl_Init(tcl_interp); Tcl_CreateCommand (tcl_interp, "begin", cmd_tcl_begin, *curLexSpec, 0); Tcl_CreateCommand (tcl_interp, "end", cmd_tcl_end, *curLexSpec, 0); Tcl_CreateCommand (tcl_interp, "data", cmd_tcl_data, *curLexSpec, 0); Tcl_CreateCommand (tcl_interp, "unread", cmd_tcl_unread, *curLexSpec, 0); res = readFileSpec (*curLexSpec); if (res) { lexSpecDestroy (curLexSpec); return NULL; } } (*curLexSpec)->dh = p->dh; start_offset = p->stream->tellf(p->stream); if (start_offset == 0) { (*curLexSpec)->f_win_start = 0; (*curLexSpec)->f_win_end = 0; (*curLexSpec)->f_win_rf = p->stream->readf; (*curLexSpec)->f_win_sf = p->stream->seekf; (*curLexSpec)->stream = p->stream; (*curLexSpec)->f_win_ef = p->stream->endf; (*curLexSpec)->f_win_size = 500000; } (*curLexSpec)->m = p->mem; return lexRoot (*curLexSpec, start_offset, "main"); } static int extract_tcl(void *clientData, struct recExtractCtrl *ctrl) { return zebra_grs_extract(clientData, ctrl, grs_read_tcl); } static int retrieve_tcl(void *clientData, struct recRetrieveCtrl *ctrl) { return zebra_grs_retrieve(clientData, ctrl, grs_read_tcl); } static struct recType tcl_type = { 0, "grs.tcl", grs_init, grs_config, grs_destroy, extract_tcl, retrieve_tcl, }; #endif RecType #ifdef IDZEBRA_STATIC_GRS_REGX idzebra_filter_grs_regx #else idzebra_filter #endif [] = { ®x_type, #if HAVE_TCL_H &tcl_type, #endif 0, }; /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/kinput.c0000644000175000017500000004671011412332551012734 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #ifdef WIN32 #include #endif #if HAVE_UNISTD_H #include #endif #include #include #include #include #include "index.h" #define KEY_SIZE (1+sizeof(struct it_key)) #define INP_NAME_MAX 768 struct key_file { int no; /* file no */ off_t offset; /* file offset */ unsigned char *buf; /* buffer block */ size_t buf_size; /* number of read bytes in block */ size_t chunk; /* number of bytes allocated */ size_t buf_ptr; /* current position in buffer */ char *prev_name; /* last word read */ void *decode_handle; off_t length; /* length of file */ /* handler invoked in each read */ void (*readHandler)(struct key_file *keyp, void *rinfo); void *readInfo; Res res; }; #if 0 static void pkey(const char *b, int mode) { key_logdump_txt(YLOG_LOG, b, mode ? "i" : "d"); } #endif void getFnameTmp(Res res, char *fname, int no) { const char *pre; pre = res_get_def(res, "keyTmpDir", "."); sprintf(fname, "%s/key%d.tmp", pre, no); } void extract_get_fname_tmp(ZebraHandle zh, char *fname, int no) { const char *pre; pre = res_get_def(zh->res, "keyTmpDir", "."); sprintf(fname, "%s/key%d.tmp", pre, no); } void key_file_chunk_read(struct key_file *f) { int nr = 0, r = 0, fd; char fname[1024]; getFnameTmp(f->res, fname, f->no); fd = open(fname, O_BINARY|O_RDONLY); f->buf_ptr = 0; f->buf_size = 0; if (fd == -1) { yaz_log(YLOG_WARN|YLOG_ERRNO, "cannot open %s", fname); return ; } if (!f->length) { if ((f->length = lseek(fd, 0L, SEEK_END)) == (off_t) -1) { yaz_log(YLOG_WARN|YLOG_ERRNO, "cannot seek %s", fname); close(fd); return ; } } if (lseek(fd, f->offset, SEEK_SET) == -1) { yaz_log(YLOG_WARN|YLOG_ERRNO, "cannot seek %s", fname); close(fd); return ; } while (f->chunk - nr > 0) { r = read(fd, f->buf + nr, f->chunk - nr); if (r <= 0) break; nr += r; } if (r == -1) { yaz_log(YLOG_WARN|YLOG_ERRNO, "read of %s", fname); close(fd); return; } f->buf_size = nr; if (f->readHandler) (*f->readHandler)(f, f->readInfo); close(fd); } void key_file_destroy(struct key_file *f) { iscz1_stop(f->decode_handle); xfree(f->buf); xfree(f->prev_name); xfree(f); } struct key_file *key_file_init(int no, int chunk, Res res) { struct key_file *f; f = (struct key_file *) xmalloc(sizeof(*f)); f->res = res; f->decode_handle = iscz1_start(); f->no = no; f->chunk = chunk; f->offset = 0; f->length = 0; f->readHandler = NULL; f->buf = (unsigned char *) xmalloc(f->chunk); f->prev_name = (char *) xmalloc(INP_NAME_MAX); *f->prev_name = '\0'; key_file_chunk_read(f); return f; } int key_file_getc(struct key_file *f) { if (f->buf_ptr < f->buf_size) return f->buf[(f->buf_ptr)++]; if (f->buf_size < f->chunk) return EOF; f->offset += f->buf_size; key_file_chunk_read(f); if (f->buf_ptr < f->buf_size) return f->buf[(f->buf_ptr)++]; else return EOF; } int key_file_read(struct key_file *f, char *key) { int i, c; char srcbuf[128]; const char *src = srcbuf; char *dst; int j; c = key_file_getc(f); if (c == 0) { strcpy(key, f->prev_name); i = 1+strlen(key); } else if (c == EOF) return 0; else { i = 0; key[i++] = c; while ((c = key_file_getc(f))) { if (i < INP_NAME_MAX-2) key[i++] = c; } key[i++] = '\0'; strcpy(f->prev_name, key); iscz1_reset(f->decode_handle); } c = key_file_getc(f); /* length + insert/delete combined */ key[i++] = c & 128; c = c & 127; for (j = 0; j < c; j++) srcbuf[j] = key_file_getc(f); dst = key + i; iscz1_decode(f->decode_handle, &dst, &src); #if 0 /* debugging */ if (1) { struct it_key k; memcpy(&k, key+i, sizeof(k)); if (!k.mem[1]) yaz_log(YLOG_LOG, "00 KEY"); } #endif return i + sizeof(struct it_key); } struct heap_info { struct { struct key_file **file; char **buf; } info; int heapnum; int *ptr; int (*cmp)(const void *p1, const void *p2); struct zebra_register *reg; ZebraHandle zh; zint no_diffs; zint no_updates; zint no_deletions; zint no_insertions; zint no_iterations; }; static struct heap_info *key_heap_malloc(void) { /* malloc and clear it */ struct heap_info *hi; hi = (struct heap_info *) xmalloc(sizeof(*hi)); hi->info.file = 0; hi->info.buf = 0; hi->heapnum = 0; hi->ptr = 0; hi->no_diffs = 0; hi->no_diffs = 0; hi->no_updates = 0; hi->no_deletions = 0; hi->no_insertions = 0; hi->no_iterations = 0; return hi; } struct heap_info *key_heap_init_file(ZebraHandle zh, int nkeys, int (*cmp)(const void *p1, const void *p2)) { struct heap_info *hi; int i; hi = key_heap_malloc(); hi->zh = zh; hi->info.file = (struct key_file **) xmalloc(sizeof(*hi->info.file) * (1+nkeys)); hi->info.buf = (char **) xmalloc(sizeof(*hi->info.buf) * (1+nkeys)); hi->ptr = (int *) xmalloc(sizeof(*hi->ptr) * (1+nkeys)); hi->cmp = cmp; for (i = 0; i<= nkeys; i++) { hi->ptr[i] = i; hi->info.buf[i] = (char *) xmalloc(INP_NAME_MAX); } return hi; } void key_heap_destroy(struct heap_info *hi, int nkeys) { int i; for (i = 0; i<=nkeys; i++) xfree(hi->info.buf[i]); xfree(hi->info.buf); xfree(hi->ptr); xfree(hi->info.file); xfree(hi); } static void key_heap_swap(struct heap_info *hi, int i1, int i2) { int swap; swap = hi->ptr[i1]; hi->ptr[i1] = hi->ptr[i2]; hi->ptr[i2] = swap; } static void key_heap_delete(struct heap_info *hi) { int cur = 1, child = 2; assert(hi->heapnum > 0); key_heap_swap(hi, 1, hi->heapnum); hi->heapnum--; while (child <= hi->heapnum) { if (child < hi->heapnum && (*hi->cmp)(&hi->info.buf[hi->ptr[child]], &hi->info.buf[hi->ptr[child+1]]) > 0) child++; if ((*hi->cmp)(&hi->info.buf[hi->ptr[cur]], &hi->info.buf[hi->ptr[child]]) > 0) { key_heap_swap(hi, cur, child); cur = child; child = 2*cur; } else break; } } static void key_heap_insert(struct heap_info *hi, const char *buf, int nbytes, struct key_file *kf) { int cur, parent; cur = ++(hi->heapnum); memcpy(hi->info.buf[hi->ptr[cur]], buf, nbytes); hi->info.file[hi->ptr[cur]] = kf; parent = cur/2; while (parent && (*hi->cmp)(&hi->info.buf[hi->ptr[parent]], &hi->info.buf[hi->ptr[cur]]) > 0) { key_heap_swap(hi, cur, parent); cur = parent; parent = cur/2; } } static int heap_read_one(struct heap_info *hi, char *name, char *key) { int n, r; char rbuf[INP_NAME_MAX]; struct key_file *kf; if (!hi->heapnum) return 0; n = hi->ptr[1]; strcpy(name, hi->info.buf[n]); kf = hi->info.file[n]; r = strlen(name); memcpy(key, hi->info.buf[n] + r+1, KEY_SIZE); key_heap_delete(hi); if ((r = key_file_read(kf, rbuf))) key_heap_insert(hi, rbuf, r, kf); hi->no_iterations++; return 1; } #define PR_KEY_LOW 0 #define PR_KEY_TOP 0 /* for debugging only */ void zebra_log_dict_entry(ZebraHandle zh, const char *s) { char dst[INP_NAME_MAX+1]; int ord; int len = key_SU_decode(&ord, (const unsigned char *) s); const char *index_type; if (!zh) yaz_log(YLOG_LOG, "ord=%d", ord); else { const char *string_index; const char *db = 0; zebraExplain_lookup_ord(zh->reg->zei, ord, &index_type, &db, &string_index); zebra_term_untrans(zh, index_type, dst, s + len); yaz_log(YLOG_LOG, "ord=%d index_type=%s index=%s term=%s", ord, index_type, string_index, dst); } } struct heap_cread_info { char prev_name[INP_NAME_MAX]; char cur_name[INP_NAME_MAX]; char *key; char *key_1, *key_2; int mode_1, mode_2; int sz_1, sz_2; struct heap_info *hi; int first_in_list; int more; int ret; int look_level; }; static int heap_cread_item(void *vp, char **dst, int *insertMode); int heap_cread_item2(void *vp, char **dst, int *insertMode) { struct heap_cread_info *p = (struct heap_cread_info *) vp; int level = 0; if (p->look_level) { if (p->look_level > 0) { *insertMode = 1; p->look_level--; } else { *insertMode = 0; p->look_level++; } memcpy(*dst, p->key_1, p->sz_1); #if 0 yaz_log(YLOG_LOG, "DUP level=%d", p->look_level); pkey(*dst, *insertMode); #endif (*dst) += p->sz_1; return 1; } if (p->ret == 0) /* lookahead was 0?. Return that in read next round */ { p->ret = -1; return 0; } else if (p->ret == -1) /* Must read new item ? */ { char *dst_1 = p->key_1; p->ret = heap_cread_item(vp, &dst_1, &p->mode_1); p->sz_1 = dst_1 - p->key_1; } else { /* lookahead in 2 . Now in 1. */ p->sz_1 = p->sz_2; p->mode_1 = p->mode_2; memcpy(p->key_1, p->key_2, p->sz_2); } if (p->mode_1) level = 1; /* insert */ else level = -1; /* delete */ while(1) { char *dst_2 = p->key_2; p->ret = heap_cread_item(vp, &dst_2, &p->mode_2); if (!p->ret) { if (level) break; p->ret = -1; return 0; } p->sz_2 = dst_2 - p->key_2; if (key_compare(p->key_1, p->key_2) == 0) { if (p->mode_2) /* adjust level according to deletes/inserts */ level++; else level--; } else { if (level) break; /* all the same. new round .. */ p->sz_1 = p->sz_2; p->mode_1 = p->mode_2; memcpy(p->key_1, p->key_2, p->sz_1); if (p->mode_1) level = 1; /* insert */ else level = -1; /* delete */ } } /* outcome is insert (1) or delete (0) depending on final level */ if (level > 0) { *insertMode = 1; level--; } else { *insertMode = 0; level++; } p->look_level = level; memcpy(*dst, p->key_1, p->sz_1); #if 0 pkey(*dst, *insertMode); #endif (*dst) += p->sz_1; return 1; } int heap_cread_item(void *vp, char **dst, int *insertMode) { struct heap_cread_info *p = (struct heap_cread_info *) vp; struct heap_info *hi = p->hi; if (p->first_in_list) { *insertMode = p->key[0]; memcpy(*dst, p->key+1, sizeof(struct it_key)); #if PR_KEY_LOW zebra_log_dict_entry(hi->zh, p->cur_name); pkey(*dst, *insertMode); #endif (*dst) += sizeof(struct it_key); p->first_in_list = 0; return 1; } strcpy(p->prev_name, p->cur_name); if (!(p->more = heap_read_one(hi, p->cur_name, p->key))) return 0; if (*p->cur_name && strcmp(p->cur_name, p->prev_name)) { p->first_in_list = 1; return 0; } *insertMode = p->key[0]; memcpy(*dst, p->key+1, sizeof(struct it_key)); #if PR_KEY_LOW zebra_log_dict_entry(hi->zh, p->cur_name); pkey(*dst, *insertMode); #endif (*dst) += sizeof(struct it_key); return 1; } int heap_inpc(struct heap_cread_info *hci, struct heap_info *hi) { ISAMC_I *isamc_i = (ISAMC_I *) xmalloc(sizeof(*isamc_i)); isamc_i->clientData = hci; isamc_i->read_item = heap_cread_item2; while (hci->more) { char this_name[INP_NAME_MAX]; ISAM_P isamc_p, isamc_p2; char *dict_info; strcpy(this_name, hci->cur_name); assert(hci->cur_name[0]); hi->no_diffs++; if ((dict_info = dict_lookup(hi->reg->dict, hci->cur_name))) { memcpy(&isamc_p, dict_info+1, sizeof(ISAM_P)); isamc_p2 = isamc_p; isamc_merge(hi->reg->isamc, &isamc_p2, isamc_i); if (!isamc_p2) { hi->no_deletions++; if (!dict_delete(hi->reg->dict, this_name)) abort(); } else { hi->no_updates++; if (isamc_p2 != isamc_p) dict_insert(hi->reg->dict, this_name, sizeof(ISAM_P), &isamc_p2); } } else { isamc_p = 0; isamc_merge(hi->reg->isamc, &isamc_p, isamc_i); hi->no_insertions++; if (isamc_p) dict_insert(hi->reg->dict, this_name, sizeof(ISAM_P), &isamc_p); } } xfree(isamc_i); return 0; } int heap_inpb(struct heap_cread_info *hci, struct heap_info *hi) { ISAMC_I *isamc_i = (ISAMC_I *) xmalloc(sizeof(*isamc_i)); isamc_i->clientData = hci; isamc_i->read_item = heap_cread_item2; while (hci->more) { char this_name[INP_NAME_MAX]; ISAM_P isamc_p, isamc_p2; char *dict_info; strcpy(this_name, hci->cur_name); assert(hci->cur_name[0]); hi->no_diffs++; #if 0 assert(hi->zh); zebra_log_dict_entry(hi->zh, hci->cur_name); #endif if ((dict_info = dict_lookup(hi->reg->dict, hci->cur_name))) { memcpy(&isamc_p, dict_info+1, sizeof(ISAM_P)); isamc_p2 = isamc_p; isamb_merge(hi->reg->isamb, &isamc_p2, isamc_i); if (!isamc_p2) { hi->no_deletions++; if (!dict_delete(hi->reg->dict, this_name)) abort(); } else { hi->no_updates++; if (isamc_p2 != isamc_p) dict_insert(hi->reg->dict, this_name, sizeof(ISAM_P), &isamc_p2); } } else { isamc_p = 0; isamb_merge(hi->reg->isamb, &isamc_p, isamc_i); hi->no_insertions++; if (isamc_p) dict_insert(hi->reg->dict, this_name, sizeof(ISAM_P), &isamc_p); } } xfree(isamc_i); return 0; } int heap_inps(struct heap_cread_info *hci, struct heap_info *hi) { ISAMS_I isams_i = (ISAMS_I) xmalloc(sizeof(*isams_i)); isams_i->clientData = hci; isams_i->read_item = heap_cread_item; while (hci->more) { char this_name[INP_NAME_MAX]; ISAM_P isams_p; char *dict_info; strcpy(this_name, hci->cur_name); assert(hci->cur_name[0]); hi->no_diffs++; if (!(dict_info = dict_lookup(hi->reg->dict, hci->cur_name))) { isams_p = isams_merge(hi->reg->isams, isams_i); hi->no_insertions++; dict_insert(hi->reg->dict, this_name, sizeof(ISAM_P), &isams_p); } else { yaz_log(YLOG_FATAL, "isams doesn't support this kind of update"); break; } } xfree(isams_i); return 0; } struct progressInfo { time_t startTime; time_t lastTime; off_t totalBytes; off_t totalOffset; }; void progressFunc(struct key_file *keyp, void *info) { struct progressInfo *p = (struct progressInfo *) info; time_t now, remaining; if (keyp->buf_size <= 0 || p->totalBytes <= 0) return ; time (&now); if (now >= p->lastTime+10) { p->lastTime = now; remaining = (time_t) ((now - p->startTime)* ((double) p->totalBytes/p->totalOffset - 1.0)); if (remaining <= 130) yaz_log(YLOG_LOG, "Merge %2.1f%% completed; %ld seconds remaining", (100.0*p->totalOffset) / p->totalBytes, (long) remaining); else yaz_log(YLOG_LOG, "Merge %2.1f%% completed; %ld minutes remaining", (100.0*p->totalOffset) / p->totalBytes, (long) remaining/60); } p->totalOffset += keyp->buf_size; } #ifndef R_OK #define R_OK 4 #endif void zebra_index_merge(ZebraHandle zh) { struct key_file **kf = 0; char rbuf[1024]; int i, r; struct heap_info *hi; struct progressInfo progressInfo; int nkeys = key_block_get_no_files(zh->reg->key_block); if (nkeys == 0) return; if (nkeys < 0) { char fname[1024]; nkeys = 0; while (1) { extract_get_fname_tmp (zh, fname, nkeys+1); if (access(fname, R_OK) == -1) break; nkeys++; } if (!nkeys) return ; } kf = (struct key_file **) xmalloc((1+nkeys) * sizeof(*kf)); progressInfo.totalBytes = 0; progressInfo.totalOffset = 0; time(&progressInfo.startTime); time(&progressInfo.lastTime); for (i = 1; i<=nkeys; i++) { kf[i] = key_file_init(i, 8192, zh->res); kf[i]->readHandler = progressFunc; kf[i]->readInfo = &progressInfo; progressInfo.totalBytes += kf[i]->length; progressInfo.totalOffset += kf[i]->buf_size; } hi = key_heap_init_file(zh, nkeys, key_qsort_compare); hi->reg = zh->reg; for (i = 1; i<=nkeys; i++) if ((r = key_file_read(kf[i], rbuf))) key_heap_insert(hi, rbuf, r, kf[i]); if (1) { struct heap_cread_info hci; hci.key = (char *) xmalloc(KEY_SIZE); hci.key_1 = (char *) xmalloc(KEY_SIZE); hci.key_2 = (char *) xmalloc(KEY_SIZE); hci.ret = -1; hci.first_in_list = 1; hci.hi = hi; hci.look_level = 0; hci.more = heap_read_one(hi, hci.cur_name, hci.key); if (zh->reg->isams) heap_inps(&hci, hi); if (zh->reg->isamc) heap_inpc(&hci, hi); if (zh->reg->isamb) heap_inpb(&hci, hi); xfree(hci.key); xfree(hci.key_1); xfree(hci.key_2); } for (i = 1; i<=nkeys; i++) { extract_get_fname_tmp (zh, rbuf, i); unlink(rbuf); } for (i = 1; i<=nkeys; i++) key_file_destroy(kf[i]); xfree(kf); if (hi->no_iterations) { /* do not log if nothing happened */ yaz_log(YLOG_LOG, "Iterations: isam/dict " ZINT_FORMAT "/" ZINT_FORMAT, hi->no_iterations, hi->no_diffs); yaz_log(YLOG_LOG, "Dict: inserts/updates/deletions: " ZINT_FORMAT "/" ZINT_FORMAT "/" ZINT_FORMAT, hi->no_insertions, hi->no_updates, hi->no_deletions); } key_block_destroy(&zh->reg->key_block); key_heap_destroy(hi, nkeys); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/zebrash.c0000644000175000017500000005177011412332551013062 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* zebrash.c - command-line interface to zebra API */ #include #include #include #include #if HAVE_UNISTD_H #include #endif #if HAVE_READLINE_READLINE_H #include #endif #if HAVE_READLINE_HISTORY_H #include #endif #include #include #include #include #include #include #include #define MAX_NO_ARGS 32 #define MAX_OUT_BUFF 4096 #define MAX_ARG_LEN 1024 #define PROMPT "ZebraSh>" #define DEFAULTCONFIG "./zebra.cfg" #define DEFAULTDATABASE "Default" #define DEFAULTRESULTSET "MyResultSet" /************************************** * Global variables (yuck!) */ ZebraService zs=0; /* our global handle to zebra */ ZebraHandle zh=0; /* the current session */ /* time being, only one session works */ int nextrecno=1; /* record number to show next */ static char *default_config = DEFAULTCONFIG; static int log_level=0; /************************************** * Help functions */ static int split_args( char *line, char** args ) { /* splits line into individual null-terminated strings, * returns pointers to them in args */ /* FIXME - do we need to handle quoted args ?? */ char *p=line; int i=0; int n=0; args[0]=0; /* by default */ while (*p==' ' || *p=='\t' || *p=='\n') p++; while (*p) { while (*p==' ' || *p=='\t' || *p=='\n') p++; if (*p=='#') /* skip comments */ break; args[i++]=p; args[i]=0; while (*p && *p!=' ' && *p!='\t' && *p!='\n' && *p!='#') p++; *p++='\0'; } n=i; while (n strlen(args[0])) return ""; return args[0]+skiplen; } int onecommand( char *line, WRBUF outbuff, const char *prevout); /************************************** * Simple support commands */ int cmd_echo( char *args[], WRBUF outbuff) { wrbuf_printf(outbuff,"%s\n",restargs(args,1)); return 0; } int cmd_quit( char *args[], WRBUF outbuff) { if (zs) { onecommand("zebra_close",outbuff,""); zs=0; } if (zh) { onecommand("zebra_stop",outbuff,""); zh=0; } wrbuf_puts(outbuff, "bye"); return -99; /* special stop signal */ } /************************************** * Tests for starting and stopping zebra, etc */ static int cmd_help( char *args[], WRBUF outbuff); static int cmd_zebra_start( char *args[], WRBUF outbuff) { char *conf=args[1]; if (!conf || !*conf) { wrbuf_puts(outbuff,"no config file specified, using "); wrbuf_puts(outbuff, default_config); wrbuf_puts(outbuff, "\n"); conf=default_config; } zs=zebra_start(conf); if (!zs) { wrbuf_puts(outbuff, "zebra_start failed" ); return 2; } return 0; /* ok */ } static int cmd_zebra_stop( char *args[], WRBUF outbuff) { if (!zs) wrbuf_puts(outbuff,"zebra seems not to have been started, " "stopping anyway\n"); zebra_stop(zs); zs=0; return 0; /* ok */ } static int cmd_zebra_open( char *args[], WRBUF outbuff) { if (!zs) wrbuf_puts(outbuff,"zebra seems not to have been started, " "trying anyway\n"); zh = zebra_open(zs, 0); return 0; /* ok */ } static int cmd_zebra_close( char *args[], WRBUF outbuff) { if (!zh) wrbuf_puts(outbuff,"Seems like you have not called zebra_open," "trying anyway\n"); zebra_close(zh); return 0; /* ok */ } static int cmd_quickstart( char *args[], WRBUF outbuff) { char tmp[128]; int rc=0; if (!rc) rc=onecommand("yaz_log_file zebrash.log",outbuff,""); if (!rc) rc=onecommand("yaz_log_prefix ZebraSh", outbuff,""); sprintf(tmp, "yaz_log_level 0x%x", YLOG_DEFAULT_LEVEL | log_level ); if (!rc) rc=onecommand(tmp,outbuff,""); yaz_log(log_level,"quickstart"); if (!zs) if (!rc) rc=onecommand("zebra_start",outbuff,""); if (!zh) if (!rc) rc=onecommand("zebra_open",outbuff,""); if (!rc) rc=onecommand("select_database Default",outbuff,""); return rc; } /************************************** * Log file handling */ static int cmd_yaz_log_file( char *args[], WRBUF outbuff) { char *fn = defarg(args[1],0); wrbuf_printf(outbuff, "sending yaz-log to %s\n",fn); yaz_log_init_file(fn); return 0; /* ok */ } static int cmd_yaz_log_level( char *args[], WRBUF outbuff) { int lev = defargint(args[1],YLOG_DEFAULT_LEVEL); wrbuf_printf(outbuff, "setting yaz-log to level %d (ox%x)\n",lev,lev); yaz_log_init_level(lev); return 0; /* ok */ } static int cmd_yaz_log_prefix( char *args[], WRBUF outbuff) { char *pref = defarg(args[1],"ZebraSh"); wrbuf_printf(outbuff, "setting yaz-log prefix to %s\n",pref); yaz_log_init_prefix(pref); return 0; /* ok */ } static int cmd_logf( char *args[], WRBUF outbuff) { int lev = defargint(args[1],0); int i=1; if (lev) i=2; else lev=YLOG_LOG; /* this is in the default set!*/ yaz_log( lev, "%s", restargs(args,i)); return 0; /* ok */ } /**************** * Error handling */ static int cmd_err ( char *args[], WRBUF outbuff) { wrbuf_printf(outbuff, "errCode: %d \nerrStr: %s\nerrAdd: %s \n", zebra_errCode (zh), zebra_errString (zh), zebra_errAdd (zh) ); return 0; /* ok */ } static int cmd_errcode ( char *args[], WRBUF outbuff) { wrbuf_printf(outbuff, "errCode: %d \n", zebra_errCode (zh)); return 0; /* ok */ } static int cmd_errstr ( char *args[], WRBUF outbuff) { wrbuf_printf(outbuff, "errStr: %s\n", zebra_errString (zh)); return 0; /* ok */ } static int cmd_erradd ( char *args[], WRBUF outbuff) { wrbuf_printf(outbuff, "errAdd: %s \n", zebra_errAdd (zh) ); return 0; /* ok */ } /************************************** * Admin commands */ static int cmd_init ( char *args[], WRBUF outbuff) { zebra_init(zh); return 0; /* ok */ } static int cmd_select_database ( char *args[], WRBUF outbuff) { char *db=defarg(args[1],DEFAULTDATABASE); wrbuf_printf(outbuff,"Selecting database '%s'\n",db); return zebra_select_database(zh, db); } static int cmd_create_database( char *args[], WRBUF outbuff) { char *db=defarg(args[1],DEFAULTDATABASE); wrbuf_printf(outbuff,"Creating database '%s'\n",db); return zebra_create_database(zh, db); } static int cmd_drop_database( char *args[], WRBUF outbuff) { char *db=args[1]; if (!db) db="Default"; wrbuf_printf(outbuff,"Dropping database '%s'\n",db); return zebra_drop_database(zh, db); } static int cmd_begin_trans( char *args[], WRBUF outbuff) { int rw=0; if (args[1] && ( (args[1][0]=='1') || (args[1][0]=='w') )) rw=1; return zebra_begin_trans(zh,rw); } static int cmd_end_trans( char *args[], WRBUF outbuff) { return zebra_end_trans(zh); } /************************************* * Inserting and deleting */ static int cmd_record_insert( char *args[], WRBUF outbuff) { zint sysno = 0; int rc; char *rec=restargs(args,1); rc = zebra_update_record(zh, action_insert, 0, /* record type */ &sysno, 0, /* match */ 0, /* fname */ rec, strlen(rec)); if (0==rc) { wrbuf_printf(outbuff,"ok sysno=" ZINT_FORMAT "\n",sysno); } return rc; } static int cmd_exchange_record( char *args[], WRBUF outbuff) { char *id = args[1]; char *action = args[2]; int rc; char *rec=restargs(args,3); if (!(id && action && args[4] )) { wrbuf_puts(outbuff,"Missing arguments!\n"); onecommand("help exchange_record", outbuff, ""); return -90; } rc = zebra_update_record(zh, action_update, 0 /* record_type */, 0 /* sysno */, id /* match */, 0 /* fname */, rec, strlen(rec)); return rc; } /********************************** * Searching and retrieving */ static int cmd_search_pqf(char *args[], WRBUF outbuff) { zint hits = 0; char *set = args[1]; char *qry = restargs(args,2); int rc; rc = zebra_search_PQF(zh, qry, set, &hits); if (0==rc) wrbuf_printf(outbuff, ZINT_FORMAT " hits found\n", hits); return rc; } static int cmd_find( char *args[], WRBUF outbuff) { char *setname=DEFAULTRESULTSET; int rc; zint hits = 0; WRBUF qry = wrbuf_alloc(); if (0==strstr(args[0],"@attr")) wrbuf_puts(qry, "@attr 1=/ "); wrbuf_puts(qry,restargs(args,1)); if (!zh) onecommand("quickstart", outbuff, ""); wrbuf_printf(outbuff, "find %s\n",wrbuf_cstr(qry)); rc = zebra_search_PQF(zh, wrbuf_cstr(qry), setname, &hits); if (0==rc) { wrbuf_printf(outbuff, ZINT_FORMAT " hits found\n", hits); nextrecno = 1; } wrbuf_destroy(qry); return rc; } static int cmd_show( char *args[], WRBUF outbuff) { int start=defargint(args[1], nextrecno); int nrecs=defargint(args[2],1); char *setname=defarg(args[3],DEFAULTRESULTSET); int rc=0; ZebraRetrievalRecord *recs; ODR odr; Z_RecordComposition *pcomp=0; int i; odr = odr_createmem(ODR_ENCODE); recs= odr_malloc(odr,sizeof(ZebraRetrievalRecord)*nrecs); rc =z_RecordComposition(odr, &pcomp, 0,"recordComposition"); for (i=0;istream, * rr->num_input_setnames, (const char **) * rr->input_setnames, * rr->output_setname, * rr->sort_sequence, * &rr->sort_status); * zebra_result (zh, &rr->errcode, * &rr->errstring); * return 0; * } * */ /**************************************) * Command table, parser, and help */ struct cmdstruct { char *cmd; char *args; char *explanation; int (*testfunc)(char *args[], WRBUF outbuff); } ; struct cmdstruct cmds[] = { /* special cases: * if text is 0, does not list the command * if cmd is "", adds the args (and newline) in command listing */ { "", "Starting and stopping:", "", 0 }, { "zebra_start", "[configfile]", "starts the zebra service. You need to call this first\n" "if no configfile is given, assumes " DEFAULTCONFIG, cmd_zebra_start }, { "zebra_stop", "", "stops the zebra service", cmd_zebra_stop }, { "zebra_open", "", "starts a zebra session. Once you have called zebra_start\n" "you can call zebra_open to start working", cmd_zebra_open }, { "zebra_close", "", "closes a zebra session", cmd_zebra_close }, { "quickstart", "[configfile]", "Does a zebra_start, zebra_open, and sets up the log", cmd_quickstart }, { "", "Log file:","", 0}, { "yaz_log_file", "[filename]", "Directs the log to filename (or stderr)", cmd_yaz_log_file }, { "yaz_log_level", "[level]", "Sets the logging level (or returns to default)", cmd_yaz_log_level }, { "yaz_log_prefix", "[prefix]", "Sets the log prefix", cmd_yaz_log_prefix}, { "yaz_log", "[level] text...", "writes an entry in the log", cmd_logf}, { "", "Error handling:","", 0}, { "err", "", "Displays zebra's error status (code, str, add)", cmd_err}, { "errcode", "", "Displays zebra's error code", cmd_errcode}, { "errstr", "", "Displays zebra's error string", cmd_errstr}, { "erradd", "", "Displays zebra's additional error message", cmd_erradd}, { "", "Admin:","", 0}, { "init", "", "Initializes the zebra database, destroying all data in it", cmd_init}, { "select_database", "basename", "Selects a database", cmd_select_database}, { "create_database", "basename", "Create database", cmd_create_database}, { "drop_database", "basename", "Drop database", cmd_drop_database}, { "begin_trans", "[rw]", "Begins a transaction. rw=1 means write, otherwise read-only", cmd_begin_trans}, { "end_trans","", "Ends a transaction", cmd_end_trans}, { "","Updating:","",0}, { "record_insert","record", "inserts an sgml record into Default", cmd_record_insert}, { "exchange_record","database record-id action record", "inserts (1), updates (2), or deletes (3) a record \n" "record-id must be a unique identifier for the record", cmd_exchange_record}, { "","Searching and retrieving:","",0}, { "search_pqf","setname query", "search ", cmd_search_pqf}, { "find","query", "simplified search", cmd_find}, { "f","query", "simplified search", cmd_find}, { "show","[start] [numrecs] [resultset]", "shows a result", cmd_show}, { "s","[start] [numrecs] [resultset]", "shows a result", cmd_show}, { "sort","sortspec", "sorts a result set. (example spec: 1=4 >)", cmd_sort}, { "", "Misc:","", 0}, { "echo", "string", "ouputs the string", cmd_echo }, { "q", "", "exits the program", cmd_quit }, { "quit", "", "exits the program", cmd_quit }, { "help", "[command]", "Gives help on command, or lists them all", cmd_help }, { "", "help [command] gives more info on command", "",0 }, {0,0,0,0} /* end marker */ }; int onecommand( char *line, /* input line */ WRBUF outbuff, /* output goes here */ const char *prevout) /* prev output, for 'expect' */ { int i; char *args[MAX_NO_ARGS]; int nargs; char argbuf[MAX_ARG_LEN]; yaz_log(log_level,"%s",line); strncpy(argbuf,line, MAX_ARG_LEN-1); argbuf[MAX_ARG_LEN-1]='\0'; /* just to be sure */ /*memset(args,'\0',MAX_NO_ARGS*sizeof(char *));*/ nargs=split_args(argbuf, args); #if 0 for (i = 0; i <= n; i++) { const char *cp = args[i]; printf ("args %d :%s:\n", i, cp ? cp : ""); } #endif if (0==nargs) return -90; /* no command on line, too bad */ if (0==strcmp(args[0],"expect")) { char *rest; if (nargs>1) /* args[0] is not yet set, can't use restargs */ rest= line + (args[1]-argbuf); /* rest of the line */ else return -1; /* need something to expect */ if (0==strstr(prevout,rest)) { printf( "Failed expectation, '%s' not found\n", rest); exit(9); } return 0; } for (i=0;cmds[i].cmd;i++) if (0==strcmp(cmds[i].cmd, args[0])) { if (nargs>1) args[0]= line + (args[1]-argbuf); /* rest of the line */ else args[0]=""; return ((cmds[i].testfunc)(args,outbuff)); } wrbuf_printf(outbuff, "Unknown command '%s'. Try help\n",args[0]); yaz_log(log_level,"Unknown command"); return -90; } static int cmd_help( char *args[], WRBUF outbuff) { int i; int linelen; if (args[1]) { /* help for a single command */ for (i=0;cmds[i].cmd;i++) if (0==strcmp(cmds[i].cmd, args[1])) { wrbuf_printf(outbuff,"%s %s\n%s\n", cmds[i].cmd, cmds[i].args, cmds[i].explanation); return 0; } wrbuf_printf(outbuff, "Unknown command '%s'", args[1]); } else { /* list all commands */ linelen=9999; for (i=0;cmds[i].cmd;i++) { if (*cmds[i].cmd) { /* ordinary command */ if (linelen>50) { wrbuf_puts(outbuff,"\n "); linelen=0; } linelen += strlen(cmds[i].cmd) + 2; wrbuf_printf(outbuff,"%s ", cmds[i].cmd); } else { /* section head */ wrbuf_printf(outbuff,"\n%s\n ",cmds[i].args); linelen=0; } } /* for */ wrbuf_puts(outbuff,"\n"); } return 0; } /* If Zebra reports an error after an operation, * append it to the outbuff and log it */ static void Zerrors (WRBUF outbuff) { int ec; if (!zh) return ; ec=zebra_errCode (zh); if (ec) { yaz_log(log_level, " Zebra error %d: %s, (%s)", ec, zebra_errString (zh), zebra_errAdd (zh) ); wrbuf_printf(outbuff, " Zebra error %d: %s, (%s)\n", ec, zebra_errString (zh), zebra_errAdd (zh) ); } } /************************************** * The shell */ void shell(void) { int rc=0; WRBUF outbuff=wrbuf_alloc(); char prevout[MAX_OUT_BUFF]=""; /* previous output for 'expect' */ wrbuf_puts(outbuff,"Zebrash at your service"); while (rc!=-99) { char *nl_cp; char buf[MAX_ARG_LEN]; char* line_in = 0; #if HAVE_READLINE_READLINE_H if (isatty(0)) { line_in=readline(PROMPT); if (!line_in) break; #if HAVE_READLINE_HISTORY_H if (*line_in) add_history(line_in); #endif } #endif /* line_in != NULL if readine is present and input is a tty */ printf (PROMPT); fflush (stdout); if (line_in) { if(strlen(line_in) > MAX_ARG_LEN-1) { fprintf(stderr,"Input line too long\n"); break; } strcpy(buf,line_in); free (line_in); } else { if (!fgets (buf, MAX_ARG_LEN-1, stdin)) break; } /* get rid of \n in line */ if ((nl_cp = strchr(buf, '\n'))) *nl_cp = '\0'; strncpy(prevout, wrbuf_cstr(outbuff), MAX_OUT_BUFF); wrbuf_rewind(outbuff); rc=onecommand(buf, outbuff, prevout); if (rc==0) { wrbuf_puts(outbuff, " OK\n"); yaz_log(log_level, "OK"); } else if (rc>-90) { wrbuf_printf(outbuff, " command returned %d\n",rc); } Zerrors(outbuff); printf("%s\n", wrbuf_cstr(outbuff)); } /* while */ wrbuf_destroy(outbuff); } /* shell() */ static void usage(void) { printf ("usage:\n"); printf ("zebrash [-c config]\n"); exit(1); } /************************************** * Main */ int main (int argc, char ** argv) { int ret; char *arg = 0; while ((ret = options ("c:h", argv, argc, &arg)) != -2) { switch(ret) { case 'c': default_config = arg; break; case 'h': usage(); /* FIXME - handle -v */ default: fprintf(stderr, "bad option %s\n", arg); usage(); } } log_level=yaz_log_module_level("zebrash"); shell(); return 0; } /* main */ /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/attribute.c0000644000175000017500000001453511412332551013425 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include "index.h" #include static data1_att *getatt(data1_attset *p, int att) { data1_att *a; data1_attset_child *c; /* scan local set */ for (a = p->atts; a; a = a->next) if (a->value == att) return a; /* scan included sets */ for (c = p->children; c; c = c->next) if ((a = getatt(c->child, att))) return a; return 0; } static int att_getentbyatt(ZebraHandle zi, const Odr_oid *set, int att, const char **name) { data1_att *r; data1_attset *p; if (!(p = data1_attset_search_id (zi->reg->dh, set))) { zebraExplain_loadAttsets (zi->reg->dh, zi->res); p = data1_attset_search_id (zi->reg->dh, set); } if (!p) /* set undefined */ return -2; if (!(r = getatt(p, att))) return -1; *name = r->name; return 0; } ZEBRA_RES zebra_attr_list_get_ord(ZebraHandle zh, Z_AttributeList *attr_list, zinfo_index_category_t cat, const char *index_type, const Odr_oid *curAttributeSet, int *ord) { int use_value = -1; const char *use_string = 0; AttrType use; attr_init_AttrList(&use, attr_list, 1); use_value = attr_find_ex(&use, &curAttributeSet, &use_string); if (use_value < 0) { if (!use_string) use_string = "any"; } else { /* we have a use attribute and attribute set */ int r; r = att_getentbyatt(zh, curAttributeSet, use_value, &use_string); if (r == -2) { zebra_setError_zint(zh, YAZ_BIB1_UNSUPP_ATTRIBUTE_SET, 0); return ZEBRA_FAIL; } if (r == -1) { zebra_setError_zint(zh, YAZ_BIB1_UNSUPP_USE_ATTRIBUTE, use_value); return ZEBRA_FAIL; } } if (!use_string) { zebra_setError(zh, YAZ_BIB1_UNSUPP_USE_ATTRIBUTE, 0); return ZEBRA_FAIL; } *ord = zebraExplain_lookup_attr_str(zh->reg->zei, cat, index_type, use_string); if (*ord == -1) { /* attribute 14=1 does not issue a diagnostic even 1) the attribute is numeric but listed in .att 2) the use attribute is string */ AttrType unsup; int unsup_value = 0; attr_init_AttrList(&unsup, attr_list, 14); unsup_value = attr_find(&unsup, 0); if (unsup_value != 1) { if (use_value < 0) zebra_setError(zh, YAZ_BIB1_UNSUPP_USE_ATTRIBUTE, use_string); else zebra_setError_zint(zh, YAZ_BIB1_UNSUPP_USE_ATTRIBUTE, use_value); return ZEBRA_FAIL; } } return ZEBRA_OK; } ZEBRA_RES zebra_apt_get_ord(ZebraHandle zh, Z_AttributesPlusTerm *zapt, const char *index_type, const char *xpath_use, const Odr_oid *curAttributeSet, int *ord) { ZEBRA_RES res = ZEBRA_OK; AttrType relation; int relation_value; zinfo_index_category_t cat = zinfo_index_category_index; attr_init_APT(&relation, zapt, 2); relation_value = attr_find(&relation, NULL); if (relation_value == 103) /* always matches */ cat = zinfo_index_category_alwaysmatches; if (!xpath_use) { res = zebra_attr_list_get_ord(zh, zapt->attributes, cat, index_type, curAttributeSet, ord); /* use attribute not found. But it the relation is always matches and the regulare index attribute is found return a different diagnostic */ if (res != ZEBRA_OK && relation_value == 103 && zebra_attr_list_get_ord( zh, zapt->attributes, zinfo_index_category_index, index_type, curAttributeSet, ord) == ZEBRA_OK) zebra_setError_zint(zh, YAZ_BIB1_UNSUPP_RELATION_ATTRIBUTE, 103); } else { *ord = zebraExplain_lookup_attr_str(zh->reg->zei, cat, index_type, xpath_use); if (*ord == -1) { yaz_log(YLOG_LOG, "zebra_apt_get_ord FAILED xpath=%s index_type=%s", xpath_use, index_type); zebra_setError(zh, YAZ_BIB1_UNSUPP_USE_ATTRIBUTE, 0); res = ZEBRA_FAIL; } else { yaz_log(YLOG_LOG, "zebra_apt_get_ord OK xpath=%s index_type=%s", xpath_use, index_type); } } return res; } ZEBRA_RES zebra_sort_get_ord(ZebraHandle zh, Z_SortAttributes *sortAttributes, int *ord, int *numerical) { AttrType structure; int structure_value; attr_init_AttrList(&structure, sortAttributes->list, 4); *numerical = 0; structure_value = attr_find(&structure, 0); if (structure_value == 109) *numerical = 1; if (zebra_attr_list_get_ord( zh, sortAttributes->list, zinfo_index_category_sort, 0 /* any index */, yaz_oid_attset_bib_1, ord) == ZEBRA_OK) return ZEBRA_OK; return ZEBRA_FAIL; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/rank.h0000644000175000017500000000431311412332551012353 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef RANK_H #define RANK_H #include YAZ_BEGIN_CDECL struct rank_control { char *name; void *(*create)(ZebraHandle zh); void (*destroy)(struct zebra_register *reg, void *class_handle); void *(*begin)(struct zebra_register *reg, void *class_handle, RSET rset, NMEM nmem, TERMID *terms, int numterms); /* ### Could add parameters to begin: * char *index; // author, title, etc. * int dbsize; // number of records in database * int rssize; // number of records in result set (estimate?) */ void (*end)(struct zebra_register *reg, void *set_handle); int (*calc)(void *set_handle, zint sysno, zint staticrank, int *stop_flag); void (*add)(void *set_handle, int seqno, TERMID term); }; void zebraRankInstall (struct zebra_register *reg, struct rank_control *ctrl); ZebraRankClass zebraRankLookup (ZebraHandle zh, const char *name); void zebraRankDestroy (struct zebra_register *reg); /* declaring externally defined rank class structures */ /* remember to install rank classes in zebraapi.c as well!! */ extern struct rank_control *rank_1_class; extern struct rank_control *rank_2_class; extern struct rank_control *rank_zv_class; extern struct rank_control *rank_static_class; extern struct rank_control *rank_similarity_class; YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/dirs.c0000644000175000017500000001353611412332551012363 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include "index.h" #define DIRS_MAX_PATH 1024 struct dirs_info { Dict dict; int rw; int no_read; int no_cur; int no_max; struct dirs_entry *entries; char nextpath[DIRS_MAX_PATH]; char prefix[DIRS_MAX_PATH]; int prelen; struct dirs_entry *last_entry; int nextpath_deleted; }; static int dirs_client_proc(char *name, const char *info, int pos, void *client) { struct dirs_info *ci = (struct dirs_info *) client; struct dirs_entry *entry; if (memcmp(name, ci->prefix, ci->prelen)) return 1; if (ci->no_cur < 0) { ci->no_cur = 0; return 0; } assert(ci->no_cur < ci->no_max); entry = ci->entries + ci->no_cur; if (info[0] == sizeof(entry->sysno)+sizeof(entry->mtime)) { strcpy(entry->path, name + ci->prelen); entry->kind = dirs_file; memcpy(&entry->sysno, info+1, sizeof(entry->sysno)); memcpy(&entry->mtime, info+1+sizeof(entry->sysno), sizeof(entry->mtime)); ci->no_cur++; } else if (info[0] == sizeof(entry->mtime)) { strcpy(entry->path, name + ci->prelen); entry->kind = dirs_dir; memcpy(&entry->mtime, info+1, sizeof(entry->mtime)); ci->no_cur++; } return 0; } struct dirs_info *dirs_open(Dict dict, const char *rep, int rw) { struct dirs_info *p; int before = 0, after; yaz_log(YLOG_DEBUG, "dirs_open %s", rep); p = (struct dirs_info *) xmalloc(sizeof(*p)); p->dict = dict; p->rw = rw; strcpy(p->prefix, rep); p->prelen = strlen(p->prefix); strcpy(p->nextpath, rep); p->nextpath_deleted = 0; p->no_read = p->no_cur = 0; after = p->no_max = 100; p->entries = (struct dirs_entry *) xmalloc(sizeof(*p->entries) * (p->no_max)); yaz_log(YLOG_DEBUG, "dirs_open first scan"); dict_scan(p->dict, p->nextpath, &before, &after, p, dirs_client_proc); return p; } struct dirs_info *dirs_fopen(Dict dict, const char *path, int rw) { struct dirs_info *p; struct dirs_entry *entry; char *info; p = (struct dirs_info *) xmalloc(sizeof(*p)); p->dict = dict; p->rw = rw; *p->prefix = '\0'; p->entries = (struct dirs_entry *) xmalloc(sizeof(*p->entries)); p->no_read = 0; p->no_cur = 0; p->no_max = 2; entry = p->entries; info = dict_lookup(dict, path); if (info && info[0] == sizeof(entry->sysno)+sizeof(entry->mtime)) { strcpy(entry->path, path); entry->kind = dirs_file; memcpy(&entry->sysno, info+1, sizeof(entry->sysno)); memcpy(&entry->mtime, info+1+sizeof(entry->sysno), sizeof(entry->mtime)); p->no_cur++; } return p; } struct dirs_entry *dirs_read(struct dirs_info *p) { int before = 0, after = p->no_max+1; if (p->no_read < p->no_cur) { yaz_log(YLOG_DEBUG, "dirs_read %d. returns %s", p->no_read, (p->entries + p->no_read)->path); return p->last_entry = p->entries + (p->no_read++); } if (p->no_cur < p->no_max) return p->last_entry = NULL; if (p->nextpath_deleted) { p->no_cur = 0; after = p->no_max; } else { p->no_cur = -1; after = p->no_max + 1; } p->no_read = 1; p->nextpath_deleted = 0; yaz_log(YLOG_DEBUG, "dirs_read rescan %s", p->nextpath); dict_scan(p->dict, p->nextpath, &before, &after, p, dirs_client_proc); if (p->no_read <= p->no_cur) return p->last_entry = p->entries; return p->last_entry = NULL; } struct dirs_entry *dirs_last(struct dirs_info *p) { return p->last_entry; } void dirs_mkdir(struct dirs_info *p, const char *src, time_t mtime) { char path[DIRS_MAX_PATH]; sprintf(path, "%s%s", p->prefix, src); yaz_log(YLOG_DEBUG, "dirs_mkdir %s", path); if (p->rw) dict_insert(p->dict, path, sizeof(mtime), &mtime); } void dirs_rmdir(struct dirs_info *p, const char *src) { char path[DIRS_MAX_PATH]; sprintf(path, "%s%s", p->prefix, src); yaz_log(YLOG_DEBUG, "dirs_rmdir %s", path); if (p->rw) dict_delete(p->dict, path); } void dirs_add(struct dirs_info *p, const char *src, zint sysno, time_t mtime) { char path[DIRS_MAX_PATH]; char info[16]; sprintf(path, "%s%s", p->prefix, src); yaz_log(YLOG_DEBUG, "dirs_add %s", path); memcpy(info, &sysno, sizeof(sysno)); memcpy(info+sizeof(sysno), &mtime, sizeof(mtime)); if (p->rw) dict_insert(p->dict, path, sizeof(sysno)+sizeof(mtime), info); } void dirs_del(struct dirs_info *p, const char *src) { char path[DIRS_MAX_PATH]; sprintf(path, "%s%s", p->prefix, src); yaz_log(YLOG_DEBUG, "dirs_del %s", path); if (p->rw) { if (!strcmp(path, p->nextpath)) p->nextpath_deleted = 1; dict_delete(p->dict, path); } } void dirs_free(struct dirs_info **pp) { struct dirs_info *p = *pp; xfree(p->entries); xfree(p); *pp = NULL; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/reckeys.h0000644000175000017500000000334211412332551013066 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef RECKEYS_H #define RECKEYS_H #include #include "it_key.h" YAZ_BEGIN_CDECL typedef struct zebra_rec_keys_t_ *zebra_rec_keys_t; zebra_rec_keys_t zebra_rec_keys_open(void); void zebra_rec_keys_close(zebra_rec_keys_t p); void zebra_rec_keys_write(zebra_rec_keys_t keys, const char *str, size_t slen, const struct it_key *key); void zebra_rec_keys_reset(zebra_rec_keys_t keys); int zebra_rec_keys_read(zebra_rec_keys_t keys, const char **str, size_t *slen, struct it_key *key); int zebra_rec_keys_rewind(zebra_rec_keys_t keys); int zebra_rec_keys_empty(zebra_rec_keys_t keys); void zebra_rec_keys_get_buf(zebra_rec_keys_t p, char **buf, size_t *sz); void zebra_rec_keys_set_buf(zebra_rec_keys_t p, char *buf, size_t sz, int copy_buf); zint zebra_rec_keys_get_custom_record_id(zebra_rec_keys_t keys); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/mod_grs_sgml.c0000644000175000017500000000635711412332551014101 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include struct sgml_getc_info { char *buf; int buf_size; int size; int off; struct ZebraRecStream *stream; off_t moffset; WRBUF wrbuf; }; int sgml_getc (void *clientData) { struct sgml_getc_info *p = (struct sgml_getc_info *) clientData; int res; if (p->off < p->size) return p->buf[(p->off)++]; if (p->size < p->buf_size) return 0; p->moffset += p->off; p->off = 0; p->size = 0; res = p->stream->readf(p->stream, p->buf, p->buf_size); if (res > 0) { p->size += res; return p->buf[(p->off)++]; } return 0; } static data1_node *grs_read_sgml (struct grs_read_info *p) { struct sgml_getc_info *sgi = (struct sgml_getc_info *) p->clientData; data1_node *node; int res; sgi->moffset = p->stream->tellf(p->stream); sgi->stream = p->stream; sgi->off = 0; sgi->size = 0; res = sgi->stream->readf(sgi->stream, sgi->buf, sgi->buf_size); if (res > 0) sgi->size += res; else return 0; node = data1_read_nodex(p->dh, p->mem, sgml_getc, sgi, sgi->wrbuf); if (node && p->stream->endf) { off_t end_offset = sgi->moffset + sgi->off; p->stream->endf(sgi->stream, &end_offset); } return node; } static void *grs_init_sgml(Res res, RecType recType) { struct sgml_getc_info *p = (struct sgml_getc_info *) xmalloc (sizeof(*p)); p->buf_size = 512; p->buf = xmalloc (p->buf_size); p->wrbuf = wrbuf_alloc(); return p; } static ZEBRA_RES grs_config_sgml(void *clientData, Res res, const char *args) { return ZEBRA_OK; } static void grs_destroy_sgml(void *clientData) { struct sgml_getc_info *p = (struct sgml_getc_info *) clientData; wrbuf_destroy(p->wrbuf); xfree(p->buf); xfree(p); } static int grs_extract_sgml(void *clientData, struct recExtractCtrl *ctrl) { return zebra_grs_extract(clientData, ctrl, grs_read_sgml); } static int grs_retrieve_sgml(void *clientData, struct recRetrieveCtrl *ctrl) { return zebra_grs_retrieve(clientData, ctrl, grs_read_sgml); } static struct recType grs_type_sgml = { 0, "grs.sgml", grs_init_sgml, grs_config_sgml, grs_destroy_sgml, grs_extract_sgml, grs_retrieve_sgml }; RecType #ifdef IDZEBRA_STATIC_GRS_SGML idzebra_filter_grs_sgml #else idzebra_filter #endif [] = { &grs_type_sgml, 0, }; /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/zaptterm.c0000644000175000017500000000510011412332551013254 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include "index.h" #include /* convert APT search term to UTF8 */ ZEBRA_RES zapt_term_to_utf8(ZebraHandle zh, Z_AttributesPlusTerm *zapt, char *termz) { size_t sizez; Z_Term *term = zapt->term; switch (term->which) { case Z_Term_general: if (zh->iconv_to_utf8 != 0) { char *inbuf = (char *) term->u.general->buf; size_t inleft = term->u.general->len; char *outbuf = termz; size_t outleft = IT_MAX_WORD-1; size_t ret; ret = yaz_iconv(zh->iconv_to_utf8, &inbuf, &inleft, &outbuf, &outleft); if (ret == (size_t)(-1)) { ret = yaz_iconv(zh->iconv_to_utf8, 0, 0, 0, 0); zebra_setError( zh, YAZ_BIB1_QUERY_TERM_INCLUDES_CHARS_THAT_DO_NOT_TRANSLATE_INTO_, 0); return ZEBRA_FAIL; } yaz_iconv(zh->iconv_to_utf8, 0, 0, &outbuf, &outleft); *outbuf = 0; } else { sizez = term->u.general->len; if (sizez > IT_MAX_WORD-1) sizez = IT_MAX_WORD-1; memcpy (termz, term->u.general->buf, sizez); termz[sizez] = '\0'; } break; case Z_Term_characterString: sizez = strlen(term->u.characterString); if (sizez > IT_MAX_WORD-1) sizez = IT_MAX_WORD-1; memcpy (termz, term->u.characterString, sizez); termz[sizez] = '\0'; break; default: zebra_setError(zh, YAZ_BIB1_UNSUPP_CODED_VALUE_FOR_TERM, 0); return ZEBRA_FAIL; } return ZEBRA_OK; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/key_block.c0000644000175000017500000002530711412332551013363 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #if YAZ_POSIX_THREADS #include #endif #include "key_block.h" #include #include struct zebra_key_block { char **key_buf; size_t ptr_top; size_t ptr_i; size_t key_buf_used; int key_file_no; char *key_tmp_dir; int use_threads; char **alt_buf; #if YAZ_POSIX_THREADS char **thread_key_buf; size_t thread_ptr_top; size_t thread_ptr_i; int exit_flag; pthread_t thread_id; pthread_mutex_t mutex; pthread_cond_t work_available; pthread_cond_t cond_sorting; int is_sorting; #endif }; #define ENCODE_BUFLEN 768 struct encode_info { void *encode_handle; void *decode_handle; char buf[ENCODE_BUFLEN]; }; #define USE_SHELLSORT 0 #if USE_SHELLSORT static void shellsort(void *ar, int r, size_t s, int (*cmp)(const void *a, const void *b)) { char *a = ar; char v[100]; int h, i, j, k; static const int incs[16] = { 1391376, 463792, 198768, 86961, 33936, 13776, 4592, 1968, 861, 336, 112, 48, 21, 7, 3, 1 }; for ( k = 0; k < 16; k++) for (h = incs[k], i = h; i < r; i++) { memcpy (v, a+s*i, s); j = i; while (j > h && (*cmp)(a + s*(j-h), v) > 0) { memcpy (a + s*j, a + s*(j-h), s); j -= h; } memcpy (a+s*j, v, s); } } #endif static void encode_key_init(struct encode_info *i) { i->encode_handle = iscz1_start(); i->decode_handle = iscz1_start(); } static void encode_key_write(const char *k, struct encode_info *i, FILE *outf) { struct it_key key; char *bp = i->buf, *bp0; const char *src = (char *) &key; size_t klen = strlen(k); if (fwrite (k, klen+1, 1, outf) != 1) { yaz_log (YLOG_FATAL|YLOG_ERRNO, "fwrite"); zebra_exit("encode_key_write"); } k = k + klen+1; /* and copy & align key so we can mangle */ memcpy (&key, k+1, sizeof(struct it_key)); /* *k is insert/delete */ #if 0 /* debugging */ key_logdump_txt(YLOG_LOG, &key, *k ? "i" : "d"); #endif assert(key.mem[0] >= 0); bp0 = bp++; iscz1_encode(i->encode_handle, &bp, &src); *bp0 = (*k * 128) + bp - bp0 - 1; /* length and insert/delete combined */ if (fwrite (i->buf, bp - i->buf, 1, outf) != 1) { yaz_log (YLOG_FATAL|YLOG_ERRNO, "fwrite"); zebra_exit("encode_key_write"); } #if 0 /* debugging */ if (1) { struct it_key key2; const char *src = bp0+1; char *dst = (char*) &key2; iscz1_decode(i->decode_handle, &dst, &src); key_logdump_txt(YLOG_LOG, &key2, *k ? "i" : "d"); assert(key2.mem[1]); } #endif } static void encode_key_flush (struct encode_info *i, FILE *outf) { iscz1_stop(i->encode_handle); iscz1_stop(i->decode_handle); } void key_block_flush_int(zebra_key_block_t p, char **key_buf, size_t ptr_top, size_t ptr_i); #if YAZ_POSIX_THREADS static void *thread_func(void *vp) { zebra_key_block_t p = (zebra_key_block_t) vp; while (1) { pthread_mutex_lock(&p->mutex); while (!p->is_sorting && !p->exit_flag) pthread_cond_wait(&p->work_available, &p->mutex); if (p->exit_flag) break; pthread_mutex_unlock(&p->mutex); key_block_flush_int(p, p->thread_key_buf, p->thread_ptr_top, p->thread_ptr_i); pthread_mutex_lock(&p->mutex); p->is_sorting = 0; pthread_cond_signal(&p->cond_sorting); pthread_mutex_unlock(&p->mutex); } pthread_mutex_unlock(&p->mutex); return 0; } #endif zebra_key_block_t key_block_create(int mem, const char *key_tmp_dir, int use_threads) { zebra_key_block_t p = xmalloc(sizeof(*p)); #if YAZ_POSIX_THREADS /* we'll be making two memory areas so cut in half */ if (use_threads) mem = mem / 2; #endif p->key_buf = (char**) xmalloc (mem); p->ptr_top = mem/sizeof(char*); p->ptr_i = 0; p->key_buf_used = 0; p->key_tmp_dir = xstrdup(key_tmp_dir); p->key_file_no = 0; p->alt_buf = 0; p->use_threads = 0; if (use_threads) { #if YAZ_POSIX_THREADS p->use_threads = use_threads; p->is_sorting = 0; p->exit_flag = 0; pthread_mutex_init(&p->mutex, 0); pthread_cond_init(&p->work_available, 0); pthread_cond_init(&p->cond_sorting, 0); pthread_create(&p->thread_id, 0, thread_func, p); p->alt_buf = (char**) xmalloc (mem); #endif } yaz_log(YLOG_DEBUG, "key_block_create t=%d", p->use_threads); return p; } void key_block_destroy(zebra_key_block_t *pp) { zebra_key_block_t p = *pp; if (p) { if (p->use_threads) { #if YAZ_POSIX_THREADS pthread_mutex_lock(&p->mutex); while (p->is_sorting) pthread_cond_wait(&p->cond_sorting, &p->mutex); p->exit_flag = 1; pthread_cond_broadcast(&p->work_available); pthread_mutex_unlock(&p->mutex); pthread_join(p->thread_id, 0); pthread_cond_destroy(&p->work_available); pthread_cond_destroy(&p->cond_sorting); pthread_mutex_destroy(&p->mutex); #endif xfree(p->alt_buf); } xfree(p->key_buf); xfree(p->key_tmp_dir); xfree(p); *pp = 0; } } void key_block_write(zebra_key_block_t p, zint sysno, struct it_key *key_in, int cmd, const char *str_buf, size_t str_len, zint staticrank, int static_rank_enable) { int ch; int i, j = 0; struct it_key key_out; if (p->key_buf_used + 1024 > (p->ptr_top -p->ptr_i)*sizeof(char*)) key_block_flush(p, 0); ++(p->ptr_i); assert(p->ptr_i > 0); (p->key_buf)[p->ptr_top - p->ptr_i] = (char*)p->key_buf + p->key_buf_used; /* key_in->mem[0] ord/ch */ /* key_in->mem[1] filter specified record ID */ /* encode the ordinal value (field/use/attribute) .. */ ch = CAST_ZINT_TO_INT(key_in->mem[0]); p->key_buf_used += key_SU_encode(ch, (char*)p->key_buf + p->key_buf_used); /* copy the 0-terminated stuff from str to output */ memcpy((char*)p->key_buf + p->key_buf_used, str_buf, str_len); p->key_buf_used += str_len; ((char*)p->key_buf)[(p->key_buf_used)++] = '\0'; /* the delete/insert indicator */ ((char*)p->key_buf)[(p->key_buf_used)++] = cmd; if (static_rank_enable) { assert(staticrank >= 0); key_out.mem[j++] = staticrank; } if (key_in->mem[1]) /* filter specified record ID */ key_out.mem[j++] = key_in->mem[1]; else key_out.mem[j++] = sysno; for (i = 2; i < key_in->len; i++) key_out.mem[j++] = key_in->mem[i]; key_out.len = j; memcpy((char*)p->key_buf + p->key_buf_used, &key_out, sizeof(key_out)); (p->key_buf_used) += sizeof(key_out); } void key_block_flush_int(zebra_key_block_t p, char **key_buf, size_t ptr_top, size_t ptr_i) { FILE *outf; char out_fname[200]; char *prevcp, *cp; struct encode_info encode_info; if (ptr_i == 0) return ; (p->key_file_no)++; yaz_log(YLOG_DEBUG, "sorting section %d", (p->key_file_no)); assert(ptr_i > 0); #if USE_SHELLSORT shellsort(key_buf + ptr_top - ptr_i, ptr_i, sizeof(char*), key_qsort_compare); #else qsort(key_buf + ptr_top - ptr_i, ptr_i, sizeof(char*), key_qsort_compare); #endif sprintf(out_fname, "%s/key%d.tmp", p->key_tmp_dir, p->key_file_no); if (!(outf = fopen (out_fname, "wb"))) { yaz_log (YLOG_FATAL|YLOG_ERRNO, "fopen %s", out_fname); zebra_exit("key_block_flush"); } yaz_log(YLOG_DEBUG, "writing section %d", p->key_file_no); prevcp = cp = (key_buf)[ptr_top - ptr_i]; encode_key_init (&encode_info); encode_key_write (cp, &encode_info, outf); while (--ptr_i > 0) { cp = (key_buf)[ptr_top - ptr_i]; if (strcmp (cp, prevcp)) { encode_key_flush ( &encode_info, outf); encode_key_init (&encode_info); encode_key_write (cp, &encode_info, outf); prevcp = cp; } else encode_key_write (cp + strlen(cp), &encode_info, outf); } encode_key_flush ( &encode_info, outf); if (fclose (outf)) { yaz_log (YLOG_FATAL|YLOG_ERRNO, "fclose %s", out_fname); zebra_exit("key_block_flush"); } yaz_log(YLOG_DEBUG, "finished section %d", p->key_file_no); } void key_block_flush(zebra_key_block_t p, int is_final) { if (!p) return; if (p->use_threads) { #if YAZ_POSIX_THREADS char **tmp; pthread_mutex_lock(&p->mutex); while (p->is_sorting) pthread_cond_wait(&p->cond_sorting, &p->mutex); p->is_sorting = 1; p->thread_ptr_top = p->ptr_top; p->thread_ptr_i = p->ptr_i; p->thread_key_buf = p->key_buf; tmp = p->key_buf; p->key_buf = p->alt_buf; p->alt_buf = tmp; pthread_cond_signal(&p->work_available); if (is_final) { while (p->is_sorting) pthread_cond_wait(&p->cond_sorting, &p->mutex); } pthread_mutex_unlock(&p->mutex); #endif } else key_block_flush_int(p, p->key_buf, p->ptr_top, p->ptr_i); p->ptr_i = 0; p->key_buf_used = 0; } int key_block_get_no_files(zebra_key_block_t p) { if (p) return p->key_file_no; return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/invstat.c0000644000175000017500000002140711412332551013106 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include "index.h" struct inv_stat_info { ZebraHandle zh; zint no_isam_entries[9]; int no_dict_entries; int no_dict_bytes; int isam_bounds[20]; int isam_occurrences[20]; char tmp[128]; int isamb_levels[10][5]; zint isamb_sizes[10]; zint isamb_blocks[10]; unsigned long cksum; int dumpwords; }; #define SINGLETON_TYPE 8 /* the type to use for singletons that */ /* have no block and no block type */ static void print_dict_item (ZebraHandle zh, const char *s, zint count, int firstsys, int firstseq, int lastsys, int lastseq ) { char dst[IT_MAX_WORD+1]; int ord; int len = key_SU_decode(&ord, (const unsigned char *) s); const char *index_type; const char *db = 0; if (!zh) *dst = '\0'; else { zebraExplain_lookup_ord (zh->reg->zei, ord, &index_type, &db, 0); zebra_term_untrans(zh, index_type, dst, s + len); } printf("%02d:%10" ZINT_FORMAT0 " %s %d.%d - %d.%d\n", ord, count, dst, firstsys, firstseq, lastsys, lastseq); } static int inv_stat_handle (char *name, const char *info, int pos, void *client) { zint occur = 0; int i = 0; struct inv_stat_info *stat_info = (struct inv_stat_info*) client; ISAM_P isam_p; int firstsys=-1; int firstseq=-1; int lastsys=-1; int lastseq=-1; stat_info->no_dict_entries++; stat_info->no_dict_bytes += strlen(name); assert (*info == sizeof(ISAM_P)); memcpy (&isam_p, info+1, sizeof(ISAM_P)); if (stat_info->zh->reg->isams) { ISAMS_PP pp; int occurx = 0; struct it_key key; pp = isams_pp_open (stat_info->zh->reg->isams, isam_p); occur = isams_pp_num (pp); while (isams_pp_read(pp, &key)) { occurx++; } assert (occurx == occur); stat_info->no_isam_entries[0] += occur; isams_pp_close (pp); } if (stat_info->zh->reg->isamc) { ISAMC_PP pp; zint occurx = 0; struct it_key key; pp = isamc_pp_open (stat_info->zh->reg->isamc, isam_p); occur = isamc_pp_num (pp); while (isamc_pp_read(pp, &key)) { occurx++; } assert (occurx == occur); stat_info->no_isam_entries[isamc_type(isam_p)] += occur; isamc_pp_close (pp); } if (stat_info->zh->reg->isamb) { ISAMB_PP pp; struct it_key key; int cat = CAST_ZINT_TO_INT(isam_p & 3); int level; zint size; zint blocks; pp = isamb_pp_open_x(stat_info->zh->reg->isamb, isam_p, &level, 0); while (isamb_pp_read(pp, &key)) { occur++; } isamb_pp_close_x (pp, &size, &blocks); stat_info->isamb_blocks[cat] += blocks; stat_info->isamb_sizes[cat] += size; if (level > 4) level = 4; stat_info->isamb_levels[cat][level] ++; stat_info->no_isam_entries[cat] += occur; } i=0; while (occur > stat_info->isam_bounds[i] && stat_info->isam_bounds[i]) i++; ++(stat_info->isam_occurrences[i]); if (stat_info->dumpwords) print_dict_item(stat_info->zh, name, occur, firstsys, firstseq, lastsys, lastseq); return 0; } static void show_bfs_stats(BFiles bfs) { int i = 0; const char *directory = 0; double used_bytes, max_bytes; printf("Register:\n"); while (bfs_register_directory_stat(bfs, i, &directory, &used_bytes, &max_bytes)) { printf ("%s %10.0lf %10.0lf\n", directory, used_bytes, max_bytes); i++; } i = 0; printf("Shadow:\n"); while (bfs_shadow_directory_stat(bfs, i, &directory, &used_bytes, &max_bytes)) { printf ("%s %10.0lf %10.0lf\n", directory, used_bytes, max_bytes); i++; } } int zebra_register_statistics (ZebraHandle zh, int dumpdict) { int i, prev; int before = 0; zint occur; int after = 1000000000; struct inv_stat_info stat_info; char term_dict[2*IT_MAX_WORD+2]; if (zebra_begin_read (zh)) return 1; show_bfs_stats(zebra_get_bfs(zh)); stat_info.zh = zh; stat_info.dumpwords=dumpdict; term_dict[0] = 1; term_dict[1] = 0; for (i = 0; i<=SINGLETON_TYPE; i++) stat_info.no_isam_entries[i] = 0; stat_info.no_dict_entries = 0; stat_info.no_dict_bytes = 0; stat_info.isam_bounds[0] = 1; stat_info.isam_bounds[1] = 2; stat_info.isam_bounds[2] = 3; stat_info.isam_bounds[3] = 6; stat_info.isam_bounds[4] = 10; stat_info.isam_bounds[5] = 20; stat_info.isam_bounds[6] = 30; stat_info.isam_bounds[7] = 50; stat_info.isam_bounds[8] = 100; stat_info.isam_bounds[9] = 200; stat_info.isam_bounds[10] = 5000; stat_info.isam_bounds[11] = 10000; stat_info.isam_bounds[12] = 20000; stat_info.isam_bounds[13] = 50000; stat_info.isam_bounds[14] = 100000; stat_info.isam_bounds[15] = 200000; stat_info.isam_bounds[16] = 500000; stat_info.isam_bounds[17] = 1000000; stat_info.isam_bounds[18] = 0; stat_info.cksum = 0; for (i = 0; i<20; i++) stat_info.isam_occurrences[i] = 0; for (i = 0; i<10; i++) { int j; for (j = 0; j<5; j++) stat_info.isamb_levels[i][j] = 0; stat_info.isamb_sizes[i] = 0; stat_info.isamb_blocks[i] = 0; } dict_scan (zh->reg->dict, term_dict, &before, &after, &stat_info, inv_stat_handle); if (zh->reg->isamc) { fprintf (stdout, " Blocks Occur Size KB Bytes/Entry\n"); for (i = 0; isamc_block_used (zh->reg->isamc, i) >= 0; i++) { fprintf (stdout, " %8" ZINT_FORMAT0 " %8" ZINT_FORMAT0, isamc_block_used (zh->reg->isamc, i), stat_info.no_isam_entries[i]); if (stat_info.no_isam_entries[i]) fprintf(stdout, " %8d %f", (int) ((1023.0 + (double) isamc_block_used(zh->reg->isamc, i) * isamc_block_size(zh->reg->isamc,i))/1024), ((double) isamc_block_used(zh->reg->isamc, i) * isamc_block_size(zh->reg->isamc,i))/ stat_info.no_isam_entries[i]); fprintf (stdout, "\n"); } } if (zh->reg->isamb) { for (i = 0; i<4; i++) { int j; int bsize = isamb_block_info(zh->reg->isamb, i); if (bsize < 0) break; fprintf (stdout, "Category %d\n", i); fprintf (stdout, "Block size %d\n", bsize); fprintf (stdout, "Blocks: " ZINT_FORMAT "\n", stat_info.isamb_blocks[i]); fprintf (stdout, "Size: " ZINT_FORMAT "\n", stat_info.isamb_sizes[i]); fprintf (stdout, "Entries: " ZINT_FORMAT "\n", stat_info.no_isam_entries[i]); fprintf (stdout, "Total " ZINT_FORMAT "\n", stat_info.isamb_blocks[i]* bsize); for (j = 0; j<5; j++) if (stat_info.isamb_levels[i][j]) fprintf (stdout, "Level%d %d\n", j, stat_info.isamb_levels[i][j]); fprintf (stdout, "\n"); } } fprintf (stdout, "Checksum %08lX\n", stat_info.cksum); fprintf (stdout, "Distinct words %d\n", stat_info.no_dict_entries); occur = 0; for (i = 0; i<9; i++) occur += stat_info.no_isam_entries[i]; fprintf (stdout, "Word pos " ZINT_FORMAT "\n", occur); fprintf (stdout, " Occurrences Words\n"); prev = 1; for (i = 0; stat_info.isam_bounds[i]; i++) { int here = stat_info.isam_bounds[i]; fprintf (stdout, "%7d-%-7d %7d\n", prev, here, stat_info.isam_occurrences[i]); prev = here+1; } fprintf (stdout, "%7d- %7d\n", prev, stat_info.isam_occurrences[i]); rec_prstat(zh->reg->records, 0); xmalloc_trav("unfreed"); /*! while hunting memory leaks */ zebra_end_read (zh); return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/stream.c0000644000175000017500000001037611412332551012714 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #ifdef WIN32 #include #include #endif #if HAVE_UNISTD_H #include #endif #include "index.h" struct zebra_mem_control { off_t offset_end; off_t record_int_pos; const char *record_int_buf; int record_int_len; }; struct zebra_ext_control { off_t offset_end; off_t record_offset; int fd; }; static off_t zebra_mem_seek(struct ZebraRecStream *s, off_t offset) { struct zebra_mem_control *fc = (struct zebra_mem_control *) s->fh; return (off_t) (fc->record_int_pos = offset); } static off_t zebra_mem_tell(struct ZebraRecStream *s) { struct zebra_mem_control *fc = (struct zebra_mem_control *) s->fh; return (off_t) fc->record_int_pos; } static int zebra_mem_read(struct ZebraRecStream *s, char *buf, size_t count) { struct zebra_mem_control *fc = (struct zebra_mem_control *) s->fh; int l = fc->record_int_len - fc->record_int_pos; if (l <= 0) return 0; l = (l < (int) count) ? l : (int) count; memcpy (buf, fc->record_int_buf + fc->record_int_pos, l); fc->record_int_pos += l; return l; } static off_t zebra_mem_end(struct ZebraRecStream *s, off_t *offset) { struct zebra_mem_control *fc = (struct zebra_mem_control *) s->fh; if (offset) fc->offset_end = *offset; return fc->offset_end; } static void zebra_mem_destroy(struct ZebraRecStream *s) { struct zebra_mem_control *fc = s->fh; xfree(fc); } static int zebra_ext_read(struct ZebraRecStream *s, char *buf, size_t count) { struct zebra_ext_control *fc = (struct zebra_ext_control *) s->fh; return read(fc->fd, buf, count); } static off_t zebra_ext_seek(struct ZebraRecStream *s, off_t offset) { struct zebra_ext_control *fc = (struct zebra_ext_control *) s->fh; return lseek(fc->fd, offset + fc->record_offset, SEEK_SET); } static off_t zebra_ext_tell(struct ZebraRecStream *s) { struct zebra_ext_control *fc = (struct zebra_ext_control *) s->fh; return lseek(fc->fd, 0, SEEK_CUR) - fc->record_offset; } static void zebra_ext_destroy(struct ZebraRecStream *s) { struct zebra_ext_control *fc = s->fh; if (fc->fd != -1) close(fc->fd); xfree(fc); } static off_t zebra_ext_end(struct ZebraRecStream *s, off_t *offset) { struct zebra_ext_control *fc = (struct zebra_ext_control *) s->fh; if (offset) fc->offset_end = *offset; return fc->offset_end; } void zebra_create_stream_mem(struct ZebraRecStream *stream, const char *buf, size_t sz) { struct zebra_mem_control *fc = xmalloc(sizeof(*fc)); fc->record_int_buf = buf; fc->record_int_len = sz; fc->record_int_pos = 0; fc->offset_end = 0; stream->fh = fc; stream->readf = zebra_mem_read; stream->seekf = zebra_mem_seek; stream->tellf = zebra_mem_tell; stream->endf = zebra_mem_end; stream->destroy = zebra_mem_destroy; } void zebra_create_stream_fd(struct ZebraRecStream *stream, int fd, off_t start_offset) { struct zebra_ext_control *fc = xmalloc(sizeof(*fc)); fc->fd = fd; fc->record_offset = start_offset; fc->offset_end = 0; stream->fh = fc; stream->readf = zebra_ext_read; stream->seekf = zebra_ext_seek; stream->tellf = zebra_ext_tell; stream->endf = zebra_ext_end; stream->destroy = zebra_ext_destroy; zebra_ext_seek(stream, 0); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/extract.c0000644000175000017500000015622211412332551013074 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** \file \brief indexes records and extract tokens for indexing and sorting */ #include #include #include #ifdef WIN32 #include #endif #if HAVE_UNISTD_H #include #endif #include #include "index.h" #include "orddict.h" #include #include #include static int log_level_extract = 0; static int log_level_details = 0; static int log_level_initialized = 0; /* 1 if we use eliminitate identical delete/insert keys */ /* eventually this the 0-case code will be removed */ #define FLUSH2 1 void extract_flush_record_keys2(ZebraHandle zh, zint sysno, zebra_rec_keys_t ins_keys, zint ins_rank, zebra_rec_keys_t del_keys, zint del_rank); static void zebra_init_log_level(void) { if (!log_level_initialized) { log_level_initialized = 1; log_level_extract = yaz_log_module_level("extract"); log_level_details = yaz_log_module_level("indexdetails"); } } static WRBUF wrbuf_hex_str(const char *cstr) { size_t i; WRBUF w = wrbuf_alloc(); for (i = 0; cstr[i]; i++) { if (cstr[i] < ' ' || cstr[i] > 126) wrbuf_printf(w, "\\%02X", cstr[i] & 0xff); else wrbuf_putc(w, cstr[i]); } return w; } static void extract_flush_sort_keys(ZebraHandle zh, zint sysno, int cmd, zebra_rec_keys_t skp); static void extract_schema_add(struct recExtractCtrl *p, Odr_oid *oid); static void extract_token_add(RecWord *p); static void check_log_limit(ZebraHandle zh) { if (zh->records_processed + zh->records_skipped == zh->m_file_verbose_limit) { yaz_log(YLOG_LOG, "More than %d file log entries. Omitting rest", zh->m_file_verbose_limit); } } static void logRecord(ZebraHandle zh) { check_log_limit(zh); ++zh->records_processed; if (!(zh->records_processed % 1000)) { yaz_log(YLOG_LOG, "Records: "ZINT_FORMAT" i/u/d " ZINT_FORMAT"/"ZINT_FORMAT"/"ZINT_FORMAT, zh->records_processed, zh->records_inserted, zh->records_updated, zh->records_deleted); } } static void init_extractCtrl(ZebraHandle zh, struct recExtractCtrl *ctrl) { ctrl->flagShowRecords = !zh->m_flag_rw; } static void extract_add_index_string(RecWord *p, zinfo_index_category_t cat, const char *str, int length); static void extract_set_store_data_prepare(struct recExtractCtrl *p); static void extract_init(struct recExtractCtrl *p, RecWord *w) { w->seqno = 1; w->index_name = "any"; w->index_type = "w"; w->extractCtrl = p; w->record_id = 0; w->section_id = 0; w->segment = 0; } struct snip_rec_info { ZebraHandle zh; zebra_snippets *snippets; }; static void snippet_add_complete_field(RecWord *p, int ord, zebra_map_t zm) { struct snip_rec_info *h = p->extractCtrl->handle; const char *b = p->term_buf; char buf[IT_MAX_WORD+1]; const char **map = 0; int i = 0, remain = p->term_len; const char *start = b; const char *last = 0; if (remain > 0) map = zebra_maps_input(zm, &b, remain, 1); while (remain > 0 && i < IT_MAX_WORD) { while (map && *map && **map == *CHR_SPACE) { remain = p->term_len - (b - p->term_buf); if (i == 0) start = b; /* set to first non-ws area */ if (remain > 0) { int first = i ? 0 : 1; /* first position */ map = zebra_maps_input(zm, &b, remain, first); } else map = 0; } if (!map) break; if (i && i < IT_MAX_WORD) buf[i++] = *CHR_SPACE; while (map && *map && **map != *CHR_SPACE) { const char *cp = *map; if (**map == *CHR_CUT) { i = 0; } else { if (i >= IT_MAX_WORD) break; while (i < IT_MAX_WORD && *cp) buf[i++] = *(cp++); } last = b; remain = p->term_len - (b - p->term_buf); if (remain > 0) { map = zebra_maps_input(zm, &b, remain, 0); } else map = 0; } } if (!i) return; if (last && start != last && zebra_maps_is_index(zm)) zebra_snippets_appendn(h->snippets, p->seqno, 0, ord, start, last - start); } static void snippet_add_incomplete_field(RecWord *p, int ord, zebra_map_t zm) { struct snip_rec_info *h = p->extractCtrl->handle; const char *b = p->term_buf; int remain = p->term_len; int first = 1; const char **map = 0; const char *start = b; const char *last = b; if (remain > 0) map = zebra_maps_input(zm, &b, remain, 0); while (map) { char buf[IT_MAX_WORD+1]; int i, remain; /* Skip spaces */ while (map && *map && **map == *CHR_SPACE) { remain = p->term_len - (b - p->term_buf); last = b; if (remain > 0) map = zebra_maps_input(zm, &b, remain, 0); else map = 0; } if (!map) break; if (start != last && zebra_maps_is_index(zm)) { zebra_snippets_appendn(h->snippets, p->seqno, 1, ord, start, last - start); } start = last; i = 0; while (map && *map && **map != *CHR_SPACE) { const char *cp = *map; while (i < IT_MAX_WORD && *cp) buf[i++] = *(cp++); remain = p->term_len - (b - p->term_buf); last = b; if (remain > 0) map = zebra_maps_input(zm, &b, remain, 0); else map = 0; } if (!i) return; if (first) { first = 0; if (zebra_maps_is_first_in_field(zm)) { /* first in field marker */ p->seqno++; } } if (start != last && zebra_maps_is_index(zm)) zebra_snippets_appendn(h->snippets, p->seqno, 0, ord, start, last - start); start = last; p->seqno++; } } static void snippet_add_icu(RecWord *p, int ord, zebra_map_t zm) { struct snip_rec_info *h = p->extractCtrl->handle; const char *res_buf = 0; size_t res_len = 0; const char *display_buf = 0; size_t display_len = 0; zebra_map_tokenize_start(zm, p->term_buf, p->term_len); while (zebra_map_tokenize_next(zm, &res_buf, &res_len, &display_buf, &display_len)) { if (zebra_maps_is_index(zm)) zebra_snippets_appendn(h->snippets, p->seqno, 0, ord, display_buf, display_len); p->seqno++; } } static void snippet_token_add(RecWord *p) { struct snip_rec_info *h = p->extractCtrl->handle; ZebraHandle zh = h->zh; zebra_map_t zm = zebra_map_get_or_add(zh->reg->zebra_maps, p->index_type); if (zm) { ZebraExplainInfo zei = zh->reg->zei; int ch = zebraExplain_lookup_attr_str( zei, zinfo_index_category_index, p->index_type, p->index_name); if (zebra_maps_is_icu(zm)) snippet_add_icu(p, ch, zm); else { if (zebra_maps_is_complete(zm)) snippet_add_complete_field(p, ch, zm); else snippet_add_incomplete_field(p, ch, zm); } } } static void snippet_schema_add( struct recExtractCtrl *p, Odr_oid *oid) { } void extract_snippet(ZebraHandle zh, zebra_snippets *sn, struct ZebraRecStream *stream, RecType rt, void *recTypeClientData) { struct recExtractCtrl extractCtrl; struct snip_rec_info info; int r; extractCtrl.stream = stream; extractCtrl.first_record = 1; extractCtrl.init = extract_init; extractCtrl.tokenAdd = snippet_token_add; extractCtrl.schemaAdd = snippet_schema_add; assert(zh->reg); assert(zh->reg->dh); extractCtrl.dh = zh->reg->dh; info.zh = zh; info.snippets = sn; extractCtrl.handle = &info; extractCtrl.match_criteria[0] = '\0'; extractCtrl.staticrank = 0; extractCtrl.action = action_insert; init_extractCtrl(zh, &extractCtrl); extractCtrl.setStoreData = 0; r = (*rt->extract)(recTypeClientData, &extractCtrl); } static void searchRecordKey(ZebraHandle zh, zebra_rec_keys_t reckeys, const char *index_name, const char **ws, int ws_length) { int i; int ch = -1; zinfo_index_category_t cat = zinfo_index_category_index; for (i = 0; ireg->zei, cat, "0", index_name); if (ch < 0) ch = zebraExplain_lookup_attr_str(zh->reg->zei, cat, "p", index_name); if (ch < 0) ch = zebraExplain_lookup_attr_str(zh->reg->zei, cat, "w", index_name); if (ch < 0) return ; if (zebra_rec_keys_rewind(reckeys)) { zint startSeq = -1; const char *str; size_t slen; struct it_key key; zint seqno; while (zebra_rec_keys_read(reckeys, &str, &slen, &key)) { assert(key.len <= IT_KEY_LEVEL_MAX && key.len > 2); seqno = key.mem[key.len-1]; if (key.mem[0] == ch) { zint woff; if (startSeq == -1) startSeq = seqno; woff = seqno - startSeq; if (woff >= 0 && woff < ws_length) ws[woff] = str; } } } } #define FILE_MATCH_BLANK "\t " static char *get_match_from_spec(ZebraHandle zh, zebra_rec_keys_t reckeys, const char *fname, const char *spec) { static char dstBuf[2048]; /* static here ??? */ char *dst = dstBuf; const char *s = spec; while (1) { for (; *s && strchr(FILE_MATCH_BLANK, *s); s++) ; if (!*s) break; if (*s == '(') { const char *ws[32]; char attset_str[64], attname_str[64]; int i; int first = 1; for (s++; strchr(FILE_MATCH_BLANK, *s); s++) ; for (i = 0; *s && *s != ',' && *s != ')' && !strchr(FILE_MATCH_BLANK, *s); s++) if (i+1 < sizeof(attset_str)) attset_str[i++] = *s; attset_str[i] = '\0'; for (; strchr(FILE_MATCH_BLANK, *s); s++) ; if (*s != ',') strcpy(attname_str, attset_str); else { for (s++; strchr(FILE_MATCH_BLANK, *s); s++) ; for (i = 0; *s && *s != ')' && !strchr(FILE_MATCH_BLANK, *s); s++) if (i+1 < sizeof(attname_str)) attname_str[i++] = *s; attname_str[i] = '\0'; } if (*s != ')') { yaz_log(YLOG_WARN, "Missing ) in match criteria %s in group %s", spec, zh->m_group ? zh->m_group : "none"); return NULL; } s++; searchRecordKey(zh, reckeys, attname_str, ws, 32); if (0) /* for debugging */ { for (i = 0; i<32; i++) { if (ws[i]) { WRBUF w = wrbuf_hex_str(ws[i]); yaz_log(YLOG_LOG, "ws[%d] = %s", i, wrbuf_cstr(w)); wrbuf_destroy(w); } } } for (i = 0; i<32; i++) if (ws[i]) { if (first) { *dst++ = ' '; first = 0; } strcpy(dst, ws[i]); dst += strlen(ws[i]); } if (first) { yaz_log(YLOG_WARN, "Record didn't contain match" " fields in (%s,%s)", attset_str, attname_str); return NULL; } } else if (*s == '$') { int spec_len; char special[64]; const char *spec_src = NULL; const char *s1 = ++s; while (*s1 && !strchr(FILE_MATCH_BLANK, *s1)) s1++; spec_len = s1 - s; if (spec_len > sizeof(special)-1) spec_len = sizeof(special)-1; memcpy(special, s, spec_len); special[spec_len] = '\0'; s = s1; if (!strcmp(special, "group")) spec_src = zh->m_group; else if (!strcmp(special, "database")) spec_src = zh->basenames[0]; else if (!strcmp(special, "filename")) { spec_src = fname; } else if (!strcmp(special, "type")) spec_src = zh->m_record_type; else spec_src = NULL; if (spec_src) { strcpy(dst, spec_src); dst += strlen(spec_src); } } else if (*s == '\"' || *s == '\'') { int stopMarker = *s++; char tmpString[64]; int i = 0; while (*s && *s != stopMarker) { if (i+1 < sizeof(tmpString)) tmpString[i++] = *s++; } if (*s) s++; tmpString[i] = '\0'; strcpy(dst, tmpString); dst += strlen(tmpString); } else { yaz_log(YLOG_WARN, "Syntax error in match criteria %s in group %s", spec, zh->m_group ? zh->m_group : "none"); return NULL; } *dst++ = 1; } if (dst == dstBuf) { yaz_log(YLOG_WARN, "No match criteria for record %s in group %s", fname, zh->m_group ? zh->m_group : "none"); return NULL; } *dst = '\0'; if (0) /* for debugging */ { WRBUF w = wrbuf_hex_str(dstBuf); yaz_log(YLOG_LOG, "get_match_from_spec %s", wrbuf_cstr(w)); wrbuf_destroy(w); } return dstBuf; } struct recordLogInfo { const char *fname; int recordOffset; struct recordGroup *rGroup; }; /** \brief add the always-matches index entry and map to real record ID \param ctrl record control \param record_id custom record ID \param sysno system record ID This function serves two purposes.. It adds the always matches entry and makes a pointer from the custom record ID (if defined) back to the system record ID (sysno) See zebra_recid_to_sysno . */ static void all_matches_add(struct recExtractCtrl *ctrl, zint record_id, zint sysno) { RecWord word; extract_init(ctrl, &word); word.record_id = record_id; /* we use the seqno as placeholder for a way to get back to record database from _ALLRECORDS.. This is used if a custom RECORD was defined */ word.seqno = sysno; word.index_name = "_ALLRECORDS"; word.index_type = "w"; extract_add_index_string(&word, zinfo_index_category_alwaysmatches, "", 0); } /* forward declaration */ ZEBRA_RES zebra_extract_records_stream(ZebraHandle zh, struct ZebraRecStream *stream, enum zebra_recctrl_action_t action, const char *recordType, zint *sysno, const char *match_criteria, const char *fname, RecType recType, void *recTypeClientData); ZEBRA_RES zebra_extract_file(ZebraHandle zh, zint *sysno, const char *fname, enum zebra_recctrl_action_t action) { ZEBRA_RES r = ZEBRA_OK; int i, fd; char gprefix[128]; char ext[128]; char ext_res[128]; struct file_read_info *fi = 0; const char *original_record_type = 0; RecType recType; void *recTypeClientData; struct ZebraRecStream stream, *streamp; zebra_init_log_level(); if (!zh->m_group || !*zh->m_group) *gprefix = '\0'; else sprintf(gprefix, "%s.", zh->m_group); yaz_log(log_level_extract, "zebra_extract_file %s", fname); /* determine file extension */ *ext = '\0'; for (i = strlen(fname); --i >= 0; ) if (fname[i] == '/') break; else if (fname[i] == '.') { strcpy(ext, fname+i+1); break; } /* determine file type - depending on extension */ original_record_type = zh->m_record_type; if (!zh->m_record_type) { sprintf(ext_res, "%srecordType.%s", gprefix, ext); zh->m_record_type = res_get(zh->res, ext_res); } if (!zh->m_record_type) { check_log_limit(zh); if (zh->records_processed + zh->records_skipped < zh->m_file_verbose_limit) yaz_log(YLOG_LOG, "? %s", fname); zh->records_skipped++; return 0; } /* determine match criteria */ if (!zh->m_record_id) { sprintf(ext_res, "%srecordId.%s", gprefix, ext); zh->m_record_id = res_get(zh->res, ext_res); } if (!(recType = recType_byName(zh->reg->recTypes, zh->res, zh->m_record_type, &recTypeClientData))) { yaz_log(YLOG_WARN, "No such record type: %s", zh->m_record_type); return ZEBRA_FAIL; } switch(recType->version) { case 0: break; default: yaz_log(YLOG_WARN, "Bad filter version: %s", zh->m_record_type); } if (sysno && (action == action_delete || action == action_a_delete)) { streamp = 0; fi = 0; } else { char full_rep[1024]; if (zh->path_reg && !yaz_is_abspath(fname)) { strcpy(full_rep, zh->path_reg); strcat(full_rep, "/"); strcat(full_rep, fname); } else strcpy(full_rep, fname); if ((fd = open(full_rep, O_BINARY|O_RDONLY)) == -1) { yaz_log(YLOG_WARN|YLOG_ERRNO, "open %s", full_rep); zh->m_record_type = original_record_type; return ZEBRA_FAIL; } streamp = &stream; zebra_create_stream_fd(streamp, fd, 0); } r = zebra_extract_records_stream(zh, streamp, action, zh->m_record_type, sysno, 0, /*match_criteria */ fname, recType, recTypeClientData); if (streamp) stream.destroy(streamp); zh->m_record_type = original_record_type; return r; } /* If sysno is provided, then it's used to identify the reocord. If not, and match_criteria is provided, then sysno is guessed If not, and a record is provided, then sysno is got from there */ ZEBRA_RES zebra_buffer_extract_record(ZebraHandle zh, const char *buf, size_t buf_size, enum zebra_recctrl_action_t action, const char *recordType, zint *sysno, const char *match_criteria, const char *fname) { struct ZebraRecStream stream; ZEBRA_RES res; void *clientData; RecType recType = 0; if (recordType && *recordType) { yaz_log(log_level_extract, "Record type explicitly specified: %s", recordType); recType = recType_byName(zh->reg->recTypes, zh->res, recordType, &clientData); } else { if (!(zh->m_record_type)) { yaz_log(YLOG_WARN, "No such record type defined"); return ZEBRA_FAIL; } yaz_log(log_level_extract, "Get record type from rgroup: %s", zh->m_record_type); recType = recType_byName(zh->reg->recTypes, zh->res, zh->m_record_type, &clientData); recordType = zh->m_record_type; } if (!recType) { yaz_log(YLOG_WARN, "No such record type: %s", recordType); return ZEBRA_FAIL; } zebra_create_stream_mem(&stream, buf, buf_size); res = zebra_extract_records_stream(zh, &stream, action, recordType, sysno, match_criteria, fname, recType, clientData); stream.destroy(&stream); return res; } static ZEBRA_RES zebra_extract_record_stream(ZebraHandle zh, struct ZebraRecStream *stream, enum zebra_recctrl_action_t action, const char *recordType, zint *sysno, const char *match_criteria, const char *fname, RecType recType, void *recTypeClientData, int *more) { zint sysno0 = 0; RecordAttr *recordAttr; struct recExtractCtrl extractCtrl; int r; const char *matchStr = 0; Record rec; off_t start_offset = 0, end_offset = 0; const char *pr_fname = fname; /* filename to print .. */ int show_progress = zh->records_processed + zh->records_skipped < zh->m_file_verbose_limit ? 1:0; zebra_init_log_level(); if (!pr_fname) pr_fname = ""; /* make it printable if file is omitted */ zebra_rec_keys_reset(zh->reg->keys); zebra_rec_keys_reset(zh->reg->sortKeys); if (zebraExplain_curDatabase(zh->reg->zei, zh->basenames[0])) { if (zebraExplain_newDatabase(zh->reg->zei, zh->basenames[0], zh->m_explain_database)) return ZEBRA_FAIL; } if (stream) { off_t null_offset = 0; extractCtrl.stream = stream; start_offset = stream->tellf(stream); extractCtrl.first_record = start_offset ? 0 : 1; stream->endf(stream, &null_offset);; extractCtrl.init = extract_init; extractCtrl.tokenAdd = extract_token_add; extractCtrl.schemaAdd = extract_schema_add; extractCtrl.dh = zh->reg->dh; extractCtrl.handle = zh; extractCtrl.match_criteria[0] = '\0'; extractCtrl.staticrank = 0; extractCtrl.action = action; init_extractCtrl(zh, &extractCtrl); extract_set_store_data_prepare(&extractCtrl); r = (*recType->extract)(recTypeClientData, &extractCtrl); if (action == action_update) { action = extractCtrl.action; } switch (r) { case RECCTRL_EXTRACT_EOF: return ZEBRA_FAIL; case RECCTRL_EXTRACT_ERROR_GENERIC: /* error occured during extraction ... */ yaz_log(YLOG_WARN, "extract error: generic"); return ZEBRA_FAIL; case RECCTRL_EXTRACT_ERROR_NO_SUCH_FILTER: /* error occured during extraction ... */ yaz_log(YLOG_WARN, "extract error: no such filter"); return ZEBRA_FAIL; case RECCTRL_EXTRACT_SKIP: if (show_progress) yaz_log(YLOG_LOG, "skip %s %s " ZINT_FORMAT, recordType, pr_fname, (zint) start_offset); *more = 1; end_offset = stream->endf(stream, 0); if (end_offset) stream->seekf(stream, end_offset); return ZEBRA_OK; case RECCTRL_EXTRACT_OK: break; default: yaz_log(YLOG_WARN, "extract error: unknown error: %d", r); return ZEBRA_FAIL; } end_offset = stream->endf(stream, 0); if (end_offset) stream->seekf(stream, end_offset); else end_offset = stream->tellf(stream); if (extractCtrl.match_criteria[0]) match_criteria = extractCtrl.match_criteria; } *more = 1; if (zh->m_flag_rw == 0) { yaz_log(YLOG_LOG, "test %s %s " ZINT_FORMAT, recordType, pr_fname, (zint) start_offset); /* test mode .. Do not perform match */ return ZEBRA_OK; } if (!sysno) { sysno = &sysno0; if (match_criteria && *match_criteria) matchStr = match_criteria; else { if (zh->m_record_id && *zh->m_record_id) { matchStr = get_match_from_spec(zh, zh->reg->keys, pr_fname, zh->m_record_id); if (!matchStr) { yaz_log(YLOG_LOG, "error %s %s " ZINT_FORMAT, recordType, pr_fname, (zint) start_offset); return ZEBRA_FAIL; } if (0 && matchStr) { WRBUF w = wrbuf_alloc(); size_t i; for (i = 0; i < strlen(matchStr); i++) { wrbuf_printf(w, "%02X", matchStr[i] & 0xff); } yaz_log(YLOG_LOG, "Got match %s", wrbuf_cstr(w)); wrbuf_destroy(w); } } } if (matchStr) { int db_ord = zebraExplain_get_database_ord(zh->reg->zei); char *rinfo = dict_lookup_ord(zh->reg->matchDict, db_ord, matchStr); if (log_level_extract) { WRBUF w = wrbuf_hex_str(matchStr); yaz_log(log_level_extract, "matchStr: %s", wrbuf_cstr(w)); wrbuf_destroy(w); } if (rinfo) { assert(*rinfo == sizeof(*sysno)); memcpy(sysno, rinfo+1, sizeof(*sysno)); } } } if (! *sysno) { /* new record AKA does not exist already */ if (action == action_delete) { yaz_log(YLOG_LOG, "delete %s %s " ZINT_FORMAT, recordType, pr_fname, (zint) start_offset); yaz_log(YLOG_WARN, "cannot delete record above (seems new)"); return ZEBRA_FAIL; } else if (action == action_a_delete) { if (show_progress) yaz_log(YLOG_LOG, "adelete %s %s " ZINT_FORMAT, recordType, pr_fname, (zint) start_offset); return ZEBRA_OK; } else if (action == action_replace) { yaz_log(YLOG_LOG, "update %s %s " ZINT_FORMAT, recordType, pr_fname, (zint) start_offset); yaz_log(YLOG_WARN, "cannot update record above (seems new)"); return ZEBRA_FAIL; } if (show_progress) yaz_log(YLOG_LOG, "add %s %s " ZINT_FORMAT, recordType, pr_fname, (zint) start_offset); rec = rec_new(zh->reg->records); *sysno = rec->sysno; if (stream) { all_matches_add(&extractCtrl, zebra_rec_keys_get_custom_record_id(zh->reg->keys), *sysno); } recordAttr = rec_init_attr(zh->reg->zei, rec); if (extractCtrl.staticrank < 0) { yaz_log(YLOG_WARN, "Negative staticrank for record. Set to 0"); extractCtrl.staticrank = 0; } if (matchStr) { int db_ord = zebraExplain_get_database_ord(zh->reg->zei); dict_insert_ord(zh->reg->matchDict, db_ord, matchStr, sizeof(*sysno), sysno); } extract_flush_sort_keys(zh, *sysno, 1, zh->reg->sortKeys); #if FLUSH2 extract_flush_record_keys2(zh, *sysno, zh->reg->keys, extractCtrl.staticrank, 0, recordAttr->staticrank); #else extract_flush_record_keys(zh, *sysno, 1, zh->reg->keys, extractCtrl.staticrank); #endif recordAttr->staticrank = extractCtrl.staticrank; zh->records_inserted++; } else { /* record already exists */ zebra_rec_keys_t delkeys = zebra_rec_keys_open(); zebra_rec_keys_t sortKeys = zebra_rec_keys_open(); if (action == action_insert) { yaz_log(YLOG_LOG, "skipped %s %s " ZINT_FORMAT, recordType, pr_fname, (zint) start_offset); logRecord(zh); return ZEBRA_FAIL; } rec = rec_get(zh->reg->records, *sysno); assert(rec); if (stream) { all_matches_add(&extractCtrl, zebra_rec_keys_get_custom_record_id(zh->reg->keys), *sysno); } recordAttr = rec_init_attr(zh->reg->zei, rec); /* decrease total size */ zebraExplain_recordBytesIncrement(zh->reg->zei, - recordAttr->recordSize); zebra_rec_keys_set_buf(delkeys, rec->info[recInfo_delKeys], rec->size[recInfo_delKeys], 0); zebra_rec_keys_set_buf(sortKeys, rec->info[recInfo_sortKeys], rec->size[recInfo_sortKeys], 0); extract_flush_sort_keys(zh, *sysno, 0, sortKeys); #if !FLUSH2 extract_flush_record_keys(zh, *sysno, 0, delkeys, recordAttr->staticrank); #endif if (action == action_delete || action == action_a_delete) { /* record going to be deleted */ #if FLUSH2 extract_flush_record_keys2(zh, *sysno, 0, recordAttr->staticrank, delkeys, recordAttr->staticrank); #endif if (zebra_rec_keys_empty(delkeys)) { yaz_log(YLOG_LOG, "delete %s %s " ZINT_FORMAT, recordType, pr_fname, (zint) start_offset); yaz_log(YLOG_WARN, "cannot delete file above, " "storeKeys false (3)"); } else { if (show_progress) yaz_log(YLOG_LOG, "delete %s %s " ZINT_FORMAT, recordType, pr_fname, (zint) start_offset); zh->records_deleted++; if (matchStr) { int db_ord = zebraExplain_get_database_ord(zh->reg->zei); dict_delete_ord(zh->reg->matchDict, db_ord, matchStr); } rec_del(zh->reg->records, &rec); } zebra_rec_keys_close(delkeys); zebra_rec_keys_close(sortKeys); rec_free(&rec); logRecord(zh); return ZEBRA_OK; } else { /* update or special_update */ if (show_progress) yaz_log(YLOG_LOG, "update %s %s " ZINT_FORMAT, recordType, pr_fname, (zint) start_offset); extract_flush_sort_keys(zh, *sysno, 1, zh->reg->sortKeys); #if FLUSH2 extract_flush_record_keys2(zh, *sysno, zh->reg->keys, extractCtrl.staticrank, delkeys, recordAttr->staticrank); #else extract_flush_record_keys(zh, *sysno, 1, zh->reg->keys, extractCtrl.staticrank); #endif recordAttr->staticrank = extractCtrl.staticrank; zh->records_updated++; } zebra_rec_keys_close(delkeys); zebra_rec_keys_close(sortKeys); } /* update file type */ xfree(rec->info[recInfo_fileType]); rec->info[recInfo_fileType] = rec_strdup(recordType, &rec->size[recInfo_fileType]); /* update filename */ xfree(rec->info[recInfo_filename]); rec->info[recInfo_filename] = rec_strdup(fname, &rec->size[recInfo_filename]); /* update delete keys */ xfree(rec->info[recInfo_delKeys]); if (!zebra_rec_keys_empty(zh->reg->keys) && zh->m_store_keys == 1) { zebra_rec_keys_get_buf(zh->reg->keys, &rec->info[recInfo_delKeys], &rec->size[recInfo_delKeys]); } else { rec->info[recInfo_delKeys] = NULL; rec->size[recInfo_delKeys] = 0; } /* update sort keys */ xfree(rec->info[recInfo_sortKeys]); zebra_rec_keys_get_buf(zh->reg->sortKeys, &rec->info[recInfo_sortKeys], &rec->size[recInfo_sortKeys]); if (stream) { recordAttr->recordSize = end_offset - start_offset; zebraExplain_recordBytesIncrement(zh->reg->zei, recordAttr->recordSize); } /* set run-number for this record */ recordAttr->runNumber = zebraExplain_runNumberIncrement(zh->reg->zei, 0); /* update store data */ xfree(rec->info[recInfo_storeData]); /* update store data */ if (zh->store_data_buf) { rec->size[recInfo_storeData] = zh->store_data_size; rec->info[recInfo_storeData] = zh->store_data_buf; zh->store_data_buf = 0; recordAttr->recordSize = zh->store_data_size; } else if (zh->m_store_data) { off_t cur_offset = stream->tellf(stream); rec->size[recInfo_storeData] = recordAttr->recordSize; rec->info[recInfo_storeData] = (char *) xmalloc(recordAttr->recordSize); stream->seekf(stream, start_offset); stream->readf(stream, rec->info[recInfo_storeData], recordAttr->recordSize); stream->seekf(stream, cur_offset); } else { rec->info[recInfo_storeData] = NULL; rec->size[recInfo_storeData] = 0; } /* update database name */ xfree(rec->info[recInfo_databaseName]); rec->info[recInfo_databaseName] = rec_strdup(zh->basenames[0], &rec->size[recInfo_databaseName]); /* update offset */ recordAttr->recordOffset = start_offset; /* commit this record */ rec_put(zh->reg->records, &rec); logRecord(zh); return ZEBRA_OK; } /** \brief extracts records from stream \param zh Zebra Handle \param stream stream that we read from \param action (action_insert, action_replace, action_delete, ..) \param recordType Record filter type "grs.xml", etc. \param sysno pointer to sysno if already known; NULL otherwise \param match_criteria (NULL if not already given) \param fname filename that we read from (for logging purposes only) \param recType record type \param recTypeClientData client data for record type \returns ZEBRA_OK for success; ZEBRA_FAIL for failure */ ZEBRA_RES zebra_extract_records_stream(ZebraHandle zh, struct ZebraRecStream *stream, enum zebra_recctrl_action_t action, const char *recordType, zint *sysno, const char *match_criteria, const char *fname, RecType recType, void *recTypeClientData) { ZEBRA_RES res = ZEBRA_OK; while (1) { int more = 0; res = zebra_extract_record_stream(zh, stream, action, recordType, sysno, match_criteria, fname, recType, recTypeClientData, &more); if (!more) { res = ZEBRA_OK; break; } if (res != ZEBRA_OK) break; if (sysno) break; } return res; } ZEBRA_RES zebra_extract_explain(void *handle, Record rec, data1_node *n) { ZebraHandle zh = (ZebraHandle) handle; struct recExtractCtrl extractCtrl; if (zebraExplain_curDatabase(zh->reg->zei, rec->info[recInfo_databaseName])) { abort(); if (zebraExplain_newDatabase(zh->reg->zei, rec->info[recInfo_databaseName], 0)) abort(); } zebra_rec_keys_reset(zh->reg->keys); zebra_rec_keys_reset(zh->reg->sortKeys); extractCtrl.init = extract_init; extractCtrl.tokenAdd = extract_token_add; extractCtrl.schemaAdd = extract_schema_add; extractCtrl.dh = zh->reg->dh; init_extractCtrl(zh, &extractCtrl); extractCtrl.flagShowRecords = 0; extractCtrl.match_criteria[0] = '\0'; extractCtrl.staticrank = 0; extractCtrl.action = action_update; extractCtrl.handle = handle; extractCtrl.first_record = 1; extract_set_store_data_prepare(&extractCtrl); if (n) grs_extract_tree(&extractCtrl, n); if (rec->size[recInfo_delKeys]) { zebra_rec_keys_t delkeys = zebra_rec_keys_open(); zebra_rec_keys_t sortkeys = zebra_rec_keys_open(); zebra_rec_keys_set_buf(delkeys, rec->info[recInfo_delKeys], rec->size[recInfo_delKeys], 0); #if FLUSH2 extract_flush_record_keys2(zh, rec->sysno, zh->reg->keys, 0, delkeys, 0); #else extract_flush_record_keys(zh, rec->sysno, 0, delkeys, 0); extract_flush_record_keys(zh, rec->sysno, 1, zh->reg->keys, 0); #endif zebra_rec_keys_close(delkeys); zebra_rec_keys_set_buf(sortkeys, rec->info[recInfo_sortKeys], rec->size[recInfo_sortKeys], 0); extract_flush_sort_keys(zh, rec->sysno, 0, sortkeys); zebra_rec_keys_close(sortkeys); } else { #if FLUSH2 extract_flush_record_keys2(zh, rec->sysno, zh->reg->keys, 0, 0, 0); #else extract_flush_record_keys(zh, rec->sysno, 1, zh->reg->keys, 0); #endif } extract_flush_sort_keys(zh, rec->sysno, 1, zh->reg->sortKeys); xfree(rec->info[recInfo_delKeys]); zebra_rec_keys_get_buf(zh->reg->keys, &rec->info[recInfo_delKeys], &rec->size[recInfo_delKeys]); xfree(rec->info[recInfo_sortKeys]); zebra_rec_keys_get_buf(zh->reg->sortKeys, &rec->info[recInfo_sortKeys], &rec->size[recInfo_sortKeys]); return ZEBRA_OK; } void extract_rec_keys_log(ZebraHandle zh, int is_insert, zebra_rec_keys_t reckeys, int level) { if (zebra_rec_keys_rewind(reckeys)) { size_t slen; const char *str; struct it_key key; NMEM nmem = nmem_create(); while(zebra_rec_keys_read(reckeys, &str, &slen, &key)) { char keystr[200]; /* room for zints to print */ char *dst_term = 0; int ord = CAST_ZINT_TO_INT(key.mem[0]); const char *index_type; int i; const char *string_index; zebraExplain_lookup_ord(zh->reg->zei, ord, &index_type, 0/* db */, &string_index); assert(index_type); zebra_term_untrans_iconv(zh, nmem, index_type, &dst_term, str); *keystr = '\0'; for (i = 0; ireg->zei; struct ord_stat { int no; int ord; struct ord_stat *next; }; if (zebra_rec_keys_rewind(reckeys)) { struct ord_stat *ord_list = 0; struct ord_stat *p; size_t slen; const char *str; struct it_key key_in; while(zebra_rec_keys_read(reckeys, &str, &slen, &key_in)) { int ord = CAST_ZINT_TO_INT(key_in.mem[0]); for (p = ord_list; p ; p = p->next) if (p->ord == ord) { p->no++; break; } if (!p) { p = xmalloc(sizeof(*p)); p->no = 1; p->ord = ord; p->next = ord_list; ord_list = p; } } p = ord_list; while (p) { struct ord_stat *p1 = p; if (is_insert) zebraExplain_ord_adjust_occurrences(zei, p->ord, p->no, 1); else zebraExplain_ord_adjust_occurrences(zei, p->ord, - p->no, -1); p = p->next; xfree(p1); } } } void extract_flush_record_keys2(ZebraHandle zh, zint sysno, zebra_rec_keys_t ins_keys, zint ins_rank, zebra_rec_keys_t del_keys, zint del_rank) { ZebraExplainInfo zei = zh->reg->zei; int normal = 0; int optimized = 0; if (!zh->reg->key_block) { int mem = 1024*1024 * atoi( res_get_def( zh->res, "memmax", "8")); const char *key_tmp_dir = res_get_def(zh->res, "keyTmpDir", "."); int use_threads = atoi(res_get_def(zh->res, "threads", "1")); zh->reg->key_block = key_block_create(mem, key_tmp_dir, use_threads); } if (ins_keys) { extract_rec_keys_adjust(zh, 1, ins_keys); if (!del_keys) zebraExplain_recordCountIncrement(zei, 1); zebra_rec_keys_rewind(ins_keys); } if (del_keys) { extract_rec_keys_adjust(zh, 0, del_keys); if (!ins_keys) zebraExplain_recordCountIncrement(zei, -1); zebra_rec_keys_rewind(del_keys); } while (1) { size_t del_slen; const char *del_str; struct it_key del_key_in; int del = 0; size_t ins_slen; const char *ins_str; struct it_key ins_key_in; int ins = 0; if (del_keys) del = zebra_rec_keys_read(del_keys, &del_str, &del_slen, &del_key_in); if (ins_keys) ins = zebra_rec_keys_read(ins_keys, &ins_str, &ins_slen, &ins_key_in); if (del && ins && ins_rank == del_rank && !key_compare(&del_key_in, &ins_key_in) && ins_slen == del_slen && !memcmp(del_str, ins_str, del_slen)) { optimized++; continue; } if (!del && !ins) break; normal++; if (del) key_block_write(zh->reg->key_block, sysno, &del_key_in, 0, del_str, del_slen, del_rank, zh->m_staticrank); if (ins) key_block_write(zh->reg->key_block, sysno, &ins_key_in, 1, ins_str, ins_slen, ins_rank, zh->m_staticrank); } yaz_log(log_level_extract, "normal=%d optimized=%d", normal, optimized); } ZEBRA_RES zebra_rec_keys_to_snippets1(ZebraHandle zh, zebra_rec_keys_t reckeys, zebra_snippets *snippets) { NMEM nmem = nmem_create(); if (zebra_rec_keys_rewind(reckeys)) { const char *str; size_t slen; struct it_key key; while (zebra_rec_keys_read(reckeys, &str, &slen, &key)) { char *dst_term = 0; int ord; zint seqno; const char *index_type; assert(key.len <= IT_KEY_LEVEL_MAX && key.len > 2); seqno = key.mem[key.len-1]; ord = CAST_ZINT_TO_INT(key.mem[0]); zebraExplain_lookup_ord(zh->reg->zei, ord, &index_type, 0/* db */, 0 /* string_index */); assert(index_type); zebra_term_untrans_iconv(zh, nmem, index_type, &dst_term, str); zebra_snippets_append(snippets, seqno, 0, ord, dst_term); nmem_reset(nmem); } } nmem_destroy(nmem); return ZEBRA_OK; } void print_rec_keys(ZebraHandle zh, zebra_rec_keys_t reckeys) { yaz_log(YLOG_LOG, "print_rec_keys"); if (zebra_rec_keys_rewind(reckeys)) { const char *str; size_t slen; struct it_key key; while (zebra_rec_keys_read(reckeys, &str, &slen, &key)) { char dst_buf[IT_MAX_WORD]; zint seqno; const char *index_type; int ord = CAST_ZINT_TO_INT(key.mem[0]); const char *db = 0; assert(key.len <= IT_KEY_LEVEL_MAX && key.len > 2); zebraExplain_lookup_ord(zh->reg->zei, ord, &index_type, &db, 0); seqno = key.mem[key.len-1]; zebra_term_untrans(zh, index_type, dst_buf, str); yaz_log(YLOG_LOG, "ord=%d seqno=" ZINT_FORMAT " term=%s", ord, seqno, dst_buf); } } } static void extract_add_index_string(RecWord *p, zinfo_index_category_t cat, const char *str, int length) { struct it_key key; ZebraHandle zh = p->extractCtrl->handle; ZebraExplainInfo zei = zh->reg->zei; int ch, i; ch = zebraExplain_lookup_attr_str(zei, cat, p->index_type, p->index_name); if (ch < 0) ch = zebraExplain_add_attr_str(zei, cat, p->index_type, p->index_name); i = 0; key.mem[i++] = ch; key.mem[i++] = p->record_id; key.mem[i++] = p->section_id; if (zh->m_segment_indexing) key.mem[i++] = p->segment; key.mem[i++] = p->seqno; key.len = i; zebra_rec_keys_write(zh->reg->keys, str, length, &key); } static void extract_add_sort_string(RecWord *p, const char *str, int length) { struct it_key key; ZebraHandle zh = p->extractCtrl->handle; ZebraExplainInfo zei = zh->reg->zei; int ch; zinfo_index_category_t cat = zinfo_index_category_sort; ch = zebraExplain_lookup_attr_str(zei, cat, p->index_type, p->index_name); if (ch < 0) ch = zebraExplain_add_attr_str(zei, cat, p->index_type, p->index_name); key.len = 3; key.mem[0] = ch; key.mem[1] = p->record_id; key.mem[2] = p->section_id; zebra_rec_keys_write(zh->reg->sortKeys, str, length, &key); } static void extract_add_staticrank_string(RecWord *p, const char *str, int length) { char valz[40]; struct recExtractCtrl *ctrl = p->extractCtrl; if (length > sizeof(valz)-1) length = sizeof(valz)-1; memcpy(valz, str, length); valz[length] = '\0'; ctrl->staticrank = atozint(valz); } static void extract_add_string(RecWord *p, zebra_map_t zm, const char *string, int length) { assert(length > 0); if (!p->index_name) return; if (log_level_details) { WRBUF w = wrbuf_alloc(); wrbuf_write_escaped(w, string, length); yaz_log(log_level_details, "extract_add_string: %s", wrbuf_cstr(w)); wrbuf_destroy(w); } if (zebra_maps_is_index(zm)) { extract_add_index_string(p, zinfo_index_category_index, string, length); if (zebra_maps_is_alwaysmatches(zm)) { RecWord word; memcpy(&word, p, sizeof(word)); word.seqno = 1; extract_add_index_string( &word, zinfo_index_category_alwaysmatches, "", 0); } } else if (zebra_maps_is_sort(zm)) { extract_add_sort_string(p, string, length); } else if (zebra_maps_is_staticrank(zm)) { extract_add_staticrank_string(p, string, length); } } static void extract_add_incomplete_field(RecWord *p, zebra_map_t zm) { const char *b = p->term_buf; int remain = p->term_len; int first = 1; const char **map = 0; if (remain > 0) map = zebra_maps_input(zm, &b, remain, 0); while (map) { char buf[IT_MAX_WORD+1]; int i, remain; /* Skip spaces */ while (map && *map && **map == *CHR_SPACE) { remain = p->term_len - (b - p->term_buf); if (remain > 0) map = zebra_maps_input(zm, &b, remain, 0); else map = 0; } if (!map) break; i = 0; while (map && *map && **map != *CHR_SPACE) { const char *cp = *map; while (i < IT_MAX_WORD && *cp) buf[i++] = *(cp++); remain = p->term_len - (b - p->term_buf); if (remain > 0) map = zebra_maps_input(zm, &b, remain, 0); else map = 0; } if (!i) return; if (first) { first = 0; if (zebra_maps_is_first_in_field(zm)) { /* first in field marker */ extract_add_string(p, zm, FIRST_IN_FIELD_STR, FIRST_IN_FIELD_LEN); p->seqno++; } } extract_add_string(p, zm, buf, i); p->seqno++; } } static void extract_add_complete_field(RecWord *p, zebra_map_t zm) { const char *b = p->term_buf; char buf[IT_MAX_WORD+1]; const char **map = 0; int i = 0, remain = p->term_len; if (remain > 0) map = zebra_maps_input(zm, &b, remain, 1); while (remain > 0 && i < IT_MAX_WORD) { while (map && *map && **map == *CHR_SPACE) { remain = p->term_len - (b - p->term_buf); if (remain > 0) { int first = i ? 0 : 1; /* first position */ map = zebra_maps_input(zm, &b, remain, first); } else map = 0; } if (!map) break; if (i && i < IT_MAX_WORD) buf[i++] = *CHR_SPACE; while (map && *map && **map != *CHR_SPACE) { const char *cp = *map; if (**map == *CHR_CUT) { i = 0; } else { if (i >= IT_MAX_WORD) break; while (i < IT_MAX_WORD && *cp) buf[i++] = *(cp++); } remain = p->term_len - (b - p->term_buf); if (remain > 0) { map = zebra_maps_input(zm, &b, remain, 0); } else map = 0; } } if (!i) return; extract_add_string(p, zm, buf, i); } static void extract_add_icu(RecWord *p, zebra_map_t zm) { const char *res_buf = 0; size_t res_len = 0; zebra_map_tokenize_start(zm, p->term_buf, p->term_len); while (zebra_map_tokenize_next(zm, &res_buf, &res_len, 0, 0)) { extract_add_string(p, zm, res_buf, res_len); p->seqno++; } } /** \brief top-level indexing handler for recctrl system \param p token data to be indexed Call sequence: extract_token_add extract_add_{in}_complete / extract_add_icu extract_add_string extract_add_index_string or extract_add_sort_string or extract_add_staticrank_string */ static void extract_token_add(RecWord *p) { ZebraHandle zh = p->extractCtrl->handle; zebra_map_t zm = zebra_map_get_or_add(zh->reg->zebra_maps, p->index_type); WRBUF wrbuf; if (log_level_details) { yaz_log(log_level_details, "extract_token_add " "type=%s index=%s seqno=" ZINT_FORMAT " s=%.*s", p->index_type, p->index_name, p->seqno, p->term_len, p->term_buf); } if ((wrbuf = zebra_replace(zm, 0, p->term_buf, p->term_len))) { p->term_buf = wrbuf_buf(wrbuf); p->term_len = wrbuf_len(wrbuf); } if (zebra_maps_is_icu(zm)) { extract_add_icu(p, zm); } else { if (zebra_maps_is_complete(zm)) extract_add_complete_field(p, zm); else extract_add_incomplete_field(p, zm); } } static void extract_set_store_data_cb(struct recExtractCtrl *p, void *buf, size_t sz) { ZebraHandle zh = (ZebraHandle) p->handle; xfree(zh->store_data_buf); zh->store_data_buf = 0; zh->store_data_size = 0; if (buf && sz) { zh->store_data_buf = xmalloc(sz); zh->store_data_size = sz; memcpy(zh->store_data_buf, buf, sz); } } static void extract_set_store_data_prepare(struct recExtractCtrl *p) { ZebraHandle zh = (ZebraHandle) p->handle; xfree(zh->store_data_buf); zh->store_data_buf = 0; zh->store_data_size = 0; p->setStoreData = extract_set_store_data_cb; } static void extract_schema_add(struct recExtractCtrl *p, Odr_oid *oid) { ZebraHandle zh = (ZebraHandle) p->handle; zebraExplain_addSchema(zh->reg->zei, oid); } void extract_flush_sort_keys(ZebraHandle zh, zint sysno, int cmd, zebra_rec_keys_t reckeys) { #if 0 yaz_log(YLOG_LOG, "extract_flush_sort_keys cmd=%d sysno=" ZINT_FORMAT, cmd, sysno); extract_rec_keys_log(zh, cmd, reckeys, YLOG_LOG); #endif if (zebra_rec_keys_rewind(reckeys)) { zebra_sort_index_t si = zh->reg->sort_index; size_t slen; const char *str; struct it_key key_in; NMEM nmem = nmem_create(); struct sort_add_ent { int ord; int cmd; struct sort_add_ent *next; WRBUF wrbuf; zint sysno; zint section_id; }; struct sort_add_ent *sort_ent_list = 0; while (zebra_rec_keys_read(reckeys, &str, &slen, &key_in)) { int ord = CAST_ZINT_TO_INT(key_in.mem[0]); zint filter_sysno = key_in.mem[1]; zint section_id = key_in.mem[2]; struct sort_add_ent **e = &sort_ent_list; for (; *e; e = &(*e)->next) if ((*e)->ord == ord && section_id == (*e)->section_id) break; if (!*e) { *e = nmem_malloc(nmem, sizeof(**e)); (*e)->next = 0; (*e)->wrbuf = wrbuf_alloc(); (*e)->ord = ord; (*e)->cmd = cmd; (*e)->sysno = filter_sysno ? filter_sysno : sysno; (*e)->section_id = section_id; } wrbuf_write((*e)->wrbuf, str, slen); wrbuf_putc((*e)->wrbuf, '\0'); } if (sort_ent_list) { zint last_sysno = 0; struct sort_add_ent *e = sort_ent_list; for (; e; e = e->next) { if (last_sysno != e->sysno) { zebra_sort_sysno(si, e->sysno); last_sysno = e->sysno; } zebra_sort_type(si, e->ord); if (e->cmd == 1) zebra_sort_add(si, e->section_id, e->wrbuf); else zebra_sort_delete(si, e->section_id); wrbuf_destroy(e->wrbuf); } } nmem_destroy(nmem); } } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/zinfo.h0000644000175000017500000001027611412332551012552 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef ZINFO_H #define ZINFO_H #include #include #include "recindex.h" /* Compare string (ignore case) */ #ifdef WIN32 #define STRCASECMP stricmp #else #define STRCASECMP strcasecmp #endif YAZ_BEGIN_CDECL typedef enum { zinfo_index_category_index, zinfo_index_category_sort, zinfo_index_category_alwaysmatches, zinfo_index_category_anchor } zinfo_index_category_t; typedef ZEBRA_RES ZebraExplainUpdateFunc(void *handle, Record drec, data1_node *n); typedef struct zebraExplainInfo *ZebraExplainInfo; typedef struct zebDatabaseInfo ZebDatabaseInfo; ZebraExplainInfo zebraExplain_open(Records records, data1_handle dh, Res res, int writeFlag, void *updateHandle, ZebraExplainUpdateFunc *); void zebraExplain_close(ZebraExplainInfo zei); int zebraExplain_curDatabase(ZebraExplainInfo zei, const char *database); int zebraExplain_newDatabase(ZebraExplainInfo zei, const char *database, int explain_database); int zebraExplain_add_attr_su(ZebraExplainInfo zei, int index_type, int set, int use); /** \brief lookup ordinal from string index + index type \param zei explain info \param cat category \param index_type index type \param str index string \returns -1 no such index+type exist; ordinal otherwise */ int zebraExplain_lookup_attr_str(ZebraExplainInfo zei, zinfo_index_category_t cat, const char *index_type, const char *str); int zebraExplain_add_attr_str(ZebraExplainInfo zei, zinfo_index_category_t cat, const char *index_type, const char *str); void zebraExplain_addSchema(ZebraExplainInfo zei, Odr_oid *oid); void zebraExplain_recordCountIncrement(ZebraExplainInfo zei, int adjust_num); void zebraExplain_recordBytesIncrement(ZebraExplainInfo zei, int adjust_num); zint zebraExplain_runNumberIncrement(ZebraExplainInfo zei, int adjust_num); void zebraExplain_loadAttsets(data1_handle dh, Res res); void zebraExplain_flush(ZebraExplainInfo zei, void *updateHandle); int zebraExplain_lookup_ord(ZebraExplainInfo zei, int ord, const char **index_type, const char **db, const char **string_index); int zebraExplain_ord_adjust_occurrences(ZebraExplainInfo zei, int ord, int term_delta, int doc_delta); zint zebraExplain_ord_get_term_occurrences(ZebraExplainInfo zei, int ord); zint zebraExplain_ord_get_doc_occurrences(ZebraExplainInfo zei, int ord); int zebraExplain_trav_ord(ZebraExplainInfo zei, void *handle, int (*f)(void *handle, int ord, const char *index_type, const char *string_index, zinfo_index_category_t cat)); int zebraExplain_get_database_ord(ZebraExplainInfo zei); int zebraExplain_removeDatabase(ZebraExplainInfo zei, void *updateHandle); typedef struct { int recordSize; off_t recordOffset; zint runNumber; zint staticrank; } RecordAttr; RecordAttr *rec_init_attr(ZebraExplainInfo zei, Record rec); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/marcomp.c0000644000175000017500000002150511412332551013053 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include "marcomp.h" static mc_token mc_gettoken(mc_context *c); static void mc_ungettoken(mc_context *c); static int mc_getval(mc_context *c); static int mc_getdata(mc_context *c, char *s, int sz); static void mc_getinterval(mc_context *c, int *start, int *end); static mc_subfield *mc_mk_subfield(mc_subfield *parent); static mc_field *mc_mk_field(void); static struct mc_errmsg { mc_errcode code; const char *msg; } mc_errmsg[] = { {EMCOK, "OK"}, {EMCNOMEM, "NO mem"}, {EMCF, "not complete field"}, {EMCSF, "not complete subfield"}, {EMCSFGROUP, "not closed GROUP"}, {EMCSFVAR, "not closed VARIANT"}, {EMCSFINLINE, "not closed IN-LINE"}, {EMCEND, "not correct errno"} }; mc_errcode mc_errno(mc_context *c) { return c->errcode; } const char *mc_error(mc_errcode no) { if (no >= EMCOK && noerrcode = EMCOK; p->data = s; p->len = strlen(s); p->crrtok = NOP; } return p; } void mc_destroy_context(mc_context *c) { if (c) xfree(c); } mc_token mc_gettoken(mc_context *c) { if (c->offset >= c->len) return NOP; switch (*(c->data+c->offset)) { case '{': c->crrtok = LVARIANT; break; case '}': c->crrtok = RVARIANT; break; case '(': c->crrtok = LGROUP; break; case ')': c->crrtok = RGROUP; break; case '<': c->crrtok = LINLINE; break; case '>': c->crrtok = RINLINE; break; case '$': c->crrtok = SUBFIELD; break; case '[': c->crrtok = LINTERVAL; break; case ']': c->crrtok = RINTERVAL; break; default: if (isspace(*(unsigned char *) (c->data+c->offset)) || *(c->data+c->offset) == '\n') { c->crrtok = NOP; } else { c->crrtok = REGULAR; c->crrval = *(c->data+c->offset); } } #ifdef DEBUG fprintf(stderr, "gettoken(): offset: %d", c->offset); if (c->crrtok == REGULAR) fprintf(stderr, "<%c>", c->crrval); fprintf(stderr, "\n"); #endif c->offset++; return c->crrtok; } void mc_ungettoken(mc_context *c) { if (c->offset > 0) c->offset--; } int mc_getval(mc_context *c) { return c->crrval; } int mc_getdata(mc_context *c, char *s, int sz) { int i; for (i=0; iname = (char *)xmalloc(SZ_FNAME+1); *p->name = '\0'; p->ind1 = (char *)xmalloc(SZ_IND+1); *p->ind1 = '\0'; p->ind2 = (char *)xmalloc(SZ_IND+1); *p->ind2 = '\0'; p->interval.start = p->interval.end = -1; } return p; } void mc_destroy_field(mc_field *p) { if (!p) return; if (p->name) xfree(p->name); if (p->ind1) xfree(p->ind1); if (p->ind2) xfree(p->ind2); if (p->list) mc_destroy_subfields_recursive(p->list); xfree(p); } mc_field *mc_getfield(mc_context *c) { mc_field *pf; pf = mc_mk_field(); if (!pf) { c->errcode = EMCNOMEM; return 0; } if (mc_getdata(c, pf->name, SZ_FNAME) == SZ_FNAME) { mc_token nexttok = mc_gettoken(c); mc_ungettoken(c); if (nexttok == LINTERVAL) { mc_getinterval(c, &pf->interval.start, &pf->interval.end); #ifdef DEBUG fprintf(stderr, "ineterval (%d)-(%d)\n", pf->interval.start, pf->interval.end); #endif } if ((mc_getdata(c, pf->ind1, SZ_IND) == SZ_IND) && (mc_getdata(c, pf->ind2, SZ_IND) == SZ_IND)) { pf->list = mc_getsubfields(c, 0); } } else { c->errcode = EMCF; mc_destroy_field(pf); return 0; } return pf; } mc_subfield *mc_mk_subfield(mc_subfield *parent) { mc_subfield *p = (mc_subfield*)xmalloc(sizeof(*p)); if (p) { memset(p, 0, sizeof(*p)); p->which = MC_SF; p->name = (char *)xmalloc(SZ_SFNAME+1); *p->name = '\0'; p->prefix = (char *)xmalloc(SZ_PREFIX+1); *p->prefix = '\0'; p->suffix = (char *)xmalloc(SZ_SUFFIX+1); *p->suffix = '\0'; p->parent = parent; p->interval.start = p->interval.end = -1; } return p; } void mc_destroy_subfield(mc_subfield *p) { if (!p) return; if (p->which == MC_SFGROUP || p->which == MC_SFVARIANT) { if (p->u.child) mc_destroy_subfields_recursive(p->u.child); } else if (p->which == MC_SF) { if (p->u.in_line) mc_destroy_field(p->u.in_line); } if (p->name) xfree(p->name); if (p->prefix) xfree(p->prefix); if (p->suffix) xfree(p->suffix); if (p->parent) p->parent->next = p->next; xfree(p); } void mc_destroy_subfields_recursive(mc_subfield *p) { if (!p) return; mc_destroy_subfields_recursive(p->next); if (p->which == MC_SFGROUP || p->which == MC_SFVARIANT) { if (p->u.child) mc_destroy_subfields_recursive(p->u.child); } else if (p->which == MC_SF) { if (p->u.in_line) mc_destroy_field(p->u.in_line); } if (p->name) xfree(p->name); if (p->prefix) xfree(p->prefix); if (p->suffix) xfree(p->suffix); if (p->parent) p->parent->next = 0; xfree(p); } mc_subfield *mc_getsubfields(mc_context *c, mc_subfield *parent) { mc_subfield *psf=0; mc_token tok = mc_gettoken(c); if (tok == NOP) return 0; if (tok == LGROUP) { if (!(psf = mc_mk_subfield(parent))) { c->errcode = EMCNOMEM; return 0; } psf->which = MC_SFGROUP; psf->u.child = mc_getsubfields(c, psf); if (mc_gettoken(c) == RGROUP) psf->next = mc_getsubfields(c, psf); else { c->errcode = EMCSFGROUP; mc_destroy_subfield(psf); return 0; } } else if (tok == LVARIANT) { if (!(psf = mc_mk_subfield(parent))) { c->errcode = EMCNOMEM; return 0; } psf->which = MC_SFVARIANT; psf->u.child = mc_getsubfields(c, psf); if (mc_gettoken(c) == RVARIANT) psf->next = mc_getsubfields(c, psf); else { c->errcode = EMCSFVAR; mc_destroy_subfield(psf); return 0; } } else if (tok == RGROUP || tok == RVARIANT || tok == RINLINE) { mc_ungettoken(c); return 0; } else if (tok == REGULAR) { if (!(psf = mc_mk_subfield(parent))) { c->errcode = EMCNOMEM; return 0; } mc_ungettoken(c); if((mc_getdata(c, psf->prefix, SZ_PREFIX) == SZ_PREFIX) && (mc_gettoken(c) == SUBFIELD) && (mc_getdata(c, psf->name, SZ_SFNAME) == SZ_SFNAME)) { mc_token tok = mc_gettoken(c); mc_ungettoken(c); if (tok == LINTERVAL) { mc_getinterval(c, &psf->interval.start, &psf->interval.end); } else if (tok == LINLINE) { mc_gettoken(c); psf->u.in_line = mc_getfield(c); if (mc_gettoken(c) != RINLINE) { c->errcode = EMCSFINLINE; mc_destroy_subfield(psf); return 0; } } if (mc_getdata(c, psf->suffix, SZ_SUFFIX) == SZ_SUFFIX) { psf->which = MC_SF; psf->next = mc_getsubfields(c, psf); } else { c->errcode = EMCSF; mc_destroy_subfield(psf); return 0; } } } return psf; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/Makefile.in0000644000175000017500000010312711412336425013323 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = kdump$(EXEEXT) zebrash$(EXEEXT) bin_PROGRAMS = zebraidx$(EXEEXT) zebrasrv$(EXEEXT) subdir = index DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(modlibdir)" \ "$(DESTDIR)$(bindir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(modlib_LTLIBRARIES) am__DEPENDENCIES_1 = am_libidzebra_2_0_la_OBJECTS = recctrl.lo recgrs.lo mod_grs_sgml.lo \ attribute.lo compact.lo dir.lo dirs.lo extract.lo invstat.lo \ kinput.lo kcontrol.lo limit.lo orddict.lo rank1.lo \ ranksimilarity.lo rankstatic.lo records.lo recindex.lo \ reckeys.lo retrieve.lo rpnscan.lo rpnsearch.lo sortidx.lo \ stream.lo update_path.lo update_file.lo trunc.lo untrans.lo \ isam_methods.lo zaptterm.lo zebraapi.lo zinfo.lo zsets.lo \ key_block.lo check_res.lo rset_isam.lo libidzebra_2_0_la_OBJECTS = $(am_libidzebra_2_0_la_OBJECTS) libidzebra_2_0_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libidzebra_2_0_la_LDFLAGS) $(LDFLAGS) -o $@ mod_alvis_la_DEPENDENCIES = $(zebralib) $(am__DEPENDENCIES_1) am_mod_alvis_la_OBJECTS = mod_alvis.lo mod_alvis_la_OBJECTS = $(am_mod_alvis_la_OBJECTS) mod_alvis_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(mod_alvis_la_LDFLAGS) $(LDFLAGS) -o $@ mod_dom_la_DEPENDENCIES = $(zebralib) $(am__DEPENDENCIES_1) am_mod_dom_la_OBJECTS = mod_dom.lo mod_dom_la_OBJECTS = $(am_mod_dom_la_OBJECTS) mod_dom_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(mod_dom_la_LDFLAGS) $(LDFLAGS) -o $@ mod_grs_marc_la_DEPENDENCIES = $(zebralib) $(am__DEPENDENCIES_1) am_mod_grs_marc_la_OBJECTS = mod_grs_marc.lo marcomp.lo inline.lo mod_grs_marc_la_OBJECTS = $(am_mod_grs_marc_la_OBJECTS) mod_grs_marc_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(mod_grs_marc_la_LDFLAGS) $(LDFLAGS) -o $@ am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) mod_grs_regx_la_DEPENDENCIES = $(zebralib) $(am__DEPENDENCIES_2) am_mod_grs_regx_la_OBJECTS = mod_grs_regx.lo mod_grs_regx_la_OBJECTS = $(am_mod_grs_regx_la_OBJECTS) mod_grs_regx_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(mod_grs_regx_la_LDFLAGS) $(LDFLAGS) -o $@ mod_grs_xml_la_DEPENDENCIES = $(zebralib) $(am__DEPENDENCIES_2) am_mod_grs_xml_la_OBJECTS = mod_grs_xml.lo mod_grs_xml_la_OBJECTS = $(am_mod_grs_xml_la_OBJECTS) mod_grs_xml_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(mod_grs_xml_la_LDFLAGS) $(LDFLAGS) -o $@ mod_safari_la_DEPENDENCIES = $(zebralib) $(am__DEPENDENCIES_1) am_mod_safari_la_OBJECTS = mod_safari.lo mod_safari_la_OBJECTS = $(am_mod_safari_la_OBJECTS) mod_safari_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(mod_safari_la_LDFLAGS) $(LDFLAGS) -o $@ mod_text_la_DEPENDENCIES = $(zebralib) $(am__DEPENDENCIES_1) am_mod_text_la_OBJECTS = mod_text.lo mod_text_la_OBJECTS = $(am_mod_text_la_OBJECTS) mod_text_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(mod_text_la_LDFLAGS) $(LDFLAGS) -o $@ PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am_kdump_OBJECTS = kdump.$(OBJEXT) kdump_OBJECTS = $(am_kdump_OBJECTS) kdump_LDADD = $(LDADD) kdump_DEPENDENCIES = $(zebralib) $(am__DEPENDENCIES_1) am_zebraidx_OBJECTS = zebraidx.$(OBJEXT) zebraidx_OBJECTS = $(am_zebraidx_OBJECTS) zebraidx_LDADD = $(LDADD) zebraidx_DEPENDENCIES = $(zebralib) $(am__DEPENDENCIES_1) am_zebrash_OBJECTS = zebrash.$(OBJEXT) zebrash_OBJECTS = $(am_zebrash_OBJECTS) am__DEPENDENCIES_3 = $(zebralib) $(am__DEPENDENCIES_1) zebrash_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1) am_zebrasrv_OBJECTS = zebrasrv.$(OBJEXT) zebrasrv_OBJECTS = $(am_zebrasrv_OBJECTS) zebrasrv_LDADD = $(LDADD) zebrasrv_DEPENDENCIES = $(zebralib) $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libidzebra_2_0_la_SOURCES) \ $(EXTRA_libidzebra_2_0_la_SOURCES) $(mod_alvis_la_SOURCES) \ $(mod_dom_la_SOURCES) $(mod_grs_marc_la_SOURCES) \ $(mod_grs_regx_la_SOURCES) $(mod_grs_xml_la_SOURCES) \ $(mod_safari_la_SOURCES) $(mod_text_la_SOURCES) \ $(kdump_SOURCES) $(zebraidx_SOURCES) $(zebrash_SOURCES) \ $(zebrasrv_SOURCES) DIST_SOURCES = $(libidzebra_2_0_la_SOURCES) \ $(EXTRA_libidzebra_2_0_la_SOURCES) $(mod_alvis_la_SOURCES) \ $(mod_dom_la_SOURCES) $(mod_grs_marc_la_SOURCES) \ $(mod_grs_regx_la_SOURCES) $(mod_grs_xml_la_SOURCES) \ $(mod_safari_la_SOURCES) $(mod_text_la_SOURCES) \ $(kdump_SOURCES) $(zebraidx_SOURCES) $(zebrash_SOURCES) \ $(zebrasrv_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ aux_libs = \ ../rset/libidzebra-rset.la \ ../dict/libidzebra-dict.la \ ../isams/libidzebra-isams.la \ ../isamc/libidzebra-isamc.la \ ../isamb/libidzebra-isamb.la \ ../data1/libidzebra-data1.la \ ../bfile/libidzebra-bfile.la \ ../dfa/libidzebra-dfa.la \ ../util/libidzebra-util.la # Should match the main_zebralib in configure.ac # Should also match the libidzebra_..._la lines..! zebralib = libidzebra-2.0.la modlibdir = $(libdir)/$(PACKAGE)$(PACKAGE_SUFFIX)/modules tabdatadir = $(datadir)/$(PACKAGE)$(PACKAGE_SUFFIX)/tab # The shared modules mod_grs_regx_la_SOURCES = mod_grs_regx.c mod_grs_regx_la_LDFLAGS = -rpath $(modlibdir) -module -avoid-version mod_grs_regx_la_LADD = $(TCL_LIB) mod_grs_regx_la_LIBADD = $(zebralib) $(mod_grs_regx_la_LADD) mod_grs_xml_la_SOURCES = mod_grs_xml.c mod_grs_xml_la_LDFLAGS = -rpath $(modlibdir) -module -avoid-version mod_grs_xml_la_LADD = $(EXPAT_LIBS) mod_grs_xml_la_LIBADD = $(zebralib) $(mod_grs_xml_la_LADD) mod_grs_marc_la_SOURCES = mod_grs_marc.c marcomp.c marcomp.h inline.c inline.h mod_grs_marc_la_LDFLAGS = -rpath $(modlibdir) -module -avoid-version mod_grs_marc_la_LADD = mod_grs_marc_la_LIBADD = $(zebralib) $(mod_grs_marc_la_LADD) mod_safari_la_SOURCES = mod_safari.c mod_safari_la_LDFLAGS = -rpath $(modlibdir) -module -avoid-version mod_safari_la_LADD = mod_safari_la_LIBADD = $(zebralib) $(mod_safari_la_LADD) mod_alvis_la_SOURCES = mod_alvis.c mod_alvis_la_LDFLAGS = -rpath $(modlibdir) -module -avoid-version mod_alvis_la_LADD = mod_alvis_la_LIBADD = $(zebralib) $(mod_alvis_la_LADD) mod_dom_la_SOURCES = mod_dom.c mod_dom_la_LDFLAGS = -rpath $(modlibdir) -module -avoid-version mod_dom_la_LADD = mod_dom_la_LIBADD = $(zebralib) $(mod_dom_la_LADD) mod_text_la_SOURCES = mod_text.c mod_text_la_LDFLAGS = -rpath $(modlibdir) -module -avoid-version mod_text_la_LADD = mod_text_la_LIBADD = $(zebralib) $(mod_text_la_LADD) modlib_LTLIBRARIES = $(SHARED_MODULE_LA) EXTRA_LTLIBRARIES = \ mod-grs-regx.la \ mod-grs-xml.la \ mod-grs-marc.la \ mod-safari.la \ mod-alvis.la \ mod-dom.la \ mod-text.la EXTRA_libidzebra_2_0_la_SOURCES = \ $(mod_grs_regx_la_SOURCES) \ $(mod_grs_xml_la_SOURCES) \ $(mod_grs_marc_la_SOURCES) \ $(mod_safari_la_SOURCES) \ $(mod_alvis_la_SOURCES) \ $(mod_dom_la_SOURCES) \ $(mod_text_la_SOURCES) lib_LTLIBRARIES = $(zebralib) libidzebra_2_0_la_DEPENDENCIES = $(STATIC_MODULE_OBJ) $(aux_libs) libidzebra_2_0_la_LIBADD = $(STATIC_MODULE_OBJ) $(aux_libs) $(STATIC_MODULE_LADD) libidzebra_2_0_la_LDFLAGS = -export-dynamic -version-info $(ZEBRALIBS_VERSION_INFO) libidzebra_2_0_la_SOURCES = \ recctrl.c \ recgrs.c \ mod_grs_sgml.c \ attribute.c \ compact.c \ dir.c dirs.c \ extract.c \ index.h invstat.c \ kinput.c kcontrol.c \ limit.c \ orddict.c orddict.h \ rank.h rank1.c ranksimilarity.c rankstatic.c \ records.c recindex.c recindex.h reckeys.c reckeys.h \ retrieve.c \ rpnscan.c rpnsearch.c sortidx.c stream.c \ update_path.c update_file.c trunc.c untrans.c isam_methods.c \ zaptterm.c zebraapi.c zinfo.c zinfo.h zsets.c key_block.c key_block.h \ check_res.c rset_isam.c zebraidx_SOURCES = zebraidx.c zebrasrv_SOURCES = zebrasrv.c zebrash_SOURCES = zebrash.c kdump_SOURCES = kdump.c AM_CPPFLAGS = -I$(srcdir)/../include $(YAZINC) \ -DDEFAULT_PROFILE_PATH=\"$(tabdatadir)\" \ -DDEFAULT_MODULE_PATH=\"$(modlibdir)\" \ $(TCL_INCLUDE) LDADD = $(zebralib) $(YAZLALIB) zebrash_LDADD = $(LDADD) $(READLINE_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu index/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu index/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done install-modlibLTLIBRARIES: $(modlib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(modlibdir)" || $(MKDIR_P) "$(DESTDIR)$(modlibdir)" @list='$(modlib_LTLIBRARIES)'; test -n "$(modlibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(modlibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(modlibdir)"; \ } uninstall-modlibLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(modlib_LTLIBRARIES)'; test -n "$(modlibdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(modlibdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(modlibdir)/$$f"; \ done clean-modlibLTLIBRARIES: -test -z "$(modlib_LTLIBRARIES)" || rm -f $(modlib_LTLIBRARIES) @list='$(modlib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libidzebra-2.0.la: $(libidzebra_2_0_la_OBJECTS) $(libidzebra_2_0_la_DEPENDENCIES) $(libidzebra_2_0_la_LINK) -rpath $(libdir) $(libidzebra_2_0_la_OBJECTS) $(libidzebra_2_0_la_LIBADD) $(LIBS) mod-alvis.la: $(mod_alvis_la_OBJECTS) $(mod_alvis_la_DEPENDENCIES) $(mod_alvis_la_LINK) $(mod_alvis_la_OBJECTS) $(mod_alvis_la_LIBADD) $(LIBS) mod-dom.la: $(mod_dom_la_OBJECTS) $(mod_dom_la_DEPENDENCIES) $(mod_dom_la_LINK) $(mod_dom_la_OBJECTS) $(mod_dom_la_LIBADD) $(LIBS) mod-grs-marc.la: $(mod_grs_marc_la_OBJECTS) $(mod_grs_marc_la_DEPENDENCIES) $(mod_grs_marc_la_LINK) $(mod_grs_marc_la_OBJECTS) $(mod_grs_marc_la_LIBADD) $(LIBS) mod-grs-regx.la: $(mod_grs_regx_la_OBJECTS) $(mod_grs_regx_la_DEPENDENCIES) $(mod_grs_regx_la_LINK) $(mod_grs_regx_la_OBJECTS) $(mod_grs_regx_la_LIBADD) $(LIBS) mod-grs-xml.la: $(mod_grs_xml_la_OBJECTS) $(mod_grs_xml_la_DEPENDENCIES) $(mod_grs_xml_la_LINK) $(mod_grs_xml_la_OBJECTS) $(mod_grs_xml_la_LIBADD) $(LIBS) mod-safari.la: $(mod_safari_la_OBJECTS) $(mod_safari_la_DEPENDENCIES) $(mod_safari_la_LINK) $(mod_safari_la_OBJECTS) $(mod_safari_la_LIBADD) $(LIBS) mod-text.la: $(mod_text_la_OBJECTS) $(mod_text_la_DEPENDENCIES) $(mod_text_la_LINK) $(mod_text_la_OBJECTS) $(mod_text_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list kdump$(EXEEXT): $(kdump_OBJECTS) $(kdump_DEPENDENCIES) @rm -f kdump$(EXEEXT) $(LINK) $(kdump_OBJECTS) $(kdump_LDADD) $(LIBS) zebraidx$(EXEEXT): $(zebraidx_OBJECTS) $(zebraidx_DEPENDENCIES) @rm -f zebraidx$(EXEEXT) $(LINK) $(zebraidx_OBJECTS) $(zebraidx_LDADD) $(LIBS) zebrash$(EXEEXT): $(zebrash_OBJECTS) $(zebrash_DEPENDENCIES) @rm -f zebrash$(EXEEXT) $(LINK) $(zebrash_OBJECTS) $(zebrash_LDADD) $(LIBS) zebrasrv$(EXEEXT): $(zebrasrv_OBJECTS) $(zebrasrv_DEPENDENCIES) @rm -f zebrasrv$(EXEEXT) $(LINK) $(zebrasrv_OBJECTS) $(zebrasrv_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attribute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_res.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compact.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dir.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extract.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inline.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/invstat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isam_methods.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kcontrol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kdump.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/key_block.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kinput.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/limit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/marcomp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod_alvis.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod_dom.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod_grs_marc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod_grs_regx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod_grs_sgml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod_grs_xml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod_safari.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod_text.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orddict.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rank1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ranksimilarity.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rankstatic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recctrl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recgrs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recindex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reckeys.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/records.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/retrieve.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpnscan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpnsearch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rset_isam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sortidx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/untrans.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update_path.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zaptterm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zebraapi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zebraidx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zebrash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zebrasrv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zinfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zsets.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) install-binPROGRAMS: install-libLTLIBRARIES installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(modlibdir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool clean-modlibLTLIBRARIES clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-modlibLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-libLTLIBRARIES @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ uninstall-modlibLTLIBRARIES @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: install-am install-exec-am install-strip uninstall-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libLTLIBRARIES clean-libtool \ clean-modlibLTLIBRARIES clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-exec-hook install-html install-html-am \ install-info install-info-am install-libLTLIBRARIES \ install-man install-modlibLTLIBRARIES install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-hook uninstall-libLTLIBRARIES \ uninstall-modlibLTLIBRARIES install-exec-hook: cd $(DESTDIR)$(bindir); for p in $(bin_PROGRAMS); do \ mv -f $$p $$p$(PACKAGE_SUFFIX); \ ln -sf $$p$(PACKAGE_SUFFIX) $$p; \ done uninstall-hook: cd $(DESTDIR)$(bindir) && for p in $(bin_PROGRAMS); do \ rm -f $$p$(PACKAGE_SUFFIX); \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/index/recindex.h0000644000175000017500000001012711412332551013221 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef RECINDEX_H #define RECINDEX_H #include #include #include YAZ_BEGIN_CDECL #define REC_NO_INFO 8 typedef struct record_info { zint sysno; int newFlag; char *info[REC_NO_INFO]; size_t size[REC_NO_INFO]; char buf_size[REC_NO_INFO][6]; size_t size_size[REC_NO_INFO]; Zebra_mutex mutex; } *Record; typedef struct records_info *Records; /** \brief marks record for deletion (on file storage) \param p records handle \param recpp record pointer \returns ZEBRA_OK / ZEBRA_FAIL */ ZEBRA_RES rec_del(Records p, Record *recpp); /** \brief frees record (from memory) \param recpp record pointer */ void rec_free(Record *recpp); /** \brief puts record (writes into file storage) \param p records handle \param recpp record pointer \returns ZEBRA_OK / ZEBRA_FAIL */ ZEBRA_RES rec_put(Records p, Record *recpp); /** \brief creates new record (to be written to file storage) \param p records handle \returns record pointer (or NULL on error) */ Record rec_new(Records p); /** \brief gets record - with given system number \param p records handle \param sysno system ID (external number) \returns record pointer (or NULL on error) */ Record rec_get(Records p, zint sysno); /** \brief gets root record \param p records handle \returns record pointer (or NULL on error) */ Record rec_get_root(Records p); ZEBRA_RES rec_close (Records *p); /** \brief opens records system \param bfs block file storage \param rw read-write flag(0=read only, 1=write) \param compression_method REC_COMPRESS_ type */ Records rec_open(BFiles bfs, int rw, int compression_method); /** \brief check whether a compression method is supported \param compression_method (REC_COMPRESS_..) \retval 0 if method is unsupported \retval 1 if method is supported */ int rec_check_compression_method(int compression_method); char *rec_strdup(const char *s, size_t *len); void rec_prstat(Records p, int verbose); zint rec_sysno_to_int(zint sysno); /** \brief No compression ("none") */ #define REC_COMPRESS_NONE 0 /** \brief BZIP2 compression (slow and requires big chunks) */ #define REC_COMPRESS_BZIP2 1 /** \brief zlib compression (faster and works off small chunks) */ #define REC_COMPRESS_ZLIB 2 enum { recInfo_fileType, recInfo_filename, recInfo_delKeys, recInfo_databaseName, recInfo_storeData, recInfo_attr, recInfo_sortKeys }; typedef struct recindex *recindex_t; /** \brief opens record index handle \param bfs Block files handle \param rw 1 for read and write; 0 for read-only \param use_isamb 1 if ISAMB is to used for record index; 0 for flat (old) */ recindex_t recindex_open(BFiles bfs, int rw, int use_isamb); /** \brief closes record index handle \param p records handle */ void recindex_close(recindex_t p); int recindex_read_head(recindex_t p, void *buf); const char *recindex_get_fname(recindex_t p); ZEBRA_RES recindex_write_head(recindex_t p, const void *buf, size_t len); int recindex_read_indx(recindex_t p, zint sysno, void *buf, int itemsize, int ignoreError); void recindex_write_indx(recindex_t p, zint sysno, void *buf, int itemsize); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/kdump.c0000644000175000017500000001053111412332551012532 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #ifdef WIN32 #include #endif #if HAVE_UNISTD_H #include #endif #include #include #include "index.h" char *prog; int main(int argc, char **argv) { exit(0); } #if 0 /* old kdumper.. must be updated to use new codec .. */ int key_file_decode (FILE *f) { int c, d; c = getc (f); switch (c & 192) { case 0: d = c; break; case 64: d = ((c&63) << 8) + (getc (f) & 0xff); break; case 128: d = ((c&63) << 8) + (getc (f) & 0xff); d = (d << 8) + (getc (f) & 0xff); break; case 192: d = ((c&63) << 8) + (getc (f) & 0xff); d = (d << 8) + (getc (f) & 0xff); d = (d << 8) + (getc (f) & 0xff); break; default: d = 0; assert (0); } return d; } static int read_one (FILE *inf, char *name, char *key, struct it_key *prevk) { int c; int i = 0; struct it_key itkey; do { if ((c=getc(inf)) == EOF) return 0; name[i++] = c; } while (c); if (i > 1) prevk->sysno = 0; c = key_file_decode (inf); key[0] = c & 1; c = c >> 1; itkey.sysno = c + prevk->sysno; if (c) { prevk->sysno = itkey.sysno; prevk->seqno = 0; } c = key_file_decode (inf); itkey.seqno = c + prevk->seqno; prevk->seqno = itkey.seqno; memcpy (key+1, &itkey, sizeof(itkey)); return 1; } int main (int argc, char **argv) { int ret; char *arg; char *key_fname = NULL; char key_string[IT_MAX_WORD]; char key_info[256]; ZebraMaps zm; FILE *inf; Res res = NULL; struct it_key prevk; prevk.sysno = 0; prevk.seqno = 0; prog = *argv; while ((ret = options ("c:v:", argv, argc, &arg)) != -2) { if (ret == 0) { key_fname = arg; } else if (ret == 'v') { yaz_log_init (yaz_log_mask_str(arg), prog, NULL); } else if (ret == 'c') { if (!(res = res_open (arg, 0, 0))) { yaz_log(YLOG_FATAL, "Failed to open resource file %s", arg); exit (1); } } else { yaz_log (YLOG_FATAL, "Unknown option '-%s'", arg); exit (1); } } if (!key_fname) { fprintf (stderr, "kdump [-c config] [-v log] file\n"); exit (1); } if (!res) res = res_open ("zebra.cfg", 0, 0); zm = zebra_maps_open (res, 0); if (!(inf = fopen (key_fname, "r"))) { yaz_log (YLOG_FATAL|YLOG_ERRNO, "fopen %s", key_fname); exit (1); } printf ("t rg op sysno seqno txt\n"); while (read_one (inf, key_string, key_info, &prevk)) { struct it_key k; int op; char keybuf[IT_MAX_WORD+1]; char *to = keybuf; const char *from = key_string; int usedb_type = from[0]; int reg_type = from[1]; op = key_info[0]; memcpy (&k, 1+key_info, sizeof(k)); from += 2; while (*from) { const char *res = zebra_maps_output (zm, reg_type, &from); if (!res) *to++ = *from++; else while (*res) *to++ = *res++; } *to = '\0'; printf ("%c %3d %c %7d %5d %s\n", reg_type, usedb_type, op ? 'i':'d', k.sysno, k.seqno, keybuf); } zebra_maps_close (zm); if (fclose (inf)) { yaz_log (YLOG_FATAL|YLOG_ERRNO, "fclose %s", key_fname); exit (1); } exit (0); } #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/zebraidx.c0000644000175000017500000002142011412332551013221 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #ifdef WIN32 #include #endif #if HAVE_UNISTD_H #include #endif #if YAZ_HAVE_ICU #include #endif #include #include #include #include char *prog; static void filter_cb(void *cd, const char *name) { puts(name); } static void show_filters(ZebraService zs) { zebra_filter_info(zs, 0, filter_cb); } int main(int argc, char **argv) { int ret; int cmd = 0; char *arg; char *configName = 0; int nsections = 0; int enable_commit = 1; char *database = 0; Res res = res_open(0, 0); Res default_res = res_open(0, 0); int trans_started = 0; #ifndef WIN32 char nbuf[100]; #endif ZebraService zs = 0; ZebraHandle zh = 0; #ifdef WIN32 #else sprintf(nbuf, "%.40s(%ld)", *argv, (long) getpid()); yaz_log_init_prefix(nbuf); #endif prog = *argv; if (argc < 2) { fprintf(stderr, "%s [options] command ...\n" "Commands:\n" " update Update index with files below .\n" " If is empty filenames are read from stdin.\n" " delete Delete index with files below .\n" " create Create database \n" " drop Drop database \n" " commit Commit changes\n" " clean Clean shadow files\n" "Options:\n" " -t Index files as (grs or text).\n" " -c Read configuration file .\n" " -g Index files according to group settings.\n" " -d Records belong to Z39.50 database .\n" " -m Use before flushing keys to disk.\n" " -n Don't use shadow system.\n" " -s Show analysis on stdout, but do no work.\n" " -v Set logging to .\n" " -l Write log to .\n" " -L Don't follow symbolic links.\n" " -f Display information for the first records.\n" " -V Show version.\n", *argv ); exit(1); } res_set(default_res, "profilePath", DEFAULT_PROFILE_PATH); res_set(default_res, "modulePath", DEFAULT_MODULE_PATH); while ((ret = options("sVt:c:g:d:m:v:nf:l:L", argv, argc, &arg)) != -2) { if (ret == 0) { if(cmd == 0) /* command */ { if (!zs) { const char *config = configName ? configName : "zebra.cfg"; zs = zebra_start_res(config, default_res, res); if (!zs) { yaz_log(YLOG_FATAL, "Cannot read config %s", config); exit(1); } zh = zebra_open(zs, 0); zebra_shadow_enable(zh, enable_commit); } if (database && zebra_select_database(zh, database) == ZEBRA_FAIL) { yaz_log(YLOG_FATAL, "Could not select database %s " "errCode=%d", database, zebra_errCode(zh) ); exit(1); } if (!strcmp(arg, "update")) cmd = 'u'; else if (!strcmp(arg, "update1")) cmd = 'U'; else if (!strcmp(arg, "update2")) cmd = 'm'; else if (!strcmp(arg, "dump")) cmd = 's'; else if (!strcmp(arg, "del") || !strcmp(arg, "delete")) cmd = 'd'; else if (!strcmp(arg, "adelete")) cmd = 'a'; else if (!strcmp(arg, "init")) { zebra_init(zh); } else if (!strcmp(arg, "drop")) { cmd = 'D'; } else if (!strcmp(arg, "create")) { cmd = 'C'; } else if (!strcmp(arg, "commit")) { zebra_commit(zh); } else if (!strcmp(arg, "clean")) { zebra_clean(zh); } else if (!strcmp(arg, "stat") || !strcmp(arg, "status")) { zebra_register_statistics(zh, 0); } else if (!strcmp(arg, "dumpdict")) { zebra_register_statistics(zh, 1); } else if (!strcmp(arg, "compact")) { zebra_compact(zh); } else if (!strcmp(arg, "filters")) { show_filters(zs); } else { yaz_log(YLOG_FATAL, "unknown command: %s", arg); exit(1); } } else { ZEBRA_RES res = ZEBRA_OK; if (!trans_started) { trans_started=1; if (zebra_begin_trans(zh, 1) != ZEBRA_OK) exit(1); } switch (cmd) { case 'u': res = zebra_repository_index(zh, arg, action_update); break; case 'd': res = zebra_repository_index(zh, arg, action_delete); break; case 'a': res = zebra_repository_index(zh, arg, action_a_delete); break; case 's': res = zebra_repository_show(zh, arg); nsections = 0; break; case 'C': res = zebra_create_database(zh, arg); break; case 'D': res = zebra_drop_database(zh, arg); break; default: nsections = 0; } if (res != ZEBRA_OK) { const char *add = zebra_errAdd(zh); yaz_log(YLOG_FATAL, "Operation failed: %s %s", zebra_errString(zh), add ? add : ""); if (trans_started) if (zebra_end_trans(zh) != ZEBRA_OK) yaz_log(YLOG_WARN, "zebra_end_trans failed"); zebra_close(zh); zebra_stop(zs); exit(1); } log_event_end(NULL, NULL); } } else if (ret == 'V') { char version_str[20]; char sys_str[80]; zebra_get_version(version_str, sys_str); printf("Zebra %s\n", version_str); printf("(C) 1994-2010, Index Data ApS\n"); printf("Zebra is free software, covered by the GNU General Public License, and you are\n"); printf("welcome to change it and/or distribute copies of it under certain conditions.\n"); printf("SHA1 ID: %s\n", sys_str); if (strcmp(version_str, ZEBRAVER)) printf("zebraidx compiled version %s\n", ZEBRAVER); #if YAZ_HAVE_ICU printf("Using ICU\n"); #endif } else if (ret == 'v') yaz_log_init_level(yaz_log_mask_str(arg)); else if (ret == 'l') yaz_log_init_file(arg); else if (ret == 'm') res_set(res, "memMax", arg); else if (ret == 'd') database = arg; else if (ret == 's') res_set(res, "openRW", "0"); else if (ret == 'g') res_set(res, "group", arg); else if (ret == 'f') res_set(res, "fileVerboseLimit", arg); else if (ret == 'c') configName = arg; else if (ret == 't') res_set(res, "recordType", arg); else if (ret == 'n') enable_commit = 0; else if (ret == 'L') res_set(res, "followLinks", "0"); else yaz_log(YLOG_WARN, "unknown option '-%s'", arg); } /* while arg */ if (trans_started) if (zebra_end_trans(zh) != ZEBRA_OK) yaz_log(YLOG_WARN, "zebra_end_trans failed"); zebra_close(zh); zebra_stop(zs); res_close(res); res_close(default_res); exit(0); return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/orddict.c0000644000175000017500000000377411412332551013055 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include "index.h" WRBUF zebra_mk_ord_str(int ord, const char *str) { char pref[20]; WRBUF w = wrbuf_alloc(); int len; assert(ord >= 0); len = key_SU_encode(ord, pref); wrbuf_write(w, pref, len); wrbuf_puts(w, str); return w; } char *dict_lookup_ord(Dict d, int ord, const char *str) { WRBUF w = zebra_mk_ord_str(ord, str); char *rinfo = dict_lookup(d, wrbuf_cstr(w)); wrbuf_destroy(w); return rinfo; } int dict_insert_ord(Dict d, int ord, const char *p, int userlen, void *userinfo) { WRBUF w = zebra_mk_ord_str(ord, p); int r = dict_insert(d, wrbuf_cstr(w), userlen, userinfo); wrbuf_destroy(w); return r; } int dict_delete_ord(Dict d, int ord, const char *p) { WRBUF w = zebra_mk_ord_str(ord, p); int r = dict_delete(d, wrbuf_cstr(w)); wrbuf_destroy(w); return r; } int dict_delete_subtree_ord(Dict d, int ord, void *client, int (*f)(const char *info, void *client)) { WRBUF w = zebra_mk_ord_str(ord, ""); int r = dict_delete_subtree(d, wrbuf_cstr(w), client, f); wrbuf_destroy(w); return r; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/mod_alvis.c0000644000175000017500000004637311412332551013404 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include #include #include #include #if YAZ_HAVE_EXSLT #include #endif #include #include struct filter_schema { const char *name; const char *identifier; const char *stylesheet; struct filter_schema *next; const char *default_schema; /* char default_schema; */ xsltStylesheetPtr stylesheet_xsp; }; struct filter_info { xmlDocPtr doc; char *fname; char *full_name; const char *profile_path; int split_level; const char *split_path; ODR odr; struct filter_schema *schemas; xmlTextReaderPtr reader; }; #define ZEBRA_SCHEMA_XSLT_NS "http://indexdata.dk/zebra/xslt/1" #define XML_STRCMP(a,b) strcmp((char*)a, b) #define XML_STRLEN(a) strlen((char*)a) static const char *zebra_xslt_ns = ZEBRA_SCHEMA_XSLT_NS; static void set_param_str(const char **params, const char *name, const char *value, ODR odr) { char *quoted = odr_malloc(odr, 3 + strlen(value)); sprintf(quoted, "'%s'", value); while (*params) params++; params[0] = name; params[1] = quoted; params[2] = 0; } static void set_param_int(const char **params, const char *name, zint value, ODR odr) { char *quoted = odr_malloc(odr, 30); /* 25 digits enough for 2^64 */ while (*params) params++; sprintf(quoted, "'" ZINT_FORMAT "'", value); params[0] = name; params[1] = quoted; params[2] = 0; } #define ENABLE_INPUT_CALLBACK 0 #if ENABLE_INPUT_CALLBACK static int zebra_xmlInputMatchCallback (char const *filename) { yaz_log(YLOG_LOG, "match %s", filename); return 0; } static void * zebra_xmlInputOpenCallback (char const *filename) { return 0; } static int zebra_xmlInputReadCallback (void * context, char * buffer, int len) { return 0; } static int zebra_xmlInputCloseCallback (void * context) { return 0; } #endif static void *filter_init(Res res, RecType recType) { struct filter_info *tinfo = (struct filter_info *) xmalloc(sizeof(*tinfo)); tinfo->reader = 0; tinfo->fname = 0; tinfo->full_name = 0; tinfo->profile_path = 0; tinfo->split_level = 0; tinfo->split_path = 0; tinfo->odr = odr_createmem(ODR_ENCODE); tinfo->doc = 0; tinfo->schemas = 0; #if YAZ_HAVE_EXSLT exsltRegisterAll(); #endif #if ENABLE_INPUT_CALLBACK xmlRegisterDefaultInputCallbacks(); xmlRegisterInputCallbacks(zebra_xmlInputMatchCallback, zebra_xmlInputOpenCallback, zebra_xmlInputReadCallback, zebra_xmlInputCloseCallback); #endif return tinfo; } static int attr_content(struct _xmlAttr *attr, const char *name, const char **dst_content) { if (!XML_STRCMP(attr->name, name) && attr->children && attr->children->type == XML_TEXT_NODE) { *dst_content = (const char *)(attr->children->content); return 1; } return 0; } static void destroy_schemas(struct filter_info *tinfo) { struct filter_schema *schema = tinfo->schemas; while (schema) { struct filter_schema *schema_next = schema->next; if (schema->stylesheet_xsp) xsltFreeStylesheet(schema->stylesheet_xsp); xfree(schema); schema = schema_next; } tinfo->schemas = 0; xfree(tinfo->fname); if (tinfo->doc) xmlFreeDoc(tinfo->doc); tinfo->doc = 0; } static ZEBRA_RES create_schemas(struct filter_info *tinfo, const char *fname) { char tmp_full_name[1024]; xmlNodePtr ptr; tinfo->fname = xstrdup(fname); if (yaz_filepath_resolve(tinfo->fname, tinfo->profile_path, NULL, tmp_full_name)) tinfo->full_name = xstrdup(tmp_full_name); else tinfo->full_name = xstrdup(tinfo->fname); yaz_log(YLOG_LOG, "alvis filter: loading config file %s", tinfo->full_name); tinfo->doc = xmlParseFile(tinfo->full_name); if (!tinfo->doc) { yaz_log(YLOG_WARN, "alvis filter: could not parse config file %s", tinfo->full_name); return ZEBRA_FAIL; } ptr = xmlDocGetRootElement(tinfo->doc); if (!ptr || ptr->type != XML_ELEMENT_NODE || XML_STRCMP(ptr->name, "schemaInfo")) { yaz_log(YLOG_WARN, "alvis filter: config file %s :" " expected root element ", tinfo->full_name); return ZEBRA_FAIL; } for (ptr = ptr->children; ptr; ptr = ptr->next) { if (ptr->type != XML_ELEMENT_NODE) continue; if (!XML_STRCMP(ptr->name, "schema")) { struct _xmlAttr *attr; struct filter_schema *schema = xmalloc(sizeof(*schema)); schema->name = 0; schema->identifier = 0; schema->stylesheet = 0; schema->default_schema = 0; schema->next = tinfo->schemas; schema->stylesheet_xsp = 0; tinfo->schemas = schema; for (attr = ptr->properties; attr; attr = attr->next) { attr_content(attr, "identifier", &schema->identifier); attr_content(attr, "name", &schema->name); attr_content(attr, "stylesheet", &schema->stylesheet); attr_content(attr, "default", &schema->default_schema); } /*yaz_log(YLOG_LOG, "XSLT add %s %s %s", schema->name, schema->identifier, schema->stylesheet); */ /* find requested schema */ if (schema->stylesheet) { char tmp_xslt_full_name[1024]; if (!yaz_filepath_resolve(schema->stylesheet, tinfo->profile_path, NULL, tmp_xslt_full_name)) { yaz_log(YLOG_WARN, "alvis filter: stylesheet %s not found in path %s", schema->stylesheet, tinfo->profile_path); return ZEBRA_FAIL; } schema->stylesheet_xsp = xsltParseStylesheetFile((const xmlChar*) tmp_xslt_full_name); if (!schema->stylesheet_xsp) { yaz_log(YLOG_WARN, "alvis filter: could not parse xslt stylesheet %s", tmp_xslt_full_name); return ZEBRA_FAIL; } } } else if (!XML_STRCMP(ptr->name, "split")) { struct _xmlAttr *attr; for (attr = ptr->properties; attr; attr = attr->next) { const char *split_level_str = 0; attr_content(attr, "level", &split_level_str); tinfo->split_level = split_level_str ? atoi(split_level_str) : 0; } } else { yaz_log(YLOG_WARN, "Bad element %s in %s", ptr->name, fname); return ZEBRA_FAIL; } } return ZEBRA_OK; } static struct filter_schema *lookup_schema(struct filter_info *tinfo, const char *est) { struct filter_schema *schema; for (schema = tinfo->schemas; schema; schema = schema->next) { /* find requested schema */ if (est) { if (schema->identifier && !strcmp(schema->identifier, est)) return schema; if (schema->name && !strcmp(schema->name, est)) return schema; } /* or return default schema if defined */ else if (schema->default_schema) return schema; } /* return first schema if no default schema defined */ if (tinfo->schemas) return tinfo->schemas; return 0; } static ZEBRA_RES filter_config(void *clientData, Res res, const char *args) { struct filter_info *tinfo = clientData; if (!args || !*args) { yaz_log(YLOG_WARN, "alvis filter: need config file"); return ZEBRA_FAIL; } if (tinfo->fname && !strcmp(args, tinfo->fname)) return ZEBRA_OK; tinfo->profile_path = res_get(res, "profilePath"); yaz_log(YLOG_LOG, "alvis filter: profilePath %s", tinfo->profile_path); destroy_schemas(tinfo); return create_schemas(tinfo, args); } static void filter_destroy(void *clientData) { struct filter_info *tinfo = clientData; destroy_schemas(tinfo); xfree(tinfo->full_name); if (tinfo->reader) xmlFreeTextReader(tinfo->reader); odr_destroy(tinfo->odr); xfree(tinfo); } static int ioread_ex(void *context, char *buffer, int len) { struct recExtractCtrl *p = context; return p->stream->readf(p->stream, buffer, len); } static int ioclose_ex(void *context) { return 0; } static void index_cdata(struct filter_info *tinfo, struct recExtractCtrl *ctrl, xmlNodePtr ptr, RecWord *recWord) { for(; ptr; ptr = ptr->next) { index_cdata(tinfo, ctrl, ptr->children, recWord); if (ptr->type != XML_TEXT_NODE) continue; recWord->term_buf = (const char *)ptr->content; recWord->term_len = XML_STRLEN(ptr->content); (*ctrl->tokenAdd)(recWord); } } static void index_node(struct filter_info *tinfo, struct recExtractCtrl *ctrl, xmlNodePtr ptr, RecWord *recWord) { for(; ptr; ptr = ptr->next) { index_node(tinfo, ctrl, ptr->children, recWord); if (ptr->type != XML_ELEMENT_NODE || !ptr->ns || XML_STRCMP(ptr->ns->href, zebra_xslt_ns)) continue; if (!XML_STRCMP(ptr->name, "index")) { const char *name_str = 0; const char *type_str = 0; const char *xpath_str = 0; struct _xmlAttr *attr; for (attr = ptr->properties; attr; attr = attr->next) { attr_content(attr, "name", &name_str); attr_content(attr, "xpath", &xpath_str); attr_content(attr, "type", &type_str); } if (name_str) { const char *prev_type = recWord->index_type; /* save default type */ if (type_str && *type_str) recWord->index_type = (const char *) type_str; /* type was given */ recWord->index_name = name_str; index_cdata(tinfo, ctrl, ptr->children, recWord); recWord->index_type = prev_type; /* restore it again */ } } } } static void index_record(struct filter_info *tinfo,struct recExtractCtrl *ctrl, xmlNodePtr ptr, RecWord *recWord) { const char *type_str = "update"; if (ptr && ptr->type == XML_ELEMENT_NODE && ptr->ns && !XML_STRCMP(ptr->ns->href, zebra_xslt_ns) && !XML_STRCMP(ptr->name, "record")) { const char *id_str = 0; const char *rank_str = 0; struct _xmlAttr *attr; for (attr = ptr->properties; attr; attr = attr->next) { attr_content(attr, "type", &type_str); attr_content(attr, "id", &id_str); attr_content(attr, "rank", &rank_str); } if (id_str) sscanf(id_str, "%255s", ctrl->match_criteria); if (rank_str) ctrl->staticrank = atozint(rank_str); ptr = ptr->children; } if (!strcmp("update", type_str)) index_node(tinfo, ctrl, ptr, recWord); else if (!strcmp("delete", type_str)) yaz_log(YLOG_WARN, "alvis filter delete: to be implemented"); else yaz_log(YLOG_WARN, "alvis filter: unknown record type '%s'", type_str); } static int extract_doc(struct filter_info *tinfo, struct recExtractCtrl *p, xmlDocPtr doc) { RecWord recWord; const char *params[10]; xmlChar *buf_out; int len_out; struct filter_schema *schema = lookup_schema(tinfo, zebra_xslt_ns); params[0] = 0; set_param_str(params, "schema", zebra_xslt_ns, tinfo->odr); (*p->init)(p, &recWord); if (schema && schema->stylesheet_xsp) { xmlNodePtr root_ptr; xmlDocPtr resDoc = xsltApplyStylesheet(schema->stylesheet_xsp, doc, params); if (p->flagShowRecords) { xmlDocDumpMemory(resDoc, &buf_out, &len_out); fwrite(buf_out, len_out, 1, stdout); xmlFree(buf_out); } root_ptr = xmlDocGetRootElement(resDoc); if (root_ptr) index_record(tinfo, p, root_ptr, &recWord); else { yaz_log(YLOG_WARN, "No root for index XML record." " split_level=%d stylesheet=%s", tinfo->split_level, schema->stylesheet); } xmlFreeDoc(resDoc); } xmlDocDumpMemory(doc, &buf_out, &len_out); if (p->flagShowRecords) fwrite(buf_out, len_out, 1, stdout); if (p->setStoreData) (*p->setStoreData)(p, buf_out, len_out); xmlFree(buf_out); xmlFreeDoc(doc); return RECCTRL_EXTRACT_OK; } static int extract_split(struct filter_info *tinfo, struct recExtractCtrl *p) { int ret; if (p->first_record) { if (tinfo->reader) xmlFreeTextReader(tinfo->reader); tinfo->reader = xmlReaderForIO(ioread_ex, ioclose_ex, p /* I/O handler */, 0 /* URL */, 0 /* encoding */, XML_PARSE_XINCLUDE | XML_PARSE_NOENT | XML_PARSE_NONET); } if (!tinfo->reader) return RECCTRL_EXTRACT_ERROR_GENERIC; ret = xmlTextReaderRead(tinfo->reader); while (ret == 1) { int type = xmlTextReaderNodeType(tinfo->reader); int depth = xmlTextReaderDepth(tinfo->reader); if (type == XML_READER_TYPE_ELEMENT && tinfo->split_level == depth) { xmlNodePtr ptr = xmlTextReaderExpand(tinfo->reader); if (ptr) { xmlNodePtr ptr2 = xmlCopyNode(ptr, 1); xmlDocPtr doc = xmlNewDoc((const xmlChar*) "1.0"); xmlDocSetRootElement(doc, ptr2); return extract_doc(tinfo, p, doc); } else { xmlFreeTextReader(tinfo->reader); tinfo->reader = 0; return RECCTRL_EXTRACT_ERROR_GENERIC; } } ret = xmlTextReaderRead(tinfo->reader); } xmlFreeTextReader(tinfo->reader); tinfo->reader = 0; return RECCTRL_EXTRACT_EOF; } static int extract_full(struct filter_info *tinfo, struct recExtractCtrl *p) { if (p->first_record) /* only one record per stream */ { xmlDocPtr doc = xmlReadIO(ioread_ex, ioclose_ex, p /* I/O handler */, 0 /* URL */, 0 /* encoding */, XML_PARSE_XINCLUDE | XML_PARSE_NOENT | XML_PARSE_NONET); if (!doc) return RECCTRL_EXTRACT_ERROR_GENERIC; /* else { xmlNodePtr root = xmlDocGetRootElement(doc); if (!root) return RECCTRL_EXTRACT_ERROR_GENERIC; } */ return extract_doc(tinfo, p, doc); } else return RECCTRL_EXTRACT_EOF; } static int filter_extract(void *clientData, struct recExtractCtrl *p) { struct filter_info *tinfo = clientData; odr_reset(tinfo->odr); if (tinfo->split_level == 0 || p->setStoreData == 0) return extract_full(tinfo, p); else return extract_split(tinfo, p); } static int ioread_ret(void *context, char *buffer, int len) { struct recRetrieveCtrl *p = context; return p->stream->readf(p->stream, buffer, len); } static int ioclose_ret(void *context) { return 0; } static int filter_retrieve (void *clientData, struct recRetrieveCtrl *p) { /* const char *esn = zebra_xslt_ns; */ const char *esn = 0; const char *params[32]; struct filter_info *tinfo = clientData; xmlDocPtr resDoc; xmlDocPtr doc; struct filter_schema *schema; if (p->comp) { if (p->comp->which == Z_RecordComp_simple && p->comp->u.simple->which == Z_ElementSetNames_generic) { esn = p->comp->u.simple->u.generic; } else if (p->comp->which == Z_RecordComp_complex && p->comp->u.complex->generic->elementSpec && p->comp->u.complex->generic->elementSpec->which == Z_ElementSpec_elementSetName) { esn = p->comp->u.complex->generic->elementSpec->u.elementSetName; } } schema = lookup_schema(tinfo, esn); if (!schema) { p->diagnostic = YAZ_BIB1_SPECIFIED_ELEMENT_SET_NAME_NOT_VALID_FOR_SPECIFIED_; return 0; } params[0] = 0; set_param_int(params, "id", p->localno, p->odr); if (p->fname) set_param_str(params, "filename", p->fname, p->odr); if (p->staticrank >= 0) set_param_int(params, "rank", p->staticrank, p->odr); if (esn) set_param_str(params, "schema", esn, p->odr); else if (schema->name) set_param_str(params, "schema", schema->name, p->odr); else if (schema->identifier) set_param_str(params, "schema", schema->identifier, p->odr); else set_param_str(params, "schema", "", p->odr); if (p->score >= 0) set_param_int(params, "score", p->score, p->odr); set_param_int(params, "size", p->recordSize, p->odr); doc = xmlReadIO(ioread_ret, ioclose_ret, p /* I/O handler */, 0 /* URL */, 0 /* encoding */, XML_PARSE_XINCLUDE | XML_PARSE_NOENT | XML_PARSE_NONET); if (!doc) { p->diagnostic = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS; return 0; } if (!schema->stylesheet_xsp) resDoc = doc; else { resDoc = xsltApplyStylesheet(schema->stylesheet_xsp, doc, params); xmlFreeDoc(doc); } if (!resDoc) { p->diagnostic = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS; } else if (!p->input_format || !oid_oidcmp(p->input_format, yaz_oid_recsyn_xml)) { xmlChar *buf_out; int len_out; if (schema->stylesheet_xsp) xsltSaveResultToString(&buf_out, &len_out, resDoc, schema->stylesheet_xsp); else xmlDocDumpMemory(resDoc, &buf_out, &len_out); p->output_format = yaz_oid_recsyn_xml; p->rec_len = len_out; p->rec_buf = odr_malloc(p->odr, p->rec_len); memcpy(p->rec_buf, buf_out, p->rec_len); xmlFree(buf_out); } else if (!oid_oidcmp(p->output_format, yaz_oid_recsyn_sutrs)) { xmlChar *buf_out; int len_out; if (schema->stylesheet_xsp) xsltSaveResultToString(&buf_out, &len_out, resDoc, schema->stylesheet_xsp); else xmlDocDumpMemory(resDoc, &buf_out, &len_out); p->output_format = yaz_oid_recsyn_sutrs; p->rec_len = len_out; p->rec_buf = odr_malloc(p->odr, p->rec_len); memcpy(p->rec_buf, buf_out, p->rec_len); xmlFree(buf_out); } else { p->diagnostic = YAZ_BIB1_RECORD_SYNTAX_UNSUPP; } xmlFreeDoc(resDoc); return 0; } static struct recType filter_type = { 0, "alvis", filter_init, filter_config, filter_destroy, filter_extract, filter_retrieve }; RecType #ifdef IDZEBRA_STATIC_ALVIS idzebra_filter_alvis #else idzebra_filter #endif [] = { &filter_type, 0, }; /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/untrans.c0000644000175000017500000000543511412332551013113 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include "index.h" #include int zebra_term_untrans(ZebraHandle zh, const char *index_type, char *dst, const char *src) { zebra_map_t zm = zebra_map_get(zh->reg->zebra_maps, index_type); if (!zm) { return -2; } if (zebra_maps_is_icu(zm)) { return -1; } else { int len = 0; while (*src) { const char *cp = zebra_maps_output(zm, &src); if (!cp) { if (len < IT_MAX_WORD-1) dst[len++] = *src; src++; } else while (*cp && len < IT_MAX_WORD-1) dst[len++] = *cp++; } dst[len] = '\0'; } return 0; } int zebra_term_untrans_iconv(ZebraHandle zh, NMEM stream, const char *index_type, char **dst, const char *src) { char term_src[IT_MAX_WORD]; char term_dst[IT_MAX_WORD]; int r; r = zebra_term_untrans (zh, index_type, term_src, src); if (r) return r; if (zh->iconv_from_utf8 != 0) { int len; char *inbuf = term_src; size_t inleft = strlen(term_src); char *outbuf = term_dst; size_t outleft = sizeof(term_dst)-1; size_t ret; ret = yaz_iconv (zh->iconv_from_utf8, &inbuf, &inleft, &outbuf, &outleft); if (ret == (size_t)(-1)) len = 0; else { yaz_iconv (zh->iconv_from_utf8, 0, 0, &outbuf, &outleft); len = outbuf - term_dst; } *dst = nmem_malloc(stream, len + 1); if (len > 0) memcpy (*dst, term_dst, len); (*dst)[len] = '\0'; } else *dst = nmem_strdup(stream, term_src); return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/key_block.h0000644000175000017500000000277711412332551013376 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef ZEBRA_KEY_BLOCK_H #define ZEBRA_KEY_BLOCK_H #include "it_key.h" YAZ_BEGIN_CDECL typedef struct zebra_key_block *zebra_key_block_t; zebra_key_block_t key_block_create(int mem, const char *key_tmp_dir, int use_threads); void key_block_destroy(zebra_key_block_t *pp); void key_block_flush(zebra_key_block_t p, int is_final); void key_block_write(zebra_key_block_t p, zint sysno, struct it_key *key_in, int cmd, const char *str_buf, size_t str_len, zint staticrank, int static_rank_enable); int key_block_get_no_files(zebra_key_block_t p); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/zinfo.c0000644000175000017500000013602611412332551012547 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include "zinfo.h" #define ZINFO_DEBUG 0 struct zebSUInfo { char *index_type; zinfo_index_category_t cat; char *str; int ordinal; zint doc_occurrences; zint term_occurrences; }; struct zebSUInfoB { struct zebSUInfo info; struct zebSUInfoB *next; }; typedef struct zebAccessObjectB *zebAccessObject; struct zebAccessObjectB { void *handle; zint sysno; Odr_oid *oid; zebAccessObject next; }; typedef struct zebAccessInfoB *zebAccessInfo; struct zebAccessInfoB { zebAccessObject attributeSetIds; zebAccessObject schemas; }; typedef struct { struct zebSUInfoB *SUInfo; zint sysno; int dirty; int readFlag; data1_node *data1_tree; } *zebAttributeDetails; struct zebDatabaseInfoB { zebAttributeDetails attributeDetails; int ordinalDatabase; char *databaseName; data1_node *data1_database; zint recordCount; /* records in db */ zint recordBytes; /* size of records */ zint sysno; /* sysno of database info */ int readFlag; /* 1: read is needed when referenced; 0 if not */ int dirty; /* 1: database is dirty: write is needed */ struct zebDatabaseInfoB *next; zebAccessInfo accessInfo; }; struct zebraExplainAttset { char *name; int ordinal; struct zebraExplainAttset *next; }; struct zebraCategoryListInfo { int dirty; zint sysno; data1_node *data1_categoryList; }; struct zebraExplainInfo { int ordinalSU; int ordinalDatabase; zint runNumber; int dirty; int write_flag; Records records; data1_handle dh; Res res; struct zebraExplainAttset *attsets; NMEM nmem; data1_node *data1_target; struct zebraCategoryListInfo *categoryList; struct zebDatabaseInfoB *databaseInfo; struct zebDatabaseInfoB *curDatabaseInfo; zebAccessInfo accessInfo; char date[15]; /* YYYY MMDD HH MM SS */ ZebraExplainUpdateFunc *updateFunc; void *updateHandle; }; static void zebraExplain_initCommonInfo(ZebraExplainInfo zei, data1_node *n); static void zebraExplain_initAccessInfo(ZebraExplainInfo zei, data1_node *n); static data1_node *read_sgml_rec(data1_handle dh, NMEM nmem, Record rec) { return data1_read_sgml(dh, nmem, rec->info[recInfo_storeData]); } static void zebraExplain_writeDatabase(ZebraExplainInfo zei, struct zebDatabaseInfoB *zdi, int key_flush); static void zebraExplain_writeAttributeDetails(ZebraExplainInfo zei, zebAttributeDetails zad, const char *databaseName, int key_flush); static void zebraExplain_writeTarget(ZebraExplainInfo zei, int key_flush); static void zebraExplain_writeAttributeSet(ZebraExplainInfo zei, zebAccessObject o, int key_flush); static void zebraExplain_writeCategoryList(ZebraExplainInfo zei, struct zebraCategoryListInfo *zcl, int key_flush); static Record createRecord(Records records, zint *sysno) { Record rec; if (*sysno) { rec = rec_get(records, *sysno); if (!rec) return 0; xfree(rec->info[recInfo_storeData]); } else { rec = rec_new(records); if (!rec) return 0; *sysno = rec->sysno; rec->info[recInfo_fileType] = rec_strdup("grs.sgml", &rec->size[recInfo_fileType]); rec->info[recInfo_databaseName] = rec_strdup("IR-Explain-1", &rec->size[recInfo_databaseName]); } return rec; } void zebraExplain_flush(ZebraExplainInfo zei, void *handle) { if (!zei) return; zei->updateHandle = handle; if (zei->write_flag) { struct zebDatabaseInfoB *zdi; zebAccessObject o; /* write each database info record */ for (zdi = zei->databaseInfo; zdi; zdi = zdi->next) { zebraExplain_writeDatabase(zei, zdi, 1); zebraExplain_writeAttributeDetails(zei, zdi->attributeDetails, zdi->databaseName, 1); } zebraExplain_writeTarget(zei, 1); zebraExplain_writeCategoryList(zei, zei->categoryList, 1); assert(zei->accessInfo); for (o = zei->accessInfo->attributeSetIds; o; o = o->next) if (!o->sysno) zebraExplain_writeAttributeSet(zei, o, 1); for (o = zei->accessInfo->schemas; o; o = o->next) if (!o->sysno) { /* zebraExplain_writeSchema(zei, o, 1); */ } for (zdi = zei->databaseInfo; zdi; zdi = zdi->next) { zebraExplain_writeDatabase(zei, zdi, 0); zebraExplain_writeAttributeDetails(zei, zdi->attributeDetails, zdi->databaseName, 0); } zebraExplain_writeTarget(zei, 0); } } void zebraExplain_close(ZebraExplainInfo zei) { #if ZINFO_DEBUG yaz_log(YLOG_LOG, "zebraExplain_close"); #endif if (!zei) return; zebraExplain_flush(zei, zei->updateHandle); nmem_destroy(zei->nmem); } void zebraExplain_mergeOids(ZebraExplainInfo zei, data1_node *n, zebAccessObject *op) { data1_node *np; for (np = n->child; np; np = np->next) { char str[64]; int len; Odr_oid *oid; zebAccessObject ao; if (np->which != DATA1N_tag || strcmp(np->u.tag.tag, "oid")) continue; len = np->child->u.data.len; if (len > 63) len = 63; memcpy(str, np->child->u.data.data, len); str[len] = '\0'; oid = odr_getoidbystr_nmem(zei->nmem, str); for (ao = *op; ao; ao = ao->next) if (!oid_oidcmp(oid, ao->oid)) { ao->sysno = 1; break; } if (!ao) { ao = (zebAccessObject) nmem_malloc(zei->nmem, sizeof(*ao)); ao->handle = 0; ao->sysno = 1; ao->oid = oid; ao->next = *op; *op = ao; } } } void zebraExplain_mergeAccessInfo(ZebraExplainInfo zei, data1_node *n, zebAccessInfo *accessInfo) { data1_node *np; if (!n) { *accessInfo = (zebAccessInfo) nmem_malloc(zei->nmem, sizeof(**accessInfo)); (*accessInfo)->attributeSetIds = 0; (*accessInfo)->schemas = 0; } else { if (!(n = data1_search_tag(zei->dh, n->child, "accessInfo"))) return; if ((np = data1_search_tag(zei->dh, n->child, "attributeSetIds"))) zebraExplain_mergeOids(zei, np, &(*accessInfo)->attributeSetIds); if ((np = data1_search_tag(zei->dh, n->child, "schemas"))) zebraExplain_mergeOids(zei, np, &(*accessInfo)->schemas); } } /* Explain structure root record of type targetInfo and has sysno = 1 databaseList (list of databases) */ /* Example root: explain: targetInfo: TargetInfo name: Zebra namedResultSets: 1 multipleDbSearch: 1 nicknames: name: Zebra commonInfo: dateAdded: 20030630190601 dateChanged: 20030630190601 languageCode: EN accessinfo: unitSystems: string: ISO attributeSetIds: oid: 1.2.840.10003.3.2 oid: 1.2.840.10003.3.5 oid: 1.2.840.10003.3.1 schemas: oid: 1.2.840.10003.13.1000.81.2 oid: 1.2.840.10003.13.2 zebraInfo: version: 1.3.12 databaseList: database: name: Default id: 50 attributeDetailsId: 51 database: name: IR-Explain-1 id: 52 attributeDetailsId: 53 ordinalSU: 38 runNumber: 1 nextResultSetPosition = 2 */ ZebraExplainInfo zebraExplain_open( Records records, data1_handle dh, Res res, int writeFlag, void *updateHandle, ZebraExplainUpdateFunc *updateFunc) { Record trec; ZebraExplainInfo zei; struct zebDatabaseInfoB **zdip; time_t our_time; struct tm *tm; NMEM nmem = nmem_create(); #if ZINFO_DEBUG yaz_log(YLOG_LOG, "zebraExplain_open wr=%d", writeFlag); #endif zei = (ZebraExplainInfo) nmem_malloc(nmem, sizeof(*zei)); zei->databaseInfo = 0; zei->write_flag = writeFlag; zei->updateHandle = updateHandle; zei->updateFunc = updateFunc; zei->dirty = 0; zei->ordinalDatabase = 1; zei->curDatabaseInfo = 0; zei->records = records; zei->nmem = nmem; zei->dh = dh; data1_get_absyn(zei->dh, "explain", DATA1_XPATH_INDEXING_DISABLE); zei->attsets = 0; zei->res = res; zei->categoryList = (struct zebraCategoryListInfo *) nmem_malloc(zei->nmem, sizeof(*zei->categoryList)); zei->categoryList->sysno = 0; zei->categoryList->dirty = 0; zei->categoryList->data1_categoryList = 0; if ( atoi(res_get_def(res, "notimestamps", "0") )== 0) { time(&our_time); tm = localtime(&our_time); sprintf(zei->date, "%04d%02d%02d%02d%02d%02d", tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); } else { sprintf(zei->date, "%04d%02d%02d%02d%02d%02d", 0, 0, 0, 0, 0, 0); } zdip = &zei->databaseInfo; trec = rec_get_root(records); /* get "root" record */ zei->ordinalSU = 1; zei->runNumber = 0; zebraExplain_mergeAccessInfo(zei, 0, &zei->accessInfo); if (trec) /* targetInfo already exists ... */ { data1_node *node_tgtinfo, *node_zebra, *node_list, *np; zei->data1_target = read_sgml_rec(zei->dh, zei->nmem, trec); #if 0 if (!zei->data1_target || !zei->data1_target->u.root.absyn) #else if (!zei->data1_target) #endif { yaz_log(YLOG_FATAL, "Explain schema missing. Check profilePath"); nmem_destroy(zei->nmem); return 0; } #if ZINFO_DEBUG data1_pr_tree(zei->dh, zei->data1_target, stderr); #endif node_tgtinfo = data1_search_tag(zei->dh, zei->data1_target, "/targetInfo"); if (!node_tgtinfo) { yaz_log(YLOG_FATAL, "Node node_tgtinfo missing"); nmem_destroy(zei->nmem); return 0; } zebraExplain_mergeAccessInfo(zei, node_tgtinfo, &zei->accessInfo); node_zebra = data1_search_tag(zei->dh, node_tgtinfo->child, "zebraInfo"); if (!node_zebra) { yaz_log(YLOG_FATAL, "Node node_zebra missing"); nmem_destroy(zei->nmem); return 0; } np = 0; if (node_zebra) { node_list = data1_search_tag(zei->dh, node_zebra->child, "databaseList"); if (node_list) np = node_list->child; } for(; np; np = np->next) { data1_node *node_name = 0; data1_node *node_id = 0; data1_node *node_aid = 0; data1_node *np2; if (np->which != DATA1N_tag || strcmp(np->u.tag.tag, "database")) continue; for(np2 = np->child; np2; np2 = np2->next) { if (np2->which != DATA1N_tag) continue; if (!strcmp(np2->u.tag.tag, "name")) node_name = np2->child; else if (!strcmp(np2->u.tag.tag, "id")) node_id = np2->child; else if (!strcmp(np2->u.tag.tag, "attributeDetailsId")) node_aid = np2->child; } assert(node_id && node_name && node_aid); *zdip =(struct zebDatabaseInfoB *) nmem_malloc(zei->nmem, sizeof(**zdip)); (*zdip)->readFlag = 1; (*zdip)->dirty = 0; (*zdip)->data1_database = 0; (*zdip)->recordCount = 0; (*zdip)->recordBytes = 0; zebraExplain_mergeAccessInfo(zei, 0, &(*zdip)->accessInfo); (*zdip)->databaseName = (char *) nmem_malloc(zei->nmem, 1+node_name->u.data.len); memcpy((*zdip)->databaseName, node_name->u.data.data, node_name->u.data.len); (*zdip)->databaseName[node_name->u.data.len] = '\0'; (*zdip)->sysno = atoi_zn(node_id->u.data.data, node_id->u.data.len); (*zdip)->attributeDetails = (zebAttributeDetails) nmem_malloc(zei->nmem, sizeof(*(*zdip)->attributeDetails)); (*zdip)->attributeDetails->sysno = atoi_zn(node_aid->u.data.data, node_aid->u.data.len); (*zdip)->attributeDetails->readFlag = 1; (*zdip)->attributeDetails->dirty = 0; (*zdip)->attributeDetails->SUInfo = 0; zdip = &(*zdip)->next; } if (node_zebra) { np = data1_search_tag(zei->dh, node_zebra->child, "ordinalSU"); np = np->child; assert(np && np->which == DATA1N_data); zei->ordinalSU = atoi_n(np->u.data.data, np->u.data.len); np = data1_search_tag(zei->dh, node_zebra->child, "ordinalDatabase"); np = np->child; assert(np && np->which == DATA1N_data); zei->ordinalDatabase = atoi_n(np->u.data.data, np->u.data.len); np = data1_search_tag(zei->dh, node_zebra->child, "runNumber"); np = np->child; assert(np && np->which == DATA1N_data); zei->runNumber = atoi_zn(np->u.data.data, np->u.data.len); yaz_log(YLOG_DEBUG, "read runnumber=" ZINT_FORMAT, zei->runNumber); *zdip = 0; } rec_free(&trec); } else /* create initial targetInfo */ { data1_node *node_tgtinfo; *zdip = 0; if (writeFlag) { char *sgml_buf; int sgml_len; zei->data1_target = data1_read_sgml(zei->dh, zei->nmem, "TargetInfo\n" "Zebra\n" "1\n" "1\n" "Zebra\n" "\n" ); if (!zei->data1_target) { yaz_log(YLOG_FATAL, "Explain schema missing. Check profilePath"); nmem_destroy(zei->nmem); return 0; } node_tgtinfo = data1_search_tag(zei->dh, zei->data1_target, "/targetInfo"); assert(node_tgtinfo); zebraExplain_initCommonInfo(zei, node_tgtinfo); zebraExplain_initAccessInfo(zei, node_tgtinfo); /* write now because we want to be sure about the sysno */ trec = rec_new(records); if (!trec) { yaz_log(YLOG_FATAL, "Cannot create root Explain record"); nmem_destroy(zei->nmem); return 0; } trec->info[recInfo_fileType] = rec_strdup("grs.sgml", &trec->size[recInfo_fileType]); trec->info[recInfo_databaseName] = rec_strdup("IR-Explain-1", &trec->size[recInfo_databaseName]); sgml_buf = data1_nodetoidsgml(dh, zei->data1_target, 0, &sgml_len); trec->info[recInfo_storeData] = (char *) xmalloc(sgml_len); memcpy(trec->info[recInfo_storeData], sgml_buf, sgml_len); trec->size[recInfo_storeData] = sgml_len; rec_put(records, &trec); rec_free(&trec); } zebraExplain_newDatabase(zei, "IR-Explain-1", 0); if (!zei->categoryList->dirty) { struct zebraCategoryListInfo *zcl = zei->categoryList; data1_node *node_cl; zcl->dirty = 1; zcl->data1_categoryList = data1_read_sgml(zei->dh, zei->nmem, "CategoryList\n" "\n"); if (zcl->data1_categoryList) { node_cl = data1_search_tag(zei->dh, zcl->data1_categoryList, "/categoryList"); assert(node_cl); zebraExplain_initCommonInfo(zei, node_cl); } } } return zei; } static void zebraExplain_readAttributeDetails(ZebraExplainInfo zei, zebAttributeDetails zad) { Record rec; struct zebSUInfoB **zsuip = &zad->SUInfo; data1_node *node_adinfo, *node_zebra, *node_list, *np; assert(zad->sysno); rec = rec_get(zei->records, zad->sysno); zad->data1_tree = read_sgml_rec(zei->dh, zei->nmem, rec); node_adinfo = data1_search_tag(zei->dh, zad->data1_tree, "/attributeDetails"); node_zebra = data1_search_tag(zei->dh, node_adinfo->child, "zebraInfo"); node_list = data1_search_tag(zei->dh, node_zebra->child, "attrlist"); for (np = node_list->child; np; np = np->next) { data1_node *node_str = 0; data1_node *node_ordinal = 0; data1_node *node_type = 0; data1_node *node_cat = 0; data1_node *node_doc_occurrences = 0; data1_node *node_term_occurrences = 0; data1_node *np2; if (np->which != DATA1N_tag || strcmp(np->u.tag.tag, "attr")) continue; for (np2 = np->child; np2; np2 = np2->next) { if (np2->which != DATA1N_tag || !np2->child || np2->child->which != DATA1N_data) continue; if (!strcmp(np2->u.tag.tag, "str")) node_str = np2->child; else if (!strcmp(np2->u.tag.tag, "ordinal")) node_ordinal = np2->child; else if (!strcmp(np2->u.tag.tag, "type")) node_type = np2->child; else if (!strcmp(np2->u.tag.tag, "cat")) node_cat = np2->child; else if (!strcmp(np2->u.tag.tag, "dococcurrences")) node_doc_occurrences = np2->child; else if (!strcmp(np2->u.tag.tag, "termoccurrences")) node_term_occurrences = np2->child; else { yaz_log(YLOG_LOG, "Unknown tag '%s' in attributeDetails", np2->u.tag.tag); } } assert(node_ordinal); *zsuip = (struct zebSUInfoB *) nmem_malloc(zei->nmem, sizeof(**zsuip)); if (node_type && node_type->u.data.len > 0) (*zsuip)->info.index_type = nmem_strdupn(zei->nmem, node_type->u.data.data, node_type->u.data.len); else { yaz_log(YLOG_WARN, "Missing attribute 'type' in attribute info"); (*zsuip)->info.index_type = "w"; } if (node_cat && node_cat->u.data.len > 0) { zinfo_index_category_t cat; data1_node *np = node_cat; if (!strncmp(np->u.data.data, "index", np->u.data.len)) cat = zinfo_index_category_index; else if (!strncmp(np->u.data.data, "sort", np->u.data.len)) cat = zinfo_index_category_sort; else if (!strncmp(np->u.data.data, "alwaysmatches", np->u.data.len)) cat = zinfo_index_category_alwaysmatches; else if (!strncmp(np->u.data.data, "anchor", np->u.data.len)) cat = zinfo_index_category_anchor; else { yaz_log(YLOG_WARN, "Bad index cateogry '%.*s'", np->u.data.len, np->u.data.data); cat = zinfo_index_category_index; } (*zsuip)->info.cat = cat; } else (*zsuip)->info.cat = zinfo_index_category_index; if (node_doc_occurrences) { data1_node *np = node_doc_occurrences; (*zsuip)->info.doc_occurrences = atoi_zn(np->u.data.data, np->u.data.len); } if (node_term_occurrences) { data1_node *np = node_term_occurrences; (*zsuip)->info.term_occurrences = atoi_zn(np->u.data.data, np->u.data.len); } if (node_str) { (*zsuip)->info.str = nmem_strdupn(zei->nmem, node_str->u.data.data, node_str->u.data.len); } else { yaz_log(YLOG_WARN, "Missing set/use/str in attribute info"); continue; } (*zsuip)->info.ordinal = atoi_n(node_ordinal->u.data.data, node_ordinal->u.data.len); zsuip = &(*zsuip)->next; } *zsuip = 0; zad->readFlag = 0; rec_free(&rec); } static void zebraExplain_readDatabase(ZebraExplainInfo zei, struct zebDatabaseInfoB *zdi) { Record rec; data1_node *node_dbinfo, *node_zebra, *np; assert(zdi->sysno); rec = rec_get(zei->records, zdi->sysno); zdi->data1_database = read_sgml_rec(zei->dh, zei->nmem, rec); node_dbinfo = data1_search_tag(zei->dh, zdi->data1_database, "/databaseInfo"); assert(node_dbinfo); zebraExplain_mergeAccessInfo(zei, node_dbinfo, &zdi->accessInfo); node_zebra = data1_search_tag(zei->dh, node_dbinfo->child, "zebraInfo"); if (node_zebra && (np = data1_search_tag(zei->dh, node_zebra->child, "recordBytes")) && np->child && np->child->which == DATA1N_data) zdi->recordBytes = atoi_zn(np->child->u.data.data, np->child->u.data.len); if (node_zebra && (np = data1_search_tag(zei->dh, node_zebra->child, "ordinalDatabase")) && np->child && np->child->which == DATA1N_data) zdi->ordinalDatabase = atoi_n(np->child->u.data.data, np->child->u.data.len); if ((np = data1_search_tag(zei->dh, node_dbinfo->child, "recordCount")) && (np = data1_search_tag(zei->dh, np->child, "recordCountActual")) && np->child->which == DATA1N_data) { zdi->recordCount = atoi_zn(np->child->u.data.data, np->child->u.data.len); } zdi->readFlag = 0; rec_free(&rec); } int zebraExplain_removeDatabase(ZebraExplainInfo zei, void *update_handle) { struct zebDatabaseInfoB **zdip = &zei->databaseInfo; while (*zdip) { if (*zdip == zei->curDatabaseInfo) { struct zebDatabaseInfoB *zdi = *zdip; Record rec; zei->dirty = 1; zei->updateHandle = update_handle; if (zdi->attributeDetails) { /* remove attribute details keys and delete it */ zebAttributeDetails zad = zdi->attributeDetails; rec = rec_get(zei->records, zad->sysno); (*zei->updateFunc)(zei->updateHandle, rec, 0); rec_del(zei->records, &rec); } /* remove database record keys and delete it */ rec = rec_get(zei->records, zdi->sysno); (*zei->updateFunc)(zei->updateHandle, rec, 0); rec_del(zei->records, &rec); /* remove from list */ *zdip = zdi->next; /* current database is IR-Explain-1 */ return 0; } zdip = &(*zdip)->next; } return -1; } int zebraExplain_curDatabase(ZebraExplainInfo zei, const char *database) { struct zebDatabaseInfoB *zdi; const char *database_n = strrchr(database, '/'); if (database_n) database_n++; else database_n = database; assert(zei); if (zei->curDatabaseInfo && !STRCASECMP(zei->curDatabaseInfo->databaseName, database)) return 0; for (zdi = zei->databaseInfo; zdi; zdi=zdi->next) { if (!STRCASECMP(zdi->databaseName, database_n)) break; } if (!zdi) return -1; #if ZINFO_DEBUG yaz_log(YLOG_LOG, "zebraExplain_curDatabase: %s", database); #endif if (zdi->readFlag) { #if ZINFO_DEBUG yaz_log(YLOG_LOG, "zebraExplain_readDatabase: %s", database); #endif zebraExplain_readDatabase(zei, zdi); } if (zdi->attributeDetails->readFlag) { #if ZINFO_DEBUG yaz_log(YLOG_LOG, "zebraExplain_readAttributeDetails: %s", database); #endif zebraExplain_readAttributeDetails(zei, zdi->attributeDetails); } zei->curDatabaseInfo = zdi; return 0; } static void zebraExplain_initCommonInfo(ZebraExplainInfo zei, data1_node *n) { data1_node *c = data1_mk_tag(zei->dh, zei->nmem, "commonInfo", 0, n); data1_mk_tag_data_text(zei->dh, c, "dateAdded", zei->date, zei->nmem); data1_mk_tag_data_text(zei->dh, c, "dateChanged", zei->date, zei->nmem); data1_mk_tag_data_text(zei->dh, c, "languageCode", "EN", zei->nmem); } static void zebraExplain_updateCommonInfo(ZebraExplainInfo zei, data1_node *n) { data1_node *c = data1_search_tag(zei->dh, n->child, "commonInfo"); assert(c); data1_mk_tag_data_text_uni(zei->dh, c, "dateChanged", zei->date, zei->nmem); } static void zebraExplain_initAccessInfo(ZebraExplainInfo zei, data1_node *n) { data1_node *c = data1_mk_tag(zei->dh, zei->nmem, "accessInfo", 0, n); data1_node *d = data1_mk_tag(zei->dh, zei->nmem, "unitSystems", 0, c); data1_mk_tag_data_text(zei->dh, d, "string", "ISO", zei->nmem); } static void zebraExplain_updateAccessInfo(ZebraExplainInfo zei, data1_node *n, zebAccessInfo accessInfo) { data1_node *c = data1_search_tag(zei->dh, n->child, "accessInfo"); data1_node *d; zebAccessObject p; if (!c) { data1_pr_tree(zei->dh, n, stdout); zebra_exit("zebraExplain_updateAccessInfo"); } if ((p = accessInfo->attributeSetIds)) { d = data1_mk_tag_uni(zei->dh, zei->nmem, "attributeSetIds", c); for (; p; p = p->next) data1_mk_tag_data_oid(zei->dh, d, "oid", p->oid, zei->nmem); } if ((p = accessInfo->schemas)) { d = data1_mk_tag_uni(zei->dh, zei->nmem, "schemas", c); for (; p; p = p->next) data1_mk_tag_data_oid(zei->dh, d, "oid", p->oid, zei->nmem); } } int zebraExplain_newDatabase(ZebraExplainInfo zei, const char *database, int explain_database) { struct zebDatabaseInfoB *zdi; data1_node *node_dbinfo, *node_adinfo; const char *database_n = strrchr(database, '/'); if (database_n) database_n++; else database_n = database; #if ZINFO_DEBUG yaz_log(YLOG_LOG, "zebraExplain_newDatabase: %s", database); #endif assert(zei); for (zdi = zei->databaseInfo; zdi; zdi=zdi->next) { if (!STRCASECMP(zdi->databaseName, database_n)) break; } if (zdi) return -1; /* it's new really. make it */ zdi = (struct zebDatabaseInfoB *) nmem_malloc(zei->nmem, sizeof(*zdi)); zdi->next = zei->databaseInfo; zei->databaseInfo = zdi; zdi->sysno = 0; zdi->recordCount = 0; zdi->recordBytes = 0; zdi->readFlag = 0; zdi->databaseName = nmem_strdup(zei->nmem, database_n); zdi->ordinalDatabase = zei->ordinalDatabase++; zebraExplain_mergeAccessInfo(zei, 0, &zdi->accessInfo); assert(zei->dh); assert(zei->nmem); zdi->data1_database = data1_read_sgml(zei->dh, zei->nmem, "DatabaseInfo\n" "\n"); if (!zdi->data1_database) return -2; node_dbinfo = data1_search_tag(zei->dh, zdi->data1_database, "/databaseInfo"); assert(node_dbinfo); zebraExplain_initCommonInfo(zei, node_dbinfo); zebraExplain_initAccessInfo(zei, node_dbinfo); data1_mk_tag_data_text(zei->dh, node_dbinfo, "name", database, zei->nmem); if (explain_database) data1_mk_tag_data_text(zei->dh, node_dbinfo, "explainDatabase", "", zei->nmem); data1_mk_tag_data_text(zei->dh, node_dbinfo, "userFee", "0", zei->nmem); data1_mk_tag_data_text(zei->dh, node_dbinfo, "available", "1", zei->nmem); #if ZINFO_DEBUG data1_pr_tree(zei->dh, zdi->data1_database, stderr); #endif zdi->dirty = 1; zei->dirty = 1; zei->curDatabaseInfo = zdi; zdi->attributeDetails = (zebAttributeDetails) nmem_malloc(zei->nmem, sizeof(*zdi->attributeDetails)); zdi->attributeDetails->readFlag = 0; zdi->attributeDetails->sysno = 0; zdi->attributeDetails->dirty = 1; zdi->attributeDetails->SUInfo = 0; zdi->attributeDetails->data1_tree = data1_read_sgml(zei->dh, zei->nmem, "AttributeDetails\n" "\n"); node_adinfo = data1_search_tag(zei->dh, zdi->attributeDetails->data1_tree, "/attributeDetails"); assert(node_adinfo); zebraExplain_initCommonInfo(zei, node_adinfo); data1_mk_tag_data_text(zei->dh, node_adinfo, "name", database, zei->nmem); return 0; } static void zebraExplain_writeCategoryList(ZebraExplainInfo zei, struct zebraCategoryListInfo *zcl, int key_flush) { char *sgml_buf; int sgml_len; int i; Record drec; data1_node *node_ci, *node_categoryList; zint sysno = 0; static char *category[] = { "CategoryList", "TargetInfo", "DatabaseInfo", "AttributeDetails", 0 }; assert(zcl); if (!zcl->dirty) return ; zcl->dirty = 1; node_categoryList = zcl->data1_categoryList; #if ZINFO_DEBUG yaz_log(YLOG_LOG, "zebraExplain_writeCategoryList"); #endif drec = createRecord(zei->records, &sysno); if (!drec) return; node_ci = data1_search_tag(zei->dh, node_categoryList, "/categoryList"); assert (node_ci); node_ci = data1_mk_tag(zei->dh, zei->nmem, "categories", 0 /* attr */, node_ci); assert (node_ci); for (i = 0; category[i]; i++) { data1_node *node_cat = data1_mk_tag(zei->dh, zei->nmem, "category", 0 /* attr */, node_ci); data1_mk_tag_data_text(zei->dh, node_cat, "name", category[i], zei->nmem); } /* extract *searchable* keys from it. We do this here, because record count, etc. is affected */ if (key_flush) (*zei->updateFunc)(zei->updateHandle, drec, node_categoryList); /* convert to "SGML" and write it */ #if ZINFO_DEBUG data1_pr_tree(zei->dh, node_categoryList, stderr); #endif sgml_buf = data1_nodetoidsgml(zei->dh, node_categoryList, 0, &sgml_len); drec->info[recInfo_storeData] = (char *) xmalloc(sgml_len); memcpy(drec->info[recInfo_storeData], sgml_buf, sgml_len); drec->size[recInfo_storeData] = sgml_len; rec_put(zei->records, &drec); } static void zebraExplain_writeAttributeDetails(ZebraExplainInfo zei, zebAttributeDetails zad, const char *databaseName, int key_flush) { char *sgml_buf; int sgml_len; Record drec; data1_node *node_adinfo, *node_list, *node_zebra; struct zebSUInfoB *zsui; if (!zad->dirty) return; zad->dirty = 0; #if ZINFO_DEBUG yaz_log(YLOG_LOG, "zebraExplain_writeAttributeDetails"); data1_pr_tree(zei->dh, zad->data1_tree, stderr); #endif drec = createRecord(zei->records, &zad->sysno); if (!drec) return; assert(zad->data1_tree); node_adinfo = data1_search_tag(zei->dh, zad->data1_tree, "/attributeDetails"); zebraExplain_updateCommonInfo(zei, node_adinfo); /* zebra info (private) .. no children yet.. so se don't index zebraInfo */ node_zebra = data1_mk_tag_uni(zei->dh, zei->nmem, "zebraInfo", node_adinfo); /* extract *searchable* keys from it. We do this here, because record count, etc. is affected */ if (key_flush) (*zei->updateFunc)(zei->updateHandle, drec, zad->data1_tree); node_list = data1_mk_tag_uni(zei->dh, zei->nmem, "attrlist", node_zebra); for (zsui = zad->SUInfo; zsui; zsui = zsui->next) { data1_node *node_attr; node_attr = data1_mk_tag(zei->dh, zei->nmem, "attr", 0 /* attr */, node_list); data1_mk_tag_data_text(zei->dh, node_attr, "type", zsui->info.index_type, zei->nmem); data1_mk_tag_data_text(zei->dh, node_attr, "str", zsui->info.str, zei->nmem); data1_mk_tag_data_int(zei->dh, node_attr, "ordinal", zsui->info.ordinal, zei->nmem); data1_mk_tag_data_zint(zei->dh, node_attr, "dococcurrences", zsui->info.doc_occurrences, zei->nmem); data1_mk_tag_data_zint(zei->dh, node_attr, "termoccurrences", zsui->info.term_occurrences, zei->nmem); switch(zsui->info.cat) { case zinfo_index_category_index: data1_mk_tag_data_text(zei->dh, node_attr, "cat", "index", zei->nmem); break; case zinfo_index_category_sort: data1_mk_tag_data_text(zei->dh, node_attr, "cat", "sort", zei->nmem); break; case zinfo_index_category_alwaysmatches: data1_mk_tag_data_text(zei->dh, node_attr, "cat", "alwaysmatches", zei->nmem); break; case zinfo_index_category_anchor: data1_mk_tag_data_text(zei->dh, node_attr, "cat", "anchor", zei->nmem); break; } } /* convert to "SGML" and write it */ #if ZINFO_DEBUG data1_pr_tree(zei->dh, zad->data1_tree, stderr); #endif sgml_buf = data1_nodetoidsgml(zei->dh, zad->data1_tree, 0, &sgml_len); drec->info[recInfo_storeData] = (char *) xmalloc(sgml_len); memcpy(drec->info[recInfo_storeData], sgml_buf, sgml_len); drec->size[recInfo_storeData] = sgml_len; rec_put(zei->records, &drec); } static void zebraExplain_writeDatabase(ZebraExplainInfo zei, struct zebDatabaseInfoB *zdi, int key_flush) { char *sgml_buf; int sgml_len; Record drec; data1_node *node_dbinfo, *node_count, *node_zebra; if (!zdi->dirty) return; zdi->dirty = 0; #if ZINFO_DEBUG yaz_log(YLOG_LOG, "zebraExplain_writeDatabase %s", zdi->databaseName); #endif drec = createRecord(zei->records, &zdi->sysno); if (!drec) return; assert(zdi->data1_database); node_dbinfo = data1_search_tag(zei->dh, zdi->data1_database, "/databaseInfo"); assert(node_dbinfo); zebraExplain_updateCommonInfo(zei, node_dbinfo); zebraExplain_updateAccessInfo(zei, node_dbinfo, zdi->accessInfo); /* record count */ node_count = data1_mk_tag_uni(zei->dh, zei->nmem, "recordCount", node_dbinfo); data1_mk_tag_data_zint(zei->dh, node_count, "recordCountActual", zdi->recordCount, zei->nmem); /* zebra info (private) */ node_zebra = data1_mk_tag_uni(zei->dh, zei->nmem, "zebraInfo", node_dbinfo); /* extract *searchable* keys from it. We do this here, because record count, etc. is affected */ if (key_flush) (*zei->updateFunc)(zei->updateHandle, drec, zdi->data1_database); data1_mk_tag_data_zint(zei->dh, node_zebra, "recordBytes", zdi->recordBytes, zei->nmem); data1_mk_tag_data_zint(zei->dh, node_zebra, "ordinalDatabase", zdi->ordinalDatabase, zei->nmem); /* convert to "SGML" and write it */ #if ZINFO_DEBUG data1_pr_tree(zei->dh, zdi->data1_database, stderr); #endif sgml_buf = data1_nodetoidsgml(zei->dh, zdi->data1_database, 0, &sgml_len); drec->info[recInfo_storeData] = (char *) xmalloc(sgml_len); memcpy(drec->info[recInfo_storeData], sgml_buf, sgml_len); drec->size[recInfo_storeData] = sgml_len; rec_put(zei->records, &drec); } static void writeAttributeValues(ZebraExplainInfo zei, data1_node *node_values, data1_attset *attset) { data1_att *atts; data1_attset_child *c; if (!attset) return; for (c = attset->children; c; c = c->next) writeAttributeValues(zei, node_values, c->child); for (atts = attset->atts; atts; atts = atts->next) { data1_node *node_value; node_value = data1_mk_tag(zei->dh, zei->nmem, "attributeValue", 0 /* attr */, node_values); data1_mk_tag_data_text(zei->dh, node_value, "name", atts->name, zei->nmem); node_value = data1_mk_tag(zei->dh, zei->nmem, "value", 0 /* attr */, node_value); data1_mk_tag_data_int(zei->dh, node_value, "numeric", atts->value, zei->nmem); } } static void zebraExplain_writeAttributeSet(ZebraExplainInfo zei, zebAccessObject o, int key_flush) { char *sgml_buf; int sgml_len; Record drec; data1_node *node_root, *node_attinfo, *node_attributes, *node_atttype; data1_node *node_values; struct data1_attset *attset = 0; if (o->oid) attset = data1_attset_search_id(zei->dh, o->oid); #if ZINFO_DEBUG yaz_log(YLOG_LOG, "zebraExplain_writeAttributeSet %s", attset ? attset->name : ""); #endif drec = createRecord(zei->records, &o->sysno); if (!drec) return; node_root = data1_read_sgml(zei->dh, zei->nmem, "AttributeSetInfo\n" "\n" ); node_attinfo = data1_search_tag(zei->dh, node_root, "/attributeSetInfo"); assert(node_attinfo); zebraExplain_initCommonInfo(zei, node_attinfo); zebraExplain_updateCommonInfo(zei, node_attinfo); data1_mk_tag_data_oid(zei->dh, node_attinfo, "oid", o->oid, zei->nmem); if (attset && attset->name) data1_mk_tag_data_text(zei->dh, node_attinfo, "name", attset->name, zei->nmem); node_attributes = data1_mk_tag_uni(zei->dh, zei->nmem, "attributes", node_attinfo); node_atttype = data1_mk_tag_uni(zei->dh, zei->nmem, "attributeType", node_attributes); data1_mk_tag_data_text(zei->dh, node_atttype, "name", "Use", zei->nmem); data1_mk_tag_data_text(zei->dh, node_atttype, "description", "Use Attribute", zei->nmem); data1_mk_tag_data_int(zei->dh, node_atttype, "type", 1, zei->nmem); node_values = data1_mk_tag(zei->dh, zei->nmem, "attributeValues", 0 /* attr */, node_atttype); if (attset) writeAttributeValues(zei, node_values, attset); /* extract *searchable* keys from it. We do this here, because record count, etc. is affected */ if (key_flush) (*zei->updateFunc)(zei->updateHandle, drec, node_root); /* convert to "SGML" and write it */ #if ZINFO_DEBUG data1_pr_tree(zei->dh, node_root, stderr); #endif sgml_buf = data1_nodetoidsgml(zei->dh, node_root, 0, &sgml_len); drec->info[recInfo_storeData] = (char *) xmalloc(sgml_len); memcpy(drec->info[recInfo_storeData], sgml_buf, sgml_len); drec->size[recInfo_storeData] = sgml_len; rec_put(zei->records, &drec); } static void zebraExplain_writeTarget(ZebraExplainInfo zei, int key_flush) { struct zebDatabaseInfoB *zdi; data1_node *node_tgtinfo, *node_list, *node_zebra; Record trec; int sgml_len; char *sgml_buf; if (!zei->dirty) return; zei->dirty = 0; trec = rec_get_root(zei->records); xfree(trec->info[recInfo_storeData]); node_tgtinfo = data1_search_tag(zei->dh, zei->data1_target, "/targetInfo"); assert(node_tgtinfo); zebraExplain_updateCommonInfo(zei, node_tgtinfo); zebraExplain_updateAccessInfo(zei, node_tgtinfo, zei->accessInfo); node_zebra = data1_mk_tag_uni(zei->dh, zei->nmem, "zebraInfo", node_tgtinfo); /* convert to "SGML" and write it */ if (key_flush) (*zei->updateFunc)(zei->updateHandle, trec, zei->data1_target); data1_mk_tag_data_text(zei->dh, node_zebra, "version", ZEBRAVER, zei->nmem); node_list = data1_mk_tag(zei->dh, zei->nmem, "databaseList", 0 /* attr */, node_zebra); for (zdi = zei->databaseInfo; zdi; zdi = zdi->next) { data1_node *node_db; node_db = data1_mk_tag(zei->dh, zei->nmem, "database", 0 /* attr */, node_list); data1_mk_tag_data_text(zei->dh, node_db, "name", zdi->databaseName, zei->nmem); data1_mk_tag_data_zint(zei->dh, node_db, "id", zdi->sysno, zei->nmem); data1_mk_tag_data_zint(zei->dh, node_db, "attributeDetailsId", zdi->attributeDetails->sysno, zei->nmem); } data1_mk_tag_data_int(zei->dh, node_zebra, "ordinalSU", zei->ordinalSU, zei->nmem); data1_mk_tag_data_int(zei->dh, node_zebra, "ordinalDatabase", zei->ordinalDatabase, zei->nmem); data1_mk_tag_data_zint(zei->dh, node_zebra, "runNumber", zei->runNumber, zei->nmem); #if ZINFO_DEBUG data1_pr_tree(zei->dh, zei->data1_target, stderr); #endif sgml_buf = data1_nodetoidsgml(zei->dh, zei->data1_target, 0, &sgml_len); trec->info[recInfo_storeData] = (char *) xmalloc(sgml_len); memcpy(trec->info[recInfo_storeData], sgml_buf, sgml_len); trec->size[recInfo_storeData] = sgml_len; rec_put(zei->records, &trec); } int zebraExplain_lookup_attr_str(ZebraExplainInfo zei, zinfo_index_category_t cat, const char *index_type, const char *str) { struct zebSUInfoB **zsui; assert(zei->curDatabaseInfo); for (zsui = &zei->curDatabaseInfo->attributeDetails->SUInfo; *zsui; zsui = &(*zsui)->next) if ( (index_type == 0 || !strcmp((*zsui)->info.index_type, index_type)) && (*zsui)->info.cat == cat && !yaz_matchstr((*zsui)->info.str, str)) { struct zebSUInfoB *zsui_this = *zsui; /* take it out of the list and move to front */ *zsui = (*zsui)->next; zsui_this->next = zei->curDatabaseInfo->attributeDetails->SUInfo; zei->curDatabaseInfo->attributeDetails->SUInfo = zsui_this; return zsui_this->info.ordinal; } return -1; } int zebraExplain_trav_ord(ZebraExplainInfo zei, void *handle, int (*f)(void *handle, int ord, const char *index_type, const char *string_index, zinfo_index_category_t cat)) { struct zebDatabaseInfoB *zdb = zei->curDatabaseInfo; if (zdb) { struct zebSUInfoB *zsui = zdb->attributeDetails->SUInfo; for ( ;zsui; zsui = zsui->next) (*f)(handle, zsui->info.ordinal, zsui->info.index_type, zsui->info.str, zsui->info.cat); } return 0; } struct zebSUInfoB *zebraExplain_get_sui_info(ZebraExplainInfo zei, int ord, int dirty_mark, const char **db) { struct zebDatabaseInfoB *zdb; for (zdb = zei->databaseInfo; zdb; zdb = zdb->next) { struct zebSUInfoB **zsui; if (zdb->attributeDetails->readFlag) zebraExplain_readAttributeDetails(zei, zdb->attributeDetails); for (zsui = &zdb->attributeDetails->SUInfo; *zsui; zsui = &(*zsui)->next) if ((*zsui)->info.ordinal == ord) { struct zebSUInfoB *zsui_this = *zsui; /* take it out of the list and move to front */ *zsui = (*zsui)->next; zsui_this->next = zdb->attributeDetails->SUInfo; zdb->attributeDetails->SUInfo = zsui_this; if (dirty_mark) zdb->attributeDetails->dirty = 1; if (db) *db = zdb->databaseName; return zsui_this; } } return 0; } int zebraExplain_ord_adjust_occurrences(ZebraExplainInfo zei, int ord, int term_delta, int doc_delta) { struct zebSUInfoB *zsui = zebraExplain_get_sui_info(zei, ord, 1, 0); if (zsui) { zsui->info.term_occurrences += term_delta; zsui->info.doc_occurrences += doc_delta; return 0; } return -1; } int zebraExplain_ord_get_occurrences(ZebraExplainInfo zei, int ord, zint *term_occurrences, zint *doc_occurrences) { struct zebSUInfoB *zsui = zebraExplain_get_sui_info(zei, ord, 0, 0); if (zsui) { *term_occurrences = zsui->info.term_occurrences; *doc_occurrences = zsui->info.doc_occurrences; return 0; } return -1; } zint zebraExplain_ord_get_doc_occurrences(ZebraExplainInfo zei, int ord) { struct zebSUInfoB *zsui = zebraExplain_get_sui_info(zei, ord, 0, 0); if (zsui) return zsui->info.doc_occurrences; return 0; } zint zebraExplain_ord_get_term_occurrences(ZebraExplainInfo zei, int ord) { struct zebSUInfoB *zsui = zebraExplain_get_sui_info(zei, ord, 0, 0); if (zsui) return zsui->info.term_occurrences; return 0; } int zebraExplain_lookup_ord(ZebraExplainInfo zei, int ord, const char **index_type, const char **db, const char **string_index) { struct zebSUInfoB *zsui; if (index_type) *index_type = 0; if (string_index) *string_index = 0; zsui = zebraExplain_get_sui_info(zei, ord, 0, db); if (zsui) { if (string_index) *string_index = zsui->info.str; if (index_type) *index_type = zsui->info.index_type; return 0; } return -1; } zebAccessObject zebraExplain_announceOid(ZebraExplainInfo zei, zebAccessObject *op, Odr_oid *oid) { zebAccessObject ao; for (ao = *op; ao; ao = ao->next) if (!oid_oidcmp(oid, ao->oid)) break; if (!ao) { ao = (zebAccessObject) nmem_malloc(zei->nmem, sizeof(*ao)); ao->handle = 0; ao->sysno = 0; ao->oid = odr_oiddup_nmem(zei->nmem, oid); ao->next = *op; *op = ao; } return ao; } struct zebSUInfoB *zebraExplain_add_sui_info(ZebraExplainInfo zei, zinfo_index_category_t cat, const char *index_type) { struct zebSUInfoB *zsui; assert(zei->curDatabaseInfo); zsui = (struct zebSUInfoB *) nmem_malloc(zei->nmem, sizeof(*zsui)); zsui->next = zei->curDatabaseInfo->attributeDetails->SUInfo; zei->curDatabaseInfo->attributeDetails->SUInfo = zsui; zei->curDatabaseInfo->attributeDetails->dirty = 1; zei->dirty = 1; zsui->info.index_type = nmem_strdup(zei->nmem, index_type); zsui->info.cat = cat; zsui->info.doc_occurrences = 0; zsui->info.term_occurrences = 0; zsui->info.ordinal = (zei->ordinalSU)++; return zsui; } int zebraExplain_add_attr_str(ZebraExplainInfo zei, zinfo_index_category_t cat, const char *index_type, const char *index_name) { struct zebSUInfoB *zsui = zebraExplain_add_sui_info(zei, cat, index_type); zsui->info.str = nmem_strdup(zei->nmem, index_name); return zsui->info.ordinal; } void zebraExplain_addSchema(ZebraExplainInfo zei, Odr_oid *oid) { zebraExplain_announceOid(zei, &zei->accessInfo->schemas, oid); zebraExplain_announceOid(zei, &zei->curDatabaseInfo-> accessInfo->schemas, oid); } void zebraExplain_recordBytesIncrement(ZebraExplainInfo zei, int adjust_num) { assert(zei->curDatabaseInfo); if (adjust_num) { zei->curDatabaseInfo->recordBytes += adjust_num; zei->curDatabaseInfo->dirty = 1; } } void zebraExplain_recordCountIncrement(ZebraExplainInfo zei, int adjust_num) { assert(zei->curDatabaseInfo); if (adjust_num) { zei->curDatabaseInfo->recordCount += adjust_num; zei->curDatabaseInfo->dirty = 1; } } zint zebraExplain_runNumberIncrement(ZebraExplainInfo zei, int adjust_num) { if (adjust_num) { zei->dirty = 1; } return zei->runNumber += adjust_num; } RecordAttr *rec_init_attr(ZebraExplainInfo zei, Record rec) { RecordAttr *recordAttr; if (rec->info[recInfo_attr]) return (RecordAttr *) rec->info[recInfo_attr]; recordAttr = (RecordAttr *) xmalloc(sizeof(*recordAttr)); memset(recordAttr, '\0', sizeof(*recordAttr)); rec->info[recInfo_attr] = (char *) recordAttr; rec->size[recInfo_attr] = sizeof(*recordAttr); recordAttr->recordSize = 0; recordAttr->recordOffset = 0; recordAttr->runNumber = zei->runNumber; recordAttr->staticrank = 0; return recordAttr; } static void att_loadset(void *p, const char *n, const char *name) { data1_handle dh = (data1_handle) p; if (!data1_get_attset(dh, name)) yaz_log(YLOG_WARN, "Directive attset failed for %s", name); } int zebraExplain_get_database_ord(ZebraExplainInfo zei) { if (!zei->curDatabaseInfo) return -1; return zei->curDatabaseInfo->ordinalDatabase; } void zebraExplain_loadAttsets(data1_handle dh, Res res) { res_trav(res, "attset", dh, att_loadset); } /* zebraExplain_addSU adds to AttributeDetails for a database and adds attributeSet (in AccessInfo area) to DatabaseInfo if it doesn't exist for the database. If the database doesn't exist globally (in TargetInfo) an AttributeSetInfo must be added (globally). */ /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/inline.c0000644000175000017500000000612611412332551012675 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include "inline.h" static void inline_destroy_subfield_recursive(inline_subfield *p); inline_field *inline_mk_field(void) { inline_field *p = (inline_field *) xmalloc(sizeof(*p)); if (p) { memset(p, 0, sizeof(*p)); p->name = (char *) xmalloc(SZ_FNAME+1); *(p->name) = '\0'; p->ind1 = (char *) xmalloc(SZ_IND+1); *(p->ind1) = '\0'; p->ind2 = (char *) xmalloc(SZ_IND+1); *(p->ind2) = '\0'; } return p; } void inline_destroy_field(inline_field *p) { if (p) { if (p->name) xfree(p->name); if (p->ind1) xfree(p->ind1); if (p->ind2) xfree(p->ind2); if (p->list) inline_destroy_subfield_recursive(p->list); xfree(p); } } static inline_subfield *inline_mk_subfield(inline_subfield *parent) { inline_subfield *p = (inline_subfield *)xmalloc(sizeof(*p)); if (p) { memset(p, 0, sizeof(*p)); p->name = (char *) xmalloc(SZ_SFNAME+1); *(p->name) = '\0'; p->parent = parent; } return p; } #if 0 static void inline_destroy_subfield(inline_subfield *p) { if (p) { if (p->name) xfree(p->name); if (p->data) xfree(p->data); if (p->parent) p->parent->next = p->next; xfree(p); } } #endif static void inline_destroy_subfield_recursive(inline_subfield *p) { if (p) { inline_destroy_subfield_recursive(p->next); if (p->name) xfree(p->name); if (p->data) xfree(p->data); if (p->parent) p->parent->next = 0; xfree(p); } } int inline_parse(inline_field *pif, const char *tag, const char *s) { inline_field *pf = pif; char *p = (char *)s; if (!pf) return -1; if (pf->name[0] == '\0') { if ((sscanf(p, "%3s", pf->name)) != 1) return -2; p += SZ_FNAME; if (!memcmp(pf->name, "00", 2)) { pf->list = inline_mk_subfield(0); pf->list->data = xstrdup(p); } else { if ((sscanf(p, "%c%c", pf->ind1, pf->ind2)) != 2) return -3; } } else { inline_subfield *psf = inline_mk_subfield(0); sscanf(tag, "%1s", psf->name); psf->data = xstrdup(p); if (!pf->list) { pf->list = psf; } else { inline_subfield *last = pf->list; while (last->next) last = last->next; last->next = psf; } } return 0; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/kcontrol.c0000644000175000017500000000427411412332551013254 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include "index.h" struct context_control { int ref_count; void (*filter_destroy)(void *data); }; static void my_inc(struct rset_key_control *kc) { struct context_control *cp; assert(kc); cp = kc->context; (cp->ref_count)++; } static void my_dec(struct rset_key_control *kc) { struct context_control *cp; assert(kc); cp = kc->context; (cp->ref_count)--; if (cp->ref_count == 0) { if (cp->filter_destroy) (*cp->filter_destroy)(kc->filter_data); xfree(cp); xfree(kc); } } struct rset_key_control *zebra_key_control_create(ZebraHandle zh) { struct rset_key_control *kc = xmalloc(sizeof(*kc)); struct context_control *cp = xmalloc(sizeof(*cp)); kc->context = cp; kc->key_size = sizeof(struct it_key); kc->cmp = key_compare_it; kc->key_logdump_txt = key_logdump_txt; kc->getseq = key_get_seq; if (zh->m_segment_indexing) { kc->scope = 3; /* segment + seq is "same" record */ kc->get_segment = key_get_segment; } else { kc->scope = 2; /* seq is "same" record */ kc->get_segment = 0; } zebra_limit_for_rset(zh->m_limit, &kc->filter_func, &cp->filter_destroy, &kc->filter_data); kc->inc = my_inc; kc->dec = my_dec; cp->ref_count = 1; return kc; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/mod_grs_marc.c0000644000175000017500000005060011412332551014047 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include "marcomp.h" #include "inline.h" #define MARC_DEBUG 0 #define MARCOMP_DEBUG 0 struct marc_info { char type[256]; }; static data1_node *grs_read_iso2709 (struct grs_read_info *p, int marc_xml) { struct marc_info *mi = (struct marc_info*) p->clientData; char buf[100000]; int entry_p; int record_length; int indicator_length; int identifier_length; int base_address; int end_of_directory; int length_data_entry; int length_starting; int length_implementation; int read_bytes; #if MARC_DEBUG FILE *outf = stdout; #endif data1_node *res_root, *res_top; char *absynName; data1_marctab *marctab; if (p->stream->readf(p->stream, buf, 5) != 5) return NULL; while (*buf < '0' || *buf > '9') { int i; yaz_log(YLOG_WARN, "MARC: Skipping bad byte %d (0x%02X)", *buf & 0xff, *buf & 0xff); for (i = 0; i<4; i++) buf[i] = buf[i+1]; if (p->stream->readf(p->stream, buf+4, 1) != 1) return NULL; } record_length = atoi_n (buf, 5); if (record_length < 25) { yaz_log (YLOG_WARN, "MARC record length < 25, is %d", record_length); return NULL; } read_bytes = p->stream->readf(p->stream, buf+5, record_length-5); if (read_bytes < record_length-5) { yaz_log (YLOG_WARN, "Couldn't read whole MARC record"); return NULL; } /* skip until we meet a record separator */ while (buf[record_length-1] != ISO2709_RS) { if (record_length > sizeof(buf)-2) break; read_bytes = p->stream->readf(p->stream, buf+record_length, 1); if (read_bytes != 1) break; record_length++; } /* read one byte ahead to see if there is more ... */ read_bytes = p->stream->readf(p->stream, buf+record_length, 1); if (read_bytes == 1) { off_t cur_offset = p->stream->tellf(p->stream); if (p->stream->endf) { off_t end_offset = cur_offset - 1; p->stream->endf(p->stream, &end_offset); } } absynName = mi->type; res_root = data1_mk_root (p->dh, p->mem, absynName); if (!res_root) { yaz_log (YLOG_WARN, "cannot read MARC without an abstract syntax"); return 0; } if (marc_xml) { data1_node *lead; const char *attr[] = { "xmlns", "http://www.loc.gov/MARC21/slim", 0}; res_top = data1_mk_tag (p->dh, p->mem, "record", attr, res_root); lead = data1_mk_tag(p->dh, p->mem, "leader", 0, res_top); data1_mk_text_n(p->dh, p->mem, buf, 24, lead); } else res_top = data1_mk_tag (p->dh, p->mem, absynName, 0, res_root); if ((marctab = data1_absyn_getmarctab(p->dh, res_root))) { memcpy(marctab->leader, buf, 24); memcpy(marctab->implementation_codes, buf+6, 4); marctab->implementation_codes[4] = '\0'; memcpy(marctab->user_systems, buf+17, 3); marctab->user_systems[3] = '\0'; } if (marctab && marctab->force_indicator_length >= 0) indicator_length = marctab->force_indicator_length; else indicator_length = atoi_n (buf+10, 1); if (marctab && marctab->force_identifier_length >= 0) identifier_length = marctab->force_identifier_length; else identifier_length = atoi_n (buf+11, 1); base_address = atoi_n (buf+12, 5); length_data_entry = atoi_n (buf+20, 1); length_starting = atoi_n (buf+21, 1); length_implementation = atoi_n (buf+22, 1); for (entry_p = 24; buf[entry_p] != ISO2709_FS; ) { int l = 3 + length_data_entry + length_starting; if (entry_p + l >= record_length) { yaz_log(YLOG_WARN, "MARC: Directory offset %d: end of record.", entry_p); return 0; } /* check for digits in length info */ while (--l >= 3) if (!isdigit(*(const unsigned char *) (buf + entry_p+l))) break; if (l >= 3) { /* not all digits, so stop directory scan */ yaz_log(YLOG_LOG, "MARC: Bad directory"); break; } entry_p += 3 + length_data_entry + length_starting; } end_of_directory = entry_p; if (base_address != entry_p+1) { yaz_log(YLOG_WARN, "MARC: Base address does not follow directory"); } for (entry_p = 24; entry_p != end_of_directory; ) { int data_length; int data_offset; int end_offset; int i, i0; char tag[4]; data1_node *res; data1_node *parent = res_top; memcpy (tag, buf+entry_p, 3); entry_p += 3; tag[3] = '\0'; if (marc_xml) res = parent; else res = data1_mk_tag_n (p->dh, p->mem, tag, 3, 0 /* attr */, parent); #if MARC_DEBUG fprintf (outf, "%s ", tag); #endif data_length = atoi_n (buf+entry_p, length_data_entry); entry_p += length_data_entry; data_offset = atoi_n (buf+entry_p, length_starting); entry_p += length_starting; i = data_offset + base_address; end_offset = i+data_length-1; if (data_length <= 0 || data_offset < 0 || end_offset >= record_length) { yaz_log(YLOG_WARN, "MARC: Bad offsets in data. Skipping rest"); break; } if (memcmp (tag, "00", 2) && indicator_length) { /* generate indicator node */ if (marc_xml) { const char *attr[10]; int j; attr[0] = "tag"; attr[1] = tag; attr[2] = 0; res = data1_mk_tag(p->dh, p->mem, "datafield", attr, res); for (j = 0; jdh, p->mem, res, attr); } } else { #if MARC_DEBUG int j; #endif res = data1_mk_tag_n (p->dh, p->mem, buf+i, indicator_length, 0 /* attr */, res); #if MARC_DEBUG for (j = 0; jdh, p->mem, "controlfield", attr, res); } } parent = res; /* traverse sub fields */ i0 = i; while (buf[i] != ISO2709_RS && buf[i] != ISO2709_FS && i < end_offset) { if (memcmp (tag, "00", 2) && identifier_length) { data1_node *res; if (marc_xml) { int j; const char *attr[3]; char code[10]; for (j = 1; jdh, p->mem, "subfield", attr, parent); } else { res = data1_mk_tag_n (p->dh, p->mem, buf+i+1, identifier_length-1, 0 /* attr */, parent); } #if MARC_DEBUG fprintf (outf, " $"); for (j = 1; jdh, p->mem, buf + i0, i - i0, res); i0 = i; } else { #if MARC_DEBUG fprintf (outf, "%c", buf[i]); #endif i++; } } if (i > i0) { data1_mk_text_n (p->dh, p->mem, buf + i0, i - i0, parent); } #if MARC_DEBUG fprintf (outf, "\n"); if (i < end_offset) fprintf (outf, "-- separator but not at end of field\n"); if (buf[i] != ISO2709_RS && buf[i] != ISO2709_FS) fprintf (outf, "-- no separator at end of field\n"); #endif } return res_root; } /* * Locate some data under this node. This routine should handle variants * prettily. */ static char *get_data(data1_node *n, int *len) { char *r; while (n) { if (n->which == DATA1N_data) { int i; *len = n->u.data.len; for (i = 0; i<*len; i++) if (!d1_isspace(n->u.data.data[i])) break; while (*len && d1_isspace(n->u.data.data[*len - 1])) (*len)--; *len = *len - i; if (*len > 0) return n->u.data.data + i; } if (n->which == DATA1N_tag) n = n->child; else if (n->which == DATA1N_data) n = n->next; else break; } r = ""; *len = strlen(r); return r; } static data1_node *lookup_subfield(data1_node *node, const char *name) { data1_node *p; for (p=node; p; p=p->next) { if (!yaz_matchstr(p->u.tag.tag, name)) return p; } return 0; } static inline_subfield *lookup_inline_subfield(inline_subfield *pisf, const char *name) { inline_subfield *p; for (p=pisf; p; p=p->next) { if (!yaz_matchstr(p->name, name)) return p; } return 0; } static inline_subfield *cat_inline_subfield(mc_subfield *psf, WRBUF buf, inline_subfield *pisf) { mc_subfield *p; for (p = psf; p && pisf; p = p->next) { if (p->which == MC_SF) { inline_subfield *found = lookup_inline_subfield(pisf, p->name); if (found) { if (strcmp(p->prefix, "_")) { wrbuf_puts(buf, " "); wrbuf_puts(buf, p->prefix); } if (p->interval.start == -1) { wrbuf_puts(buf, found->data); } else { wrbuf_write(buf, found->data+p->interval.start, p->interval.end-p->interval.start); wrbuf_puts(buf, ""); } if (strcmp(p->suffix, "_")) { wrbuf_puts(buf, p->suffix); wrbuf_puts(buf, " "); } #if MARCOMP_DEBUG yaz_log(YLOG_LOG, "cat_inline_subfield(): add subfield $%s", found->name); #endif pisf = found->next; } } else if (p->which == MC_SFVARIANT) { inline_subfield *next; do { next = cat_inline_subfield(p->u.child, buf, pisf); if (next == pisf) break; pisf = next; } while (pisf); } else if (p->which == MC_SFGROUP) { mc_subfield *pp; int found; for (pp = p->u.child, found = 0; pp; pp = pp->next) { if (!yaz_matchstr(pisf->name, p->name)) { found = 1; break; } } if (found) { wrbuf_puts(buf, " ("); pisf = cat_inline_subfield(p->u.child, buf, pisf); wrbuf_puts(buf, ") "); } } } return pisf; } static void cat_inline_field(mc_field *pf, WRBUF buf, data1_node *subfield) { if (!pf || !subfield) return; for (;subfield;) { int len; inline_field *pif=NULL; data1_node *psubf; if (yaz_matchstr(subfield->u.tag.tag, "1")) { subfield = subfield->next; continue; } psubf = subfield; pif = inline_mk_field(); do { int i; if ((i=inline_parse(pif, psubf->u.tag.tag, get_data(psubf, &len)))<0) { yaz_log(YLOG_WARN, "inline subfield ($%s): parse error", psubf->u.tag.tag); inline_destroy_field(pif); return; } psubf = psubf->next; } while (psubf && yaz_matchstr(psubf->u.tag.tag, "1")); subfield = psubf; if (pif && !yaz_matchstr(pif->name, pf->name)) { if (!pf->list && pif->list) { wrbuf_puts(buf, pif->list->data); } else { int ind1, ind2; /* check indicators */ ind1 = (pif->ind1[0] == ' ') ? '_':pif->ind1[0]; ind2 = (pif->ind2[0] == ' ') ? '_':pif->ind2[0]; if (((pf->ind1[0] == '.') || (ind1 == pf->ind1[0])) && ((pf->ind2[0] == '.') || (ind2 == pf->ind2[0]))) { cat_inline_subfield(pf->list, buf, pif->list); /* add separator for inline fields */ if (wrbuf_len(buf)) { wrbuf_puts(buf, "\n"); } } else { yaz_log(YLOG_WARN, "In-line field %s missed -- indicators do not match", pif->name); } } } inline_destroy_field(pif); } #if MARCOMP_DEBUG yaz_log(YLOG_LOG, "cat_inline_field(): got buffer {%s}", buf); #endif } static data1_node *cat_subfield(mc_subfield *psf, WRBUF buf, data1_node *subfield) { mc_subfield *p; for (p = psf; p && subfield; p = p->next) { if (p->which == MC_SF) { data1_node *found = lookup_subfield(subfield, p->name); if (found) { int len; if (strcmp(p->prefix, "_")) { wrbuf_puts(buf, " "); wrbuf_puts(buf, p->prefix); } if (p->u.in_line) { cat_inline_field(p->u.in_line, buf, found); } else if (p->interval.start == -1) { wrbuf_puts(buf, get_data(found, &len)); } else { wrbuf_write(buf, get_data(found, &len)+p->interval.start, p->interval.end-p->interval.start); wrbuf_puts(buf, ""); } if (strcmp(p->suffix, "_")) { wrbuf_puts(buf, p->suffix); wrbuf_puts(buf, " "); } #if MARCOMP_DEBUG yaz_log(YLOG_LOG, "cat_subfield(): add subfield $%s", found->u.tag.tag); #endif subfield = found->next; } } else if (p->which == MC_SFVARIANT) { data1_node *next; do { next = cat_subfield(p->u.child, buf, subfield); if (next == subfield) break; subfield = next; } while (subfield); } else if (p->which == MC_SFGROUP) { mc_subfield *pp; int found; for (pp = p->u.child, found = 0; pp; pp = pp->next) { if (!yaz_matchstr(subfield->u.tag.tag, pp->name)) { found = 1; break; } } if (found) { wrbuf_puts(buf, " ("); subfield = cat_subfield(p->u.child, buf, subfield); wrbuf_puts(buf, ") "); } } } return subfield; } static data1_node *cat_field(struct grs_read_info *p, mc_field *pf, WRBUF buf, data1_node *field) { data1_node *subfield; int ind1, ind2; if (!pf || !field) return 0; if (yaz_matchstr(field->u.tag.tag, pf->name)) return field->next; subfield = field->child; if (!subfield) return field->next; /* check subfield without indicators */ if (!pf->list && subfield->which == DATA1N_data) { int len; if (pf->interval.start == -1) { wrbuf_puts(buf, get_data(field, &len)); } else { wrbuf_write(buf, get_data(field, &len)+pf->interval.start, pf->interval.end-pf->interval.start); wrbuf_puts(buf, ""); } #if MARCOMP_DEBUG yaz_log(YLOG_LOG, "cat_field(): got buffer {%s}", buf); #endif return field->next; } /* check indicators */ ind1 = (subfield->u.tag.tag[0] == ' ') ? '_':subfield->u.tag.tag[0]; ind2 = (subfield->u.tag.tag[1] == ' ') ? '_':subfield->u.tag.tag[1]; if (!( ((pf->ind1[0] == '.') || (ind1 == pf->ind1[0])) && ((pf->ind2[0] == '.') || (ind2 == pf->ind2[0])) )) { #if MARCOMP_DEBUG yaz_log(YLOG_WARN, "Field %s missed -- does not match indicators", field->u.tag.tag); #endif return field->next; } subfield = subfield->child; if (!subfield) return field->next; cat_subfield(pf->list, buf, subfield); #if MARCOMP_DEBUG yaz_log(YLOG_LOG, "cat_field(): got buffer {%s}", buf); #endif return field->next; } static int is_empty(char *s) { char *p = s; for (p = s; *p; p++) { if (!isspace(*(unsigned char *)p)) return 0; } return 1; } static void parse_data1_tree(struct grs_read_info *p, const char *mc_stmnt, data1_node *root) { data1_marctab *marctab = data1_absyn_getmarctab(p->dh, root); data1_node *top = root->child; data1_node *field; mc_context *c; mc_field *pf; WRBUF buf; c = mc_mk_context(mc_stmnt+3); if (!c) return; pf = mc_getfield(c); if (!pf) { mc_destroy_context(c); return; } buf = wrbuf_alloc(); #if MARCOMP_DEBUG yaz_log(YLOG_LOG, "parse_data1_tree(): statement -{%s}", mc_stmnt); #endif if (!yaz_matchstr(pf->name, "ldr")) { data1_node *new; #if MARCOMP_DEBUG yaz_log(YLOG_LOG,"parse_data1_tree(): try LEADER from {%d} to {%d} positions", pf->interval.start, pf->interval.end); #endif if (marctab) { new = data1_mk_tag_n(p->dh, p->mem, mc_stmnt, strlen(mc_stmnt), 0, top); data1_mk_text_n(p->dh, p->mem, marctab->leader+pf->interval.start, pf->interval.end-pf->interval.start+1, new); } } else { field=top->child; while(field) { if (!yaz_matchstr(field->u.tag.tag, pf->name)) { data1_node *new; char *pb; #if MARCOMP_DEBUG yaz_log(YLOG_LOG, "parse_data1_tree(): try field {%s}", field->u.tag.tag); #endif wrbuf_rewind(buf); wrbuf_puts(buf, ""); field = cat_field(p, pf, buf, field); wrbuf_cstr(buf); pb = wrbuf_buf(buf); for (pb = strtok(pb, "\n"); pb; pb = strtok(NULL, "\n")) { if (!is_empty(pb)) { new = data1_mk_tag_n(p->dh, p->mem, mc_stmnt, strlen(mc_stmnt), 0, top); data1_mk_text_n(p->dh, p->mem, pb, strlen(pb), new); } } } else { field = field->next; } } } mc_destroy_field(pf); mc_destroy_context(c); wrbuf_destroy(buf); } data1_node *grs_read_marcxml(struct grs_read_info *p) { data1_node *root = grs_read_iso2709(p, 1); data1_element *e; if (!root) return 0; for (e = data1_absyn_getelements(p->dh, root); e; e=e->next) { data1_tag *tag = e->tag; if (tag && tag->which == DATA1T_string && !yaz_matchstr(tag->value.string, "mc?")) parse_data1_tree(p, tag->value.string, root); } return root; } data1_node *grs_read_marc(struct grs_read_info *p) { data1_node *root = grs_read_iso2709(p, 0); data1_element *e; if (!root) return 0; for (e = data1_absyn_getelements(p->dh, root); e; e=e->next) { data1_tag *tag = e->tag; if (tag && tag->which == DATA1T_string && !yaz_matchstr(tag->value.string, "mc?")) parse_data1_tree(p, tag->value.string, root); } return root; } static void *init_marc(Res res, RecType rt) { struct marc_info *p = xmalloc(sizeof(*p)); strcpy(p->type, ""); return p; } static ZEBRA_RES config_marc(void *clientData, Res res, const char *args) { struct marc_info *p = (struct marc_info*) clientData; if (strlen(args) < sizeof(p->type)) strcpy(p->type, args); return ZEBRA_OK; } static void destroy_marc(void *clientData) { struct marc_info *p = (struct marc_info*) clientData; xfree (p); } static int extract_marc(void *clientData, struct recExtractCtrl *ctrl) { return zebra_grs_extract(clientData, ctrl, grs_read_marc); } static int retrieve_marc(void *clientData, struct recRetrieveCtrl *ctrl) { return zebra_grs_retrieve(clientData, ctrl, grs_read_marc); } static struct recType marc_type = { 0, "grs.marc", init_marc, config_marc, destroy_marc, extract_marc, retrieve_marc, }; static int extract_marcxml(void *clientData, struct recExtractCtrl *ctrl) { return zebra_grs_extract(clientData, ctrl, grs_read_marcxml); } static int retrieve_marcxml(void *clientData, struct recRetrieveCtrl *ctrl) { return zebra_grs_retrieve(clientData, ctrl, grs_read_marcxml); } static struct recType marcxml_type = { 0, "grs.marcxml", init_marc, config_marc, destroy_marc, extract_marcxml, retrieve_marcxml, }; RecType #ifdef IDZEBRA_STATIC_GRS_MARC idzebra_filter_grs_marc #else idzebra_filter #endif [] = { &marc_type, &marcxml_type, 0, }; /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/index/ranksimilarity.c0000644000175000017500000003006011412332551014453 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #ifdef WIN32 #include #endif #if HAVE_UNISTD_H #include #endif #include "index.h" #include "rank.h" static int log_level = 0; static int log_initialized = 0; struct ranksimilarity_class_info { int dummy; }; /** term specific info and statistics to be used under ranking */ struct ranksimilarity_term_info { /** frequency of term within document field */ int freq_term_docfield; /** frequency of term within result set of given term */ zint freq_term_resset; /** number of docs within result set */ zint no_docs_resset; /** number of docs with this fieldindex in database */ zint no_docs_fieldindex; /** number of terms in this fieldindex */ zint no_terms_fieldindex; /** rank flag is one if term is to be included in ranking */ int rank_flag; /** relative ranking weight of term fieldindex */ int fieldindex_weight; /** term id used to access term name and other info */ TERMID term; /** index number in terms[i] array */ int term_index; }; struct ranksimilarity_set_info { int last_pos; /** number of terms in query */ int no_terms_query; /** number of terms in query which are included in ranking */ int no_ranked_terms_query; /** number of documents in entire database */ zint no_docs_database; /** number of terms in entire database */ zint no_terms_database; /** array of size no_terms_query with statistics gathered per term */ struct ranksimilarity_term_info *entries; NMEM nmem; }; /* local clean-up function */ static void ranksimilar_rec_reset(struct ranksimilarity_set_info *si) { int i; for (i = 0; i < si->no_terms_query; i++) { si->entries[i].freq_term_docfield = 0; } } /* * create: Creates/Initialises this rank handler. This routine is * called exactly once. The routine returns the class_handle. */ static void *create (ZebraHandle zh) { struct ranksimilarity_class_info *ci = (struct ranksimilarity_class_info *) xmalloc (sizeof(*ci)); if (!log_initialized) { log_level = yaz_log_module_level("rank-similarity"); log_initialized = 1; } yaz_log(log_level, "create()"); return 0; } /* * destroy: Destroys this rank handler. This routine is called * when the handler is no longer needed - i.e. when the server * dies. The class_handle was previously returned by create. */ static void destroy (struct zebra_register *reg, void *class_handle) { struct ranksimilarity_class_info *ci = (struct ranksimilarity_class_info *) class_handle; yaz_log(log_level, "destroy()"); xfree (ci); } /** * begin: Prepares beginning of "real" ranking. Called once for * each result set. The returned handle is a "set handle" and * will be used in each of the handlers below. */ static void *begin (struct zebra_register *reg, void *class_handle, RSET rset, NMEM nmem, TERMID *terms, int numterms) { struct ranksimilarity_set_info *si = (struct ranksimilarity_set_info *) nmem_malloc (nmem, sizeof(*si)); int i; yaz_log(log_level, "begin() numterms=%d", numterms); /* setting database global statistics */ si->no_docs_database = -1; /* TODO */ si->no_terms_database = -1; /* TODO */ /* setting query statistics */ si->no_terms_query = numterms; si->no_ranked_terms_query = 0; /* setting internal data structures */ si->nmem=nmem; si->entries = (struct ranksimilarity_term_info *) nmem_malloc (si->nmem, sizeof(*si->entries)*numterms); /* reset the counts for the next term */ ranksimilar_rec_reset(si); /* looping all terms in a specific fieldindex of query */ for (i = 0; i < numterms; i++) { struct ord_list *ol = NULL; /* adding to number of rank entries */ if (strncmp (terms[i]->flags, "rank,", 5)) { si->entries[i].rank_flag = 0; yaz_log(log_level, "begin() terms[%d]: '%s' flags=%s not ranked", i, terms[i]->name, terms[i]->flags); } else { const char *cp = strstr(terms[i]->flags+4, ",w="); zint no_docs_fieldindex = 0; zint no_terms_fieldindex = 0; yaz_log(log_level, "begin() terms[%d]: '%s' flags=%s", i, terms[i]->name, terms[i]->flags); (si->no_ranked_terms_query)++; ol = terms[i]->ol; si->entries[i].rank_flag = 1; /* notice that the call to rset_count(rset) has he side-effect of setting rset->hits_limit = rset_count(rset) ??? */ si->entries[i].freq_term_resset = rset_count(terms[i]->rset); si->entries[i].no_docs_resset = terms[i]->rset->hits_count; if (cp) si->entries[i].fieldindex_weight = atoi (cp+3); else si->entries[i].fieldindex_weight = 34; /* sqrroot of 1000 */ /* yaz_log(log_level, "begin() rset_count(terms[%d]->rset) = " ZINT_FORMAT, i, rset_count(terms[i]->rset)); yaz_log(log_level, "begin() terms[%d]->rset->hits_limit = " ZINT_FORMAT, i, terms[i]->rset->hits_limit); yaz_log(log_level, "begin() terms[%d]->rset->hits_count = " ZINT_FORMAT, i, terms[i]->rset->hits_count); yaz_log(log_level, "begin() terms[%d]->rset->hits_round = " ZINT_FORMAT, i, terms[i]->rset->hits_round); yaz_log(log_level, "begin() terms[%d]->rset->hits_approx = %d", i, terms[i]->rset->hits_approx); */ /* looping indexes where term terms[i] is found */ for (; ol; ol = ol->next) { const char *index_type = 0; const char *db = 0; const char *string_index = 0; zebraExplain_lookup_ord(reg->zei, ol->ord, &index_type, &db, &string_index); no_docs_fieldindex += zebraExplain_ord_get_doc_occurrences(reg->zei, ol->ord); no_terms_fieldindex += zebraExplain_ord_get_term_occurrences(reg->zei, ol->ord); if (string_index) yaz_log(log_level, "begin() index: ord=%d type=%s db=%s str-index=%s", ol->ord, index_type, db, string_index); else yaz_log(log_level, "begin() index: ord=%d type=%s db=%s", ol->ord, index_type, db); } si->entries[i].no_docs_fieldindex = no_docs_fieldindex; si->entries[i].no_terms_fieldindex = no_terms_fieldindex; } si->entries[i].term = terms[i]; si->entries[i].term_index=i; /* setting next entry in term */ terms[i]->rankpriv = &(si->entries[i]); } return si; } /* * end: Terminates ranking process. Called after a result set * has been ranked. */ static void end (struct zebra_register *reg, void *set_handle) { yaz_log(log_level, "end()"); } /** * add: Called for each word occurence in a result set. This routine * should be as fast as possible. This routine should "incrementally" * update the score. */ static void add (void *set_handle, int seqno, TERMID term) { struct ranksimilarity_set_info *si = (struct ranksimilarity_set_info *) set_handle; struct ranksimilarity_term_info *ti; assert(si); if (!term) { /* yaz_log(log_level, "add() seqno=%d NULL term", seqno); */ return; } ti= (struct ranksimilarity_term_info *) term->rankpriv; assert(ti); si->last_pos = seqno; ti->freq_term_docfield++; /*yaz_log(log_level, "add() seqno=%d term=%s freq_term_docfield=%d", seqno, term->name, ti->freq_term_docfield); */ } /* * calc: Called for each document in a result. This handler should * produce a score based on previous call(s) to the add handler. The * score should be between 0 and 1000. If score cannot be obtained * -1 should be returned. */ static int calc (void *set_handle, zint sysno, zint staticrank, int *stop_flag) { int i, score = 0; struct ranksimilarity_set_info *si = (struct ranksimilarity_set_info *) set_handle; yaz_log(log_level, "calc() sysno = " ZINT_FORMAT, sysno); yaz_log(log_level, "calc() staticrank = " ZINT_FORMAT, staticrank); yaz_log(log_level, "calc() si->no_terms_query = %d", si->no_terms_query); yaz_log(log_level, "calc() si->no_ranked_terms_query = %d", si->no_ranked_terms_query); yaz_log(log_level, "calc() si->no_docs_database = " ZINT_FORMAT, si->no_docs_database); yaz_log(log_level, "calc() si->no_terms_database = " ZINT_FORMAT, si->no_terms_database); if (!si->no_ranked_terms_query) return -1; /* ranking not enabled for any terms */ /* if we set *stop_flag = 1, we stop processing (of result set list) */ /* here goes your formula to compute a scoring function */ /* you may use all the gathered statistics here */ for (i = 0; i < si->no_terms_query; i++) { yaz_log(log_level, "calc() entries[%d] termid %p", i, si->entries[i].term); if (si->entries[i].term){ yaz_log(log_level, "calc() entries[%d] term '%s' flags=%s", i, si->entries[i].term->name, si->entries[i].term->flags); yaz_log(log_level, "calc() entries[%d] rank_flag %d", i, si->entries[i].rank_flag ); yaz_log(log_level, "calc() entries[%d] fieldindex_weight %d", i, si->entries[i].fieldindex_weight ); yaz_log(log_level, "calc() entries[%d] freq_term_docfield %d", i, si->entries[i].freq_term_docfield ); yaz_log(log_level, "calc() entries[%d] freq_term_resset " ZINT_FORMAT, i, si->entries[i].freq_term_resset ); yaz_log(log_level, "calc() entries[%d] no_docs_resset " ZINT_FORMAT, i, si->entries[i].no_docs_resset ); yaz_log(log_level, "calc() entries[%d] no_docs_fieldindex " ZINT_FORMAT, i, si->entries[i].no_docs_fieldindex ); yaz_log(log_level, "calc() entries[%d] no_terms_fieldindex " ZINT_FORMAT, i, si->entries[i].no_terms_fieldindex ); } } /* reset the counts for the next term */ ranksimilar_rec_reset(si); /* staticrank = 0 is highest, MAXINT lowest */ if (staticrank >= INT_MAX) score = 0; else { /* but score is reverse (logical) */ score = INT_MAX - CAST_ZINT_TO_INT(staticrank); } /* debugging statistics output */ yaz_log(log_level, "calc() statistics: score = %d", score); return score; } /* * Pseudo-meta code with sequence of calls as they occur in a * server. Handlers are prefixed by --: * * server init * -- create * foreach search * rank result set * -- begin * foreach record * foreach word * -- add * -- calc * -- end * -- destroy * server close */ static struct rank_control rank_control = { "rank-similarity", create, destroy, begin, end, calc, add, }; struct rank_control *rank_similarity_class = &rank_control; /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/config.sub0000755000175000017500000010242511375165520012136 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-06-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: idzebra-2.0.44/Makefile.in0000644000175000017500000006335411412336426012224 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Doxyfile.in \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/idzebra-config-2.0.in $(srcdir)/idzebra.spec.in \ $(top_srcdir)/configure $(top_srcdir)/win/version.nsi.in \ ChangeLog NEWS TODO config.guess config.sub \ config/config.guess config/config.sub config/depcomp \ config/install-sh config/ltmain.sh config/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = idzebra.spec idzebra-config-2.0 Doxyfile \ win/version.nsi CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(aclocaldir)" DATA = $(aclocal_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ AUTOMAKE_OPTIONS = foreign ACLOCAL_AMFLAGS = -I m4 SUBDIRS = util bfile dfa dict isams isamb isamc rset data1 \ tab index test examples include doc aclocaldir = $(datadir)/aclocal aclocal_DATA = m4/idzebra-2.0.m4 SPEC_FILE = idzebra.spec EXTRA_DIST = README NEWS IDMETA $(SPEC_FILE) $(SPEC_FILE).in \ idzebra-config-2.0.in m4/idzebra-2.0.m4 m4/yaz.m4 buildconf.sh Doxyfile.in all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): idzebra.spec: $(top_builddir)/config.status $(srcdir)/idzebra.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ idzebra-config-2.0: $(top_builddir)/config.status $(srcdir)/idzebra-config-2.0.in cd $(top_builddir) && $(SHELL) ./config.status $@ Doxyfile: $(top_builddir)/config.status $(srcdir)/Doxyfile.in cd $(top_builddir) && $(SHELL) ./config.status $@ win/version.nsi: $(top_builddir)/config.status $(top_srcdir)/win/version.nsi.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-aclocalDATA: $(aclocal_DATA) @$(NORMAL_INSTALL) test -z "$(aclocaldir)" || $(MKDIR_P) "$(DESTDIR)$(aclocaldir)" @list='$(aclocal_DATA)'; test -n "$(aclocaldir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(aclocaldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(aclocaldir)" || exit $$?; \ done uninstall-aclocalDATA: @$(NORMAL_UNINSTALL) @list='$(aclocal_DATA)'; test -n "$(aclocaldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(aclocaldir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(aclocaldir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(aclocaldir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-aclocalDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-aclocalDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \ dist-zip distcheck distclean distclean-generic \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-aclocalDATA install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-aclocalDATA uninstall-am dist-hook: if test -x /usr/bin/git -a -d .git; then git log >ChangeLog ; cp ChangeLog $(distdir); fi cp $(srcdir)/LICENSE* $(distdir) test -d $(distdir)/win || mkdir $(distdir)/win for i in $(srcdir)/win/*; do \ if test -f $$i; then \ cp $$i $(distdir)/win; \ fi; \ done dox: doxygen showdox: doxygen firefox -new-window file:///`pwd`/$(top_srcdir)/dox/html/index.html & .PHONY: dox showdox # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/include/0000755000175000017500000000000011412336535011650 500000000000000idzebra-2.0.44/include/idzebra/0000755000175000017500000000000011412336536013271 500000000000000idzebra-2.0.44/include/idzebra/version.h.in0000644000175000017500000000324711412332551015453 00000000000000/* This file is part of the Zebra server. Copyright (C) 1995-2009 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef IDZEBRA_VERSION_H #define IDZEBRA_VERSION_H #include YAZ_BEGIN_CDECL /** \brief Version as string */ #define ZEBRAVER "@VERSION@" /** \brief Version as integer (for comparison purposes) */ #define ZEBRA_VERSIONL 0x@VERSION_HEX@ /** \brief Version for Windows DLL/EXE */ #define ZEBRA_FILEVERSION @WIN_FILEVERSION@ /** \brief SHA1 ID as generated by Git */ #define ZEBRA_VERSION_SHA1 "@VERSION_SHA1@" /** \brief Returns Zebra version and SHA1 ID as generated by Git \param version_str buffer for version (at least 16 bytes) \param sha1_str SHA1 ID. Use NULL for not getting the ID \returns version as integer The sha1_str if non-NULL must point to a buffer of at least 65 bytes (64 ID + null char). */ YAZ_EXPORT void zebra_get_version(char *version_str, char *sha1_str); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/idzebra/isams.h0000644000175000017500000000351411412332551014472 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef ISAMS_H #define ISAMS_H #include #include #include YAZ_BEGIN_CDECL typedef struct ISAMS_s *ISAMS; typedef struct ISAMS_PP_s *ISAMS_PP; typedef struct ISAMS_M_s { int (*compare_item)(const void *a, const void *b); void (*log_item)(int logmask, const void *p, const char *txt); ISAM_CODEC codec; int debug; int block_size; } ISAMS_M; typedef struct ISAMS_I_s { int (*read_item)(void *clientData, char **dst, int *insertMode); void *clientData; } *ISAMS_I; void isams_getmethod (ISAMS_M *me); ISAMS isams_open (BFiles bfs, const char *name, int writeflag, ISAMS_M *method); int isams_close (ISAMS is); ISAM_P isams_merge (ISAMS is, ISAMS_I data); ISAMS_PP isams_pp_open (ISAMS is, ISAM_P pos); void isams_pp_close (ISAMS_PP pp); int isams_read_item (ISAMS_PP pp, char **dst); int isams_pp_read (ISAMS_PP pp, void *buf); int isams_pp_num (ISAMS_PP pp); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/idzebra/api.h0000644000175000017500000004545611412332551014142 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** \file api.h \brief Zebra API Return codes: Most functions has return type ZEBRA_RES, where ZEBRA_FAIL indicates failure; ZEBRA_OK indicates success. */ #ifndef IDZEBRA_API_H #define IDZEBRA_API_H #include #include #include #include #include YAZ_BEGIN_CDECL typedef struct { zint processed; zint inserted; zint updated; zint deleted; long utime; long stime; } ZebraTransactionStatus; /** Retrieval Record Descriptor */ typedef struct { int errCode; /* non-zero if error when fetching this */ char *errString; /* error string */ int position; /* position of record in result set (1,2,..) */ char *buf; /* record buffer (void pointer really) */ int len; /* length */ const Odr_oid *format; /* record syntax */ char *base; zint sysno; int score; } ZebraRetrievalRecord; /** Scan Term Descriptor */ typedef struct { zint occurrences; /* scan term occurrences */ char *term; /* scan term string */ char *display_term; /* display scan term entry */ } ZebraScanEntry; /** \var ZebraHandle \brief a Zebra Handle - (session) */ typedef struct zebra_session *ZebraHandle; /** \var ZebraService \brief a Zebra Service handle */ typedef struct zebra_service *ZebraService; /** \brief Creates a Zebra Service. \param configName name of configuration file This function is a simplified version of zebra_start_res. */ YAZ_EXPORT ZebraService zebra_start(const char *configName ) ZEBRA_GCC_ATTR((warn_unused_result)); /** \brief Creates a Zebra service with resources. \param configName name of configuration file \param def_res default resources \param over_res overriding resources This function typically called once in a program. A Zebra Service acts as a factory for Zebra session handles. */ YAZ_EXPORT ZebraService zebra_start_res(const char *configName, Res def_res, Res over_res ) ZEBRA_GCC_ATTR((warn_unused_result)); /** \brief stops a Zebra service. \param zs service handle Frees resources used by the service. */ YAZ_EXPORT ZEBRA_RES zebra_stop(ZebraService zs); /** \brief Lists enabled Zebra filters \param zs service handle \param cd callback parameter (opaque) \param cb callback function */ YAZ_EXPORT void zebra_filter_info(ZebraService zs, void *cd, void (*cb)(void *cd, const char *name)); /** \brief Creates a Zebra session handle within service. \param zs service handle. \param res resources to be used for the service (NULL for none) There should be one handle for each thread doing something with zebra, be that searching or indexing. In simple apps one handle is sufficient */ YAZ_EXPORT ZebraHandle zebra_open(ZebraService zs, Res res ) ZEBRA_GCC_ATTR((warn_unused_result)); /** \brief Destroys Zebra session handle. \param zh zebra session handle. */ YAZ_EXPORT ZEBRA_RES zebra_close(ZebraHandle zh); /** \brief Returns error code for last error \param zh zebra session handle. */ YAZ_EXPORT int zebra_errCode(ZebraHandle zh); /** \brief Returns error string for last error \param zh zebra session handle. */ YAZ_EXPORT const char *zebra_errString(ZebraHandle zh); /** \brief Returns additional info for last error \param zh zebra session handle. */ YAZ_EXPORT char *zebra_errAdd(ZebraHandle zh); /** \brief Returns error code and additional info for last error \param zh zebra session handle. \param code pointer to returned error code \param addinfo pointer to returned additional info */ YAZ_EXPORT void zebra_result(ZebraHandle zh, int *code, char **addinfo); /** \brief Returns character set encoding for session \param zh zebra session handle. \returns encoding name (e.g. "iso-8859-1") */ YAZ_EXPORT const char *zebra_get_encoding(ZebraHandle zh); /** \brief Set limit before Zebra does approx hit count \param zh session handle \param approx_limit the limit Results will be approximiate if hit count is greater than the limit specified. By default there is a high-limit (no limit). */ ZEBRA_RES zebra_set_approx_limit(ZebraHandle zh, zint approx_limit); /** \brief Search using PQF Query String \param zh session handle \param pqf_query query \param setname name of resultset \param hits of hits is returned */ YAZ_EXPORT ZEBRA_RES zebra_search_PQF(ZebraHandle zh, const char *pqf_query, const char *setname, zint *hits); /** \brief Search using RPN Query structure (from ASN.1) \param zh session handle \param o ODR handle \param query RPN query using YAZ structure \param setname name of resultset \param hits number of hits is returned \param estimated_hit_count whether hit count is an estimate \param partial_resultset whether result is only partially evaluated */ YAZ_EXPORT ZEBRA_RES zebra_search_RPN_x(ZebraHandle zh, ODR o, Z_RPNQuery *query, const char *setname, zint *hits, int *estimated_hit_count, int *partial_resultset); /** \brief Search using RPN Query structure (from ASN.1) \param zh session handle \param o ODR handle \param query RPN query using YAZ structure \param setname name of resultset \param hits number of hits is returned */ YAZ_EXPORT ZEBRA_RES zebra_search_RPN(ZebraHandle zh, ODR o, Z_RPNQuery *query, const char *setname, zint *hits); /** \brief Retrieve records from result set (after search) \param zh session handle \param stream allocate records returned using this ODR \param setname name of result set to retrieve records from \param comp Z39.50 record composition \param input_format transfer syntax (OID) \param num_recs number of records to retrieve \param recs store records in this structure (size is num_recs) */ YAZ_EXPORT ZEBRA_RES zebra_records_retrieve(ZebraHandle zh, ODR stream, const char *setname, Z_RecordComposition *comp, const Odr_oid *input_format, int num_recs, ZebraRetrievalRecord *recs); /** \brief Deletes one or more resultsets \param zh session handle \param function Z_DeleteResultSetRequest_{list,all} \param num_setnames number of result sets \param setnames result set names \param statuses status result */ YAZ_EXPORT int zebra_deleteResultSet(ZebraHandle zh, int function, int num_setnames, char **setnames, int *statuses); /** \brief returns number of term info terms assocaited with result set \param zh session handle \param setname result set name \param num_terms number of terms returned in this integer This function is used in conjunction with zebra_result_set_term_info. If operation was successful, ZEBRA_OK is returned; otherwise ZEBRA_FAIL is returned (typically non-existing setname) */ YAZ_EXPORT ZEBRA_RES zebra_result_set_term_no(ZebraHandle zh, const char *setname, int *num_terms); /** \brief returns information about a term assocated with a result set \param zh session handle \param setname result set name \param no the term we want to know about (0=first, 1=second,..) \param count the number of occurrences of this term, aka hits (output) \param approx about hits: 0=exact,1=approx (output) \param termbuf buffer for term string (intput, output) \param termlen size of termbuf (input=max, output=actual length) \param term_ref_id if non-NULL *term_ref_id holds term reference Returns information about one search term associated with result set. Use zebra_result_set_term_no to read total number of terms associated with result set. If this function can not return information, due to no out of range or bad result set name, ZEBRA_FAIL is returned. The passed termbuf must be able to hold at least *termlen characters. Upon completion, *termlen holds actual length of search term. */ YAZ_EXPORT ZEBRA_RES zebra_result_set_term_info(ZebraHandle zh, const char *setname, int no, zint *count, int *approx, char *termbuf, size_t *termlen, const char **term_ref_id); /** \brief performs Scan (Z39.50 style) \param zh session handle \param stream ODR handle for result \param zapt Attribute plus Term (start term) \param attributeset Attributeset for Attribute plus Term \param position input/output position \param num_entries number of terms requested / returned \param entries list of resulting terms (ODR allocated) \param is_partial upon return 1=partial, 0=complete \param setname limit scan by this set (NULL means no limit) */ YAZ_EXPORT ZEBRA_RES zebra_scan(ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt, const Odr_oid *attributeset, int *position, int *num_entries, ZebraScanEntry **entries, int *is_partial, const char *setname); /** \brief performs Scan (taking PQF string) \param zh session handle \param stream ODR handle for result \param query PQF scan query \param position input/output position \param num_entries number of terms requested / returned \param entries list of resulting terms (ODR allocated) \param is_partial upon return 1=partial, 0=complete \param setname limit scan by this set (NULL means no limit) */ YAZ_EXPORT ZEBRA_RES zebra_scan_PQF(ZebraHandle zh, ODR stream, const char *query, int *position, int *num_entries, ZebraScanEntry **entries, int *is_partial, const char *setname); /** \brief authenticate user. Returns 0 if OK, != 0 on failure \param zh session handle \param user user name \param pass password */ YAZ_EXPORT ZEBRA_RES zebra_auth(ZebraHandle zh, const char *user, const char *pass); /** \brief Normalize zebra term for register (subject to change!) \param zh session handle \param index_type "w", "p",.. \param input_str input string buffer \param input_len input string length \param output_str output string buffer \param output_len output string length */ YAZ_EXPORT int zebra_string_norm(ZebraHandle zh, const char *index_type, const char *input_str, int input_len, char *output_str, int output_len); /** \brief Creates a database \param zh session handle \param db database to be created */ YAZ_EXPORT ZEBRA_RES zebra_create_database(ZebraHandle zh, const char *db); /** \brief Deletes a database (drop) \param zh session handle \param db database to be deleted */ YAZ_EXPORT ZEBRA_RES zebra_drop_database(ZebraHandle zh, const char *db); YAZ_EXPORT ZEBRA_RES zebra_admin_shutdown(ZebraHandle zh); YAZ_EXPORT ZEBRA_RES zebra_admin_start(ZebraHandle zh); YAZ_EXPORT ZEBRA_RES zebra_shutdown(ZebraService zs); YAZ_EXPORT ZEBRA_RES zebra_admin_import_begin(ZebraHandle zh, const char *database, const char *record_type); YAZ_EXPORT ZEBRA_RES zebra_admin_import_segment(ZebraHandle zh, Z_Segment *segment); YAZ_EXPORT ZEBRA_RES zebra_admin_import_end(ZebraHandle zh); YAZ_EXPORT ZEBRA_RES zebra_begin_trans(ZebraHandle zh, int rw ) ZEBRA_GCC_ATTR((warn_unused_result)); YAZ_EXPORT ZEBRA_RES zebra_end_trans(ZebraHandle zh ) ZEBRA_GCC_ATTR((warn_unused_result)); YAZ_EXPORT ZEBRA_RES zebra_end_transaction(ZebraHandle zh, ZebraTransactionStatus *stat); YAZ_EXPORT ZEBRA_RES zebra_commit(ZebraHandle zh); YAZ_EXPORT ZEBRA_RES zebra_clean(ZebraHandle zh); YAZ_EXPORT ZEBRA_RES zebra_init(ZebraHandle zh); YAZ_EXPORT ZEBRA_RES zebra_compact(ZebraHandle zh); YAZ_EXPORT ZEBRA_RES zebra_repository_index(ZebraHandle zh, const char *path, enum zebra_recctrl_action_t action); YAZ_EXPORT ZEBRA_RES zebra_repository_update(ZebraHandle zh, const char *path); YAZ_EXPORT ZEBRA_RES zebra_repository_delete(ZebraHandle zh, const char *path); YAZ_EXPORT ZEBRA_RES zebra_repository_show(ZebraHandle zh, const char *path); /** \brief Simple update record \param zh session handle \param buf record buffer \param buf_size record buffer size This function is a simple wrapper or zebra_update_record with action=action_update (insert or replace) . */ YAZ_EXPORT ZEBRA_RES zebra_add_record(ZebraHandle zh, const char *buf, int buf_size); /** \brief Updates record \param zh session handle \param action (insert,replace,delete or update (replace/insert) \param recordType filter type (0 indicates default) \param sysno system id (0 may be passed for no known id) \param match match criteria (0 may be passed for no known criteria) \param fname filename to be printed for logging (0 may be passed) \param buf record buffer \param buf_size record buffer size */ YAZ_EXPORT ZEBRA_RES zebra_update_record(ZebraHandle zh, enum zebra_recctrl_action_t action, const char *recordType, zint *sysno, const char *match, const char *fname, const char *buf, int buf_size); YAZ_EXPORT ZEBRA_RES zebra_sort(ZebraHandle zh, ODR stream, int num_input_setnames, const char **input_setnames, const char *output_setname, Z_SortKeySpecList *sort_sequence, int *sort_status ) ZEBRA_GCC_ATTR((warn_unused_result)); YAZ_EXPORT ZEBRA_RES zebra_select_databases(ZebraHandle zh, int num_bases, const char **basenames ) ZEBRA_GCC_ATTR((warn_unused_result)); YAZ_EXPORT ZEBRA_RES zebra_select_database(ZebraHandle zh, const char *basename ) ZEBRA_GCC_ATTR((warn_unused_result)); YAZ_EXPORT void zebra_shadow_enable(ZebraHandle zh, int value); YAZ_EXPORT int zebra_register_statistics(ZebraHandle zh, int dumpdict); YAZ_EXPORT ZEBRA_RES zebra_record_encoding(ZebraHandle zh, const char *encoding); YAZ_EXPORT ZEBRA_RES zebra_octet_term_encoding(ZebraHandle zh, const char *encoding); /* Resources */ YAZ_EXPORT void zebra_set_resource(ZebraHandle zh, const char *name, const char *value); YAZ_EXPORT const char *zebra_get_resource(ZebraHandle zh, const char *name, const char *defaultvalue); YAZ_EXPORT void zebra_pidfname(ZebraService zs, char *path); typedef struct { char *term; char *db; zint sysno; int score; } ZebraMetaRecord; YAZ_EXPORT ZebraMetaRecord *zebra_meta_records_create(ZebraHandle zh, const char *name, int num, zint *positions); YAZ_EXPORT ZebraMetaRecord *zebra_meta_records_create_range(ZebraHandle zh, const char *name, zint start, int num); YAZ_EXPORT void zebra_meta_records_destroy(ZebraHandle zh, ZebraMetaRecord *records, int num); YAZ_EXPORT struct BFiles_struct *zebra_get_bfs(ZebraHandle zh); YAZ_EXPORT ZEBRA_RES zebra_set_limit(ZebraHandle zh, int complement_flag, zint *ids); YAZ_EXPORT ZEBRA_RES zebra_set_break_handler(ZebraHandle zh, int (*f)(void *client_data), void *client_data); YAZ_END_CDECL /** \mainpage Zebra * * \section intro_sec Introduction * * Zebra is a search engine for structure data, such as XML, MARC * and others. * * API users should read the api.h for all the public definitions. * * The remaining sections briefly describe each of * Zebra major modules/components. * * \section util Base Utilities * * The Zebra utilities (util.h) defines fundamental types and a few * utilites for Zebra. * * \section res Resources * * The resources system (res.h) is a manager of configuration * resources. The resources can be viewed as a simple database. * Resources can be read from a configurtion file, they can be * read or written by an application. Resources can also be written, * but that facility is not currently in use. * * \section bfile Bfiles * * The Bfiles (bfile.h) provides a portable interface to the * local file system. It also provides a facility for safe updates * (shadow updates). All file system access is handle by this module * (except for trival reads of configuration files). * * \section dict Dictionary * * The Zebra dictionary (dict.h) maps a search term (key) to a value. The * value is a reference to the list of records identifers in which * the term occurs. Zebra uses an ISAM data structure for the list * of term occurrences. The Dictionary uses \ref bfile. * * \section isam ISAM * * Zebra maintains an ISAM for each term where each ISAM is a list * of record identifiers corresponding to the records in which the * term occur. Unlike traditional ISAM systems, the Zebra ISAM * is compressed. The ISAM system uses \ref bfile. * * Zebra has more than one ISAM system. The old and stable ISAM system * is named isamc (see isamc.h). Another version isams is a write-once * isam system that is quite compact - suitable for CD-ROMs (isams.h). * The newest ISAM system, isamb, is implemented as a B-Tree (see isamb.h). * * \section data1 Data-1 * * The data1 (data1.h) module deals with structured documents. The module can * can read, modify and write documents. The document structure was * originally based on GRS-1 - a Z39.50 v3 structure that predates * DOM. These days the data1 structure may describe XML/SGML as well. * The data1, like DOM, is a tree structure. Each node in the tree * can be of type element, text (cdata), preprocessing instruction, * comment. Element nodes can point to attribute nodes. * * \section recctrl Record Control * * The record control module (recctrl.h) is responsible for * managing the various record types ("classes" or filters). * * \section rset Result-Set * * The Result-Set module (rset.h) defines an interface that all * Zebra Search Results must implement. Each operation (AND, OR, ..) * correspond to an implementation of that interface. * * \section dfa DFA * * DFA (dfa.h) Deterministic Finite Automa is a regular expression engine. * The module compiles a regular expression to a DFA. The DFA can then * be used in various application to perform fast match against the * origianl expression. The \ref Dict uses DFA to perform lookup * using regular expressions. */ #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/idzebra/flock.h0000644000175000017500000000263411412332551014456 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #ifndef FLOCK_H #define FLOCK_H YAZ_BEGIN_CDECL typedef struct zebra_lock_handle *ZebraLockHandle; YAZ_EXPORT ZebraLockHandle zebra_lock_create(const char *dir, const char *file); YAZ_EXPORT void zebra_lock_destroy (ZebraLockHandle h); YAZ_EXPORT int zebra_unlock (ZebraLockHandle h); YAZ_EXPORT char *zebra_mk_fname (const char *dir, const char *name); YAZ_EXPORT int zebra_lock_w (ZebraLockHandle h); YAZ_EXPORT int zebra_lock_r (ZebraLockHandle h); YAZ_EXPORT void zebra_flock_init(void); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/idzebra/isamb.h0000644000175000017500000000464411412332551014456 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef ISAMB_H #define ISAMB_H #include #include YAZ_BEGIN_CDECL typedef struct ISAMB_s *ISAMB; typedef struct ISAMB_PP_s *ISAMB_PP; YAZ_EXPORT ISAMB isamb_open(BFiles bfs, const char *name, int writeflag, ISAMC_M *method, int cache); YAZ_EXPORT ISAMB isamb_open2(BFiles bfs, const char *name, int writeflag, ISAMC_M *method, int cache, int no_cat, int *sizes, int use_root_ptr); YAZ_EXPORT void isamb_close(ISAMB isamb); YAZ_EXPORT void isamb_merge(ISAMB b, ISAM_P *pos, ISAMC_I *data); YAZ_EXPORT ISAMB_PP isamb_pp_open(ISAMB isamb, ISAM_P pos, int scope); YAZ_EXPORT int isamb_pp_read(ISAMB_PP pp, void *buf); YAZ_EXPORT int isamb_pp_forward(ISAMB_PP pp, void *buf, const void *untilbuf); YAZ_EXPORT void isamb_pp_pos(ISAMB_PP pp, double *current, double *total); YAZ_EXPORT void isamb_pp_close(ISAMB_PP pp); YAZ_EXPORT int isamb_unlink(ISAMB b, ISAM_P pos); YAZ_EXPORT ISAMB_PP isamb_pp_open_x(ISAMB isamb, ISAM_P pos, int *level, int scope); YAZ_EXPORT void isamb_pp_close_x(ISAMB_PP pp, zint *size, zint *blocks); YAZ_EXPORT int isamb_block_info(ISAMB isamb, int cat); YAZ_EXPORT void isamb_dump(ISAMB b, ISAM_P pos, void (*pr)(const char *str)); YAZ_EXPORT zint isamb_get_int_splits(ISAMB b); YAZ_EXPORT zint isamb_get_leaf_splits(ISAMB b); YAZ_EXPORT void isamb_set_int_count(ISAMB b, int v); YAZ_EXPORT void isamb_set_cache_size(ISAMB b, int sz); YAZ_EXPORT zint isamb_get_root_ptr(ISAMB b); YAZ_EXPORT void isamb_set_root_ptr(ISAMB b, zint root_ptr); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/idzebra/version.h0000644000175000017500000000325511412336433015050 00000000000000/* This file is part of the Zebra server. Copyright (C) 1995-2009 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef IDZEBRA_VERSION_H #define IDZEBRA_VERSION_H #include YAZ_BEGIN_CDECL /** \brief Version as string */ #define ZEBRAVER "2.0.44" /** \brief Version as integer (for comparison purposes) */ #define ZEBRA_VERSIONL 0x2002c /** \brief Version for Windows DLL/EXE */ #define ZEBRA_FILEVERSION 2,0,44,1 /** \brief SHA1 ID as generated by Git */ #define ZEBRA_VERSION_SHA1 "1895d4f884802edff2e8b594297bffb0ef80b8bd" /** \brief Returns Zebra version and SHA1 ID as generated by Git \param version_str buffer for version (at least 16 bytes) \param sha1_str SHA1 ID. Use NULL for not getting the ID \returns version as integer The sha1_str if non-NULL must point to a buffer of at least 65 bytes (64 ID + null char). */ YAZ_EXPORT void zebra_get_version(char *version_str, char *sha1_str); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/idzebra/data1.h0000644000175000017500000004621411412332551014354 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef DATA1_H #define DATA1_H #include #include #include #include #include #define d1_isspace(c) strchr(" \r\n\t\f", c) #define d1_isdigit(c) ((c) <= '9' && (c) >= '0') YAZ_BEGIN_CDECL #define data1_matchstr(s1, s2) yaz_matchstr(s1, s2) #define DATA1_MAX_SYMBOL 31 /* * 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_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_att *next; }; struct data1_attset_child { data1_attset *child; data1_attset_child *next; }; struct data1_attset { char *name; /* symbolic name */ Odr_oid *oid; /* attribute set OID */ 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, const 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); 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 data1_mapunit; typedef struct data1_maptab { char *name; Odr_oid *oid; /* target abstract syntax */ char *target_absyn_name; data1_mapunit *map; struct data1_maptab *next; } data1_maptab; 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 struct data1_absyn data1_absyn; 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; Odr_oid *oid; /* MARC OID */ 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; char leader[24]; /* Fixme! Need linear access to LEADER of MARC record */ 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; Odr_oid *oid; /* variant OID */ 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 */ Odr_oid *oid; /* variant OID */ data1_tag *tags; /* tags defined by this set */ data1_tagset *children; /* children */ data1_tagset *next; /* sibling */ }; typedef struct data1_termlist { char *index_name; char *structure; char *source; 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; struct data1_hash_table *hash; } data1_element; typedef struct data1_sub_elements { char *name; struct data1_sub_elements *next; data1_element *elements; } data1_sub_elements; typedef struct data1_xattr { char *name; char *value; struct data1_xattr *next; unsigned short what; /* DATA1I_text, .. see data1_node.u.data */ } data1_xattr; /* * 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 /* comment (same as data) */ #define DATA1N_comment 5 /* preprocessing instruction */ #define DATA1N_preprocess 6 int which; union { struct { char *type; struct 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; data1_xattr *attributes; } 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 /* XML text */ #define DATA1I_xmltext 6 unsigned what:7; unsigned formatted_text : 1; /* newlines are significant */ } data; struct { data1_vartype *type; char *value; } variant; struct { char *target; data1_xattr *attributes; } preprocess; } u; #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; enum DATA1_XPATH_INDEXING { DATA1_XPATH_INDEXING_DISABLE, DATA1_XPATH_INDEXING_ENABLE }; 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 void data1_remove_node (data1_handle dh, data1_node *n); YAZ_EXPORT void data1_remove_idzebra_subtree (data1_handle dh, data1_node *n); 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 char *data1_nodetobuf(data1_handle dh, data1_node *n, int select, int *len); YAZ_EXPORT data1_node *data1_mk_tag_data_wd(data1_handle dh, data1_node *at, const char *tagname, NMEM m); YAZ_EXPORT data1_node *data1_mk_tag_data(data1_handle dh, 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, const char *zclass, const char *type); YAZ_EXPORT data1_vartype *data1_getvartypeby_absyn(data1_handle dh, data1_absyn *absyn, 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_node2(data1_handle dh, NMEM m, int type, data1_node *parent); YAZ_EXPORT data1_node *data1_mk_tag (data1_handle dh, NMEM nmem, const char *tag, const char **attr, data1_node *at); YAZ_EXPORT data1_node *data1_mk_tag_n (data1_handle dh, NMEM nmem, const char *tag, size_t len, const char **attr, data1_node *at); YAZ_EXPORT void data1_tag_add_attr (data1_handle dh, NMEM nmem, data1_node *res, const char **attr); YAZ_EXPORT data1_node *data1_mk_text_n (data1_handle dh, NMEM mem, const char *buf, size_t len, data1_node *parent); YAZ_EXPORT data1_node *data1_mk_text_nf (data1_handle dh, NMEM mem, const char *buf, size_t len, data1_node *parent); YAZ_EXPORT data1_node *data1_mk_text (data1_handle dh, NMEM mem, const char *buf, data1_node *parent); YAZ_EXPORT data1_node *data1_mk_comment_n (data1_handle dh, NMEM mem, const char *buf, size_t len, data1_node *parent); YAZ_EXPORT data1_node *data1_mk_comment (data1_handle dh, NMEM mem, const char *buf, data1_node *parent); YAZ_EXPORT data1_node *data1_mk_preprocess_n (data1_handle dh, NMEM nmem, const char *target, size_t len, const char **attr, data1_node *at); YAZ_EXPORT data1_node *data1_mk_preprocess (data1_handle dh, NMEM nmem, const char *target, const char **attr, data1_node *at); YAZ_EXPORT data1_node *data1_insert_preprocess_n (data1_handle dh, NMEM nmem, const char *target, size_t len, const char **attr, data1_node *at); YAZ_EXPORT data1_node *data1_insert_preprocess (data1_handle dh, NMEM nmem, const char *target, const char **attr, data1_node *at); YAZ_EXPORT data1_node *data1_mk_root (data1_handle dh, NMEM nmem, const char *name); YAZ_EXPORT void data1_set_root(data1_handle dh, data1_node *res, NMEM nmem, const char *name); YAZ_EXPORT data1_node *data1_mk_tag_data_zint (data1_handle dh, data1_node *at, const char *tag, zint num, NMEM nmem); YAZ_EXPORT data1_node *data1_mk_tag_data_int (data1_handle dh, data1_node *at, const char *tag, int num, NMEM nmem); YAZ_EXPORT data1_node *data1_mk_tag_data_oid (data1_handle dh, data1_node *at, const char *tag, Odr_oid *oid, NMEM nmem); YAZ_EXPORT data1_node *data1_mk_tag_data_text (data1_handle dh, data1_node *at, const char *tag, const char *str, NMEM nmem); YAZ_EXPORT data1_node *data1_mk_tag_data_text_uni (data1_handle dh, data1_node *at, const char *tag, const char *str, NMEM nmem); YAZ_EXPORT data1_absyn *data1_get_absyn (data1_handle dh, const char *name, enum DATA1_XPATH_INDEXING en); YAZ_EXPORT data1_node *data1_search_tag (data1_handle dh, data1_node *n, const char *tag); YAZ_EXPORT data1_node *data1_mk_tag_uni (data1_handle dh, NMEM nmem, const char *tag, data1_node *at); 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 data1_marctab *data1_absyn_getmarctab(data1_handle dh, data1_node *root); YAZ_EXPORT data1_element *data1_absyn_getelements(data1_handle dh, data1_node *root); 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 void data1_set_tabroot (data1_handle dp, const char *p); YAZ_EXPORT const char *data1_get_tabpath(data1_handle dh); YAZ_EXPORT const char *data1_get_tabroot(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 char *data1_insert_string_n (data1_handle dh, data1_node *res, NMEM m, const char *str, size_t len); YAZ_EXPORT data1_node *data1_read_sgml (data1_handle dh, NMEM m, const char *buf); YAZ_EXPORT data1_node *data1_read_xml (data1_handle dh, int (*rf)(void *, char *, size_t), void *fh, NMEM m); 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, const Odr_oid *oid); YAZ_EXPORT char *data1_getNodeValue(data1_node* node, char* pTagPath); YAZ_EXPORT data1_node *data1_LookupNode(data1_node* node, char* pTagPath); YAZ_EXPORT int data1_CountOccurences(data1_node* node, char* pTagPath); YAZ_EXPORT FILE *data1_path_fopen (data1_handle dh, const char *file, const char *mode); /* obsolete functions ... */ YAZ_EXPORT data1_node *data1_mk_node (data1_handle dh, NMEM m); 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_mk_node_type (data1_handle dh, NMEM m, int type); YAZ_EXPORT data1_node *data1_add_taggeddata (data1_handle dh, data1_node *root, data1_node *at, const char *tagname, NMEM m); YAZ_EXPORT data1_node *data1_get_root_tag (data1_handle dh, data1_node *n); YAZ_EXPORT int data1_iconv (data1_handle dh, NMEM m, data1_node *n, const char *tocode, const char *fromcode); YAZ_EXPORT const char *data1_get_encoding (data1_handle dh, data1_node *n); YAZ_EXPORT int data1_is_xmlmode(data1_handle dh); YAZ_EXPORT const char *data1_systag_lookup(data1_absyn *absyn, const char *tag, const char *default_value); YAZ_EXPORT void data1_concat_text(data1_handle dh, NMEM m, data1_node *n); YAZ_EXPORT void data1_chop_text(data1_handle dh, NMEM m, data1_node *n); YAZ_EXPORT void data1_absyn_destroy(data1_handle dh); YAZ_EXPORT const char *data1_absyn_get_staticrank(data1_absyn *absyn); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/idzebra/bfile.h0000644000175000017500000002041311412332551014434 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** \file bfile.h \brief Zebra Block File Layer Providers an interface to a file system , AKA persistent storage. The interface allows safe updates - using a shadow file facility. */ #ifndef BFILE_H #define BFILE_H #include #include YAZ_BEGIN_CDECL /** \var BFiles \brief A collection of BFile(s). */ typedef struct BFiles_struct *BFiles; /** \var BFile \brief A Block File */ typedef struct BFile_struct *BFile; /** \brief creates a Block files collection \param spec register specification , e.g. "d1:100M d2:1G" \param base base directory for register spec (if that is relative path) \return block files handle */ BFiles bfs_create (const char *spec, const char *base); /** \brief destroys a block files handle \param bfiles block files handle The files in the block files collection are not deleted. Only the handle is freed. */ void bfs_destroy (BFiles bfiles); /** \brief closes a Block file (may call exit) \param bf block file */ YAZ_EXPORT void bf_close(BFile bf); /** \brief closes a Block file \param bf block file \retval 0 success \retval -1 failure */ YAZ_EXPORT int bf_close2(BFile bf); /** \brief closes an extended Block file handle.. \param bf extended block file opened with bf_xopen \param version version to be put in a file \param more_info more information to be stored in file (header) \retval 0 success \retval -1 failure (can never happen as the code is now) */ YAZ_EXPORT int bf_xclose(BFile bf, int version, const char *more_info); /** \brief opens and returns a Block file handle \param bfs block files \param name filename \param block_size block size in bytes \param wflag 1=opened for read&write, 0=read only \retval 0 success \retval -1 failure (can never happen as the code is now) */ YAZ_EXPORT BFile bf_open(BFiles bfs, const char *name, int block_size, int wflag); /** \brief opens and returns an extended Block file handle \param bfs block files \param name filename \param block_size block size in bytes \param wflag 1=opened for read&write, 0=read only \param magic magic string to be used for file \param read_version holds after completion of bf_xopen the version \param more_info holds more_info as read from file (header) */ YAZ_EXPORT BFile bf_xopen(BFiles bfs, const char *name, int block_size, int wflag, const char *magic, int *read_version, const char **more_info); /** \brief read from block file (may call exit) \param bf block file handle \param no block no (first block is 0, second is 1..) \param offset offset within block to be read \param nbytes number of bytes to read (0 for whole block) \param buf raw bytes with content (at least nbytes of size) \retval 1 whole block could be read \retval 0 whole block could not be read */ YAZ_EXPORT int bf_read(BFile bf, zint no, int offset, int nbytes, void *buf); /** \brief read from block file \param bf block file handle \param no block no (first block is 0, second is 1..) \param offset offset within block to be read \param nbytes number of bytes to read (0 for whole block) \param buf raw bytes with content (at least nbytes of size) \retval 1 whole block could be read \retval 0 whole block could not be read \retval -1 error */ YAZ_EXPORT int bf_read2(BFile bf, zint no, int offset, int nbytes, void *buf) ZEBRA_GCC_ATTR((warn_unused_result)); /** \brief writes block of bytes to file (may call exit) \param bf block file handle \param no block no \param offset within block \param nbytes number of bytes to write \param buf buffer to write \retval 0 success (block could be written) This function can not return a failure. System calls exit(1) if write failed. */ YAZ_EXPORT int bf_write(BFile bf, zint no, int offset, int nbytes, const void *buf); /** \brief writes block of bytes to file \param bf block file handle \param no block no \param offset within block \param nbytes number of bytes to write \param buf buffer to write \retval 0 success (block written) \retval -1 error This function can not return a failure. System calls exit(1) if write failed. */ YAZ_EXPORT int bf_write2(BFile bf, zint no, int offset, int nbytes, const void *buf) ZEBRA_GCC_ATTR((warn_unused_result)); /** \brief enables or disables shadow for block files \param bfs block files \param spec such as "shadow:100M /other:200M"; or NULL to disable \retval ZEBRA_OK successful. spec is OK \retval ZEBRA_FAIL failure. */ YAZ_EXPORT ZEBRA_RES bf_cache (BFiles bfs, const char *spec); /** \brief Check if there is content in shadow area (to be committed). \param bfs block files \retval 1 there is content in shadow area \retval 0 no content in shadow area */ YAZ_EXPORT int bf_commitExists (BFiles bfs); /** \brief Executes commit operation \param bfs block files */ YAZ_EXPORT int bf_commitExec (BFiles bfs) ZEBRA_GCC_ATTR((warn_unused_result)); /** \brief Cleans shadow files (remove them) \param bfs block files \param spec shadow specification */ YAZ_EXPORT void bf_commitClean (BFiles bfs, const char *spec); /** \brief Removes register and shadow completely \param bfs block files */ YAZ_EXPORT void bf_reset (BFiles bfs); /** \brief Allocates one or more blocks in an extended block file \param bf extended block file \param no number of blocks to allocate \param blocks output array of size no with block offsets */ YAZ_EXPORT int bf_alloc(BFile bf, int no, zint *blocks); /** \brief Releases one or more blocks in an extended block file \param bf extended block file \param no numer of blocks to release \param blocks input array with block offsets (IDs) to release */ YAZ_EXPORT int bf_free(BFile bf, int no, const zint *blocks); /* \brief gets statistics about directory in register area \param bfs block files \param no directory number (0=first, 1=second,...) \param directory holds directory name (if found) \param used_bytes used file bytes in directory (if found) \param max_bytes max usage of bytes (if found) \retval 1 no is within range and directory, used, max are set. \retval 0 no is out of range and directory, used, max are unset We are using double, because off_t may have a different size on same platform depending on whether 64-bit is enabled or not. Note that if a register area has unlimited size, that is represented as max_bytes = -1. */ YAZ_EXPORT int bfs_register_directory_stat(BFiles bfs, int no, const char **directory, double *used_bytes, double *max_bytes); /* \brief gets statistics about directory in shadow area \param bfs block files \param no directory number (0=first, 1=second,...) \param directory holds directory name (if found) \param used_bytes used file bytes in directory (if found) \param max_bytes max usage of bytes (if found) \retval 1 no is within range and directory, used, max are set. \retval 0 no is out of range and directory, used, max are unset We are using double, because off_t may have a different size on same platform depending on whether 64-bit is enabled or not. Note that if a shadow area has unlimited size, that is represented as max_bytes = -1. */ YAZ_EXPORT int bfs_shadow_directory_stat(BFiles bfs, int no, const char **directory, double *used_bytes, double *max_bytes); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/idzebra/Makefile.am0000644000175000017500000000036711412332551015244 00000000000000 zebraincludedir=$(includedir)/$(PACKAGE)$(PACKAGE_SUFFIX)/idzebra zebrainclude_HEADERS=api.h version.h res.h recctrl.h data1.h recgrs.h \ bfile.h dict.h isam-codec.h isams.h isamc.h isamb.h util.h \ snippet.h flock.h EXTRA_DIST = version.h.inidzebra-2.0.44/include/idzebra/dict.h0000644000175000017500000001622611412332551014305 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** \file dict.h \brief Zebra dictionary The dictionary is a hash that maps a string to a value. The value is opaque and is defined as a sequence of bytes with a length in the range 0 to 255. */ #ifndef DICT_H #define DICT_H #include #include YAZ_BEGIN_CDECL /** \var Dict * \brief Dictionary handle * * Most dictionary functions operatate on a Dict type (object). */ typedef struct Dict_struct *Dict; /** \brief open dictionary \param bfs block file storage \param name name of dictionary file \param cache number of pages to cache \param rw 0=read-only, 1=read&write \param compact_flag 1=write with compact, 0=normal paged operation \param page_size page size of disc block \returns dictionary handle */ YAZ_EXPORT Dict dict_open(BFiles bfs, const char *name, int cache, int rw, int compact_flag, int page_size); /** \brief closes dictionary \param dict handle \retval 0 OK \retval -1 failure */ YAZ_EXPORT int dict_close(Dict dict); /** \brief insert item into dictionary \param dict dictionary handle \param p string-z with lookup string \param userlen length of user data (associated with p) \param userinfo userdata (of size userlen) \retval 0 p is new and inserted OK \retval 1 p is updated (already exists) and userinfo is modified \retval 2 p already exists and userinfo is unmodified (same as before) \retval -1 error */ YAZ_EXPORT int dict_insert(Dict dict, const char *p, int userlen, void *userinfo); /** \brief deletes item from dictionary \param dict dictionary handle \param p string-z with lookup string \retval 0 p not found \retval 1 p found and deleted \retval -1 error */ YAZ_EXPORT int dict_delete(Dict dict, const char *p); /** \brief lookup item in dictionary \param dict dictionary handle \param p string-z with lookup string \retval NULL not found \retval value where value[0]=userlen, value[1..userlen] is userinfo data */ YAZ_EXPORT char *dict_lookup(Dict dict, const char *p); /** \brief delete items with a given prefix from dictionary \param dict dictionary handle \param p string-z with prefix \param client client data to be supplied to function f \param f function which gets called for each item in tree \retval 0 OK (0 or more entries deleted) \retval 1 OK (1 or more entries delete) \retval -1 ERROR Function f is called for each item to be deleted. */ YAZ_EXPORT int dict_delete_subtree(Dict dict, const char *p, void *client, int (*f)(const char *info, void *client)); /** \brief lookup item(s) in dictionary with error correction \param dict dictionary handle \param p string-z with lookup string \param range number of allowed errors(extra/substituted/missing char) \param f function be called for each match (NULL for no call of f) \retval 0 OK \retval -1 error Function f is called for each item matched. */ YAZ_EXPORT int dict_lookup_ec(Dict dict, char *p, int range, int (*f)(char *name)); /** \brief regular expression search with error correction \param dict dictionary handle \param p regular expression string-z \param range number of allowed errors(extra/substituted/missing char) \param client client data pointer to be passed to match function f \param max_pos on return holds maximum number of chars that match (prefix) \param init_pos number of leading non-error corrected chars. \param f function be called for each match \retval 0 Operation complete. Function f returned zero value always \retval >0 Operation incomplete. Function f returned a non-zero value \retval -1 error (such as bad regular expression) The function f is called for each match. If function f returns non-zero value the grep operation is stopped and the returned non-zero value is also returned by dict_lookup_ec. */ YAZ_EXPORT int dict_lookup_grep(Dict dict, const char *p, int range, void *client, int *max_pos, int init_pos, int (*f)(char *name, const char *info, void *client)); /** \brief dictionary scan \param dict dictionary handle \param str start pint term (string-z) \param before number of terms to be visited preceding str \param after number of terms to be visited following str \param client client data pointer to be passed to match function f \param f function be called for each matching term \retval 0 Successful \retval -1 error If the callback function f returns 0 the scan operation visits all terms in range (before to after); if the function returns non-zero the scan operation is cancelled. */ YAZ_EXPORT int dict_scan(Dict dict, char *str, int *before, int *after, void *client, int (*f)(char *name, const char *info, int pos, void *client)); /** \brief install character mapping handler for dict_lookup_grep \param dict dictionary handle \param vp client data to be passed to cmap function handler \param cmap function be called for each character This function must be called prior to using dict_grep_lookup. If vp is NULL, no character mapping takes place for dict_lookup_grep. */ YAZ_EXPORT void dict_grep_cmap(Dict dict, void *vp, const char **(*cmap)(void *vp, const char **from, int len)); /** \brief copies one dictionary to another \param bfs block file handle \param from source dictionary file \param to destination dictionary file */ YAZ_EXPORT int dict_copy_compact(BFiles bfs, const char *from, const char *to); /** \brief reset Dictionary (makes it empty) \param dict dictionary handle */ YAZ_EXPORT void dict_clean(Dict dict); /** \brief get number of lookup operations, since dict_open \param dict dictionary handle \returns number of operatons */ YAZ_EXPORT zint dict_get_no_lookup(Dict dict); /** \brief get number of insert operations, since dict_open \param dict dictionary handle \returns number of operatons */ YAZ_EXPORT zint dict_get_no_insert(Dict dict); /** \brief get number of page split operations, since dict_open \param dict dictionary handle \returns number of operatons */ YAZ_EXPORT zint dict_get_no_split(Dict dict); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/idzebra/recctrl.h0000644000175000017500000001455711412332551015025 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef IDZEBRA_RECCTRL_H #define IDZEBRA_RECCTRL_H #include #include #include #include #include #include YAZ_BEGIN_CDECL /* 1 */ #define ZEBRA_XPATH_ELM_BEGIN "_XPATH_BEGIN" /* 2 */ #define ZEBRA_XPATH_ELM_END "_XPATH_END" /* 1016 */ #define ZEBRA_XPATH_CDATA "_XPATH_CDATA" /* 3 */ #define ZEBRA_XPATH_ATTR_NAME "_XPATH_ATTR_NAME" /* 1015 */ #define ZEBRA_XPATH_ATTR_CDATA "_XPATH_ATTR_CDATA" /** Indexing token */ typedef struct { /** index type, e.g. "w", "p", .. */ const char *index_type; /** index name, e.g. "title" */ const char *index_name; /** token char data */ const char *term_buf; /** length of term_buf */ int term_len; /** sequence number */ zint seqno; /** segment number */ zint segment; /** record ID */ zint record_id; /** section ID */ zint section_id; struct recExtractCtrl *extractCtrl; } RecWord; /** \brief record reader stream */ struct ZebraRecStream { /** client data */ void *fh; /** \brief read function */ int (*readf)(struct ZebraRecStream *s, char *buf, size_t count); /** \brief seek function */ off_t (*seekf)(struct ZebraRecStream *s, off_t offset); /** \brief tell function */ off_t (*tellf)(struct ZebraRecStream *s); /** \brief set and get of record position */ off_t (*endf)(struct ZebraRecStream *s, off_t *offset); /** \brief close and destroy stream */ void (*destroy)(struct ZebraRecStream *s); }; /** record update action */ enum zebra_recctrl_action_t { /** insert record (fail if it exists already) */ action_insert = 1, /** replace record (fail it it does not exist) */ action_replace, /** delete record (fail if it does not exist) */ action_delete, /** insert or replace */ action_update, /** delete record (ignore if it does not exist) */ action_a_delete }; /** \brief record extract for indexing */ struct recExtractCtrl { struct ZebraRecStream *stream; void (*init)(struct recExtractCtrl *p, RecWord *w); void *clientData; void (*tokenAdd)(RecWord *w); void (*setStoreData)(struct recExtractCtrl *p, void *buf, size_t size); int first_record; int flagShowRecords; char match_criteria[256]; zint staticrank; void (*schemaAdd)(struct recExtractCtrl *p, Odr_oid *oid); data1_handle dh; void *handle; enum zebra_recctrl_action_t action; }; /* Retrieve record control */ struct recRetrieveCtrl { struct ZebraRecStream *stream; /* Input parameters ... */ Res res; /* Resource pool */ ODR odr; /* ODR used to create response */ const Odr_oid * input_format; /* Preferred record syntax OID */ Z_RecordComposition *comp; /* formatting instructions */ char *encoding; /* preferred character encoding */ zint localno; /* local id of record */ int score; /* score 0-1000 or -1 if none */ zint staticrank; /* static rank >= 0, 0 if none */ int recordSize; /* size of record in bytes */ char *fname; /* name of file (or NULL if internal) */ data1_handle dh; /* response */ const Odr_oid * output_format; /* output format OID */ void * rec_buf; int rec_len; int diagnostic; char * addinfo; /* special fetch to be included in retrieved response (say snippets) */ void *handle; int (*special_fetch)(void *handle, const char *esn, const Odr_oid *input_format, const Odr_oid **output_format, WRBUF result, WRBUF addinfo); }; typedef struct recType *RecType; struct recType { int version; char *name; /* Name of record type */ void *(*init)(Res res, RecType recType); /* Init function - called once */ ZEBRA_RES (*config)(void *clientData, Res res, const char *args); /* Config */ void (*destroy)(void *clientData); /* Destroy function */ int (*extract)(void *clientData, struct recExtractCtrl *ctrl); /* Extract proc */ int (*retrieve)(void *clientData, struct recRetrieveCtrl *ctrl); /* Retrieve proc */ }; #define RECCTRL_EXTRACT_OK 0 #define RECCTRL_EXTRACT_EOF 1 #define RECCTRL_EXTRACT_ERROR_GENERIC 2 #define RECCTRL_EXTRACT_ERROR_NO_SUCH_FILTER 3 #define RECCTRL_EXTRACT_SKIP 4 typedef struct recTypeClass *RecTypeClass; typedef struct recTypes *RecTypes; YAZ_EXPORT RecTypeClass recTypeClass_create (Res res, NMEM nmem); YAZ_EXPORT void recTypeClass_load_modules(RecTypeClass *rts, NMEM nmem, const char *module_path); YAZ_EXPORT RecTypeClass recTypeClass_add_modules(Res res, NMEM nmem, const char *module_path); YAZ_EXPORT void recTypeClass_destroy(RecTypeClass rtc); YAZ_EXPORT void recTypeClass_info(RecTypeClass rtc, void *cd, void (*cb)(void *cd, const char *s)); YAZ_EXPORT RecTypes recTypes_init(RecTypeClass rtc, data1_handle dh); YAZ_EXPORT void recTypes_destroy(RecTypes recTypes); YAZ_EXPORT void recTypes_default_handlers(RecTypes recTypes, Res res); YAZ_EXPORT RecType recType_byName(RecTypes rts, Res res, const char *name, void **clientDataP); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/idzebra/res.h0000644000175000017500000000400111412332551014137 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef IDZEBRA_RES_H #define IDZEBRA_RES_H #include YAZ_BEGIN_CDECL typedef struct res_struct *Res; YAZ_EXPORT Res res_open(Res res_def, Res over_res); YAZ_EXPORT void res_close(Res r); YAZ_EXPORT ZEBRA_RES res_read_file(Res r, const char *fname); YAZ_EXPORT ZEBRA_RES res_write_file(Res r, const char *fname); YAZ_EXPORT void res_clear(Res r); YAZ_EXPORT const char *res_get(Res r, const char *name); YAZ_EXPORT const char *res_get_def(Res r, const char *name, const char *def); YAZ_EXPORT int res_get_match(Res r, const char *name, const char *value, const char *s); YAZ_EXPORT void res_set(Res r, const char *name, const char *value); YAZ_EXPORT int res_trav(Res r, const char *prefix, void *p, void (*f)(void *p, const char *name, const char *value)); YAZ_EXPORT const char *res_get_prefix(Res r, const char *name, const char *prefix, const char *def); YAZ_EXPORT ZEBRA_RES res_get_int(Res r, const char *name, int *val); YAZ_EXPORT void res_add(Res r, const char *name, const char *value); YAZ_EXPORT void res_dump(Res r, int level); YAZ_EXPORT int res_check(Res r_i, Res r_v); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/idzebra/isamc.h0000644000175000017500000000453511412332551014456 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef ISAMC_H #define ISAMC_H #include #include YAZ_BEGIN_CDECL typedef zint ISAM_P; typedef struct ISAMC_s *ISAMC; typedef struct ISAMC_PP_s *ISAMC_PP; typedef struct ISAMC_filecat_s { int bsize; /* block size */ int ifill; /* initial fill */ int mfill; /* minimum fill */ int mblocks; /* maximum blocks */ } *ISAMC_filecat; typedef struct ISAMC_M_s { ISAMC_filecat filecat; int (*compare_item)(const void *a, const void *b); void (*log_item)(int logmask, const void *p, const char *txt); ISAM_CODEC codec; int max_blocks_mem; int debug; } ISAMC_M; typedef struct ISAMC_I_s { int (*read_item)(void *clientData, char **dst, int *insertMode); void *clientData; } ISAMC_I; YAZ_EXPORT void isamc_getmethod(ISAMC_M *m); YAZ_EXPORT ISAMC isamc_open(BFiles bfs, const char *name, int writeflag, ISAMC_M *method); YAZ_EXPORT int isamc_close(ISAMC is); YAZ_EXPORT void isamc_merge(ISAMC is, ISAM_P *pos, ISAMC_I *data); YAZ_EXPORT ISAMC_PP isamc_pp_open(ISAMC is, ISAM_P pos); YAZ_EXPORT void isamc_pp_close(ISAMC_PP pp); YAZ_EXPORT int isamc_read_item(ISAMC_PP pp, char **dst); YAZ_EXPORT int isamc_pp_read(ISAMC_PP pp, void *buf); YAZ_EXPORT zint isamc_pp_num(ISAMC_PP pp); YAZ_EXPORT zint isamc_block_used(ISAMC is, int type); YAZ_EXPORT int isamc_block_size(ISAMC is, int type); #define isamc_type(x) ((x) & 7) #define isamc_block(x) ((x) >> 3) YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/idzebra/snippet.h0000644000175000017500000000533111412332551015037 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef IDZEBRA_SNIPPET_H #define IDZEBRA_SNIPPET_H #include YAZ_BEGIN_CDECL struct zebra_snippet_word { zint seqno; /**< sequence number */ int ord; /**< ordinal, i.e. database,field,type */ char *term; /**< term itself */ int match; /**< both part and real match */ int mark; /**< part of snippet */ int ws; /**< white space flag (not indexed material) */ struct zebra_snippet_word *next; struct zebra_snippet_word *prev; }; typedef struct zebra_snippets zebra_snippets; typedef struct zebra_snippet_word zebra_snippet_word; YAZ_EXPORT zebra_snippets *zebra_snippets_create(void); YAZ_EXPORT void zebra_snippets_destroy(zebra_snippets *l); YAZ_EXPORT void zebra_snippets_append(zebra_snippets *l, zint seqno, int ws, int ord, const char *term); YAZ_EXPORT void zebra_snippets_appendn(zebra_snippets *l, zint seqno, int ws, int ord, const char *term, size_t term_len); YAZ_EXPORT void zebra_snippets_append_match(zebra_snippets *l, zint seqno, int ws, int ord, const char *term, size_t term_len, int match); YAZ_EXPORT zebra_snippet_word *zebra_snippets_list(zebra_snippets *l); YAZ_EXPORT const zebra_snippet_word *zebra_snippets_constlist(const zebra_snippets *l); YAZ_EXPORT void zebra_snippets_log(const zebra_snippets *l, int log_level, int all); YAZ_EXPORT zebra_snippets *zebra_snippets_window(const zebra_snippets *doc, const zebra_snippets *hit, int window_size); YAZ_EXPORT void zebra_snippets_ring(zebra_snippets *doc, const zebra_snippets *hit, int before, int after); YAZ_EXPORT const struct zebra_snippet_word *zebra_snippets_lookup( const zebra_snippets *doc, const zebra_snippets *hit); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/idzebra/recgrs.h0000644000175000017500000000266511412332551014651 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef RECGRS_H #define RECGRS_H #include YAZ_BEGIN_CDECL struct grs_read_info { struct ZebraRecStream *stream; void *clientData; NMEM mem; data1_handle dh; }; YAZ_EXPORT int zebra_grs_extract(void *clientData, struct recExtractCtrl *p, data1_node *(*grs_read)(struct grs_read_info *)); YAZ_EXPORT int zebra_grs_retrieve(void *clientData, struct recRetrieveCtrl *p, data1_node *(*grs_read)(struct grs_read_info *)); YAZ_EXPORT int grs_extract_tree(struct recExtractCtrl *p, data1_node *n); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/idzebra/util.h0000644000175000017500000000510411412332551014330 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef ZEBRA_UTIL_H #define ZEBRA_UTIL_H #include #include #include /** expand GCC_ATTRIBUTE if GCC is in use. See : http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html To see gcc pre-defines for c: gcc -E -dM -x c /dev/null */ #ifdef __GNUC__ #if __GNUC__ >= 4 #define ZEBRA_GCC_ATTR(x) __attribute__ (x) #endif #endif #ifndef ZEBRA_GCC_ATTR #define ZEBRA_GCC_ATTR(x) #endif /* check that we don't have all too old yaz */ #ifndef YLOG_ERRNO #error Need a modern yaz with YLOG_ defines #endif YAZ_BEGIN_CDECL /** \var zint * \brief Zebra integer * * This integer is used in various Zebra APIs to specify record identifires, * number of occurrences etc. It is a "large" integer and is usually * 64-bit on newer architectures. */ #ifdef WIN32 typedef __int64 zint; #define ZINT_FORMAT0 "I64d" #else #ifndef ZEBRA_ZINT #error ZEBRA_ZINT undefined. idzebra-config not in use? #endif #if ZEBRA_ZINT > 0 typedef long long int zint; #define ZINT_FORMAT0 "lld" #else typedef long zint; #define ZINT_FORMAT0 "ld" #endif #endif #define ZINT_FORMAT "%" ZINT_FORMAT0 /** \var typedef ZEBRA_RES * \brief Common return type for Zebra API * * This return code indicates success with code ZEBRA_OK and failure * with ZEBRA_FAIL */ typedef short ZEBRA_RES; #define ZEBRA_FAIL -1 #define ZEBRA_OK 0 YAZ_EXPORT zint atoi_zn(const char *buf, zint len); YAZ_EXPORT void zebra_zint_encode(char **dst, zint pos); YAZ_EXPORT void zebra_zint_decode(const char **src, zint *pos); YAZ_EXPORT void zebra_exit(const char *msg); YAZ_EXPORT zint atozint(const char *src); YAZ_END_CDECL #define CAST_ZINT_TO_INT(x) (int)(x) #define CAST_ZINT_TO_DOUBLE(x) (double)(x) #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/idzebra/Makefile.in0000644000175000017500000003456411412336425015267 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = include/idzebra DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/version.h.in $(zebrainclude_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = version.h CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(zebraincludedir)" HEADERS = $(zebrainclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ zebraincludedir = $(includedir)/$(PACKAGE)$(PACKAGE_SUFFIX)/idzebra zebrainclude_HEADERS = api.h version.h res.h recctrl.h data1.h recgrs.h \ bfile.h dict.h isam-codec.h isams.h isamc.h isamb.h util.h \ snippet.h flock.h EXTRA_DIST = version.h.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/idzebra/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/idzebra/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): version.h: $(top_builddir)/config.status $(srcdir)/version.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-zebraincludeHEADERS: $(zebrainclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(zebraincludedir)" || $(MKDIR_P) "$(DESTDIR)$(zebraincludedir)" @list='$(zebrainclude_HEADERS)'; test -n "$(zebraincludedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(zebraincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(zebraincludedir)" || exit $$?; \ done uninstall-zebraincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(zebrainclude_HEADERS)'; test -n "$(zebraincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(zebraincludedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(zebraincludedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(zebraincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-zebraincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-zebraincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip \ install-zebraincludeHEADERS installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags uninstall uninstall-am \ uninstall-zebraincludeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/include/idzebra/isam-codec.h0000644000175000017500000000222011412332551015353 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef ISAM_CODEC_H #define ISAM_CODEC_H typedef struct { void *(*start)(void); void (*stop)(void *p); void (*decode)(void *p, char **dst, const char **src); void (*encode)(void *p, char **dst, const char **src); void (*reset)(void *p); } ISAM_CODEC; #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/zebra_xpath.h0000644000175000017500000000323711412332551014247 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef ZEBRA_XPATH_H #define ZEBRA_XPATH_H #include #define XPATH_STEP_COUNT 10 struct xpath_predicate { int which; union { #define XPATH_PREDICATE_RELATION 1 struct { char *name; char *op; char *value; } relation; #define XPATH_PREDICATE_BOOLEAN 2 struct { const char *op; struct xpath_predicate *left; struct xpath_predicate *right; } boolean; } u; }; struct xpath_location_step { char *part; struct xpath_predicate *predicate; }; int zebra_parse_xpath_str(const char *xpath_string, struct xpath_location_step *xpath, int max, NMEM mem); void dump_xp_steps (struct xpath_location_step *xpath, int no); #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/passwddb.h0000644000175000017500000000245611412332551013551 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef PASSWDDB_H #define PASSWDDB_H #include YAZ_BEGIN_CDECL typedef struct passwd_db *Passwd_db; Passwd_db passwd_db_open (void); int passwd_db_auth (Passwd_db db, const char *user, const char *pass); int passwd_db_file_plain(Passwd_db db, const char *fname); int passwd_db_file_crypt(Passwd_db db, const char *fname); void passwd_db_close (Passwd_db db); void passwd_db_show (Passwd_db db); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/it_key.h0000644000175000017500000000347611412332551013231 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef ZEBRA_IT_KEY_H #define ZEBRA_IT_KEY_H #include #include YAZ_BEGIN_CDECL #define IT_MAX_WORD 256 #define IT_KEY_LEVEL_MAX 5 struct it_key { int len; zint mem[IT_KEY_LEVEL_MAX]; }; void *iscz1_start(void); void iscz1_reset(void *vp); void iscz1_stop(void *p); void iscz1_decode(void *vp, char **dst, const char **src); void iscz1_encode(void *vp, char **dst, const char **src); int key_compare(const void *p1, const void *p2); void key_init(struct it_key *k); zint key_get_seq(const void *p); zint key_get_segment(const void *p); int key_compare_it(const void *p1, const void *p2); int key_qsort_compare(const void *p1, const void *p2); char *key_print_it(const void *p, char *buf); void key_logdump(int mask, const void *p); void key_logdump_txt(int logmask, const void *p, const char *txt); int key_SU_decode(int *ch, const unsigned char *out); int key_SU_encode(int ch, char *out); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/charmap.h0000644000175000017500000000353211412332551013351 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef CHARMAP_H #define CHARMAP_H #include YAZ_BEGIN_CDECL YAZ_EXPORT extern const char *CHR_UNKNOWN; YAZ_EXPORT extern const char *CHR_SPACE; YAZ_EXPORT extern const char *CHR_CUT; YAZ_EXPORT extern const char *CHR_BASE; /* defines first char we map to (0, 1, .. are specials) */ #define CHR_BASE_CHAR 5 struct chr_t_entry; typedef struct chr_t_entry chr_t_entry; typedef struct chrmaptab_info *chrmaptab; YAZ_EXPORT chrmaptab chrmaptab_create(const char *tabpath, const char *name, const char *tabroot); YAZ_EXPORT void chrmaptab_destroy (chrmaptab tab); YAZ_EXPORT const char **chr_map_input(chrmaptab t, const char **from, int len, int first); YAZ_EXPORT const char **chr_map_input_x(chrmaptab t, const char **from, int *len, int first); YAZ_EXPORT const char **chr_map_q_input(chrmaptab maptab, const char **from, int len, int first); YAZ_EXPORT const char *chr_map_output(chrmaptab t, const char **from, int len); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/dfa.h0000644000175000017500000000621111412332551012465 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef DFA_H #define DFA_H #include #include #include YAZ_BEGIN_CDECL struct DFA_tran { unsigned char ch[2]; /* transition on ch[0] <= c <= ch[1] to */ unsigned short to; /* this state */ }; struct DFA_trans { struct DFA_trans *next; /* next DFA transition block */ struct DFA_tran *tran_block; /* pointer to transitions */ int ptr; /* index of next transition in tran_block */ int size; /* allocated size of tran_block */ }; struct DFA_state { struct DFA_state *next; /* next entry in free/unmarked/marked list */ struct DFA_state *link; /* link to next entry in hash chain */ struct DFA_tran *trans; /* transition list */ DFASet set; /* set of positions (important nfa states) */ short no; /* no of this state */ short tran_no; /* no of transitions to other states */ short rule_no; /* if non-zero, this holds accept rule no */ short rule_nno; /* accept rule no - except start rules */ }; struct DFA { int no_states; struct DFA_state **states; struct DFA_states *state_info; struct DFA_parse *parse_info; }; struct DFA *dfa_init (void); void dfa_anyset_includes_nl(struct DFA *dfa); void dfa_set_cmap (struct DFA *dfa, void *vp, const char **(*cmap)(void *vp, const char **from, int len)); int dfa_parse (struct DFA *, const char **); void dfa_mkstate (struct DFA *); void dfa_delete (struct DFA **); int dfa_get_last_rule (struct DFA *); void dfa_parse_cmap_clean (struct DFA *d); void dfa_parse_cmap_new (struct DFA *d, const int *cmap); void dfa_parse_cmap_del (struct DFA *d, int from); void dfa_parse_cmap_add (struct DFA *d, int from, int to); extern int debug_dfa_trav; extern int debug_dfa_tran; extern int debug_dfa_followpos; extern int dfa_verbose; extern unsigned short dfa_thompson_chars[], dfa_ccl_chars[]; #define L_LP 1 #define L_RP 2 #define L_CHAR 3 #define L_CHARS 4 #define L_ANY 5 #define L_ALT 6 #define L_ANYZ 7 #define L_WILD 8 #define L_QUEST 9 #define L_CLOS1 10 #define L_CLOS0 11 #define L_END 12 #define L_START 13 #define DFA_ERR_SYNTAX 1 #define DFA_ERR_LP 2 #define DFA_ERR_RP 3 YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/zebramap.h0000644000175000017500000000610211412332551013533 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef ZEBRAMAP_H #define ZEBRAMAP_H #include #include YAZ_BEGIN_CDECL typedef struct zebra_maps_s *zebra_maps_t; typedef struct zebra_map *zebra_map_t; YAZ_EXPORT zebra_maps_t zebra_maps_open(Res res, const char *base_path, const char *profile_path); YAZ_EXPORT ZEBRA_RES zebra_maps_read_file(zebra_maps_t zms, const char *fname); YAZ_EXPORT void zebra_maps_define_default_sort(zebra_maps_t zms); YAZ_EXPORT void zebra_maps_close(zebra_maps_t zm); YAZ_EXPORT const char **zebra_maps_input(zebra_map_t zm, const char **from, int len, int first); YAZ_EXPORT const char **zebra_maps_search(zebra_map_t zm, const char **from, int len, int *q_map_match); YAZ_EXPORT const char *zebra_maps_output(zebra_map_t zm, const char **from); YAZ_EXPORT int zebra_maps_attr(zebra_maps_t zms, Z_AttributesPlusTerm *zapt, const char **reg_id, char **search_type, char *rank_type, int *complete_flag, int *sort_flag); YAZ_EXPORT int zebra_maps_sort(zebra_maps_t zms, Z_SortAttributes *sortAttributes, int *numerical); YAZ_EXPORT int zebra_maps_is_complete(zebra_map_t zm); YAZ_EXPORT int zebra_maps_is_sort(zebra_map_t zm); YAZ_EXPORT int zebra_maps_is_index(zebra_map_t zm); YAZ_EXPORT int zebra_maps_is_staticrank(zebra_map_t zm); YAZ_EXPORT int zebra_maps_is_alwaysmatches(zebra_map_t zm); YAZ_EXPORT int zebra_maps_is_positioned(zebra_map_t zm); YAZ_EXPORT int zebra_maps_is_icu(zebra_map_t zm); YAZ_EXPORT int zebra_maps_is_first_in_field(zebra_map_t zm); YAZ_EXPORT WRBUF zebra_replace(zebra_map_t zm, const char *ex_list, const char *input_str, int input_len); YAZ_EXPORT zebra_map_t zebra_map_get(zebra_maps_t zms, const char *id); YAZ_EXPORT zebra_map_t zebra_map_get_or_add(zebra_maps_t zms, const char *id); YAZ_EXPORT int zebra_map_tokenize_start(zebra_map_t zm, const char *buf, size_t len); YAZ_EXPORT int zebra_map_tokenize_next(zebra_map_t zm, const char **result_buf, size_t *result_len, const char **display_buf, size_t *display_len); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/d1_absyn.h0000644000175000017500000000347011412332551013437 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef D1_ABSYN_H #define D1_ABSYN_H 1 #define ENHANCED_XELM 1 #define OPTIMIZE_MELM 1 #include #include #include typedef struct data1_xpelement { char *xpath_expr; #ifdef ENHANCED_XELM struct xpath_location_step xpath[XPATH_STEP_COUNT]; int xpath_len; #endif struct DFA *dfa; data1_termlist *termlists; struct data1_xpelement *next; #if OPTIMIZE_MELM const char *regexp; #endif int match_state; struct data1_xpelement *match_next; } data1_xpelement; struct data1_absyn { char *name; Odr_oid *oid; data1_tagset *tagset; data1_varset *varset; data1_esetname *esetnames; data1_maptab *maptabs; data1_marctab *marc; data1_sub_elements *sub_elements; data1_element *main_elements; struct data1_xpelement *xp_elements; /* pop */ struct data1_systag *systags; char *encoding; enum DATA1_XPATH_INDEXING xpath_indexing; }; #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/Makefile.am0000644000175000017500000000032311412332551013614 00000000000000noinst_HEADERS = bset.h charmap.h \ direntz.h passwddb.h dfa.h zebra_xpath.h d1_absyn.h \ rset.h dfaset.h sortidx.h zebra-lock.h attrfind.h zebramap.h \ it_key.h su_codec.h zebra_strmap.h SUBDIRS = idzebra idzebra-2.0.44/include/zebra_strmap.h0000644000175000017500000000344011412332551014425 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef ZEBRA_STRMAP_H #define ZEBRA_STRMAP_H #include #include YAZ_BEGIN_CDECL typedef struct zebra_strmap *zebra_strmap_t; typedef struct zebra_strmap_it_s *zebra_strmap_it; YAZ_EXPORT zebra_strmap_t zebra_strmap_create(void); YAZ_EXPORT void zebra_strmap_destroy(zebra_strmap_t st); YAZ_EXPORT void zebra_strmap_add(zebra_strmap_t st, const char *name, void *data_buf, size_t data_len); YAZ_EXPORT void *zebra_strmap_lookup(zebra_strmap_t st, const char *name, int no, size_t *data_len); YAZ_EXPORT int zebra_strmap_remove(zebra_strmap_t st, const char *name); YAZ_EXPORT zebra_strmap_it zebra_strmap_it_create(zebra_strmap_t st); YAZ_EXPORT void zebra_strmap_it_destroy(zebra_strmap_it it); YAZ_EXPORT const char *zebra_strmap_it_next(zebra_strmap_it it, void **data_buf, size_t *data_len); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/bset.h0000644000175000017500000000455211412332551012676 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef BSET_H #define BSET_H #include YAZ_BEGIN_CDECL typedef unsigned short BSetWord; typedef BSetWord *BSet; typedef struct BSetHandle_ { unsigned size; /* size of set in members */ unsigned wsize; /* size of individual set (in BSetWord)*/ unsigned offset; /* offset in current set block */ unsigned chunk; /* chunk, i.e. size of each block */ struct BSetHandle_ *setchain; BSetWord setarray[1]; } BSetHandle; BSetHandle *mk_BSetHandle (int size, int chunk); void rm_BSetHandle (BSetHandle **shp); int inf_BSetHandle (BSetHandle *sh, long *used, long *alloc); BSet cp_BSet (BSetHandle *sh, BSet dst, BSet src); void add_BSet (BSetHandle *sh, BSet dst, unsigned member); void union_BSet (BSetHandle *sh, BSet dst, BSet src); BSet mk_BSet (BSetHandle **shp); void rm_BSet (BSetHandle **shp); void res_BSet (BSetHandle *sh, BSet dst); void com_BSet (BSetHandle *sh, BSet dst); void pr_BSet (BSetHandle *sh, BSet src); unsigned test_BSet (BSetHandle *sh, BSet src, unsigned member); int trav_BSet (BSetHandle *sh, BSet src, unsigned member); int travi_BSet (BSetHandle *sh, BSet src, unsigned member); unsigned hash_BSet (BSetHandle *sh, BSet src); int eq_BSet (BSetHandle *sh, BSet dst, BSet src); void pr_charBSet (BSetHandle *sh, BSet src, void (*f)(int)); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/sortidx.h0000644000175000017500000000556611412332551013443 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef SORTIDX_H #define SORTIDX_H #include #include #include #include YAZ_BEGIN_CDECL #define SORT_IDX_ENTRYSIZE 64 /** \var zebra_sort_index_t \brief sort index handle */ typedef struct zebra_sort_index *zebra_sort_index_t; #define ZEBRA_SORT_TYPE_FLAT 1 #define ZEBRA_SORT_TYPE_ISAMB 2 #define ZEBRA_SORT_TYPE_MULTI 3 /** \brief creates sort handle \param bfs block files handle \param write_flag (0=read-only, 1=write and read) \param sort_type one of ZEBRA_SORT_TYPE_.. \return sort index handle */ zebra_sort_index_t zebra_sort_open(BFiles bfs, int write_flag, int sort_type); /** \brief frees sort handle */ void zebra_sort_close(zebra_sort_index_t si); /** \brief sets type for sort usage \param si sort index handle \param type opaque type .. A sort file for each type is created */ int zebra_sort_type(zebra_sort_index_t si, int type); /** \brief sets sort system number for read / add / delete \param si sort index handle \param sysno system number */ void zebra_sort_sysno(zebra_sort_index_t si, zint sysno); /** \brief adds multi-map content to sort file \param si sort index handle \param section_id section of key \param w one or more 0-terminted strings (thus an array) zebra_sort_type and zebra_sort_sysno must be called prior to this */ void zebra_sort_add(zebra_sort_index_t si, zint section_id, WRBUF w); /** \brief delete sort entry \param si sort index handle \param section_id section of sort key to be deleted zebra_sort_type and zebra_sort_sysno must be called prior to this */ void zebra_sort_delete(zebra_sort_index_t si, zint section_id); /** \brief reads sort entry \param si sort index handle \param section_id output section ID (may be NULL and it will not be set) \param w resulting buffer \retval 0 could not be read \retval 1 could be read (found) */ int zebra_sort_read(zebra_sort_index_t si, zint *section_id, WRBUF w); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/direntz.h0000644000175000017500000000236011412332551013413 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef WIN32 /* make WIN32 version of dirent */ #include #include YAZ_BEGIN_CDECL struct dirent { char d_name[MAX_PATH]; }; typedef struct DIR DIR; DIR *opendir (const char *path); struct dirent *readdir (DIR *dd); void closedir (DIR *dd); YAZ_END_CDECL #else /* include UNIX version */ #include #include #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/su_codec.h0000644000175000017500000000214611412332551013522 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef ZEBRA_SU_CODEC_H #define ZEBRA_SU_CODEC_H #include #include YAZ_BEGIN_CDECL int key_SU_decode(int *ch, const unsigned char *out); int key_SU_encode(int ch, char *out); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/rset.h0000644000175000017500000002423011412332551012711 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef RSET_H #define RSET_H #include /* unfortunately we need the isam includes here, for the arguments for */ /* rsisamX_create */ #include #include #include YAZ_BEGIN_CDECL typedef struct rsfd *RSFD; typedef struct rset *RSET; struct ord_list { int ord; struct ord_list *next; }; struct ord_list *ord_list_create(NMEM nmem); struct ord_list *ord_list_append(NMEM nmem, struct ord_list *list, int ord); struct ord_list *ord_list_dup(NMEM nmem, struct ord_list *list); void ord_list_print(struct ord_list *list); /** * rset_term is all we need to know of a term to do ranking etc. * As far as the rsets are concerned, it is just a dummy pointer to * be passed around. */ struct rset_term { char *name; /** the term itself in internal encoding (UTF-8/raw) */ char *flags; /** flags for rank method */ int type; /** Term_type from RPN Query. Actually this is Z_Term_general, Z_Term_numeric, Z_Term_characterString, .. This info is used to return encoded term back for search-result-1 . */ int reg_type; /** register type */ RSET rset; /** the rset corresponding to this term */ void *rankpriv;/** private stuff for the ranking algorithm */ zint hits_limit;/** limit for hits if > 0 */ char *ref_id; /** reference for this term */ struct ord_list *ol; }; typedef struct rset_term *TERMID; TERMID rset_term_create (const char *name, int length, const char *flags, int type, NMEM nmem, struct ord_list *ol, int reg_type, zint hits_limit, const char *ref_id); /** rsfd is a "file descriptor" for reading from a rset */ struct rsfd { /* the stuff common to all rsfd's. */ RSET rset; /* ptr to the rset this FD is opened to */ void *priv; /* private parameters for this type */ RSFD next; /* to keep lists of used/free rsfd's */ zint counted_items; char *counted_buf; }; /** * rset_control has function pointers to all the important functions * of a rset. Each type of rset will have its own control block, pointing * to the functions for that type. They all have their own create function * which is not part of the control block, as it takes different args for * each type. */ struct rset_control { /** text description of set type (for debugging) */ char *desc; /* RSET rs_something_create(const struct rset_control *sel, ...); */ void (*f_delete)(RSET ct); /** recursively fills the terms array with terms. call with curterm=0 */ /* always counts them all into cur, but of course won't touch the term */ /* array past max. You can use this to count, set max=0 */ void (*f_getterms)(RSET ct, TERMID *terms, int maxterms, int *curterm); RSFD (*f_open)(RSET ct, int wflag); void (*f_close)(RSFD rfd); /** forward behaves like a read, but it skips some items first */ int (*f_forward)(RSFD rfd, void *buf, TERMID *term, const void *untilbuf); void (*f_pos)(RSFD rfd, double *current, double *total); /* returns -1,-1 if pos function not implemented for this type */ int (*f_read)(RSFD rfd, void *buf, TERMID *term); int (*f_write)(RSFD rfd, const void *buf); }; /** rset_default_forward implements a generic forward with a read-loop */ int rset_default_forward(RSFD rfd, void *buf, TERMID *term, const void *untilbuf); /** rset_default_read implements a generic read */ int rset_default_read(RSFD rfd, void *buf, TERMID *term); void rset_get_one_term(RSET ct,TERMID *terms,int maxterms,int *curterm); /** * key_control contains all there is to know about the keys stored in * an isam, and therefore operated by the rsets. Other than this info, * all we assume is that all keys are the same size, and they can be * memcpy'd around */ struct rset_key_control { void *context; int key_size; int scope; /* default for what level we operate (book/chapter/verse) on*/ /* usual sysno/seqno is 2 */ int (*cmp)(const void *p1, const void *p2); void (*key_logdump_txt) (int logmask, const void *p, const char *txt); zint (*getseq)(const void *p); zint (*get_segment)(const void *p); int (*filter_func)(const void *p, void *data); void *filter_data; void (*inc)(struct rset_key_control *kc); void (*dec)(struct rset_key_control *kc); /* FIXME - Should not need a getseq, it won't make much sense with */ /* higher-order keys. Use a (generalized) cmp instead, or something */ /* FIXME - decode and encode, and lots of other stuff */ }; /** * A rset is an ordered sequence of keys, either directly from an underlaying * isam, or from one of the higher-level operator rsets (and, or, ...). * Actually, it is "virtual base class", no pure rsets exist in the system, * they all are of some derived type. */ typedef struct rset { const struct rset_control *control; struct rset_key_control *keycontrol; int refcount; /* reference count */ void *priv; /* stuff private to the given type of rset */ NMEM nmem; /* nibble memory for various allocs */ RSFD free_list; /* all rfd's allocated but not currently in use */ RSFD use_list; /* all rfd's in use */ int scope; /* On what level do we count hits and compare them? */ TERMID term; /* the term thing for ranking etc */ int no_children; RSET *children; zint hits_limit; zint hits_count; zint hits_round; int hits_approx; } rset; /* rset is a "virtual base class", which will never exist on its own * all instances are rsets of some specific type, like rsisamb, or rsbool * They keep their own stuff behind the priv pointer. */ /* On the old sysno-seqno type isams, the scope was hard-coded to be 2. * This means that we count hits on the sysno level, and when matching an * 'and', we consider it a match if both term occur within the same sysno. * In more complex isams we can specify on what level we wish to do the * matching and counting of hits. For example, we can have book / chapter / * verse, and a seqno. Scope 2 means then "give me all verses that match", * 3 would be chapters, 4 books. * The resolution tells how much of the occurences we need to return. If we * are doing some sort of proximity, we need to get the seqnos of all * occurences, whereas if we are only counting hits, we do not need anything * below the scope. Again 1 is seqnos, 2 sysnos (or verses), 3 books, etc. */ RSFD rfd_create_base(RSET rs); int rfd_is_last(RSFD rfd); RSET rset_create_base(const struct rset_control *sel, NMEM nmem, struct rset_key_control *kcontrol, int scope, TERMID term, int no_children, RSET *children); void rset_delete(RSET rs); RSET rset_dup (RSET rs); void rset_close(RSFD rfd); #define RSETF_READ 0 #define RSETF_WRITE 1 /* RSFD rset_open(RSET rs, int wflag); */ #define rset_open(rs, wflag) (*(rs)->control->f_open)((rs), (wflag)) /* int rset_forward(RSFD rfd, void *buf, TERMID term, void *untilbuf); */ #define rset_forward(rfd, buf, term, untilbuf) \ rset_default_forward((rfd), (buf), (term), (untilbuf)) /* void rset_getterms(RSET ct, TERMID *terms, int maxterms, int *curterm); */ #define rset_getterms(ct, terms, maxterms, curterm) \ (*(ct)->control->f_getterms)((ct),(terms),(maxterms),(curterm)) /* int rset_pos(RSFD fd, double *current, double *total); */ #define rset_pos(rfd,cur,tot) \ (*(rfd)->rset->control->f_pos)((rfd),(cur),(tot)) /* int rset_read(RSFD rfd, void *buf, TERMID term); */ #define rset_read(rfd, buf, term) rset_default_read((rfd), (buf), (term)) /* int rset_write(RSFD rfd, const void *buf); */ #define rset_write(rfd, buf) (*(rfd)->rset->control->f_write)((rfd), (buf)) /* int rset_type (RSET) */ #define rset_type(rs) ((rs)->control->desc) /** rset_count counts or estimates the keys in it*/ zint rset_count(RSET rs); RSET rset_create_temp(NMEM nmem, struct rset_key_control *kcontrol, int scope, const char *temp_path, TERMID term); RSET rset_create_null(NMEM nmem, struct rset_key_control *kcontrol, TERMID term); RSET rset_create_not(NMEM nmem, struct rset_key_control *kcontrol, int scope, RSET rset_l, RSET rset_r); RSET rset_create_between(NMEM nmem, struct rset_key_control *kcontrol, int scope, RSET rset_l, RSET rset_m, RSET rset_r, RSET rset_attr); RSET rset_create_or(NMEM nmem, struct rset_key_control *kcontrol, int scope, TERMID termid, int no_rsets, RSET* rsets); RSET rset_create_and(NMEM nmem, struct rset_key_control *kcontrol, int scope, int no_rsets, RSET* rsets); RSET rset_create_prox(NMEM nmem, struct rset_key_control *kcontrol, int scope, int rset_no, RSET *rset, int ordered, int exclusion, int relation, int distance); RSET rsisamb_create(NMEM nmem, struct rset_key_control *kcontrol, int scope, ISAMB is, ISAM_P pos, TERMID term); RSET rsisamc_create(NMEM nmem, struct rset_key_control *kcontrol, int scope, ISAMC is, ISAM_P pos, TERMID term); RSET rsisams_create(NMEM nmem, struct rset_key_control *kcontrol, int scope, ISAMS is, ISAM_P pos, TERMID term); void rset_visit(RSET rset, int level); void rset_set_hits_limit(RSET rs, zint l); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/Makefile.in0000644000175000017500000004265111412336424013642 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = include DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ noinst_HEADERS = bset.h charmap.h \ direntz.h passwddb.h dfa.h zebra_xpath.h d1_absyn.h \ rset.h dfaset.h sortidx.h zebra-lock.h attrfind.h zebramap.h \ it_key.h su_codec.h zebra_strmap.h SUBDIRS = idzebra all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(HEADERS) installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/include/attrfind.h0000644000175000017500000000270711412332551013554 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef ATTRFIND_H #define ATTRFIND_H #include #include YAZ_BEGIN_CDECL typedef struct { int type; int major; int minor; Z_AttributeElement **attributeList; int num_attributes; } AttrType; void attr_init_APT(AttrType *src, Z_AttributesPlusTerm *zapt, int type); void attr_init_AttrList(AttrType *src, Z_AttributeList *list, int type); int attr_find_ex(AttrType *src, const Odr_oid **attribute_set_oid, const char **string_value); int attr_find(AttrType *src, const Odr_oid **attribute_set_oid); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/dfaset.h0000644000175000017500000000352011412332551013201 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef DFASET_H #define DFASET_H #include YAZ_BEGIN_CDECL typedef struct DFASetElement_ { struct DFASetElement_ *next; int value; } DFASetElement, *DFASet; typedef struct { DFASet alloclist; DFASet freelist; long used; int chunk; } *DFASetType; DFASetType mk_DFASetType (int chunk); int inf_DFASetType(DFASetType st, long *used, long *allocated); DFASetType rm_DFASetType (DFASetType st); DFASet mk_DFASet (DFASetType st); DFASet add_DFASet (DFASetType st, DFASet s, int value); DFASet merge_DFASet (DFASetType st, DFASet s1, DFASet s2); DFASet union_DFASet (DFASetType st, DFASet s1, DFASet s2); DFASet rm_DFASet (DFASetType st, DFASet s); DFASet cp_DFASet (DFASetType st, DFASet s); void pr_DFASet (DFASetType st, DFASet s); unsigned hash_DFASet (DFASetType st, DFASet s); int eq_DFASet (DFASetType s, DFASet s1, DFASet s2); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/include/zebra-lock.h0000644000175000017500000000472611412332551013775 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef ZEBRA_LOCK_H #define ZEBRA_LOCK_H #ifdef WIN32 #include #endif #if YAZ_POSIX_THREADS #include #endif #include YAZ_BEGIN_CDECL typedef struct { #ifdef WIN32 CRITICAL_SECTION mutex; #else # if YAZ_POSIX_THREADS pthread_mutex_t mutex; # else int dummy; # endif #endif int state; } Zebra_mutex; YAZ_EXPORT int zebra_mutex_init (Zebra_mutex *p); YAZ_EXPORT int zebra_mutex_destroy (Zebra_mutex *p); YAZ_EXPORT int zebra_mutex_lock (Zebra_mutex *p); YAZ_EXPORT int zebra_mutex_unlock (Zebra_mutex *p); typedef struct { int readers_reading; int writers_writing; #if YAZ_POSIX_THREADS pthread_mutex_t mutex; pthread_cond_t lock_free; #endif } Zebra_lock_rdwr; YAZ_EXPORT int zebra_lock_rdwr_init (Zebra_lock_rdwr *p); YAZ_EXPORT int zebra_lock_rdwr_destroy (Zebra_lock_rdwr *p); YAZ_EXPORT int zebra_lock_rdwr_rlock (Zebra_lock_rdwr *p); YAZ_EXPORT int zebra_lock_rdwr_wlock (Zebra_lock_rdwr *p); YAZ_EXPORT int zebra_lock_rdwr_runlock (Zebra_lock_rdwr *p); YAZ_EXPORT int zebra_lock_rdwr_wunlock (Zebra_lock_rdwr *p); typedef struct { #if YAZ_POSIX_THREADS pthread_mutex_t mutex; pthread_cond_t cond; #else int dummy; #endif } Zebra_mutex_cond; YAZ_EXPORT int zebra_mutex_cond_init (Zebra_mutex_cond *p); YAZ_EXPORT int zebra_mutex_cond_destroy (Zebra_mutex_cond *p); YAZ_EXPORT int zebra_mutex_cond_lock (Zebra_mutex_cond *p); YAZ_EXPORT int zebra_mutex_cond_unlock (Zebra_mutex_cond *p); YAZ_EXPORT int zebra_mutex_cond_wait (Zebra_mutex_cond *p); YAZ_EXPORT int zebra_mutex_cond_signal (Zebra_mutex_cond *p); YAZ_END_CDECL #endif /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/buildconf.sh0000755000175000017500000000544311412332551012451 00000000000000#!/bin/sh automake=automake aclocal=aclocal autoconf=autoconf libtoolize=libtoolize autoheader=autoheader test -d config || mkdir config if [ -d .git ]; then git submodule init git submodule update fi if [ "`uname -s`" = FreeBSD ]; then # FreeBSD intalls the various auto* tools with version numbers echo "Using special configuration for FreeBSD ..." automake=automake19 aclocal="aclocal19 -I /usr/local/share/aclocal" autoconf=autoconf259 libtoolize=libtoolize15 autoheader=autoheader259 fi if [ "`uname -s`" = Darwin ]; then echo "Using special configuration for Darwin/MacOS ..." libtoolize=glibtoolize fi if $automake --version|head -1 |grep '1\.[4-7]'; then echo "automake 1.4-1.7 is active. You should use automake 1.8 or later" if [ -f /etc/debian_version ]; then echo " sudo apt-get install automake1.9" echo " sudo update-alternatives --config automake" fi exit 1 fi set -x $aclocal -I m4 if grep AC_CONFIG_HEADERS configure.ac >/dev/null; then $autoheader fi $libtoolize --automake --force $automake --add-missing $autoconf set - if [ -f config.cache ]; then rm config.cache fi enable_configure=false enable_help=true sh_flags="" conf_flags="" case $1 in -d) sh_cflags="-g -Wall -Wdeclaration-after-statement -Wstrict-prototypes" sh_cxxflags="-g -Wall" enable_configure=true enable_help=false shift ;; -c) sh_cflags="" sh_cxxflags="" enable_configure=true enable_help=false shift ;; esac if $enable_configure; then if [ -n "$sh_cflags" ]; then CFLAGS="$sh_cflags" CXXFLAGS="$sh_cxxflags" ./configure --disable-shared --enable-static $* else ./configure $* fi fi if $enable_help; then cat < #include #include #include #include #include #ifndef RSET_DEBUG #define RSET_DEBUG 0 #endif static RSFD r_open(RSET ct, int flag); static void r_close(RSFD rfd); static void r_delete(RSET ct); static int r_forward(RSFD rfd, void *buf, TERMID *term, const void *untilbuf); static int r_read(RSFD rfd, void *buf, TERMID *term); static int r_write(RSFD rfd, const void *buf); static void r_pos(RSFD rfd, double *current, double *total); static void r_get_terms(RSET ct, TERMID *terms, int maxterms, int *curterm); static const struct rset_control control = { "prox", r_delete, r_get_terms, r_open, r_close, r_forward, r_pos, r_read, r_write, }; struct rset_prox_info { int ordered; int exclusion; int relation; int distance; }; struct rset_prox_rfd { RSFD *rfd; char **buf; /* lookahead key buffers */ char *more; /* more in each lookahead? */ TERMID *terms; /* lookahead terms */ zint hits; }; RSET rset_create_prox(NMEM nmem, struct rset_key_control *kcontrol, int scope, int rset_no, RSET *rset, int ordered, int exclusion, int relation, int distance) { RSET rnew = rset_create_base(&control, nmem, kcontrol, scope, 0, rset_no, rset); struct rset_prox_info *info; info = (struct rset_prox_info *) nmem_malloc(rnew->nmem,sizeof(*info)); info->ordered = ordered; info->exclusion = exclusion; info->relation = relation; info->distance = distance; rnew->priv = info; return rnew; } static void r_delete(RSET ct) { } static RSFD r_open(RSET ct, int flag) { RSFD rfd; struct rset_prox_rfd *p; int i; if (flag & RSETF_WRITE) { yaz_log(YLOG_FATAL, "prox set type is read-only"); return NULL; } rfd = rfd_create_base(ct); if (rfd->priv) p = (struct rset_prox_rfd *)(rfd->priv); else { p = (struct rset_prox_rfd *) nmem_malloc(ct->nmem,sizeof(*p)); rfd->priv = p; p->more = nmem_malloc(ct->nmem,sizeof(*p->more) * ct->no_children); p->buf = nmem_malloc(ct->nmem,sizeof(*p->buf) * ct->no_children); p->terms = nmem_malloc(ct->nmem,sizeof(*p->terms) * ct->no_children); for (i = 0; i < ct->no_children; i++) { p->buf[i] = nmem_malloc(ct->nmem,ct->keycontrol->key_size); p->terms[i] = 0; } p->rfd = nmem_malloc(ct->nmem,sizeof(*p->rfd) * ct->no_children); } yaz_log(YLOG_DEBUG,"rsprox (%s) open [%p] n=%d", ct->control->desc, rfd, ct->no_children); for (i = 0; i < ct->no_children; i++) { p->rfd[i] = rset_open(ct->children[i], RSETF_READ); p->more[i] = rset_read(p->rfd[i], p->buf[i], &p->terms[i]); } p->hits = 0; return rfd; } static void r_close(RSFD rfd) { RSET ct = rfd->rset; struct rset_prox_rfd *p = (struct rset_prox_rfd *)(rfd->priv); int i; for (i = 0; i < ct->no_children; i++) rset_close(p->rfd[i]); } static int r_forward(RSFD rfd, void *buf, TERMID *term, const void *untilbuf) { RSET ct = rfd->rset; struct rset_prox_info *info = (struct rset_prox_info *)(ct->priv); struct rset_prox_rfd *p = (struct rset_prox_rfd *)(rfd->priv); const struct rset_key_control *kctrl = ct->keycontrol; int cmp = 0; int i; if (untilbuf) { /* it is enough to forward first one. Other will follow. */ if (p->more[0] && /* was: cmp >=2 */ ((kctrl->cmp)(untilbuf, p->buf[0]) >= rfd->rset->scope) ) p->more[0] = rset_forward(p->rfd[0], p->buf[0], &p->terms[0], untilbuf); } if (info->ordered && info->relation <= 3 && info->exclusion == 0) { while (p->more[0]) { for (i = 1; i < ct->no_children; i++) { if (!p->more[i]) { p->more[0] = 0; /* saves us a goto out of while loop. */ break; } cmp = (*kctrl->cmp)(p->buf[i], p->buf[i-1]); if (cmp >= rfd->rset->scope) /* not same record */ { p->more[i-1] = rset_forward(p->rfd[i-1], p->buf[i-1], &p->terms[i-1], p->buf[i]); break; } else if (cmp > 0) /* within record and ordered */ { zint diff = (*kctrl->getseq)(p->buf[i]) - (*kctrl->getseq)(p->buf[i-1]); if (info->relation == 3 && diff == info->distance) continue; else if (info->relation == 2 && diff <= info->distance) continue; else if (info->relation == 1 && diff < info->distance) continue; p->more[i-1] = rset_read(p->rfd[i-1], p->buf[i-1], &p->terms[i-1]); break; } else /* within record - wrong order */ { p->more[i] = rset_forward(p->rfd[i], p->buf[i], &p->terms[i], p->buf[i-1]); break; } } if (i == ct->no_children) { i = ct->no_children-1; memcpy(buf, p->buf[i], kctrl->key_size); if (term) *term = p->terms[i]; p->more[i] = rset_read(p->rfd[i], p->buf[i], &p->terms[i]); p->hits++; return 1; } } } else if (ct->no_children == 2) { while (p->more[0] && p->more[1]) { int cmp = (*kctrl->cmp)(p->buf[0], p->buf[1]); if ( cmp <= - rfd->rset->scope) /* cmp<-1*/ p->more[0] = rset_forward(p->rfd[0], p->buf[0], &p->terms[0],p->buf[1]); else if ( cmp >= rfd->rset->scope ) /* cmp>1 */ p->more[1] = rset_forward(p->rfd[1], p->buf[1], &p->terms[1],p->buf[0]); else { zint seqno[500]; /* FIXME - why 500 ?? */ int n = 0; seqno[n++] = (*kctrl->getseq)(p->buf[0]); while ((p->more[0] = rset_read(p->rfd[0], p->buf[0], &p->terms[0]))) { cmp = (*kctrl->cmp)(p->buf[0], p->buf[1]); if (cmp <= - rfd->rset->scope || cmp >= rfd->rset->scope) break; if (n < 500) seqno[n++] = (*kctrl->getseq)(p->buf[0]); } /* set up return buffer.. (save buf[1]) */ memcpy(buf, p->buf[1], kctrl->key_size); if (term) *term = p->terms[1]; while (1) { for (i = 0; i < n; i++) { zint diff = (*kctrl->getseq)(p->buf[1]) - seqno[i]; int excl = info->exclusion; if (!info->ordered && diff < 0) diff = -diff; switch (info->relation) { case 1: /* < */ if (diff < info->distance && diff >= 0) excl = !excl; break; case 2: /* <= */ if (diff <= info->distance && diff >= 0) excl = !excl; break; case 3: /* == */ if (diff == info->distance && diff >= 0) excl = !excl; break; case 4: /* >= */ if (diff >= info->distance && diff >= 0) excl = !excl; break; case 5: /* > */ if (diff > info->distance && diff >= 0) excl = !excl; break; case 6: /* != */ if (diff != info->distance && diff >= 0) excl = !excl; break; } if (excl) { p->more[1] = rset_read( p->rfd[1], p->buf[1], &p->terms[1]); p->hits++; return 1; } } p->more[1] = rset_read(p->rfd[1], p->buf[1], &p->terms[1]); if (!p->more[1]) break; cmp = (*kctrl->cmp)(buf, p->buf[1]); if (cmp <= - rfd->rset->scope || cmp >= rfd->rset->scope) break; } } } } return 0; } static int r_read(RSFD rfd, void *buf, TERMID *term) { return r_forward(rfd, buf, term, 0); } static int r_write(RSFD rfd, const void *buf) { yaz_log(YLOG_FATAL, "prox set type is read-only"); return -1; } static void r_pos(RSFD rfd, double *current, double *total) { RSET ct = rfd->rset; struct rset_prox_rfd *p = (struct rset_prox_rfd *)(rfd->priv); int i; double r = 0.0; double cur, tot = -1.0; double scur = 0.0, stot = 0.0; yaz_log(YLOG_DEBUG, "rsprox_pos"); for (i = 0; i < ct->no_children; i++) { rset_pos(p->rfd[i], &cur, &tot); if (tot > 0) { scur += cur; stot += tot; } } if (tot < 0) { /* nothing found */ *current = -1; *total = -1; } else if (tot < 1) { /* most likely tot==0 */ *current = 0; *total = 0; } else { r = scur/stot; *current = (double) p->hits; *total = *current/r ; } yaz_log(YLOG_DEBUG,"prox_pos: [%d] %0.1f/%0.1f= %0.4f ", i,*current, *total, r); } static void r_get_terms(RSET ct, TERMID *terms, int maxterms, int *curterm) { int i; for (i = 0; i < ct->no_children; i++) rset_getterms(ct->children[i], terms, maxterms, curterm); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/rset/rstemp.c0000644000175000017500000002325711412332551012603 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #ifdef WIN32 #include #endif #if HAVE_UNISTD_H #include #endif #include #include #include static RSFD r_open(RSET ct, int flag); static void r_close(RSFD rfd); static void r_delete(RSET ct); static int r_read(RSFD rfd, void *buf, TERMID *term); static int r_write(RSFD rfd, const void *buf); static void r_pos(RSFD rfd, double *current, double *total); static void r_flush(RSFD rfd, int mk); static void r_reread(RSFD rfd); static const struct rset_control control = { "temp", r_delete, rset_get_one_term, r_open, r_close, 0, /* no forward */ r_pos, r_read, r_write, }; struct rset_private { int fd; /* file descriptor for temp file */ char *fname; /* name of temp file */ char *buf_mem; /* window buffer */ size_t buf_size; /* size of window */ size_t pos_end; /* last position in set */ size_t pos_buf; /* position of first byte in window */ size_t pos_border; /* position of last byte+1 in window */ int dirty; /* window is dirty */ zint hits; /* no of hits */ char *temp_path; }; struct rfd_private { void *buf; size_t pos_cur; /* current position in set */ /* FIXME - term pos or what ?? */ zint cur; /* number of the current hit */ }; static int log_level = 0; static int log_level_initialized = 0; RSET rset_create_temp(NMEM nmem, struct rset_key_control *kcontrol, int scope, const char *temp_path, TERMID term) { RSET rnew = rset_create_base(&control, nmem, kcontrol, scope, term, 0, 0); struct rset_private *info; if (!log_level_initialized) { log_level = yaz_log_module_level("rstemp"); log_level_initialized = 1; } info = (struct rset_private *) nmem_malloc(rnew->nmem, sizeof(*info)); info->fd = -1; info->fname = NULL; info->buf_size = 4096; info->buf_mem = (char *) nmem_malloc(rnew->nmem, info->buf_size); info->pos_end = 0; info->pos_buf = 0; info->dirty = 0; info->hits = 0; if (!temp_path) info->temp_path = NULL; else info->temp_path = nmem_strdup(rnew->nmem, temp_path); rnew->priv = info; return rnew; } /* rstemp_create */ static void r_delete(RSET ct) { struct rset_private *info = (struct rset_private*) ct->priv; yaz_log(log_level, "r_delete: set size %ld", (long) info->pos_end); if (info->fname) { yaz_log(log_level, "r_delete: unlink %s", info->fname); unlink(info->fname); } } static RSFD r_open(RSET ct, int flag) { struct rset_private *info = (struct rset_private *) ct->priv; RSFD rfd; struct rfd_private *prfd; if (info->fd == -1 && info->fname) { if (flag & RSETF_WRITE) info->fd = open(info->fname, O_BINARY|O_RDWR|O_CREAT, 0666); else info->fd = open(info->fname, O_BINARY|O_RDONLY); if (info->fd == -1) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "rstemp: open failed %s", info->fname); zebra_exit("r_open"); } } rfd = rfd_create_base(ct); if (!rfd->priv) { prfd = (struct rfd_private *) nmem_malloc(ct->nmem, sizeof(*prfd)); rfd->priv = (void *)prfd; prfd->buf = nmem_malloc(ct->nmem,ct->keycontrol->key_size); } else prfd= rfd->priv; r_flush(rfd, 0); prfd->pos_cur = 0; info->pos_buf = 0; r_reread(rfd); prfd->cur = 0; return rfd; } /* r_flush: flush current window to file if file is assocated with set */ static void r_flush(RSFD rfd, int mk) { struct rset_private *info = rfd->rset->priv; if (!info->fname && mk) { #if HAVE_MKSTEMP char template[1024]; *template = '\0'; if (info->temp_path) sprintf(template, "%s/", info->temp_path); strcat(template, "zrs_"); #if HAVE_UNISTD_H sprintf(template + strlen(template), "%ld_", (long) getpid()); #endif strcat(template, "XXXXXX"); info->fd = mkstemp(template); if (info->fd == -1) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "rstemp: mkstemp %s", template); zebra_exit("r_flush"); } info->fname = nmem_strdup(rfd->rset->nmem, template); #else char *s = (char*) tempnam(info->temp_path, "zrs"); info->fname= nmem_strdup(rfd->rset->nmem, s); yaz_log(log_level, "creating tempfile %s", info->fname); info->fd = open(info->fname, O_BINARY|O_RDWR|O_CREAT, 0666); if (info->fd == -1) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "rstemp: open %s", info->fname); zebra_exit("r_flush"); } #endif } if (info->fname && info->fd != -1 && info->dirty) { size_t count; int r; if (lseek(info->fd, info->pos_buf, SEEK_SET) == -1) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "rstemp: lseek (1) %s", info->fname); zebra_exit("r_flusxh"); } count = info->buf_size; if (count > info->pos_end - info->pos_buf) count = info->pos_end - info->pos_buf; if ((r = write(info->fd, info->buf_mem, count)) < (int) count) { if (r == -1) yaz_log(YLOG_FATAL|YLOG_ERRNO, "rstemp: write %s", info->fname); else yaz_log(YLOG_FATAL, "rstemp: write of %ld but got %ld", (long) count, (long) r); zebra_exit("r_flush"); } info->dirty = 0; } } static void r_close(RSFD rfd) { struct rset_private *info = (struct rset_private *)rfd->rset->priv; if (rfd_is_last(rfd)) { r_flush(rfd, 0); if (info->fname && info->fd != -1) { close(info->fd); info->fd = -1; } } } /* r_reread: read from file to window if file is assocated with set - indicated by fname */ static void r_reread(RSFD rfd) { struct rfd_private *mrfd = (struct rfd_private*) rfd->priv; struct rset_private *info = (struct rset_private *)rfd->rset->priv; if (info->fname) { size_t count; int r; info->pos_border = mrfd->pos_cur + info->buf_size; if (info->pos_border > info->pos_end) info->pos_border = info->pos_end; count = info->pos_border - info->pos_buf; if (count > 0) { if (lseek(info->fd, info->pos_buf, SEEK_SET) == -1) { yaz_log(YLOG_FATAL|YLOG_ERRNO, "rstemp: lseek (2) %s fd=%d", info->fname, info->fd); zebra_exit("r_reread"); } if ((r = read(info->fd, info->buf_mem, count)) < (int) count) { if (r == -1) yaz_log(YLOG_FATAL|YLOG_ERRNO, "rstemp: read %s", info->fname); else yaz_log(YLOG_FATAL, "read of %ld but got %ld", (long) count, (long) r); zebra_exit("r_reread"); } } } else info->pos_border = info->pos_end; } static int r_read(RSFD rfd, void *buf, TERMID *term) { struct rfd_private *mrfd = (struct rfd_private*) rfd->priv; struct rset_private *info = (struct rset_private *)rfd->rset->priv; size_t nc = mrfd->pos_cur + rfd->rset->keycontrol->key_size; if (mrfd->pos_cur < info->pos_buf || nc > info->pos_border) { if (nc > info->pos_end) return 0; r_flush(rfd, 0); info->pos_buf = mrfd->pos_cur; r_reread(rfd); } memcpy(buf, info->buf_mem + (mrfd->pos_cur - info->pos_buf), rfd->rset->keycontrol->key_size); if (term) *term = rfd->rset->term; /* FIXME - should we store and return terms ?? */ mrfd->pos_cur = nc; mrfd->cur++; return 1; } static int r_write(RSFD rfd, const void *buf) { struct rfd_private *mrfd = (struct rfd_private*) rfd->priv; struct rset_private *info = (struct rset_private *)rfd->rset->priv; size_t nc = mrfd->pos_cur + rfd->rset->keycontrol->key_size; if (nc > info->pos_buf + info->buf_size) { r_flush(rfd, 1); info->pos_buf = mrfd->pos_cur; if (info->pos_buf < info->pos_end) r_reread(rfd); } info->dirty = 1; memcpy(info->buf_mem + (mrfd->pos_cur - info->pos_buf), buf, rfd->rset->keycontrol->key_size); mrfd->pos_cur = nc; if (nc > info->pos_end) info->pos_border = info->pos_end = nc; info->hits++; return 1; } static void r_pos(RSFD rfd, double *current, double *total) { struct rfd_private *mrfd = (struct rfd_private*) rfd->priv; struct rset_private *info = (struct rset_private *)rfd->rset->priv; *current = (double) mrfd->cur; *total = (double) info->hits; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/rset/rsnull.c0000644000175000017500000000443611412332551012606 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include static RSFD r_open(RSET ct, int flag); static void r_close(RSFD rfd); static void r_delete(RSET ct); static void r_pos(RSFD rfd, double *current, double *total); static int r_read(RSFD rfd, void *buf, TERMID *term); static int r_write(RSFD rfd, const void *buf); static const struct rset_control control = { "null", r_delete, rset_get_one_term, r_open, r_close, 0, /* no forward */ r_pos, r_read, r_write, }; RSET rset_create_null(NMEM nmem, struct rset_key_control *kcontrol, TERMID term) { RSET rnew = rset_create_base(&control, nmem, kcontrol, 0, term, 0, 0); rnew->priv = 0; return rnew; } static RSFD r_open(RSET ct, int flag) { RSFD rfd; if (flag & RSETF_WRITE) { yaz_log (YLOG_FATAL, "NULL set type is read-only"); return NULL; } rfd = rfd_create_base(ct); rfd->priv = 0; return rfd; } static void r_close(RSFD rfd) { } static void r_delete(RSET ct) { } static void r_pos(RSFD rfd, double *current, double *total) { assert(rfd); assert(current); assert(total); *total = 0; *current = 0; } static int r_read(RSFD rfd, void *buf, TERMID *term) { if (term) *term = 0; return 0; } static int r_write(RSFD rfd, const void *buf) { yaz_log(YLOG_FATAL, "NULL set type is read-only"); return -1; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/rset/rsbetween.c0000644000175000017500000002332611412332551013264 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* rsbetween is (mostly) used for xml searches. It returns the hits of the * "middle" rset, that are in between the "left" and "right" rsets. For * example "Shakespeare" in between "" and . The thing is * complicated by the inclusion of attributes (from their own rset). If attrs * specified, they must match the "left" rset (start tag). "Hamlet" between * "" and "". (This assumes that the attributes are * indexed to the same seqno as the tags). * */ #include #include #include #include #include #include static RSFD r_open(RSET ct, int flag); static void r_close(RSFD rfd); static void r_delete(RSET ct); static int r_forward(RSFD rfd, void *buf, TERMID *term, const void *untilbuf); static int r_read(RSFD rfd, void *buf, TERMID *term ); static int r_write(RSFD rfd, const void *buf); static void r_pos(RSFD rfd, double *current, double *total); static void r_get_terms(RSET ct, TERMID *terms, int maxterms, int *curterm); static const struct rset_control control = { "between", r_delete, r_get_terms, r_open, r_close, r_forward, r_pos, r_read, r_write, }; #define STARTTAG 0 #define HIT 1 #define STOPTAG 2 #define ATTRTAG 3 struct rset_between_info { TERMID startterm; /* pseudo terms for detecting which one we read from */ TERMID stopterm; TERMID attrterm; }; struct rset_between_rfd { RSFD andrfd; void *recbuf; /* a key that tells which record we are in */ void *startbuf; /* the start tag */ int startbufok; /* we have seen the first start tag */ void *attrbuf; /* the attr tag. If these two match, we have attr match */ int attrbufok; /* we have seen the first attr tag, can compare */ int depth; /* number of start-tags without end-tags */ int attrdepth; /* on what depth the attr matched */ zint hits; }; static int log_level = 0; static int log_level_initialized = 0; /* make sure that the rset has a term attached. If not, create one */ /* we need these terms for the tags, to distinguish what we read */ static void checkterm(RSET rs, char *tag, NMEM nmem) { if (!rs->term) { rs->term = rset_term_create(tag, -1, "", 0, nmem, 0, 0, 0, 0); rs->term->rset = rs; } } RSET rset_create_between(NMEM nmem, struct rset_key_control *kcontrol, int scope, RSET rset_l, RSET rset_m, RSET rset_r, RSET rset_attr) { RSET rnew = rset_create_base(&control, nmem, kcontrol, scope, 0, 0, 0); struct rset_between_info *info= (struct rset_between_info *) nmem_malloc(rnew->nmem,sizeof(*info)); RSET rsetarray[4]; int n = 4; if (!log_level_initialized) { log_level = yaz_log_module_level("rsbetween"); log_level_initialized = 1; } rsetarray[STARTTAG] = rset_l; rsetarray[HIT] = rset_m; rsetarray[STOPTAG] = rset_r; rsetarray[ATTRTAG] = rset_attr; /* make sure we have decent terms for all rsets. Create dummies if needed*/ checkterm(rsetarray[STARTTAG], "(start)", nmem); checkterm(rsetarray[STOPTAG], "(start)", nmem); info->startterm = rsetarray[STARTTAG]->term; info->stopterm = rsetarray[STOPTAG]->term; if (rset_attr) { checkterm(rsetarray[ATTRTAG], "(start)", nmem); info->attrterm = rsetarray[ATTRTAG]->term; n = 4; } else { info->attrterm = NULL; n = 3; } rnew->no_children = 1; rnew->children = nmem_malloc(rnew->nmem, sizeof(RSET *)); rnew->children[0] = rset_create_and(nmem, kcontrol, scope, n, rsetarray); rnew->priv = info; yaz_log(log_level, "create rset at %p", rnew); return rnew; } static void r_delete(RSET ct) { } static RSFD r_open(RSET ct, int flag) { RSFD rfd; struct rset_between_rfd *p; if (flag & RSETF_WRITE) { yaz_log(YLOG_FATAL, "between set type is read-only"); return NULL; } rfd = rfd_create_base(ct); if (rfd->priv) p=(struct rset_between_rfd *)rfd->priv; else { p = (struct rset_between_rfd *) nmem_malloc(ct->nmem, (sizeof(*p))); rfd->priv = p; p->recbuf = nmem_malloc(ct->nmem, ct->keycontrol->key_size); p->startbuf = nmem_malloc(ct->nmem, ct->keycontrol->key_size); p->attrbuf = nmem_malloc(ct->nmem, ct->keycontrol->key_size); } p->andrfd = rset_open(ct->children[0], RSETF_READ); p->hits = -1; p->depth = 0; p->attrdepth = 0; p->attrbufok = 0; p->startbufok = 0; yaz_log(log_level, "open rset=%p rfd=%p", ct, rfd); return rfd; } static void r_close(RSFD rfd) { struct rset_between_rfd *p=(struct rset_between_rfd *)rfd->priv; yaz_log(log_level,"close rfd=%p", rfd); rset_close(p->andrfd); } static int r_forward(RSFD rfd, void *buf, TERMID *term, const void *untilbuf) { struct rset_between_rfd *p=(struct rset_between_rfd *)rfd->priv; int rc; yaz_log(log_level, "forwarding "); rc = rset_forward(p->andrfd,buf,term,untilbuf); return rc; } static void checkattr(RSFD rfd) { struct rset_between_info *info =(struct rset_between_info *) rfd->rset->priv; struct rset_between_rfd *p = (struct rset_between_rfd *)rfd->priv; const struct rset_key_control *kctrl = rfd->rset->keycontrol; int cmp; if (p->attrdepth) return; /* already found one */ if (!info->attrterm) { p->attrdepth=-1; /* matches always */ return; } if ( p->startbufok && p->attrbufok ) { /* have buffers to compare */ cmp=(kctrl->cmp)(p->startbuf,p->attrbuf); if (0==cmp) /* and the keys match */ { p->attrdepth = p->depth; yaz_log(log_level, "found attribute match at depth %d",p->attrdepth); } } } static int r_read(RSFD rfd, void *buf, TERMID *term) { struct rset_between_info *info = (struct rset_between_info *)rfd->rset->priv; struct rset_between_rfd *p = (struct rset_between_rfd *)rfd->priv; const struct rset_key_control *kctrl = rfd->rset->keycontrol; int cmp; TERMID dummyterm = 0; yaz_log(log_level, "== read: term=%p",term); if (!term) term = &dummyterm; while (rset_read(p->andrfd, buf, term)) { yaz_log(log_level,"read loop term=%p d=%d ad=%d", *term, p->depth, p->attrdepth); if (p->hits<0) {/* first time? */ memcpy(p->recbuf, buf, kctrl->key_size); p->hits = 0; cmp = rfd->rset->scope; /* force newrecord */ } else { cmp = (kctrl->cmp)(buf, p->recbuf); yaz_log(log_level, "cmp=%d", cmp); } if (cmp>=rfd->rset->scope) { yaz_log(log_level, "new record"); p->depth = 0; p->attrdepth = 0; memcpy(p->recbuf, buf, kctrl->key_size); } if (*term) yaz_log(log_level, " term: '%s'", (*term)->name); if (*term==info->startterm) { p->depth++; yaz_log(log_level, "read start tag. d=%d", p->depth); memcpy(p->startbuf, buf, kctrl->key_size); p->startbufok = 1; checkattr(rfd); /* in case we already saw the attr here */ } else if (*term==info->stopterm) { if (p->depth == p->attrdepth) p->attrdepth = 0; /* ending the tag with attr match */ p->depth--; yaz_log(log_level,"read end tag. d=%d ad=%d", p->depth, p->attrdepth); } else if (*term==info->attrterm) { yaz_log(log_level,"read attr"); memcpy(p->attrbuf, buf, kctrl->key_size); p->attrbufok = 1; checkattr(rfd); /* in case the start tag came first */ } else { /* mut be a real hit */ if (p->depth && p->attrdepth) { p->hits++; yaz_log(log_level,"got a hit h="ZINT_FORMAT" d=%d ad=%d", p->hits, p->depth, p->attrdepth); return 1; /* we have everything in place already! */ } else yaz_log(log_level, "Ignoring hit. h="ZINT_FORMAT" d=%d ad=%d", p->hits, p->depth, p->attrdepth); } } /* while read */ return 0; } /* r_read */ static int r_write(RSFD rfd, const void *buf) { yaz_log(YLOG_FATAL, "between set type is read-only"); return -1; } static void r_pos(RSFD rfd, double *current, double *total) { struct rset_between_rfd *p=(struct rset_between_rfd *)rfd->priv; rset_pos(p->andrfd, current, total); yaz_log(log_level, "pos: %0.1f/%0.1f ", *current, *total); } static void r_get_terms(RSET ct, TERMID *terms, int maxterms, int *curterm) { rset_getterms(ct->children[0], terms, maxterms, curterm); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/rset/rsbool.c0000644000175000017500000001673611412332551012575 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #ifndef RSET_DEBUG #define RSET_DEBUG 0 #endif static RSFD r_open(RSET ct, int flag); static void r_close(RSFD rfd); static void r_delete(RSET ct); static int r_forward(RSFD rfd, void *buf, TERMID *term, const void *untilbuf); static void r_pos(RSFD rfd, double *current, double *total); static int r_read_not(RSFD rfd, void *buf, TERMID *term); static int r_write(RSFD rfd, const void *buf); static void r_get_terms(RSET ct, TERMID *terms, int maxterms, int *curterm); static const struct rset_control control_not = { "not", r_delete, r_get_terms, r_open, r_close, r_forward, r_pos, r_read_not, r_write, }; struct rset_private { RSET rset_l; RSET rset_r; }; struct rfd_private { zint hits; RSFD rfd_l; RSFD rfd_r; int more_l; int more_r; void *buf_l; void *buf_r; TERMID term_l; TERMID term_r; int tail; }; static RSET rsbool_create_base(const struct rset_control *ctrl, NMEM nmem, struct rset_key_control *kcontrol, int scope, RSET rset_l, RSET rset_r) { RSET children[2], rnew; struct rset_private *info; children[0] = rset_l; children[1] = rset_r; rnew = rset_create_base(ctrl, nmem, kcontrol, scope, 0, 2, children); info = (struct rset_private *) nmem_malloc(rnew->nmem, sizeof(*info)); info->rset_l = rset_l; info->rset_r = rset_r; rnew->priv = info; return rnew; } RSET rset_create_not(NMEM nmem, struct rset_key_control *kcontrol, int scope, RSET rset_l, RSET rset_r) { return rsbool_create_base(&control_not, nmem, kcontrol, scope, rset_l, rset_r); } static void r_delete(RSET ct) { } static RSFD r_open(RSET ct, int flag) { struct rset_private *info = (struct rset_private *) ct->priv; RSFD rfd; struct rfd_private *p; if (flag & RSETF_WRITE) { yaz_log(YLOG_FATAL, "bool set type is read-only"); return NULL; } rfd = rfd_create_base(ct); if (rfd->priv) p = (struct rfd_private *)rfd->priv; else { p = nmem_malloc(ct->nmem,sizeof(*p)); rfd->priv = p; p->buf_l = nmem_malloc(ct->nmem, ct->keycontrol->key_size); p->buf_r = nmem_malloc(ct->nmem, ct->keycontrol->key_size); } yaz_log(YLOG_DEBUG,"rsbool (%s) open [%p]", ct->control->desc, rfd); p->hits=0; p->rfd_l = rset_open (info->rset_l, RSETF_READ); p->rfd_r = rset_open (info->rset_r, RSETF_READ); p->more_l = rset_read(p->rfd_l, p->buf_l, &p->term_l); p->more_r = rset_read(p->rfd_r, p->buf_r, &p->term_r); p->tail = 0; return rfd; } static void r_close (RSFD rfd) { struct rfd_private *prfd=(struct rfd_private *)rfd->priv; rset_close (prfd->rfd_l); rset_close (prfd->rfd_r); } static int r_forward(RSFD rfd, void *buf, TERMID *term, const void *untilbuf) { struct rfd_private *p = (struct rfd_private *)rfd->priv; const struct rset_key_control *kctrl=rfd->rset->keycontrol; if ( p->more_l && ((kctrl->cmp)(untilbuf,p->buf_l)>=rfd->rset->scope) ) p->more_l = rset_forward(p->rfd_l, p->buf_l, &p->term_l, untilbuf); if ( p->more_r && ((kctrl->cmp)(untilbuf,p->buf_r)>=rfd->rset->scope)) p->more_r = rset_forward(p->rfd_r, p->buf_r, &p->term_r, untilbuf); p->tail = 0; return rset_read(rfd,buf,term); } /* 1,1 1,3 1,9 2,1 1,11 3,1 2,9 1,1 1,1 1,3 1,3 1,9 1,11 2,1 2,1 2,9 3,1 */ static int r_read_not(RSFD rfd, void *buf, TERMID *term) { struct rfd_private *p = (struct rfd_private *)rfd->priv; const struct rset_key_control *kctrl = rfd->rset->keycontrol; while (p->more_l) { int cmp; if (p->more_r) cmp = (*kctrl->cmp)(p->buf_l, p->buf_r); else cmp = -rfd->rset->scope; if (cmp <= -rfd->rset->scope) { /* cmp == -2 */ memcpy (buf, p->buf_l, kctrl->key_size); if (term) *term=p->term_l; p->more_l = rset_read(p->rfd_l, p->buf_l, &p->term_l); p->hits++; return 1; } else if (cmp >= rfd->rset->scope) /* cmp >1 */ { p->more_r = rset_forward( p->rfd_r, p->buf_r, &p->term_r, p->buf_l); } else { /* cmp== -1, 0, or 1 */ memcpy (buf, p->buf_l, kctrl->key_size); if (term) *term = p->term_l; do { p->more_l = rset_read(p->rfd_l, p->buf_l, &p->term_l); if (!p->more_l) break; cmp = (*kctrl->cmp)(p->buf_l, buf); } while (abs(cmp)rset->scope); /* (cmp >= -1 && cmp <= 1) */ do { p->more_r = rset_read(p->rfd_r, p->buf_r, &p->term_r); if (!p->more_r) break; cmp = (*kctrl->cmp)(p->buf_r, buf); } while (abs(cmp)rset->scope); /* (cmp >= -1 && cmp <= 1) */ } } return 0; } static int r_write(RSFD rfd, const void *buf) { yaz_log(YLOG_FATAL, "bool set type is read-only"); return -1; } static void r_pos(RSFD rfd, double *current, double *total) { struct rfd_private *p = (struct rfd_private *)rfd->priv; double lcur, ltot; double rcur, rtot; double r; ltot = -1; rtot = -1; rset_pos(p->rfd_l, &lcur, <ot); rset_pos(p->rfd_r, &rcur, &rtot); if ( (rtot<0) && (ltot<0)) { /*no position */ *current = rcur; /* return same as you got */ *total = rtot; /* probably -1 for not available */ } if (rtot < 0) rtot = rcur = 0; /* if only one useful, use it */ if (ltot < 0) ltot = lcur = 0; if (rtot+ltot < 1) { /* empty rset */ *current = *total = 0; return; } r = 1.0*(lcur+rcur)/(ltot+rtot); /* weighed average of l and r */ *current = (double) (p->hits); *total = *current/r ; #if RSET_DEBUG yaz_log(YLOG_DEBUG,"bool_pos: (%s/%s) %0.1f/%0.1f= %0.4f ", info->rset_l->control->desc, info->rset_r->control->desc, *current, *total, r); #endif } static void r_get_terms(RSET ct, TERMID *terms, int maxterms, int *curterm) { struct rset_private *info = (struct rset_private *) ct->priv; rset_getterms(info->rset_l, terms, maxterms, curterm); rset_getterms(info->rset_r, terms, maxterms, curterm); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/rset/rset.c0000644000175000017500000002664411412332551012251 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include static int log_level = 0; static int log_level_initialized = 0; /** \brief Common constuctor for RFDs \param rs Result set handle. Creates an rfd. Either allocates a new one, in which case the priv pointer is null, and will have to be filled in, or picks up one from the freelist, in which case the priv is already allocated, and presumably everything that hangs from it as well */ RSFD rfd_create_base(RSET rs) { RSFD rnew = rs->free_list; if (rnew) { rs->free_list = rnew->next; assert(rnew->rset==rs); yaz_log(log_level, "rfd_create_base (fl): rfd=%p rs=%p fl=%p priv=%p", rnew, rs, rs->free_list, rnew->priv); } else { rnew = nmem_malloc(rs->nmem, sizeof(*rnew)); rnew->counted_buf = nmem_malloc(rs->nmem, rs->keycontrol->key_size); rnew->priv = 0; rnew->rset = rs; yaz_log(log_level, "rfd_create_base (new): rfd=%p rs=%p fl=%p priv=%p", rnew, rs, rs->free_list, rnew->priv); } rnew->next = rs->use_list; rs->use_list = rnew; rnew->counted_items = 0; return rnew; } static void rset_close_int(RSET rs, RSFD rfd) { RSFD *pfd; (*rs->control->f_close)(rfd); yaz_log(log_level, "rfd_delete_base: rfd=%p rs=%p priv=%p fl=%p", rfd, rs, rfd->priv, rs->free_list); for (pfd = &rs->use_list; *pfd; pfd = &(*pfd)->next) if (*pfd == rfd) { *pfd = (*pfd)->next; rfd->next = rs->free_list; rs->free_list = rfd; return; } yaz_log(YLOG_WARN, "rset_close handle not found. type=%s", rs->control->desc); } void rset_set_hits_limit(RSET rs, zint l) { yaz_log(log_level, "rset_set_hits_limit %p l=" ZINT_FORMAT, rs, l); rs->hits_limit = l; } /** \brief Closes a result set RFD handle \param rfd the RFD handle. */ void rset_close(RSFD rfd) { RSET rs = rfd->rset; if (rs->hits_count == 0) { TERMID termid; char buf[100]; while (rfd->counted_items <= rs->hits_limit && rset_default_read(rfd, buf, &termid)) ; rs->hits_count = rfd->counted_items; yaz_log(log_level, "rset_close rset=%p hits_count=" ZINT_FORMAT " hits_limit=" ZINT_FORMAT, rs, rs->hits_count, rs->hits_limit); rs->hits_approx = 0; if (rs->hits_count > rs->hits_limit && rs->hits_limit > 0) { double cur, tot; zint est; rset_pos(rfd, &cur, &tot); if (tot > 0) { int i; double ratio = cur/tot; est = (zint)(0.5 + rs->hits_count / ratio); yaz_log(log_level, "Estimating hits (%s) " "%0.1f->" ZINT_FORMAT "; %0.1f->" ZINT_FORMAT, rs->control->desc, cur, rs->hits_count, tot, est); i = 0; /* round to significant digits */ while (est > rs->hits_round) { est /= 10; i++; } while (i--) est *= 10; rs->hits_count = est; rs->hits_approx = 1; } } yaz_log(log_level, "rset_close(%s) p=%p count=" ZINT_FORMAT, rs->control->desc, rs, rs->hits_count); } rset_close_int(rs, rfd); } /** \brief Common constuctor for RSETs \param sel The interface control handle \param nmem The memory handle for it. \param kcontrol Key control info (decode, encode, comparison etc) \param scope scope for set \param term Information about term for it (NULL for none). \param no_children number of child rsets (0 for none) \param children child rsets (NULL for none). Creates an rfd. Either allocates a new one, in which case the priv pointer is null, and will have to be filled in, or picks up one from the freelist, in which case the priv is already allocated, and presumably everything that hangs from it as well */ RSET rset_create_base(const struct rset_control *sel, NMEM nmem, struct rset_key_control *kcontrol, int scope, TERMID term, int no_children, RSET *children) { RSET rset; assert(nmem); if (!log_level_initialized) { log_level = yaz_log_module_level("rset"); log_level_initialized = 1; } rset = (RSET) nmem_malloc(nmem, sizeof(*rset)); yaz_log(log_level, "rs_create(%s) rs=%p (nm=%p)", sel->desc, rset, nmem); yaz_log(log_level, " ref_id=%s", (term && term->ref_id ? term->ref_id : "null")); rset->nmem = nmem; rset->control = sel; rset->refcount = 1; rset->priv = 0; rset->free_list = NULL; rset->use_list = NULL; rset->hits_count = 0; rset->hits_limit = 0; rset->hits_round = 1000; rset->keycontrol = kcontrol; (*kcontrol->inc)(kcontrol); rset->scope = scope; rset->term = term; if (term) { term->rset = rset; rset->hits_limit = term->hits_limit; } rset->no_children = no_children; rset->children = 0; if (no_children) { rset->children = (RSET*) nmem_malloc(rset->nmem, no_children*sizeof(RSET *)); memcpy(rset->children, children, no_children*sizeof(RSET *)); } return rset; } /** \brief Destructor RSETs \param rs Handle for result set. Destroys a result set and all its children. The f_delete method of control is called for the result set. */ void rset_delete(RSET rs) { (rs->refcount)--; yaz_log(log_level, "rs_delete(%s), rs=%p, refcount=%d", rs->control->desc, rs, rs->refcount); if (!rs->refcount) { int i; if (rs->use_list) yaz_log(YLOG_WARN, "rs_delete(%s) still has RFDs in use", rs->control->desc); for (i = 0; ino_children; i++) rset_delete(rs->children[i]); (*rs->control->f_delete)(rs); (*rs->keycontrol->dec)(rs->keycontrol); } } /** \brief Test for last use of RFD \param rfd RFD handle. Returns 1 if this RFD is the last reference to it; 0 otherwise. */ int rfd_is_last(RSFD rfd) { if (rfd->rset->use_list == rfd && rfd->next == 0) return 1; return 0; } /** \brief Duplicate an RSET \param rs Handle for result set. Duplicates a result set by incrementing the reference count to it. */ RSET rset_dup (RSET rs) { (rs->refcount)++; yaz_log(log_level, "rs_dup(%s), rs=%p, refcount=%d", rs->control->desc, rs, rs->refcount); return rs; } /** \brief Estimates hit count for result set. \param rs Result Set. rset_count uses rset_pos to get the total and returns that. This is ok for rsisamb/c/s, and for some other rsets, but in case of booleans etc it will give bad estimate, as nothing has been read from that rset */ zint rset_count(RSET rs) { double cur, tot; RSFD rfd = rset_open(rs, 0); rset_pos(rfd, &cur, &tot); rset_close_int(rs, rfd); return (zint) tot; } /** \brief is a getterms function for those that don't have any \param ct result set handle \param terms array of terms (0..maxterms-1) \param maxterms length of terms array \param curterm current size of terms array If there is a term associated with rset the term is appeneded; otherwise the terms array is untouched but curterm is incremented anyway. */ void rset_get_one_term(RSET ct, TERMID *terms, int maxterms, int *curterm) { if (ct->term) { if (*curterm < maxterms) terms[*curterm] = ct->term; (*curterm)++; } } struct ord_list *ord_list_create(NMEM nmem) { return 0; } struct ord_list *ord_list_append(NMEM nmem, struct ord_list *list, int ord) { struct ord_list *n = nmem_malloc(nmem, sizeof(*n)); n->ord = ord; n->next = list; return n; } struct ord_list *ord_list_dup(NMEM nmem, struct ord_list *list) { struct ord_list *n = ord_list_create(nmem); for (; list; list = list->next) n = ord_list_append(nmem, n, list->ord); return n; } void ord_list_print(struct ord_list *list) { for (; list; list = list->next) yaz_log(YLOG_LOG, "ord_list %d", list->ord); } /** \brief Creates a TERMID entry. \param name Term/Name buffer with given length \param length of term \param flags for term \param type Term Type, Z_Term_general, Z_Term_characterString,.. \param nmem memory for term. \param ol ord list \param reg_type register type \param hits_limit limit before counting stops and gets approximate \param ref_id supplied ID for term that can be used to identify this */ TERMID rset_term_create(const char *name, int length, const char *flags, int type, NMEM nmem, struct ord_list *ol, int reg_type, zint hits_limit, const char *ref_id) { TERMID t; yaz_log (log_level, "term_create '%s' %d f=%s type=%d nmem=%p", name, length, flags, type, nmem); t= (TERMID) nmem_malloc(nmem, sizeof(*t)); if (!name) t->name = NULL; else if (length == -1) t->name = nmem_strdup(nmem, name); else t->name = nmem_strdupn(nmem, name, length); if (!ref_id) t->ref_id = 0; else t->ref_id = nmem_strdup(nmem, ref_id); if (!flags) t->flags = NULL; else t->flags = nmem_strdup(nmem, flags); t->hits_limit = hits_limit; t->type = type; t->reg_type = reg_type; t->rankpriv = 0; t->rset = 0; t->ol = ord_list_dup(nmem, ol); return t; } int rset_default_read(RSFD rfd, void *buf, TERMID *term) { RSET rset = rfd->rset; int rc = (*rset->control->f_read)(rfd, buf, term); if (rc > 0) { int got_scope; if (rfd->counted_items == 0) got_scope = rset->scope+1; else got_scope = rset->keycontrol->cmp(buf, rfd->counted_buf); #if 0 key_logdump_txt(YLOG_LOG, buf, "rset_default_read"); yaz_log(YLOG_LOG, "rset_scope=%d got_scope=%d", rset->scope, got_scope); #endif if (got_scope > rset->scope) { memcpy(rfd->counted_buf, buf, rset->keycontrol->key_size); rfd->counted_items++; } } return rc; } int rset_default_forward(RSFD rfd, void *buf, TERMID *term, const void *untilbuf) { RSET rset = rfd->rset; int more; if (rset->control->f_forward && rfd->counted_items >= rset->hits_limit) { assert (rset->control->f_forward != rset_default_forward); return rset->control->f_forward(rfd, buf, term, untilbuf); } while ((more = rset_read(rfd, buf, term)) > 0) { if ((rfd->rset->keycontrol->cmp)(untilbuf, buf) < rset->scope) break; } if (log_level) yaz_log(log_level, "rset_default_forward exiting rfd=%p scope=%d m=%d c=%d", rfd, rset->scope, more, rset->scope); return more; } void rset_visit(RSET rset, int level) { int i; yaz_log(YLOG_LOG, "%*s%c " ZINT_FORMAT, level, "", rset->hits_approx ? '~' : '=', rset->hits_count); for (i = 0; ino_children; i++) rset_visit(rset->children[i], level+1); } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/rset/rsisams.c0000644000175000017500000000625611412332551012752 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include static RSFD r_open (RSET ct, int flag); static void r_close (RSFD rfd); static void r_delete (RSET ct); static int r_read (RSFD rfd, void *buf, TERMID *term); static int r_write (RSFD rfd, const void *buf); static void r_pos (RSFD rfd, double *current, double *total); static const struct rset_control control = { "isams", r_delete, rset_get_one_term, r_open, r_close, 0, /* no forward */ r_pos, r_read, r_write, }; struct rfd_private { ISAMS_PP pt; }; struct rset_private { ISAMS is; ISAM_P pos; }; RSET rsisams_create(NMEM nmem, struct rset_key_control *kcontrol, int scope, ISAMS is, ISAM_P pos, TERMID term) { RSET rnew = rset_create_base(&control, nmem, kcontrol, scope, term, 0, 0); struct rset_private *info; info = (struct rset_private *) nmem_malloc(rnew->nmem, sizeof(*info)); rnew->priv = info; info->is = is; info->pos = pos; return rnew; } static void r_delete (RSET ct) { yaz_log (YLOG_DEBUG, "rsisams_delete"); } RSFD r_open (RSET ct, int flag) { struct rset_private *info = (struct rset_private *) ct->priv; RSFD rfd; struct rfd_private *ptinfo; yaz_log (YLOG_DEBUG, "risams_open"); if (flag & RSETF_WRITE) { yaz_log (YLOG_FATAL, "ISAMS set type is read-only"); return NULL; } rfd = rfd_create_base(ct); if (rfd->priv) ptinfo = (struct rfd_private *)(rfd->priv); else { ptinfo = (struct rfd_private *) nmem_malloc(ct->nmem,sizeof(*ptinfo)); rfd->priv = ptinfo; } ptinfo->pt = isams_pp_open (info->is, info->pos); return rfd; } static void r_close (RSFD rfd) { struct rfd_private *ptinfo = (struct rfd_private *)(rfd->priv); isams_pp_close (ptinfo->pt); } static int r_read (RSFD rfd, void *buf, TERMID *term) { struct rfd_private *ptinfo = (struct rfd_private *)(rfd->priv); int rc = isams_pp_read(ptinfo->pt, buf); if (rc && term) *term = rfd->rset->term; return rc; } static int r_write (RSFD rfd, const void *buf) { yaz_log (YLOG_FATAL, "ISAMS set type is read-only"); return -1; } static void r_pos (RSFD rfd, double *current, double *total) { *current=-1; /* sorry, not implemented yet */ *total=-1; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/rset/rsisamb.c0000644000175000017500000001161311412332551012722 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include static RSFD r_open(RSET ct, int flag); static void r_close(RSFD rfd); static void r_delete(RSET ct); static int r_forward(RSFD rfd, void *buf, TERMID *term, const void *untilbuf); static void r_pos(RSFD rfd, double *current, double *total); static int r_read(RSFD rfd, void *buf, TERMID *term); static int r_read_filter(RSFD rfd, void *buf, TERMID *term); static int r_write(RSFD rfd, const void *buf); static const struct rset_control control = { "isamb", r_delete, rset_get_one_term, r_open, r_close, r_forward, r_pos, r_read, r_write, }; static const struct rset_control control_filter = { "isamb", r_delete, rset_get_one_term, r_open, r_close, r_forward, r_pos, r_read_filter, r_write, }; struct rfd_private { ISAMB_PP pt; void *buf; }; struct rset_private { ISAMB is; ISAM_P pos; }; static int log_level = 0; static int log_level_initialized = 0; RSET rsisamb_create(NMEM nmem, struct rset_key_control *kcontrol, int scope, ISAMB is, ISAM_P pos, TERMID term) { RSET rnew = rset_create_base( kcontrol->filter_func ? &control_filter : &control, nmem, kcontrol, scope, term, 0, 0); struct rset_private *info; assert(pos); if (!log_level_initialized) { log_level = yaz_log_module_level("rsisamb"); log_level_initialized = 1; } info = (struct rset_private *) nmem_malloc(rnew->nmem, sizeof(*info)); info->is = is; info->pos = pos; rnew->priv = info; yaz_log(log_level, "rsisamb_create"); return rnew; } static void r_delete(RSET ct) { yaz_log(log_level, "rsisamb_delete"); } RSFD r_open(RSET ct, int flag) { struct rset_private *info = (struct rset_private *) ct->priv; RSFD rfd; struct rfd_private *ptinfo; if (flag & RSETF_WRITE) { yaz_log(YLOG_FATAL, "ISAMB set type is read-only"); return NULL; } rfd = rfd_create_base(ct); if (rfd->priv) ptinfo = (struct rfd_private *) (rfd->priv); else { ptinfo = (struct rfd_private *) nmem_malloc(ct->nmem,sizeof(*ptinfo)); ptinfo->buf = nmem_malloc(ct->nmem,ct->keycontrol->key_size); rfd->priv = ptinfo; } ptinfo->pt = isamb_pp_open(info->is, info->pos, ct->scope ); yaz_log(log_level, "rsisamb_open"); return rfd; } static void r_close(RSFD rfd) { struct rfd_private *ptinfo = (struct rfd_private *)(rfd->priv); isamb_pp_close (ptinfo->pt); yaz_log(log_level, "rsisamb_close"); } static int r_forward(RSFD rfd, void *buf, TERMID *term, const void *untilbuf) { struct rfd_private *pinfo = (struct rfd_private *)(rfd->priv); int rc; rc = isamb_pp_forward(pinfo->pt, buf, untilbuf); if (rc && term) *term = rfd->rset->term; yaz_log(log_level, "rsisamb_forward"); return rc; } static void r_pos(RSFD rfd, double *current, double *total) { struct rfd_private *pinfo = (struct rfd_private *)(rfd->priv); assert(rfd); isamb_pp_pos(pinfo->pt, current, total); yaz_log(log_level, "isamb.r_pos returning %0.1f/%0.1f", *current, *total); } static int r_read(RSFD rfd, void *buf, TERMID *term) { struct rfd_private *pinfo = (struct rfd_private *)(rfd->priv); int rc; rc = isamb_pp_read(pinfo->pt, buf); if (rc && term) *term = rfd->rset->term; yaz_log(log_level, "isamb.r_read "); return rc; } static int r_read_filter(RSFD rfd, void *buf, TERMID *term) { struct rfd_private *pinfo = (struct rfd_private *)rfd->priv; const struct rset_key_control *kctrl = rfd->rset->keycontrol; int rc; while((rc = isamb_pp_read(pinfo->pt, buf))) { int incl = (*kctrl->filter_func)(buf, kctrl->filter_data); if (incl) break; } if (rc && term) *term = rfd->rset->term; yaz_log(log_level, "isamb.r_read_filter"); return rc; } static int r_write(RSFD rfd, const void *buf) { yaz_log(YLOG_FATAL, "ISAMB set type is read-only"); return -1; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/rset/rsmultiandor.c0000644000175000017500000004664511412332551014022 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** * \file rsmultiandor.c * \brief This module implements the rsmulti_or and rsmulti_and result sets * * rsmultior is based on a heap, from which we find the next hit. * * rsmultiand is based on a simple array of rsets, and a linear * search to find the record that exists in all of those rsets. * To speed things up, the array is sorted so that the smallest * rsets come first, they are most likely to have the hits furthest * away, and thus forwarding to them makes the most sense. */ #include #include #include #include #include #include #include static RSFD r_open_and (RSET ct, int flag); static RSFD r_open_or (RSET ct, int flag); static void r_close (RSFD rfd); static void r_delete (RSET ct); static int r_read_and (RSFD rfd, void *buf, TERMID *term); static int r_read_or (RSFD rfd, void *buf, TERMID *term); static int r_write (RSFD rfd, const void *buf); static int r_forward_and(RSFD rfd, void *buf, TERMID *term, const void *untilbuf); static int r_forward_or(RSFD rfd, void *buf, TERMID *term, const void *untilbuf); static void r_pos_and(RSFD rfd, double *current, double *total); static void r_pos_or(RSFD rfd, double *current, double *total); static void r_get_terms(RSET ct, TERMID *terms, int maxterms, int *curterm); static const struct rset_control control_or = { "multi-or", r_delete, r_get_terms, r_open_or, r_close, r_forward_or, r_pos_or, r_read_or, r_write, }; static const struct rset_control control_and = { "multi-and", r_delete, r_get_terms, r_open_and, r_close, r_forward_and, r_pos_and, r_read_and, r_write, }; /* The heap structure: * The rset contains a list or rsets we are ORing together * The rfd contains a heap of heap-items, which contain * a rfd opened to those rsets, and a buffer for one key. * They also contain a ptr to the rset list in the rset * itself, for practical reasons. */ struct heap_item { RSFD fd; void *buf; RSET rset; TERMID term; }; struct heap { int heapnum; int heapmax; const struct rset_key_control *kctrl; struct heap_item **heap; /* ptrs to the rfd */ }; typedef struct heap *HEAP; struct rset_private { int dummy; }; struct rfd_private { int flag; struct heap_item *items; /* we alloc and free them here */ HEAP h; /* and move around here */ zint hits; /* returned so far */ int eof; /* seen the end of it */ int tailcount; /* how many items are tailing */ zint segment; int skip; char *tailbits; }; static int log_level = 0; static int log_level_initialized = 0; /* Heap functions ***********************/ #if 0 static void heap_dump_item( HEAP h, int i, int level) { double cur,tot; if (i>h->heapnum) return; (void)rset_pos(h->heap[i]->rset,h->heap[i]->fd, &cur, &tot); yaz_log(log_level," %d %*s i=%p buf=%p %0.1f/%0.1f",i, level, "", &(h->heap[i]), h->heap[i]->buf, cur,tot ); heap_dump_item(h, 2*i, level+1); heap_dump_item(h, 2*i+1, level+1); } static void heap_dump( HEAP h,char *msg) { yaz_log(log_level, "heap dump: %s num=%d max=%d",msg, h->heapnum, h->heapmax); heap_dump_item(h,1,1); } #endif static void heap_swap (HEAP h, int x, int y) { struct heap_item *swap; swap = h->heap[x]; h->heap[x] = h->heap[y]; h->heap[y] = swap; } static int heap_cmp(HEAP h, int x, int y) { return (*h->kctrl->cmp)(h->heap[x]->buf,h->heap[y]->buf); } static int heap_empty(HEAP h) { return ( 0==h->heapnum ); } /** \brief deletes the first item in the heap, and balances the rest */ static void heap_delete (HEAP h) { int cur = 1, child = 2; h->heap[1] = 0; /* been deleted */ heap_swap (h, 1, h->heapnum--); while (child <= h->heapnum) { if (child < h->heapnum && heap_cmp(h,child,1+child)>0 ) child++; if (heap_cmp(h,cur,child) > 0) { heap_swap (h, cur, child); cur = child; child = 2*cur; } else break; } } /** \brief puts item into heap. The heap root element has changed value (to bigger) Swap downwards until the heap is ordered again */ static void heap_balance (HEAP h) { int cur = 1, child = 2; while (child <= h->heapnum) { if (child < h->heapnum && heap_cmp(h,child,1+child)>0 ) child++; if (heap_cmp(h,cur,child) > 0) { heap_swap (h, cur, child); cur = child; child = 2*cur; } else break; } } static void heap_insert (HEAP h, struct heap_item *hi) { int cur, parent; cur = ++(h->heapnum); assert(cur <= h->heapmax); h->heap[cur] = hi; parent = cur/2; while (parent && (heap_cmp(h,parent,cur) > 0)) { assert(parent>0); heap_swap (h, cur, parent); cur = parent; parent = cur/2; } } static HEAP heap_create (NMEM nmem, int size, const struct rset_key_control *kctrl) { HEAP h = (HEAP) nmem_malloc (nmem, sizeof(*h)); ++size; /* heap array starts at 1 */ h->heapnum = 0; h->heapmax = size; h->kctrl = kctrl; h->heap = (struct heap_item**) nmem_malloc(nmem,size*sizeof(*h->heap)); h->heap[0]=0; /* not used */ return h; } static void heap_clear( HEAP h) { assert(h); h->heapnum = 0; } static void heap_destroy (HEAP h) { /* nothing to delete, all is nmem'd, and will go away in due time */ } /** \brief compare and items for quicksort used in qsort to get the multi-and args in optimal order that is, those with fewest occurrences first */ int compare_ands(const void *x, const void *y) { const struct heap_item *hx = x; const struct heap_item *hy = y; double cur, totx, toty; rset_pos(hx->fd, &cur, &totx); rset_pos(hy->fd, &cur, &toty); if ( totx > toty +0.5 ) return 1; if ( totx < toty -0.5 ) return -1; return 0; /* return totx - toty, except for overflows and rounding */ } static RSET rsmulti_andor_create(NMEM nmem, struct rset_key_control *kcontrol, int scope, TERMID termid, int no_rsets, RSET* rsets, const struct rset_control *ctrl) { RSET rnew = rset_create_base(ctrl, nmem, kcontrol, scope, termid, no_rsets, rsets); struct rset_private *info; if (!log_level_initialized) { log_level = yaz_log_module_level("rsmultiandor"); log_level_initialized = 1; } yaz_log(log_level, "rsmultiand_andor_create scope=%d", scope); info = (struct rset_private *) nmem_malloc(rnew->nmem, sizeof(*info)); rnew->priv = info; return rnew; } RSET rset_create_or(NMEM nmem, struct rset_key_control *kcontrol, int scope, TERMID termid, int no_rsets, RSET* rsets) { return rsmulti_andor_create(nmem, kcontrol, scope, termid, no_rsets, rsets, &control_or); } RSET rset_create_and(NMEM nmem, struct rset_key_control *kcontrol, int scope, int no_rsets, RSET* rsets) { return rsmulti_andor_create(nmem, kcontrol, scope, 0, no_rsets, rsets, &control_and); } static void r_delete (RSET ct) { } static RSFD r_open_andor (RSET ct, int flag, int is_and) { RSFD rfd; struct rfd_private *p; const struct rset_key_control *kctrl = ct->keycontrol; int i; if (flag & RSETF_WRITE) { yaz_log (YLOG_FATAL, "multiandor set type is read-only"); return NULL; } rfd = rfd_create_base(ct); if (rfd->priv) { p = (struct rfd_private *)rfd->priv; if (!is_and) heap_clear(p->h); assert(p->items); /* all other pointers shouls already be allocated, in right sizes! */ } else { p = (struct rfd_private *) nmem_malloc (ct->nmem,sizeof(*p)); rfd->priv = p; p->h = 0; p->tailbits = 0; if (is_and) p->tailbits = nmem_malloc(ct->nmem, ct->no_children*sizeof(char) ); else p->h = heap_create( ct->nmem, ct->no_children, kctrl); p->items = (struct heap_item *) nmem_malloc(ct->nmem, ct->no_children*sizeof(*p->items)); for (i = 0; ino_children; i++) { p->items[i].rset = ct->children[i]; p->items[i].buf = nmem_malloc(ct->nmem, kctrl->key_size); } } p->flag = flag; p->hits = 0; p->eof = 0; p->tailcount = 0; if (is_and) { /* read the array and sort it */ for (i = 0; ino_children; i++){ p->items[i].fd = rset_open(ct->children[i], RSETF_READ); if (!rset_read(p->items[i].fd, p->items[i].buf, &p->items[i].term)) p->eof = 1; p->tailbits[i] = 0; } qsort(p->items, ct->no_children, sizeof(p->items[0]), compare_ands); } else { /* fill the heap for ORing */ for (i = 0; ino_children; i++){ p->items[i].fd = rset_open(ct->children[i],RSETF_READ); if ( rset_read(p->items[i].fd, p->items[i].buf, &p->items[i].term)) heap_insert(p->h, &(p->items[i])); } } return rfd; } static RSFD r_open_or (RSET ct, int flag) { return r_open_andor(ct, flag, 0); } static RSFD r_open_and (RSET ct, int flag) { return r_open_andor(ct, flag, 1); } static void r_close (RSFD rfd) { struct rfd_private *p=(struct rfd_private *)(rfd->priv); int i; if (p->h) heap_destroy (p->h); for (i = 0; irset->no_children; i++) if (p->items[i].fd) rset_close(p->items[i].fd); } static int r_forward_or(RSFD rfd, void *buf, TERMID *term, const void *untilbuf) { /* while heap head behind untilbuf, forward it and rebalance heap */ struct rfd_private *p = rfd->priv; const struct rset_key_control *kctrl = rfd->rset->keycontrol; if (heap_empty(p->h)) return 0; while ( (*kctrl->cmp)(p->h->heap[1]->buf,untilbuf) < -rfd->rset->scope ) { if (rset_forward(p->h->heap[1]->fd,p->h->heap[1]->buf, &p->h->heap[1]->term, untilbuf)) heap_balance(p->h); else { heap_delete(p->h); if (heap_empty(p->h)) return 0; } } return r_read_or(rfd, buf, term); } /** \brief reads one item key from an 'or' set \param rfd set handle \param buf resulting item buffer \param term resulting term \retval 0 EOF \retval 1 item could be read */ static int r_read_or (RSFD rfd, void *buf, TERMID *term) { RSET rset = rfd->rset; struct rfd_private *mrfd = rfd->priv; const struct rset_key_control *kctrl = rset->keycontrol; struct heap_item *it; int rdres; if (heap_empty(mrfd->h)) return 0; it = mrfd->h->heap[1]; memcpy(buf, it->buf, kctrl->key_size); if (term) { if (rset->term) *term = rset->term; else *term = it->term; } (mrfd->hits)++; rdres = rset_read(it->fd, it->buf, &it->term); if ( rdres ) heap_balance(mrfd->h); else heap_delete(mrfd->h); return 1; } /** \brief reads one item key from an 'and' set \param rfd set handle \param buf resulting item buffer \param term resulting term \retval 0 EOF \retval 1 item could be read Has to return all hits where each item points to the same sysno (scope), in order. Keep an extra key (hitkey) as long as all records do not point to hitkey, forward them, and update hitkey to be the highest seen so far. (if any item eof's, mark eof, and return 0 thereafter) Once a hit has been found, scan all items for the smallest value. Mark all as being in the tail. Read next from that item, and if not in the same record, clear its tail bit */ static int r_read_and (RSFD rfd, void *buf, TERMID *term) { struct rfd_private *p = rfd->priv; RSET ct = rfd->rset; const struct rset_key_control *kctrl = ct->keycontrol; int i; while (1) { if (p->tailcount) { /* we are tailing, find lowest tail and return it */ int mintail = -1; int cmp; for (i = 0; ino_children; i++) { if (p->tailbits[i]) { if (mintail >= 0) cmp = (*kctrl->cmp) (p->items[i].buf, p->items[mintail].buf); else cmp = -1; if (cmp < 0) mintail = i; if (kctrl->get_segment) { /* segments enabled */ zint segment = kctrl->get_segment(p->items[i].buf); /* store segment if not stored already */ if (!p->segment && segment) p->segment = segment; /* skip rest entirely if segments don't match */ if (p->segment && segment && p->segment != segment) p->skip = 1; } } } /* return the lowest tail */ memcpy(buf, p->items[mintail].buf, kctrl->key_size); if (term) *term = p->items[mintail].term; if (!rset_read(p->items[mintail].fd, p->items[mintail].buf, &p->items[mintail].term)) { p->eof = 1; /* game over, once tails have been returned */ p->tailbits[mintail] = 0; (p->tailcount)--; } else { /* still a tail? */ cmp = (*kctrl->cmp)(p->items[mintail].buf,buf); if (cmp >= rfd->rset->scope) { p->tailbits[mintail] = 0; (p->tailcount)--; } } if (p->skip) continue; /* skip again.. eventually tailcount will be 0 */ if (p->tailcount == 0) (p->hits)++; return 1; } /* not tailing, forward until all records match, and set up */ /* as tails. the earlier 'if' will then return the hits */ if (p->eof) return 0; /* nothing more to see */ i = 1; /* assume items[0] is highest up */ while (i < ct->no_children) { int cmp = (*kctrl->cmp)(p->items[0].buf, p->items[i].buf); if (cmp <= -rfd->rset->scope) { /* [0] was behind, forward it */ if (!rset_forward(p->items[0].fd, p->items[0].buf, &p->items[0].term, p->items[i].buf)) { p->eof = 1; /* game over */ return 0; } i = 0; /* start forwarding from scratch */ } else if (cmp>=rfd->rset->scope) { /* [0] was ahead, forward i */ if (!rset_forward(p->items[i].fd, p->items[i].buf, &p->items[i].term, p->items[0].buf)) { p->eof = 1; /* game over */ return 0; } } else i++; } /* while i */ /* if we get this far, all rsets are now within +- scope of [0] */ /* ergo, we have a hit. Mark them all as tailing, and let the */ /* upper 'if' return the hits in right order */ for (i = 0; i < ct->no_children; i++) p->tailbits[i] = 1; p->tailcount = ct->no_children; p->segment = 0; p->skip = 0; } /* while 1 */ } static int r_forward_and(RSFD rfd, void *buf, TERMID *term, const void *untilbuf) { struct rfd_private *p = rfd->priv; RSET ct = rfd->rset; const struct rset_key_control *kctrl = ct->keycontrol; int i; int cmp; int killtail = 0; for (i = 0; ino_children; i++) { cmp = (*kctrl->cmp)(p->items[i].buf,untilbuf); if (cmp <= -rfd->rset->scope) { killtail = 1; /* we are moving to a different hit */ if (!rset_forward(p->items[i].fd, p->items[i].buf, &p->items[i].term, untilbuf)) { p->eof = 1; /* game over */ p->tailcount = 0; return 0; } } } if (killtail) { for (i = 0; ino_children; i++) p->tailbits[i] = 0; p->tailcount = 0; } return r_read_and(rfd,buf,term); } static void r_pos_x(RSFD rfd, double *current, double *total, int and_op) { RSET ct = rfd->rset; struct rfd_private *mrfd = (struct rfd_private *)(rfd->priv); double ratio = and_op ? 0.0 : 1.0; int i; double sum_cur = 0.0; double sum_tot = 0.0; for (i = 0; ino_children; i++){ double nratio, cur, tot; rset_pos(mrfd->items[i].fd, &cur, &tot); yaz_log(log_level, "r_pos: %d %0.1f %0.1f", i, cur,tot); nratio = cur / tot; if (and_op) { if (nratio > ratio) ratio = nratio; } else { sum_cur += cur; sum_tot += tot; } } if (!and_op) ratio = sum_cur / sum_tot; if (ratio == 0.0 || ratio == 1.0) { /* nothing there */ *current = 0; *total = 0; yaz_log(log_level, "r_pos: NULL %0.1f %0.1f", *current, *total); } else { *current = (double) (mrfd->hits); *total = *current / ratio; yaz_log(log_level, "r_pos: = %0.1f %0.1f", *current, *total); } } static void r_pos_and(RSFD rfd, double *current, double *total) { r_pos_x(rfd, current, total, 1); } static void r_pos_or(RSFD rfd, double *current, double *total) { r_pos_x(rfd, current, total, 0); } static int r_write (RSFD rfd, const void *buf) { yaz_log (YLOG_FATAL, "multior set type is read-only"); return -1; } static void r_get_terms(RSET ct, TERMID *terms, int maxterms, int *curterm) { if (ct->term) rset_get_one_term(ct, terms, maxterms, curterm); else { /* Special case: Some multi-ors have all terms pointing to the same term. We do not want to duplicate those. Other multiors (and ands) have different terms under them. Those we want. */ int firstterm= *curterm; int i; for (i = 0; ino_children; i++) { rset_getterms(ct->children[i], terms, maxterms, curterm); if ( ( *curterm > firstterm+1 ) && ( *curterm <= maxterms ) && ( terms[(*curterm)-1] == terms[firstterm] ) ) (*curterm)--; /* forget the term, seen that before */ } } } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/rset/Makefile.am0000644000175000017500000000033711412332551013153 00000000000000 noinst_LTLIBRARIES = libidzebra-rset.la libidzebra_rset_la_SOURCES = rset.c rstemp.c rsnull.c rsbool.c rsbetween.c \ rsisamc.c rsmultiandor.c rsisams.c rsisamb.c rsprox.c AM_CPPFLAGS = -I$(srcdir)/../include $(YAZINC) idzebra-2.0.44/rset/rsisamc.c0000644000175000017500000000706411412332551012730 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include static RSFD r_open (RSET ct, int flag); static void r_close (RSFD rfd); static void r_delete (RSET ct); static int r_read (RSFD rfd, void *buf, TERMID *term); static int r_write (RSFD rfd, const void *buf); static void r_pos (RSFD rfd, double *current, double *total); static const struct rset_control control = { "isamc", r_delete, rset_get_one_term, r_open, r_close, 0, /* no forward */ r_pos, r_read, r_write, }; struct rset_pp_info { ISAMC_PP pt; void *buf; }; struct rset_isamc_info { ISAMC is; ISAM_P pos; }; static int log_level = 0; static int log_level_initialized = 0; RSET rsisamc_create(NMEM nmem, struct rset_key_control *kcontrol, int scope, ISAMC is, ISAM_P pos, TERMID term) { RSET rnew = rset_create_base(&control, nmem, kcontrol, scope, term, 0, 0); struct rset_isamc_info *info; if (!log_level_initialized) { log_level = yaz_log_module_level("rsisamc"); log_level_initialized = 1; } info = (struct rset_isamc_info *) nmem_malloc(rnew->nmem, sizeof(*info)); info->is = is; info->pos = pos; rnew->priv = info; yaz_log(log_level, "create: term=%p", term); return rnew; } static void r_delete (RSET ct) { yaz_log(log_level, "rsisamc_delete"); } RSFD r_open (RSET ct, int flag) { struct rset_isamc_info *info = (struct rset_isamc_info *) ct->priv; RSFD rfd; struct rset_pp_info *ptinfo; yaz_log(log_level, "risamc_open"); if (flag & RSETF_WRITE) { yaz_log(YLOG_FATAL, "ISAMC set type is read-only"); return NULL; } rfd = rfd_create_base(ct); if (rfd->priv) ptinfo = (struct rset_pp_info *)rfd->priv; else { ptinfo = (struct rset_pp_info *) nmem_malloc (ct->nmem,sizeof(*ptinfo)); rfd->priv = ptinfo; ptinfo->buf = nmem_malloc (ct->nmem,ct->keycontrol->key_size); } ptinfo->pt = isamc_pp_open(info->is, info->pos); return rfd; } static void r_close (RSFD rfd) { struct rset_pp_info *p = (struct rset_pp_info *)(rfd->priv); isamc_pp_close(p->pt); } static int r_read (RSFD rfd, void *buf, TERMID *term) { struct rset_pp_info *p = (struct rset_pp_info *)(rfd->priv); int r; r = isamc_pp_read(p->pt, buf); if (term) *term = rfd->rset->term; yaz_log(log_level, "isamc.r_read"); return r; } static int r_write (RSFD rfd, const void *buf) { yaz_log(YLOG_FATAL, "ISAMC set type is read-only"); return -1; } static void r_pos (RSFD rfd, double *current, double *total) { *current = -1; /* sorry, not implemented yet */ *total = -1; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/rset/Makefile.in0000644000175000017500000003677411412336425013206 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = rset DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libidzebra_rset_la_LIBADD = am_libidzebra_rset_la_OBJECTS = rset.lo rstemp.lo rsnull.lo rsbool.lo \ rsbetween.lo rsisamc.lo rsmultiandor.lo rsisams.lo rsisamb.lo \ rsprox.lo libidzebra_rset_la_OBJECTS = $(am_libidzebra_rset_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libidzebra_rset_la_SOURCES) DIST_SOURCES = $(libidzebra_rset_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ noinst_LTLIBRARIES = libidzebra-rset.la libidzebra_rset_la_SOURCES = rset.c rstemp.c rsnull.c rsbool.c rsbetween.c \ rsisamc.c rsmultiandor.c rsisams.c rsisamb.c rsprox.c AM_CPPFLAGS = -I$(srcdir)/../include $(YAZINC) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu rset/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu rset/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libidzebra-rset.la: $(libidzebra_rset_la_OBJECTS) $(libidzebra_rset_la_DEPENDENCIES) $(LINK) $(libidzebra_rset_la_OBJECTS) $(libidzebra_rset_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rsbetween.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rsbool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rsisamb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rsisamc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rsisams.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rsmultiandor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rsnull.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rsprox.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rstemp.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: idzebra-2.0.44/isams/0000755000175000017500000000000011412336534011340 500000000000000idzebra-2.0.44/isams/isams.c0000644000175000017500000001507311412332551012541 00000000000000/* This file is part of the Zebra server. Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Zebra is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include typedef struct { int last_offset; int last_block; } ISAMS_head; typedef unsigned ISAMS_BLOCK_SIZE; struct ISAMS_s { ISAMS_M *method; ISAMS_head head; ISAMS_head head_old; char *merge_buf; int block_size; int debug; BFile bf; }; struct ISAMS_PP_s { ISAMS is; char *buf; int block_offset; int block_no; void *decodeClientData; int numKeys; int numRead; }; void isams_getmethod (ISAMS_M *m) { m->codec.start = NULL; m->codec.decode = NULL; m->codec.encode = NULL; m->codec.stop = NULL; m->codec.reset = NULL; m->compare_item = NULL; m->log_item = NULL; m->debug = 1; m->block_size = 128; } ISAMS isams_open (BFiles bfs, const char *name, int writeflag, ISAMS_M *method) { ISAMS is = (ISAMS) xmalloc (sizeof(*is)); is->method = (ISAMS_M *) xmalloc (sizeof(*is->method)); memcpy (is->method, method, sizeof(*method)); is->block_size = is->method->block_size; is->debug = is->method->debug; is->bf = bf_open (bfs, name, is->block_size, writeflag); if (!bf_read (is->bf, 0, 0, sizeof(ISAMS_head), &is->head)) { is->head.last_block = 1; is->head.last_offset = 0; } memcpy (&is->head_old, &is->head, sizeof(is->head)); is->merge_buf = (char *) xmalloc(2*is->block_size); memset(is->merge_buf, 0, 2*is->block_size); return is; } int isams_close (ISAMS is) { if (memcmp(&is->head, &is->head_old, sizeof(is->head))) { if (is->head.last_offset) bf_write(is->bf, is->head.last_block, 0, is->head.last_offset, is->merge_buf); bf_write (is->bf, 0, 0, sizeof(is->head), &is->head); } bf_close (is->bf); xfree (is->merge_buf); xfree (is->method); xfree (is); return 0; } ISAM_P isams_merge (ISAMS is, ISAMS_I data) { char i_item[128]; int i_more, i_mode; void *r_clientData; int first_block = is->head.last_block; int first_offset = is->head.last_offset; int count = 0; r_clientData = (*is->method->codec.start)(); is->head.last_offset += sizeof(int); if (is->head.last_offset > is->block_size) { if (is->debug > 2) yaz_log (YLOG_LOG, "first_block=%d", first_block); bf_write(is->bf, is->head.last_block, 0, 0, is->merge_buf); (is->head.last_block)++; is->head.last_offset -= is->block_size; memcpy (is->merge_buf, is->merge_buf + is->block_size, is->head.last_offset); } while (1) { char *tmp_ptr = i_item; i_more = (*data->read_item)(data->clientData, &tmp_ptr, &i_mode); assert (i_mode); if (!i_more) break; else { char *r_out_ptr = is->merge_buf + is->head.last_offset; const char *i_item_ptr = i_item; (*is->method->codec.encode)(r_clientData, &r_out_ptr, &i_item_ptr); is->head.last_offset = r_out_ptr - is->merge_buf; if (is->head.last_offset > is->block_size) { bf_write(is->bf, is->head.last_block, 0, 0, is->merge_buf); (is->head.last_block)++; is->head.last_offset -= is->block_size; memcpy (is->merge_buf, is->merge_buf + is->block_size, is->head.last_offset); } count++; } } (*is->method->codec.stop)(r_clientData); if (first_block == is->head.last_block) memcpy(is->merge_buf + first_offset, &count, sizeof(int)); else if (first_block == is->head.last_block-1) { int gap = first_offset + sizeof(int) - is->block_size; assert (gap <= (int) sizeof(int)); if (gap > 0) { if (gap < (int) sizeof(int)) bf_write(is->bf, first_block, first_offset, sizeof(int)-gap, &count); memcpy (is->merge_buf, ((char*)&count)+(sizeof(int)-gap), gap); } else bf_write(is->bf, first_block, first_offset, sizeof(int), &count); } else { bf_write(is->bf, first_block, first_offset, sizeof(int), &count); } return first_block * is->block_size + first_offset; } ISAMS_PP isams_pp_open (ISAMS is, ISAM_P pos) { ISAMS_PP pp = (ISAMS_PP) xmalloc (sizeof(*pp)); if (is->debug > 1) yaz_log (YLOG_LOG, "isams: isams_pp_open pos=%ld", (long) pos); pp->is = is; pp->decodeClientData = (*is->method->codec.start)(); pp->numKeys = 0; pp->numRead = 0; pp->buf = (char *) xmalloc(is->block_size*2); pp->block_no = (int) (pos/is->block_size); pp->block_offset = (int) (pos - pp->block_no * is->block_size); if (is->debug) yaz_log (YLOG_LOG, "isams: isams_pp_open off=%d no=%d", pp->block_offset, pp->block_no); if (pos) { bf_read (is->bf, pp->block_no, 0, 0, pp->buf); bf_read (is->bf, pp->block_no+1, 0, 0, pp->buf + is->block_size); memcpy(&pp->numKeys, pp->buf + pp->block_offset, sizeof(int)); if (is->debug) yaz_log (YLOG_LOG, "isams: isams_pp_open numKeys=%d", pp->numKeys); pp->block_offset += sizeof(int); } return pp; } void isams_pp_close (ISAMS_PP pp) { (*pp->is->method->codec.stop)(pp->decodeClientData); xfree(pp->buf); xfree(pp); } int isams_pp_num (ISAMS_PP pp) { return pp->numKeys; } int isams_pp_read (ISAMS_PP pp, void *buf) { char *cp = buf; return isams_read_item (pp, &cp); } int isams_read_item (ISAMS_PP pp, char **dst) { const char *src; if (pp->numRead >= pp->numKeys) return 0; (pp->numRead)++; if (pp->block_offset > pp->is->block_size) { pp->block_offset -= pp->is->block_size; (pp->block_no)++; memcpy (pp->buf, pp->buf + pp->is->block_size, pp->is->block_size); bf_read (pp->is->bf, pp->block_no+1, 0, 0, pp->buf + pp->is->block_size); } src = pp->buf + pp->block_offset; (*pp->is->method->codec.decode)(pp->decodeClientData, dst, &src); pp->block_offset = src - pp->buf; return 1; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ idzebra-2.0.44/isams/Makefile.am0000644000175000017500000000020111412332551013300 00000000000000 noinst_LTLIBRARIES = libidzebra-isams.la AM_CPPFLAGS = -I$(srcdir)/../include $(YAZINC) libidzebra_isams_la_SOURCES = isams.c idzebra-2.0.44/isams/Makefile.in0000644000175000017500000003526611412336425013340 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = isams DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libidzebra_isams_la_LIBADD = am_libidzebra_isams_la_OBJECTS = isams.lo libidzebra_isams_la_OBJECTS = $(am_libidzebra_isams_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libidzebra_isams_la_SOURCES) DIST_SOURCES = $(libidzebra_isams_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXPAT_LIBS = @EXPAT_LIBS@ FGREP = @FGREP@ GREP = @GREP@ HTML_COMPILE = @HTML_COMPILE@ IDZEBRA_BUILD_ROOT = @IDZEBRA_BUILD_ROOT@ IDZEBRA_SRC_ROOT = @IDZEBRA_SRC_ROOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MAN_COMPILE = @MAN_COMPILE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_SUFFIX = @PACKAGE_SUFFIX@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHARED_MODULE_LA = @SHARED_MODULE_LA@ SHELL = @SHELL@ STATIC_MODULE_LADD = @STATIC_MODULE_LADD@ STATIC_MODULE_OBJ = @STATIC_MODULE_OBJ@ STRIP = @STRIP@ TCL_INCLUDE = @TCL_INCLUDE@ TCL_LIB = @TCL_LIB@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YAZINC = @YAZINC@ YAZLALIB = @YAZLALIB@ YAZLIB = @YAZLIB@ YAZVERSION = @YAZVERSION@ ZEBRALIBS_VERSION_INFO = @ZEBRALIBS_VERSION_INFO@ ZEBRA_CFLAGS = @ZEBRA_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_prefix_program = @ac_prefix_program@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ main_zebralib = @main_zebralib@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ yazconfig = @yazconfig@ noinst_LTLIBRARIES = libidzebra-isams.la AM_CPPFLAGS = -I$(srcdir)/../include $(YAZINC) libidzebra_isams_la_SOURCES = isams.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu isams/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu isams/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libidzebra-isams.la: $(libidzebra_isams_la_OBJECTS) $(libidzebra_isams_la_DEPENDENCIES) $(LINK) $(libidzebra_isams_la_OBJECTS) $(libidzebra_isams_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isams.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: