1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 11:32:48 -05:00

Make 'LogContext' a typedef visible throughout the code.

Same principle again - the more of these structures have globally
visible tags (even if the structure contents are still opaque in most
places), the fewer of them I can mistake for each other.
This commit is contained in:
Simon Tatham
2018-09-11 15:17:16 +01:00
parent e72e8ebe59
commit 3814a5cee8
23 changed files with 51 additions and 58 deletions

View File

@ -162,7 +162,7 @@ struct gui_data {
Backend *back;
void *backhandle;
Terminal *term;
void *logctx;
LogContext *logctx;
int exited;
struct unicode_data ucsdata;
Conf *conf;

View File

@ -405,7 +405,7 @@ void old_keyfile_warning(void)
postmsg(&cf);
}
void console_provide_logctx(void *logctx)
void console_provide_logctx(LogContext *logctx)
{
console_logctx = logctx;
}

View File

@ -92,7 +92,7 @@ int platform_default_i(const char *name, int def) { return def; }
FontSpec *platform_default_fontspec(const char *name) { return fontspec_new(""); }
Filename *platform_default_filename(const char *name) { return filename_from_str(""); }
char *x_get_default(const char *key) { return NULL; }
void log_eventlog(void *handle, const char *event) {}
void log_eventlog(LogContext *logctx, const char *event) {}
int from_backend(void *frontend, int is_stderr, const void *data, int datalen)
{ assert(!"only here to satisfy notional call from backend_socket_log"); }

View File

@ -25,7 +25,7 @@
#define MAX_STDIN_BACKLOG 4096
static void *logctx;
static LogContext *logctx;
static struct termios orig_termios;

View File

@ -1212,7 +1212,7 @@ static void pty_provide_ldisc(void *handle, Ldisc *ldisc)
/* This is a stub. */
}
static void pty_provide_logctx(void *handle, void *logctx)
static void pty_provide_logctx(void *handle, LogContext *logctx)
{
/* Pty pty = (Pty)handle; */
/* This is a stub. */

View File

@ -549,7 +549,7 @@ static void serial_provide_ldisc(void *handle, Ldisc *ldisc)
/* This is a stub. */
}
static void serial_provide_logctx(void *handle, void *logctx)
static void serial_provide_logctx(void *handle, LogContext *logctx)
{
/* This is a stub. */
}