CPPI(1)
π CPPI(1) β the cppi page, but make it cute π
okay bestie, so this is the manual page for cppi, living in the User Commands section of the manual. she's a little C-preprocessor-directive indenter and she is so underrated. let's get into it β¨
πΈ NAME πΈ
cppi β indent the C preprocessor directives in FILE to reflect their nesting πͺ
π SYNOPSIS π
cppi [FILE]
cppi -c [OPTION] [FILE]...
β¨ DESCRIPTION β¨
Indent the C preprocessor directives in FILE so they actually reflect their nesting, and make sure there's exactly one space character between each #if, #elif, #define directive and the following token β then write the whole thing to standard output. π
The number of spaces between the # and the following directive has to correspond to the level of nesting of that directive. like, that's the whole vibe check.
With no FILE, or when FILE is -, read standard input. π«Ά
-a,--ansiβ when checking, fail if text follows#elseor#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 is0(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. π
β οΈ heads up bestie: note that--ansiwithout--checkdoes not correct the problem of non-ANSI text following#elseand#endifdirectives. she sees it, she does not fix it, that's just her brand π
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/#endifmismatch, 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>. π (yes, actually email the bugs, they wanna hear about them)
π COPYRIGHT π
Copyright Β© 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. π«Ά
and that's the whole page, bestie!! this is cppi 1.18, from March 2013 β yeah she's an elder but she's still iconic, no cap. now go indent something and slay π
β¨π
π¦ where this page comes from
- fedora 43: cppi 1.18-26.fc43 Β· GPL-3.0-or-later
- fedora 44: cppi 1.18-28.fc44 Β· GPL-3.0-or-later
- nixos 26.05: cppi 1.18
- nixpkgs unstable: cppi 1.18
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms