svn commit: r284489 - head/bin/ls

Marcel Moolenaar marcel at FreeBSD.org
Wed Jun 17 03:12:09 UTC 2015


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.

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);
 }


More information about the svn-src-head mailing list