merge from open-source master
Change-Id: I8b1e7e238d9d0e828bea72530b5356b8386e48bc
This commit is contained in:
commit
6be163b167
3 changed files with 6 additions and 2 deletions
|
@ -175,6 +175,9 @@ pgetc(void)
|
|||
return pgetc_macro();
|
||||
}
|
||||
|
||||
int in_interactive_mode() {
|
||||
return parsefile != NULL && parsefile->fd == 0;
|
||||
}
|
||||
|
||||
static int
|
||||
preadfd(void)
|
||||
|
|
|
@ -46,6 +46,7 @@ extern int parsenleft; /* number of characters left in input buffer */
|
|||
extern char *parsenextc; /* next character in input buffer */
|
||||
extern int init_editline; /* 0 == not setup, 1 == OK, -1 == failed */
|
||||
|
||||
int in_interactive_mode();
|
||||
char *pfgets(char *, int);
|
||||
int pgetc(void);
|
||||
int preadbuffer(void);
|
||||
|
|
|
@ -1629,9 +1629,9 @@ setprompt(int which)
|
|||
if (!el)
|
||||
#endif
|
||||
#ifdef WITH_LINENOISE
|
||||
#else
|
||||
out2str(getprompt(NULL));
|
||||
if (! in_interactive_mode() )
|
||||
#endif
|
||||
out2str(getprompt(NULL));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue