diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | builtin.c | 8 |
2 files changed, 12 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2012-12-27 Arnold D. Robbins <arnold@skeeve.com> + + * builtin.c (do_print, do_printf): Use output_fp as default + output for print/printf only if running under the debugger. + Otherwise use stdout as Brian, Peter, and Al intended. + 2012-12-25 Arnold D. Robbins <arnold@skeeve.com> Remove sym-constant from API after discussions with John @@ -1650,8 +1650,10 @@ do_printf(int nargs, int redirtype) rp = redirect(redir_exp, redirtype, & errflg); if (rp != NULL) fp = rp->output.fp; - } else + } else if (do_debug) /* only the debugger can change the default output */ fp = output_fp; + else + fp = stdout; tmp = printf_common(nargs); if (redir_exp != NULL) { @@ -2076,8 +2078,10 @@ do_print(int nargs, int redirtype) rp = redirect(redir_exp, redirtype, & errflg); if (rp != NULL) fp = rp->output.fp; - } else + } else if (do_debug) /* only the debugger can change the default output */ fp = output_fp; + else + fp = stdout; for (i = 1; i <= nargs; i++) { tmp = args_array[i] = POP(); |