]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - psftp.h
Centralise stripslashes() and make it OS-sensitive.
[PuTTY.git] / psftp.h
diff --git a/psftp.h b/psftp.h
index b3022d56068339d81f93a798b0f188a441165f7c..57a821ab19da7522c773a19792423662a4f132b6 100644 (file)
--- 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 */