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:
@ -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;
|
||||
|
Reference in New Issue
Block a user