Annotation of src/usr.bin/col/col.1, Revision 1.1
1.1 ! deraadt 1: .\" $NetBSD: col.1,v 1.4 1995/03/26 05:25:52 glass Exp $
! 2: .\"
! 3: .\" Copyright (c) 1990, 1993
! 4: .\" The Regents of the University of California. All rights reserved.
! 5: .\"
! 6: .\" This code is derived from software contributed to Berkeley by
! 7: .\" Michael Rendell.
! 8: .\"
! 9: .\" Redistribution and use in source and binary forms, with or without
! 10: .\" modification, are permitted provided that the following conditions
! 11: .\" are met:
! 12: .\" 1. Redistributions of source code must retain the above copyright
! 13: .\" notice, this list of conditions and the following disclaimer.
! 14: .\" 2. Redistributions in binary form must reproduce the above copyright
! 15: .\" notice, this list of conditions and the following disclaimer in the
! 16: .\" documentation and/or other materials provided with the distribution.
! 17: .\" 3. All advertising materials mentioning features or use of this software
! 18: .\" must display the following acknowledgement:
! 19: .\" This product includes software developed by the University of
! 20: .\" California, Berkeley and its contributors.
! 21: .\" 4. Neither the name of the University nor the names of its contributors
! 22: .\" may be used to endorse or promote products derived from this software
! 23: .\" without specific prior written permission.
! 24: .\"
! 25: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
! 26: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
! 27: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
! 28: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
! 29: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
! 30: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
! 31: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
! 32: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
! 33: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
! 34: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! 35: .\" SUCH DAMAGE.
! 36: .\"
! 37: .\" @(#)col.1 8.1 (Berkeley) 6/29/93
! 38: .\"
! 39: .Dd June 29, 1993
! 40: .Dt COL 1
! 41: .Os
! 42: .Sh NAME
! 43: .Nm col
! 44: .Nd filter reverse line feeds from input
! 45: .Sh SYNOPSIS
! 46: .Nm col
! 47: .Op Fl bfx
! 48: .Op Fl l Ar num
! 49: .Sh DESCRIPTION
! 50: .Nm Col
! 51: filters out reverse (and half reverse) line feeds so that the output is
! 52: in the correct order with only forward and half forward line
! 53: feeds, and replaces white-space characters with tabs where possible.
! 54: This can be useful in processing the output of
! 55: .Xr nroff 1
! 56: and
! 57: .Xr tbl 1 .
! 58: .Pp
! 59: .Nm Col
! 60: reads from the standard input and writes to the standard output.
! 61: .Pp
! 62: The options are as follows:
! 63: .Bl -tag -width "-l num "
! 64: .It Fl b
! 65: Do not output any backspaces, printing only the last character
! 66: written to each column position.
! 67: .It Fl f
! 68: Forward half line feeds are permitted (``fine'' mode).
! 69: Normally characters printed on a half line boundary are printed
! 70: on the following line.
! 71: .It Fl x
! 72: Output multiple spaces instead of tabs.
! 73: .It Fl l Ar num
! 74: Buffer at least
! 75: .Ar num
! 76: lines in memory.
! 77: By default, 128 lines are buffered.
! 78: .El
! 79: .Pp
! 80: The control sequences for carriage motion that
! 81: .Nm col
! 82: understands and their decimal values are listed in the following
! 83: table:
! 84: .Pp
! 85: .Bl -tag -width "carriage return" -compact
! 86: .It ESC\-7
! 87: reverse line feed (escape then 7)
! 88: .It ESC\-8
! 89: half reverse line feed (escape then 8)
! 90: .It ESC\-9
! 91: half forward line feed (escape then 9)
! 92: .It backspace
! 93: moves back one column (8); ignored in the first column
! 94: .It carriage return
! 95: (13)
! 96: .It newline
! 97: forward line feed (10); also does carriage return
! 98: .It shift in
! 99: shift to normal character set (15)
! 100: .It shift out
! 101: shift to alternate character set (14)
! 102: .It space
! 103: moves forward one column (32)
! 104: .It tab
! 105: moves forward to next tab stop (9)
! 106: .It vertical tab
! 107: reverse line feed (11)
! 108: .El
! 109: .Pp
! 110: All unrecognized control characters and escape sequences are
! 111: discarded.
! 112: .Pp
! 113: .Nm Col
! 114: keeps track of the character set as characters are read and makes
! 115: sure the character set is correct when they are output.
! 116: .Pp
! 117: If the input attempts to back up to the last flushed line,
! 118: .Nm col
! 119: will display a warning message.
! 120: .Sh SEE ALSO
! 121: .Xr expand 1 ,
! 122: .Xr nroff 1 ,
! 123: .Xr tbl 1
! 124: .Sh HISTORY
! 125: A
! 126: .Nm col
! 127: command appeared in
! 128: .At v6 .