X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/4db4f6a6d75223cb2203afbab235ef44b3f4f960..126ce23485be0c770b2e0c866c17331e3de7a5cc:/scp.c?ds=sidebyside diff --git a/scp.c b/scp.c index 5ebcfd2c..a24d62fb 100644 --- a/scp.c +++ b/scp.c @@ -234,6 +234,29 @@ void fatalbox(char *fmt, ...) cleanup_exit(1); } +void modalfatalbox(char *fmt, ...) +{ + char str[0x100]; /* Make the size big enough */ + va_list ap; + va_start(ap, fmt); + strcpy(str, "Fatal: "); + vsprintf(str + strlen(str), fmt, ap); + va_end(ap); + strcat(str, "\n"); + tell_str(stderr, str); + errs++; + + if (gui_mode) { + unsigned int msg_id = WM_RET_ERR_CNT; + if (list) + msg_id = WM_LS_RET_ERR_CNT; + while (!PostMessage + ((HWND) atoi(gui_hwnd), msg_id, (WPARAM) errs, + 0 /*lParam */ ))SleepEx(1000, TRUE); + } + + cleanup_exit(1); +} void connection_fatal(char *fmt, ...) { char str[0x100]; /* Make the size big enough */