.SH DESCRIPTION
The
.B column
-utility formats its input into multiple columns. By default, rows
-are filled before columns. Input is taken from \fIfile\fR, or
+utility formats its input into multiple columns. By default, columns
+are filled before rows. Input is taken from \fIfile\fR, or
otherwise from standard input. Empty lines are ignored.
.PP
.SH OPTIONS
supplied using the \fB\-\-output\-separator\fP option.
Table output is useful for pretty-printing.
.IP "\fB\-x, \-\-fillrows\fP"
-Fill columns before filling rows.
+Fill rows before filling columns.
.IP "\fB\-V\fR, \fB\-\-version\fR"
Display version information and exit.
.IP "\fB\-h, \-\-help\fP"
#define MAXLINELEN (LINE_MAX + 1)
static int input(FILE *fp, int *maxlength, wchar_t ***list, int *entries);
-static void c_columnate(int maxlength, long termwidth, wchar_t **list, int entries);
-static void r_columnate(int maxlength, long termwidth, wchar_t **list, int entries);
+static void columnate_fillrows(int maxlength, long termwidth, wchar_t **list, int entries);
+static void columnate_fillcols(int maxlength, long termwidth, wchar_t **list, int entries);
static wchar_t *local_wcstok(wchar_t *p, const wchar_t *separator, int greedy, wchar_t **wcstok_state);
static void maketbl(wchar_t **list, int entries, wchar_t *separator, int greedy, wchar_t *colsep);
static void print(wchar_t **list, int entries);
else if (maxlength >= termwidth)
print(list, entries);
else if (xflag)
- c_columnate(maxlength, termwidth, list, entries);
+ columnate_fillrows(maxlength, termwidth, list, entries);
else
- r_columnate(maxlength, termwidth, list, entries);
+ columnate_fillcols(maxlength, termwidth, list, entries);
for (i = 0; i < entries; i++)
free(list[i]);
return EXIT_FAILURE;
}
-static void c_columnate(int maxlength, long termwidth, wchar_t **list, int entries)
+static void columnate_fillrows(int maxlength, long termwidth, wchar_t **list, int entries)
{
int chcnt, col, cnt, endcol, numcols;
wchar_t **lp;
putwchar('\n');
}
-static void r_columnate(int maxlength, long termwidth, wchar_t **list, int entries)
+static void columnate_fillcols(int maxlength, long termwidth, wchar_t **list, int entries)
{
int base, chcnt, cnt, col, endcol, numcols, numrows, row;