Add Terminal Settings, a connect timer and Send Break

HyperTerminal's Terminal Settings for each terminal of the Windows app
([terminal], [remote_terminal]): Backspace (Ctrl+H, Del, or Ctrl+H Space
Ctrl+H), terminal or Windows keys, backscroll lines, font, cursor, the
Telnet terminal ID, and exit upon disconnecting.

The status bar shows the connect timer during a call. Send Break (Modem
menu, Ctrl+Break) sends a break on a COM port or as Telnet's IAC BRK.

Core: dmc_vt_set_scrollback and dmc_net_break, with tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRekyRUhR43KbmGNXK
This commit is contained in:
Claude committed 2026-11-20 22:55:35 +00:00
1 parent 4f7e90f598
commit 8d6316e7ce
18 files changed
+608 -18

No files matched your search

+14 -2
View File
@@ -303,6 +303,14 @@ static int line_room()
return room > 0 ? room : 0;
}
bool remote_break()
{
if (!running || !net || !sock_open || !dmc_net_break(net))
return false;
flush();
return true;
}
static void raw_write(const char *data, int n)
{
if (!running)
@@ -1249,10 +1257,13 @@ static bool start_socket(int proto, const char *host, int port,
sock = socket(AF_INET, SOCK_STREAM, 0);
if (sock == INVALID_SOCKET)
return false;
/* (Telnet's TERMINAL-TYPE, rlogin's TERM) */
/* (Telnet's TERMINAL-TYPE, rlogin's TERM; Terminal Settings' Telnet
terminal ID first) */
const char *type = termview_profile(view);
char id[40];
termset_telnet_id(id, sizeof(id));
net = dmc_net_new(proto, user, proto == DMC_NET_TELNET ?
dmc_vt_profile_telnet(type) :
(id[0] ? id : dmc_vt_profile_telnet(type)) :
dmc_vt_profile_term(type), cols, rows);
sock_open = false;
WSAAsyncSelect(sock, app.main, WM_APP_REMOTE,
@@ -1403,6 +1414,7 @@ HWND remote_page_new(HWND parent)
#endif
view = termview_new(page, IDC_R_TERM, typed, NULL);
termview_set_printer(view, capture_printed, &remote_line);
termset_apply(view, true);
ascii_apply(view);
status_txt = make_child("STATIC", "Not connected", SS_LEFTNOWORDWRAP,
page, IDC_R_STATUS);