* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*
- * $Id: tpath.h,v 1.3 2002-04-04 20:49:46 adam Exp $
+ * $Id: tpath.h,v 1.4 2002-04-05 12:46:07 adam Exp $
*
*/
YAZ_BEGIN_CDECL
-YAZ_EXPORT FILE *yaz_path_fopen_base(const char *path, const char *name,
- const char *mode, const char *base);
+YAZ_EXPORT FILE *yaz_fopen(const char *path, const char *name,
+ const char *mode, const char *base);
YAZ_EXPORT FILE *yaz_path_fopen(const char *path, const char *name,
- const char *mode);
+ const char *mode);
+
+YAZ_EXPORT int yaz_fclose(FILE *f);
YAZ_EXPORT int yaz_is_abspath (const char *p);
* 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.8 2002-04-05 12:46:07 adam Exp $
*/
#include <stdio.h>
{
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);
}
* See the file LICENSE for details.
* Sebastian Hammer, Adam Dickmeiss
*
- * $Id: tpath.c,v 1.6 2002-04-04 20:49:46 adam Exp $
+ * $Id: tpath.c,v 1.7 2002-04-05 12:46:07 adam Exp $
*/
#if HAVE_CONFIG_H
#include <config.h>
FILE *yaz_path_fopen(const char *path, const char *name, const char *mode)
{
- return yaz_path_fopen_base (path, name, mode, 0);
+ return yaz_fopen (path, name, mode, 0);
}
-FILE *yaz_path_fopen_base(const char *path, const char *name, const char *mode,
- const char *base)
+int yaz_fclose (FILE *f)
+{
+ fclose (f);
+}
+
+FILE *yaz_fopen(const char *path, const char *name, const char *mode,
+ const char *base)
{
char spath[1024];