1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -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

16
putty.h
View File

@ -461,7 +461,7 @@ struct backend_tag {
* may be lost. */
int (*sendok) (void *handle);
int (*ldisc) (void *handle, int);
void (*provide_ldisc) (void *handle, void *ldisc);
void (*provide_ldisc) (void *handle, Ldisc *ldisc);
void (*provide_logctx) (void *handle, void *logctx);
/*
* back->unthrottle() tells the back end that the front end
@ -1174,18 +1174,18 @@ extern Backend ssh_backend;
/*
* Exports from ldisc.c.
*/
void *ldisc_create(Conf *, Terminal *, Backend *, void *, void *);
void ldisc_configure(void *, Conf *);
void ldisc_free(void *);
void ldisc_send(void *handle, const void *buf, int len, int interactive);
void ldisc_echoedit_update(void *handle);
Ldisc *ldisc_create(Conf *, Terminal *, Backend *, void *, void *);
void ldisc_configure(Ldisc *, Conf *);
void ldisc_free(Ldisc *);
void ldisc_send(Ldisc *, const void *buf, int len, int interactive);
void ldisc_echoedit_update(Ldisc *);
/*
* Exports from ldiscucs.c.
*/
void lpage_send(void *, int codepage, const char *buf, int len,
void lpage_send(Ldisc *, int codepage, const char *buf, int len,
int interactive);
void luni_send(void *, const wchar_t * widebuf, int len, int interactive);
void luni_send(Ldisc *, const wchar_t * widebuf, int len, int interactive);
/*
* Exports from sshrand.c.