#pragma hdrstop
#endif
-#if wxUSE_FILE
+#if wxUSE_FFILE
#ifndef WX_PRECOMP
#include "wx/intl.h"
bool wxFFile::Open(const wxChar *filename, const char *mode)
{
- wxASSERT_MSG( !m_fp, _T("should close or detach the old file first") );
+ wxASSERT_MSG( !m_fp, wxT("should close or detach the old file first") );
#if wxUSE_UNICODE
char *tmp_fname;
bool wxFFile::ReadAll(wxString *str)
{
- wxCHECK_MSG( str, FALSE, _T("invalid parameter") );
- wxCHECK_MSG( IsOpened(), FALSE, _T("can't read from closed file") );
+ wxCHECK_MSG( str, FALSE, wxT("invalid parameter") );
+ wxCHECK_MSG( IsOpened(), FALSE, wxT("can't read from closed file") );
clearerr(m_fp);
size_t wxFFile::Read(void *pBuf, size_t nCount)
{
- wxCHECK_MSG( pBuf, FALSE, _T("invalid parameter") );
- wxCHECK_MSG( IsOpened(), FALSE, _T("can't read from closed file") );
+ wxCHECK_MSG( pBuf, FALSE, wxT("invalid parameter") );
+ wxCHECK_MSG( IsOpened(), FALSE, wxT("can't read from closed file") );
size_t nRead = fread(pBuf, 1, nCount, m_fp);
if ( (nRead < nCount) && Error() )
size_t wxFFile::Write(const void *pBuf, size_t nCount)
{
- wxCHECK_MSG( pBuf, FALSE, _T("invalid parameter") );
- wxCHECK_MSG( IsOpened(), FALSE, _T("can't write to closed file") );
+ wxCHECK_MSG( pBuf, FALSE, wxT("invalid parameter") );
+ wxCHECK_MSG( IsOpened(), FALSE, wxT("can't write to closed file") );
size_t nWritten = fwrite(pBuf, 1, nCount, m_fp);
if ( nWritten < nCount )
bool wxFFile::Seek(long ofs, wxSeekMode mode)
{
- wxCHECK_MSG( IsOpened(), FALSE, _T("can't seek on closed file") );
+ wxCHECK_MSG( IsOpened(), FALSE, wxT("can't seek on closed file") );
int origin;
switch ( mode )
{
default:
- wxFAIL_MSG(_T("unknown seek mode"));
+ wxFAIL_MSG(wxT("unknown seek mode"));
// still fall through
case wxFromStart:
return (size_t)-1;
}
-#endif // wxUSE_FILE
+#endif // wxUSE_FFILE