diff --git a/src/syncterm/bbslist.c b/src/syncterm/bbslist.c index 8f3877644e2ba7ec4513996c6dc3cd19d2036158..052917e405bf393fd6058efcf6f159bedad405c0 100644 --- a/src/syncterm/bbslist.c +++ b/src/syncterm/bbslist.c @@ -3291,7 +3291,5 @@ get_term_size(struct bbslist *bbs, int *cols, int *rows) *rows = vparams[cmode].rows; if (!bbs->nostatus) (*rows)--; - if (*rows < 24) - *rows = 24; } } diff --git a/src/syncterm/syncterm.c b/src/syncterm/syncterm.c index f8b548fe018cc96a94dcf866dabaf2e76ee556f4..dd6f95ce44087a23427b467696eb6494d24a8f8b 100644 --- a/src/syncterm/syncterm.c +++ b/src/syncterm/syncterm.c @@ -1760,7 +1760,7 @@ main(int argc, char **argv) gettextinfo(&txtinfo); if ((txtinfo.screenwidth < 40) || (txtinfo.screenheight < 24)) { - fputs("Window too small, must be at least 80x24\n", stderr); + fputs("Window too small, must be at least 40x24\n", stderr); return 1; } diff --git a/src/syncterm/term.c b/src/syncterm/term.c index 35f162deff00297e72467c94cd8d1cbd62f062bb..52c433a4fcbb1d1a935da049a2482dd88bfaf0d2 100644 --- a/src/syncterm/term.c +++ b/src/syncterm/term.c @@ -326,10 +326,10 @@ cleanup: } void -update_status(struct bbslist *bbs, int speed, int ooii_mode) +update_status(struct bbslist *bbs, int speed, int ooii_mode, bool ata_inv) { - char nbuf[LIST_NAME_MAX + 10 + 11 + 1]; /* - * Room for "Name (Logging) (115300)" and terminator + char nbuf[LIST_NAME_MAX + 10 + 11 + 7 + 10 + 6 + 1]; /* + * Room for "Name (Logging) (115300) (DrWy) (OOTerm2) (INV)" and terminator * SAFE and Logging should me be possible. */ int oldscroll; @@ -342,6 +342,7 @@ update_status(struct bbslist *bbs, int speed, int ooii_mode) char sep; int oldfont_norm; int oldfont_bright; + int calcwidth; if (term.nostatus) return; @@ -409,12 +410,20 @@ update_status(struct bbslist *bbs, int speed, int ooii_mode) strcat(nbuf, " (OOTerm2)"); break; } + if (ata_inv) + strcat(nbuf, " (INV)"); ciolib_setcolour(11, 4); switch (cio_api.mode) { case CIOLIB_MODE_CURSES: case CIOLIB_MODE_CURSES_IBM: case CIOLIB_MODE_ANSI: - if (timeon > 359999) { + if (term.width < 80) { + cprintf(" %-30.30s %c %-6.6s ", + nbuf, + sep, + conn_types[bbs->conn_type]); + } + else if (timeon > 359999) { cprintf(" %-29.29s %c %-6.6s %c Connected: Too Long %c CTRL-S for menu ", nbuf, sep, @@ -435,7 +444,14 @@ update_status(struct bbslist *bbs, int speed, int ooii_mode) } break; default: - if (timeon > 359999) { + if (term.width < 80) { + cprintf(" %-30.30s %c %-6.6s %*s", + nbuf, + sep, + conn_types[bbs->conn_type], + term.width - 40, ""); + } + else if (timeon > 359999) { cprintf(" %-30.30s %c %-6.6s %c Connected: Too Long %c "ALT_KEY_NAME3CH "-Z for menu ", nbuf, sep, @@ -457,7 +473,7 @@ update_status(struct bbslist *bbs, int speed, int ooii_mode) } break; /* 1+29 +3 +6 +3 +11 +3+3+2 +3 +6 +4 +5 */ } - if (wherex() >= 80) + if (wherex() - term.y + 1 >= term.width) clreol(); _wscroll = oldscroll; setfont(oldfont_norm, 0, 1); @@ -3648,6 +3664,7 @@ doterm(struct bbslist *bbs) recv_byte_buffer_len = recv_byte_buffer_pos = 0; struct mouse_state ms = {0}; int speedwatch = 0; + bool atascii_inverse = false; freepixels(pixmap_buffer[0]); freepixels(pixmap_buffer[1]); @@ -3709,7 +3726,7 @@ doterm(struct bbslist *bbs) if (!term.nostatus) { update_status(bbs, (bbs->conn_type == CONN_TYPE_SERIAL || bbs->conn_type == CONN_TYPE_SERIAL_NORTS) ? bbs->bpsrate : speed, - ooii_mode); + ooii_mode, atascii_inverse); } for (remain = count_data_waiting() /* Hack for connection check */ + (!is_connected(NULL)); remain; remain--) { @@ -4224,7 +4241,8 @@ doterm(struct bbslist *bbs) /* Translate keys to ATASCII */ switch (key) { case '\r': - case '\n': + case '\n': // 0x9b + case 155: ch[0] = 155; conn_send(ch, 1, 0); break; @@ -4253,13 +4271,14 @@ doterm(struct bbslist *bbs) ch[0] = 127; conn_send(ch, 1, 0); break; - case 96: /* No backtick */ + case 96: /* Backtick toggles inverse */ + atascii_inverse = !atascii_inverse; break; default: if (key < 256) { /* ASCII Translation */ if (key < 123) { - ch[0] = key; + ch[0] = key + (atascii_inverse ? 128 : 0); conn_send(ch, 1, 0); } } diff --git a/src/syncterm/window.c b/src/syncterm/window.c index 1d803061363f6742f7222157def89ca6c648564a..156e03ebafd580e89cdb0bcde3275dfa8117573f 100644 --- a/src/syncterm/window.c +++ b/src/syncterm/window.c @@ -37,10 +37,6 @@ get_term_win_size(int *width, int *height, int *pixelw, int *pixelh, int *nostat } if (!*nostatus) (*height)--; - if (*height < 24) { - *height = 24; - *nostatus = 1; - } if (vmode == -1) { if (pixelw)