[msvcrt] Implement %I types for printf

Jesse Allen the3dfxdude at gmail.com
Mon Jun 6 08:08:37 CDT 2005


On 06 Jun 2005 10:44:22 +0200, Alexandre Julliard <julliard at winehq.org> wrote:
> 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.

OK I changed it back to that.

> 
> > @@ -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.
> 

Well it's rebuilding the format string, I thought for libc.  Is there
another %ll-like specifier?  %I64 certainly is not. =)

Jesse
-------------- next part --------------
A non-text attachment was scrubbed...
Name: printf.diff
Type: application/octet-stream
Size: 1832 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20050606/b2b32384/printf.obj


More information about the wine-devel mailing list