mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Formatting: realign run-on parenthesised stuff.
My bulk indentation check also turned up a lot of cases where a run-on function call or if statement didn't have its later lines aligned correctly relative to the open paren. I think this is quite easy to do by getting things out of sync (editing the first line of the function call and forgetting to update the rest, perhaps even because you never _saw_ the rest during a search-replace). But a few didn't quite fit into that pattern, in particular an outright misleading case in unix/askpass.c where the second line of a call was aligned neatly below the _wrong_ one of the open parens on the opening line. Restored as many alignments as I could easily find.
This commit is contained in:
parent
3a42a09dad
commit
4fa3480444
24
config.c
24
config.c
@ -602,7 +602,7 @@ static void kexlist_handler(dlgcontrol *ctrl, dlgparam *dlg,
|
||||
}
|
||||
|
||||
static void hklist_handler(dlgcontrol *ctrl, dlgparam *dlg,
|
||||
void *data, int event)
|
||||
void *data, int event)
|
||||
{
|
||||
Conf *conf = (Conf *)data;
|
||||
if (event == EVENT_REFRESH) {
|
||||
@ -1990,11 +1990,11 @@ void setup_config_box(struct controlbox *b, bool midsession,
|
||||
"Always append to the end of it", I(LGXF_APN),
|
||||
"Ask the user every time", I(LGXF_ASK));
|
||||
ctrl_checkbox(s, "Flush log file frequently", 'u',
|
||||
HELPCTX(logging_flush),
|
||||
conf_checkbox_handler, I(CONF_logflush));
|
||||
HELPCTX(logging_flush),
|
||||
conf_checkbox_handler, I(CONF_logflush));
|
||||
ctrl_checkbox(s, "Include header", 'i',
|
||||
HELPCTX(logging_header),
|
||||
conf_checkbox_handler, I(CONF_logheader));
|
||||
HELPCTX(logging_header),
|
||||
conf_checkbox_handler, I(CONF_logheader));
|
||||
|
||||
if ((midsession && protocol == PROT_SSH) ||
|
||||
(!midsession && backend_vt_from_proto(PROT_SSH))) {
|
||||
@ -2476,14 +2476,14 @@ void setup_config_box(struct controlbox *b, bool midsession,
|
||||
I(CONF_tcp_keepalives));
|
||||
#ifndef NO_IPV6
|
||||
s = ctrl_getset(b, "Connection", "ipversion",
|
||||
"Internet protocol version");
|
||||
"Internet protocol version");
|
||||
ctrl_radiobuttons(s, NULL, NO_SHORTCUT, 3,
|
||||
HELPCTX(connection_ipversion),
|
||||
conf_radiobutton_handler,
|
||||
I(CONF_addressfamily),
|
||||
"Auto", 'u', I(ADDRTYPE_UNSPEC),
|
||||
"IPv4", '4', I(ADDRTYPE_IPV4),
|
||||
"IPv6", '6', I(ADDRTYPE_IPV6));
|
||||
HELPCTX(connection_ipversion),
|
||||
conf_radiobutton_handler,
|
||||
I(CONF_addressfamily),
|
||||
"Auto", 'u', I(ADDRTYPE_UNSPEC),
|
||||
"IPv4", '4', I(ADDRTYPE_IPV4),
|
||||
"IPv6", '6', I(ADDRTYPE_IPV6));
|
||||
#endif
|
||||
|
||||
{
|
||||
|
@ -211,7 +211,7 @@ static void aes_neon_setkey(ssh_cipher *ciph, const void *vkey)
|
||||
const unsigned char *key = (const unsigned char *)vkey;
|
||||
|
||||
aes_neon_key_expand(key, ctx->ciph.vt->real_keybits / 32,
|
||||
ctx->keysched_e, ctx->keysched_d);
|
||||
ctx->keysched_e, ctx->keysched_d);
|
||||
}
|
||||
|
||||
static void aes_neon_setiv_cbc(ssh_cipher *ciph, const void *iv)
|
||||
|
@ -296,7 +296,7 @@ static inline uint32_t des_S(uint32_t si6420, uint32_t si7531)
|
||||
s73 ^= c73 & t->t73; c73 += 0x00080008;
|
||||
}
|
||||
debug("S out: s40=%08"PRIx32" s62=%08"PRIx32
|
||||
" s51=%08"PRIx32" s73=%08"PRIx32"\n", s40, s62, s51, s73);
|
||||
" s51=%08"PRIx32" s73=%08"PRIx32"\n", s40, s62, s51, s73);
|
||||
|
||||
/* Final selection within each pair */
|
||||
s40 ^= (s40 << 4) & ((0xf000/0x004) * (c40 & 0x00040004));
|
||||
|
@ -341,8 +341,8 @@ static int dsa_pubkey_bits(const ssh_keyalg *self, ptrlen pub)
|
||||
}
|
||||
|
||||
mp_int *dsa_gen_k(const char *id_string, mp_int *modulus,
|
||||
mp_int *private_key,
|
||||
unsigned char *digest, int digest_len)
|
||||
mp_int *private_key,
|
||||
unsigned char *digest, int digest_len)
|
||||
{
|
||||
/*
|
||||
* The basic DSA signing algorithm is:
|
||||
|
@ -1705,7 +1705,7 @@ const ssh_kexes ssh_ecdh_kex = { lenof(ec_kex_list), ec_kex_list };
|
||||
*/
|
||||
|
||||
const ssh_keyalg *ec_alg_by_oid(int len, const void *oid,
|
||||
const struct ec_curve **curve)
|
||||
const struct ec_curve **curve)
|
||||
{
|
||||
static const ssh_keyalg *algs_with_oid[] = {
|
||||
&ssh_ecdsa_nistp256,
|
||||
|
@ -472,7 +472,7 @@ void ntru_bias(uint16_t *out, const uint16_t *in, unsigned bias,
|
||||
* Given an array of values mod q, multiply each one by a constant.
|
||||
*/
|
||||
void ntru_scale(uint16_t *out, const uint16_t *in, uint16_t scale,
|
||||
unsigned p, unsigned q)
|
||||
unsigned p, unsigned q)
|
||||
{
|
||||
SETUP;
|
||||
for (unsigned i = 0; i < p; i++)
|
||||
|
@ -548,7 +548,7 @@ static void rsa2_private_blob(ssh_key *key, BinarySink *bs)
|
||||
}
|
||||
|
||||
static ssh_key *rsa2_new_priv(const ssh_keyalg *self,
|
||||
ptrlen pub, ptrlen priv)
|
||||
ptrlen pub, ptrlen priv)
|
||||
{
|
||||
BinarySource src[1];
|
||||
ssh_key *sshk;
|
||||
|
4
import.c
4
import.c
@ -1002,7 +1002,7 @@ static bool openssh_pem_write(
|
||||
|
||||
/* Append the BIT STRING to the sequence */
|
||||
put_ber_id_len(seq, 1, sub->len,
|
||||
ASN1_CLASS_CONTEXT_SPECIFIC | ASN1_CONSTRUCTED);
|
||||
ASN1_CLASS_CONTEXT_SPECIFIC | ASN1_CONSTRUCTED);
|
||||
put_data(seq, sub->s, sub->len);
|
||||
strbuf_free(sub);
|
||||
|
||||
@ -1988,7 +1988,7 @@ static ssh2_userkey *sshcom_read(
|
||||
!memcmp(str.ptr, prefix_rsa, sizeof(prefix_rsa) - 1)) {
|
||||
type = RSA;
|
||||
} else if (str.len > sizeof(prefix_dsa) - 1 &&
|
||||
!memcmp(str.ptr, prefix_dsa, sizeof(prefix_dsa) - 1)) {
|
||||
!memcmp(str.ptr, prefix_dsa, sizeof(prefix_dsa) - 1)) {
|
||||
type = DSA;
|
||||
} else {
|
||||
errmsg = "key is of unknown type";
|
||||
|
@ -316,7 +316,7 @@ static inline void BinarySource_INIT__(BinarySource *src, ptrlen data)
|
||||
|
||||
#define get_err(src) (BinarySource_UPCAST(src)->err)
|
||||
#define get_avail(src) (BinarySource_UPCAST(src)->len - \
|
||||
BinarySource_UPCAST(src)->pos)
|
||||
BinarySource_UPCAST(src)->pos)
|
||||
#define get_ptr(src) \
|
||||
((const void *)( \
|
||||
(const unsigned char *)(BinarySource_UPCAST(src)->data) + \
|
||||
|
@ -448,10 +448,10 @@ static void process_subneg(Telnet *telnet)
|
||||
}
|
||||
bsize = 20;
|
||||
for (eval = conf_get_str_strs(telnet->conf, CONF_environmt,
|
||||
NULL, &ekey);
|
||||
NULL, &ekey);
|
||||
eval != NULL;
|
||||
eval = conf_get_str_strs(telnet->conf, CONF_environmt,
|
||||
ekey, &ekey))
|
||||
ekey, &ekey))
|
||||
bsize += strlen(ekey) + strlen(eval) + 2;
|
||||
user = get_remote_username(telnet->conf);
|
||||
if (user)
|
||||
@ -464,10 +464,10 @@ static void process_subneg(Telnet *telnet)
|
||||
b[3] = TELQUAL_IS;
|
||||
n = 4;
|
||||
for (eval = conf_get_str_strs(telnet->conf, CONF_environmt,
|
||||
NULL, &ekey);
|
||||
NULL, &ekey);
|
||||
eval != NULL;
|
||||
eval = conf_get_str_strs(telnet->conf, CONF_environmt,
|
||||
ekey, &ekey)) {
|
||||
ekey, &ekey)) {
|
||||
b[n++] = var;
|
||||
for (e = ekey; *e; e++)
|
||||
b[n++] = *e;
|
||||
@ -496,10 +496,10 @@ static void process_subneg(Telnet *telnet)
|
||||
logeventf(telnet->logctx, "client subnegotiation: SB %s IS:",
|
||||
telopt(telnet->sb_opt));
|
||||
for (eval = conf_get_str_strs(telnet->conf, CONF_environmt,
|
||||
NULL, &ekey);
|
||||
NULL, &ekey);
|
||||
eval != NULL;
|
||||
eval = conf_get_str_strs(telnet->conf, CONF_environmt,
|
||||
ekey, &ekey)) {
|
||||
ekey, &ekey)) {
|
||||
logeventf(telnet->logctx, " %s=%s", ekey, eval);
|
||||
}
|
||||
if (user)
|
||||
|
@ -393,8 +393,8 @@ static char *dns_log_msg(const char *host, int addressfamily,
|
||||
}
|
||||
|
||||
SockAddr *name_lookup(const char *host, int port, char **canonicalname,
|
||||
Conf *conf, int addressfamily, LogContext *logctx,
|
||||
const char *reason)
|
||||
Conf *conf, int addressfamily, LogContext *logctx,
|
||||
const char *reason)
|
||||
{
|
||||
if (conf_get_int(conf, CONF_proxy_type) != PROXY_NONE &&
|
||||
do_proxy_dns(conf) &&
|
||||
@ -581,10 +581,10 @@ Socket *new_connection(SockAddr *addr, const char *hostname,
|
||||
|
||||
{
|
||||
char *logmsg = dupprintf("Will use %s proxy at %s:%d to connect"
|
||||
" to %s:%d", vt->type,
|
||||
conf_get_str(conf, CONF_proxy_host),
|
||||
conf_get_int(conf, CONF_proxy_port),
|
||||
hostname, port);
|
||||
" to %s:%d", vt->type,
|
||||
conf_get_str(conf, CONF_proxy_host),
|
||||
conf_get_int(conf, CONF_proxy_port),
|
||||
hostname, port);
|
||||
plug_log(plug, PLUGLOG_PROXY_MSG, NULL, 0, logmsg, 0);
|
||||
sfree(logmsg);
|
||||
}
|
||||
|
10
ssh.h
10
ssh.h
@ -515,7 +515,7 @@ struct ec_curve {
|
||||
};
|
||||
|
||||
const ssh_keyalg *ec_alg_by_oid(int len, const void *oid,
|
||||
const struct ec_curve **curve);
|
||||
const struct ec_curve **curve);
|
||||
const unsigned char *ec_alg_oid(const ssh_keyalg *alg, int *oidlen);
|
||||
extern const int ec_nist_curve_lengths[], n_ec_nist_curve_lengths;
|
||||
extern const int ec_ed_curve_lengths[], n_ec_ed_curve_lengths;
|
||||
@ -631,8 +631,8 @@ mp_int *ssh_rsakex_decrypt(
|
||||
* Helper function for k generation in DSA, reused in ECDSA
|
||||
*/
|
||||
mp_int *dsa_gen_k(const char *id_string,
|
||||
mp_int *modulus, mp_int *private_key,
|
||||
unsigned char *digest, int digest_len);
|
||||
mp_int *modulus, mp_int *private_key,
|
||||
unsigned char *digest, int digest_len);
|
||||
|
||||
struct ssh_cipher {
|
||||
const ssh_cipheralg *vt;
|
||||
@ -1484,7 +1484,7 @@ bool import_possible(int type);
|
||||
int import_target_type(int type);
|
||||
bool import_encrypted(const Filename *filename, int type, char **comment);
|
||||
bool import_encrypted_s(const Filename *filename, BinarySource *src,
|
||||
int type, char **comment);
|
||||
int type, char **comment);
|
||||
int import_ssh1(const Filename *filename, int type,
|
||||
RSAKey *key, char *passphrase, const char **errmsg_p);
|
||||
int import_ssh1_s(BinarySource *src, int type,
|
||||
@ -1492,7 +1492,7 @@ int import_ssh1_s(BinarySource *src, int type,
|
||||
ssh2_userkey *import_ssh2(const Filename *filename, int type,
|
||||
char *passphrase, const char **errmsg_p);
|
||||
ssh2_userkey *import_ssh2_s(BinarySource *src, int type,
|
||||
char *passphrase, const char **errmsg_p);
|
||||
char *passphrase, const char **errmsg_p);
|
||||
bool export_ssh1(const Filename *filename, int type,
|
||||
RSAKey *key, char *passphrase);
|
||||
bool export_ssh2(const Filename *filename, int type,
|
||||
|
@ -1034,7 +1034,7 @@ SeatPromptResult verify_ssh_host_key(
|
||||
seat_dialog_text_append(
|
||||
text, SDT_PARA, "If you were expecting this change and trust the "
|
||||
"new key, %s to update %s's cache and carry on connecting.",
|
||||
pds->hk_accept_action, appname);
|
||||
pds->hk_accept_action, appname);
|
||||
seat_dialog_text_append(
|
||||
text, SDT_PARA, "If you want to carry on connecting but without "
|
||||
"updating the cache, %s.", pds->hk_connect_once_action);
|
||||
|
@ -50,7 +50,7 @@ static bool ssh1_login_server_get_specials(
|
||||
PacketProtocolLayer *ppl, add_special_fn_t add_special,
|
||||
void *ctx) { return false; }
|
||||
static void ssh1_login_server_special_cmd(PacketProtocolLayer *ppl,
|
||||
SessionSpecialCode code, int arg) {}
|
||||
SessionSpecialCode code, int arg) {}
|
||||
static void ssh1_login_server_reconfigure(
|
||||
PacketProtocolLayer *ppl, Conf *conf) {}
|
||||
|
||||
|
@ -866,8 +866,8 @@ static void ssh1_login_process_queue(PacketProtocolLayer *ppl)
|
||||
return;
|
||||
}
|
||||
} else if (conf_get_bool(s->conf, CONF_try_tis_auth) &&
|
||||
(s->supported_auths_mask & (1 << SSH1_AUTH_CCARD)) &&
|
||||
!s->ccard_auth_refused) {
|
||||
(s->supported_auths_mask & (1 << SSH1_AUTH_CCARD)) &&
|
||||
!s->ccard_auth_refused) {
|
||||
ssh1_login_setup_tis_scc(s);
|
||||
s->pwpkt_type = SSH1_CMSG_AUTH_CCARD_RESPONSE;
|
||||
ppl_logevent("Requested CryptoCard authentication");
|
||||
|
@ -344,7 +344,7 @@ static void mainchan_open_failure(Channel *chan, const char *errtext)
|
||||
}
|
||||
|
||||
static size_t mainchan_send(Channel *chan, bool is_stderr,
|
||||
const void *data, size_t length)
|
||||
const void *data, size_t length)
|
||||
{
|
||||
assert(chan->vt == &mainchan_channelvt);
|
||||
mainchan *mc = container_of(chan, mainchan, chan);
|
||||
|
@ -575,7 +575,7 @@ static bool fxp_got_attrs(struct sftp_packet *pktin, struct fxp_attrs *attrs)
|
||||
}
|
||||
|
||||
bool fxp_stat_recv(struct sftp_packet *pktin, struct sftp_request *req,
|
||||
struct fxp_attrs *attrs)
|
||||
struct fxp_attrs *attrs)
|
||||
{
|
||||
sfree(req);
|
||||
if (pktin->type == SSH_FXP_ATTRS) {
|
||||
|
@ -664,7 +664,7 @@ static struct share_xchannel *share_find_xchannel_by_server
|
||||
}
|
||||
|
||||
static void share_remove_xchannel(struct ssh_sharing_connstate *cs,
|
||||
struct share_xchannel *xc)
|
||||
struct share_xchannel *xc)
|
||||
{
|
||||
del234(cs->xchannels_by_us, xc);
|
||||
del234(cs->xchannels_by_server, xc);
|
||||
|
@ -43,7 +43,7 @@ static void ssh_verstring_handle_input(BinaryPacketProtocol *bpp);
|
||||
static void ssh_verstring_handle_output(BinaryPacketProtocol *bpp);
|
||||
static PktOut *ssh_verstring_new_pktout(int type);
|
||||
static void ssh_verstring_queue_disconnect(BinaryPacketProtocol *bpp,
|
||||
const char *msg, int category);
|
||||
const char *msg, int category);
|
||||
|
||||
static const BinaryPacketProtocolVtable ssh_verstring_vtable = {
|
||||
.free = ssh_verstring_free,
|
||||
|
@ -495,7 +495,7 @@ static size_t x11_send(
|
||||
while (len > 0 &&
|
||||
xconn->data_read < 12 + xconn->auth_psize + xconn->auth_dsize)
|
||||
xconn->auth_data[xconn->data_read++ - 12 -
|
||||
xconn->auth_psize] = (unsigned char) (len--, *data++);
|
||||
xconn->auth_psize] = (unsigned char) (len--, *data++);
|
||||
if (xconn->data_read < 12 + xconn->auth_psize + xconn->auth_dsize)
|
||||
return 0;
|
||||
|
||||
|
@ -946,7 +946,7 @@ void zlib_decompress_cleanup(ssh_decompressor *dc)
|
||||
}
|
||||
|
||||
static int zlib_huflookup(unsigned long *bitsp, int *nbitsp,
|
||||
struct zlib_table *tab)
|
||||
struct zlib_table *tab)
|
||||
{
|
||||
unsigned long bits = *bitsp;
|
||||
int nbits = *nbitsp;
|
||||
@ -1094,7 +1094,7 @@ bool zlib_decompress_block(ssh_decompressor *dc,
|
||||
if (dctx->lenptr >= dctx->hlit + dctx->hdist) {
|
||||
dctx->currlentable = zlib_mktable(dctx->lengths, dctx->hlit);
|
||||
dctx->currdisttable = zlib_mktable(dctx->lengths + dctx->hlit,
|
||||
dctx->hdist);
|
||||
dctx->hdist);
|
||||
zlib_freetable(&dctx->lenlentable);
|
||||
dctx->lenlentable = NULL;
|
||||
dctx->state = INBLK;
|
||||
@ -1112,7 +1112,7 @@ bool zlib_decompress_block(ssh_decompressor *dc,
|
||||
dctx->lenextrabits = (code == 16 ? 2 : code == 17 ? 3 : 7);
|
||||
dctx->lenaddon = (code == 18 ? 11 : 3);
|
||||
dctx->lenrep = (code == 16 && dctx->lenptr > 0 ?
|
||||
dctx->lengths[dctx->lenptr - 1] : 0);
|
||||
dctx->lengths[dctx->lenptr - 1] : 0);
|
||||
dctx->state = TREES_LENREP;
|
||||
}
|
||||
break;
|
||||
|
@ -1857,7 +1857,7 @@ static int key_type_s_internal(BinarySource *src)
|
||||
if (find_pubkey_alg_len(get_nonchars(src, " \n")) > 0 &&
|
||||
get_chars(src, " ").len == 1 &&
|
||||
get_chars(src, "0123456789ABCDEFGHIJKLMNOPQRSTUV"
|
||||
"WXYZabcdefghijklmnopqrstuvwxyz+/=").len > 0 &&
|
||||
"WXYZabcdefghijklmnopqrstuvwxyz+/=").len > 0 &&
|
||||
get_nonchars(src, " \n").len == 0)
|
||||
return SSH_KEYTYPE_SSH2_PUBLIC_OPENSSH;
|
||||
|
||||
|
@ -647,7 +647,7 @@ static void makeliteral_truecolour(strbuf *b, termchar *c, unsigned long *state)
|
||||
* Put the used parts of the colour info into the buffer.
|
||||
*/
|
||||
put_byte(b, ((c->truecolour.fg.enabled ? 1 : 0) |
|
||||
(c->truecolour.bg.enabled ? 2 : 0)));
|
||||
(c->truecolour.bg.enabled ? 2 : 0)));
|
||||
if (c->truecolour.fg.enabled) {
|
||||
put_byte(b, c->truecolour.fg.r);
|
||||
put_byte(b, c->truecolour.fg.g);
|
||||
|
@ -779,7 +779,7 @@ strbuf *ssh_cipher_decrypt_wrapper(ssh_cipher *c, ptrlen input)
|
||||
}
|
||||
|
||||
strbuf *ssh_cipher_encrypt_length_wrapper(ssh_cipher *c, ptrlen input,
|
||||
unsigned long seq)
|
||||
unsigned long seq)
|
||||
{
|
||||
if (input.len != 4)
|
||||
fatal_error("ssh_cipher_encrypt_length: needs exactly 4 bytes");
|
||||
@ -789,7 +789,7 @@ strbuf *ssh_cipher_encrypt_length_wrapper(ssh_cipher *c, ptrlen input,
|
||||
}
|
||||
|
||||
strbuf *ssh_cipher_decrypt_length_wrapper(ssh_cipher *c, ptrlen input,
|
||||
unsigned long seq)
|
||||
unsigned long seq)
|
||||
{
|
||||
if (input.len % ssh_cipher_alg(c)->blksize)
|
||||
fatal_error("ssh_cipher_decrypt_length: needs exactly 4 bytes");
|
||||
@ -964,7 +964,7 @@ int16_list *ntru_bias_wrapper(int16_list *in, unsigned bias,
|
||||
}
|
||||
|
||||
int16_list *ntru_scale_wrapper(int16_list *in, unsigned scale,
|
||||
unsigned p, unsigned q)
|
||||
unsigned p, unsigned q)
|
||||
{
|
||||
int16_list_resize(in, p);
|
||||
int16_list *out = make_int16_list(p);
|
||||
|
@ -438,7 +438,7 @@ static const char *gtk_askpass_setup(struct askpass_ctx *ctx,
|
||||
gtk_window_set_title(GTK_WINDOW(ctx->dialog), window_title);
|
||||
gtk_window_set_position(GTK_WINDOW(ctx->dialog), GTK_WIN_POS_CENTER);
|
||||
g_signal_connect(G_OBJECT(ctx->dialog), "delete-event",
|
||||
G_CALLBACK(askpass_dialog_closed), ctx);
|
||||
G_CALLBACK(askpass_dialog_closed), ctx);
|
||||
ctx->promptlabel = gtk_label_new(prompt_text);
|
||||
align_label_left(GTK_LABEL(ctx->promptlabel));
|
||||
gtk_widget_show(ctx->promptlabel);
|
||||
|
@ -468,7 +468,7 @@ bool do_cmdline(int argc, char **argv, bool do_everything, Conf *conf)
|
||||
break; /* finished command-line processing */
|
||||
} else
|
||||
err = true, fprintf(stderr, "%s: -e expects an argument\n",
|
||||
appname);
|
||||
appname);
|
||||
|
||||
} else if (!strcmp(p, "-title")) {
|
||||
EXPECTS_ARG;
|
||||
|
@ -545,7 +545,7 @@ static void uss_read(SftpServer *srv, SftpReplyBuilder *reply,
|
||||
}
|
||||
|
||||
static void uss_write(SftpServer *srv, SftpReplyBuilder *reply,
|
||||
ptrlen handle, uint64_t offset, ptrlen data)
|
||||
ptrlen handle, uint64_t offset, ptrlen data)
|
||||
{
|
||||
UnixSftpServer *uss = container_of(srv, UnixSftpServer, srv);
|
||||
int fd;
|
||||
|
@ -2573,7 +2573,7 @@ static void unifontsel_setup_stylelist(unifontsel_internal *fs,
|
||||
continue; /* we're filtering out this font */
|
||||
}
|
||||
if (!info || !started || strnullcasecmp(currcs, info->charset) ||
|
||||
strnullcasecmp(currstyle, info->style)) {
|
||||
strnullcasecmp(currstyle, info->style)) {
|
||||
/*
|
||||
* We've either finished a style/charset, or started a
|
||||
* new one, or both.
|
||||
|
@ -3062,8 +3062,8 @@ static void gtkwin_clip_write(
|
||||
state->pasteout_data = snewn(len*6, char);
|
||||
state->pasteout_data_len = len*6;
|
||||
state->pasteout_data_len = wc_to_mb(inst->ucsdata.line_codepage, 0,
|
||||
data, len, state->pasteout_data,
|
||||
state->pasteout_data_len, NULL);
|
||||
data, len, state->pasteout_data,
|
||||
state->pasteout_data_len, NULL);
|
||||
if (state->pasteout_data_len == 0) {
|
||||
sfree(state->pasteout_data);
|
||||
state->pasteout_data = NULL;
|
||||
|
@ -336,7 +336,7 @@ char *conf_get_str_str(Conf *conf, int primary, const char *secondary)
|
||||
}
|
||||
|
||||
char *conf_get_str_strs(Conf *conf, int primary,
|
||||
char *subkeyin, char **subkeyout)
|
||||
char *subkeyin, char **subkeyout)
|
||||
{
|
||||
struct constkey key;
|
||||
struct conf_entry *entry;
|
||||
|
@ -43,8 +43,8 @@ void debug_memdump(const void *buf, int len, bool L)
|
||||
foo[i] = ' ';
|
||||
} else {
|
||||
debug_printf("%c%2.2x",
|
||||
&p[i] != (unsigned char *) buf
|
||||
&& i % 4 ? '.' : ' ', p[i]
|
||||
&p[i] != (unsigned char *) buf
|
||||
&& i % 4 ? '.' : ' ', p[i]
|
||||
);
|
||||
if (p[i] >= ' ' && p[i] <= '~')
|
||||
foo[i] = (char) p[i];
|
||||
|
@ -1854,7 +1854,7 @@ bool winctrl_handle_command(struct dlgparam *dp, UINT msg,
|
||||
SetMapMode(hdc, MM_TEXT); /* ensure logical units == pixels */
|
||||
|
||||
GetTextExtentPoint32(hdc, (char *)c->data,
|
||||
strlen((char *)c->data), &s);
|
||||
strlen((char *)c->data), &s);
|
||||
DrawEdge(hdc, &r, EDGE_ETCHED, BF_ADJUST | BF_RECT);
|
||||
TextOut(hdc,
|
||||
r.left + (r.right-r.left-s.cx)/2,
|
||||
@ -2286,7 +2286,7 @@ void dlg_listbox_addwithid(dlgcontrol *ctrl, dlgparam *dp,
|
||||
msg = (c->ctrl->type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ?
|
||||
LB_ADDSTRING : CB_ADDSTRING);
|
||||
msg2 = (c->ctrl->type==CTRL_LISTBOX && c->ctrl->listbox.height!=0 ?
|
||||
LB_SETITEMDATA : CB_SETITEMDATA);
|
||||
LB_SETITEMDATA : CB_SETITEMDATA);
|
||||
index = SendDlgItemMessage(dp->hwnd, c->base_id+1, msg, 0, (LPARAM)text);
|
||||
SendDlgItemMessage(dp->hwnd, c->base_id+1, msg2, index, (LPARAM)id);
|
||||
}
|
||||
@ -2547,7 +2547,7 @@ void dlg_refresh(dlgcontrol *ctrl, dlgparam *dp)
|
||||
i++) {
|
||||
if (c->ctrl && c->ctrl->handler != NULL)
|
||||
c->ctrl->handler(c->ctrl, dp,
|
||||
dp->data, EVENT_REFRESH);
|
||||
dp->data, EVENT_REFRESH);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -928,7 +928,7 @@ static INT_PTR HostKeyMoreInfoProc(HWND hwnd, UINT msg, WPARAM wParam,
|
||||
MapDialogRect(hwnd, &r);
|
||||
HWND ctl = GetDlgItem(hwnd, IDOK);
|
||||
SetWindowPos(ctl, NULL, r.left, r.top, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOREDRAW | SWP_NOZORDER);
|
||||
SWP_NOSIZE | SWP_NOREDRAW | SWP_NOZORDER);
|
||||
|
||||
r.left = r.top = r.right = 0;
|
||||
r.bottom = 300;
|
||||
|
@ -665,8 +665,8 @@ static Ssh_gss_stat ssh_sspi_verify_mic(struct ssh_gss_library *lib,
|
||||
InputSecurityToken[1].pvBuffer = mic->value;
|
||||
|
||||
winctx->maj_stat = p_VerifySignature(&winctx->context,
|
||||
&InputBufferDescriptor,
|
||||
0, &qop);
|
||||
&InputBufferDescriptor,
|
||||
0, &qop);
|
||||
return winctx->maj_stat;
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ struct PassphraseProcStruct {
|
||||
* Dialog-box function for the Licence box.
|
||||
*/
|
||||
static INT_PTR CALLBACK LicenceProc(HWND hwnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (msg) {
|
||||
case WM_INITDIALOG:
|
||||
@ -128,7 +128,7 @@ static INT_PTR CALLBACK LicenceProc(HWND hwnd, UINT msg,
|
||||
* Dialog-box function for the About box.
|
||||
*/
|
||||
static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (msg) {
|
||||
case WM_INITDIALOG: {
|
||||
@ -214,7 +214,7 @@ static void end_passphrase_dialog(HWND hwnd, INT_PTR result)
|
||||
* Dialog-box function for the passphrase box.
|
||||
*/
|
||||
static INT_PTR CALLBACK PassphraseProc(HWND hwnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
struct PassphraseProcStruct *p;
|
||||
|
||||
@ -592,7 +592,7 @@ static void prompt_add_keyfile(bool encrypted)
|
||||
* Dialog-box function for the key list box.
|
||||
*/
|
||||
static INT_PTR CALLBACK KeyListProc(HWND hwnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static const struct {
|
||||
const char *name;
|
||||
@ -1865,7 +1865,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
|
||||
AppendMenu(systray_menu, MF_SEPARATOR, 0, 0);
|
||||
}
|
||||
AppendMenu(systray_menu, MF_ENABLED, IDM_VIEWKEYS,
|
||||
"&View Keys");
|
||||
"&View Keys");
|
||||
AppendMenu(systray_menu, MF_ENABLED, IDM_ADDKEY, "Add &Key");
|
||||
AppendMenu(systray_menu, MF_ENABLED, IDM_ADDKEY_ENCRYPTED,
|
||||
"Add key (encrypted)");
|
||||
|
@ -203,7 +203,7 @@ struct PassphraseProcStruct {
|
||||
* Dialog-box function for the passphrase box.
|
||||
*/
|
||||
static INT_PTR CALLBACK PassphraseProc(HWND hwnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static char **passphrase = NULL;
|
||||
struct PassphraseProcStruct *p;
|
||||
@ -483,7 +483,7 @@ static bool prompt_keyfile(HWND hwnd, char *dlgtitle,
|
||||
* Dialog-box function for the Licence box.
|
||||
*/
|
||||
static INT_PTR CALLBACK LicenceProc(HWND hwnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (msg) {
|
||||
case WM_INITDIALOG: {
|
||||
@ -522,7 +522,7 @@ static INT_PTR CALLBACK LicenceProc(HWND hwnd, UINT msg,
|
||||
* Dialog-box function for the About box.
|
||||
*/
|
||||
static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (msg) {
|
||||
case WM_INITDIALOG:
|
||||
@ -1457,7 +1457,7 @@ static INT_PTR CertInfoProc(HWND hwnd, UINT msg, WPARAM wParam,
|
||||
MapDialogRect(hwnd, &r);
|
||||
HWND ctl = GetDlgItem(hwnd, IDOK);
|
||||
SetWindowPos(ctl, NULL, r.left, r.top, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOREDRAW | SWP_NOZORDER);
|
||||
SWP_NOSIZE | SWP_NOREDRAW | SWP_NOZORDER);
|
||||
|
||||
r.left = r.top = r.right = 0;
|
||||
r.bottom = 300;
|
||||
@ -1496,7 +1496,7 @@ static INT_PTR CertInfoProc(HWND hwnd, UINT msg, WPARAM wParam,
|
||||
* Dialog-box function for the main PuTTYgen dialog box.
|
||||
*/
|
||||
static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
const int DEMO_SCREENSHOT_TIMER_ID = 1230;
|
||||
static const char entropy_msg[] =
|
||||
|
@ -348,7 +348,7 @@ int check_stored_host_key(const char *hostname, int port,
|
||||
}
|
||||
|
||||
bool have_ssh_host_key(const char *hostname, int port,
|
||||
const char *keytype)
|
||||
const char *keytype)
|
||||
{
|
||||
/*
|
||||
* If we have a host key, check_stored_host_key will return 0 or 2.
|
||||
|
@ -1724,8 +1724,8 @@ static void wintw_request_resize(TermWin *tw, int w, int h)
|
||||
height = extra_height + font_height * h;
|
||||
|
||||
SetWindowPos(wgs.term_hwnd, NULL, 0, 0, width, height,
|
||||
SWP_NOACTIVATE | SWP_NOCOPYBITS |
|
||||
SWP_NOMOVE | SWP_NOZORDER);
|
||||
SWP_NOACTIVATE | SWP_NOCOPYBITS |
|
||||
SWP_NOMOVE | SWP_NOZORDER);
|
||||
} else {
|
||||
/*
|
||||
* If we're resizing by changing the font, we must tell the
|
||||
@ -1864,10 +1864,10 @@ static void reset_window(int reinit) {
|
||||
rect.right += (window_border * 2);
|
||||
rect.bottom += (window_border * 2);
|
||||
OffsetRect(&dpi_info.new_wnd_rect,
|
||||
((dpi_info.new_wnd_rect.right - dpi_info.new_wnd_rect.left) -
|
||||
(rect.right - rect.left)) / 2,
|
||||
((dpi_info.new_wnd_rect.bottom - dpi_info.new_wnd_rect.top) -
|
||||
(rect.bottom - rect.top)) / 2);
|
||||
((dpi_info.new_wnd_rect.right - dpi_info.new_wnd_rect.left) -
|
||||
(rect.right - rect.left)) / 2,
|
||||
((dpi_info.new_wnd_rect.bottom - dpi_info.new_wnd_rect.top) -
|
||||
(rect.bottom - rect.top)) / 2);
|
||||
SetWindowPos(wgs.term_hwnd, NULL,
|
||||
dpi_info.new_wnd_rect.left, dpi_info.new_wnd_rect.top,
|
||||
rect.right - rect.left, rect.bottom - rect.top,
|
||||
@ -1912,7 +1912,7 @@ static void reset_window(int reinit) {
|
||||
*/
|
||||
if ((resize_action == RESIZE_TERM && reinit<=0) ||
|
||||
(resize_action == RESIZE_EITHER && reinit<0) ||
|
||||
reinit>0) {
|
||||
reinit>0) {
|
||||
offset_width = offset_height = window_border;
|
||||
extra_width = wr.right - wr.left - cr.right + cr.left + offset_width*2;
|
||||
extra_height = wr.bottom - wr.top - cr.bottom + cr.top +offset_height*2;
|
||||
@ -4628,8 +4628,8 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
|
||||
break;
|
||||
|
||||
p += format_small_keypad_key((char *)p, term, sk_key,
|
||||
shift_state & 1, shift_state & 2,
|
||||
left_alt, &consumed_alt);
|
||||
shift_state & 1, shift_state & 2,
|
||||
left_alt, &consumed_alt);
|
||||
if (consumed_alt)
|
||||
left_alt = false; /* supersedes the usual prefixing of Esc */
|
||||
return p - output;
|
||||
@ -5627,7 +5627,7 @@ static void wintw_bell(TermWin *tw, int mode)
|
||||
} else if (mode == BELL_WAVEFILE) {
|
||||
Filename *bell_wavefile = conf_get_filename(conf, CONF_bell_wavefile);
|
||||
if (!p_PlaySound || !p_PlaySound(bell_wavefile->path, NULL,
|
||||
SND_ASYNC | SND_FILENAME)) {
|
||||
SND_ASYNC | SND_FILENAME)) {
|
||||
char *buf, *otherbuf;
|
||||
show_mouseptr(true);
|
||||
buf = dupprintf(
|
||||
|
Loading…
Reference in New Issue
Block a user