From 5c45aec68fa6d9746fea94119d2385db6ec807c0 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sun, 26 Oct 2014 15:55:36 -0700 Subject: [PATCH] SCP: Cleanup minor remote console behaviors (stutter prompt and broken single mode command) --- sim_console.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/sim_console.c b/sim_console.c index aa470f97..fee098b7 100644 --- a/sim_console.c +++ b/sim_console.c @@ -705,15 +705,18 @@ for (i=(was_stepping ? sim_rem_step_line : 0); tmxr_send_buffered_data (lpj); /* flush any buffered data */ } lp = &sim_rem_con_tmxr.ldsc[i]; - tmxr_linemsg (lp, "\r\nSimulator paused.\r\n"); - if (sim_rem_read_timeouts[i]) + if (!master_session) + tmxr_linemsg (lp, "\r\nSimulator paused.\r\n"); + if (sim_rem_read_timeouts[i]) { tmxr_linemsgf (lp, "Simulation will resume automatically if input is not received in %d seconds\n", sim_rem_read_timeouts[i]); tmxr_linemsgf (lp, "\r\n%s", sim_prompt); tmxr_send_buffered_data (lp); /* flush any buffered data */ + } } else { - if ((c == '\n') || /* Ignore bare LF between commands (Microsoft Telnet bug) */ - (c == '\r')) /* Ignore empty commands */ + if ((sim_rem_buf_ptr[i] == 0) && /* At beginning of input line */ + ((c == '\n') || /* Ignore bare LF between commands (Microsoft Telnet bug) */ + (c == '\r'))) /* Ignore empty commands */ continue; if ((c == '\004') || (c == '\032')) { /* EOF character (^D or ^Z) ? */ tmxr_linemsgf (lp, "\r\nGoodbye\r\n"); @@ -758,7 +761,7 @@ for (i=(was_stepping ? sim_rem_step_line : 0); got_command = TRUE; break; } - sim_os_ms_sleep (100); + sim_os_ms_sleep (50); tmxr_poll_rx (&sim_rem_con_tmxr);/* poll input */ continue; } @@ -943,8 +946,10 @@ for (i=(was_stepping ? sim_rem_step_line : 0); if (cmdp && (cmdp->action == &x_continue_cmd)) sim_rem_single_mode[i] = TRUE; else { - tmxr_linemsgf (lp, "%s", sim_prompt); - tmxr_send_buffered_data (lp); + if (!sim_rem_single_mode[i]) { + tmxr_linemsgf (lp, "%s", sim_prompt); + tmxr_send_buffered_data (lp); + } } break; }