Fixed Remote Console to tolerate bare LF as a line terminator and enhanced the tmxr debug output for special characters
This commit is contained in:
parent
8735538d72
commit
b1e31a7034
2 changed files with 20 additions and 2 deletions
|
@ -598,6 +598,9 @@ for (i=(was_stepping ? sim_rem_step_line : 0);
|
|||
--sim_rem_buf_ptr[i];
|
||||
}
|
||||
break;
|
||||
case '\n':
|
||||
if (sim_rem_buf_ptr[i] == 0)
|
||||
break;
|
||||
case '\r':
|
||||
tmxr_linemsg (lp, "\r\n");
|
||||
if (sim_rem_buf_ptr[i]+1 >= sim_rem_buf_size[i]) {
|
||||
|
|
19
sim_tmxr.c
19
sim_tmxr.c
|
@ -3550,10 +3550,25 @@ if ((lp->mp->dptr) && (dbits & lp->mp->dptr->dctrl)) {
|
|||
for (i=0; i<bufsize; ++i) {
|
||||
for (j=0; 1; ++j) {
|
||||
if (NULL == tn_chars[j].name) {
|
||||
tmxr_buf_debug_char (buf[i]);
|
||||
if (isprint(buf[i]))
|
||||
tmxr_buf_debug_char (buf[i]);
|
||||
else {
|
||||
tmxr_buf_debug_char ('_');
|
||||
if ((buf[i] >= 1) && (buf[i] <= 26)) {
|
||||
tmxr_buf_debug_char ('^');
|
||||
tmxr_buf_debug_char ('A' + buf[i] - 1);
|
||||
}
|
||||
else {
|
||||
char octal[8];
|
||||
|
||||
sprintf(octal, "\\%03o", (u_char)buf[i]);
|
||||
tmxr_buf_debug_string (octal);
|
||||
}
|
||||
tmxr_buf_debug_char ('_');
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (buf[i] == tn_chars[j].value) {
|
||||
if ((u_char)buf[i] == tn_chars[j].value) {
|
||||
tmxr_buf_debug_char ('_');
|
||||
tmxr_buf_debug_string (tn_chars[j].name);
|
||||
tmxr_buf_debug_char ('_');
|
||||
|
|
Loading…
Add table
Reference in a new issue