X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fmarcread.c;h=0a125650d55d4fc101b6b738596bef3e45ba6024;hb=131e8143a9b8da294d582f0793833679101a2672;hp=24f8e4620be5ea8376d0ac4e8e0466b15f386005;hpb=59e342c979248e16031fc537c7d7b6744da93b2c;p=idzebra-moved-to-github.git diff --git a/index/marcread.c b/index/marcread.c index 24f8e46..0a12565 100644 --- a/index/marcread.c +++ b/index/marcread.c @@ -1,4 +1,4 @@ -/* $Id: marcread.c,v 1.7 2007-03-08 13:18:35 adam Exp $ +/* $Id: marcread.c,v 1.9 2007-03-19 21:57:25 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -772,14 +772,15 @@ static void parse_data1_tree(struct grs_read_info *p, const char *mc_stmnt, 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 @@ -790,7 +791,7 @@ static void parse_data1_tree(struct grs_read_info *p, const char *mc_stmnt, } 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)