-/* $Id: marcread.c,v 1.7 2007-03-08 13:18:35 adam Exp $
- Copyright (C) 1995-2007
- Index Data ApS
-
-This file is part of the Zebra server.
+/* This file is part of the Zebra server.
+ Copyright (C) 1995-2008 Index Data
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
field = cat_field(p, pf, buf, field);
- pb = wrbuf_buf(buf);
+ wrbuf_cstr(buf);
+ pb = wrbuf_buf(buf);
for (pb = strtok(pb, "\n"); pb; pb = strtok(NULL, "\n"))
{
- if (!is_empty(pb))
- {
- new = data1_mk_tag_n(p->dh, p->mem, mc_stmnt, strlen(mc_stmnt), 0, top);
- data1_mk_text_n(p->dh, p->mem, pb, strlen(pb), new);
- }
+ if (!is_empty(pb))
+ {
+ new = data1_mk_tag_n(p->dh, p->mem, mc_stmnt, strlen(mc_stmnt), 0, top);
+ data1_mk_text_n(p->dh, p->mem, pb, strlen(pb), new);
+ }
}
}
else
}
mc_destroy_field(pf);
mc_destroy_context(c);
- wrbuf_free(buf, 1);
+ wrbuf_destroy(buf);
}
data1_node *grs_read_marcxml(struct grs_read_info *p)