in source/shared/FormattedPrint.cpp [286:356]
static enum STATE ProcessSizeA( char sizeCh, char fmt_ch, char next_fmt_ch, int * advance, int * flags )
{
*advance = 0;
switch (sizeCh)
{
case 'l':
/*
* In order to handle the ll case, we depart from the
* simple deterministic state machine.
*/
if ( 'l' == fmt_ch )
{
*advance = 1;
*flags |= FL_LONGLONG;
}
else
{
*flags |= FL_LONG;
}
break;
case 'I':
/*
* In order to handle the I, I32, and I64 size modifiers, we
* depart from the simple deterministic state machine. The
* code below scans for characters following the 'I',
* and defaults to 64 bit on WIN64 and 32 bit on WIN32
*/
#if PTR_IS_INT64
*flags |= FL_I64; /* 'I' => __int64 on WIN64 systems */
#endif /* PTR_IS_INT64 */
if ( '6' == fmt_ch && '4' == next_fmt_ch )
{
*advance = 2;
*flags |= FL_I64; /* I64 => __int64 */
}
else if ( '3' == fmt_ch && '2' == next_fmt_ch )
{
*advance = 2;
*flags &= ~FL_I64; /* I32 => __int32 */
}
else if (
(fmt_ch == 'd') ||
(fmt_ch == 'i') ||
(fmt_ch == 'o') ||
(fmt_ch == 'u') ||
(fmt_ch == 'x') ||
(fmt_ch == 'X') )
{
/*
* Nothing further needed. %Id (et al) is
* handled just like %d, except that it defaults to 64 bits
* on WIN64. Fall through to the next iteration.
*/
}
else
{
return ST_NORMAL;
}
break;
case 'h':
*flags |= FL_SHORT;
break;
case 'w':
*flags |= FL_WIDECHAR;
}
return ST_SIZE;
}