home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Club Elmshorn Atari PD
/
CCE_PD.iso
/
mac
/
1000
/
CCE_1024.ZIP
/
CCE_1024
/
SOZBIN07.LZH
/
SOZDISTR
/
DOC
/
CPP.MAN
< prev
next >
Wrap
Text File
|
1994-02-27
|
12KB
|
331 lines
CPP (1) 30 May 1993 CPP (1)
pNAMEq pq pq pq pq pq pq pq pq
cpp - a stand-alone C preprocessor
pSYNOPSISq pq pq pq pq pq pq pq pq
pcppq [ p-CTVq ] [ p-Pq[012]pqpq ] [ p-Dqnamepqpq ]
[ p-Dqnamep=qdefpq ] [ p-Iqdirectorypqpq ] [ p-Uqnamepqpq ]
[ p-ansiq ] [ p-fq[no-]pc++-commentsqpq ] [ p-Wq[no-]pbad-charsqpq ]
[ p-Wq[no-]pnested-commentsqpq ] [ pinput-fileq [ poutput-fileq ] ]
pDESCRIPTIONq pq pq pq pq pq pq pq pq
pcppq is a stand-alone C preprocessor, intended for use with C
compilers such as HSC which do not provided access to
preprocessor output. It implements as closely as possible an
ANSI standard C preprocessor, including trigraphs, token pasting
and stringizing.
pcppq optionally accepts two filenames as arguments. pinput-fileq
and poutput-fileq are, respectively, the input and output files
for the preprocessor. If not specified, or if given as `-',
they default to the standard input and the standard output,
respectively.
pOPTIONSq pq pq pq pq pq pq pq pq
p-Cq
Pass all comments (except those that appear on pcppq
directive lines) through the preprocessor. By default,
pcppq strips out C-style comments.
p-Pq[012]
Preprocess the input without producing the line control
information used by the next pass of the C compiler. A
numeric argument can be passed to -P: 0 specifies that
no line control information control is generated, and is
equivalent to -P; 1 specifies that normal line control
information is generated, which is the default; and 2
specifies that line control information is generated in
the form of preprocessor p#lineq directives.
p-Tq
Translate trigraphs in the input file. This behavior is
implied by the p-ansiq option.
p-Dq name
Define pnameq as 1 (one). This is the same as if a
p-Dqnamep=1qpq option appeared on the pcppq command line, or as
if a
p#defineq name p1qpq
Sun Feb 27 15:41:03 1994 Page 1
CPP (1) 30 May 1993 CPP (1)
line appeared in the source file that pcppq is
processing.
p-Dqnamep=qdef
Define pnameq as if by a p#defineq directive. This is the
same as if a
p#defineq name pdefqpq
line appeared in the source file that pcppq is
processing. The p-Dq option has lower precedence than the
p-Uq option; that is, if the same name is used in both a
p-Uq option and a p-Dq option, the name will be undefined
regardless of the order of the options.
p-Iqdirectory
Insert pdirectoryq into the search path for p#includeq
files with names not beginning with q`p/q', `p\q´,pq or a drive
specifier. pdirectoryq is inserted ahead of the standard
list of ``include'' directories. Thus, p#includeq files
with names enclosed in double-quotes (p"q) are searched
for first in the directory of the file with the p#includeq
line, then in directories named with p-Iq options, and
lastly, in directories from the standard list. For
p#includeq files with names enclosed in angle-brackets
q(p<>q),pqpq the directory of the file with the p#includeq line
is not searched. See pUSAGEq below for exact details of
this search order.
p-Sq[filename]
Specify an alternate configuration file. If pfilenameq is
present, the specified file is read instead of the
default configuration file; if pfilenameq is absent, the
default configuration file is simply not read. See
pUSAGEq below for further details.
p-Uqname
Remove any initial definition of pnameq,pqpq where pnameq is a
symbol that is predefined by the preprocessor.
p-Vq
Print version information to pstderrq.pqpq
p-ansiq
Define the preprocessor token p__STDC__q to have value 1,
and enable trigraph translation. To get p__STDC__q
without trigraph translation, you can specify the
options p-ansiq p-Tq.pqpq
The following p-fq and p-Wq options can be negated by adding a pno-q
before the option name. Some are on by default.
Sun Feb 27 15:41:03 1994 Page 2
CPP (1) 30 May 1993 CPP (1)
p-fc++-commentsq
Support the C++ comment indicator q`p//q´.pqpq With this option
active, everything on the line after the p//q is treated
as a comment. Off by default.
p-Wbad-charsq
Issue a warning if a character that cannot legally
appear in a C program appears in the input. On by
default.
p-Wnested-commentsq
Issue a warning if a comment-start character sequence
q(`p/*q´,pqpq and q`p//q´pqpq if p-fc++-commentsq is active) appears in
a comment. Off by default.
pUSAGEq pq pq pq pq pq pq pq pq
If you are familiar with C, you should already know about the
basic workings of pcppq.pqpq We will not go into a detailed
description here, since any good book on C could do better;
instead, we will describe details particular to this
implementation.
ppDirectory Search Orderqq pq pq pq pq pq pq pq pq
A file specified in an p#includeq directive will be searched for
in the following directories, in order:
1.
The directory of the file that contains the p#includeq
directive, if the directive is of the form `p#includeq
"filename"'.
2.
The directories specified by p-Iq options, in the order
they were specified.
3.
The list of directories specified in the pINCLUDEq
environment variable, in order.
ppSpecial Namesqq pq pq pq pq pq pq pq pq
The following macros are predefined by pcppq:pqpq
p__STDC__q
Expands to 1 if the p-ansiq option is specified.
p__LINE__q
Expands to an integer constant representing the current
line number in the current input file.
p__FILE__q
Sun Feb 27 15:41:03 1994 Page 3
CPP (1) 30 May 1993 CPP (1)
Expands to a string constant representing the name of
the current input file.
p__DATE__q
Expands to a string constant of the form "Mmm dd yyyy"
representing the date on which preprocessing was
initiated.
p__TIME__q
Expands to a string constant of the form "hh:mm:ss"
representing the system time at which preprocessing was
initiated.
p__INCLUDE_LEVEL__q
Expands to an integer constant representing the current
depth of nested p#includeq files.
ppConfiguration filesqq pq pq pq pq pq pq pq pq
pcppq uses a configuration file to set up site-specific predefined
macros. By default, the directories specified in the pLIBq
environment variable are searched in order for the file
pcpp_defs.hq;pqpq an alternate file can be specified from the command
line with the p-Sq option.
The configuration file is read just like a normal input file,
except that text other than preprocessor directives is not
passed through to the output file. Normally the configuration
file will contain only comments and preprocessor directives. In
addition, two special pragmas are available within the
configuration file only:
#pragma CPP_cmdline_arg poptionq
The single token poptionq is processed as though it had
appeared as a command-line option. The option may be
undone from the command line, except as indicated
below.
#pragma CPP_delayed
Normally, the configuration file is processed before
command-line options are processed, to allow the
commands therein to be overridden by command-line
options. This pragma causes the command line to be
processed before the remainder of the file, allowing
conditional setup based on parameters set from the
command line. Note that macro definitions and
command-line specifications made after this pragma
cannot be undone from the command line.
For example, the following configuration file activates C++
comments by default, and sets the macro p_PROTO()q according to
the presence of the p-ansiq option:
Sun Feb 27 15:41:03 1994 Page 4
CPP (1) 30 May 1993 CPP (1)
#pragma CPP_cmdline_arg -fc++-comments
#pragma CPP_delayed
#ifdef __STDC__
# define _PROTO(x) x
#else
# define _PROTO(x) ()
#endif
pSEEq pALSOq pq pq pq pq pq pq pq
Documentation for your C compiler
Any good book on C.
pDIAGNOSTICSq pq pq pq pq pq pq pq pq
The error messages produced by pcppq are intended to be
self-explanatory. The line number and filename where the error
occurred are printed along with the diagnostic.
pBUGSq pq pq pq pq pq pq pq pq
None that I know of, but there's almost always One More Bug(TM).
If you should find one, please report it to me, Scott Bigham, at
dsb@cs.duke.edu.
Sun Feb 27 15:41:03 1994 Page 5