X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f42d2aba7645ab25ed3764d55394e58649ab0363..c17bcb844883451b564446bf7843e7b3f862fe48:/src/common/textfile.cpp diff --git a/src/common/textfile.cpp b/src/common/textfile.cpp index 931c5048b6..d45a4cc498 100644 --- a/src/common/textfile.cpp +++ b/src/common/textfile.cpp @@ -23,6 +23,12 @@ #pragma hdrstop #endif //__BORLANDC__ +#ifndef WX_PRECOMP +#include "wx/defs.h" +#endif + +#if wxUSE_TEXTFILE && wxUSE_FILE + #include #include #include @@ -249,17 +255,18 @@ bool wxTextFile::Write(wxTextFileType typeNew) return fileTmp.Commit(); } -const char *wxTextFile::GetEOL(wxTextFileType type) - { +const wxChar *wxTextFile::GetEOL(wxTextFileType type) +{ switch ( type ) { - case wxTextFileType_None: return ""; - case wxTextFileType_Unix: return "\n"; - case wxTextFileType_Dos: return "\r\n"; - case wxTextFileType_Mac: return "\r"; + case wxTextFileType_None: return _T(""); + case wxTextFileType_Unix: return _T("\n"); + case wxTextFileType_Dos: return _T("\r\n"); + case wxTextFileType_Mac: return _T("\r"); default: - wxFAIL_MSG("bad file type in wxTextFile::GetEOL."); - return (const char *) NULL; + wxFAIL_MSG(_T("bad file type in wxTextFile::GetEOL.")); + return (const wxChar *) NULL; } - } +} +#endif