cb(1) cb(1)NAME cb - improves spacing and indentation of C source files SYNOPSIS cb [-j] [-l line-length] [file]... cb [-j] [-s] [file]... ARGUMENTS file Specifies the name of a C source file. If you do not specify a file argument, cb reads from the standard input. -j Causes split lines, such as those split by the -l option, to be put back together. -l line-length Causes cb to attempt to split lines that are longer than the value specified by line-length. Not all lines are split; for example, cb does not split comments or lines that contain long stretches of characters surrounded by quotation marks. If you do not use this option, cb preserves the position of newline characters in the C source file. -s Causes cb to produce an output that is in the canonical style defined by Kernighan and Ritchie in The C Programming Language. DESCRIPTION cb reads C files and writes them to the standard output with spacing and indentation that displays the structure of the code. A more recent program called indent performs the same function as this command. For details, refer to the indent(1) manual page. EXAMPLES A sample C source file contains these lines: #define COMING 1 #define GOING 0 main () { /* This is a test of the C Beautifier */ if (COMING) printf ("Hello, world\n"); else printf ("Good bye, world\n"); } January 1992 1
cb(1) cb(1)Running the cb command on the sample C source file produces this output: #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"); } LIMITATIONS Punctuation in preprocessor statements causes indentation errors. FILES /usr/bin/cb Executable file SEE ALSO cc(1), indent(1) The C Programming Language by B. W. Kernighan and D. M. Ritchie (New Jersey: Prentice-Hall, Inc., 1978) 2 January 1992