summaryrefslogtreecommitdiff
path: root/src/df.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-02-19 16:05:07 +0000
committerJim Meyering <jim@meyering.net>2003-02-19 16:05:07 +0000
commite2cd6ba3df331e3a3cd4faa573b4610f829f6c93 (patch)
tree30da9cfd76f51801ae5855e61f9fe2aed9b76c15 /src/df.c
parentefb6756c2e5d604fc05c23e8150d032dff5445a6 (diff)
downloadcoreutils-e2cd6ba3df331e3a3cd4faa573b4610f829f6c93.tar.xz
(print_header): Rather than using a hard-coded literal
string of spaces matching the length of the English `...Type' header, output the right number of spaces to match the selected translation. Reported by Yann Dirson and Jean Charles Delepine as Debian bug 131113.
Diffstat (limited to 'src/df.c')
-rw-r--r--src/df.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/df.c b/src/df.c
index 42b8f88c1..91db548ec 100644
--- a/src/df.c
+++ b/src/df.c
@@ -148,13 +148,16 @@ static void
print_header (void)
{
char buf[MAX (LONGEST_HUMAN_READABLE + 1, INT_BUFSIZE_BOUND (uintmax_t))];
+ char const *type_header = _(" Type");
printf (_("Filesystem "));
+ /* Print the `Type' header if required (--print-type, -T),
+ or an equivalent number of spaces. */
if (print_type)
- printf (_(" Type"));
+ fputs (type_header, stdout);
else
- printf (" ");
+ printf ("%-*s", strlen (type_header), "");
if (inode_format)
printf (_(" Inodes IUsed IFree IUse%%"));