X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=psftp.h;h=3696548987bbbd3426a48de34fa6984fc6706e3d;hb=50965a6411b8da9301501e91262bfe6cf8c808ae;hp=b3022d56068339d81f93a798b0f188a441165f7c;hpb=9e20c81bc9c945565dd182854eeffa03b63f830a;p=PuTTY.git diff --git a/psftp.h b/psftp.h index b3022d56..36965489 100644 --- a/psftp.h +++ b/psftp.h @@ -47,6 +47,12 @@ int ssh_sftp_loop_iteration(void); */ char *ssh_sftp_get_cmdline(const char *prompt, int backend_required); +/* + * Platform-specific function called when we're about to make a + * network connection. + */ +void platform_psftp_pre_conn_setup(void); + /* * The main program in psftp.c. Called from main() in the platform- * specific code, after doing any platform-specific initialisation. @@ -177,4 +183,21 @@ int create_directory(const char *name); */ char *dir_file_cat(const char *dir, const char *file); +/* + * Return a pointer to the portion of str that comes after the last + * path component separator. + * + * If 'local' is false, path component separators are taken to just be + * '/', on the assumption that we're discussing the path syntax on the + * server. But if 'local' is true, the separators are whatever the + * local OS will treat that way - so that includes '\' and ':' on + * Windows. + * + * This function has the annoying strstr() property of taking a const + * char * and returning a char *. You should treat it as if it was a + * pair of overloaded functions, one mapping mutable->mutable and the + * other const->const :-( + */ +char *stripslashes(const char *str, int local); + #endif /* PUTTY_PSFTP_H */