cb(1) cb(1)
NAME
cb - C program beautifier
SYNOPSIS
cb [-s] [-j] [-l leng] [file...]
DESCRIPTION
cb reads C programs either from its arguments or from the
standard input and writes them on the standard output with
spacing and indentation that displays the structure of the
code. Under default options, cb preserves all user
newlines. Under the -s flag option cb standardizes the code
to the canonical style of Kernighan and Ritchie in The C
Programming Language. The -j flag option causes split lines
to be put back together. The -l flag option causes cb to
split lines that are longer than leng.
EXAMPLE
If there is a C program called test.c which looks like this:
#define COMING 1
#define GOING 0
main ()
{
/* This is a test of the C Beautifier */
if (COMING)
printf ("Hello, world\n");
else
printf ("Goodbye, world\n");
}
Then using the cb command as shown below produces the output
shown:
cb test.c
#define COMING 1
#define GOING 0
main ()
{
/* This is a test of the C Beautifier */
if (COMING)
printf ("Hello, world\n");
else
printf ("Goodbye, world\n");
}
FILES
/usr/bin/cb
SEE ALSO
Page 1 (last mod. 1/16/87)
cb(1) cb(1)
cc(1).
The C Programming Language by B. W. Kernighan and D. M.
Ritchie.
BUGS
Punctuation that is hidden in preprocessor statements will
cause indentation errors.
Page 2 (last mod. 1/16/87)