projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mention bps units of terminal speeds (FWLIW).
[u/mdw/putty]
/
psftp.c
diff --git
a/psftp.c
b/psftp.c
index
c3fb62a
..
10056bd
100644
(file)
--- a/
psftp.c
+++ b/
psftp.c
@@
-1,5
+1,5
@@
/*
/*
- * psftp.c: front end for PSFTP.
+ * psftp.c:
(platform-independent)
front end for PSFTP.
*/
#include <stdio.h>
*/
#include <stdio.h>
@@
-1779,9
+1779,16
@@
static void usage(void)
printf(" -C enable compression\n");
printf(" -i key private key file for authentication\n");
printf(" -batch disable all interactive prompts\n");
printf(" -C enable compression\n");
printf(" -i key private key file for authentication\n");
printf(" -batch disable all interactive prompts\n");
+ printf(" -V print version information\n");
cleanup_exit(1);
}
cleanup_exit(1);
}
+static void version(void)
+{
+ printf("psftp: %s\n", ver);
+ cleanup_exit(1);
+}
+
/*
* Connect to a host.
*/
/*
* Connect to a host.
*/
@@
-1932,7
+1939,8
@@
static int psftp_connect(char *userhost, char *user, int portnumber)
back = &ssh_backend;
back = &ssh_backend;
- err = back->init(NULL, &backhandle, &cfg, cfg.host, cfg.port, &realhost,0);
+ err = back->init(NULL, &backhandle, &cfg, cfg.host, cfg.port, &realhost,
+ 0, cfg.tcp_keepalives);
if (err != NULL) {
fprintf(stderr, "ssh_init: %s\n", err);
return 1;
if (err != NULL) {
fprintf(stderr, "ssh_init: %s\n", err);
return 1;
@@
-2010,6
+2018,8
@@
int psftp_main(int argc, char *argv[])
} else if (strcmp(argv[i], "-h") == 0 ||
strcmp(argv[i], "-?") == 0) {
usage();
} else if (strcmp(argv[i], "-h") == 0 ||
strcmp(argv[i], "-?") == 0) {
usage();
+ } else if (strcmp(argv[i], "-V") == 0) {
+ version();
} else if (strcmp(argv[i], "-batch") == 0) {
console_batch_mode = 1;
} else if (strcmp(argv[i], "-b") == 0 && i + 1 < argc) {
} else if (strcmp(argv[i], "-batch") == 0) {
console_batch_mode = 1;
} else if (strcmp(argv[i], "-b") == 0 && i + 1 < argc) {