X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fkcompare.c;h=d05ad2aa0956b013f2f2d6a0e87578f8d3106cd8;hb=a163e5642ee63cbc14ab2d44eadeb15ed167eaed;hp=94ebb50caa37d225ea9f01187f3b26f749d10591;hpb=6c9fcd3b5d3108702fa1ffc92dab4ab6060f9a19;p=idzebra-moved-to-github.git diff --git a/index/kcompare.c b/index/kcompare.c index 94ebb50..d05ad2a 100644 --- a/index/kcompare.c +++ b/index/kcompare.c @@ -1,4 +1,4 @@ -/* $Id: kcompare.c,v 1.55 2005-01-15 19:38:25 adam Exp $ +/* $Id: kcompare.c,v 1.57 2005-05-31 07:29:10 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -33,9 +33,11 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #define CODEC_INLINE #endif -void key_logdump_txt (int logmask, const void *p, const char *txt) +void key_logdump_txt(int logmask, const void *p, const char *txt) { struct it_key key; + if (!txt) + txt = "(none)"; if (p) { char formstr[128]; @@ -50,13 +52,13 @@ void key_logdump_txt (int logmask, const void *p, const char *txt) strcat(formstr, "."); sprintf(formstr + strlen(formstr), ZINT_FORMAT, key.mem[i]); } - yaz_log (logmask, "%s %s", formstr, txt); + yaz_log(logmask, "%s %s", formstr, txt); } else - yaz_log(logmask, " (null) %s",txt); + yaz_log(logmask, " (no key) %s",txt); } -void key_logdump (int logmask, const void *p) +void key_logdump(int logmask, const void *p) { key_logdump_txt(logmask, p, ""); } @@ -281,7 +283,7 @@ ISAMS_M *key_isams_m (Res res, ISAMS_M *me) ISAMC_M *key_isamc_m (Res res, ISAMC_M *me) { - isc_getmethod (me); + isamc_getmethod (me); me->compare_item = key_compare; me->log_item = key_logdump_txt;