summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/vfwprintf.c
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2002-10-16 03:55:53 +0000
committertjr <tjr@FreeBSD.org>2002-10-16 03:55:53 +0000
commit232c5478a8b5f4f535a5274697819ad2665c8b41 (patch)
tree2224bf6a81e91300afd31eada022f8e4a2726171 /lib/libc/stdio/vfwprintf.c
parent5e3507cec06e50fad944b35877be42a117f70ebb (diff)
downloadFreeBSD-src-232c5478a8b5f4f535a5274697819ad2665c8b41.zip
FreeBSD-src-232c5478a8b5f4f535a5274697819ad2665c8b41.tar.gz
Add support for the XSI %C and %S formats, which are the same as %lc
and %ls.
Diffstat (limited to 'lib/libc/stdio/vfwprintf.c')
-rw-r--r--lib/libc/stdio/vfwprintf.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/libc/stdio/vfwprintf.c b/lib/libc/stdio/vfwprintf.c
index 26b89d1..e452744 100644
--- a/lib/libc/stdio/vfwprintf.c
+++ b/lib/libc/stdio/vfwprintf.c
@@ -723,6 +723,9 @@ reswitch: switch (ch) {
case 'z':
flags |= SIZET;
goto rflag;
+ case 'C':
+ flags |= LONGINT;
+ /*FALLTHROUGH*/
case 'c':
if (flags & LONGINT)
*(cp = buf) = (wchar_t)GETARG(wint_t);
@@ -884,6 +887,9 @@ fp_begin: if (prec == -1)
flags = flags | INTMAXT | HEXPREFIX;
ch = 'x';
goto nosign;
+ case 'S':
+ flags |= LONGINT;
+ /*FALLTHROUGH*/
case 's':
if (flags & LONGINT) {
if ((cp = GETARG(wchar_t *)) == NULL)
@@ -1256,6 +1262,9 @@ reswitch: switch (ch) {
case 'z':
flags |= SIZET;
goto rflag;
+ case 'C':
+ flags |= LONGINT;
+ /*FALLTHROUGH*/
case 'c':
if (flags & LONGINT)
ADDTYPE(T_WINT);
@@ -1312,6 +1321,9 @@ reswitch: switch (ch) {
case 'p':
ADDTYPE(TP_VOID);
break;
+ case 'S':
+ flags |= LONGINT;
+ /*FALLTHROUGH*/
case 's':
if (flags & LONGINT)
ADDTYPE(TP_WCHAR);
OpenPOWER on IntegriCloud