projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clip the 'lines' parameter to scroll() at the size of the scroll
[u/mdw/putty]
/
unix
/
gtkwin.c
diff --git
a/unix/gtkwin.c
b/unix/gtkwin.c
index
2c0df9c
..
bd69fb6
100644
(file)
--- 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)
{
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);
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);
} else if (!strcmp(p, "-pgpfp")) {
pgp_fingerprints();
exit(1);