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

Add a nonfatal() function everywhere, to be used for reporting things

that the user really ought to know but that are not actually fatal to
continued operation of PuTTY or a single network connection.

[originally from svn r9932]
This commit is contained in:
Simon Tatham
2013-07-19 17:44:28 +00:00
parent 1d21346d4c
commit acf38797eb
10 changed files with 118 additions and 0 deletions

View File

@ -85,6 +85,24 @@ static void commonfatalbox(char *p, va_list ap)
exit(1);
}
void nonfatal(void *frontend, char *p, ...)
{
char *errorbuf;
NSAlert *alert;
va_list ap;
va_start(ap, p);
errorbuf = dupvprintf(p, ap);
va_end(ap);
alert = [[[NSAlert alloc] init] autorelease];
[alert addButtonWithTitle:@"Error"];
[alert setInformativeText:[NSString stringWithCString:errorbuf]];
[alert runModal];
sfree(errorbuf);
}
void fatalbox(char *p, ...)
{
va_list ap;