From 94d7b0b5701687922e498de2e1a89d0d8cd262a2 Mon Sep 17 00:00:00 2001 From: Steven Schubiger Date: Fri, 14 Nov 2008 13:48:32 +0100 Subject: [PATCH] Improve printing formatted build information. --- src/ChangeLog | 5 +++++ src/main.c | 8 +------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 736a90e0..68348d1f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-11-14 Steven Schubiger + + * main.c (format_and_print_line): Use a custom format + string for printing leading spaces. + 2008-11-12 Micah Cowan * ftp-ls.c (ftp_index): HTML-escape dir name in title, h1, a:href. diff --git a/src/main.c b/src/main.c index b0fceae0..9bae2d23 100644 --- a/src/main.c +++ b/src/main.c @@ -733,13 +733,7 @@ format_and_print_line (const char *prefix, const char *line, token on the next line. */ if (remaining_chars <= strlen (token)) { - int j; - printf ("\n"); - j = 0; - for (j = 0; j < leading_spaces; j++) - { - printf (" "); - } + printf ("\n%*c", leading_spaces, ' '); remaining_chars = line_length - leading_spaces; } printf ("%s ", token); -- 2.39.2