summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/vfprintf.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/vfprintf.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/vfprintf.c')
-rw-r--r--lib/libc/stdio/vfprintf.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c
index ae5629b..c1b4e0b 100644
--- a/lib/libc/stdio/vfprintf.c
+++ b/lib/libc/stdio/vfprintf.c
@@ -748,6 +748,9 @@ reswitch: switch (ch) {
case 'z':
flags |= SIZET;
goto rflag;
+ case 'C':
+ flags |= LONGINT;
+ /*FALLTHROUGH*/
case 'c':
if (flags & LONGINT) {
mbstate_t mbs;
@@ -918,6 +921,9 @@ fp_begin: if (prec == -1)
flags = flags | INTMAXT | HEXPREFIX;
ch = 'x';
goto nosign;
+ case 'S':
+ flags |= LONGINT;
+ /*FALLTHROUGH*/
case 's':
if (flags & LONGINT) {
wchar_t *wcp;
@@ -1290,6 +1296,9 @@ reswitch: switch (ch) {
case 'z':
flags |= SIZET;
goto rflag;
+ case 'C':
+ flags |= LONGINT;
+ /*FALLTHROUGH*/
case 'c':
if (flags & LONGINT)
ADDTYPE(T_WINT);
@@ -1346,6 +1355,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