summaryrefslogtreecommitdiffstats
path: root/text-utils
diff options
context:
space:
mode:
Diffstat (limited to 'text-utils')
-rw-r--r--text-utils/column.16
-rw-r--r--text-utils/column.c12
2 files changed, 9 insertions, 9 deletions
diff --git a/text-utils/column.1 b/text-utils/column.1
index 5c6f36add..e861e0d29 100644
--- a/text-utils/column.1
+++ b/text-utils/column.1
@@ -40,8 +40,8 @@ column \- columnate lists
.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
@@ -58,7 +58,7 @@ Columns are delimited with whitespace, by default, or with the characters
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"
diff --git a/text-utils/column.c b/text-utils/column.c
index 3d50f2e27..385245f01 100644
--- a/text-utils/column.c
+++ b/text-utils/column.c
@@ -71,8 +71,8 @@ static char *mtsafe_strtok(char *, const char *, char **);
#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);
@@ -225,9 +225,9 @@ int main(int argc, char **argv)
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]);
@@ -239,7 +239,7 @@ int main(int argc, char **argv)
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;
@@ -268,7 +268,7 @@ static void c_columnate(int maxlength, long termwidth, wchar_t **list, int entri
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;