X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/2a6848cc351da3e7d43f476cbe0b9f3e64df4494..77603464f5b4231df69eb20ca278062bd7aae9fb:/unix/uxplink.c diff --git a/unix/uxplink.c b/unix/uxplink.c index 99acc6f4..42d69664 100644 --- a/unix/uxplink.c +++ b/unix/uxplink.c @@ -129,10 +129,13 @@ void ldisc_update(void *frontend, int echo, int edit) else mode.c_lflag &= ~ECHO; - if (edit) + if (edit) { + mode.c_iflag |= ICRNL; mode.c_lflag |= ISIG | ICANON; - else + } else { + mode.c_iflag &= ~ICRNL; mode.c_lflag &= ~(ISIG | ICANON); + } tcsetattr(0, TCSANOW, &mode); } @@ -411,8 +414,6 @@ int main(int argc, char **argv) cfg.port = default_port; } else { cfg = cfg2; - /* Ick: patch up internal pointer after copy */ - cfg.remote_cmd_ptr = cfg.remote_cmd; } } @@ -515,7 +516,7 @@ int main(int argc, char **argv) cfg.host[p1] = '\0'; } - if (!*cfg.remote_cmd_ptr) + if (!cfg.remote_cmd_ptr && !*cfg.remote_cmd) flags |= FLAG_INTERACTIVE; /*