MSVCRT: handle the printf %F format modifier

Mike McCormack mike at codeweavers.com
Thu Mar 3 20:11:40 CST 2005


ChangeLog:
* handle the printf %F format modifier
-------------- next part --------------
? dlls/msvcrt/tests/x
Index: dlls/msvcrt/wcs.c
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/wcs.c,v
retrieving revision 1.20
diff -u -p -r1.20 wcs.c
--- dlls/msvcrt/wcs.c	25 Feb 2005 19:16:46 -0000	1.20
+++ dlls/msvcrt/wcs.c	4 Mar 2005 02:10:18 -0000
@@ -491,6 +491,8 @@ static int pf_vsnprintf( pf_output *out,
             }
             else if( *p == 'w' )
                 flags.WideString = *p++;
+            else if( *p == 'F' )
+                p++; /* ignore */
             else
                 break;
         }
Index: dlls/msvcrt/tests/printf.c
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/tests/printf.c,v
retrieving revision 1.4
diff -u -p -r1.4 printf.c
--- dlls/msvcrt/tests/printf.c	25 Feb 2005 19:16:46 -0000	1.4
+++ dlls/msvcrt/tests/printf.c	4 Mar 2005 02:10:18 -0000
@@ -71,6 +71,11 @@ static void test_sprintf( void )
     ok(!strcmp(buffer,"  0X00000039"),"Pointer formatted incorrectly\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";
     r = sprintf(buffer,format,"foo");
     ok(!strcmp(buffer,"0foo"),"String not zero-prefixed \"%s\"\n",buffer);
@@ -238,6 +243,16 @@ static void test_sprintf( void )
     format = "%j";
     r = sprintf(buffer, format,-1);
     ok(!strcmp(buffer,"j"), "failed\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";


More information about the wine-patches mailing list