X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=retrieval%2Fd1_handle.c;h=51cf97131844d8dbdd626564a6a6cc5835cac349;hb=8f3f8256752d09f66cd2c7a412cc8c30a0fc90ea;hp=d1c7f95f724b978608df5c53db6b97cf302b930e;hpb=98f0cc2d7eeed27912edb88bf16512bb622b19ee;p=yaz-moved-to-github.git diff --git a/retrieval/d1_handle.c b/retrieval/d1_handle.c index d1c7f95..51cf971 100644 --- 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. * - * $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 @@ -26,10 +26,16 @@ struct data1_handle_info { int map_len; NMEM mem; + int flags; }; 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; @@ -43,6 +49,7 @@ data1_handle data1_create (void) p->absyn_cache = NULL; p->attset_cache = NULL; p->mem = nmem_create (); + p->flags = flags; 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); - 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; }