Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cb(1) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

discussion of cb



CB(1,C)                     AIX Commands Reference                      CB(1,C)



-------------------------------------------------------------------------------
cb



PURPOSE

Puts C language source code into a form that is easily read.

SYNTAX


      +------+   +-------------+   +------+   +------------+
cb ---|      |---|             |---|      |---|            |---|
      +- -s -+   +- -l length -+   +- -j -+   +--- file ---+
                                                ^        |
                                                +--------+


Note:  This command does not have MBCS support.

DESCRIPTION

The cb command reads C language programs from standard input or from specified
files and writes them to standard output in a form that shows, through
indentations and spacing, the structure of the code.  When called without
flags, the cb command does not split or join lines.  Punctuation in
preprocessor statements can cause indentation errors.

FLAGS

-j     Joins lines that are split.

-l length
       Splits lines that are longer than length characters.

-s     Formats the source code according to the style of Kernighan and Ritchie
       in The C Programming Language.  (Englewood Cliffs, New Jersey:
       Prentice-Hall, Inc., 1978.).

EXAMPLE

To create a version of "pgm.c" called "pgm.pretty.c" that is easy to read:

  cb  pgm.c  > pgm.pretty.c

RELATED INFORMATION

See "cc."

See the discussion of cb command in AIX Operating System Programming Tools and
Interfaces.



Processed November 8, 1990          CB(1,C)                                   1



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