X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fzinfo.c;h=d9fce2bc03c3829f3abab790f2a44bb21482ea55;hb=34c9e6d1eb1fdb87872d35538106b15e613cdd3d;hp=d40fbc3a96e99396ff373c85b39b5d571c5240b4;hpb=2e4e9c6def27f1e1463dcb6f205fab6a98054f38;p=idzebra-moved-to-github.git diff --git a/index/zinfo.c b/index/zinfo.c index d40fbc3..d9fce2b 100644 --- a/index/zinfo.c +++ b/index/zinfo.c @@ -1,4 +1,4 @@ -/* $Id: zinfo.c,v 1.38 2004-08-04 08:35:23 adam Exp $ +/* $Id: zinfo.c,v 1.41 2004-11-19 10:27:05 heikki Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -25,7 +25,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include -#include +#include #include "zinfo.h" #define ZINFO_DEBUG 0 @@ -198,7 +198,7 @@ void zebraExplain_flush (ZebraExplainInfo zei, void *handle) void zebraExplain_close (ZebraExplainInfo zei) { #if ZINFO_DEBUG - yaz_log (LOG_LOG, "zebraExplain_close"); + yaz_log (YLOG_LOG, "zebraExplain_close"); #endif if (!zei) return; @@ -332,7 +332,7 @@ ZebraExplainInfo zebraExplain_open ( NMEM nmem = nmem_create (); #if ZINFO_DEBUG - logf (LOG_LOG, "zebraExplain_open wr=%d", writeFlag); + yaz_log (YLOG_LOG, "zebraExplain_open wr=%d", writeFlag); #endif zei = (ZebraExplainInfo) nmem_malloc (nmem, sizeof(*zei)); zei->write_flag = writeFlag; @@ -380,7 +380,7 @@ ZebraExplainInfo zebraExplain_open ( if (!zei->data1_target) #endif { - logf (LOG_FATAL, "Explain schema missing. Check profilePath"); + yaz_log (YLOG_FATAL, "Explain schema missing. Check profilePath"); nmem_destroy (zei->nmem); return 0; } @@ -462,7 +462,7 @@ ZebraExplainInfo zebraExplain_open ( np = np->child; assert (np && np->which == DATA1N_data); zei->runNumber = atoi_zn (np->u.data.data, np->u.data.len); - yaz_log (LOG_DEBUG, "read runnumber=" ZINT_FORMAT, zei->runNumber); + yaz_log (YLOG_DEBUG, "read runnumber=" ZINT_FORMAT, zei->runNumber); *zdip = NULL; } rec_rm (&trec); @@ -487,7 +487,7 @@ ZebraExplainInfo zebraExplain_open ( "\n" ); if (!zei->data1_target) { - logf (LOG_FATAL, "Explain schema missing. Check profilePath"); + yaz_log (YLOG_FATAL, "Explain schema missing. Check profilePath"); nmem_destroy (zei->nmem); return 0; } @@ -596,7 +596,7 @@ static void zebraExplain_readAttributeDetails (ZebraExplainInfo zei, node_use->u.data.len); (*zsuip)->info.ordinal = atoi_n (node_ordinal->u.data.data, node_ordinal->u.data.len); - logf (LOG_DEBUG, "set=%d use=%d ordinal=%d", + yaz_log (YLOG_DEBUG, "set=%d use=%d ordinal=%d", (*zsuip)->info.set, (*zsuip)->info.use, (*zsuip)->info.ordinal); zsuip = &(*zsuip)->next; } @@ -703,19 +703,19 @@ int zebraExplain_curDatabase (ZebraExplainInfo zei, const char *database) if (!zdi) return -1; #if ZINFO_DEBUG - logf (LOG_LOG, "zebraExplain_curDatabase: %s", database); + yaz_log (YLOG_LOG, "zebraExplain_curDatabase: %s", database); #endif if (zdi->readFlag) { #if ZINFO_DEBUG - logf (LOG_LOG, "zebraExplain_readDatabase: %s", database); + yaz_log (YLOG_LOG, "zebraExplain_readDatabase: %s", database); #endif zebraExplain_readDatabase (zei, zdi); } if (zdi->attributeDetails->readFlag) { #if ZINFO_DEBUG - logf (LOG_LOG, "zebraExplain_readAttributeDetails: %s", database); + yaz_log (YLOG_LOG, "zebraExplain_readAttributeDetails: %s", database); #endif zebraExplain_readAttributeDetails (zei, zdi->attributeDetails); } @@ -787,7 +787,7 @@ int zebraExplain_newDatabase (ZebraExplainInfo zei, const char *database, database_n = database; #if ZINFO_DEBUG - logf (LOG_LOG, "zebraExplain_newDatabase: %s", database); + yaz_log (YLOG_LOG, "zebraExplain_newDatabase: %s", database); #endif assert (zei); for (zdi = zei->databaseInfo; zdi; zdi=zdi->next) @@ -916,7 +916,7 @@ static void zebraExplain_writeCategoryList (ZebraExplainInfo zei, node_categoryList = zcl->data1_categoryList; #if ZINFO_DEBUG - logf (LOG_LOG, "zebraExplain_writeCategoryList"); + yaz_log (YLOG_LOG, "zebraExplain_writeCategoryList"); #endif drec = createRecord (zei->records, &sysno); @@ -970,7 +970,7 @@ static void zebraExplain_writeAttributeDetails (ZebraExplainInfo zei, zad->dirty = 0; #if ZINFO_DEBUG - logf (LOG_LOG, "zebraExplain_writeAttributeDetails"); + yaz_log (YLOG_LOG, "zebraExplain_writeAttributeDetails"); #endif drec = createRecord (zei->records, &zad->sysno); @@ -1098,7 +1098,7 @@ static void zebraExplain_writeDatabase (ZebraExplainInfo zei, zdi->dirty = 0; #if ZINFO_DEBUG - logf (LOG_LOG, "zebraExplain_writeDatabase %s", zdi->databaseName); + yaz_log (YLOG_LOG, "zebraExplain_writeDatabase %s", zdi->databaseName); #endif drec = createRecord (zei->records, &zdi->sysno); assert (zdi->data1_database); @@ -1182,7 +1182,7 @@ static void zebraExplain_writeAttributeSet (ZebraExplainInfo zei, attset = data1_attset_search_id (zei->dh, entp->value); #if ZINFO_DEBUG - logf (LOG_LOG, "zebraExplain_writeAttributeSet %s", + yaz_log (YLOG_LOG, "zebraExplain_writeAttributeSet %s", attset ? attset->name : ""); #endif @@ -1430,7 +1430,7 @@ void zebraExplain_recordCountIncrement (ZebraExplainInfo zei, int adjust_num) } } -int zebraExplain_runNumberIncrement (ZebraExplainInfo zei, int adjust_num) +zint zebraExplain_runNumberIncrement (ZebraExplainInfo zei, int adjust_num) { if (adjust_num) { @@ -1459,7 +1459,7 @@ static void att_loadset(void *p, const char *n, const char *name) { data1_handle dh = (data1_handle) p; if (!data1_get_attset (dh, name)) - logf (LOG_WARN, "Directive attset failed for %s", name); + yaz_log (YLOG_WARN, "Directive attset failed for %s", name); } void zebraExplain_loadAttsets (data1_handle dh, Res res)