is NULL or "".
-/* $Id: d1_absyn.c,v 1.25 2006-05-19 13:49:33 adam Exp $
+/* $Id: d1_absyn.c,v 1.26 2006-06-08 10:33:19 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
return p->absyn;
p = p->next;
}
- return NULL;
+ return 0;
}
/* *ostrich*
We need to destroy DFAs, in xp_element (xelm) definitions
return p->attset;
p = p->next;
}
- return NULL;
+ return 0;
}
data1_attset *data1_attset_search_id (data1_handle dh, int id)
return p->attset;
p = p->next;
}
- return NULL;
+ return 0;
}
data1_attset *data1_attset_add (data1_handle dh, const char *name)
if (!(f = data1_path_fopen(dh, file, "r")))
{
- yaz_log(YLOG_WARN|YLOG_ERRNO, "Couldn't open %s", file);
if (file_must_exist)
return 0;
}
fix_element_ref (dh, res, cur_elements->elements);
}
*systagsp = 0;
- yaz_log(YLOG_DEBUG, "%s: data1_read_absyn end", file);
return res;
}
/*
-/* $Id: d1_espec.c,v 1.10 2006-05-10 08:13:18 adam Exp $
+/* $Id: d1_espec.c,v 1.11 2006-06-08 10:33:19 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
Z_Espec1 *res = (Z_Espec1 *)nmem_malloc(nmem, sizeof(*res));
if (!(f = data1_path_fopen(dh, file, "r")))
- {
- yaz_log(YLOG_WARN|YLOG_ERRNO, "%s", file);
return 0;
- }
res->num_elementSetNames = 0;
res->elementSetNames = 0;
-/* $Id: d1_handle.c,v 1.11 2006-05-10 08:13:18 adam Exp $
+/* $Id: d1_handle.c,v 1.12 2006-06-08 10:33:19 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
{
data1_handle p = (data1_handle)xmalloc (sizeof(*p));
if (!p)
- return NULL;
+ return 0;
p->tab_path = NULL;
p->tab_root = NULL;
p->wrbuf = wrbuf_alloc();
FILE *data1_path_fopen (data1_handle dh, const char *file, const char *mode)
{
+ FILE *f;
const char *path = data1_get_tabpath(dh);
const char *root = data1_get_tabroot(dh);
- yaz_log(YLOG_DEBUG, "data1_fath_fopen file=%s mode=%s", file, mode);
- return yaz_fopen (path, file, "r", root);
+ if (!path || !*path)
+ {
+ yaz_log(YLOG_DEBUG, "data1_fath_fopen file=%s mode=%s no open",
+ file, mode);
+ return 0;
+ }
+ yaz_log(YLOG_DEBUG, "data1_fath_fopen path=%s root=%s "
+ "file=%s mode=%s", path ? path : "NULL",
+ root ? root : "NULL", file, mode);
+ f = yaz_fopen(path, file, "r", root);
+ if (!f)
+ yaz_log(YLOG_WARN|YLOG_ERRNO, "Couldn't open %s", file);
+ return f;
}
int data1_is_xmlmode(data1_handle dh)
-/* $Id: d1_map.c,v 1.9 2006-05-10 08:13:18 adam Exp $
+/* $Id: d1_map.c,v 1.10 2006-06-08 10:33:19 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
int local_numeric = 0;
if (!(f = data1_path_fopen(dh, file, "r")))
- {
- yaz_log(YLOG_WARN|YLOG_ERRNO, "%s", file);
return 0;
- }
res->name = 0;
res->target_absyn_ref = VAL_NONE;
-/* $Id: d1_marc.c,v 1.14 2006-05-10 08:13:18 adam Exp $
+/* $Id: d1_marc.c,v 1.15 2006-06-08 10:33:19 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
int argc;
if (!(f = data1_path_fopen(dh, file, "r")))
- {
- yaz_log(YLOG_WARN|YLOG_ERRNO, "%s", file);
return 0;
- }
res->name = 0;
res->reference = VAL_NONE;