projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor refactor of ICU casemap
[yaz-moved-to-github.git]
/
src
/
marc_read_line.c
diff --git
a/src/marc_read_line.c
b/src/marc_read_line.c
index
2d204ef
..
85356c9
100644
(file)
--- 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-2011 Index Data
* See the file LICENSE for details.
* See the file LICENSE for details.
- *
- * $Id: marc_read_line.c,v 1.6 2007-03-18 13:00:37 adam Exp $
*/
/**
*/
/**
@@
-21,7
+19,6
@@
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdio.h>
#include <string.h>
-#include <ctype.h>
#include <yaz/marcdisp.h>
#include <yaz/wrbuf.h>
#include <yaz/marcdisp.h>
#include <yaz/wrbuf.h>
@@
-130,7
+127,7
@@
int yaz_marc_read_line(yaz_marc_t mt,
}
else if (line[0] == '(') /* annotation, skip it */
;
}
else if (line[0] == '(') /* annotation, skip it */
;
- else if (line_len == 24 && atoi_n_check(line, 5, &val) && val >= 24)
+ else if (line_len == 24 && atoi_n_check(line, 5, &val))
{
/* deal with header lines: 00366nam 22001698a 4500
*/
{
/* deal with header lines: 00366nam 22001698a 4500
*/
@@
-146,7
+143,7
@@
int yaz_marc_read_line(yaz_marc_t mt,
&length_implementation);
header_created = 1;
}
&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 ........ */
&& line[2] != ' ' && line[3] == ' ' )
{
/* deal with data/control lines: 245 12 ........ */
@@
-233,7
+230,6
@@
int yaz_marc_read_line(yaz_marc_t mt,
cp++;
}
}
cp++;
}
}
- assert(len >= 0);
yaz_marc_add_subfield(mt, cp, len);
if (!next)
break;
yaz_marc_add_subfield(mt, cp, len);
if (!next)
break;
@@
-255,6
+251,7
@@
int yaz_marc_read_line(yaz_marc_t mt,
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab