1 | #ifndef FERESOURCE_H |
---|
2 | #define FERESOURCE_H |
---|
3 | |
---|
4 | #ifdef HAVE_SYS_PARAM_H |
---|
5 | #include <sys/param.h> |
---|
6 | #endif |
---|
7 | |
---|
8 | #include <misc/auxiliary.h> |
---|
9 | #include <misc/mylimits.h> |
---|
10 | |
---|
11 | #define DIR_SEP '/' |
---|
12 | #define DIR_SEPP "/" |
---|
13 | |
---|
14 | #ifndef MAXPATHLEN |
---|
15 | #define MAXPATHLEN 1024 |
---|
16 | #endif |
---|
17 | |
---|
18 | #ifdef __cplusplus |
---|
19 | /***************************************************************** |
---|
20 | * |
---|
21 | * Resource management (feResources.cc) |
---|
22 | * |
---|
23 | *****************************************************************/ |
---|
24 | // returns value of Resource as read-only string, or NULL |
---|
25 | // if Resource not found |
---|
26 | // issues warning, if explicitely requested (warn > 0), or |
---|
27 | // if warn < 0 and Resource is gotten for the first time |
---|
28 | // Always quiet if warn == 0 |
---|
29 | char* feResource(const char id, int warn = -1); |
---|
30 | char* feResource(const char* key, int warn = -1); |
---|
31 | |
---|
32 | char* feGetResource(const char id); |
---|
33 | |
---|
34 | // char* feResourceDefault(const char id); |
---|
35 | // char* feResourceDefault(const char* key); |
---|
36 | |
---|
37 | |
---|
38 | // This needs to be called before the first call to feResource |
---|
39 | // Initializes Resources, SearchPath, and extends PATH |
---|
40 | void feInitResources(char* argv0 = NULL); |
---|
41 | // Re-inits resources, should be called after changing env. variables |
---|
42 | void feReInitResources(); |
---|
43 | // Prints resources into string with StringAppend, etc |
---|
44 | void feStringAppendResources(int warn = -1); |
---|
45 | |
---|
46 | #endif |
---|
47 | /* end ifdef __cplusplus */ |
---|
48 | |
---|
49 | |
---|
50 | const char fePathSep = |
---|
51 | /* not really cygwin, applies to all windows systems:*/ |
---|
52 | #if (defined(CYGWIN) || defined(ix86_Win)) |
---|
53 | ';' |
---|
54 | #else |
---|
55 | ':' |
---|
56 | #endif |
---|
57 | ; |
---|
58 | |
---|
59 | |
---|
60 | |
---|
61 | #endif |
---|