cb(1)
NAME
cb − C program beautifier, formatter
SYNOPSIS
cb [−s] [−j] [−l length ] [file ...]
DESCRIPTION
cb reads C programs, either from files 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 new-lines.
Options
cb recognizes the following options:
−s Converts the code to the canonical style of Kernighan and Ritchie in The C Programming Language.
−j Causes split lines to be put back together.
−l length Causes cb to split lines that are longer than length. If the position indicated by length is in the middle of an identifier, an operator, a comment, or a string literal, cb keeps the entire token on the same line.
EXTERNAL INFLUENCES
Environment Variables
LC_CTYPE determines the interpretation of comments and string literals as single and/or multi-byte characters.
If LC_CTYPE is not specified in the environment or is set to the empty string, the value of LANG is used as a default for each unspecified or empty variable. If LANG is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of LANG. If any internationalization variable contains an invalid setting cb behaves as if all internationalization variables are set to "C". See environ(5).
International Code Set Support
Single- and multi-byte character code sets are supported.
SEE ALSO
The C Programming Language by B. W. Kernighan and D. M. Ritchie.
WARNINGS
Hidden punctuation in preprocessor statements causes indentation errors. An example of hidden punctuation is the curly brace used in a macro definition :
#define DO_FOREVER while(1) {
#define END_FOREVER }
Hewlett-Packard Company — HP-UX Release 8.05: June 1991