X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/8fd3bdc4ee9fe7d3036a36b70affe273008024e2..1709795fee167cc2d2d423df0161e7963376b910:/puttygen.c diff --git a/puttygen.c b/puttygen.c index 4e2098e2..4be822ac 100644 --- a/puttygen.c +++ b/puttygen.c @@ -22,6 +22,22 @@ static int requested_help; static char *cmdline_keyfile = NULL; +/* + * Print a modal (Really Bad) message box and perform a fatal exit. + */ +void modalfatalbox(char *fmt, ...) +{ + va_list ap; + char stuff[200]; + + va_start(ap, fmt); + vsprintf(stuff, fmt, ap); + va_end(ap); + MessageBox(NULL, stuff, "PuTTYgen Fatal Error", + MB_SYSTEMMODAL | MB_ICONERROR | MB_OK); + exit(1); +} + /* ---------------------------------------------------------------------- * Progress report code. This is really horrible :-) */