Difference between revisions of "Precompiler definitions"
m (→Pragma (#pragma)) |
|||
Line 4: | Line 4: | ||
===#undef=== | ===#undef=== | ||
+ | <b>Syntax</b>: #udef <defname><br /> | ||
== Control Logic == | == Control Logic == | ||
Line 31: | Line 32: | ||
===#includelist=== | ===#includelist=== | ||
+ | <b>Syntax</b>: #includelist<br /> | ||
===#endlist=== | ===#endlist=== | ||
+ | <b>Syntax</b>: #endlist<br /> | ||
===#output=== | ===#output=== | ||
Line 39: | Line 42: | ||
== Second file things == | == Second file things == | ||
===#eof=== | ===#eof=== | ||
+ | <b>Syntax</b>: #eof<br /> | ||
===#forcecrc=== | ===#forcecrc=== | ||
+ | <b>Syntax</b>: #forcecrc <crc><br /> | ||
===#copyright=== | ===#copyright=== | ||
+ | Depreciated, use #pragma COPYRIGHT instead. | ||
===#datafile=== | ===#datafile=== | ||
+ | <b>Syntax</b>: #datafile <file><br /> | ||
===#pack=== | ===#pack=== | ||
Line 56: | Line 63: | ||
===#pragma COPYRIGHT=== | ===#pragma COPYRIGHT=== | ||
+ | <b>Syntax</b>: #pragma COPYRIGHT <message><br /> | ||
===#pragma TARGET=== | ===#pragma TARGET=== | ||
− | <b>Syntax</b>: #pragma TARGET <target> | + | <b>Syntax</b>: #pragma TARGET <target><br /> |
Switches compiled progs to a specific target type.<br /> | Switches compiled progs to a specific target type.<br /> | ||
Line 89: | Line 97: | ||
===#pragma keyword and #pragma flag=== | ===#pragma keyword and #pragma flag=== | ||
+ | <b>Syntax</b>:<br /> | ||
+ | * #pragma keyword <onoroff> <keywordid> | ||
+ | * #pragma flag <onoroff> <keywordid> | ||
===#pragma warning=== | ===#pragma warning=== | ||
+ | <b>Syntax</b>: #pragma warning <onoroff> <warningid><br /> |
Revision as of 22:02, 30 October 2005
Contents
Definitions
#define
Syntax: #define <defname>[(<macroparams>)] [<defvalue>]
#undef
Syntax: #udef <defname>
Control Logic
#ifdef
#ifndef
#if
#else
#endif
Something
#message
Syntax: #message <message>
#warning
Syntax: #warning <message>
#error
Syntax: #error <message>
File things
#include
Syntax: #include <file>
#includelist
Syntax: #includelist
#endlist
Syntax: #endlist
#output
Depreciated, use #pragma PROGS_DAT instead.
Second file things
#eof
Syntax: #eof
#forcecrc
Syntax: #forcecrc <crc>
#copyright
Depreciated, use #pragma COPYRIGHT instead.
#datafile
Syntax: #datafile <file>
#pack
Pragma (#pragma)
#pragma is an extensive precompiler statement which controls many aspects of the compiler.
Note that all unknown #pragma statements encountered by FTEQCC are ignored (with a warning.)
#pragma DONT_COMPILE_THIS_FILE
This pragma is parsed but ignored by FTEQCC so PREQCC-using code can compile cleanly.
#pragma COPYRIGHT
Syntax: #pragma COPYRIGHT <message>
#pragma TARGET
Syntax: #pragma TARGET <target>
Switches compiled progs to a specific target type.
<target> can be the following:
- ID, STANDARD: standard Quake progs
- KK7: kkqwsv progs
- H2, HEXEN2: Hexen 2 progs
- FTE: FTE progs
- DEBUG, FTEDEBUG: FTE progs with debug information
It is not recommended to switch target types during compilation.
#pragma PROGS_SRC
This pragma is parsed but ignored by FTEQCC so PREQCC-using code can compile cleanly.
#pragma PROGS_DAT
Syntax: #pragma PROGS_DAT <progsfile>
Changes the destination file you wish to compile to. <progsfile> contains the new file name.
Example:
#ifdef MONSTERS #pragma PROGS_DAT monsters.dat #message FTEQCC will now compile to monsters.dat #else #pragma PROGS_DAT nomonsters.dat #message FTEQCC will now compile to nomonsters.dat #endif
#pragma keyword and #pragma flag
Syntax:
- #pragma keyword <onoroff> <keywordid>
- #pragma flag <onoroff> <keywordid>
#pragma warning
Syntax: #pragma warning <onoroff> <warningid>