Limit number of DirectDrawClipper_SetClipList FIXMEs

James Hawkins truiken at gmail.com
Sat Aug 21 04:52:31 CDT 2004


Tobias wrote:
> > +    if (warned++ < 10 && lprgn != NULL)

Stefan wrote:
> for me this looks like
> 
>     if (0 < 10 && lprgn != NULL)

The variable 'warned' doesn't actually turn out to be zero all of the
time.  It is a static variable, so it is initialized once to zero when
the program starts, but the difference between  this and a regular
non-static variable is that this static variable holds whatever value
it contains.  If this code snippet runs then warned will increase by
one each time and this new value will not be set back to zero the next
time the block runs.

On Sat, 21 Aug 2004 11:08:09 +0200, Stefan Leichter
<stefan.leichter at camline.com> wrote:
> Am Freitag, 20. August 2004 18:37 schrieb Tobias Burnus:
> > +
> >   HRESULT WINAPI Main_DirectDrawClipper_SetClipList(
> > -    LPDIRECTDRAWCLIPPER iface,LPRGNDATA lprgn,DWORD pdwSize
> > +    LPDIRECTDRAWCLIPPER iface,LPRGNDATA lprgn,DWORD pdwFlag
> >   ) {
> >       ICOM_THIS(IDirectDrawClipperImpl,iface);
> > -    FIXME("(%p,%p,%ld),stub!\n",This,lprgn,pdwSize);
> > +    static int warned = 0;
> > +    if (warned++ < 10 && lprgn != NULL)
>  Hello,
> 
> for me this looks like
> 
>     if (0 < 10 && lprgn != NULL)
> 
> what is the same like
> 
>     if (lprgn != NULL)
> 
> I thing you meant something different
> 
> Bye Stefan
> 
> 


-- 
James Hawkins



More information about the wine-devel mailing list