Fix a bug in previous revision.
The bc(1) program may need to deal with files when it's being run in interactive mode, so we can not blindly use interactive mode (in turn use libedit) but need to check if the input source is really the standard input. This commit should fix a regression where 'bc -l' would not parse the mathlib. Reported by: trasz
This commit is contained in:
parent
f801fa102d
commit
89ff1978d6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=203531
@ -301,7 +301,7 @@ static int
|
||||
bc_yyinput(char *buf, int maxlen)
|
||||
{
|
||||
int num;
|
||||
if (interactive) {
|
||||
if (yyin == stdin && interactive) {
|
||||
const char *bp;
|
||||
|
||||
if ((bp = el_gets(el, &num)) == NULL || num == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user