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

Name vtable structure types more consistently.

Now they're all called FooVtable, instead of a mixture of that and
Foo_vtable.
This commit is contained in:
Simon Tatham
2018-10-05 07:03:46 +01:00
parent e0130a48ca
commit b798230844
44 changed files with 109 additions and 109 deletions

View File

@ -67,9 +67,9 @@ typedef void (*fontsel_add_entry)(void *ctx, const char *realfontname,
const char *family, const char *charset,
const char *style, const char *stylekey,
int size, int flags,
const struct unifont_vtable *fontclass);
const struct UnifontVtable *fontclass);
struct unifont_vtable {
struct UnifontVtable {
/*
* `Methods' of the `class'.
*/
@ -213,7 +213,7 @@ struct x11font {
unifont u;
};
static const struct unifont_vtable x11font_vtable = {
static const struct UnifontVtable x11font_vtable = {
x11font_create,
NULL, /* no fallback fonts in X11 */
x11font_destroy,
@ -1347,7 +1347,7 @@ struct pangofont {
struct unifont u;
};
static const struct unifont_vtable pangofont_vtable = {
static const struct UnifontVtable pangofont_vtable = {
pangofont_create,
pangofont_create_fallback,
pangofont_destroy,
@ -2057,7 +2057,7 @@ static char *pangofont_size_increment(unifont *font, int increment)
*
* The 'multifont' subclass is omitted here, as discussed above.
*/
static const struct unifont_vtable *unifont_types[] = {
static const struct UnifontVtable *unifont_types[] = {
#if GTK_CHECK_VERSION(2,0,0)
&pangofont_vtable,
#endif
@ -2183,7 +2183,7 @@ struct multifont {
struct unifont u;
};
static const struct unifont_vtable multifont_vtable = {
static const struct UnifontVtable multifont_vtable = {
NULL, /* creation is done specially */
NULL,
multifont_destroy,
@ -2363,7 +2363,7 @@ struct fontinfo {
/*
* The class of font.
*/
const struct unifont_vtable *fontclass;
const struct UnifontVtable *fontclass;
};
struct fontinfo_realname_find {
@ -2966,7 +2966,7 @@ static void unifontsel_add_entry(void *ctx, const char *realfontname,
const char *family, const char *charset,
const char *style, const char *stylekey,
int size, int flags,
const struct unifont_vtable *fontclass)
const struct UnifontVtable *fontclass)
{
unifontsel_internal *fs = (unifontsel_internal *)ctx;
fontinfo *info;

View File

@ -49,9 +49,9 @@
/*
* Exports from gtkfont.c.
*/
struct unifont_vtable; /* contents internal to gtkfont.c */
struct UnifontVtable; /* contents internal to gtkfont.c */
typedef struct unifont {
const struct unifont_vtable *vt;
const struct UnifontVtable *vt;
/*
* `Non-static data members' of the `class', accessible to
* external code.

View File

@ -5001,7 +5001,7 @@ void update_specials_menu(Frontend *inst)
static void start_backend(Frontend *inst)
{
const struct Backend_vtable *vt;
const struct BackendVtable *vt;
char *realhost;
const char *error;
char *s;

View File

@ -67,7 +67,7 @@ struct FontSpec *fontspec_new(const char *name);
typedef struct draw_ctx *Context;
extern const struct Backend_vtable pty_backend;
extern const struct BackendVtable pty_backend;
#define BROKEN_PIPE_ERROR_CODE EPIPE /* used in sshshare.c */
@ -178,7 +178,7 @@ void window_setup_error(const char *errmsg);
GtkWidget *make_gtk_toplevel_window(Frontend *frontend);
#endif
const struct Backend_vtable *select_backend(Conf *conf);
const struct BackendVtable *select_backend(Conf *conf);
/* Defined in gtkcomm.c */
void gtkcomm_setup(void);
@ -328,7 +328,7 @@ void *sk_getxdmdata(Socket *sock, int *lenp);
/*
* Exports from uxser.c.
*/
extern const struct Backend_vtable serial_backend;
extern const struct BackendVtable serial_backend;
/*
* uxpeer.c, wrapping getsockopt(SO_PEERCRED).

View File

@ -89,7 +89,7 @@ struct NetSocket {
*/
NetSocket *parent, *child;
const Socket_vtable *sockvt;
const SocketVtable *sockvt;
};
struct SockAddr {
@ -507,7 +507,7 @@ static void sk_net_set_frozen(Socket *s, int is_frozen);
static char *sk_net_peer_info(Socket *s);
static const char *sk_net_socket_error(Socket *s);
static struct Socket_vtable NetSocket_sockvt = {
static struct SocketVtable NetSocket_sockvt = {
sk_net_plug,
sk_net_close,
sk_net_write,

View File

@ -176,7 +176,7 @@ static void x11_closing(Plug *plug, const char *error_msg, int error_code,
time_to_die = TRUE;
}
struct X11Connection {
const Plug_vtable *plugvt;
const PlugVtable *plugvt;
};
char *socketname;
@ -728,7 +728,7 @@ void run_client(void)
exit(1);
}
static const Plug_vtable X11Connection_plugvt = {
static const PlugVtable X11Connection_plugvt = {
x11_log,
x11_closing,
x11_receive,

View File

@ -595,7 +595,7 @@ int main(int argc, char **argv)
int just_test_share_exists = FALSE;
unsigned long now;
struct winsize size;
const struct Backend_vtable *backvt;
const struct BackendVtable *backvt;
fdlist = NULL;
fdcount = fdsize = 0;
@ -633,7 +633,7 @@ int main(int argc, char **argv)
*/
char *p = getenv("PLINK_PROTOCOL");
if (p) {
const struct Backend_vtable *vt = backend_vt_from_name(p);
const struct BackendVtable *vt = backend_vt_from_name(p);
if (vt) {
default_protocol = vt->protocol;
default_port = vt->default_port;

View File

@ -29,7 +29,7 @@ typedef struct LocalProxySocket {
int pending_error;
const Socket_vtable *sockvt;
const SocketVtable *sockvt;
} LocalProxySocket;
static void localproxy_select_result(int fd, int event);
@ -303,7 +303,7 @@ static void localproxy_select_result(int fd, int event)
}
}
static const Socket_vtable LocalProxySocket_sockvt = {
static const SocketVtable LocalProxySocket_sockvt = {
sk_localproxy_plug,
sk_localproxy_close,
sk_localproxy_write,

View File

@ -13,7 +13,7 @@ const int new_session = 0, saved_sessions = 0; /* or these */
const int dup_check_launchable = 0; /* no need to check host name in conf */
const int use_pty_argv = TRUE;
const struct Backend_vtable *select_backend(Conf *conf)
const struct BackendVtable *select_backend(Conf *conf)
{
return &pty_backend;
}

View File

@ -1240,7 +1240,7 @@ static int pty_cfg_info(Backend *be)
return 0;
}
const struct Backend_vtable pty_backend = {
const struct BackendVtable pty_backend = {
pty_init,
pty_free,
pty_reconfig,

View File

@ -37,9 +37,9 @@ void cleanup_exit(int code)
exit(code);
}
const struct Backend_vtable *select_backend(Conf *conf)
const struct BackendVtable *select_backend(Conf *conf)
{
const struct Backend_vtable *vt =
const struct BackendVtable *vt =
backend_vt_from_proto(conf_get_int(conf, CONF_protocol));
assert(vt != NULL);
return vt;
@ -84,7 +84,7 @@ void setup(int single)
default_protocol = be_default_protocol;
/* Find the appropriate default port. */
{
const struct Backend_vtable *vt =
const struct BackendVtable *vt =
backend_vt_from_proto(default_protocol);
default_port = 0; /* illegal */
if (vt)

View File

@ -575,7 +575,7 @@ static int serial_cfg_info(Backend *be)
return 0;
}
const struct Backend_vtable serial_backend = {
const struct BackendVtable serial_backend = {
serial_init,
serial_free,
serial_reconfig,