X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=index%2Fkcompare.c;h=82e949118d5118337a47129cfadc0036f10e5fd7;hb=05259bf944ff61befc9bee89b7377bf365b25099;hp=406ea2c877ba7fdcbd1752450e49952af314c993;hpb=e415f242d2c229cac756512570795f62f0322c30;p=idzebra-moved-to-github.git diff --git a/index/kcompare.c b/index/kcompare.c index 406ea2c..82e9491 100644 --- a/index/kcompare.c +++ b/index/kcompare.c @@ -1,4 +1,4 @@ -/* $Id: kcompare.c,v 1.42 2004-05-30 18:35:12 adam Exp $ +/* $Id: kcompare.c,v 1.44 2004-06-01 12:56:38 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -28,15 +28,22 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "index.h" #define INT_CODEC_NEW 0 - #define CODEC_INLINE inline - -void key_logdump (int logmask, const void *p) +void key_logdump_txt (int logmask, const void *p, const char *txt) { struct it_key key; + if (p) + { + memcpy (&key, p, sizeof(key)); + logf (logmask, "%7d:%-4d %s", key.sysno, key.seqno,txt); + } + else + logf(logmask, " (null) %s",txt); +} - memcpy (&key, p, sizeof(key)); - logf (logmask, "%7d s=%-4d", key.sysno, key.seqno); +void key_logdump (int logmask, const void *p) +{ + key_logdump_txt(logmask,p,""); } int key_compare_it (const void *p1, const void *p2) @@ -255,6 +262,7 @@ 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->code_start = iscz1_code_start; me->code_item = iscz1_code_item; @@ -270,6 +278,7 @@ ISAMC_M *key_isamc_m (Res res, ISAMC_M *me) isc_getmethod (me); me->compare_item = key_compare; + me->log_item = key_logdump_txt; me->code_start = iscz1_code_start; me->code_item = iscz1_code_item; @@ -286,6 +295,7 @@ ISAMD_M *key_isamd_m (Res res, ISAMD_M *me) me = isamd_getmethod (me); me->compare_item = key_compare; + me->log_item = key_logdump_txt; me->code_start = iscz1_code_start; me->code_item = iscz1_code_item;