
102
|
Chapter 3: Linux Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
Directives
All cpp directive lines start with # in column 1. Any number of
blanks and tabs is allowed between the # and the directive. The
directives are:
#assert name (string)
Define a question called name, with an answer of string. Asser-
tions can be tested with #if directives. The predefined
assertions for #system, #cpu, and #machine can be used for
architecture-dependent changes.
#unassert name
Remove assertion for question name.
#define name token-string
Define a macro called name, with a value of token-string.
Subsequent instances of name are replaced with token-string.
#define name( arg, ... , arg ) token-string
This allows substitution of a macro with arguments. token-
string will be substituted for name in the input file. Each call to
name in the source file includes arguments that are plugged
into the corresponding args in token-string.
#undef name
Remove definition of the macro name. No additional tokens
are permitted on the directive line after name.
#ident string
Put string into the comment section of an object file.
#include "filename", #include<filename>
Include contents of filename at this point in the program. No
additional tokens are permitted on the directive line after the
final " or >.
#line integer-constant "filename"
Cause cpp to generate line-control ...