X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/b51259f6a879f69bec5348bddb604d9b3d499941..799dfcfab944cd604ee0850f37e0dcb07f02d84d:/unix/uxsftp.c diff --git a/unix/uxsftp.c b/unix/uxsftp.c index e9c9f6e6..d1989f83 100644 --- a/unix/uxsftp.c +++ b/unix/uxsftp.c @@ -1,12 +1,11 @@ /* - * uxsftp.c: the Unix-specific parts of PSFTP. + * uxsftp.c: the Unix-specific parts of PSFTP and PSCP. */ #include #include #include #include -#include #include "putty.h" #include "psftp.h" @@ -34,45 +33,6 @@ void platform_get_x11_auth(char *display, int *protocol, */ char *platform_default_s(const char *name) { - if (!strcmp(name, "UserName")) { - /* - * Remote login username will default to the local username. - */ - struct passwd *p; - uid_t uid = getuid(); - char *user, *ret = NULL; - - /* - * First, find who we think we are using getlogin. If this - * agrees with our uid, we'll go along with it. This should - * allow sharing of uids between several login names whilst - * coping correctly with people who have su'ed. - */ - user = getlogin(); - setpwent(); - if (user) - p = getpwnam(user); - else - p = NULL; - if (p && p->pw_uid == uid) { - /* - * The result of getlogin() really does correspond to - * our uid. Fine. - */ - ret = user; - } else { - /* - * If that didn't work, for whatever reason, we'll do - * the simpler version: look up our uid in the password - * file and map it straight to a name. - */ - p = getpwuid(uid); - ret = p->pw_name; - } - endpwent(); - - return ret; - } return NULL; } @@ -99,6 +59,18 @@ Filename platform_default_filename(const char *name) } /* + * Stubs for the GUI feedback mechanism in Windows PSCP. + */ +void gui_update_stats(char *name, unsigned long size, + int percentage, unsigned long elapsed, + unsigned long done, unsigned long eta, + unsigned long ratebs) {} +void gui_send_errcount(int list, int errs) {} +void gui_send_char(int is_stderr, int c) {} +void gui_enable(char *arg) {} + + +/* * Set local current directory. Returns NULL on success, or else an * error message which must be freed after printing. */