Commit 6c70942a authored by Jesse Allen's avatar Jesse Allen Committed by Alexandre Julliard

msvcrt: Parse I, I32, and I64 integer size flags in printf.

parent 81c446ef
......@@ -56,6 +56,21 @@ static void test_sprintf( void )
ok(!strcmp(buffer, "I"), "Problem with \"I\" interpretation\n");
ok( r==1, "return count wrong\n");
format = "%I0d";
r = sprintf(buffer,format,1);
ok(!strcmp(buffer,"I0d"),"I0d failed\n");
ok( r==3, "return count wrong\n");
format = "%I32d";
r = sprintf(buffer,format,1);
ok(!strcmp(buffer,"1"),"I32d failed\n");
ok( r==1, "return count wrong\n");
format = "%I64D";
r = sprintf(buffer,format,(LONGLONG)-1);
ok(!strcmp(buffer,"D"),"I64D failed: %s\n",buffer);
ok( r==1, "return count wrong\n");
format = "% d";
r = sprintf(buffer,format,1);
ok(!strcmp(buffer, " 1"),"Problem with sign place-holder: '%s'\n",buffer);
......
......@@ -495,6 +495,20 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, va_list valist )
flags.IntegerLength = *p;
p++;
}
else if( *p == 'I' )
{
if( *(p+1) == '6' && *(p+2) == '4' )
{
flags.IntegerDouble++;
p += 3;
}
else if( *(p+1) == '3' && *(p+2) == '2' )
p += 3;
else if( isdigit(*(p+1)) || *(p+1) == 0 )
break;
else
p++;
}
else if( *p == 'w' )
flags.WideString = *p++;
else if( *p == 'F' )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment