X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=util%2Fmarcdisp.c;h=840c0b1c4f6d52c1c31e6765280a4a1c1235d7cd;hb=141269ce5f566fcd7ed188ebe9bb878bf4b32018;hp=f728d12a699ac2754929a71365ac07c661fc648e;hpb=08e514143cd7d16db15c1c3d4d15d687f561c047;p=yaz-moved-to-github.git diff --git a/util/marcdisp.c b/util/marcdisp.c index f728d12..840c0b1 100644 --- a/util/marcdisp.c +++ b/util/marcdisp.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2002, Index Data * See the file LICENSE for details. * - * $Id: marcdisp.c,v 1.18 2002-02-28 13:21:16 adam Exp $ + * $Id: marcdisp.c,v 1.19 2002-03-18 18:11:45 adam Exp $ */ #if HAVE_CONFIG_H @@ -56,9 +56,28 @@ int yaz_marc_decode (const char *buf, WRBUF wr, int debug, int bsize, int xml) length_starting = atoi_n (buf+21, 1); length_implementation = atoi_n (buf+22, 1); + if (xml) + { + char str[40]; + int i; + wrbuf_puts (wr, "\n"); + } if (debug) { char str[40]; + + if (xml) + wrbuf_puts (wr, "\n"); } + for (entry_p = 24; buf[entry_p] != ISO2709_FS; ) { entry_p += 3+length_data_entry+length_starting; @@ -95,7 +117,7 @@ int yaz_marc_decode (const char *buf, WRBUF wr, int debug, int bsize, int xml) tag[3] = '\0'; if (xml) { - wrbuf_puts (wr, ""); @@ -174,7 +196,7 @@ int yaz_marc_decode (const char *buf, WRBUF wr, int debug, int bsize, int xml) i++; } if (xml) - wrbuf_puts (wr, "\n"); + wrbuf_puts (wr, "\n"); } else { @@ -191,6 +213,8 @@ int yaz_marc_decode (const char *buf, WRBUF wr, int debug, int bsize, int xml) if (xml) wrbuf_puts (wr, "\n"); } + if (xml) + wrbuf_puts (wr, "\n"); wrbuf_puts (wr, ""); return record_length; }