]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/textfile.cpp
Fixes for WXWIN_COMPATIBILITY, and BC++ fix for event.cpp
[wxWidgets.git] / src / common / textfile.cpp
index 711b8de6ef19dc060a908b380b683234f43736ab..c09b7e86473895d8694f75a2b91647cb6ce41d29 100644 (file)
@@ -232,3 +232,18 @@ bool wxTextFile::Write(Type typeNew)
   // replace the old file with this one
   return fileTmp.Commit();
 }
+
+const char *wxTextFile::GetEOL(Type type)
+  {
+    switch ( type ) {
+      case Type_None: return "";
+      case Type_Unix: return "\n";
+      case Type_Dos:  return "\r\n";
+      case Type_Mac:  return "\r";
+
+      default:
+        wxFAIL_MSG("bad file type in wxTextFile::GetEOL.");
+        return (const char *) NULL;
+    }
+  }
+