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
marc8 + ISO2709 checks for leader 9 YAZ-800
[yaz-moved-to-github.git]
/
src
/
marcdisp.c
diff --git
a/src/marcdisp.c
b/src/marcdisp.c
index
cb34dde
..
85acb07
100644
(file)
--- a/
src/marcdisp.c
+++ b/
src/marcdisp.c
@@
-257,7
+257,7
@@
static int element_name_append_attribute_value(
/* TODO Map special codes to something possible for XML ELEMENT names */
int encode = 0;
/* TODO Map special codes to something possible for XML ELEMENT names */
int encode = 0;
- int index = 0;
+ size_t index = 0;
int success = 0;
for (index = 0; index < code_len; index++)
{
int success = 0;
for (index = 0; index < code_len; index++)
{
@@
-1465,6
+1465,16
@@
void yaz_marc_write_using_libxml2(yaz_marc_t mt, int enable)
mt->write_using_libxml2 = enable;
}
mt->write_using_libxml2 = enable;
}
+int yaz_marc_check_marc21_coding(const char *charset,
+ const char *marc_buf, int sz)
+{
+ if ((!yaz_matchstr(charset, "MARC8?") ||
+ !yaz_matchstr(charset, "MARC8")) && marc_buf && sz > 25
+ && marc_buf[9] == 'a')
+ return 1;
+ return 0;
+}
+
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4