From 0b916c43a55c3d66e938fa5f19b51a230c448777 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 18 Aug 2005 19:20:37 +0000 Subject: [PATCH] Updates for Windows --- include/idzebra/snippet.h | 15 ++++++++++++++- index/sortidx.c | 4 ++-- index/zsets.c | 9 +++++---- win/makefile | 5 +++-- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/include/idzebra/snippet.h b/include/idzebra/snippet.h index d4cfb1d..d64803a 100644 --- a/include/idzebra/snippet.h +++ b/include/idzebra/snippet.h @@ -1,4 +1,4 @@ -/* $Id: snippet.h,v 1.2 2005-06-07 14:53:39 adam Exp $ +/* $Id: snippet.h,v 1.3 2005-08-18 19:20:37 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -39,17 +39,30 @@ struct zebra_snippet_word { typedef struct zebra_snippets zebra_snippets; typedef struct zebra_snippet_word zebra_snippet_word; +YAZ_EXPORT zebra_snippets *zebra_snippets_create(); + +YAZ_EXPORT void zebra_snippets_destroy(zebra_snippets *l); + +YAZ_EXPORT void zebra_snippets_append(zebra_snippets *l, zint seqno, int reg_type, int ord, const char *term); + +YAZ_EXPORT void zebra_snippets_append_match(zebra_snippets *l, zint seqno, int reg_type, int ord, const char *term, int match); + +YAZ_EXPORT zebra_snippet_word *zebra_snippets_list(zebra_snippets *l); + +YAZ_EXPORT void zebra_snippets_log(zebra_snippets *l, int log_level); + +YAZ_EXPORT zebra_snippets *zebra_snippets_window(zebra_snippets *doc, zebra_snippets *hit, int window_size); diff --git a/index/sortidx.c b/index/sortidx.c index 0c4ebfc..d9c3fb8 100644 --- a/index/sortidx.c +++ b/index/sortidx.c @@ -1,4 +1,4 @@ -/* $Id: sortidx.c,v 1.14 2005-08-09 12:30:46 adam Exp $ +/* $Id: sortidx.c,v 1.15 2005-08-18 19:20:38 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -28,7 +28,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include #include -#include +#include "recindex.h" #define SORT_IDX_BLOCKSIZE 64 diff --git a/index/zsets.c b/index/zsets.c index 260f567..4094d72 100644 --- a/index/zsets.c +++ b/index/zsets.c @@ -1,4 +1,4 @@ -/* $Id: zsets.c,v 1.91 2005-08-18 12:50:18 adam Exp $ +/* $Id: zsets.c,v 1.92 2005-08-18 19:20:38 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -838,6 +838,10 @@ ZEBRA_RES resultSetRank(ZebraHandle zh, ZebraSet zebraSet, 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(); @@ -847,10 +851,7 @@ ZEBRA_RES resultSetRank(ZebraHandle zh, ZebraSet zebraSet, rset_getterms(rset, 0, 0, &n); terms = (TERMID *) nmem_malloc(nmem, sizeof(*terms)*n); rset_getterms(rset, terms, n, &numTerms); - size_t sysno_mem_index = 0; - if (zh->m_staticrank) - sysno_mem_index = 1; rank_class = zebraRankLookup(zh, rank_handler_name); if (!rank_class) diff --git a/win/makefile b/win/makefile index 71f96e7..5a9bab8 100644 --- a/win/makefile +++ b/win/makefile @@ -1,5 +1,5 @@ # Zebra makefile for MS NMAKE -# $Id: makefile,v 1.35 2005-05-13 09:41:59 adam Exp $ +# $Id: makefile,v 1.36 2005-08-18 19:20:38 adam Exp $ ########################################################### ############### Parameters @@ -327,7 +327,8 @@ ZEBRALIB_OBJS= \ $(OBJDIR)\d1_write.obj \ $(OBJDIR)\xpath.obj \ $(OBJDIR)\kcontrol.obj \ - $(OBJDIR)\limit.obj + $(OBJDIR)\limit.obj \ + $(OBJDIR)\snippet.obj ALL_OBJS=\ $(ZEBRALIB_OBJS) \ -- 1.7.10.4