From 733b8ed3f9757ce3b7197e0ab203a6b05f3469d7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Jul 2001 23:20:05 +0000 Subject: [PATCH] use wxTextFile::Eol() in wxEndL git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/stream.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/common/stream.cpp b/src/common/stream.cpp index 9763842c4a..9c006b8f7a 100644 --- a/src/common/stream.cpp +++ b/src/common/stream.cpp @@ -39,6 +39,7 @@ #include "wx/stream.h" #include "wx/datstrm.h" #include "wx/objstrm.h" +#include "wx/textfile.h" // ---------------------------------------------------------------------------- // constants @@ -1176,15 +1177,9 @@ void wxBufferedOutputStream::SetOutputStreamBuffer(wxStreamBuffer *buffer) wxOutputStream& wxEndL(wxOutputStream& stream) { -#ifdef __MSW__ - return stream.Write("\r\n", 2); -#else -#ifdef __WXMAC__ - return stream.Write("\r", 1); -#else - return stream.Write("\n", 1); -#endif -#endif + static const wxChar *eol = wxTextFile::GetEOL(); + + return stream.Write(eol, wxStrlen(eol)); } #endif