]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - psftp.c
Centralise stripslashes() and make it OS-sensitive.
[PuTTY.git] / psftp.c
diff --git a/psftp.c b/psftp.c
index 793626197d3837e6927f8076aaf7f70faa2b6646..93a96a4e152a63cc682042474a9a1c0c8d2573fc 100644 (file)
--- a/psftp.c
+++ b/psftp.c
@@ -169,35 +169,6 @@ char *canonify(const char *name)
     }
 }
 
-/*
- * Return a pointer to the portion of str that comes after the last
- * slash (or backslash or colon, if `local' is TRUE).
- *
- * 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 :-(
- */
-static char *stripslashes(const char *str, int local)
-{
-    char *p;
-
-    if (local) {
-        p = strchr(str, ':');
-        if (p) str = p+1;
-    }
-
-    p = strrchr(str, '/');
-    if (p) str = p+1;
-
-    if (local) {
-       p = strrchr(str, '\\');
-       if (p) str = p+1;
-    }
-
-    return (char *)str;
-}
-
 /*
  * qsort comparison routine for fxp_name structures. Sorts by real
  * file name.