From 238730873cdf47ff4945ce1635870b10601c9aa3 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 18 Sep 2002 21:01:14 +0000 Subject: [PATCH] Fix search for complete fields. Update version --- CHANGELOG | 4 ++++ configure.in | 44 ++++++++++++++++++++++++++++++++------------ debian/changelog | 6 ++++++ debian/rules | 2 +- dict/lookgrep.c | 3 ++- include/zebraver.h | 6 +++--- index/zrpn.c | 23 ++++++++++++++++++----- win/zebra.nsi | 4 ++-- zebra.spec | 2 +- 9 files changed, 69 insertions(+), 25 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 68ed17f..1cbbaba 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,8 @@ +--- 1.3.3 2002/MM/DD + +Fix searches for complete fields. + --- 1.3.2 2002/09/09 When name zebra is used in a filename or directory 'idzebra' is used diff --git a/configure.in b/configure.in index 34f28e9..abdd37c 100644 --- a/configure.in +++ b/configure.in @@ -1,8 +1,8 @@ dnl Zebra, Index Data Aps, 1995-2002 -dnl $Id: configure.in,v 1.48 2002-09-13 09:24:16 adam Exp $ +dnl $Id: configure.in,v 1.49 2002-09-18 21:01:14 adam Exp $ dnl AC_INIT(include/zebraver.h) -AM_INIT_AUTOMAKE(idzebra,1.3.2) +AM_INIT_AUTOMAKE(idzebra,1.3.3) dnl ------ Substitutions AC_SUBST(TCL_INCLUDE) AC_SUBST(TCL_LIB) @@ -123,17 +123,37 @@ dnl ------ mkstemp AC_CHECK_FUNCS(mkstemp) dnl dnl ------ iconv -AC_CHECK_FUNCS(iconv_open) -if test "$ac_cv_func_iconv_open" = "no"; then - oldLibs=$LIBS - LIBS="$LIBS -liconv" - AC_CHECK_FUNCS(iconv_open) - if test "$ac_cv_func_iconv_open" = "no"; then - LIBS=$oldLibs +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 -fi -if test "$ac_cv_func_iconv_open" = "yes"; then - AC_CHECK_HEADERS(iconv.h) + AC_TRY_LINK([ + #include + ],[ + static void f() {iconv_t t = iconv_open("", ""); } + ],[ + AC_DEFINE(HAVE_ICONV_H) + AC_MSG_RESULT(yes) + ],[ + LIBS="$LIBS -liconv" + AC_TRY_LINK([ + #include + ],[ + static void f() {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 diff --git a/debian/changelog b/debian/changelog index 21f342e..9b25412 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +idzebra (1.3.3-1) unstable; urgency=low + + * upstream version. + + -- Adam Dickmeiss Wed, 18 Sep 2002 22:47:54 +0100 + idzebra (1.3.2-3) unstable; urgency=low * remove redundant dependency in debian/rules. diff --git a/debian/rules b/debian/rules index 304180d..5a8ae97 100755 --- a/debian/rules +++ b/debian/rules @@ -20,7 +20,7 @@ else MCFLAGS= endif -ZEBRA_VERSION=1.3.2 +ZEBRA_VERSION=1.3.3 ZEBRASRCDIR?=$(shell pwd) # If this is not IndexData's release, then it is a cvs-checkout. Go cheat! # YAZ_VERSION:=$(YAZ_VERSION)-$(shell date -r$(YAZSRCDIR)/CVS +"CVS%Y%m%d") diff --git a/dict/lookgrep.c b/dict/lookgrep.c index aa01af5..4d1c3d0 100644 --- a/dict/lookgrep.c +++ b/dict/lookgrep.c @@ -1,4 +1,4 @@ -/* $Id: lookgrep.c,v 1.25 2002-08-02 19:26:55 adam Exp $ +/* $Id: lookgrep.c,v 1.26 2002-09-18 21:01:15 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 Index Data Aps @@ -385,6 +385,7 @@ int dict_lookup_grep (Dict dict, const char *pattern, int range, void *client, i = dfa_parse (dfa, &this_pattern); if (i || *this_pattern) { + yaz_log (LOG_WARN, "dfa_parse fail=%d", i); dfa_delete (&dfa); return -1; } diff --git a/include/zebraver.h b/include/zebraver.h index 1f3b0d8..95aa432 100644 --- a/include/zebraver.h +++ b/include/zebraver.h @@ -1,4 +1,4 @@ -/* $Id: zebraver.h,v 1.24 2002-09-05 14:36:20 adam Exp $ +/* $Id: zebraver.h,v 1.25 2002-09-18 21:01:15 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 Index Data Aps @@ -23,9 +23,9 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #ifndef ZEBRAVER -#define ZEBRAVER "1.3.2" +#define ZEBRAVER "1.3.3" #endif #ifndef ZEBRADATE -#define ZEBRADATE "$Date: 2002-09-05 14:36:20 $" +#define ZEBRADATE "$Date: 2002-09-18 21:01:15 $" #endif diff --git a/index/zrpn.c b/index/zrpn.c index bd0ceab..26100a0 100644 --- a/index/zrpn.c +++ b/index/zrpn.c @@ -1,4 +1,4 @@ -/* $Id: zrpn.c,v 1.122 2002-08-28 19:52:29 adam Exp $ +/* $Id: zrpn.c,v 1.123 2002-09-18 21:01:15 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 Index Data Aps @@ -46,7 +46,20 @@ struct rpn_char_map_info { 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; - return zebra_maps_input (p->zm, p->reg_type, from, len); + const char **out = zebra_maps_input (p->zm, p->reg_type, from, len); +#if 0 + if (out && *out) + { + const char *outp = *out; + yaz_log (LOG_LOG, "---"); + while (*outp) + { + yaz_log (LOG_LOG, "%02X", *outp); + outp++; + } + } +#endif + return out; } static void rpn_char_map_prepare (struct zebra_register *reg, int reg_type, @@ -266,7 +279,7 @@ static int term_pre (ZebraMaps zebra_maps, int reg_type, const char **src, return *s0; } -#define REGEX_CHARS "[]()|.*+!" +#define REGEX_CHARS " []()|.*+!" /* term_100: handle term, where trunc=none (no operators at all) */ static int term_100 (ZebraMaps zebra_maps, int reg_type, @@ -982,11 +995,11 @@ static int string_term (ZebraHandle zh, Z_AttributesPlusTerm *zapt, attributeSet, reg_type, space_split, term_dst)) return 0; - logf (LOG_DEBUG, "dict_lookup_grep: %s", term_dict+prefix_len); + logf (LOG_LOG, "dict_lookup_grep: %s", term_dict+prefix_len); r = dict_lookup_grep (zh->reg->dict, term_dict, 0, grep_info, &max_pos, 0, grep_handle); if (r) - logf (LOG_WARN, "dict_lookup_grep fail, rel=gt: %d", r); + logf (LOG_WARN, "dict_lookup_grep fail %d", r); break; case 1: /* right truncation */ term_dict[j++] = '('; diff --git a/win/zebra.nsi b/win/zebra.nsi index 723ba50..0fe53ac 100644 --- a/win/zebra.nsi +++ b/win/zebra.nsi @@ -1,6 +1,6 @@ -; $Id: zebra.nsi,v 1.5 2002-09-09 10:32:10 adam Exp $ +; $Id: zebra.nsi,v 1.6 2002-09-18 21:01:16 adam Exp $ -!define VERSION "1.3.2" +!define VERSION "1.3.3" Name "Zebra" Caption "Index Data Yebra ${VERSION} Setup" diff --git a/zebra.spec b/zebra.spec index 0298640..aeb579b 100644 --- a/zebra.spec +++ b/zebra.spec @@ -1,5 +1,5 @@ Name: idzebra -Version: 1.3.2 +Version: 1.3.3 Release: 1 Requires: yaz expat bzip2-libs tcl Copyright: GPL -- 1.7.10.4