MSVCRT printf functions

Juan Lang juan_lang at
Thu Jan 6 15:23:47 CST 2005

Hi Aneurin, some style comments on your patch:

+<<<<<<< file.c

This shouldn't be in your patch.

+typedef struct
+    int flags;
+    unsigned int width;
+    __int64 precision;
+    const MSVCRT_wchar_t *input;
+    MSVCRT_wchar_t *output;
+    int HeapAlloced;
+    union
+    {
+        int intIn;
+        double doubleIn;
+    };

The HeapAlloced flag shouldn't be upper-cased.  A BOOL may make more sense

+PRINTF_SPECIFIER integertostringw(va_list *args, MSVCRT_wchar_t digits[],

This calling convention is a little strange.  It's more typical in C not
to return "large" things on the stack, but to use pointers instead.  Since
you use the specifier in the following way:

+                specifier = charprocessw(va_arg(*args, int),specifier);

you may want to make the specifier an in/out parameter passed by pointer
instead, e.g.

void integertostringw(va_list *args, MSVCRT_wchar_t digits[],

The calls would then look like:

+                charprocessw(va_arg(*args, int),&specifier);

Finally, your internal functions should be made static.


Do you Yahoo!? 
All your favorites on one personal page – Try My Yahoo! 

More information about the wine-devel mailing list