X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/a79e1969c433be76db0e0585081977b4a7656e51..8c1835c0f951be43da1fb19405c7ff958a9b8661:/windows/winplink.c diff --git a/windows/winplink.c b/windows/winplink.c index 1fb3ee0b..ae80bf9b 100644 --- a/windows/winplink.c +++ b/windows/winplink.c @@ -94,6 +94,8 @@ void ldisc_update(void *frontend, int echo, int edit) SetConsoleMode(inhandle, mode); } +char *get_ttymode(void *frontend, const char *mode) { return NULL; } + struct input_data { DWORD len; char buffer[4096]; @@ -210,14 +212,14 @@ static void usage(void) printf("Usage: plink [options] [user@]host [command]\n"); printf(" (\"host\" can also be a PuTTY saved session name)\n"); printf("Options:\n"); - printf(" -V print version information\n"); + printf(" -V print version information and exit\n"); + printf(" -pgpfp print PGP key fingerprints and exit\n"); printf(" -v show verbose messages\n"); printf(" -load sessname Load settings from saved session\n"); printf(" -ssh -telnet -rlogin -raw\n"); printf(" force use of a particular protocol\n"); printf(" -P port connect to specified port\n"); printf(" -l user connect with specified username\n"); - printf(" -m file read remote command(s) from file\n"); printf(" -batch disable all interactive prompts\n"); printf("The following options only apply to SSH connections:\n"); printf(" -pw passw login with specified password\n"); @@ -234,6 +236,7 @@ static void usage(void) 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(" -m file read remote command(s) from file\n"); printf(" -s remote command is an SSH subsystem (SSH-2 only)\n"); printf(" -N don't start a shell/command (SSH-2 only)\n"); exit(1); @@ -339,6 +342,9 @@ int main(int argc, char **argv) use_subsystem = 1; } else if (!strcmp(p, "-V")) { version(); + } else if (!strcmp(p, "-pgpfp")) { + pgp_fingerprints(); + exit(1); } else { fprintf(stderr, "plink: unknown option \"%s\"\n", p); errors = 1; @@ -592,16 +598,16 @@ int main(int argc, char **argv) inhandle = GetStdHandle(STD_INPUT_HANDLE); outhandle = GetStdHandle(STD_OUTPUT_HANDLE); errhandle = GetStdHandle(STD_ERROR_HANDLE); - GetConsoleMode(inhandle, &orig_console_mode); - SetConsoleMode(inhandle, ENABLE_PROCESSED_INPUT); - - main_thread_id = GetCurrentThreadId(); - /* * Turn off ECHO and LINE input modes. We don't care if this * call fails, because we know we aren't necessarily running in * a console. */ + GetConsoleMode(inhandle, &orig_console_mode); + SetConsoleMode(inhandle, ENABLE_PROCESSED_INPUT); + + main_thread_id = GetCurrentThreadId(); + handles[0] = netevent; handles[1] = stdinevent; handles[2] = stdoutevent;