svn commit: r284489 - head/bin/ls

Andrey Chernov ache at freebsd.org
Wed Jun 17 03:20:46 UTC 2015


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/


More information about the svn-src-head mailing list