mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 20:12:48 -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:
@ -30,11 +30,11 @@ void cleanup_exit(int code)
|
||||
exit(code);
|
||||
}
|
||||
|
||||
void set_busy_status(void *frontend, int status)
|
||||
void set_busy_status(Frontend *frontend, int status)
|
||||
{
|
||||
}
|
||||
|
||||
void notify_remote_exit(void *frontend)
|
||||
void notify_remote_exit(Frontend *frontend)
|
||||
{
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ void timer_change_notify(unsigned long next)
|
||||
{
|
||||
}
|
||||
|
||||
int verify_ssh_host_key(void *frontend, char *host, int port,
|
||||
int verify_ssh_host_key(Frontend *frontend, char *host, int port,
|
||||
const char *keytype, char *keystr, char *fingerprint,
|
||||
void (*callback)(void *ctx, int result), void *ctx)
|
||||
{
|
||||
@ -147,7 +147,7 @@ int verify_ssh_host_key(void *frontend, char *host, int port,
|
||||
}
|
||||
}
|
||||
|
||||
void update_specials_menu(void *frontend)
|
||||
void update_specials_menu(Frontend *frontend)
|
||||
{
|
||||
}
|
||||
|
||||
@ -155,7 +155,7 @@ void update_specials_menu(void *frontend)
|
||||
* Ask whether the selected algorithm is acceptable (since it was
|
||||
* below the configured 'warn' threshold).
|
||||
*/
|
||||
int askalg(void *frontend, const char *algtype, const char *algname,
|
||||
int askalg(Frontend *frontend, const char *algtype, const char *algname,
|
||||
void (*callback)(void *ctx, int result), void *ctx)
|
||||
{
|
||||
HANDLE hin;
|
||||
@ -196,7 +196,7 @@ int askalg(void *frontend, const char *algtype, const char *algname,
|
||||
}
|
||||
}
|
||||
|
||||
int askhk(void *frontend, const char *algname, const char *betteralgs,
|
||||
int askhk(Frontend *frontend, const char *algname, const char *betteralgs,
|
||||
void (*callback)(void *ctx, int result), void *ctx)
|
||||
{
|
||||
HANDLE hin;
|
||||
@ -247,7 +247,7 @@ int askhk(void *frontend, const char *algname, const char *betteralgs,
|
||||
* Ask whether to wipe a session log file before writing to it.
|
||||
* Returns 2 for wipe, 1 for append, 0 for cancel (don't log).
|
||||
*/
|
||||
int askappend(void *frontend, Filename *filename,
|
||||
int askappend(Frontend *frontend, Filename *filename,
|
||||
void (*callback)(void *ctx, int result), void *ctx)
|
||||
{
|
||||
HANDLE hin;
|
||||
@ -340,7 +340,7 @@ void console_provide_logctx(LogContext *logctx)
|
||||
console_logctx = logctx;
|
||||
}
|
||||
|
||||
void logevent(void *frontend, const char *string)
|
||||
void logevent(Frontend *frontend, const char *string)
|
||||
{
|
||||
log_eventlog(console_logctx, string);
|
||||
}
|
||||
@ -467,7 +467,7 @@ int console_get_userpass_input(prompts_t *p)
|
||||
return 1; /* success */
|
||||
}
|
||||
|
||||
void frontend_keypress(void *handle)
|
||||
void frontend_keypress(Frontend *frontend)
|
||||
{
|
||||
/*
|
||||
* This is nothing but a stub, in console code.
|
||||
|
Reference in New Issue
Block a user