]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
column: rename functions
authorKarel Zak <kzak@redhat.com>
Thu, 2 Mar 2017 13:38:04 +0000 (14:38 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 2 May 2017 10:18:00 +0000 (12:18 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
text-utils/column.c

index d912369592dc308dd02f6cf53da01f09a3dbdbe6..10afd6f7fb3eabea1b9f7a2bd72160f322913ea9 100644 (file)
@@ -85,12 +85,13 @@ struct column_control {
        size_t  maxlength;      /* longest input record (line) */
 };
 
-static int input(struct column_control *ctl, FILE *fp);
+static int read_input(struct column_control *ctl, FILE *fp);
 static void columnate_fillrows(struct column_control *ctl);
 static void columnate_fillcols(struct column_control *ctl);
+static void simple_print(struct column_control *ctl);
+
 static wchar_t *local_wcstok(wchar_t *p, const wchar_t *separator, int greedy, wchar_t **wcstok_state);
 static void maketbl(struct column_control *ctl, wchar_t *separator, int greedy, wchar_t *colsep);
-static void print(struct column_control *ctl);
 
 #ifdef HAVE_WIDECHAR
 /* Don't use wcswidth(), we need to ignore non-printable chars. */
@@ -212,13 +213,13 @@ int main(int argc, char **argv)
        argv += optind;
 
        if (!*argv)
-               eval += input(&ctl, stdin);
+               eval += read_input(&ctl, stdin);
        else
                for (; *argv; ++argv) {
                        FILE *fp;
 
                        if ((fp = fopen(*argv, "r")) != NULL) {
-                               eval += input(&ctl, fp);
+                               eval += read_input(&ctl, fp);
                                fclose(fp);
                        } else {
                                warn("%s", *argv);
@@ -243,7 +244,7 @@ int main(int argc, char **argv)
                columnate_fillrows(&ctl);
                break;
        case COLUMN_MODE_SIMPLE:
-               print(&ctl);
+               simple_print(&ctl);
                break;
        }
 
@@ -308,7 +309,7 @@ static void columnate_fillcols(struct column_control *ctl)
        }
 }
 
-static void print(struct column_control *ctl)
+static void simple_print(struct column_control *ctl)
 {
        int cnt;
        wchar_t **lp;
@@ -407,7 +408,7 @@ static void maketbl(struct column_control *ctl, wchar_t *separator, int greedy,
        free(tbl);
 }
 
-static int input(struct column_control *ctl, FILE *fp)
+static int read_input(struct column_control *ctl, FILE *fp)
 {
        char *buf = NULL;
        size_t bufsz = 0;