sbase/col.1

81 lines
1.5 KiB
Groff
Raw Normal View History

.Dd March 6, 2014
.Dt COL 1
.Os sbase
.Sh NAME
.Nm col
.Nd filter reverse line-feeds
.Sh SYPNOSIS
.Nm
.Op Fl bfpx
.Op Fl l Ar num
.Sh DESCRIPTION
The
.Nm
utility filters all the reverse (and half reverse) line feeds,
as they are produced by
.Xr nroff 1
with .2C of
.Xr ms 6
or by
.Xr tbl 1 .
.Nm
also replaces spaces by tabs when it is possible.
The control sequences managed by
.Nm
are:
.Bl -tag -width Ds
.It ESC-7
Reverse line-feed
.It ESC-8
Reverse half-line-feed
.It ESC-9
Forward half-line-feed
.It VT
Vertical-tab
.It SP
Space
.It TAB
Horizontal tab
.It RETURN
Carriage return
.It NL
New line
.El
.Pp
All the other control codes and escape sequences are removed.
.Nm
transforms all the spaces into tabulators.
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl p
Print unknown escape sequences to the output.
.It Fl b
Do not print backspaces in output,
and print only the last overstriked character in the output.
.It Fl f
Allow forward half line feeds in the output.
.It Fl x
Do not convert spaces in tabulators.
.It Fl l Ar num
Increment to
.Ar num
the number of lines buffered for
.Nm
.El
.Sh SEE ALSO
.Xr nroff 1 ,
.Xr tbl 1 ,
.Xr ms 6
.Sh BUGS
.Nm
only process text with a maximum of 256 lines with 800 bytes per line,
although the number of lines can be modified with the
.Fl l
option.
When the number of lines is bigger,
the buffer is flushed to the output,
so new reverse line feeds can not operate in the flushed lines.
This implementation ignores SI and SO selection character sets,
because it is supposed to work only with UTF-8 strings,
although the UTF-8 support is missed.