CPP.ANSI(6)

NAME
cpp.ansi - ANSI C Pre-Processor

SYNOPSIS
~em/lib.bin/cpp.ansi [-options] [ file ]

DESCRIPTION
Cpp.ansi reads a file, expands macros and include files, and writes an input file for the C compiler. All output is to standard output.
The following options are supported.

-Idirectory
    add this directory to the list of directories searched for #include "..." and #include <...> commands. Note that there is no space between the "-I" and the directory string. More than one -I command is permitted.

-I  end the list of directories to be searched, and also do not look in default places.

-Dname=text
    define name as a macro with text as its replacement text.

-Dname
    the same as -Dname=1.

-Uname
    undefine the macro name name.

-C  leave comments in. By default, C-comments are deleted.

-P  do not generate line directives

-Mn set maximum identifier length to n.

-d[file]
    if file is not given, do not preprocess, but instead generate a list of makefile dependencies and write them to the standard output. If file is given, generate preprocessor output on standard output, and generate the list of makefile dependencies on file file.

-A[file]
    identical to the -d option.

-i  when generating makefile dependencies, do not include files from /usr/include.

-m  when generating makefile dependencies, generate them in the following format:

    file.o: file1.h

    where "file.o" is derived from the source file name. Normally, only a list of files included is generated.

-undef
    this flag is silently ignored, for compatibility with other preprocessors.

The following names are always available. They cannot be the subject of a -U command line option or a #undef directive.

    __STDC__
        A decimal constant 1, indicating that this is an ANSI C conforming implementation.

    __FILE__
        The input (or #include) file being compiled (as a quoted string).

    __LINE__
        The line number being compiled.

    __DATE__
        The date of translation of the source file. This is a string literal of the form "Mmm dd yyyy".

    __TIME__
        The time of translation of the source file. This is a string literal of the form "hh:mm:ss".

BUGS
The output may contain extra spaces, this prevents unintended pasting of tokens.

SEE ALSO
L. Rosler, Draft Proposed Standard - Programming Language C, ANSI X3J11 Language Subcommittee