X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fmarc_read_line.c;h=eefeb84f0ce6bdc7ca8282d24346c7ea437acfea;hp=2d204ef93fab243996a18f84edd711797aeea9ef;hb=a85807bde8a4a08706d266bd7dd089fb6778e281;hpb=e9b8966d4ef4572814a7e185aa7ac618761f422d diff --git a/src/marc_read_line.c b/src/marc_read_line.c index 2d204ef..eefeb84 100644 --- a/src/marc_read_line.c +++ b/src/marc_read_line.c @@ -1,8 +1,6 @@ -/* - * Copyright (C) 1995-2007, Index Data ApS +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2010 Index Data * See the file LICENSE for details. - * - * $Id: marc_read_line.c,v 1.6 2007-03-18 13:00:37 adam Exp $ */ /** @@ -146,7 +144,7 @@ int yaz_marc_read_line(yaz_marc_t mt, &length_implementation); header_created = 1; } - else if (line_len > 5 && line[0] != ' ' && line[1] != ' ' + else if (line_len > 4 && line[0] != ' ' && line[1] != ' ' && line[2] != ' ' && line[3] == ' ' ) { /* deal with data/control lines: 245 12 ........ */ @@ -233,7 +231,6 @@ int yaz_marc_read_line(yaz_marc_t mt, cp++; } } - assert(len >= 0); yaz_marc_add_subfield(mt, cp, len); if (!next) break; @@ -255,6 +252,7 @@ int yaz_marc_read_line(yaz_marc_t mt, /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab