summaryrefslogtreecommitdiff
path: root/bin/ksh/lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ksh/lex.c')
-rw-r--r--bin/ksh/lex.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/bin/ksh/lex.c b/bin/ksh/lex.c
index 4ed8557d016..9e94e34ef5a 100644
--- a/bin/ksh/lex.c
+++ b/bin/ksh/lex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lex.c,v 1.77 2018/01/06 16:28:58 millert Exp $ */
+/* $OpenBSD: lex.c,v 1.78 2018/01/15 14:58:05 jca Exp $ */
/*
* lexical analysis and source input
@@ -1086,14 +1086,13 @@ getsc_line(Source *s)
ksh_tmout_state = TMOUT_READING;
alarm(ksh_tmout);
}
-#ifdef EDIT
if (have_tty && (0
-# ifdef VI
+#ifdef VI
|| Flag(FVI)
-# endif /* VI */
-# ifdef EMACS
+#endif /* VI */
+#ifdef EMACS
|| Flag(FEMACS) || Flag(FGMACS)
-# endif /* EMACS */
+#endif /* EMACS */
)) {
int nread;
@@ -1102,10 +1101,7 @@ getsc_line(Source *s)
nread = 0;
xp[nread] = '\0';
xp += nread;
- }
- else
-#endif /* EDIT */
- {
+ } else {
if (interactive) {
pprompt(prompt, 0);
} else
@@ -1153,7 +1149,6 @@ getsc_line(Source *s)
shf_fdclose(s->u.shf);
s->str = NULL;
} else if (interactive) {
-#ifdef HISTORY
char *p = Xstring(s->xs, xp);
if (cur_prompt == PS1)
while (*p && ctype(*p, C_IFS) && ctype(*p, C_IFSWS))
@@ -1162,7 +1157,6 @@ getsc_line(Source *s)
s->line++;
histsave(s->line, s->str, 1);
}
-#endif /* HISTORY */
}
if (interactive)
set_prompt(PS2);