]> asedeno.scripts.mit.edu Git - PuTTY_svn.git/blobdiff - pscp.c
Enable xterm mouse reporting of wheel actions in GTK.
[PuTTY_svn.git] / pscp.c
diff --git a/pscp.c b/pscp.c
index 32099323419ac35a7d46ecfed695f47059a0611b..f63e6b5986538acfe18ecdbd80281ea800d812f9 100644 (file)
--- a/pscp.c
+++ b/pscp.c
@@ -370,15 +370,9 @@ static void do_cmd(char *host, char *user, char *cmd)
        bump("Empty host name");
 
     /*
-     * Remove fiddly bits of address: remove a colon suffix, and
-     * the square brackets around an IPv6 literal address.
+     * Remove a colon suffix.
      */
-    if (host[0] == '[') {
-       host++;
-       host[strcspn(host, "]")] = '\0';
-    } else {
-       host[strcspn(host, ":")] = '\0';
-    }
+    host[host_strcspn(host, ":")] = '\0';
 
     /*
      * If we haven't loaded session details already (e.g., from -load),
@@ -613,17 +607,7 @@ static char *colon(char *str)
     if (str[0] == '\0' || str[0] == ':' ||
         (str[0] != '[' && str[1] == ':'))
        return (NULL);
-    while (*str != '\0' && *str != ':' && *str != '/' && *str != '\\') {
-       if (*str == '[') {
-           /* Skip over IPv6 literal addresses
-            * (eg: 'jeroen@[2001:db8::1]:myfile.txt') */
-           char *ipv6_end = strchr(str, ']');
-           if (ipv6_end) {
-               str = ipv6_end;
-           }
-       }
-       str++;
-    }
+    str += host_strcspn(str, ":/\\");
     if (*str == ':')
        return (str);
     else
@@ -2307,6 +2291,9 @@ void cmdline_error(char *p, ...)
     exit(1);
 }
 
+const int share_can_be_downstream = TRUE;
+const int share_can_be_upstream = FALSE;
+
 /*
  * Main program. (Called `psftp_main' because it gets called from
  * *sftp.c; bit silly, I know, but it had to be called _something_.)