4 * Copyright (c) Tuomo Valkonen 1999-2005.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
12 #ifndef LIBEXTL_READCONFIG_H
13 #define LIBEXTL_READCONFIG_H
17 typedef int ExtlTryConfigFn(const char *file, void *param);
20 EXTL_TRYCONFIG_MEMERROR=-3,
21 EXTL_TRYCONFIG_NOTFOUND=-2,
22 EXTL_TRYCONFIG_LOAD_FAILED=-1,
23 EXTL_TRYCONFIG_CALL_FAILED=0,
28 extern bool extl_set_userdirs(const char *appname);
29 extern bool extl_set_sessiondir(const char *session);
30 extern bool extl_set_searchpath(const char *path);
31 extern bool extl_add_searchdir(const char *dir);
33 extern const char *extl_userdir();
34 extern const char *extl_sessiondir();
35 extern const char *extl_searchpath();
37 extern int extl_try_config(const char *fname, const char *cfdir,
38 ExtlTryConfigFn *tryfn, void *tryfnparam,
39 const char *ext1, const char *ext2);
41 extern char *extl_lookup_script(const char *file, const char *sp);
43 extern bool extl_read_config(const char *file, const char *sp,
46 extern char *extl_get_savefile(const char *module);
47 extern bool extl_read_savefile(const char *module, ExtlTab *tabret);
48 extern ExtlTab extl_extl_read_savefile(const char *module);
49 extern bool extl_write_savefile(const char *module, ExtlTab tab);
51 #endif /* LIBEXTL_READCONFIG_H */