BESM6: All arguments of "attach tty" but the magic word "console" are passed to tmxr_attach().
BESM6: Fix windows compile to support "console" besm6_tty attach .
This commit is contained in:
parent
d6d13a8c08
commit
8dea6828fe
1 changed files with 8 additions and 5 deletions
|
@ -303,9 +303,14 @@ t_stat tty_setmode (UNIT *u, int32 val, char *cptr, void *desc)
|
||||||
t_stat tty_attach (UNIT *u, char *cptr)
|
t_stat tty_attach (UNIT *u, char *cptr)
|
||||||
{
|
{
|
||||||
int num = u - tty_unit;
|
int num = u - tty_unit;
|
||||||
|
char gbuf[CBUFSIZE];
|
||||||
int r, m, n;
|
int r, m, n;
|
||||||
|
|
||||||
if (*cptr >= '0' && *cptr <= '9') {
|
/* All arguments but the magic word "console" are passed
|
||||||
|
* to tmxr_attach().
|
||||||
|
*/
|
||||||
|
get_glyph (cptr, gbuf, 0);
|
||||||
|
if (strcmp (gbuf, "CONSOLE")) {
|
||||||
/* Saving and restoring all .conn,
|
/* Saving and restoring all .conn,
|
||||||
* because tmxr_attach() zeroes them. */
|
* because tmxr_attach() zeroes them. */
|
||||||
for (m=0, n=1; n<=LINES_MAX; ++n)
|
for (m=0, n=1; n<=LINES_MAX; ++n)
|
||||||
|
@ -317,9 +322,7 @@ t_stat tty_attach (UNIT *u, char *cptr)
|
||||||
if (m >> (LINES_MAX-n) & 1)
|
if (m >> (LINES_MAX-n) & 1)
|
||||||
tty_line[n].conn = 1;
|
tty_line[n].conn = 1;
|
||||||
return r;
|
return r;
|
||||||
}
|
} else {
|
||||||
|
|
||||||
if (strcmp (cptr, "console") == 0) {
|
|
||||||
/* Attaching SIMH console to a particular terminal. */
|
/* Attaching SIMH console to a particular terminal. */
|
||||||
u->flags &= ~TTY_STATE_MASK;
|
u->flags &= ~TTY_STATE_MASK;
|
||||||
u->flags |= TTY_VT340_STATE;
|
u->flags |= TTY_VT340_STATE;
|
||||||
|
@ -331,7 +334,7 @@ t_stat tty_attach (UNIT *u, char *cptr)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* Disallowing future connections to a line */
|
/* Disallowing future connections to a line */
|
||||||
if (strcmp (cptr, "none") == 0) {
|
if (strcmp (gbuf, "NONE") == 0) {
|
||||||
/* Marking the TTY as unusable. */
|
/* Marking the TTY as unusable. */
|
||||||
tty_line[num].conn = 1;
|
tty_line[num].conn = 1;
|
||||||
tty_line[num].rcve = 0;
|
tty_line[num].rcve = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue