X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fmarcdisp.c;h=2b06b2ad58fbcd2bcb42cee1996caf1940e2739e;hp=da04f45afb09a75b4303638df1ea0d15fe2c3717;hb=fc6d778b923000b5c6ad8e108b0b184178a9d33f;hpb=a0e27aac0589d493172c73f6660b844fc6460d7c diff --git a/src/marcdisp.c b/src/marcdisp.c index da04f45..2b06b2a 100644 --- a/src/marcdisp.c +++ b/src/marcdisp.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: marcdisp.c,v 1.29 2006-05-02 20:47:45 adam Exp $ + * $Id: marcdisp.c,v 1.31 2006-07-06 10:17:53 adam Exp $ */ /** @@ -26,7 +26,7 @@ #include #include -#if HAVE_XML2 +#if YAZ_HAVE_XML2 #include #include #endif @@ -181,7 +181,7 @@ void yaz_marc_add_controlfield(yaz_marc_t mt, const char *tag, } } -#if HAVE_XML2 +#if YAZ_HAVE_XML2 void yaz_marc_add_controlfield_xml(yaz_marc_t mt, const xmlNode *ptr_tag, const xmlNode *ptr_data) { @@ -206,7 +206,7 @@ void yaz_marc_add_datafield(yaz_marc_t mt, const char *tag, mt->subfield_pp = &n->u.datafield.subfields; } -#if HAVE_XML2 +#if YAZ_HAVE_XML2 void yaz_marc_add_datafield_xml(yaz_marc_t mt, const xmlNode *ptr_tag, const char *indicator, size_t indicator_len) { @@ -548,7 +548,9 @@ static int yaz_marc_write_marcxml_ns(yaz_marc_t mt, WRBUF wr, wrbuf_printf(wr, "\n"); break; case YAZ_MARC_COMMENT: - wrbuf_printf(wr, "\n", n->u.comment); + wrbuf_printf(wr, "\n"); break; case YAZ_MARC_LEADER: wrbuf_printf(wr, " "); @@ -670,11 +672,15 @@ int yaz_marc_write_iso2709(yaz_marc_t mt, WRBUF wr) wrbuf_printf(wr, "%.*s", indicator_length, n->u.datafield.indicator); for (s = n->u.datafield.subfields; s; s = s->next) - wrbuf_printf(wr, "%c%s", ISO2709_IDFS, s->code_data); + { + wrbuf_printf(wr, "%c", ISO2709_IDFS); + wrbuf_puts(wr, s->code_data); + } wrbuf_printf(wr, "%c", ISO2709_FS); break; case YAZ_MARC_CONTROLFIELD: - wrbuf_printf(wr, "%s%c", n->u.controlfield.data, ISO2709_FS); + wrbuf_puts(wr, n->u.controlfield.data); + wrbuf_printf(wr, "%c", ISO2709_FS); break; case YAZ_MARC_COMMENT: break; @@ -686,7 +692,7 @@ int yaz_marc_write_iso2709(yaz_marc_t mt, WRBUF wr) return 0; } -#if HAVE_XML2 +#if YAZ_HAVE_XML2 int yaz_marc_read_xml_subfields(yaz_marc_t mt, const xmlNode *ptr) { for (; ptr; ptr = ptr->next)