X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=util%2Fmarcdisp.c;h=ab2ef2f3eebee4982a1f5ba1ae85d90ae2bc03c7;hp=63956f7211fd5413297f2883f1b65030232467f4;hb=69bcd68523a9a8da083faef16887100369152673;hpb=b638e7e4efc850ee6446b14fa45c66690377ccf2 diff --git a/util/marcdisp.c b/util/marcdisp.c index 63956f7..ab2ef2f 100644 --- a/util/marcdisp.c +++ b/util/marcdisp.c @@ -3,7 +3,10 @@ * See the file LICENSE for details. * * $Log: marcdisp.c,v $ - * Revision 1.13 2001-10-15 19:36:48 adam + * Revision 1.14 2001-10-23 21:00:20 adam + * Old Z39.50 codecs gone. Added ZOOM. WRBUF MARC display util. + * + * Revision 1.13 2001/10/15 19:36:48 adam * New function marc_display_wrbuf. * * Revision 1.12 2000/10/02 11:07:44 adam @@ -56,7 +59,8 @@ #include #include -int marc_display_wrbuf (const char *buf, WRBUF wr, int debug) +int marc_display_wrbuf (const char *buf, WRBUF wr, int debug, + int bsize) { int entry_p; int record_length; @@ -79,6 +83,9 @@ int marc_display_wrbuf (const char *buf, WRBUF wr, int debug) } return -1; } + /* ballout if bsize is known and record_length is than that */ + if (bsize != -1 && record_length > bsize) + return -1; if (isdigit(buf[10])) indicator_length = atoi_n (buf+10, 1); else @@ -185,7 +192,7 @@ int marc_display_ex (const char *buf, FILE *outf, int debug) int record_length; WRBUF wrbuf = wrbuf_alloc (); - record_length = marc_display_wrbuf (buf, wrbuf, debug); + record_length = marc_display_wrbuf (buf, wrbuf, debug, -1); if (!outf) outf = stdout; if (record_length > 0)