From 83533000f9456dcab2fc171abafd84d6104d4087 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 2 Mar 2000 14:35:19 +0000 Subject: [PATCH] Added structure year and date. --- CHANGELOG | 2 ++ tab/default.idx | 6 +++++- util/zebramap.c | 17 ++++++++++++++--- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 87a1351..7142d82 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,6 @@ +Fixed bug regarding proximity. + Documentation updates. Fixed bug in record retrieval module that occured on 64-bit OSF diff --git a/tab/default.idx b/tab/default.idx index fc29767..2632158 100644 --- a/tab/default.idx +++ b/tab/default.idx @@ -1,5 +1,5 @@ # Zebra indexes as referred to from the *.abs-files. -# $Id: default.idx,v 1.7 1999-02-18 14:59:54 adam Exp $ +# $Id: default.idx,v 1.8 2000-03-02 14:35:19 adam Exp $ # # Traditional word index index w @@ -31,3 +31,7 @@ charmap @ sort s completeness 1 charmap string.chr + +index y +completeness 0 +charmap @ \ No newline at end of file diff --git a/util/zebramap.c b/util/zebramap.c index 9538f8e..e05bdce 100644 --- a/util/zebramap.c +++ b/util/zebramap.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: zebramap.c,v $ - * Revision 1.19 1999-11-30 13:48:04 adam + * Revision 1.20 2000-03-02 14:35:19 adam + * Added structure year and date. + * + * Revision 1.19 1999/11/30 13:48:04 adam * Improved installation. Updated for inclusion of YAZ header files. * * Revision 1.18 1999/10/15 08:27:46 adam @@ -306,7 +309,7 @@ chrmaptab zebra_charmap_get (ZebraMaps zms, unsigned reg_id) logf (LOG_WARN, "Unknown register type: %c", reg_id); zm->reg_id = reg_id; - zm->maptab_name = NULL; + zm->maptab_name = nmem_strdup (zms->nmem, "@"); zm->maptab = NULL; zm->type = ZEBRA_MAP_TYPE_INDEX; zm->completeness = 0; @@ -572,6 +575,14 @@ int zebra_maps_attr (ZebraMaps zms, Z_AttributesPlusTerm *zapt, *reg_id = '0'; *search_type = "phrase"; break; + case 4: /* year */ + *reg_id = 'y'; + *search_type = "phrase"; + break; + case 5: /* date */ + *reg_id = 'd'; + *search_type = "phrase"; + break; default: return -1; } @@ -588,7 +599,7 @@ WRBUF zebra_replace(ZebraMaps zms, unsigned reg_id, const char *ex_list, wrbuf_rewind(zms->wrbuf_1); wrbuf_write(zms->wrbuf_1, input_str, input_len); - if (!zm->replace_tokens) + if (!zm || !zm->replace_tokens) return zms->wrbuf_1; #if 0 -- 1.7.10.4