From: Adam Dickmeiss Date: Fri, 4 Oct 2002 11:24:55 +0000 (+0000) Subject: OAI MARC fix X-Git-Tag: YAZ.1.9.1~6 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=835cca40fdee0597232361c5129cf47160d77e79 OAI MARC fix --- diff --git a/util/marcdisp.c b/util/marcdisp.c index 78b4833..342e5d1 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.21 2002-10-04 10:19:58 adam Exp $ + * $Id: marcdisp.c,v 1.22 2002-10-04 11:24:55 adam Exp $ */ #if HAVE_CONFIG_H @@ -64,19 +64,15 @@ int yaz_marc_decode (const char *buf, WRBUF wr, int debug, int bsize, int xml) { wrbuf_puts( wr, - "\n", + sprintf (str, " status=\"%c\" type=\"%c\" catForm=\"%c\">\n", buf[5], buf[6], buf[7]); wrbuf_puts (wr, str); } @@ -279,7 +275,12 @@ int yaz_marc_decode (const char *buf, WRBUF wr, int debug, int bsize, int xml) } } if (xml) - wrbuf_puts (wr, "\n"); + { + if (xml > 1) + wrbuf_puts (wr, "\n"); + else + wrbuf_puts (wr, "\n"); + } wrbuf_puts (wr, ""); return record_length; }