Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
CPPI(1) 			  User Commands 			 CPPI(1)

NAME
     cppi  - indent the C preprocessor directives in FILE to reflect their nest-
     ing

SYNOPSIS
     cppi [FILE]
     cppi -c [OPTION] [FILE]...

DESCRIPTION
     Indent the C preprocessor directives in FILE to reflect their  nesting  and
     ensure  that  there is exactly one space character between each #if, #elif,
     #define directive and the following token, and write the result to standard
     output.  The number of spaces between the `#' and the  following  directive
     must  correspond  to the level of nesting of that directive.  With no FILE,
     or when FILE is -, read standard input.

     -a, --ansi
	    when checking, fail if text follows #else or #endif

     -c, --check
	    set exit code, but don't produce any output

     -l, --list-files-only
	    don't generate diagnostics about indentation; print to  stdout  only
	    the names of files that are not properly indented

     -m, --max-string-length=LENGTH
	    fail  if  there  is  a  double-quoted string longer than LENGTH;  if
	    LENGTH is 0 (the default), then there is no limit

     --help
	    display this help and exit

     --version
	    output version information and exit

     With the -c option, don't write to stdout.  Instead, check the  indentation
     of  the  specified  files	giving	diagnostics  for preprocessor lines that
     aren't properly indented or are otherwise invalid.

     Note that --ansi without --check does not correct the problem  of	non-ANSI
     text following #else and #endif directives.

   The exit code will be one of these:
     0	    all directives properly indented

     1	    some   cpp	 directive(s)	improperly  indented,  or  text  follows
	    #else/#endif (enabled  with  --check  --ansi),  or	a  double-quoted
	    string is longer than the specified maximum

     2	    #if/#endif mismatch, EOF in comment or string

     3	    file (e.g. open/read/write) error

     A pragma directive may have its `#' indented.

AUTHOR
     Written by Jim Meyering.

REPORTING BUGS
     Report bugs to <bug-cppi@gnu.org>.

COPYRIGHT
     Copyright	(C) 2013 Free Software Foundation, Inc.  License GPLv3+: GNU GPL
     version 3 or later <http://gnu.org/licenses/gpl.html>.
     This is free software: you are free to change and redistribute  it.   There
     is NO WARRANTY, to the extent permitted by law.

SEE ALSO
     The  full documentation for cppi is maintained as a Texinfo manual.  If the
     info and cppi programs are properly installed at your site, the command

	    info cppi

     should give you access to the complete manual.

cppi 1.18			   March 2013				 CPPI(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=cppi&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help