Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jun 2015 06:15:26 +0300
From:      Andrey Chernov <ache@freebsd.org>
To:        Marcel Moolenaar <marcel@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r284489 - head/bin/ls
Message-ID:  <5580E64E.9040601@freebsd.org>
In-Reply-To: <201506170312.t5H3C9Tm088469@svn.freebsd.org>
References:  <201506170312.t5H3C9Tm088469@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 17.06.2015 6:12, Marcel Moolenaar wrote:
> Author: marcel
> Date: Wed Jun 17 03:12:08 2015
> New Revision: 284489
> URL: https://svnweb.freebsd.org/changeset/base/284489
> 
> Log:
>   Unbreak ``env LANG=ru_RU.KOI8-R ls -l''.
>   Time strings are in the current locale.

Thanx, but the same treatment should be for file names too: they are in
the current locale. ls -l drops them otherwise.

> 
> Modified:
>   head/bin/ls/print.c
> 
> Modified: head/bin/ls/print.c
> ==============================================================================
> --- head/bin/ls/print.c	Wed Jun 17 03:11:25 2015	(r284488)
> +++ head/bin/ls/print.c	Wed Jun 17 03:12:08 2015	(r284489)
> @@ -425,7 +425,7 @@ printtime(const char *field, time_t ftim
>  		format = d_first ? "%e %b  %Y" : "%b %e  %Y";
>  	strftime(longstring, sizeof(longstring), format, localtime(&ftime));
>  
> -	snprintf(fmt, sizeof(fmt), "{:%s/%%s} ", field);
> +	snprintf(fmt, sizeof(fmt), "{:%s/%%hs} ", field);
>  	xo_attr("value", "%ld", (long) ftime);
>  	xo_emit(fmt, longstring);
>  }
> 


-- 
http://ache.vniz.net/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5580E64E.9040601>