From: Adam Dickmeiss Date: Fri, 12 Apr 2002 14:55:22 +0000 (+0000) Subject: key_print_it X-Git-Tag: ZEBRA.1.3.0~96 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=5e7516d00451ada59a311fad05e8e3959242cdc7;p=idzebra-moved-to-github.git key_print_it --- diff --git a/include/rsbetween.h b/include/rsbetween.h index ecea5b8..c8622a8 100644 --- a/include/rsbetween.h +++ b/include/rsbetween.h @@ -3,7 +3,7 @@ * All rights reserved. * Sebastian Hammer, Adam Dickmeiss, Heikki Levanto * - * $Id: rsbetween.h,v 1.2 2002-04-12 14:51:34 heikki Exp $ + * $Id: rsbetween.h,v 1.3 2002-04-12 14:55:22 adam Exp $ * * Result set that returns anything in between two things, * typically start-tag, stuff, end-tag. @@ -28,7 +28,7 @@ typedef struct rset_between_parms RSET rset_m; RSET rset_r; int (*cmp)(const void *p1, const void *p2); - char* (*printer)(void *p,char *buf); /* prints p into buf and returns buf */ + char* (*printer)(const void *p,char *buf); /* prints p into buf and returns buf */ } rset_between_parms; #ifdef __cplusplus diff --git a/index/index.h b/index/index.h index f3ae7f6..c70f783 100644 --- a/index/index.h +++ b/index/index.h @@ -2,7 +2,7 @@ * Copyright (C) 1995-2002, Index Data * All rights reserved. * Sebastian Hammer, Adam Dickmeiss, Heikki Levanto - * $Id: index.h,v 1.78 2002-04-12 14:40:42 adam Exp $ + * $Id: index.h,v 1.79 2002-04-12 14:55:22 adam Exp $ */ #ifndef INDEX_H @@ -86,6 +86,7 @@ void repositoryShow (ZebraHandle zh); int key_open (ZebraHandle zh, int mem); int key_close (ZebraHandle zh); int key_compare (const void *p1, const void *p2); +char *key_print_it (const void *p, char *buf); int key_get_pos (const void *p); int key_compare_it (const void *p1, const void *p2); int key_qsort_compare (const void *p1, const void *p2); diff --git a/index/kcompare.c b/index/kcompare.c index f39b750..936929f 100644 --- a/index/kcompare.c +++ b/index/kcompare.c @@ -42,6 +42,13 @@ int key_compare_it (const void *p1, const void *p2) return 0; } +char *key_print_it (const void *p, char *buf) +{ + const struct it_key *i = p; + sprintf (buf, "%d:%d", i->sysno, i->seqno); + return buf; +} + int key_compare (const void *p1, const void *p2) { struct it_key i1, i2; @@ -290,7 +297,10 @@ int key_SU_decode (int *ch, const unsigned char *out) /* * $Log: kcompare.c,v $ - * Revision 1.38 2002-04-05 08:46:26 adam + * Revision 1.39 2002-04-12 14:55:22 adam + * key_print_it + * + * Revision 1.38 2002/04/05 08:46:26 adam * Zebra with full functionality * * Revision 1.37 2001/11/19 23:08:30 adam diff --git a/index/zrpn.c b/index/zrpn.c index 06f4259..bb8dc7a 100644 --- a/index/zrpn.c +++ b/index/zrpn.c @@ -3,7 +3,7 @@ * All rights reserved. * Sebastian Hammer, Adam Dickmeiss * - * $Id: zrpn.c,v 1.113 2002-04-12 14:40:42 adam Exp $ + * $Id: zrpn.c,v 1.114 2002-04-12 14:55:22 adam Exp $ */ #include #include @@ -2034,6 +2034,7 @@ static RSET rpn_search_xpath (ZebraHandle zh, Z_AttributesPlusTerm *zapt, parms.rset_l = rset_start_tag; parms.rset_m = rset; parms.rset_r = rset_end_tag; + parms.printer = key_print_it; yaz_log (LOG_LOG, "rpn_search_xpath 4"); rset = rset_create (rset_kind_between, &parms); }