aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 79cb78b..7ad4d80 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -71,7 +71,7 @@ QRegisterTable QRegisters::globals;
Ring ring;
namespace Flags {
- tecoInt ed = 0;
+ tecoInt ed = ED_AUTOEOL;
}
static gchar *eval_macro = NULL;
@@ -88,6 +88,20 @@ static gpointer g_realloc_exception(gpointer mem, gsize n_bytes);
static void sigint_handler(int signal);
}
+const gchar *
+get_eol_seq(gint eol_mode)
+{
+ switch (eol_mode) {
+ case SC_EOL_CRLF:
+ return "\r\n";
+ case SC_EOL_CR:
+ return "\r";
+ case SC_EOL_LF:
+ default:
+ return "\n";
+ }
+}
+
#ifdef G_OS_WIN32
/*