Added a fourth application: plink, a command line connection utility
[u/mdw/putty] / window.c
index 5acddc7..408a9b6 100644 (file)
--- a/window.c
+++ b/window.c
@@ -89,6 +89,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) {
     int guess_width, guess_height;
 
     putty_inst = inst;
+    flags = FLAG_VERBOSE | FLAG_WINDOWED | FLAG_CONNECTION;
 
     winsock_ver = MAKEWORD(1, 1);
     if (WSAStartup(winsock_ver, &wsadata)) {
@@ -174,14 +175,16 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) {
        } else if (*p) {
            char *q = p;
             /*
-             * If the hostname starts with "telnet://", set the
+             * If the hostname starts with "telnet:", set the
              * protocol to Telnet and process the string as a
              * Telnet URL.
              */
-            if (!strncmp(q, "telnet://", 9)) {
+            if (!strncmp(q, "telnet:", 7)) {
                 char c;
 
-                q += 9;
+                q += 7;
+               if (q[0] == '/' && q[1] == '/')
+                   q += 2;
                 cfg.protocol = PROT_TELNET;
                 p = q;
                 while (*p && *p != ':' && *p != '/') p++;