X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=psftp.h;h=57a821ab19da7522c773a19792423662a4f132b6;hb=031a65e44d5eb18ce5f1467ce434e2f24ae0a491;hp=b3022d56068339d81f93a798b0f188a441165f7c;hpb=b266d671acee34f9305950bfd87054b3b7fcded6;p=PuTTY.git diff --git a/psftp.h b/psftp.h index b3022d56..57a821ab 100644 --- a/psftp.h +++ b/psftp.h @@ -177,4 +177,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 */