new set of fixes for problems due to huge files support: drop wxFileSize_t, use wxFileOffset only, make wxInvalidOffset an int (main part of the patch 1063498)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-11-10 21:02:58 +00:00
parent ccfc3219db
commit 30984deafc
22 changed files with 106 additions and 99 deletions

View File

@@ -97,7 +97,7 @@ bool wxTextFile::OnRead(wxMBConv& conv)
char *strBuf, *strPtr, *strEnd;
char ch, chLast = '\0';
char buf[1024];
wxFileSize_t nRead;
size_t nRead;
strPtr = strBuf = new char[1024];
strEnd = strBuf + 1024;
@@ -105,14 +105,14 @@ bool wxTextFile::OnRead(wxMBConv& conv)
do
{
nRead = m_file.Read(buf, WXSIZEOF(buf));
if ( nRead == wxInvalidOffset )
if ( nRead == (size_t)wxInvalidOffset )
{
// read error (error message already given in wxFile::Read)
delete[] strBuf;
return false;
}
for (wxFileSize_t n = 0; n < nRead; n++)
for (size_t n = 0; n < nRead; n++)
{
ch = buf[n];
switch ( ch )