Turn 'Filename' into a dynamically allocated type with no arbitrary
[u/mdw/putty] / windows / window.c
index b71f0bb..fabf96e 100644 (file)
@@ -445,7 +445,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
            HANDLE filemap;
            void *cp;
            unsigned cpsize;
-           if (sscanf(p + 1, "%p:%u", &filemap, &cpsize) == 1 &&
+           if (sscanf(p + 1, "%p:%u", &filemap, &cpsize) == 2 &&
                (cp = MapViewOfFile(filemap, FILE_MAP_READ,
                                    0, 0, cpsize)) != NULL) {
                conf_deserialise(conf, cp, cpsize);
@@ -2315,7 +2315,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
                {
                    FontSpec *font = conf_get_fontspec(conf, CONF_font);
                    FontSpec *prev_font = conf_get_fontspec(prev_conf,
-                                                           CONF_font);
+                                                             CONF_font);
 
                    if (!strcmp(font->name, prev_font->name) ||
                        !strcmp(conf_get_str(conf, CONF_line_codepage),
@@ -5612,6 +5612,11 @@ int from_backend_untrusted(void *frontend, const char *data, int len)
     return term_data_untrusted(term, data, len);
 }
 
+int from_backend_eof(void *frontend)
+{
+    return TRUE;   /* do respond to incoming EOF with outgoing */
+}
+
 int get_userpass_input(prompts_t *p, unsigned char *in, int inlen)
 {
     int ret;