GNU bug report logs - #6769
df (GNU coreutils) 7.4 Dutch output misalignment

Previous Next

Package: coreutils;

Reported by: Erik Quaeghebeur <gnu <at> equaeghe.nospammail.net>

Date: Sun, 1 Aug 2010 00:49:01 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 6769 <at> debbugs.gnu.org
Subject: bug#6769: df (GNU coreutils) 7.4 Dutch output misalignment
Date: Wed, 23 Mar 2011 11:48:47 +0100
Pádraig Brady wrote:
> On 22/03/11 14:06, Pádraig Brady wrote:
>> On 01/08/10 01:30, Erik Quaeghebeur wrote:
>>> Dear df-maintainer,
>>>
>>> I observed a misalignment of the output of df (GNU coreutils) 7.4 in a
>>> Dutch locale: from the second column onward, the column header in the
>>> first row is too far to the right (by six spaces, in the cases I
>>> investigated).
>>
>> Here's a proposed fix for all these alignment issues.
>> A good command to compare before and after is:
>>
>>   df --all -T -P -B\'1

I like it.

> Here's the lastest version with a few inconsequential tweaks,
> and a NEWS entry
>
> http://www.pixelbeat.org/patches/df-align.diff

Thanks.
I've tried to compile with that, and saw some new warnings (using F14's gcc
4.5.1 20100924).  Fixing them, I also removed some stray spaces in "table [...":

diff --git a/src/df.c b/src/df.c
index 7c67620..df31611 100644
--- a/src/df.c
+++ b/src/df.c
@@ -254,11 +254,11 @@ get_header (void)
     {
       if (field == TYPE_FIELD && !print_type)
         {
-          table [nrows-1][field] = NULL;
+          table[nrows-1][field] = NULL;
           continue;
         }

-      char *header = _(headers[field][header_mode]);
+      char const *header = _(headers[field][header_mode]);
       if (!header)
         header = _(headers[field][DEFAULT_MODE]);

@@ -318,7 +318,7 @@ get_header (void)
       if (!header)
         xalloc_die ();

-      table [nrows-1][field] = header;
+      table[nrows-1][field] = (char *) header;

       widths[field] = MAX (widths[field], mbswidth (header, 0));
     }

Having a test that exhibits the change in behavior would
be nice, but is probably not worth the trouble.




This bug report was last modified 14 years and 146 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.