

CPP (1)                       30 May 1993                        CPP (1)




pNAMEq pq pq pq pq pq pq pq pq 
        cpp - a stand-alone C preprocessor 

pSYNOPSISq pq pq pq pq pq pq pq pq 
        pcppq [ p-CTVq ] [ p-Pq[012]pqpq ] [ p-Dqnamepqpq ] 
             [ p-Dqnamep=qdefpq ] [ p-Iqdirectorypqpq ] [ p-Uqnamepqpq ] 
             [ p-ansiq ] [ p-fq[no-]pc++-commentsqpq ] [ p-Wq[no-]pbad-charsqpq ] 
             [  p-Wq[no-]pnested-commentsqpq  ] [ p-Wq[no-]pbad-concat-tokensqpq ] [
        pinput-fileq [ poutput-fileq ] ] 

pDESCRIPTIONq pq pq pq pq pq pq pq pq 

        pcppq 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.  

        pcppq optionally  accepts  two filenames as arguments.  pinput-fileq
        and poutput-fileq 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.  

pOPTIONSq pq pq pq pq pq pq pq pq 

        p-Cq  
                Pass  all  comments  (except  those  that appear on  pcppq
                directive lines) through the preprocessor.  By  default,
                pcppq strips out C-style comments.  

        p-Pq[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#lineq directives.  

        p-Tq  
                Translate trigraphs in the input file.  This behavior is 
                implied by the p-ansiq option.  

        p-Dq name  
                Define  pnameq  as  1  (one).    This  is the same as if a
                p-Dqnamep=1qpq option appeared on the  pcppq command line, or as 
                if a 

         
                p#defineq name p1qpq 




Thu Jul 7 22:27:55 1994                                           Page 1




CPP (1)                       30 May 1993                        CPP (1)



         
                line  appeared  in  the  source  file  that     pcppq   is
                processing.  

        p-Dqnamep=qdef  
                Define pnameq  as  if by a p#defineq directive.  This is the
                same as if a 

         
                p#defineq name pdefqpq 

         
                line  appeared  in  the  source  file  that     pcppq   is
                processing.  The p-Dq option has lower precedence than the 
                p-Uq  option;  that is, if the same name is used in both a
                p-Uq option and a p-Dq option, the name  will  be  undefined
                regardless of the order of the options.  

        p-Iqdirectory  
                Insert    pdirectoryq  into  the  search path for p#includeq
                files with names not beginning with q`p/q', `p\qº,pq or a drive 
                specifier.  pdirectoryq is inserted ahead of the  standard
                list of  ``include''  directories.  Thus, p#includeq files
                with names enclosed in double-quotes  (p"q)  are  searched
                for first in the directory of the file with the p#includeq 
                line,  then  in  directories  named with p-Iq options, and
                lastly, in directories from  the  standard  list.    For
                p#includeq  files  with  names  enclosed in angle-brackets
                q(p<>q),pqpq the directory of the file with the  p#includeq  line
                is not  searched.   See pUSAGEq below for exact details of
                this search order.  

        p-Sq[filename]  
                Specify an alternate configuration file.  If pfilenameq is 
                present, the specified  file  is  read  instead  of  the
                default  configuration  file; if pfilenameq is absent, the
                default configuration file is  simply  not  read.    See
                pUSAGEq below for further details.  

        p-Uqname  
                Remove  any  initial definition of pnameq,pqpq where pnameq is a
                symbol that is predefined by the preprocessor.  

        p-Vq  
                Print version information to pstderrq.pqpq 

        p-ansiq  
                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-ansiq p-Tq.pqpq 

        The  following  p-fq and p-Wq options can be negated by adding a pno-q
        before the option name.  Some are on by default.  



Thu Jul 7 22:27:55 1994                                           Page 2




CPP (1)                       30 May 1993                        CPP (1)



        p-fc++-commentsq  
                Support the C++ comment indicator q`p//qº.pqpq With this option 
                active, everything on the line after the p//q  is  treated
                as a comment.  Off by default.  

        p-Wbad-charsq  
                Issue  a  warning  if  a  character  that cannot legally
                appear in a C program appears  in  the  input.    On  by
                default.  

        p-Wnested-commentsq  
                Issue  a  warning  if a comment-start character sequence
                q(`p/*qº,pqpq and q`p//qºpqpq if p-fc++-commentsq is active) appears  in
                a comment.  Off by default.  

        p-Wbad-concat-tokensq  
                Issue  a  warning if the token concatenation operator ##
                produces an illegal C token.  On by default.  

        Options beginning with p-Xq are for specialized interactions  with
        particular  programs,  and  should    not  generally  be invoked
        directly by the user.  The following such options are  currently
        recognized: 

        p-Xfluffq  
                This   option  is  used  by  the  pfluffq(1)pqpq  source  code
                checker.  It causes the preprocessor token p__FLUFF__q  to
                be defined,  and  enables  certain related pragmas.  See
                the pfluffq(1)pqpq documentation for further information.  

pUSAGEq pq pq pq pq pq pq pq pq 
        If you are familiar with C, you should already  know  about  the
        basic   workings  of  pcppq.pqpq  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.  

        ppDirectory Search Orderqq pq pq pq pq pq pq pq pq 


        A file specified in an p#includeq directive will be  searched  for
        in the following directories, in order: 

        1.  
                The  directory  of  the file that contains the  p#includeq
                directive, if the directive is  of  the  form  `p#includeq
                "filename"'.  

        2.  
                The  directories  specified  by p-Iq options, in the order
                they were specified.  

        3.  
                The  list  of  directories  specified  in  the   pINCLUDEq



Thu Jul 7 22:27:55 1994                                           Page 3




CPP (1)                       30 May 1993                        CPP (1)



                environment variable, in order.  

        ppSpecial Namesqq pq pq pq pq pq pq pq pq 


        The following macros are predefined by pcppq:pqpq 

        p__STDC__q  
                Expands to 1 if the p-ansiq option is specified.  

        p__LINE__q  
                Expands  to an integer constant representing the current
                line number in the current input file.  

        p__FILE__q  
                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#includeq files.  

        ppConfiguration filesqq pq pq pq pq pq pq pq pq 


        pcppq uses a configuration file to set up site-specific predefined 
        macros.  By  default,  the  directories  specified  in  the  pLIBq
        environment   variable  are  searched  in  order  for  the  file
        pcpp_defs.hq;pqpq an alternate file can be specified from the  command
        line with the p-Sq 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  recognized   within   the
        configuration file only: 

        #pragma CPP_cmdline_arg poptionq  
                The  single  token  poptionq 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.  




Thu Jul 7 22:27:55 1994                                           Page 4




CPP (1)                       30 May 1993                        CPP (1)



        #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-ansiq option: 
        
            #pragma CPP_cmdline_arg -fc++-comments
            #pragma CPP_delayed
            #ifdef __STDC__
            #  define _PROTO(x) x
            #else
            #  define _PROTO(x) ()
            #endif
        

pSEEq pALSOq pq pq pq pq pq pq pq 
        pfluffq(1)pqpq 

        Documentation for your C compiler 

        Any good book on C.  

pDIAGNOSTICSq pq pq pq pq pq pq pq pq 

        The  error  messages  produced  by  pcppq  are  intended   to   be
        self-explanatory.   The line number and filename where the error
        occurred are printed along with the diagnostic.  

pBUGSq pq pq pq pq pq pq pq pq 
        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.  
















Thu Jul 7 22:27:55 1994                                           Page 5


