X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fmarcdisp.c;h=69f33d1f1882146ab88f9e5f3f2135aa49416342;hp=ec4218ebc8e916a989b990697c0d74ebbdd29a27;hb=e615729ba0e58045756f03cb409d5adc54181750;hpb=49dfd3f8ec91ce7ced774d66f5db9a248e574bbf diff --git a/src/marcdisp.c b/src/marcdisp.c index ec4218e..69f33d1 100644 --- a/src/marcdisp.c +++ b/src/marcdisp.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: marcdisp.c,v 1.20 2005-03-07 06:07:33 adam Exp $ + * $Id: marcdisp.c,v 1.22 2005-06-07 19:25:38 adam Exp $ */ /** @@ -214,8 +214,7 @@ int yaz_marc_decode_wrbuf (yaz_marc_t mt, const char *buf, int bsize, WRBUF wr) { char str[40]; - if (mt->xml) - wrbuf_puts (wr, "\n"); + wrbuf_puts (wr, "-->\n"); } /* first pass. determine length of directory & base of data */ @@ -380,8 +378,6 @@ int yaz_marc_decode_wrbuf (yaz_marc_t mt, const char *buf, int bsize, WRBUF wr) switch(mt->xml) { case YAZ_MARC_LINE: - if (mt->debug) - wrbuf_puts (wr, "Tag: "); wrbuf_puts (wr, tag); wrbuf_puts (wr, " "); break; @@ -419,8 +415,6 @@ int yaz_marc_decode_wrbuf (yaz_marc_t mt, const char *buf, int bsize, WRBUF wr) wrbuf_putc(wr, buf[i]); break; case YAZ_MARC_LINE: - if (mt->debug) - wrbuf_puts (wr, " Ind: "); wrbuf_putc(wr, buf[i]); break; case YAZ_MARC_SIMPLEXML: @@ -448,11 +442,6 @@ int yaz_marc_decode_wrbuf (yaz_marc_t mt, const char *buf, int bsize, WRBUF wr) if (identifier_flag) wrbuf_puts (wr, "\n"); } - if (mt->xml == YAZ_MARC_LINE) - { - if (mt->debug) - wrbuf_puts (wr, " Fields: "); - } if (identifier_flag) { while (i < end_offset && @@ -572,7 +561,10 @@ int yaz_marc_decode_wrbuf (yaz_marc_t mt, const char *buf, int bsize, WRBUF wr) int yaz_marc_decode_buf (yaz_marc_t mt, const char *buf, int bsize, char **result, int *rsize) { - int r = yaz_marc_decode_wrbuf(mt, buf, bsize, mt->m_wr); + int r; + + wrbuf_rewind(mt->m_wr); + r = yaz_marc_decode_wrbuf(mt, buf, bsize, mt->m_wr); if (result) *result = wrbuf_buf(mt->m_wr); if (rsize)