defines |
Discworld creator help |
defines |
Name
defines - predefined preprocessor #defines
Description
Note: additional predefines may be added from the command line using the -D flag. Also, anything defined in options.h will be available surrounded by __; e.g if FOO is defined in options.h, the __FOO__ will be defined in all objects.
The following identifiers may be defined:
MUDOS | always defined. | |
__VERSION__ | a string representing the version of MudOS being run. | |
__PORT__ | archaic; the port number of the first (previously, the only) external port. | |
__ARCH__ | the name of the architecture of the machine running the driver. | |
__COMPILER__ | the compiler MudOS was compiled with. | |
__OPTIMIZATION__ | the optimization used. | |
MUD_NAME | the MUD name from the config file. | |
HAS_ED | defined if the ed() efun is available. | |
HAS_PRINTF | defined if the printf() efun is available. | |
HAS_RUSAGE | defined if the rusage() efun is available. | |
HAS_DEBUG_LEVEL | defined if the debug_level() efun is available. | |
__FILE__ | the file being compiled. | |
__DIR__ | the directory the file is in (with the trailing /). |
Example
To check wether the ed() efun is available:
#ifdef HAS_ED
<do something>
#endif