-/* $Id: zinfo.c,v 1.40 2004-08-25 09:23:36 adam Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
- Index Data Aps
+/* $Id: zinfo.c,v 1.44 2005-01-16 23:33:31 adam Exp $
+ Copyright (C) 1995-2005
+ Index Data ApS
This file is part of the Zebra server.
02111-1307, USA.
*/
-#include <stdlib.h>
+#include <sys/types.h>
#include <assert.h>
+#include <stdlib.h>
#include <string.h>
#include <time.h>
void zebraExplain_close (ZebraExplainInfo zei)
{
#if ZINFO_DEBUG
- yaz_log (LOG_LOG, "zebraExplain_close");
+ yaz_log (YLOG_LOG, "zebraExplain_close");
#endif
if (!zei)
return;
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;
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;
}
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);
"</></>\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;
}
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;
}
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);
}
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)
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);
zad->dirty = 0;
#if ZINFO_DEBUG
- logf (LOG_LOG, "zebraExplain_writeAttributeDetails");
+ yaz_log (YLOG_LOG, "zebraExplain_writeAttributeDetails");
#endif
drec = createRecord (zei->records, &zad->sysno);
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);
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 : "<unknown>");
#endif
{
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)