1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -05:00

Various error-handling fixes, mostly in Unix PuTTY but one (failure

to save a session) crosses over into the platform-independent side.

[originally from svn r3041]
This commit is contained in:
Simon Tatham
2003-04-01 18:10:25 +00:00
parent 09ba8ca111
commit 7706da5e17
11 changed files with 114 additions and 46 deletions

View File

@ -2337,6 +2337,13 @@ void old_keyfile_warning(void)
*/
}
void fatal_message_box(void *window, char *msg)
{
messagebox(window, "PuTTY Fatal Error", msg,
string_width("REASONABLY LONG LINE OF TEXT FOR BASIC SANITY"),
"OK", 'o', 1, 1, NULL);
}
void fatalbox(char *p, ...)
{
va_list ap;
@ -2344,23 +2351,7 @@ void fatalbox(char *p, ...)
va_start(ap, p);
msg = dupvprintf(p, ap);
va_end(ap);
messagebox(NULL, "PuTTY Fatal Error", msg,
string_width("REASONABLY LONG LINE OF TEXT FOR BASIC SANITY"),
"OK", 'o', 1, 1, NULL);
sfree(msg);
cleanup_exit(1);
}
void connection_fatal(void *frontend, char *p, ...)
{
va_list ap;
char *msg;
va_start(ap, p);
msg = dupvprintf(p, ap);
va_end(ap);
messagebox(GTK_WIDGET(get_window(frontend)),
"PuTTY Fatal Error", msg,
string_width("REASONABLY LONG LINE OF TEXT FOR BASIC SANITY"),
"OK", 'o', 1, 1, NULL);
fatal_message_box(NULL, msg);
sfree(msg);
cleanup_exit(1);
}