X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5b4f8dd5c0fe1bf44fb7971c669b036d4ad6eebe..848bc5ba1888bfa9fcbf5719b68a155ece28d7f6:/src/common/gifdecod.cpp?ds=inline diff --git a/src/common/gifdecod.cpp b/src/common/gifdecod.cpp index 35c13c01f7..1ca8c471ce 100644 --- a/src/common/gifdecod.cpp +++ b/src/common/gifdecod.cpp @@ -3,7 +3,7 @@ // Purpose: wxGIFDecoder, GIF reader for wxImage and wxAnimation // Author: Guillermo Rodriguez Garcia // Version: 3.03 -// RCS-ID: +// RCS-ID: // Copyright: (c) Guillermo Rodriguez Garcia // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -20,16 +20,15 @@ #endif #ifndef WX_PRECOMP -# include "wx/setup.h" +# include "wx/defs.h" #endif -#if wxUSE_STREAMS +#if wxUSE_STREAMS && wxUSE_GIF #include #include -#include "wx/defs.h" #include "wx/gifdecod.h" - + //--------------------------------------------------------------------------- // wxGIFDecoder constructor and destructor @@ -132,7 +131,7 @@ bool wxGIFDecoder::ConvertToImage(wxImage *image) const return TRUE; } - + //--------------------------------------------------------------------------- // Data accessors //--------------------------------------------------------------------------- @@ -203,7 +202,7 @@ bool wxGIFDecoder::GoNextFrame(bool cyclic) } else return FALSE; -} +} bool wxGIFDecoder::GoPrevFrame(bool cyclic) { @@ -294,7 +293,7 @@ int wxGIFDecoder::getcode(int bits, int ab_fin) /* adjust total number of bits extracted from the buffer */ m_restbits = m_restbits + 8; } - + /* find number of bits remaining for next code */ m_restbits = (m_restbits - bits); @@ -510,7 +509,13 @@ int wxGIFDecoder::ReadGIF() pprev = NULL; pimg = NULL; +#if defined(__VISAGECPP__) +// VA just can't stand while(1) + bool bOs2var = TRUE; + while(bOs2var) +#else while (1) +#endif { type = (unsigned char)m_f->GetC(); @@ -538,7 +543,7 @@ int wxGIFDecoder::ReadGIF() } else /* other extension, skip */ - { + { while ((i = (unsigned char)m_f->GetC()) != 0) { /* This line should not be neccessary! @@ -626,4 +631,4 @@ int wxGIFDecoder::ReadGIF() return E_OK; } -#endif // wxUSE_STREAM +#endif // wxUSE_STREAMS && wxUSE_GIF