Files
sbase/col.1
T

81 lines
1.5 KiB
Groff
Raw Normal View History

2015-03-07 13:56:13 +01:00
.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
2015-03-03 10:52:34 +01:00
The
2015-03-07 13:56:13 +01:00
.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
2015-03-03 10:52:34 +01:00
also replaces spaces by tabs when it is possible.
The control sequences managed by
2015-03-07 13:56:13 +01:00
.Nm
2015-03-03 10:52:34 +01:00
are:
2015-03-07 13:56:13 +01:00
.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
2015-03-03 10:52:34 +01:00
Space
2015-03-07 13:56:13 +01:00
.It TAB
Horizontal tab
.It RETURN
2015-03-03 10:52:34 +01:00
Carriage return
2015-03-07 13:56:13 +01:00
.It NL
2015-03-03 10:52:34 +01:00
New line
2015-03-07 13:56:13 +01:00
.El
.Pp
2015-03-03 10:52:34 +01:00
All the other control codes and escape sequences are removed.
2015-03-07 13:56:13 +01:00
.Nm
transforms all the spaces into tabulators.
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl p
2015-03-03 10:52:34 +01:00
Print unknown escape sequences to the output.
2015-03-07 13:56:13 +01:00
.It Fl b
2015-03-03 10:52:34 +01:00
Do not print backspaces in output,
2015-03-07 13:56:13 +01:00
and print only the last overstriked character in the output.
.It Fl f
2015-03-03 10:52:34 +01:00
Allow forward half line feeds in the output.
2015-03-07 13:56:13 +01:00
.It Fl x
2015-03-03 10:52:34 +01:00
Do not convert spaces in tabulators.
2015-03-07 13:56:13 +01:00
.It Fl l Ar num
2015-03-03 10:52:34 +01:00
Increment to
2015-03-07 13:56:13 +01:00
.Ar num
2015-03-03 10:52:34 +01:00
the number of lines buffered for
2015-03-07 13:56:13 +01:00
.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
2015-03-03 10:52:34 +01:00
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,
2015-03-07 13:56:13 +01:00
because it is supposed to work only with UTF-8 strings,
2015-03-03 10:52:34 +01:00
although the UTF-8 support is missed.