Skip to main content

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:

MUDOSalways 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_NAMEthe MUD name from the config file.
HAS_EDdefined if the ed() efun is available.
HAS_PRINTFdefined if the printf() efun is available.
HAS_RUSAGEdefined if the rusage() efun is available.
HAS_DEBUG_LEVELdefined 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

See also

preprocessor