svn commit: r300078 - head/lib/libstand
Warner Losh
imp at FreeBSD.org
Tue May 17 21:23:14 UTC 2016
Author: imp
Date: Tue May 17 21:23:13 2016
New Revision: 300078
URL: https://svnweb.freebsd.org/changeset/base/300078
Log:
Add support for %S to libstand as well so /boot/loader and friends can
use it.
Modified:
head/lib/libstand/printf.c
Modified: head/lib/libstand/printf.c
==============================================================================
--- head/lib/libstand/printf.c Tue May 17 20:53:56 2016 (r300077)
+++ head/lib/libstand/printf.c Tue May 17 21:23:13 2016 (r300078)
@@ -204,6 +204,7 @@ kvprintf(char const *fmt, kvprintf_fn_t
char nbuf[MAXNBUF];
char *d;
const char *p, *percent, *q;
+ uint16_t *S;
u_char *up;
int ch, n;
uintmax_t num;
@@ -398,6 +399,10 @@ reswitch: switch (ch = (u_char)*fmt++) {
while (width--)
PCHAR(padc);
break;
+ case 'S': /* Assume console can cope with wide chars */
+ for (S = va_arg(ap, uint16_t *); *S != 0; S++)
+ PCHAR(*S);
+ break;
case 't':
tflag = 1;
goto reswitch;
More information about the svn-src-all
mailing list