X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fuxsftp.c;h=794cc9cbda7e0099c0794ec79a2083a1c16ed05b;hb=bec33b23119d9363854a2d0b4f4ca0fe893827aa;hp=21d7f40fb94aa1136d5e7bdb66c083170f8bd66a;hpb=89da2ddf564a93414ee9ab2df3f053608094e417;p=PuTTY.git diff --git a/unix/uxsftp.c b/unix/uxsftp.c index 21d7f40f..794cc9cb 100644 --- a/unix/uxsftp.c +++ b/unix/uxsftp.c @@ -26,8 +26,8 @@ * In PSFTP our selects are synchronous, so these functions are * empty stubs. */ -int uxsel_input_add(int fd, int rwx) { return 0; } -void uxsel_input_remove(int id) { } +uxsel_id *uxsel_input_add(int fd, int rwx) { return NULL; } +void uxsel_input_remove(uxsel_id *id) { } char *x_get_default(const char *key) { @@ -413,6 +413,20 @@ void finish_wildcard_matching(WildcardMatcher *dir) { sfree(dir); } +char *stripslashes(const char *str, int local) +{ + char *p; + + /* + * On Unix, we do the same thing regardless of the 'local' + * parameter. + */ + p = strrchr(str, '/'); + if (p) str = p+1; + + return (char *)str; +} + int vet_filename(const char *name) { if (strchr(name, '/')) @@ -517,7 +531,9 @@ static int ssh_sftp_do_select(int include_stdin, int no_fds_ok) now = GETTICKCOUNT(); } while (ret < 0 && errno == EINTR); } else { - ret = select(maxfd, &rset, &wset, &xset, NULL); + do { + ret = select(maxfd, &rset, &wset, &xset, NULL); + } while (ret < 0 && errno == EINTR); } } while (ret == 0); @@ -604,6 +620,8 @@ char *ssh_sftp_get_cmdline(const char *prompt, int no_fds_ok) void frontend_net_error_pending(void) {} +void platform_psftp_pre_conn_setup(void) {} + /* * Main program: do platform-specific initialisation and then call * psftp_main().