aboutsummaryrefslogtreecommitdiffstats
path: root/common/ttyio.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/ttyio.c')
-rw-r--r--common/ttyio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/ttyio.c b/common/ttyio.c
index 8f1e7b35c..831ad9048 100644
--- a/common/ttyio.c
+++ b/common/ttyio.c
@@ -168,6 +168,8 @@ init_ttyfp(void)
#elif defined(__EMX__)
ttyfp = stdout; /* Fixme: replace by the real functions: see wklib */
+ if (my_rl_init_stream)
+ my_rl_init_stream (ttyfp);
#else
ttyfp = batchmode? stderr : fopen (tty_get_ttyname (), "r+");
if( !ttyfp ) {
@@ -175,10 +177,10 @@ init_ttyfp(void)
strerror(errno) );
exit(2);
}
-#endif
-
if (my_rl_init_stream)
my_rl_init_stream (ttyfp);
+#endif
+
#ifdef HAVE_TCGETATTR
atexit( cleanup );