summaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authortgoodwin <tgoodwin>1998-07-08 16:57:24 +0000
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:23:06 +0100
commit7b605b5f6d00a9a75c9fe091f30c845f12e88aec (patch)
treec8c69c0599a729e395c31f526f16d4dd43761b7c /input.c
parentd8c86b86c069c39cfc67a9c7eee1cbb7531dc122 (diff)
we now handle EDITLINE and READLINE separately
Diffstat (limited to 'input.c')
-rw-r--r--input.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/input.c b/input.c
index ef9b419..a405b15 100644
--- a/input.c
+++ b/input.c
@@ -41,7 +41,7 @@ static void (*realugchar)(int);
int last;
-#if READLINE
+#if EDITLINE || READLINE
static char *rlinebuf, *prompt;
#endif
@@ -94,7 +94,7 @@ static int fdgchar() {
if (chars_out >= chars_in + 2) { /* has the buffer been exhausted? if so, replenish it */
while (1) {
-#if READLINE
+#if EDITLINE || READLINE
if (interactive && istack->fd == 0 && isatty(0)) {
rlinebuf = rc_readline(prompt);
if (rlinebuf == NULL) {
@@ -263,7 +263,7 @@ extern Node *doit(bool execit) {
funcall(arglist);
}
if ((s = varlookup("prompt")) != NULL) {
-#if READLINE
+#if EDITLINE || READLINE
if (istack->t == iFd && istack->fd == 0 && isatty(0))
prompt = s->w;
else
@@ -350,7 +350,7 @@ extern void closefds() {
extern void print_prompt2() {
lineno++;
if (interactive) {
-#if READLINE
+#if EDITLINE || READLINE
if (istack->t == iFd && istack->fd == 0 && isatty(0))
prompt = prompt2;
else