1. new wxFFile class - as wxFile but uses fopen/fread/fseek... instead of
open/read/seek... 2. wxTextCtrlBase appears, several bug fixes in MSW wxTextCtrl and made LoadFile() behave in the same way under GTK and MSW (fixed it for MSW too) 3. Corrected the sash position calculation in sashwin.cpp - seems to work now but I wonder how it could ever work before? 4. new, tmake generated, MSW makefiles. They probably don't work - will fix them as soon as people start complaining. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -206,12 +206,6 @@ wxFile::wxFile(const wxChar *szFileName, OpenMode mode)
|
||||
Open(szFileName, mode);
|
||||
}
|
||||
|
||||
// dtor
|
||||
wxFile::~wxFile()
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
// create the file, fail if it already exists and bOverwrite
|
||||
bool wxFile::Create(const wxChar *szFileName, bool bOverwrite, int accessMode)
|
||||
{
|
||||
@@ -350,25 +344,25 @@ off_t wxFile::Seek(off_t ofs, wxSeekMode mode)
|
||||
{
|
||||
wxASSERT( IsOpened() );
|
||||
|
||||
int flag = -1;
|
||||
int origin;
|
||||
switch ( mode ) {
|
||||
default:
|
||||
wxFAIL_MSG(_("unknown seek origin"));
|
||||
|
||||
case wxFromStart:
|
||||
flag = SEEK_SET;
|
||||
origin = SEEK_SET;
|
||||
break;
|
||||
|
||||
case wxFromCurrent:
|
||||
flag = SEEK_CUR;
|
||||
origin = SEEK_CUR;
|
||||
break;
|
||||
|
||||
case wxFromEnd:
|
||||
flag = SEEK_END;
|
||||
origin = SEEK_END;
|
||||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG(_("unknown seek origin"));
|
||||
}
|
||||
|
||||
int iRc = lseek(m_fd, ofs, flag);
|
||||
int iRc = lseek(m_fd, ofs, origin);
|
||||
if ( iRc == -1 ) {
|
||||
wxLogSysError(_("can't seek on file descriptor %d"), m_fd);
|
||||
return wxInvalidOffset;
|
||||
|
Reference in New Issue
Block a user