X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=puttygen.c;fp=puttygen.c;h=4be822ac63febf95b3342c8c3127f3618922f9a6;hb=6d0e9b205d15b2615ae2b95784e4316d4490f86b;hp=4e2098e2edcf0c4be1313c9a48c55f675f73ecc1;hpb=268213483c8ada20e5e2bc83ec887766a9da4bad;p=PuTTY.git 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 :-) */