newscppi - News: cppi-1.14 released [stable]

Latest News
cppi-1.17 released [stable] posted by meyering, Sat 04 Aug 2012 05:44:08 PM UTC - 0 replies
cppi-1.15 released [stable] posted by meyering, Thu 18 Mar 2010 10:57:22 AM UTC - 0 replies
cppi-1.14 released [stable] posted by meyering, Wed 03 Mar 2010 07:43:20 PM UTC - 0 replies
[Submit News]
[3 news in archive]

cppi-1.14 released [stable]

Item posted by Jim Meyering <meyering> on Wed 03 Mar 2010 07:43:20 PM UTC.

GNU cppi is a cpp directive indenter.
Its documentation is no more than its --help output (included below).

It converts unindented (or inconsistently indented) code like this:

    #ifdef ...
    #if defined ... || defined ...
    #define a b
    #define a c

to this, without modifying non-cpp lines.

    #ifdef ...
    # if defined ... || defined ...
    #  define a b
    # else
    #  define a c
    # endif

It can also merely report improperly-indented lines,
be it the lines themselves or just the names of the containing files.

Here are the compressed sources:   (392KB)

Here are the GPG detached signatures[*]:
To reduce load on the main server, use a mirror listed at:

[*] You can use either of the above signature files to verify that
the corresponding file (without the .sig suffix) is intact.  First,
be sure to download both the .sig file and the corresponding tarball.
Then, run a command like this:

  gpg --verify cppi-1.14.tar.xz.sig

If that command fails because you don't have the required public key,
then run this command to import it:

  gpg --keyserver --recv-keys B9AB9A16

and rerun the `gpg --verify' command.

This release was bootstrapped with the following tools:
  Autoconf 2.65.48-d174a
  Automake 1.11a
  Gnulib v0.0-3483-gaadf332


* Noteworthy changes in release 1.14 (2010-03-03) [stable]

$ cppi --help
Usage: cppi [FILE]
  or:  cppi -c [OPTION] [FILE]...

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
     if text follows #else/#endif (enabled with --check --ansi), or
     found a double-quoted string 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.

Report bugs to <>.

No messages in cppi-1.14 released [stable]


Back to the top

Powered by Savane 3.6