Commit 5b432751 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Handle the printf %F format modifier.

parent 50f59f8c
...@@ -71,6 +71,11 @@ static void test_sprintf( void ) ...@@ -71,6 +71,11 @@ static void test_sprintf( void )
ok(!strcmp(buffer," 0X00000039"),"Pointer formatted incorrectly\n"); ok(!strcmp(buffer," 0X00000039"),"Pointer formatted incorrectly\n");
ok( r==12, "return count wrong\n"); ok( r==12, "return count wrong\n");
format = "%Fp";
r = sprintf(buffer,format,(void *)57);
ok(!strcmp(buffer,"00000039"),"Pointer formatted incorrectly \"%s\"\n",buffer);
ok( r==8, "return count wrong\n");
format = "%04s"; format = "%04s";
r = sprintf(buffer,format,"foo"); r = sprintf(buffer,format,"foo");
ok(!strcmp(buffer,"0foo"),"String not zero-prefixed \"%s\"\n",buffer); ok(!strcmp(buffer,"0foo"),"String not zero-prefixed \"%s\"\n",buffer);
...@@ -240,6 +245,16 @@ static void test_sprintf( void ) ...@@ -240,6 +245,16 @@ static void test_sprintf( void )
ok(!strcmp(buffer,"j"), "failed\n"); ok(!strcmp(buffer,"j"), "failed\n");
ok( r==1, "return count wrong\n"); ok( r==1, "return count wrong\n");
format = "%F";
r = sprintf(buffer, format,-1);
ok(!strcmp(buffer,""), "failed\n");
ok( r==0, "return count wrong\n");
format = "%H";
r = sprintf(buffer, format,-1);
ok(!strcmp(buffer,"H"), "failed\n");
ok( r==1, "return count wrong\n");
format = "x%cx"; format = "x%cx";
r = sprintf(buffer, format, 0x100+'X'); r = sprintf(buffer, format, 0x100+'X');
ok(!strcmp(buffer,"xXx"), "failed\n"); ok(!strcmp(buffer,"xXx"), "failed\n");
......
...@@ -491,6 +491,8 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, va_list valist ) ...@@ -491,6 +491,8 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, va_list valist )
} }
else if( *p == 'w' ) else if( *p == 'w' )
flags.WideString = *p++; flags.WideString = *p++;
else if( *p == 'F' )
p++; /* ignore */
else else
break; break;
} }
......
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