-/* $Id: d1_read.c,v 1.8 2004-07-26 13:51:42 adam Exp $
+/* $Id: d1_read.c,v 1.11 2004-11-19 10:26:53 heikki Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
#include <yaz/xmalloc.h>
#include <yaz/yaz-util.h>
-#include <yaz/log.h>
-#include <data1.h>
+#include <yaz/ylog.h>
+#include <d1_absyn.h>
data1_node *data1_get_root_tag (data1_handle dh, data1_node *n)
{
r->u.preprocess.attributes = 0;
break;
default:
- logf (LOG_WARN, "data_mk_node_type. bad type = %d\n", type);
+ yaz_log (YLOG_WARN, "data_mk_node_type. bad type = %d\n", type);
}
}
data1_node *res;
if (!absyn)
{
- yaz_log(LOG_WARN, "Unable to acquire abstract syntax " "for '%s'",
+ yaz_log(YLOG_WARN, "Unable to acquire abstract syntax " "for '%s'",
name);
/* It's now OK for a record not to have an absyn */
}
return data1_add_insert_taggeddata (dh, at, tagname, m, 1, 0);
}
-data1_node *data1_mk_tag_data_int (data1_handle dh, data1_node *at,
- const char *tag, int num,
+data1_node *data1_mk_tag_data_zint (data1_handle dh, data1_node *at,
+ const char *tag, zint num,
NMEM nmem)
{
data1_node *node_data;
return 0;
node_data->u.data.what = DATA1I_num;
node_data->u.data.data = node_data->lbuf;
- sprintf (node_data->u.data.data, "%d", num);
+ sprintf (node_data->u.data.data, ZINT_FORMAT, num);
node_data->u.data.len = strlen (node_data->u.data.data);
return node_data;
}
+data1_node *data1_mk_tag_data_int (data1_handle dh, data1_node *at,
+ const char *tag, int num,
+ NMEM nmem)
+{
+ return data1_mk_tag_data_zint(dh, at, tag, num, nmem);
+}
+
data1_node *data1_mk_tag_data_oid (data1_handle dh, data1_node *at,
const char *tag, Odr_oid *oid,
NMEM nmem)
}
if (amp || c != '>')
{
- yaz_log(LOG_WARN, "d1: %d: Malformed tag", line);
+ yaz_log(YLOG_WARN, "d1: %d: Malformed tag", line);
return 0;
}
else
}
if (i != level)
{
- yaz_log (LOG_WARN, "%d: no begin tag for %s",
+ yaz_log (YLOG_WARN, "%d: no begin tag for %s",
line, tag);
break;
}
if (sscanf(args, "%s %s %n", tclass, type, &val_offset) != 2)
{
- yaz_log(LOG_WARN, "Malformed variant triple at '%s'", tag);
+ yaz_log(YLOG_WARN, "Malformed variant triple at '%s'", tag);
continue;
}
if (!(tp =