X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/d719927eb175a73b13a7015498e9757010344bf5..425b94fd77a3aa6158d08616f90a080f38a42625:/unix/gtkwin.c diff --git a/unix/gtkwin.c b/unix/gtkwin.c index 2c0df9cb..bd69fb69 100644 --- a/unix/gtkwin.c +++ b/unix/gtkwin.c @@ -2592,6 +2592,13 @@ static void help(FILE *fp) { } } +static void version(FILE *fp) { + if(fprintf(fp, "%s: %s\n", appname, ver) < 0 || fflush(fp) < 0) { + perror("output error"); + exit(1); + } +} + int do_cmdline(int argc, char **argv, int do_everything, int *allow_launch, struct gui_data *inst, Conf *conf) { @@ -2801,6 +2808,10 @@ int do_cmdline(int argc, char **argv, int do_everything, int *allow_launch, help(stdout); exit(0); + } else if(!strcmp(p, "-version") || !strcmp(p, "--version")) { + version(stdout); + exit(0); + } else if (!strcmp(p, "-pgpfp")) { pgp_fingerprints(); exit(1);