Codebase list rs / 8cbe59d
rs-20200313.tar.gz mirabilos authored 4 years ago mirabilos committed 4 years ago
2 changed file(s) with 15 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
0 .\" $MirOS: src/usr.bin/rs/rs.1,v 1.7 2020/03/11 21:30:10 tg Exp $
0 .\" $MirOS: src/usr.bin/rs/rs.1,v 1.8 2020/03/13 19:00:59 tg Exp $
11 .\" $OpenBSD: rs.1,v 1.19 2016/10/24 13:46:58 schwarze Exp $
22 .\" $FreeBSD: src/usr.bin/rs/rs.1,v 1.4 1999/08/28 01:05:21 peter Exp $
33 .\"-
8989 .\" with -mandoc, it might implement .Mx itself, but we want to
9090 .\" use our own definition. And .Dd must come *first*, always.
9191 .\"
92 .Dd $Mdocdate: March 11 2020 $
92 .Dd $Mdocdate: March 13 2020 $
9393 .\"
9494 .\" Check which macro package we use, and do other -mdoc setup.
9595 .\"
212212 of blank-separated entries in an array,
213213 transforms the array according to the options,
214214 and writes it on the standard output.
215 With no arguments it transforms stream input into a columnar
216 format convenient for terminal viewing.
215 With no arguments
216 .Bk -words
217 .Pq Li Va argc No Li \*(Lt 2
218 .Ek
219 it transforms stream input into a columnar format convenient for
220 terminal viewing, i.e. if the length (in bytes!) of the first line
221 is smaller than the display width,
222 .Fl et
223 is implied,
224 .Fl t
225 otherwise.
217226 .Pp
218227 The shape of the input array is deduced from the number of lines
219228 and the number of columns on the first line.
5050 #define EXTERN
5151 #include "rs.h"
5252
53 __RCSID("$MirOS: src/usr.bin/rs/rs.c,v 1.15 2020/03/11 22:32:05 tg Exp $");
53 __RCSID("$MirOS: src/usr.bin/rs/rs.c,v 1.16 2020/03/13 19:01:00 tg Exp $");
5454
5555 struct entry {
5656 int w; /* display width */
358358 int ch;
359359 const char *errstr;
360360
361 if (ac == 1)
361 if (ac < 2)
362362 flags |= NOARGS | TRANSPOSE;
363363 while ((ch = getopt(ac, av, "c::C::s::S::k:K:g:G:w:tTeEnyjhHmz")) != -1) {
364364 switch (ch) {