X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=recctrl%2Fmarcread.c;h=2efa90df26342d64ced0a6271d187cf1ebd45915;hb=067b55382bc9916b3f7dcd473512c703d4de4a5d;hp=44d93f552e86e0b61b7343eed4730c7f51166bc7;hpb=b9093505b17a074e79137ed64595c8269f77d330;p=idzebra-moved-to-github.git diff --git a/recctrl/marcread.c b/recctrl/marcread.c index 44d93f5..2efa90d 100644 --- a/recctrl/marcread.c +++ b/recctrl/marcread.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: marcread.c,v $ - * Revision 1.2 1997-09-17 12:19:21 adam + * Revision 1.3 1997-09-24 13:36:51 adam + * *** empty log message *** + * + * Revision 1.2 1997/09/17 12:19:21 adam * Zebra version corresponds to YAZ version 1.4. * Changed Zebra server so that it doesn't depend on global common_resource. * @@ -123,6 +126,7 @@ data1_node *grs_read_marc (struct grs_read_info *p) data1_node *res_root; data1_absyn *absyn; char *absynName; + data1_marctab *marctab; if ((*p->readf)(p->fh, buf, 5) != 5) return NULL; @@ -158,12 +162,19 @@ data1_node *grs_read_marc (struct grs_read_info *p) strcpy (res_root->u.root.type, absynName); res_root->u.root.absyn = absyn; - indicator_length = atoi_n (buf+10, 1); - identifier_length = atoi_n (buf+11, 1); + marctab = absyn->marc; + + if (marctab && marctab->force_indicator_length >= 0) + indicator_length = marctab->force_indicator_length; + else + indicator_length = atoi_n (buf+10, 1); + if (marctab && marctab->force_identifier_length >= 0) + identifier_length = marctab->force_identifier_length; + else + identifier_length = atoi_n (buf+11, 1); base_address = atoi_n (buf+12, 4); - length_data_entry = atoi_n (buf+20, 1); - length_data_entry = atoi_n (buf+20, 1); + length_data_entry = atoi_n (buf+20, 1); length_starting = atoi_n (buf+21, 1); length_implementation = atoi_n (buf+22, 1);