* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_handle.c,v $
- * Revision 1.1 1997-09-17 12:28:24 adam
+ * Revision 1.2 1997-09-30 11:50:04 adam
+ * Added handler data1_get_map_buf that is used by data1_nodetomarc.
+ *
+ * Revision 1.1 1997/09/17 12:28:24 adam
* Introduced new 'global' data1 handle.
*
*/
struct data1_handle_info {
WRBUF wrbuf;
char *tab_path;
+
char *read_buf;
int read_len;
+
data1_absyn_cache absyn_cache;
+
+ char *map_buf;
+ int map_len;
+
NMEM mem;
};
p->wrbuf = wrbuf_alloc();
p->read_buf = NULL;
p->read_len = 0;
+ p->map_buf = NULL;
+ p->map_len = 0;
p->absyn_cache = NULL;
p->mem = nmem_create ();
return p;
xfree (dh->tab_path);
if (dh->read_buf)
xfree (dh->read_buf);
+ if (dh->map_buf)
+ xfree (dh->map_buf);
nmem_destroy (dh->mem);
xfree (dh);
char **data1_get_read_buf (data1_handle dp, int **lenp)
{
*lenp = &dp->read_len;
+ logf (LOG_DEBUG, "data1_get_read_buf lenp=%u", **lenp);
return &dp->read_buf;
}
+char **data1_get_map_buf (data1_handle dp, int **lenp)
+{
+ *lenp = &dp->map_len;
+ logf (LOG_DEBUG, "data1_get_map_buf lenp=%u", **lenp);
+ return &dp->map_buf;
+}
void data1_set_tabpath (data1_handle dp, const char *p)
{
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_marc.c,v $
- * Revision 1.9 1997-09-24 13:35:45 adam
+ * Revision 1.10 1997-09-30 11:50:04 adam
+ * Added handler data1_get_map_buf that is used by data1_nodetomarc.
+ *
+ * Revision 1.9 1997/09/24 13:35:45 adam
* Added two members to data1_marctab to ease reading of weird MARC records.
*
* Revision 1.8 1997/09/17 12:10:37 adam
char *op;
data1_node *field, *subf;
+ logf (LOG_DEBUG, "nodetomarc");
for (field = n->child; field; field = field->next)
{
if (field->which != DATA1N_tag)
int selected, int *len)
{
int *size;
- char **buf = data1_get_read_buf (dh, &size);
+ char **buf = data1_get_map_buf (dh, &size);
*len = nodetomarc(p, n, selected, buf, size);
return *buf;