projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
96a3a7b
)
Never assume non 00X have controlfields
author
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 2 Feb 2005 23:25:08 +0000
(23:25 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 2 Feb 2005 23:25:08 +0000
(23:25 +0000)
src/marcdisp.c
patch
|
blob
|
history
diff --git
a/src/marcdisp.c
b/src/marcdisp.c
index
8473f9f
..
dbee668
100644
(file)
--- a/
src/marcdisp.c
+++ b/
src/marcdisp.c
@@
-2,7
+2,7
@@
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: marcdisp.c,v 1.14 2005-02-02 23:07:56 adam Exp $
+ * $Id: marcdisp.c,v 1.15 2005-02-02 23:25:08 adam Exp $
*/
/**
*/
/**
@@
-293,16
+293,23
@@
int yaz_marc_decode_wrbuf (yaz_marc_t mt, const char *buf, int bsize, WRBUF wr)
entry_p0, data_length, data_offset);
}
entry_p0, data_length, data_offset);
}
- if (indicator_length < 4 && indicator_length > 0)
+ if (memcmp (tag, "00", 2))
+ identifier_flag = 1; /* if not 00X assume subfields */
+ else if (indicator_length < 4 && indicator_length > 0)
{
{
+ /* Danmarc 00X have subfields */
if (buf[i + indicator_length] == ISO2709_IDFS)
identifier_flag = 1;
else if (buf[i + indicator_length + 1] == ISO2709_IDFS)
identifier_flag = 2;
}
if (buf[i + indicator_length] == ISO2709_IDFS)
identifier_flag = 1;
else if (buf[i + indicator_length + 1] == ISO2709_IDFS)
identifier_flag = 2;
}
- else if (memcmp (tag, "00", 2))
- identifier_flag = 1;
-
+
+ if (mt->debug)
+ {
+ wrbuf_printf(wr, "<!-- identifier_flag = %d -->\n",
+ identifier_flag);
+ }
+
switch(mt->xml)
{
case YAZ_MARC_LINE:
switch(mt->xml)
{
case YAZ_MARC_LINE: