[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: misalignment in ls -l in fr_FR locale
From: |
Pádraig Brady |
Subject: |
Re: misalignment in ls -l in fr_FR locale |
Date: |
Tue, 24 Mar 2009 15:26:19 +0000 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071008) |
Pádraig Brady wrote:
> Updated patch attached.
>
> Note caching the abbreviated months like this speeds `ls -l`
> up by around 10% which is nice, though not that important
> as ls output is mainly for processing by humans.
eep, previous patch had a few buglets...
diff --git a/src/ls.c b/src/ls.c
index 74ee2ca..91426da 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -3378,10 +3378,10 @@ align_nstrftime (char *src, size_t size, char const
*fmt, struct tm const *tm,
{
const char *nfmt = fmt;
char *rpl_fmt = NULL;
- if (required_mon_width)
+ char *pb = NULL;
+ if (required_mon_width && (pb = strstr (fmt, "%b")))
{
- rpl_fmt = xmalloc (strlen (fmt) + MAX_MON_WIDTH - 2 + 1);
- char *pb = strstr (fmt, "%b");
+ rpl_fmt = xmalloc (strlen (fmt) -2 + sizeof (abmon[0]));
char *pfmt = rpl_fmt;
nfmt = rpl_fmt;
- misalignment in ls -l in fr_FR locale, Samuel Thibault, 2009/03/17
- Re: misalignment in ls -l in fr_FR locale, Eric Blake, 2009/03/18
- Re: misalignment in ls -l in fr_FR locale, Pádraig Brady, 2009/03/20
- Re: misalignment in ls -l in fr_FR locale, Samuel Thibault, 2009/03/20
- Re: misalignment in ls -l in fr_FR locale, Pádraig Brady, 2009/03/20
- Re: misalignment in ls -l in fr_FR locale, Pádraig Brady, 2009/03/23
- Re: misalignment in ls -l in fr_FR locale, Pádraig Brady, 2009/03/24
- Re: misalignment in ls -l in fr_FR locale,
Pádraig Brady <=
- Re: misalignment in ls -l in fr_FR locale, Pádraig Brady, 2009/03/25
- Re: misalignment in ls -l in fr_FR locale, Jim Meyering, 2009/03/26
- Re: misalignment in ls -l in fr_FR locale, Jim Meyering, 2009/03/26
- Re: misalignment in ls -l in fr_FR locale, Pádraig Brady, 2009/03/26
- Re: misalignment in ls -l in fr_FR locale, Jim Meyering, 2009/03/26
- Re: misalignment in ls -l in fr_FR locale, Jim Meyering, 2009/03/26
- Re: misalignment in ls -l in fr_FR locale, Pádraig Brady, 2009/03/27
- Re: misalignment in ls -l in fr_FR locale, Stéphane Raimbault, 2009/03/27
- Re: misalignment in ls -l in fr_FR locale, Jim Meyering, 2009/03/28