Add support for the XSI %C and %S formats, which are the same as %lc

and %ls.
This commit is contained in:
Tim J. Robbins 2002-10-16 03:55:53 +00:00
parent ccbe423c8f
commit 927ecbf313
2 changed files with 24 additions and 0 deletions

View File

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

View File

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