X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=retrieval%2Fd1_handle.c;h=51cf97131844d8dbdd626564a6a6cc5835cac349;hb=5b690aebb8dc2d05cad8f668de8fd821a1c231fa;hp=541ee84a081bcb8c8994033d4f308f8457635a75;hpb=a1743ee8f71f729c1cc264e70d926b0908f77adc;p=yaz-moved-to-github.git diff --git a/retrieval/d1_handle.c b/retrieval/d1_handle.c index 541ee84..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.8 2002-04-05 12:46:07 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; } @@ -130,3 +137,8 @@ FILE *data1_path_fopen (data1_handle dh, const char *file, const char *mode) const char *root = data1_get_tabroot(dh); return yaz_fopen (path, file, "r", root); } + +int data1_is_xmlmode(data1_handle dh) +{ + return dh->flags & DATA1_FLAG_XML; +}