Back out complex and semi-correct workaround and commit one line fix

for 'echo' problem instead
This commit is contained in:
Andrey A. Chernov 1998-05-02 08:33:59 +00:00
parent 86524867d1
commit 18a34ccf77
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=35616
2 changed files with 6 additions and 9 deletions

View File

@ -137,19 +137,16 @@ main (argc, argv)
char *env_value;
char *env_argv[30];
int env_argc;
extern FILE *rl_outstream;
/* Initialize many variables. */
compile_only = FALSE;
use_math = FALSE;
warn_not_std = FALSE;
std_only = FALSE;
if (isatty(0) && isatty(1))
if (isatty(0) && isatty(1))
interactive = TRUE;
else {
else
interactive = FALSE;
rl_outstream = stderr;
}
quiet = FALSE;
file_names = NULL;
@ -214,7 +211,8 @@ main (argc, argv)
#ifdef READLINE
/* Readline support. Set both application name and input file. */
rl_readline_name = "bc";
rl_instream = stdin;
if (interactive)
rl_instream = stdin;
using_history ();
#endif

View File

@ -63,7 +63,6 @@ static char *rl_start = (char *)NULL;
static char rl_len = 0;
/* Definitions for readline access. */
extern FILE *rl_outstream;
extern FILE *rl_instream;
_PROTOTYPE(char *readline, (char *));
@ -108,8 +107,8 @@ rl_input (buf, result, max)
if (rl_len != 1)
add_history (rl_line);
rl_line[rl_len-1] = '\n';
fprintf (rl_outstream,"\r");
fflush (rl_outstream);
printf ("\r");
fflush (stdout);
}
if (rl_len <= max)