1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-18 03:20:59 -05:00

Introduce a typedef for frontend handles.

This is another major source of unexplained 'void *' parameters
throughout the code.

In particular, the currently unused testback.c actually gave the wrong
pointer type to its internal store of the frontend handle - it cast
the input void * to a Terminal *, from which it got implicitly cast
back again when calling from_backend, and nobody noticed. Now it uses
the right type internally as well as externally.
This commit is contained in:
Simon Tatham
2018-09-12 09:10:51 +01:00
parent eefebaaa9e
commit 8dfb2a1186
40 changed files with 357 additions and 406 deletions

View File

@ -17,7 +17,7 @@ struct LogContext_tag {
enum { L_CLOSED, L_OPENING, L_OPEN, L_ERROR } state;
bufchain queue;
Filename *currlogfilename;
void *frontend;
Frontend *frontend;
Conf *conf;
int logtype; /* cached out of conf */
};
@ -367,7 +367,7 @@ void log_packet(LogContext *ctx, int direction, int type,
logflush(ctx);
}
LogContext *log_init(void *frontend, Conf *conf)
LogContext *log_init(Frontend *frontend, Conf *conf)
{
LogContext *ctx = snew(LogContext);
ctx->lgfp = NULL;