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
Pointer fix for amp-handling
[yaz-moved-to-github.git]
/
retrieval
/
d1_handle.c
diff --git
a/retrieval/d1_handle.c
b/retrieval/d1_handle.c
index
d1c7f95
..
51cf971
100644
(file)
--- a/
retrieval/d1_handle.c
+++ b/
retrieval/d1_handle.c
@@
-2,7
+2,7
@@
* Copyright (c) 1995-2002, Index Data.
* See the file LICENSE for details.
*
* Copyright (c) 1995-2002, Index Data.
* See the file LICENSE for details.
*
- * $Id: d1_handle.c,v 1.7 2002-04-04 20:49:46 adam Exp $
+ * $Id: d1_handle.c,v 1.9 2002-07-29 20:04:08 adam Exp $
*/
#include <stdio.h>
*/
#include <stdio.h>
@@
-26,10
+26,16
@@
struct data1_handle_info {
int map_len;
NMEM mem;
int map_len;
NMEM mem;
+ int flags;
};
data1_handle data1_create (void)
{
};
data1_handle data1_create (void)
{
+ return data1_createx(0);
+}
+
+data1_handle data1_createx (int flags)
+{
data1_handle p = (data1_handle)xmalloc (sizeof(*p));
if (!p)
return NULL;
data1_handle p = (data1_handle)xmalloc (sizeof(*p));
if (!p)
return NULL;
@@
-43,6
+49,7
@@
data1_handle data1_create (void)
p->absyn_cache = NULL;
p->attset_cache = NULL;
p->mem = nmem_create ();
p->absyn_cache = NULL;
p->attset_cache = NULL;
p->mem = nmem_create ();
+ p->flags = flags;
return p;
}
return p;
}
@@
-128,5
+135,10
@@
FILE *data1_path_fopen (data1_handle dh, const char *file, const char *mode)
{
const char *path = data1_get_tabpath(dh);
const char *root = data1_get_tabroot(dh);
{
const char *path = data1_get_tabpath(dh);
const char *root = data1_get_tabroot(dh);
- return yaz_path_fopen_base (path, file, "r", root);
+ return yaz_fopen (path, file, "r", root);
+}
+
+int data1_is_xmlmode(data1_handle dh)
+{
+ return dh->flags & DATA1_FLAG_XML;
}
}