X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/8a9977e54db756281cf0d9f4a8322ce24b001a61..4a693cfc5c3ee0e639bbee0215345e921715ab04:/misc.c diff --git a/misc.c b/misc.c index fbfc34f2..cf97c049 100644 --- a/misc.c +++ b/misc.c @@ -605,7 +605,7 @@ void debug_memdump(void *buf, int len, int L) if (L) { int delta; debug_printf("\t%d (0x%x) bytes:\n", len, len); - delta = 15 & (int) p; + delta = 15 & (unsigned long int) p; p -= delta; len += delta; } @@ -635,21 +635,21 @@ void debug_memdump(void *buf, int len, int L) #endif /* def DEBUG */ /* - * Determine whether or not a Config structure represents a session - * which can sensibly be launched right now. + * Determine whether or not a Conf represents a session which can + * sensibly be launched right now. */ -int cfg_launchable(const Config *cfg) +int conf_launchable(Conf *conf) { - if (cfg->protocol == PROT_SERIAL) - return cfg->serline[0] != 0; + if (conf_get_int(conf, CONF_protocol) == PROT_SERIAL) + return conf_get_str(conf, CONF_serline)[0] != 0; else - return cfg->host[0] != 0; + return conf_get_str(conf, CONF_host)[0] != 0; } -char const *cfg_dest(const Config *cfg) +char const *conf_dest(Conf *conf) { - if (cfg->protocol == PROT_SERIAL) - return cfg->serline; + if (conf_get_int(conf, CONF_protocol) == PROT_SERIAL) + return conf_get_str(conf, CONF_serline); else - return cfg->host; + return conf_get_str(conf, CONF_host); }