X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=data1%2Fd1_marc.c;h=a228413642ba37be67f9bb0cd71025b26ae3faff;hb=fb791f9a754adf7b26695fdb1ddd0fdee9bf28f9;hp=8cd728bdcbf2a7dbbef1d0f61c1bd1b41851dc10;hpb=97a7adeb9e5059463f039495cc01cfa448463a27;p=idzebra-moved-to-github.git diff --git a/data1/d1_marc.c b/data1/d1_marc.c index 8cd728b..a228413 100644 --- a/data1/d1_marc.c +++ b/data1/d1_marc.c @@ -1,5 +1,5 @@ /* This file is part of the Zebra server. - Copyright (C) 1995-2008 Index Data + Copyright (C) 1994-2009 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -148,6 +148,21 @@ data1_marctab *data1_read_marctab (data1_handle dh, const char *file) } res->force_identifier_length = atoi(argv[1]); } + else if (!strcmp(*argv, "implementation-codes")) + { + if (argc != 2) + { + yaz_log(YLOG_WARN, "%s:%d: Missing arg for %s", file, lineno, + *argv); + continue; + } + /* up to 4 characters .. space pad */ + if (strlen(argv[1]) > 4) + yaz_log(YLOG_WARN, "%s:%d: Max 4 characters for " + "implementation-codes", file, lineno); + else + memcpy(res->implementation_codes, argv[1], strlen(argv[1])); + } else yaz_log(YLOG_WARN, "%s:%d: Unknown directive '%s'", file, lineno, *argv); @@ -462,6 +477,7 @@ char *data1_nodetomarc(data1_handle dh, data1_marctab *p, data1_node *n, /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab