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
Disable xslt/exslt if --without-xml2 is given
[yaz-moved-to-github.git]
/
src
/
marcdisp.c
diff --git
a/src/marcdisp.c
b/src/marcdisp.c
index
ebac3fa
..
a11f9dc
100644
(file)
--- a/
src/marcdisp.c
+++ b/
src/marcdisp.c
@@
-1,8
+1,6
@@
-/*
- * Copyright (C) 1995-2007, Index Data ApS
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2008 Index Data
* See the file LICENSE for details.
* See the file LICENSE for details.
- *
- * $Id: marcdisp.c,v 1.53 2007-12-18 12:46:02 adam Exp $
*/
/**
*/
/**
@@
-20,6
+18,7
@@
#include <stdarg.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <yaz/marcdisp.h>
#include <string.h>
#include <ctype.h>
#include <yaz/marcdisp.h>
@@
-719,12
+718,12
@@
int yaz_marc_write_marcxchange(yaz_marc_t mt, WRBUF wr,
}
}
+#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)
{
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;
struct yaz_marc_node *n;
int identifier_length;
const char *leader = 0;
@@
-829,10
+828,8
@@
int yaz_marc_write_xml(yaz_marc_t mt, xmlNode **root_ptr,
}
wrbuf_destroy(wr_cdata);
return 0;
}
wrbuf_destroy(wr_cdata);
return 0;
-#else
- return -1;
-#endif
}
}
+#endif
int yaz_marc_write_iso2709(yaz_marc_t mt, WRBUF wr)
{
int yaz_marc_write_iso2709(yaz_marc_t mt, WRBUF wr)
{
@@
-1010,6
+1007,11
@@
void yaz_marc_iconv(yaz_marc_t mt, yaz_iconv_t cd)
mt->iconv_cd = cd;
}
mt->iconv_cd = cd;
}
+yaz_iconv_t yaz_marc_get_iconv(yaz_marc_t mt)
+{
+ return mt->iconv_cd;
+}
+
void yaz_marc_modify_leader(yaz_marc_t mt, size_t off, const char *str)
{
struct yaz_marc_node *n;
void yaz_marc_modify_leader(yaz_marc_t mt, size_t off, const char *str)
{
struct yaz_marc_node *n;
@@
-1049,7
+1051,7
@@
static int marc_exec_leader(const char *leader_spec, char *leader, size_t size)
no = sscanf(cp, "%d=%20[^,]%n", &pos, val, &no_read);
if (no < 2 || no_read < 3)
return -1;
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 == '\'')
return -1;
if (*val == '\'')