Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cb(1) — A/UX 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cc(1)

indent(1)




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 new- lines. 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. EXAMPLES 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 April, 1990 1



cb(1) cb(1)
SEE ALSO cc(1), indent(1). The C Programming Language by B. W. Kernighan and D. M. Ritchie (Prentice-Hall, Inc., New Jersey, 1978). BUGS Punctuation that is hidden in preprocessor statements will cause indentation errors. 2 April, 1990

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026