Add a "Config *" argument to term_init(), and use that instead of the global
[u/mdw/putty] / window.c
index 9fa45ba..4bfec69 100644 (file)
--- a/window.c
+++ b/window.c
@@ -406,6 +406,8 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
                        cfg.host[sizeof(cfg.host) - 1] = '\0';
                        got_host = 1;
                    }
+               } else {
+                   cmdline_error("unknown option \"%s\"", p);
                }
            }
        }
@@ -504,7 +506,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
 
     hwnd = NULL;
 
-    term = term_init(NULL);
+    term = term_init(&cfg, NULL);
     logctx = log_init(NULL);
     term_provide_logctx(term, logctx);