/////////////////////////////////////////////////////////////////////////////
-// Name: imagtiff.cpp
+// Name: src/common/imagtiff.cpp
// Purpose: wxImage TIFF handler
// Author: Robert Roebling
// RCS-ID: $Id$
#include "wx/module.h"
#ifndef TIFFLINKAGEMODE
- #define TIFFLINKAGEMODE LINKAGEMODE
+ #if defined(__WATCOMC__) && defined(__WXMGL__)
+ #define TIFFLINKAGEMODE cdecl
+ #else
+ #define TIFFLINKAGEMODE LINKAGEMODE
+ #endif
#endif
//-----------------------------------------------------------------------------
return (toff_t)-1;
toff_t tofs = wx_truncate_cast(toff_t, ofs);
- wxCHECK_MSG( tofs == ofs, (toff_t)-1,
+ wxCHECK_MSG( (wxFileOffset)tofs == ofs, (toff_t)-1,
_T("TIFF library doesn't support large files") );
return tofs;
{
wxInputStream *stream = (wxInputStream*) handle;
stream->Read( (void*) buf, (size_t) size );
- return stream->LastRead();
+ return wx_truncate_cast(tsize_t, stream->LastRead());
}
tsize_t TIFFLINKAGEMODE
{
wxOutputStream *stream = (wxOutputStream*) handle;
stream->Write( (void*) buf, (size_t) size );
- return stream->LastWrite();
+ return wx_truncate_cast(tsize_t, stream->LastWrite());
}
toff_t TIFFLINKAGEMODE
if ( ptr[column*24 + bp*3] > 0 )
{
// check only red as this is sufficient
- reverse = reverse | 128 >> bp;
+ reverse = (uint8)(reverse | 128 >> bp);
}
}
#endif // wxUSE_STREAMS
#endif // wxUSE_LIBTIFF
-