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