X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=terminal.c;h=432ed936e6a4ee5770575e5d40bd562392d165c7;hb=d83cd2f79bba111660262af0827296cb76e17040;hp=dfd9a19e6ec805b528984aec4a055f5a9c5ea8d6;hpb=3d012d9bd07efebffadcab368c6695f2e295bb21;p=PuTTY.git diff --git a/terminal.c b/terminal.c index dfd9a19e..432ed936 100644 --- a/terminal.c +++ b/terminal.c @@ -6265,3 +6265,17 @@ void term_set_focus(Terminal *term, int has_focus) term->has_focus = has_focus; term_schedule_cblink(term); } + +/* + * Provide "auto" settings for remote tty modes, suitable for an + * application with a terminal window. + */ +char *term_get_ttymode(Terminal *term, const char *mode) +{ + char *val = NULL; + if (strcmp(mode, "ERASE") == 0) { + val = term->cfg.bksp_is_delete ? "^?" : "^H"; + } + /* FIXME: perhaps we should set ONLCR based on cfg.lfhascr as well? */ + return dupstr(val); +}