X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/d719927eb175a73b13a7015498e9757010344bf5..f7aa4b367eaf2c1e928f97263bcf4da74680aff3:/unix/uxplink.c diff --git a/unix/uxplink.c b/unix/uxplink.c index 0d896225..9e10c488 100644 --- a/unix/uxplink.c +++ b/unix/uxplink.c @@ -63,6 +63,22 @@ void modalfatalbox(char *p, ...) } cleanup_exit(1); } +void nonfatal(char *p, ...) +{ + struct termios cf; + va_list ap; + premsg(&cf); + fprintf(stderr, "ERROR: "); + va_start(ap, p); + vfprintf(stderr, p, ap); + va_end(ap); + fputc('\n', stderr); + postmsg(&cf); + if (logctx) { + log_free(logctx); + logctx = NULL; + } +} void connection_fatal(void *frontend, char *p, ...) { struct termios cf; @@ -654,8 +670,11 @@ int main(int argc, char **argv) } else if (!strcmp(p, "-s")) { /* Save status to write to conf later. */ use_subsystem = 1; - } else if (!strcmp(p, "-V")) { + } else if (!strcmp(p, "-V") || !strcmp(p, "--version")) { version(); + } else if (!strcmp(p, "--help")) { + usage(); + exit(0); } else if (!strcmp(p, "-pgpfp")) { pgp_fingerprints(); exit(1);