X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=util%2Fmarcdisp.c;h=b28c88e52a85176ca36cfb365fe266fc5700b5aa;hb=506058d7a9f17fcc88f899d92476fe59cc09bdfb;hp=ab2ef2f3eebee4982a1f5ba1ae85d90ae2bc03c7;hpb=69bcd68523a9a8da083faef16887100369152673;p=yaz-moved-to-github.git diff --git a/util/marcdisp.c b/util/marcdisp.c index ab2ef2f..b28c88e 100644 --- a/util/marcdisp.c +++ b/util/marcdisp.c @@ -3,7 +3,14 @@ * See the file LICENSE for details. * * $Log: marcdisp.c,v $ - * Revision 1.14 2001-10-23 21:00:20 adam + * Revision 1.16 2002-01-22 10:54:46 adam + * MARC decode fix. Attribute set fix for scan in server. Prox logging. + * + * Revision 1.15 2001/10/29 09:17:19 adam + * New function marc_display_exl - used by YAZ client. Server returns + * bad record on position 98 (for testing). + * + * 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 @@ -94,7 +101,7 @@ int marc_display_wrbuf (const char *buf, WRBUF wr, int debug, identifier_length = atoi_n (buf+11, 1); else identifier_length = 2; - base_address = atoi_n (buf+12, 4); + base_address = atoi_n (buf+12, 5); length_data_entry = atoi_n (buf+20, 1); length_starting = atoi_n (buf+21, 1); @@ -187,12 +194,12 @@ int marc_display_wrbuf (const char *buf, WRBUF wr, int debug, return record_length; } -int marc_display_ex (const char *buf, FILE *outf, int debug) +int marc_display_exl (const char *buf, FILE *outf, int debug, int length) { int record_length; WRBUF wrbuf = wrbuf_alloc (); - record_length = marc_display_wrbuf (buf, wrbuf, debug, -1); + record_length = marc_display_wrbuf (buf, wrbuf, debug, length); if (!outf) outf = stdout; if (record_length > 0) @@ -201,6 +208,12 @@ int marc_display_ex (const char *buf, FILE *outf, int debug) return record_length; } + +int marc_display_ex (const char *buf, FILE *outf, int debug) +{ + return marc_display_exl (buf, outf, debug, -1); +} + int marc_display (const char *buf, FILE *outf) { return marc_display_ex (buf, outf, 0);