ken@turtlevax.UUCP (Ken Turkowski) (11/09/84)
Is there any documentation anywhere about the C preprocessor, or does one need to read through the source code to find out how to use it outside of the C compiler? I'm on a 4.2bsd UNIX system, if that makes any difference. One of the things that I'd like to do is to run the preprocessor on a file, recognizing #ifdefs and including those files that would get included based on the status of #define'ed variables, but I do not want to make the macro substitutions in the resultant output. In other words, I'd just like to conditionally unroll the #include's, without touching the #defines. Can the C preprocessor do this? -- Ken Turkowski @ CADLINC, Palo Alto, CA UUCP: {amd,decwrl,flairvax,nsc}!turtlevax!ken ARPA: turtlevax!ken@DECWRL.ARPA
gwyn@brl-tgr.ARPA (Doug Gwyn <gwyn>) (11/12/84)
> Is there any documentation anywhere about the C preprocessor, or does > one need to read through the source code to find out how to use it > outside of the C compiler? The UNIX System V User Reference Manual documents the C preprocessor under CPP(1). It also warns you that the C preprocessor is intended only for use via "cc" with C sources and that any other use may break some day. I assume this refers to the possibility of bundling the CPP functions into the lexical analyzer where they belong.