]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Revert "wall: wrap message header when it exceeds 79 characters"
authorKarel Zak <kzak@redhat.com>
Tue, 29 Jul 2014 09:57:01 +0000 (11:57 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 29 Jul 2014 09:57:01 +0000 (11:57 +0200)
This reverts commit 93d7baf250495b2385c369afd48137a7363ae4c2.

Ooops... it wasn't my plan to merge this patch. Sorry.

term-utils/wall.c

index acada294a39b459d76fd079fc7c7671294e55c06..598e9f28c59f2ba79ffd0954f80bd28f2f6f9f38 100644 (file)
@@ -202,8 +202,6 @@ static char *makemsg(char *fname, char **mvec, int mvecsz,
                char *whom, *where, *date;
                struct passwd *pw;
                time_t now;
-               ssize_t len;
-               int i;
 
                if (!(whom = getlogin()) || !*whom)
                        whom = (pw = getpwuid(getuid())) ? pw->pw_name : "???";
@@ -234,10 +232,7 @@ static char *makemsg(char *fname, char **mvec, int mvecsz,
                fprintf(fp, "\r%*s\r\n", TERM_WIDTH, " ");
                sprintf(lbuf, _("Broadcast message from %s@%s (%s) (%s):"),
                              whom, hostname, where, date);
-               len = strlen(lbuf);
-               for (i = 0; 0 < len; i++)
-                       len -= fprintf(fp, "%-*.*s\007\007\r\n", TERM_WIDTH, TERM_WIDTH,
-                                      lbuf + (i * TERM_WIDTH)) + 4;
+               fprintf(fp, "%-*.*s\007\007\r\n", TERM_WIDTH, TERM_WIDTH, lbuf);
                free(hostname);
                free(date);
        }