X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=psftp.h;h=6f46bdcd3c9aef4fe6964ff84d237ce98ffc0587;hb=19467455fe7840ab146f47136c88f61c87365e8c;hp=b3022d56068339d81f93a798b0f188a441165f7c;hpb=89da2ddf564a93414ee9ab2df3f053608094e417;p=PuTTY.git diff --git a/psftp.h b/psftp.h index b3022d56..6f46bdcd 100644 --- a/psftp.h +++ b/psftp.h @@ -47,6 +47,13 @@ int ssh_sftp_loop_iteration(void); */ char *ssh_sftp_get_cmdline(const char *prompt, int backend_required); +/* + * Platform-specific function called after the command line has been + * processed, so that any per-platform initialisation such as process + * ACL setup can be done. + */ +void platform_psftp_post_option_setup(void); + /* * The main program in psftp.c. Called from main() in the platform- * specific code, after doing any platform-specific initialisation. @@ -177,4 +184,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 */