[46395ad] | 1 | #ifndef FERESOURCE_H |
---|
| 2 | #define FERESOURCE_H |
---|
[ce2120e] | 3 | |
---|
| 4 | #ifdef HAVE_SYS_PARAM_H |
---|
| 5 | #include <sys/param.h> |
---|
| 6 | #endif |
---|
| 7 | |
---|
[7d1a26] | 8 | #include <misc/auxiliary.h> |
---|
| 9 | #include <misc/mylimits.h> |
---|
[8c9912] | 10 | |
---|
[ce2120e] | 11 | #define DIR_SEP '/' |
---|
| 12 | #define DIR_SEPP "/" |
---|
| 13 | |
---|
[8c9912] | 14 | #ifndef MAXPATHLEN |
---|
| 15 | #define MAXPATHLEN 1024 |
---|
| 16 | #endif |
---|
| 17 | |
---|
[9d53d0] | 18 | #ifdef _cplusplus |
---|
[46395ad] | 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); |
---|
[8c9912] | 31 | |
---|
| 32 | char* feGetResource(const char id); |
---|
| 33 | |
---|
| 34 | // char* feResourceDefault(const char id); |
---|
| 35 | // char* feResourceDefault(const char* key); |
---|
| 36 | |
---|
| 37 | |
---|
[46395ad] | 38 | // This needs to be called before the first call to feResource |
---|
| 39 | // Initializes Resources, SearchPath, and extends PATH |
---|
[59a62bd] | 40 | void feInitResources(char* argv0 = NULL); |
---|
[46395ad] | 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); |
---|
[5df856] | 45 | |
---|
[9d53d0] | 46 | #endif |
---|
| 47 | /* end ifdef _cplusplus */ |
---|
[5df856] | 48 | |
---|
[8c9912] | 49 | |
---|
[5df856] | 50 | const char fePathSep = |
---|
[9d53d0] | 51 | /* not really cygwin, applies to all windows systems:*/ |
---|
[5df856] | 52 | #if (defined(CYGWIN) || defined(ix86_Win)) |
---|
| 53 | ';' |
---|
| 54 | #else |
---|
| 55 | ':' |
---|
| 56 | #endif |
---|
| 57 | ; |
---|
| 58 | |
---|
| 59 | |
---|
| 60 | |
---|
[46395ad] | 61 | #endif |
---|