/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2013 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
/* 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 i;
for (i = 0; n->u.datafield.indicator[i]; i++)
{
- wrbuf_puts(w, ",\n");
- wrbuf_printf(w, "\t\t\t\t\"ind%d\":\"%c\"", i + 1,
+ wrbuf_printf(w, ",\n\t\t\t\t\"ind%d\":\"%c\"", i + 1,
n->u.datafield.indicator[i]);
}
}
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