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
Fix rpn2cql fails for Bib-1 set in qry+conf YAZ-865
[yaz-moved-to-github.git]
/
src
/
xml_include.c
diff --git
a/src/xml_include.c
b/src/xml_include.c
index
00357a8
..
8008610
100644
(file)
--- a/
src/xml_include.c
+++ b/
src/xml_include.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2013 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
* See the file LICENSE for details.
*/
@@
-10,8
+10,6
@@
#include <config.h>
#endif
#include <config.h>
#endif
-#include <yaz/file_glob.h>
-
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
@@
-29,6
+27,7
@@
struct yaz_xml_include_s {
const char *confdir;
struct yaz_xml_include_s {
const char *confdir;
+ unsigned glob_flags;
};
typedef struct yaz_xml_include_s *yaz_xml_include_t;
};
typedef struct yaz_xml_include_s *yaz_xml_include_t;
@@
-101,9
+100,7
@@
static int config_include_src(yaz_xml_include_t config, xmlNode **np,
int glob_ret;
yaz_glob_res_t glob_res;
int glob_ret;
yaz_glob_res_t glob_res;
- glob_ret = yaz_file_glob(wrbuf_cstr(w), &glob_res);
- yaz_log(YLOG_LOG, "yaz_file_glob returned w=%s %d", wrbuf_cstr(w),
- glob_ret);
+ glob_ret = yaz_file_glob2(wrbuf_cstr(w), &glob_res, config->glob_flags);
if (glob_ret == 0)
{
size_t i;
if (glob_ret == 0)
{
size_t i;
@@
-134,6
+131,7
@@
static int process_config_includes(yaz_xml_include_t config, xmlNode *n)
xmlChar *src = xmlGetProp(n, (xmlChar *) "src");
if (src)
{
xmlChar *src = xmlGetProp(n, (xmlChar *) "src");
if (src)
{
+ /* src must be preserved, because n is destroyed */
int ret = config_include_src(config, &n,
(const char *) src);
xmlFree(src);
int ret = config_include_src(config, &n,
(const char *) src);
xmlFree(src);
@@
-152,14
+150,22
@@
static int process_config_includes(yaz_xml_include_t config, xmlNode *n)
return 0;
}
return 0;
}
-int yaz_xml_include_simple(xmlNode *n, const char *base_path)
+int yaz_xml_include_glob(xmlNode *n, const char *base_path,
+ unsigned glob_flags)
{
struct yaz_xml_include_s s;
s.confdir = base_path;
{
struct yaz_xml_include_s s;
s.confdir = base_path;
+ s.glob_flags = glob_flags;
return process_config_includes(&s, n);
}
return process_config_includes(&s, n);
}
+int yaz_xml_include_simple(xmlNode *n, const char *base_path)
+{
+ return yaz_xml_include_glob(n, base_path, 0);
+}
+
+
/* YAZ_HAVE_XML2 */
#endif
/* YAZ_HAVE_XML2 */
#endif