Limit number of DirectDrawClipper_SetClipList FIXMEs

James Hawkins truiken at gmail.com
Sat Aug 21 04:57:32 CDT 2004


> the program starts, but the difference between  this and a regular
> non-static variable is that this static variable holds whatever value
> it contains

That wasnt very clear so I'll try to explain better.  The bottom line
is that the value of the static variable is retained between repeated
function calls to the same function.

See http://www-ee.eng.hawaii.edu/Courses/EE150/Book/chap14/subsection2.1.1.6.html
for more information.

On Sat, 21 Aug 2004 02:52:31 -0700, James Hawkins <truiken at gmail.com> wrote:
> 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
> 


-- 
James Hawkins



More information about the wine-devel mailing list