From 3eeb964804c26b7aff33c8a383611e110a1f02ab Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 15 Feb 1995 17:45:43 +0000 Subject: [PATCH] Bug fix in iso2709 module. --- util/Makefile | 6 ++++-- util/iso2709.c | 16 ++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/util/Makefile b/util/Makefile index 7e8d4a5..55c7825 100644 --- a/util/Makefile +++ b/util/Makefile @@ -2,7 +2,10 @@ # Europagate, 1995 # # $Log: Makefile,v $ -# Revision 1.2 1995/02/10 17:05:18 adam +# Revision 1.3 1995/02/15 17:45:43 adam +# Bug fix in iso2709 module. +# +# Revision 1.2 1995/02/10 17:05:18 adam # New function iso2709_display to display MARC records in a # line-by-line format. The iso2709_cvt function no longer # prints the record to stderr. @@ -13,7 +16,6 @@ SHELL=/bin/sh INCLUDE=-I../include CFLAGS=-g -Wall -pedantic -ansi -CC=gcc TPROG1=iso2709dump LIB=../lib/util.a PO=iso2709.o iso27dis.o diff --git a/util/iso2709.c b/util/iso2709.c index bfb691f..1bd46e3 100644 --- a/util/iso2709.c +++ b/util/iso2709.c @@ -4,11 +4,14 @@ Europagate, 1994-1995. $Log: iso2709.c,v $ - Revision 1.3 1995/02/10 17:05:18 adam - New function iso2709_display to display MARC records in a - line-by-line format. The iso2709_cvt function no longer - prints the record to stderr. + Revision 1.4 1995/02/15 17:45:44 adam + Bug fix in iso2709 module. + * Revision 1.3 1995/02/10 17:05:18 adam + * New function iso2709_display to display MARC records in a + * line-by-line format. The iso2709_cvt function no longer + * prints the record to stderr. + * * Revision 1.2 1995/02/10 16:50:32 adam * Indicator field moved to 'struct iso2709_dir' from 'struct * iso2709_field'. @@ -157,14 +160,15 @@ Iso2709Rec iso2709_cvt (const char *buf) (*fpp)->identifier = NULL; dpos_n = dpos; - while (buf[dpos_n] != ISO2709_FS && buf[dpos_n] != ISO2709_IDFS) + while (buf[dpos_n] != ISO2709_FS && buf[dpos_n] != ISO2709_IDFS && + buf[dpos_n] != ISO2709_RS) dpos_n++; (*fpp)->data = malloc (dpos_n - dpos + 1); strncpyx ((*fpp)->data, buf+dpos, dpos_n - dpos); dpos = dpos_n; - if (buf[dpos] == ISO2709_FS) + if (buf[dpos] == ISO2709_FS || buf[dpos] == ISO2709_RS) break; fpp = &(*fpp)->next; -- 1.7.10.4