Source cleaning: whitespaces, tabs, -1/wxDefaultCoord/wxNOT_FOUND, TRUE/true, FALSE/false, !!/!IsEmpty().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-09-16 18:13:32 +00:00
parent 7b44c67058
commit 7beb59f36c
29 changed files with 888 additions and 888 deletions

View File

@@ -72,7 +72,7 @@ public:
unsigned int w; /* width */
unsigned int h; /* height */
int transparent; /* transparent color (-1 = none) */
int colors; /* number of colors */
int colors; /* number of colors */
unsigned char *p; /* bitmap */
unsigned char *pal; /* palette */
@@ -83,8 +83,8 @@ public:
class WXDLLEXPORT wxIFFDecoder
{
private:
IFFImage *m_image; // image data
wxInputStream *m_f; // input stream
IFFImage *m_image; // image data
wxInputStream *m_f; // input stream
unsigned char *databuf;
unsigned char *picptr;
unsigned char *decomp_mem;
@@ -146,7 +146,7 @@ bool wxIFFDecoder::ConvertToImage(wxImage *image) const
image->Create(GetWidth(), GetHeight());
if (!image->Ok())
return FALSE;
return false;
unsigned char *pal = GetPalette();
unsigned char *src = GetData();
@@ -175,7 +175,7 @@ bool wxIFFDecoder::ConvertToImage(wxImage *image) const
image->SetMaskColour(255, 0, 255);
}
else
image->SetMask(FALSE);
image->SetMask(false);
#if wxUSE_PALETTE
if (pal && colors > 0)
@@ -207,7 +207,7 @@ bool wxIFFDecoder::ConvertToImage(wxImage *image) const
dst[2] = src[2];
}
return TRUE;
return true;
}
@@ -230,14 +230,14 @@ int wxIFFDecoder::GetTransparentColour() const { return m_image->transparent; }
//
// CanRead:
// Returns TRUE if the file looks like a valid IFF, FALSE otherwise.
// Returns true if the file looks like a valid IFF, false otherwise.
//
bool wxIFFDecoder::CanRead()
{
unsigned char buf[12];
if ( !m_f->Read(buf, WXSIZEOF(buf)) )
return FALSE;
return false;
m_f->SeekI(-(off_t)WXSIZEOF(buf), wxFromCurrent);
@@ -384,7 +384,7 @@ int wxIFFDecoder::ReadIFF()
// main decoding loop. searches IFF chunks and handles them.
// terminates when BODY chunk was found or dataptr ran over end of file
//
bool BMHDok = FALSE, CMAPok = FALSE, CAMGok = FALSE;
bool BMHDok = false, CMAPok = false, CAMGok = false;
int bmhd_width = 0, bmhd_height = 0, bmhd_bitplanes = 0, bmhd_transcol = -1;
byte bmhd_masking = 0, bmhd_compression = 0;
long camg_viewmode = 0;
@@ -400,7 +400,7 @@ int wxIFFDecoder::ReadIFF()
#else
if (chunkLen < 0) { // format error?
#endif
break;
break;
}
bool truncated = (dataptr + 8 + chunkLen > dataend);
@@ -414,7 +414,7 @@ int wxIFFDecoder::ReadIFF()
bmhd_masking = *(dataptr + 8 + 9);
bmhd_compression = *(dataptr + 8 + 10); // get compression
bmhd_transcol = iff_getword(dataptr + 8 + 12);
BMHDok = TRUE; // got BMHD
BMHDok = true; // got BMHD
dataptr += 8 + chunkLen; // to next chunk
}
else if (strncmp((char *)dataptr, "CMAP", 4) == 0) { // CMAP ?
@@ -445,14 +445,14 @@ int wxIFFDecoder::ReadIFF()
wxLogTrace(_T("iff"), _T("Read %d colors from IFF file."),
colors);
CMAPok = TRUE; // got CMAP
CMAPok = true; // got CMAP
dataptr += 8 + chunkLen; // to next chunk
} else if (strncmp((char *)dataptr, "CAMG", 4) == 0) { // CAMG ?
if (chunkLen < 4 || truncated) {
break;
}
camg_viewmode = iff_getlong(dataptr + 8); // get viewmodes
CAMGok = TRUE; // got CAMG
CAMGok = true; // got CAMG
dataptr += 8 + chunkLen; // to next chunk
}
else if (strncmp((char *)dataptr, "BODY", 4) == 0) { // BODY ?
@@ -763,7 +763,7 @@ bool wxIFFHandler::LoadFile(wxImage *image, wxInputStream& stream,
}
}
delete decod;
return FALSE;
return false;
}
if ((error == wxIFF_TRUNCATED) && verbose)
@@ -784,7 +784,7 @@ bool wxIFFHandler::SaveFile(wxImage * WXUNUSED(image),
if (verbose)
wxLogDebug(wxT("IFF: the handler is read-only!!"));
return FALSE;
return false;
}
bool wxIFFHandler::DoCanRead(wxInputStream& stream)