X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/39934deb5202149f98198c111a35c21cb4d0d0f8..dee42491003c8fdd01bd039da46b9d6a2d171584:/unix/uxplink.c diff --git a/unix/uxplink.c b/unix/uxplink.c index 6f17b5a2..42d69664 100644 --- a/unix/uxplink.c +++ b/unix/uxplink.c @@ -13,6 +13,7 @@ #include #include #include +#include #define PUTTY_DO_GLOBALS /* actually _define_ globals */ #include "putty.h" @@ -128,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); } @@ -227,6 +231,7 @@ static void usage(void) printf(" -A -a enable / disable agent forwarding\n"); printf(" -t -T enable / disable pty allocation\n"); printf(" -1 -2 force use of particular protocol version\n"); + printf(" -4 -6 force use of IPv4 or IPv6\n"); printf(" -C enable compression\n"); printf(" -i key private key file for authentication\n"); printf(" -s remote command is an SSH subsystem (SSH-2 only)\n"); @@ -409,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; } } @@ -513,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; /*