mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 01:18:00 +00:00
4249b39ed3
This is like the seat-independent nonfatal(), but specifies a Seat, which allows the GUI dialog box to have the right terminal window as its parent (if there are multiple ones). Changed over all the nonfatal() calls in the code base that could be localised to a Seat, which means all the ones that come up if something goes horribly wrong in host key storage. To make that possible, I've added a 'seat' parameter to store_host_key(); it turns out that all its call sites had one available already.
20 lines
334 B
C
20 lines
334 B
C
/*
|
|
* Wrapper function for the nonfatal() method of a Seat,
|
|
* providing printf-style formatting.
|
|
*/
|
|
|
|
#include "putty.h"
|
|
|
|
void seat_nonfatal(Seat *seat, const char *fmt, ...)
|
|
{
|
|
va_list ap;
|
|
char *msg;
|
|
|
|
va_start(ap, fmt);
|
|
msg = dupvprintf(fmt, ap);
|
|
va_end(ap);
|
|
|
|
seat->vt->nonfatal(seat, msg);
|
|
sfree(msg);
|
|
}
|