-/* $Id: d1_absyn.c,v 1.9.2.10 2006-09-29 10:02:42 adam Exp $
+/* $Id: d1_absyn.c,v 1.9.2.11 2006-10-26 23:46:48 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
Index Data Aps
return argc;
}
+data1_marctab *data1_absyn_getmarctab(data1_handle dh, data1_node *root)
+{
+ if (root->u.root.absyn)
+ return root->u.root.absyn->marc;
+ return 0;
+}
+
+data1_element *data1_absyn_getelements(data1_handle dh,
+ data1_node *root)
+{
+ if (root->u.root.absyn)
+ return root->u.root.absyn->main_elements;
+ return 0;
+}
data1_absyn *data1_read_absyn (data1_handle dh, const char *file,
int file_must_exist)
-/* $Id: data1.h,v 1.9.2.4 2006-09-29 10:02:43 adam Exp $
+/* $Id: data1.h,v 1.9.2.5 2006-10-26 23:46:48 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
YAZ_EXPORT data1_absyn *data1_get_absyn (data1_handle dh, const char *name);
+YAZ_EXPORT
+data1_marctab *data1_absyn_getmarctab(data1_handle dh, data1_node *root);
+
+YAZ_EXPORT
+data1_element *data1_absyn_getelements(data1_handle dh,
+ data1_node *root);
+
YAZ_EXPORT data1_node *data1_search_tag (data1_handle dh, data1_node *n,
const char *tag);
YAZ_EXPORT data1_node *data1_mk_tag_uni (data1_handle dh, NMEM nmem,
-/* $Id: marcread.c,v 1.24.2.5 2006-10-12 10:13:33 adam Exp $
+/* $Id: marcread.c,v 1.24.2.6 2006-10-26 23:46:49 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
else
res_top = data1_mk_tag (p->dh, p->mem, absynName, 0, res_root);
- if ((marctab = res_root->u.root.absyn->marc))
+ if ((marctab = data1_absyn_getmarctab(p->dh, res_root)))
{
memcpy(marctab->leader, buf, 24);
memcpy(marctab->implementation_codes, buf+6, 4);
if (!root)
return 0;
- for (e=root->u.root.absyn->main_elements; e; e=e->next)
+ for (e = data1_absyn_getelements(p->dh, root); e; e=e->next)
{
data1_tag *tag = e->tag;
if (!root)
return 0;
- for (e=root->u.root.absyn->main_elements; e; e=e->next)
+ for (e = data1_absyn_getelements(p->dh, root); e; e=e->next)
{
data1_tag *tag = e->tag;