[msvcrt] Implement %I types for printf

Alexandre Julliard julliard at winehq.org
Mon Jun 6 03:44:22 CDT 2005


Jesse Allen <the3dfxdude at gmail.com> writes:

> @@ -191,11 +191,14 @@
>      } buf;
>  } pf_output;
>  
> +#define INTEGERSIZE_LONG 1
> +#define INTEGERSIZE_LONGLONG 2
> +
>  typedef struct pf_flags_t
>  {
>      char Sign, LeftAlign, Alternate, PadZero;
>      char FieldLength, Precision;
> -    char IntegerLength, IntegerDouble;
> +    char IntegerLength, IntegerDouble, IntegerSize;

The IntegerDouble field was supposed to be used for that already, no
need to add another one.

> @@ -384,6 +387,16 @@
>          sprintf(p, ".%d", flags->Precision);
>          p += strlen(p);
>      }
> +    if( flags->IntegerLength == 'I' )
> +    {
> +        sprintf(p, "l");
> +        p++;
> +    }
> +    if( flags->IntegerSize == INTEGERSIZE_LONGLONG )
> +    {
> +        sprintf(p, "l");
> +        p++;
> +    }

This assumes that the system printf supports %ll formats, that's not
portable.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list