mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-05 21:42:47 -05:00
New utility function logevent_and_free.
This should make it easier to do formatted-string based logging outside ssh.c, because I can wrap up a local macro in any source file I like that expands to logevent_and_free(wherever my Frontend is, dupprintf(macro argument)). It caused yet another stub function to be needed in testbn, but there we go. (Also, while I'm here, removed a redundant declaration of logevent itself from ssh.h. The one in putty.h is all we need.)
This commit is contained in:
7
misc.h
7
misc.h
@ -31,6 +31,13 @@ char *dupprintf(const char *fmt, ...)
|
||||
char *dupvprintf(const char *fmt, va_list ap);
|
||||
void burnstr(char *string);
|
||||
|
||||
/*
|
||||
* Pass a dynamically allocated string to logevent and immediately
|
||||
* free it. Intended for use by wrapper macros which pass the return
|
||||
* value of dupprintf straight to this.
|
||||
*/
|
||||
void logevent_and_free(Frontend *frontend, char *msg);
|
||||
|
||||
struct strbuf {
|
||||
char *s;
|
||||
unsigned char *u;
|
||||
|
Reference in New Issue
Block a user