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

Expose the Ldisc structure tag throughout the code.

That's one fewer anonymous 'void *' which might be accidentally
confused with some other pointer type if I misremember the order of
function arguments.

While I'm here, I've made its pointer-nature explicit - that is,
'Ldisc' is now a typedef for the structure type itself rather than a
pointer to it. A stylistic change only, but it feels more natural to
me these days for a thing you're going to eventually pass to a 'free'
function.
This commit is contained in:
Simon Tatham
2018-09-11 15:02:59 +01:00
parent 566d4826f4
commit e72e8ebe59
19 changed files with 43 additions and 49 deletions

View File

@ -158,7 +158,7 @@ struct gui_data {
char *wintitle;
char *icontitle;
int master_fd, master_func_id;
void *ldisc;
Ldisc *ldisc;
Backend *back;
void *backhandle;
Terminal *term;

View File

@ -1206,7 +1206,7 @@ static int pty_ldisc(void *handle, int option)
return 0; /* neither editing nor echoing */
}
static void pty_provide_ldisc(void *handle, void *ldisc)
static void pty_provide_ldisc(void *handle, Ldisc *ldisc)
{
/* Pty pty = (Pty)handle; */
/* This is a stub. */

View File

@ -544,7 +544,7 @@ static int serial_ldisc(void *handle, int option)
return 0;
}
static void serial_provide_ldisc(void *handle, void *ldisc)
static void serial_provide_ldisc(void *handle, Ldisc *ldisc)
{
/* This is a stub. */
}