mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Formatting: miscellaneous.
This patch fixes a few other whitespace and formatting issues which were pointed out by the bulk-reindent or which I spotted in passing, some involving manual editing to break lines more nicely. I think the weirdest hunk in here is the one in windows/window.c TranslateKey() where _half_ of an assignment statement inside an 'if' was on the same line as the trailing paren of the if condition. No idea at all how that one managed to happen!
This commit is contained in:
parent
4b8dc56284
commit
9cac27946a
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Supdup backend
|
* Supdup backend
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* TTYOPT FUNCTION BITS (36-bit bitmasks)
|
* TTYOPT FUNCTION BITS (36-bit bitmasks)
|
||||||
*/
|
*/
|
||||||
#define TOALT 0200000000000LL // Characters 0175 and 0176 are converted to altmode (0033) on input
|
#define TOALT 0200000000000LL // Characters 0175 and 0176 are converted to altmode (0033) on input
|
||||||
#define TOCLC 0100000000000LL // (user option bit) Convert lower-case input to upper-case
|
#define TOCLC 0100000000000LL // (user option bit) Convert lower-case input to upper-case
|
||||||
#define TOERS 0040000000000LL // Selective erase is supported
|
#define TOERS 0040000000000LL // Selective erase is supported
|
||||||
@ -671,13 +671,13 @@ static const InteractorVtable Supdup_interactorvt = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Called to set up the Supdup connection.
|
* Called to set up the Supdup connection.
|
||||||
*
|
*
|
||||||
* Returns an error message, or NULL on success.
|
* Returns an error message, or NULL on success.
|
||||||
*
|
*
|
||||||
* Also places the canonical host name into `realhost'. It must be
|
* Also places the canonical host name into `realhost'. It must be
|
||||||
* freed by the caller.
|
* freed by the caller.
|
||||||
*/
|
*/
|
||||||
static char *supdup_init(const BackendVtable *x, Seat *seat,
|
static char *supdup_init(const BackendVtable *x, Seat *seat,
|
||||||
Backend **backend_handle,
|
Backend **backend_handle,
|
||||||
LogContext *logctx, Conf *conf,
|
LogContext *logctx, Conf *conf,
|
||||||
@ -837,16 +837,16 @@ static void supdup_free(Backend *be)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reconfigure the Supdup backend.
|
* Reconfigure the Supdup backend.
|
||||||
*/
|
*/
|
||||||
static void supdup_reconfig(Backend *be, Conf *conf)
|
static void supdup_reconfig(Backend *be, Conf *conf)
|
||||||
{
|
{
|
||||||
/* Nothing to do; SUPDUP cannot be reconfigured while running. */
|
/* Nothing to do; SUPDUP cannot be reconfigured while running. */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Called to send data down the Supdup connection.
|
* Called to send data down the Supdup connection.
|
||||||
*/
|
*/
|
||||||
static void supdup_send(Backend *be, const char *buf, size_t len)
|
static void supdup_send(Backend *be, const char *buf, size_t len)
|
||||||
{
|
{
|
||||||
Supdup *supdup = container_of(be, Supdup, backend);
|
Supdup *supdup = container_of(be, Supdup, backend);
|
||||||
@ -867,8 +867,8 @@ static void supdup_send(Backend *be, const char *buf, size_t len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Called to query the current socket sendability status.
|
* Called to query the current socket sendability status.
|
||||||
*/
|
*/
|
||||||
static size_t supdup_sendbuffer(Backend *be)
|
static size_t supdup_sendbuffer(Backend *be)
|
||||||
{
|
{
|
||||||
Supdup *supdup = container_of(be, Supdup, backend);
|
Supdup *supdup = container_of(be, Supdup, backend);
|
||||||
@ -876,8 +876,8 @@ static size_t supdup_sendbuffer(Backend *be)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Called to set the size of the window from Supdup's POV.
|
* Called to set the size of the window from Supdup's POV.
|
||||||
*/
|
*/
|
||||||
static void supdup_size(Backend *be, int width, int height)
|
static void supdup_size(Backend *be, int width, int height)
|
||||||
{
|
{
|
||||||
Supdup *supdup = container_of(be, Supdup, backend);
|
Supdup *supdup = container_of(be, Supdup, backend);
|
||||||
@ -892,8 +892,8 @@ static void supdup_size(Backend *be, int width, int height)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Send Telnet special codes.
|
* Send Telnet special codes.
|
||||||
*/
|
*/
|
||||||
static void supdup_special(Backend *be, SessionSpecialCode code, int arg)
|
static void supdup_special(Backend *be, SessionSpecialCode code, int arg)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -946,8 +946,8 @@ static int supdup_exitcode(Backend *be)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* cfg_info for Dupdup does nothing at all.
|
* cfg_info for Dupdup does nothing at all.
|
||||||
*/
|
*/
|
||||||
static int supdup_cfg_info(Backend *be)
|
static int supdup_cfg_info(Backend *be)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -191,7 +191,7 @@ struct Telnet {
|
|||||||
|
|
||||||
enum {
|
enum {
|
||||||
TOP_LEVEL, SEENIAC, SEENWILL, SEENWONT, SEENDO, SEENDONT,
|
TOP_LEVEL, SEENIAC, SEENWILL, SEENWONT, SEENDO, SEENDONT,
|
||||||
SEENSB, SUBNEGOT, SUBNEG_IAC, SEENCR
|
SEENSB, SUBNEGOT, SUBNEG_IAC, SEENCR
|
||||||
} state;
|
} state;
|
||||||
|
|
||||||
Conf *conf;
|
Conf *conf;
|
||||||
|
3
pscp.c
3
pscp.c
@ -2189,8 +2189,7 @@ static void usage(void)
|
|||||||
printf("PuTTY Secure Copy client\n");
|
printf("PuTTY Secure Copy client\n");
|
||||||
printf("%s\n", ver);
|
printf("%s\n", ver);
|
||||||
printf("Usage: pscp [options] [user@]host:source target\n");
|
printf("Usage: pscp [options] [user@]host:source target\n");
|
||||||
printf(
|
printf(" pscp [options] source [source...] [user@]host:target\n");
|
||||||
" pscp [options] source [source...] [user@]host:target\n");
|
|
||||||
printf(" pscp [options] -ls [user@]host:filespec\n");
|
printf(" pscp [options] -ls [user@]host:filespec\n");
|
||||||
printf("Options:\n");
|
printf("Options:\n");
|
||||||
printf(" -V print version information and exit\n");
|
printf(" -V print version information and exit\n");
|
||||||
|
@ -56,7 +56,7 @@ static const gss_OID_desc oids[] = {
|
|||||||
*
|
*
|
||||||
* The implementation must reserve static storage for a
|
* The implementation must reserve static storage for a
|
||||||
* gss_OID_desc object containing the value */
|
* gss_OID_desc object containing the value */
|
||||||
{10, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x04"},
|
{10, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x04"},
|
||||||
/* corresponding to an object-identifier value of {iso(1)
|
/* corresponding to an object-identifier value of {iso(1)
|
||||||
* member-body(2) Unites States(840) mit(113554) infosys(1)
|
* member-body(2) Unites States(840) mit(113554) infosys(1)
|
||||||
* gssapi(2) generic(1) service_name(4)}. The constant
|
* gssapi(2) generic(1) service_name(4)}. The constant
|
||||||
@ -75,7 +75,7 @@ static const gss_OID_desc oids[] = {
|
|||||||
* The implementation must reserve static storage for a
|
* The implementation must reserve static storage for a
|
||||||
* gss_OID_desc object containing the value */
|
* gss_OID_desc object containing the value */
|
||||||
{6, (void *)"\x2b\x06\x01\x05\x06\x04"},
|
{6, (void *)"\x2b\x06\x01\x05\x06\x04"},
|
||||||
/* corresponding to an object-identifier value of
|
/* corresponding to an object-identifier value of
|
||||||
* {1(iso), 3(org), 6(dod), 1(internet), 5(security),
|
* {1(iso), 3(org), 6(dod), 1(internet), 5(security),
|
||||||
* 6(nametypes), 4(gss-api-exported-name)}. The constant
|
* 6(nametypes), 4(gss-api-exported-name)}. The constant
|
||||||
* GSS_C_NT_EXPORT_NAME should be initialized to point
|
* GSS_C_NT_EXPORT_NAME should be initialized to point
|
||||||
|
@ -514,7 +514,7 @@ void portfwd_raw_setup(Channel *pfchan, Socket *s, SshChannel *sc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
called when someone connects to the local port
|
* called when someone connects to the local port
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int pfl_accepting(Plug *p, accept_fn_t constructor, accept_ctx_t ctx)
|
static int pfl_accepting(Plug *p, accept_fn_t constructor, accept_ctx_t ctx)
|
||||||
|
@ -283,8 +283,7 @@ bool fxp_init(void)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (remotever > SFTP_PROTO_VERSION) {
|
if (remotever > SFTP_PROTO_VERSION) {
|
||||||
fxp_internal_error(
|
fxp_internal_error("remote protocol is more advanced than we support");
|
||||||
"remote protocol is more advanced than we support");
|
|
||||||
sftp_pkt_free(pktin);
|
sftp_pkt_free(pktin);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2192,9 +2192,9 @@ static void ssh2_transport_reconfigure(PacketProtocolLayer *ppl, Conf *conf)
|
|||||||
for (i = 0; i < CIPHER_MAX; i++)
|
for (i = 0; i < CIPHER_MAX; i++)
|
||||||
if (conf_get_int_int(s->conf, CONF_ssh_cipherlist, i) !=
|
if (conf_get_int_int(s->conf, CONF_ssh_cipherlist, i) !=
|
||||||
conf_get_int_int(conf, CONF_ssh_cipherlist, i)) {
|
conf_get_int_int(conf, CONF_ssh_cipherlist, i)) {
|
||||||
rekey_reason = "cipher settings changed";
|
rekey_reason = "cipher settings changed";
|
||||||
rekey_mandatory = true;
|
rekey_mandatory = true;
|
||||||
}
|
}
|
||||||
if (conf_get_bool(s->conf, CONF_ssh2_des_cbc) !=
|
if (conf_get_bool(s->conf, CONF_ssh2_des_cbc) !=
|
||||||
conf_get_bool(conf, CONF_ssh2_des_cbc)) {
|
conf_get_bool(conf, CONF_ssh2_des_cbc)) {
|
||||||
rekey_reason = "cipher settings changed";
|
rekey_reason = "cipher settings changed";
|
||||||
|
@ -870,7 +870,7 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl)
|
|||||||
agentreq = strbuf_new_for_agent_query();
|
agentreq = strbuf_new_for_agent_query();
|
||||||
put_byte(agentreq, SSH2_AGENTC_SIGN_REQUEST);
|
put_byte(agentreq, SSH2_AGENTC_SIGN_REQUEST);
|
||||||
put_stringpl(agentreq, ptrlen_from_strbuf(
|
put_stringpl(agentreq, ptrlen_from_strbuf(
|
||||||
s->agent_keys[s->agent_key_index].blob));
|
s->agent_keys[s->agent_key_index].blob));
|
||||||
/* Now the data to be signed... */
|
/* Now the data to be signed... */
|
||||||
sigdata = strbuf_new();
|
sigdata = strbuf_new();
|
||||||
ssh2_userauth_add_session_id(s, sigdata);
|
ssh2_userauth_add_session_id(s, sigdata);
|
||||||
@ -1223,8 +1223,9 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl)
|
|||||||
ppl_logevent("GSSAPI authentication initialisation "
|
ppl_logevent("GSSAPI authentication initialisation "
|
||||||
"failed");
|
"failed");
|
||||||
|
|
||||||
if (s->shgss->lib->display_status(s->shgss->lib,
|
if (s->shgss->lib->display_status(
|
||||||
s->shgss->ctx, &s->gss_buf) == SSH_GSS_OK) {
|
s->shgss->lib, s->shgss->ctx, &s->gss_buf)
|
||||||
|
== SSH_GSS_OK) {
|
||||||
ppl_logevent("%s", (char *)s->gss_buf.value);
|
ppl_logevent("%s", (char *)s->gss_buf.value);
|
||||||
sfree(s->gss_buf.value);
|
sfree(s->gss_buf.value);
|
||||||
}
|
}
|
||||||
|
@ -3128,8 +3128,8 @@ static void do_osc(Terminal *term)
|
|||||||
{
|
{
|
||||||
if (term->osc_w) {
|
if (term->osc_w) {
|
||||||
while (term->osc_strlen--)
|
while (term->osc_strlen--)
|
||||||
term->wordness[(unsigned char)
|
term->wordness[(unsigned char)term->osc_string[term->osc_strlen]] =
|
||||||
term->osc_string[term->osc_strlen]] = term->esc_args[0];
|
term->esc_args[0];
|
||||||
} else {
|
} else {
|
||||||
term->osc_string[term->osc_strlen] = '\0';
|
term->osc_string[term->osc_strlen] = '\0';
|
||||||
switch (term->esc_args[0]) {
|
switch (term->esc_args[0]) {
|
||||||
@ -6028,7 +6028,7 @@ static void do_paint(Terminal *term)
|
|||||||
|
|
||||||
if (!term->ansi_colour)
|
if (!term->ansi_colour)
|
||||||
tattr = (tattr & ~(ATTR_FGMASK | ATTR_BGMASK)) |
|
tattr = (tattr & ~(ATTR_FGMASK | ATTR_BGMASK)) |
|
||||||
ATTR_DEFFG | ATTR_DEFBG;
|
ATTR_DEFFG | ATTR_DEFBG;
|
||||||
|
|
||||||
if (!term->xterm_256_colour) {
|
if (!term->xterm_256_colour) {
|
||||||
int colour;
|
int colour;
|
||||||
|
@ -586,7 +586,7 @@ static void load_module(
|
|||||||
#define TRY_WRAP(fn, pre, post) do \
|
#define TRY_WRAP(fn, pre, post) do \
|
||||||
{ \
|
{ \
|
||||||
static bool done_this_one = false; \
|
static bool done_this_one = false; \
|
||||||
try_wrap_fn(module, fn, pre, post, &done_this_one); \
|
try_wrap_fn(module, fn, pre, post, &done_this_one); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
if (loaded) {
|
if (loaded) {
|
||||||
|
@ -1575,7 +1575,7 @@ OPTIONAL_PTR_FUNC(string)
|
|||||||
static void handle_##fname(BinarySource *_in, strbuf *_out) { \
|
static void handle_##fname(BinarySource *_in, strbuf *_out) { \
|
||||||
ARGS_##fname _args = get_args_##fname(_in); \
|
ARGS_##fname _args = get_args_##fname(_in); \
|
||||||
(void)_args; /* suppress warning if no actual arguments */ \
|
(void)_args; /* suppress warning if no actual arguments */ \
|
||||||
return_##outtype(_out, JUXTAPOSE2(realname, (__VA_ARGS__))); \
|
return_##outtype(_out, JUXTAPOSE2(realname, (__VA_ARGS__))); \
|
||||||
}
|
}
|
||||||
#include "testcrypt-func.h"
|
#include "testcrypt-func.h"
|
||||||
#undef FUNC_INNER
|
#undef FUNC_INNER
|
||||||
|
@ -353,7 +353,7 @@ static void show_help(FILE *fp)
|
|||||||
" --rsakexkey KEY key for SSH-2 RSA key exchange "
|
" --rsakexkey KEY key for SSH-2 RSA key exchange "
|
||||||
"(in SSH-1 format)\n"
|
"(in SSH-1 format)\n"
|
||||||
" --userkey KEY public key"
|
" --userkey KEY public key"
|
||||||
" acceptable for user authentication\n"
|
" acceptable for user authentication\n"
|
||||||
" --sessiondir DIR cwd for session subprocess (default $HOME)\n"
|
" --sessiondir DIR cwd for session subprocess (default $HOME)\n"
|
||||||
" --bannertext TEXT send TEXT as SSH-2 auth banner\n"
|
" --bannertext TEXT send TEXT as SSH-2 auth banner\n"
|
||||||
" --bannerfile FILE send contents of FILE as SSH-2 auth "
|
" --bannerfile FILE send contents of FILE as SSH-2 auth "
|
||||||
|
@ -1915,11 +1915,10 @@ gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
|
|||||||
if (event->state & GDK_CONTROL_MASK)
|
if (event->state & GDK_CONTROL_MASK)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
end = 1 + format_small_keypad_key(output+1, inst->term, sk_key,
|
end = 1 + format_small_keypad_key(
|
||||||
event->state & GDK_SHIFT_MASK,
|
output+1, inst->term, sk_key, event->state & GDK_SHIFT_MASK,
|
||||||
event->state & GDK_CONTROL_MASK,
|
event->state & GDK_CONTROL_MASK,
|
||||||
event->state & inst->meta_mod_mask,
|
event->state & inst->meta_mod_mask, &consumed_meta_key);
|
||||||
&consumed_meta_key);
|
|
||||||
if (consumed_meta_key)
|
if (consumed_meta_key)
|
||||||
start = 1; /* supersedes the usual prefixing of Esc */
|
start = 1; /* supersedes the usual prefixing of Esc */
|
||||||
#ifdef KEY_EVENT_DIAGNOSTICS
|
#ifdef KEY_EVENT_DIAGNOSTICS
|
||||||
@ -1941,11 +1940,10 @@ gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
|
|||||||
xkey = 'G'; goto arrow_key;
|
xkey = 'G'; goto arrow_key;
|
||||||
arrow_key:
|
arrow_key:
|
||||||
consumed_meta_key = false;
|
consumed_meta_key = false;
|
||||||
end = 1 + format_arrow_key(output+1, inst->term, xkey,
|
end = 1 + format_arrow_key(
|
||||||
event->state & GDK_SHIFT_MASK,
|
output+1, inst->term, xkey, event->state & GDK_SHIFT_MASK,
|
||||||
event->state & GDK_CONTROL_MASK,
|
event->state & GDK_CONTROL_MASK,
|
||||||
event->state & inst->meta_mod_mask,
|
event->state & inst->meta_mod_mask, &consumed_meta_key);
|
||||||
&consumed_meta_key);
|
|
||||||
if (consumed_meta_key)
|
if (consumed_meta_key)
|
||||||
start = 1; /* supersedes the usual prefixing of Esc */
|
start = 1; /* supersedes the usual prefixing of Esc */
|
||||||
#ifdef KEY_EVENT_DIAGNOSTICS
|
#ifdef KEY_EVENT_DIAGNOSTICS
|
||||||
|
@ -476,7 +476,7 @@ void conf_del_str_str(Conf *conf, int primary, const char *secondary)
|
|||||||
del234(conf->tree, entry);
|
del234(conf->tree, entry);
|
||||||
free_entry(entry);
|
free_entry(entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void conf_set_filename(Conf *conf, int primary, const Filename *value)
|
void conf_set_filename(Conf *conf, int primary, const Filename *value)
|
||||||
{
|
{
|
||||||
|
@ -721,8 +721,7 @@ bool set_explicit_app_user_model_id(void)
|
|||||||
|
|
||||||
static HMODULE shell32_module = 0;
|
static HMODULE shell32_module = 0;
|
||||||
|
|
||||||
if (!shell32_module)
|
if (!shell32_module) {
|
||||||
{
|
|
||||||
shell32_module = load_system32_dll("Shell32.dll");
|
shell32_module = load_system32_dll("Shell32.dll");
|
||||||
/*
|
/*
|
||||||
* We can't typecheck this function here, because it's defined
|
* We can't typecheck this function here, because it's defined
|
||||||
@ -733,11 +732,9 @@ bool set_explicit_app_user_model_id(void)
|
|||||||
shell32_module, SetCurrentProcessExplicitAppUserModelID);
|
shell32_module, SetCurrentProcessExplicitAppUserModelID);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_SetCurrentProcessExplicitAppUserModelID)
|
if (p_SetCurrentProcessExplicitAppUserModelID) {
|
||||||
{
|
|
||||||
const wchar_t *id = get_app_user_model_id();
|
const wchar_t *id = get_app_user_model_id();
|
||||||
if (p_SetCurrentProcessExplicitAppUserModelID(id) == S_OK)
|
if (p_SetCurrentProcessExplicitAppUserModelID(id) == S_OK) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -1166,8 +1166,7 @@ static char *answer_filemapping_message(const char *mapname)
|
|||||||
err = dupstr("wrong owning SID of file mapping");
|
err = dupstr("wrong owning SID of file mapping");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
{
|
|
||||||
#ifdef DEBUG_IPC
|
#ifdef DEBUG_IPC
|
||||||
debug("security APIs not present\n");
|
debug("security APIs not present\n");
|
||||||
#endif
|
#endif
|
||||||
|
@ -681,7 +681,7 @@ void init_ucs(Conf *conf, struct unicode_data *ucsdata)
|
|||||||
for (i = 96; i < 127; i++)
|
for (i = 96; i < 127; i++)
|
||||||
if (!DIRECT_FONT(ucsdata->unitab_xterm[i]))
|
if (!DIRECT_FONT(ucsdata->unitab_xterm[i]))
|
||||||
ucsdata->unitab_xterm[i] =
|
ucsdata->unitab_xterm[i] =
|
||||||
(WCHAR) (CSET_ACP + poorman_vt100[i - 96]);
|
(WCHAR) (CSET_ACP + poorman_vt100[i - 96]);
|
||||||
for(i=128;i<256;i++)
|
for(i=128;i<256;i++)
|
||||||
if (!DIRECT_FONT(ucsdata->unitab_scoacs[i]))
|
if (!DIRECT_FONT(ucsdata->unitab_scoacs[i]))
|
||||||
ucsdata->unitab_scoacs[i] =
|
ucsdata->unitab_scoacs[i] =
|
||||||
@ -724,7 +724,7 @@ wchar_t xlat_uskbd2cyrllic(int ch)
|
|||||||
0x0440, 0x0448, 0x043e, 0x043b, 0x0434, 0x044c, 0x0442, 0x0449,
|
0x0440, 0x0448, 0x043e, 0x043b, 0x0434, 0x044c, 0x0442, 0x0449,
|
||||||
0x0437, 0x0439, 0x043a, 0x044b, 0x0435, 0x0433, 0x043c, 0x0446,
|
0x0437, 0x0439, 0x043a, 0x044b, 0x0435, 0x0433, 0x043c, 0x0446,
|
||||||
0x0447, 0x043d, 0x044f, 0x0425, 0x0407, 0x042a, 126, 127
|
0x0447, 0x043d, 0x044f, 0x0425, 0x0407, 0x042a, 126, 127
|
||||||
};
|
};
|
||||||
return cyrtab[ch&0x7F];
|
return cyrtab[ch&0x7F];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1494,10 +1494,9 @@ static void init_fonts(int pick_width, int pick_height)
|
|||||||
/* !!! Yes the next line is right */
|
/* !!! Yes the next line is right */
|
||||||
if (cset == OEM_CHARSET)
|
if (cset == OEM_CHARSET)
|
||||||
ucsdata.font_codepage = GetOEMCP();
|
ucsdata.font_codepage = GetOEMCP();
|
||||||
else
|
else if (TranslateCharsetInfo ((DWORD *)(ULONG_PTR)cset,
|
||||||
if (TranslateCharsetInfo ((DWORD *)(ULONG_PTR)cset,
|
&info, TCI_SRCCHARSET))
|
||||||
&info, TCI_SRCCHARSET))
|
ucsdata.font_codepage = info.ciACP;
|
||||||
ucsdata.font_codepage = info.ciACP;
|
|
||||||
else
|
else
|
||||||
ucsdata.font_codepage = -1;
|
ucsdata.font_codepage = -1;
|
||||||
|
|
||||||
@ -2040,10 +2039,10 @@ static Mouse_Button translate_button(Mouse_Button button)
|
|||||||
return MBT_SELECT;
|
return MBT_SELECT;
|
||||||
if (button == MBT_MIDDLE)
|
if (button == MBT_MIDDLE)
|
||||||
return conf_get_int(conf, CONF_mouse_is_xterm) == 1 ?
|
return conf_get_int(conf, CONF_mouse_is_xterm) == 1 ?
|
||||||
MBT_PASTE : MBT_EXTEND;
|
MBT_PASTE : MBT_EXTEND;
|
||||||
if (button == MBT_RIGHT)
|
if (button == MBT_RIGHT)
|
||||||
return conf_get_int(conf, CONF_mouse_is_xterm) == 1 ?
|
return conf_get_int(conf, CONF_mouse_is_xterm) == 1 ?
|
||||||
MBT_EXTEND : MBT_PASTE;
|
MBT_EXTEND : MBT_PASTE;
|
||||||
return 0; /* shouldn't happen */
|
return 0; /* shouldn't happen */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3819,9 +3818,7 @@ static void do_text_internal(
|
|||||||
MultiByteToWideChar(ucsdata.font_codepage, MB_USEGLYPHCHARS,
|
MultiByteToWideChar(ucsdata.font_codepage, MB_USEGLYPHCHARS,
|
||||||
dbcstext, 2, uni_buf+nlen, 1);
|
dbcstext, 2, uni_buf+nlen, 1);
|
||||||
mptr++;
|
mptr++;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
char dbcstext[1];
|
char dbcstext[1];
|
||||||
dbcstext[0] = text[mptr] & 0xFF;
|
dbcstext[0] = text[mptr] & 0xFF;
|
||||||
MultiByteToWideChar(ucsdata.font_codepage, MB_USEGLYPHCHARS,
|
MultiByteToWideChar(ucsdata.font_codepage, MB_USEGLYPHCHARS,
|
||||||
@ -4301,9 +4298,9 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (wParam == compose_keycode) {
|
if (wParam == compose_keycode) {
|
||||||
if (compose_state == 0
|
if (compose_state == 0 &&
|
||||||
&& (HIWORD(lParam) & (KF_UP | KF_REPEAT)) == 0) compose_state =
|
(HIWORD(lParam) & (KF_UP | KF_REPEAT)) == 0)
|
||||||
1;
|
compose_state = 1;
|
||||||
else if (compose_state == 1 && (HIWORD(lParam) & KF_UP))
|
else if (compose_state == 1 && (HIWORD(lParam) & KF_UP))
|
||||||
compose_state = 2;
|
compose_state = 2;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user