comparison src/input.cc @ 2618:aa667ac18d12

[project @ 1997-01-23 03:16:28 by jwe]
author jwe
date Thu, 23 Jan 1997 03:16:29 +0000
parents 1e673f0648b5
children 9aeba8e006a4
comparison
equal deleted inserted replaced
2617:a27986cc4177 2618:aa667ac18d12
385 static void 385 static void
386 do_input_echo (const string& input_string) 386 do_input_echo (const string& input_string)
387 { 387 {
388 int do_echo = reading_script_file ? 388 int do_echo = reading_script_file ?
389 (Vecho_executing_commands & ECHO_SCRIPTS) 389 (Vecho_executing_commands & ECHO_SCRIPTS)
390 : (Vecho_executing_commands & ECHO_CMD_LINE); 390 : (Vecho_executing_commands & ECHO_CMD_LINE) && ! forced_interactive;
391 391
392 if (do_echo) 392 if (do_echo)
393 { 393 {
394 if (forced_interactive) 394 if (forced_interactive)
395 { 395 {
428 } 428 }
429 } 429 }
430 else 430 else
431 { 431 {
432 if (s && *s && (interactive || forced_interactive)) 432 if (s && *s && (interactive || forced_interactive))
433 fprintf (rl_outstream, s); 433 {
434 fprintf (rl_outstream, s);
435 fflush (rl_outstream);
436 }
434 437
435 FILE *curr_stream = rl_instream; 438 FILE *curr_stream = rl_instream;
436 if (reading_fcn_file || reading_script_file) 439 if (reading_fcn_file || reading_script_file)
437 curr_stream = ff_instream; 440 curr_stream = ff_instream;
438 441
491 const char *ps = (promptflag > 0) ? Vps1.c_str () : 494 const char *ps = (promptflag > 0) ? Vps1.c_str () :
492 Vps2.c_str (); 495 Vps2.c_str ();
493 496
494 string prompt = decode_prompt_string (ps); 497 string prompt = decode_prompt_string (ps);
495 498
496 if (interactive) 499 pipe_handler_error_count = 0;
497 { 500
498 pipe_handler_error_count = 0; 501 flush_octave_stdout ();
499 flush_octave_stdout ();
500 }
501 502
502 octave_diary << prompt; 503 octave_diary << prompt;
503 504
504 retval = gnu_readline (prompt.c_str ()); 505 retval = gnu_readline (prompt.c_str ());
505 } 506 }