From: Adam Dickmeiss Date: Wed, 24 Sep 1997 13:35:44 +0000 (+0000) Subject: Added two members to data1_marctab to ease reading of weird MARC records. X-Git-Tag: YAZ.1.8~597 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=2c73c63dbd44310ca9a06b20d82e01f7ad617ddc;p=yaz-moved-to-github.git Added two members to data1_marctab to ease reading of weird MARC records. --- diff --git a/include/data1.h b/include/data1.h index 9a3a4af..36ee806 100644 --- a/include/data1.h +++ b/include/data1.h @@ -24,7 +24,10 @@ * OF THIS SOFTWARE. * * $Log: data1.h,v $ - * Revision 1.26 1997-09-17 12:10:32 adam + * Revision 1.27 1997-09-24 13:35:44 adam + * Added two members to data1_marctab to ease reading of weird MARC records. + * + * Revision 1.26 1997/09/17 12:10:32 adam * YAZ version 1.4. * * Revision 1.25 1997/09/05 09:50:55 adam @@ -211,6 +214,8 @@ typedef struct data1_marctab int length_implementation; char future_use[2]; + int force_indicator_length; + int force_identifier_length; struct data1_marctab *next; } data1_marctab; diff --git a/include/marcdisp.h b/include/marcdisp.h index c6d622b..db7197e 100644 --- a/include/marcdisp.h +++ b/include/marcdisp.h @@ -24,7 +24,10 @@ * OF THIS SOFTWARE. * * $Log: marcdisp.h,v $ - * Revision 1.7 1997-09-04 07:57:51 adam + * Revision 1.8 1997-09-24 13:35:45 adam + * Added two members to data1_marctab to ease reading of weird MARC records. + * + * Revision 1.7 1997/09/04 07:57:51 adam * Definition of ISO2709 control characters to this file. * * Revision 1.6 1997/09/01 08:49:49 adam @@ -58,6 +61,7 @@ extern "C" { #endif YAZ_EXPORT int marc_display (const char *buf, FILE *outf); +YAZ_EXPORT int marc_display_ex (const char *buf, FILE *outf, int debug); #define ISO2709_RS 035 #define ISO2709_FS 036 diff --git a/retrieval/d1_marc.c b/retrieval/d1_marc.c index 69a06d6..3c65dfe 100644 --- a/retrieval/d1_marc.c +++ b/retrieval/d1_marc.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: d1_marc.c,v $ - * Revision 1.8 1997-09-17 12:10:37 adam + * Revision 1.9 1997-09-24 13:35:45 adam + * Added two members to data1_marctab to ease reading of weird MARC records. + * + * Revision 1.8 1997/09/17 12:10:37 adam * YAZ version 1.4. * * Revision 1.7 1997/09/05 09:50:57 adam @@ -71,6 +74,8 @@ data1_marctab *data1_read_marctab (data1_handle dh, const char *file) strcpy(res->implementation_codes, " "); res->indicator_length = 2; res->identifier_length = 2; + res->force_indicator_length = -1; + res->force_identifier_length = -1; strcpy(res->user_systems, "z "); while ((argc = readconf_line(f, line, 512, argv, 50))) @@ -133,6 +138,24 @@ data1_marctab *data1_read_marctab (data1_handle dh, const char *file) } strncpy(res->future_use, argv[1], 2); } + else if (!strcmp(argv[0], "force-indicator-length")) + { + if (argc != 2) + { + logf(LOG_WARN, "%s: Bad future-use"); + continue; + } + res->force_indicator_length = atoi(argv[1]); + } + else if (!strcmp(argv[0], "force-identifier-length")) + { + if (argc != 2) + { + logf(LOG_WARN, "%s: Bad future-use"); + continue; + } + res->force_identifier_length = atoi(argv[1]); + } else logf(LOG_WARN, "%s: Bad directive '%s'", file, argv[0]);