Cleanup remote console single command mode.

This commit is contained in:
Mark Pizzolato 2013-06-25 04:58:34 -10:00
parent 5a21db5df6
commit 1f8b3be4c0

View file

@ -421,6 +421,7 @@ if (c >= 0) { /* poll connect */
sim_activate_after(uptr+1, 1000000); /* start data poll after 1 second */ sim_activate_after(uptr+1, 1000000); /* start data poll after 1 second */
lp->rcve = 1; /* rcv enabled */ lp->rcve = 1; /* rcv enabled */
sim_rem_buf_ptr[c] = 0; /* start with empty command buffer */ sim_rem_buf_ptr[c] = 0; /* start with empty command buffer */
sim_rem_single_mode[c] = FALSE; /* in single command mode */
if (isprint(sim_int_char&0xFF)) if (isprint(sim_int_char&0xFF))
sprintf(wru_name, "'%c'", sim_int_char&0xFF); sprintf(wru_name, "'%c'", sim_int_char&0xFF);
else else
@ -580,6 +581,9 @@ for (i=(was_stepping ? sim_rem_step_line : 0);
tmxr_linemsgf (lp, "Simulation will resume automatically if input is not received in %d seconds\n", sim_rem_read_timeout); tmxr_linemsgf (lp, "Simulation will resume automatically if input is not received in %d seconds\n", sim_rem_read_timeout);
} }
else { else {
if ((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) ? */ if ((c == '\004') || (c == '\032')) { /* EOF character (^D or ^Z) ? */
tmxr_linemsgf (lp, "\r\nGoodbye\r\n"); tmxr_linemsgf (lp, "\r\nGoodbye\r\n");
tmxr_send_buffered_data (lp); /* flush any buffered data */ tmxr_send_buffered_data (lp); /* flush any buffered data */
@ -820,6 +824,7 @@ for (i=(was_stepping ? sim_rem_step_line : 0);
tmxr_linemsgf (lp, "\r\nGoodbye\r\n"); tmxr_linemsgf (lp, "\r\nGoodbye\r\n");
tmxr_send_buffered_data (lp); /* flush any buffered data */ tmxr_send_buffered_data (lp); /* flush any buffered data */
tmxr_reset_ln (lp); tmxr_reset_ln (lp);
sim_rem_single_mode[i] = FALSE;
} }
} }
if (stepping) if (stepping)