the code is a single character .. However we've
seen multibyte codes, so see how big it really is */
size_t using_code_len =
- (identifier_length != 2) ? identifier_length - 1
+ (identifier_length > 2) ? identifier_length - 1
:
cdata_one_character(mt, s->code_data);
the code is a single character .. However we've
seen multibyte codes, so see how big it really is */
size_t using_code_len =
- (identifier_length != 2) ? identifier_length - 1
+ (identifier_length > 2) ? identifier_length - 1
:
cdata_one_character(mt, s->code_data);
}
+#if YAZ_HAVE_XML2
int yaz_marc_write_xml(yaz_marc_t mt, xmlNode **root_ptr,
const char *ns,
const char *format,
const char *type)
{
-#if YAZ_HAVE_XML2
struct yaz_marc_node *n;
int identifier_length;
const char *leader = 0;
the code is a single character .. However we've
seen multibyte codes, so see how big it really is */
size_t using_code_len =
- (identifier_length != 2) ? identifier_length - 1
+ (identifier_length > 2) ? identifier_length - 1
:
cdata_one_character(mt, s->code_data);
}
wrbuf_destroy(wr_cdata);
return 0;
-#else
- return -1;
-#endif
}
+#endif
int yaz_marc_write_iso2709(yaz_marc_t mt, WRBUF wr)
{
no = sscanf(cp, "%d=%20[^,]%n", &pos, val, &no_read);
if (no < 2 || no_read < 3)
return -1;
- if (pos < 0 || pos >= size)
+ if (pos < 0 || (size_t) pos >= size)
return -1;
if (*val == '\'')