svn commit: r194636 - stable/7/usr.bin/w
Hajimu UMEMOTO
ume at FreeBSD.org
Mon Jun 22 16:11:35 UTC 2009
Author: ume
Date: Mon Jun 22 16:11:34 2009
New Revision: 194636
URL: http://svn.freebsd.org/changeset/base/194636
Log:
MFC 181922: %b and %p may contain multibyte characters.
Noticed by: nyan
Modified:
stable/7/usr.bin/w/ (props changed)
stable/7/usr.bin/w/pr_time.c
Modified: stable/7/usr.bin/w/pr_time.c
==============================================================================
--- stable/7/usr.bin/w/pr_time.c Mon Jun 22 16:06:38 2009 (r194635)
+++ stable/7/usr.bin/w/pr_time.c Mon Jun 22 16:11:34 2009 (r194636)
@@ -44,6 +44,7 @@ static const char sccsid[] = "@(#)pr_tim
#include <stdio.h>
#include <string.h>
+#include <wchar.h>
#include "extern.h"
@@ -82,7 +83,7 @@ pr_attime(time_t *started, time_t *now)
}
(void)strftime(buf, sizeof(buf), fmt, &tp);
- (void)printf("%-7.7s", buf);
+ (void)wprintf(L"%-7.7s", buf);
}
/*
More information about the svn-src-stable-7
mailing list