Add support for \? to qc strings.

And fix up the man page a bit.
This commit is contained in:
Bill Currie 2018-08-19 19:31:52 +09:00
parent 0de0eb2fc7
commit b795beb520
2 changed files with 190 additions and 36 deletions

View file

@ -31,49 +31,67 @@
.ds qfcc \fBqfcc\fP .ds qfcc \fBqfcc\fP
.ds cpp \fBcpp\fP .ds cpp \fBcpp\fP
.ds progs.src \fIprogs.src\fP .ds progs.src \fIprogs.src\fP
.TH QFCC 1 "28 April, 2004" QuakeForge "QuakeForge Developer's Manual" .TH QFCC 1 "28 April, 2004" QuakeForge "QuakeForge Developer's Manual"
.\" Please update the above date whenever this man page is modified. .\" Please update the above date whenever this man page is modified.
.SH NAME .SH NAME
qfcc \- The QuakeForge Code Compiler qfcc \- The QuakeForge Code Compiler
.SH SYNOPSIS .SH SYNOPSIS
.B qfcc .B qfcc
.RI [ options ] .RI [ options ]
.RI [ files ] .RI [ files ]
.SH DESCRIPTION .SH DESCRIPTION
\*[qfcc] compiles Ruamoko source into a form that the QuakeForge engine can \*[qfcc] compiles Ruamoko source into a form that the QuakeForge engine can
understand. understand.
.SH OPTIONS .SH OPTIONS
\*[qfcc] takes the following arguments: \*[qfcc] takes the following arguments:
.TP .TP
.B \-\-advanced .B \-\-advanced
Use advanced Ruamoko features. Use advanced Ruamoko features.
This is the default when using separate compilation. This is the default when using separate compilation.
.TP .TP
.B \-C, \-\-code OPTION,... .B \-C, \-\-code OPTION,...
Set code generation options. Set code generation options.
See \fBCODE GENERATION OPTIONS\fP for details. See \fBCODE GENERATION OPTIONS\fP for details.
.TP .TP
.B \-c .B \-c
Only compile, do not link. Only compile, do not link.
Can be used in either \fBprogs.src\fP or separate compilation modes. Can be used in either \fBprogs.src\fP or separate compilation modes.
.TP .TP
.B \-\-cpp CPPSPEC .B \-\-cpp CPPSPEC
\*[cpp] execution command line. \*[cpp] execution command line.
See \fBCPP NAME\fP for details. See \fBCPP NAME\fP for details.
.TP .TP
.B \-D, \-\-define SYMBOL[=VAL] .B \-D, \-\-define SYMBOL[=VAL]
Define a symbol for the preprocessor, if it is in use. Define a symbol for the preprocessor, if it is in use.
.TP .TP
.B \-E .B \-E
Only preprocess. Only preprocess.
No compilation or linking is done. No compilation or linking is done.
.TP .TP
.B \-\-extended .B \-\-extended
Allow extended keywords in traditional mode. Allow extended keywords in traditional mode.
.TP .TP
.B \-F, \-\-files .B \-F, \-\-files
Generate \fIfiles.dat\fP. Generate \fIfiles.dat\fP.
This list is created by checking the parameters to the precache_* functions. This list is created by checking the parameters to the precache_* functions.
.TP .TP
.B \-\-frames .B \-\-frames
Generate \fI<source>.frame\fP files. Generate \fI<source>.frame\fP files.
@ -84,57 +102,71 @@ names with their associated frame numbers. Eg, \fBplayer.qc\fP will produce
\fBplayer.frame\fPa. Note that files that do not create frame macros will \fBplayer.frame\fPa. Note that files that do not create frame macros will
not generate a frame file. At this time, the file is always written to the not generate a frame file. At this time, the file is always written to the
current directory. current directory.
.TP .TP
.B \-g .B \-g
Generate debugging info. Generate debugging info.
Synonym for \fB\-\-code debug\fP. Synonym for \fB\-\-code debug\fP.
.TP .TP
.B \-h, \-\-help .B \-h, \-\-help
Show summary of options. Show summary of options.
.TP .TP
.B \-I DIR .B \-I DIR
Add DIR to the list of directories for the preprocessor to search when looking Add DIR to the list of directories for the preprocessor to search when looking
for include files. for include files.
.TP .TP
.B \-\-include FILE .B \-\-include FILE
Process FILE as if \fB#include "FILE"\fP appeared as the first line of the Process FILE as if \fB#include "FILE"\fP appeared as the first line of the
primary source file. primary source file.
See the \*[cpp] man page (\fB\-include\fP) for details. See the \*[cpp] man page (\fB\-include\fP) for details.
.TP .TP
.B \-L DIR .B \-L DIR
Add DIR to the search path used for finding libraries specified with \fB-l\fP. Add DIR to the search path used for finding libraries specified with \fB-l\fP.
.TP .TP
.B \-l LIB .B \-l LIB
Add libLIB.a to the list of libraries to be used for resolving undefined Add libLIB.a to the list of libraries to be used for resolving undefined
symbols. symbols.
\*[qfcc] expects libraries to be \fBpak\fP files of \*[qfcc] \*[qfcc] expects libraries to be \fBpak\fP files of \*[qfcc]
object files built using the \fBpak\fP utility. object files built using the \fBpak\fP utility.
.TP .TP
.B \-M, \-MD, \-MMD .B \-M, \-MD, \-MMD
Generate dependency info. Generate dependency info.
Dependent on \*[cpp] version, so check \*[cpp]'s documentation. Dependent on \*[cpp] version, so check \*[cpp]'s documentation.
.TP .TP
.B \-\-no\-default\-paths .B \-\-no\-default\-paths
Do not use default paths for include files or libraries. Do not use default paths for include files or libraries.
.TP .TP
.B \-N, \-\-notice OPTION,... .B \-N, \-\-notice OPTION,...
Set notice options. Set notice options.
See \fBNOTICE OPTIONS\fP for details. See \fBNOTICE OPTIONS\fP for details.
.TP .TP
.B \-o, \-\-output\-file FILE .B \-o, \-\-output\-file FILE
Specify output file name. Specify output file name.
In \fBprogs.src\fP mode, this overrides the output file in \*[progs.src]. In \fBprogs.src\fP mode, this overrides the output file in \*[progs.src].
.TP .TP
.B \-\-progdefs .B \-\-progdefs
Generate \fIprogdefs.h\fP. Forces \fB\-\-code crc\fP. Generate \fIprogdefs.h\fP. Forces \fB\-\-code crc\fP.
.TP .TP
.B \-P, \-\-progs\-src FILE .B \-P, \-\-progs\-src FILE
File to use instead of \*[progs.src]. File to use instead of \*[progs.src].
No effect in separate compilation mode. No effect in separate compilation mode.
.TP .TP
.B \-\-qccx\-escapes .B \-\-qccx\-escapes
Use QCCX escape sequences instead of standard C/QuakeForge sequences in Use QCCX escape sequences instead of standard C/QuakeForge sequences in
strings. See \fBESCAPE SEQUENCES\fP for details. strings. See \fBESCAPE SEQUENCES\fP for details.
.TP .TP
.B \-p, \-\-strip\-path NUM .B \-p, \-\-strip\-path NUM
Strip NUM leading path elements from file names. Strip NUM leading path elements from file names.
@ -143,21 +175,26 @@ eg. -p 3 will strip the
from from
.I ../../../src/foo.r .I ../../../src/foo.r
when embedding the source file name in the output code. when embedding the source file name in the output code.
.TP .TP
.B \-q, \-\-quiet .B \-q, \-\-quiet
Inhibit some of \*[qfcc]'s normal output. Inhibit some of \*[qfcc]'s normal output.
Specifying this option multiple times further inhibits \*[qfcc]'s output. Specifying this option multiple times further inhibits \*[qfcc]'s output.
Counteracts the effects of \fB-v\fP. Counteracts the effects of \fB-v\fP.
.TP .TP
.B \-r, \-\-relocatable .B \-r, \-\-relocatable
Incremental linking. Incremental linking.
Generate a larger object file from other object files and libraries. Generate a larger object file from other object files and libraries.
.TP .TP
.B \-S, \-\-save\-temps .B \-S, \-\-save\-temps
Do not delete temporary files. Do not delete temporary files.
.TP .TP
.B \-s, \-\-source DIR .B \-s, \-\-source DIR
Look for \*[progs.src] in \fBDIR\fP instead of the current directory. Look for \*[progs.src] in \fBDIR\fP instead of the current directory.
.TP .TP
.B \-\-traditional .B \-\-traditional
Use traditional QuakeC syntax, semantics and \*(lqbugs\*(rq. Use traditional QuakeC syntax, semantics and \*(lqbugs\*(rq.
@ -165,32 +202,40 @@ Also implies the \fBv6only\fP, \fBno-short-circuit\fP and
\fBno-local-merging\fP code generation options (see \fBno-local-merging\fP code generation options (see
\fBCODE GENERATION OPTIONS\fP). \fBCODE GENERATION OPTIONS\fP).
This is the default when using \fBprogs.src\fP mode. This is the default when using \fBprogs.src\fP mode.
.TP .TP
.B \-U, \-\-undefine SYMBOL .B \-U, \-\-undefine SYMBOL
Undefine a preprocessor symbol, if the preprocessor is in use. Undefine a preprocessor symbol, if the preprocessor is in use.
.TP .TP
.B \-V, \-\-version .B \-V, \-\-version
Show the version of \*[qfcc]. Show the version of \*[qfcc].
.TP .TP
.B \-v, \-\-verbose .B \-v, \-\-verbose
Display more output than usual. Display more output than usual.
Specifying this option multiple times further increases \*[qfcc]'s output. Specifying this option multiple times further increases \*[qfcc]'s output.
Counteracts the effects of \fB-q\fP. Counteracts the effects of \fB-q\fP.
.TP .TP
.B \-W, \-\-warn OPTION,... .B \-W, \-\-warn OPTION,...
Set warning options. Set warning options.
See \fBWARNING OPTIONS\fP for details. See \fBWARNING OPTIONS\fP for details.
.TP .TP
.B \-z .B \-z
Compress object files when writing them. Compress object files when writing them.
This is especially useful when creating libraries, especially if using the This is especially useful when creating libraries, especially if using the
object oriented features, but can be quite slow. object oriented features, but can be quite slow.
This has no effect when creating \fBprogs.dat\fP. This has no effect when creating \fBprogs.dat\fP.
.SH "CODE GENERATION OPTIONS" .SH "CODE GENERATION OPTIONS"
Code generation options are processed in the order of their appearance on the Code generation options are processed in the order of their appearance on the
command line. command line.
Unsupported options are ignored. Unsupported options are ignored.
The following options are supported by \*[qfcc]'s \fB\-\-code\fP argument: The following options are supported by \*[qfcc]'s \fB\-\-code\fP argument:
.TP .TP
.B cow .B cow
Allow assignment to initialized globals. Allow assignment to initialized globals.
@ -200,15 +245,18 @@ However, \fBqcc\fP never really enforced this.
The \fBcow\fP option allows \*[qfcc] to gracefully cope with QuakeC source The \fBcow\fP option allows \*[qfcc] to gracefully cope with QuakeC source
that assigns values to initialized globals in this manner. that assigns values to initialized globals in this manner.
(also known as \*(lqcopy on write\*(rq\(emnever mind the bovine connotations) (also known as \*(lqcopy on write\*(rq\(emnever mind the bovine connotations)
.TP .TP
.B cpp .B cpp
Preprocess all input files with \*[cpp]. Preprocess all input files with \*[cpp].
This includes the \*[progs.src] file when used. This includes the \*[progs.src] file when used.
.TP .TP
.B crc .B crc
Write the CRC of \fBprogdefs.h\fP to \*(lqprogs.dat\*(rq. Default for v6 progs, Write the CRC of \fBprogdefs.h\fP to \*(lqprogs.dat\*(rq. Default for v6 progs,
otherwise defaults to off. However, \fB\-\-progdefs\fP has the effect of otherwise defaults to off. However, \fB\-\-progdefs\fP has the effect of
forcing this option. forcing this option.
.TP .TP
.B debug .B debug
Generate debug code for QuakeForge engines. Generate debug code for QuakeForge engines.
@ -218,12 +266,14 @@ This option tells \*[qfcc] to generate this information.
It is written to a secondary file with the extension \*(lqsym\*(rq\(emif your It is written to a secondary file with the extension \*(lqsym\*(rq\(emif your
output file is \*(lqprogs.dat\*(rq, the symbol file will be output file is \*(lqprogs.dat\*(rq, the symbol file will be
\*(lqprogs.sym\*(rq. \*(lqprogs.sym\*(rq.
.TP .TP
.B fast\-float .B fast\-float
Use float values directly in \*(lqif\*(rq statements. Use float values directly in \*(lqif\*(rq statements.
Defaults to on. Defaults to on.
This option is always enabled when using version 6 progs (\fBv6only\fP is in This option is always enabled when using version 6 progs (\fBv6only\fP is in
effect). effect).
.TP .TP
.B local-merging .B local-merging
Clump the local variables from all functions into one block of data the size Clump the local variables from all functions into one block of data the size
@ -235,6 +285,7 @@ data.
This can be a problem because instructions can access addresses up to 32767 in This can be a problem because instructions can access addresses up to 32767 in
older servers or 65535 in most modern servers. older servers or 65535 in most modern servers.
Defaults to off for traditional mode, and on for advanced mode. Defaults to off for traditional mode, and on for advanced mode.
.TP .TP
.B short\-circuit .B short\-circuit
Generate short circuit code for logical operators (\fB&&\fP and \fB||\fP). Generate short circuit code for logical operators (\fB&&\fP and \fB||\fP).
@ -243,6 +294,7 @@ the code for \fBB\fP will not be executed.
Similar for \fBA || B\fP, but if \fBA\fP is true, the expression is known to Similar for \fBA || B\fP, but if \fBA\fP is true, the expression is known to
be true and the code for \fBB\fP will not be executed. be true and the code for \fBB\fP will not be executed.
Defaults to off for traditional mode, and on for advanced mode. Defaults to off for traditional mode, and on for advanced mode.
.TP .TP
.B single-cpp .B single-cpp
In \fBprogs.src\fP mode, when \*[cpp] is used, produce an intermediate file In \fBprogs.src\fP mode, when \*[cpp] is used, produce an intermediate file
@ -255,6 +307,7 @@ Without this option, each source file is independent with respect to the
preprocessor. preprocessor.
Has no effect in separate compilation mode. Has no effect in separate compilation mode.
Defaults to on. Defaults to on.
.TP .TP
.B vector\-calls .B vector\-calls
When a function is passed a constant vector, this causes the vector to be When a function is passed a constant vector, this causes the vector to be
@ -263,12 +316,14 @@ instruction.
This can save a good number of pr_globals where those vectors contain many This can save a good number of pr_globals where those vectors contain many
duplicate coordinates but do not match entirely. duplicate coordinates but do not match entirely.
However, this will generate slower code for such calls. However, this will generate slower code for such calls.
.TP .TP
.B vector\-components .B vector\-components
Create extra symbols for accessing the components of a vector variable or Create extra symbols for accessing the components of a vector variable or
field. For example, \fBvector vel\fP will also create \fBvel_x\fP, field. For example, \fBvector vel\fP will also create \fBvel_x\fP,
\fBvel_y\fP, and \fBvel_z\fP. Defaults to on for traditional code and off \fBvel_y\fP, and \fBvel_z\fP. Defaults to on for traditional code and off
for advanced. for advanced.
.TP .TP
.B v6only .B v6only
Restrict the compiler to only version 6 progs (original Quake/QuakeWorld) Restrict the compiler to only version 6 progs (original Quake/QuakeWorld)
@ -280,64 +335,80 @@ support) that require extensions.
Defaults to on for traditional mode and off for advanced mode. Defaults to on for traditional mode and off for advanced mode.
.PP .PP
Any of the above can be prefixed with \fBno\-\fP to negate its meaning. Any of the above can be prefixed with \fBno\-\fP to negate its meaning.
.SH "WARNING OPTIONS" .SH "WARNING OPTIONS"
Warning options are processed in the order of their appearance on the command Warning options are processed in the order of their appearance on the command
line. line.
Unsupported options are ignored. Unsupported options are ignored.
The following options are supported by \*[qfcc]'s \fB\-\-warn\fP argument: The following options are supported by \*[qfcc]'s \fB\-\-warn\fP argument:
.TP .TP
.B cow .B cow
Emit a warning when the source assigns a value to a named constant. Emit a warning when the source assigns a value to a named constant.
See the description of the \fBcow\fP code generation option above for a See the description of the \fBcow\fP code generation option above for a
description of what this means. description of what this means.
.TP .TP
.B error .B error
Promote warnings to errors. Promote warnings to errors.
.TP .TP
.B executable .B executable
Emit a warning when non-executable statements (eg, \fB==\fP used for Emit a warning when non-executable statements (eg, \fB==\fP used for
assignment) are encountered. assignment) are encountered.
.TP .TP
.B initializer .B initializer
Emit a warning when too many structure/array initializer elements are given. Emit a warning when too many structure/array initializer elements are given.
.TP .TP
.B integer-divide .B integer-divide
Emit a warning when both constants in a division operation are integers. Emit a warning when both constants in a division operation are integers.
.TP .TP
.B interface\-check .B interface\-check
Emit a warning when a method is declared in an implementation but not in the Emit a warning when a method is declared in an implementation but not in the
interface for a class. interface for a class.
.TP .TP
.B precedence .B precedence
Emit a warning when potentially ambiguous logic is used without parentheses. Emit a warning when potentially ambiguous logic is used without parentheses.
.TP .TP
.B redeclared .B redeclared
Emit a warning when a local variable is redeclared. Emit a warning when a local variable is redeclared.
.TP .TP
.B switch .B switch
Emit a warning when an enum value is not handled in a switch statement that Emit a warning when an enum value is not handled in a switch statement that
tests an enum. tests an enum.
Using a default label will cause all otherwise unhandled enum values to be Using a default label will cause all otherwise unhandled enum values to be
handled (for good or evil). handled (for good or evil).
.TP
.TP .TP
.B traditional .B traditional
Emit a warning when code that should be an error is allowed by traditional Emit a warning when code that should be an error is allowed by traditional
\fBqcc\fP. \fBqcc\fP.
Has effect only in traditional mode. Has effect only in traditional mode.
.TP .TP
.B undef\-function .B undef\-function
Emit a warning when a function is called, but has not yet been defined. Emit a warning when a function is called, but has not yet been defined.
.TP .TP
.B unimplemented .B unimplemented
Emit a warning when a class method has not been implemented. Emit a warning when a class method has not been implemented.
.TP .TP
.B unused .B unused
Emit a warning for unused local variables. Emit a warning for unused local variables.
.TP .TP
.B uninited\-var .B uninited\-var
Emit a warning when a variable is read from that has not been initialized to a Emit a warning when a variable is read from that has not been initialized to a
value. value.
.TP .TP
.B vararg\-integer .B vararg\-integer
Emit a warning when a function that takes a variable number of arguments is Emit a warning when a function that takes a variable number of arguments is
@ -345,26 +416,34 @@ passed a constant of an integer type.
.PP .PP
Any of the above can be prefixed with \fBno\-\fP to negate its meaning. Any of the above can be prefixed with \fBno\-\fP to negate its meaning.
There are also two special options: There are also two special options:
.TP .TP
.B all .B all
Turns on all warning options except \fBerror\fP. Turns on all warning options except \fBerror\fP.
.TP .TP
.B none .B none
Turns off all warning options except \fBerror\fP. Turns off all warning options except \fBerror\fP.
.SH "NOTICE OPTIONS" .SH "NOTICE OPTIONS"
Notices are used to flag code constructs that may have changed semantics but Notices are used to flag code constructs that may have changed semantics but
shouldn't be treated as warnings. shouldn't be treated as warnings.
They are also used for internal debugging purposes, so if you see any cryptic They are also used for internal debugging purposes, so if you see any cryptic
notices, please report them as a bug (normal notices should be fairly notices, please report them as a bug (normal notices should be fairly
self-explanatory). self-explanatory).
.TP .TP
.B none .B none
Silences all notice messages. Silences all notice messages.
.TP .TP
.B warn .B warn
Promote notices to warnings. Promote notices to warnings.
If warnings are being treated as errors, so will notices. If warnings are being treated as errors, so will notices.
Disabling warnings has no effect on this option. Disabling warnings has no effect on this option.
.SH "CPP NAME" .SH "CPP NAME"
When preprocessing source files, \*[qfcc] calls \*[cpp] (the C When preprocessing source files, \*[qfcc] calls \*[cpp] (the C
preprocessor) with a configurable command line. preprocessor) with a configurable command line.
@ -379,19 +458,24 @@ This spec is similar in concept to a \fBprintf\fP string.
The name of the program may be either absolute (eg \fB/lib/cpp\fP) or relative The name of the program may be either absolute (eg \fB/lib/cpp\fP) or relative
as the \fBPATH\fP will be searched. as the \fBPATH\fP will be searched.
Available substitutions: Available substitutions:
.TP .TP
.B %d .B %d
Mainly for defines (\-D, \-U and \-I) but \fB%d\fP will be replaced by all Mainly for defines (\-D, \-U and \-I) but \fB%d\fP will be replaced by all
\*[cpp] options that \*[qfcc] passes to \*[cpp] \*[cpp] options that \*[qfcc] passes to \*[cpp]
.TP .TP
.B %o .B %o
This will be replaced by the output file path. This will be replaced by the output file path.
Could be either absolute or relative, depending on whether \*[qfcc] is Could be either absolute or relative, depending on whether \*[qfcc] is
deleting temporary files or not. deleting temporary files or not.
.TP .TP
.B %i .B %i
This will be replaced by the input file path. This will be replaced by the input file path.
Generally as given to \*[qfcc]. Generally as given to \*[qfcc].
.SH "COMPILATION MODES" .SH "COMPILATION MODES"
\*[qfcc] has two, mutually exclusive, modes of operation: \fBprogs.src\fP \*[qfcc] has two, mutually exclusive, modes of operation: \fBprogs.src\fP
mode and \*(lqseparate compilation\*(rq mode. mode and \*(lqseparate compilation\*(rq mode.
@ -466,99 +550,153 @@ overridden using \fB--traditional\fP.
When using \*[cpp], each source file is passed through the preprocessor When using \*[cpp], each source file is passed through the preprocessor
individually. individually.
Each file is truly independent of any other file on the command line. Each file is truly independent of any other file on the command line.
.SH "ESCAPE SEQUENCES" .SH "ESCAPE SEQUENCES"
\*[qfcc] supports a variety of string escape sequences. This includes those of \*[qfcc] supports a variety of string escape sequences. This includes those of
\fBqcc\fP (which are a subset of those in standard C), standard C and \fBqcc\fP (which are a subset of those in standard C), standard C and
\fBqccx\fP. There are some conflicts between the escape sequences, but \fBqccx\fP. There are some conflicts between the escape sequences, but
\fB\-\-qccx\-escapes\fP selects which set to use. \fB\-\-qccx\-escapes\fP selects which set to use.
.TP .SS Standard escape sequences:
.B \(rs\(rs These are the supported escape sequences from standard C, with the addition of
Backslash. \(rse (escape), which would be nice if it was in standard C.
.TP
.B \(rsn
Line feed.
.TP
.B \(rs"
Double quote.
.TP
.B \(rs\'
Single quote.
.TP
.B \(rs0-7
Octal character code, up to three digits. This conflicts with \fBqccx\fP. In
\fBqccx\fP, this produces gold digits. Use \fB\-\-qccx\-escapes\fP to select
\fBqccx\fP behaviour.
.TP
.B \(rs8-9
Produce gold digits.
.TP
.B \(rsx0-9A-Fa-f
Hexadecimal character code, any number of digits, but only the least
significant byte will be used.
.TP .TP
.B \(rsa .B \(rsa
Bell character (not in quake engines). Equivalent to \(rsx07. Bell character (not in quake engines). Equivalent to \(rsx07.
.TP .TP
.B \(rsb .B \(rsb
Backspace character (not in quake engines). Equivalent to \(rsx08. This Backspace character (not in quake engines). Equivalent to \(rsx08. This
conflicts with \fBqccx\fP. In \fBqccx\fP, this toggles bronze characters. Use conflicts with \fBqccx\fP. In \fBqccx\fP, this toggles bronze characters. Use
\fB\-\-qccx\-escapes\fP to select \fBqccx\fP behaviour. \fB\-\-qccx\-escapes\fP to select \fBqccx\fP behaviour.
.TP .TP
.B \(rse .B \(rse
Escape character (not in quake engines). Equivalent to \(rsx1b (dull 9). Escape character (not in quake engines). Equivalent to \(rsx1b. Not actually
standard, but it should be.
.TP .TP
.B \(rsf .B \(rsf
Formfeed character (not in quake engines). Equivalent to \(rsx0c. Formfeed character (not in quake engines). Equivalent to \(rsx0c.
.TP
.B \(rsn
Line feed.
.TP .TP
.B \(rsr .B \(rsr
Carriage return. Equivalent to \(rsx0d. Carriage return. Equivalent to \(rsx0d.
.TP .TP
.B \(rss
Toggle "bold" characters (add 0x80).
.B \(rst .B \(rst
Tab character. Equivalent to \(rsx09. Tab character. Equivalent to \(rsx09.
.TP .TP
.B \(rsv .B \(rsv
Vertical tab. Equivalent to \(rsx0b. Vertical tab. Equivalent to \(rsx0b.
.TP .TP
.B \(rs^ .B \(rs\(rs
Make the next character "bold" (add 0x80). Backslash.
.TP
.B \(rs\'
Single quote.
.TP
.B \(rs"
Double quote.
.TP
.B \(rs?
Question mark. Avoids trigraphs in standard C, but supported for compatibility.
.TP
.B \(rs0-7
Octal character code, up to three digits. This conflicts with \fBqccx\fP. In
\fBqccx\fP, this produces gold digits. Use \fB\-\-qccx\-escapes\fP to select
\fBqccx\fP behaviour.
.TP
.B \(rs8-9
Produce gold digits.
.TP
.B \(rsx0-9A-Fa-f
Hexadecimal character code, any number of digits, but only the least
significant byte will be used.
.SS Quake character set extension escape sequences:
.TP
.B \(rsb
Toggle bronze characters. Requires \fB\-\-qccx\-escapes\fP.
.TP
.B \(rss
Toggle "bold" characters (add 0x80).
.TP .TP
.B \(rs[ .B \(rs[
Gold [ character. Equivalent to \(rsx90. Gold [ character. Equivalent to \(rsx90.
.TP .TP
.B \(rs] .B \(rs]
Gold ] character. Equivalent to \(rsx91. Gold ] character. Equivalent to \(rsx91.
.TP .TP
.B \(rs. .B \(rs.
Center dot. Equivalent to \(rsx1c. Center dot. Equivalent to \(rsx1c.
.TP .TP
.B \(rs< .B \(rs<
Turn on "bold" characters (add 0x80). This conflicts with \fBqccx\fP. In Turn on "bold" characters (add 0x80). This conflicts with \fBqccx\fP. In
\fBqccx\fP, this produces the brown left end. Equivalent to \(rsx1d. Use \fBqccx\fP, this produces the separator left end. Equivalent to \(rsx1d. Use
\fB\-\-qccx\-escapes\fP to select \fBqccx\fP behaviour. \fB\-\-qccx\-escapes\fP to select \fBqccx\fP behaviour.
.TP .TP
.B \(rs\- .B \(rs\-
Brown center bit. Equivalent to \(rsx1e. Separator center. Equivalent to \(rsx1e.
.TP .TP
.B \(rs> .B \(rs>
Turn off "bold" characters (add 0x80). This conflicts with \fBqccx\fP. In Turn off "bold" characters (add 0x80). This conflicts with \fBqccx\fP. In
\fBqccx\fP, this produces the brown right end. Equivalent to \(rsx1f. Use \fBqccx\fP, this produces the separator right end. Equivalent to \(rsx1f. Use
\fB\-\-qccx\-escapes\fP to select \fBqccx\fP behaviour. \fB\-\-qccx\-escapes\fP to select \fBqccx\fP behaviour.
.TP
.B \(rs^
Make the next character "bold" (add 0x80).
.TP
.B \(rs0-9
Produce gold digits. Requires \fB\-\-qccx\-escapes\fP (except \(rs8 and \(rs9:
they are always available).
.TP .TP
.B \(rs( .B \(rs(
Left slider end. Equivalent to \(rsx80. Slider left end. Equivalent to \(rsx80.
.TP .TP
.B \(rs= .B \(rs=
Slider center. Equivalent to \(rsx81. Slider center. Equivalent to \(rsx81.
.TP .TP
.B \(rs) .B \(rs)
Right slider end. Equivalent to \(rsx82. Slider right end. Equivalent to \(rsx82.
.TP .TP
.B \(rs{0-255} .B \(rs{0-255}
Decimal character code. Decimal character code. Quake specific as qccx added this to allow specifying
the character code directly as \(rs0-\(rs9 were already used for specifying
gold digits.
.P .P
\fB\-\-qccx\-escapes\fP has no effect on sequences that do not conflict. \fB\-\-qccx\-escapes\fP has no effect on sequences that do not conflict.
.SH TRADITIONAL VS ADVANCED .SH TRADITIONAL VS ADVANCED
Compared to \fBqcc\fP, \*[qfcc] has many advanced features and is much stricter Compared to \fBqcc\fP, \*[qfcc] has many advanced features and is much stricter
about type checking. about type checking.
@ -586,13 +724,17 @@ a lot of data space).
Advanced mode is simply \*[qfcc] in its natural state. Advanced mode is simply \*[qfcc] in its natural state.
Using \fB--advanced\fP, \*[qfcc] can be put in to advanced mode while using the Using \fB--advanced\fP, \*[qfcc] can be put in to advanced mode while using the
\fBprogs.src\fP compilation mode. \fBprogs.src\fP compilation mode.
.SH "FAQ" .SH "FAQ"
.TP .TP
.B Where did the name Ruamoko come from? .B Where did the name Ruamoko come from?
In Maori mythology, Ruamoko is the youngest child of Ranginui, the In Maori mythology, Ruamoko is the youngest child of Ranginui, the
Sky-father, and Papatuanuku, the Earth-mother. Sky-father, and Papatuanuku, the Earth-mother.
Ruamoko is the god of volcanoes and earthquakes. Ruamoko is the god of volcanoes and earthquakes.
For more information, see the Web site at <\fBhttp://maori.com/kmst1.htm\fP>. For more information, see the Web site at <\fBhttp://maori.com/kmst1.htm\fP>.
.TP .TP
.B qfcc hangs .B qfcc hangs
This is almost always caused by qfcc incorrectly invoking \*[cpp]. This is almost always caused by qfcc incorrectly invoking \*[cpp].
@ -600,11 +742,13 @@ Using the \fB--cpp\fP option (refer to the \fBCPP NAME\fP section above), the
correct method for invoking \*[cpp] can be specified. correct method for invoking \*[cpp] can be specified.
Once you have found this, please send the correct \*[cpp] command line, Once you have found this, please send the correct \*[cpp] command line,
preferably along with the output of \fBconfig.guess\fP, to the team. preferably along with the output of \fBconfig.guess\fP, to the team.
.TP .TP
.B qfcc is singing a bad 80s rap song to me. What's going on? .B qfcc is singing a bad 80s rap song to me. What's going on?
\*(lqice ice baby\*(rq is QuakeForge-speak for \*(lqInternal Compiler \*(lqice ice baby\*(rq is QuakeForge-speak for \*(lqInternal Compiler
Error\*(rq. Error\*(rq.
It usually means there's a bug in \*[qfcc], so please report it to the team. It usually means there's a bug in \*[qfcc], so please report it to the team.
.TP .TP
.B qfcc is mooing at me. What's wrong with you people? .B qfcc is mooing at me. What's wrong with you people?
The compiler doesn't like being treated like a slab of beef. The compiler doesn't like being treated like a slab of beef.
@ -615,11 +759,17 @@ while, but you told it not to do that by passing the \fBcow\fP option to
\fB\-\-code\fP, so it has its revenge by mooing out a warning. \fB\-\-code\fP, so it has its revenge by mooing out a warning.
Or something like that. Or something like that.
To disable the warning, pass \fBno-cow\fP to \fB\-\-warn\fP. To disable the warning, pass \fBno-cow\fP to \fB\-\-warn\fP.
.SH "FILES" .SH "FILES"
.I progs.src .I progs.src
.SH "SEE ALSO" .SH "SEE ALSO"
.BR quakeforge (1), .BR quakeforge (1),
.BR pak (1) .BR pak (1)
.SH AUTHORS .SH AUTHORS
The original \fBqcc\fP program, for compiling the QuakeC language, was written The original \fBqcc\fP program, for compiling the QuakeC language, was written
by Id Software, Inc. by Id Software, Inc.

View file

@ -188,6 +188,10 @@ make_string (char *token, char **end)
boldnext = 0; boldnext = 0;
c = '\'' ^ mask; c = '\'' ^ mask;
break; break;
case '?':
boldnext = 0;
c = '?' ^ mask;
break;
case '0': case '0':
case '1': case '1':
case '2': case '2':