From b25f93c0e6de6b50f427dd8fcf9f70a7a60abe60 Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Tue, 15 Aug 2017 10:50:08 +0200 Subject: [PATCH] Run indentation script --- proto.h | 2 +- ssl.c | 12 +++++++----- xkeymap.c | 33 ++++++++++++++++----------------- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/proto.h b/proto.h index e0785e3..53af58d 100644 --- a/proto.h +++ b/proto.h @@ -244,7 +244,7 @@ RD_BOOL handle_special_keys(uint32 keysym, unsigned int state, uint32 ev_time, R key_translation xkeymap_translate_key(uint32 keysym, unsigned int keycode, unsigned int state); void xkeymap_send_keys(uint32 keysym, unsigned int keycode, unsigned int state, uint32 ev_time, RD_BOOL pressed, uint8 nesting); -uint16 xkeymap_translate_button(unsigned int button, uint16* input_type); +uint16 xkeymap_translate_button(unsigned int button, uint16 * input_type); char *get_ksname(uint32 keysym); void save_remote_modifiers(uint8 scancode); void restore_remote_modifiers(uint32 ev_time, uint8 scancode); diff --git a/ssl.c b/ssl.c index 45d8ee4..065e404 100644 --- a/ssl.c +++ b/ssl.c @@ -201,21 +201,23 @@ rdssl_cert_to_rkey(RDSSL_CERT * cert, uint32 * key_len) { #if OPENSSL_VERSION_NUMBER < 0x10100000L logger(Protocol, Debug, - "rdssl_cert_to_key(), re-setting algorithm type to RSA in server certificate"); + "rdssl_cert_to_key(), re-setting algorithm type to RSA in server certificate"); X509_PUBKEY_set0_param(key, OBJ_nid2obj(NID_rsaEncryption), 0, NULL, NULL, 0); #else - if (!X509_PUBKEY_get0_param(NULL, &p, &pklen, NULL, key)) { + if (!X509_PUBKEY_get0_param(NULL, &p, &pklen, NULL, key)) + { logger(Protocol, Error, - "rdssl_cert_to_key(), failed to get algorithm used for public key"); + "rdssl_cert_to_key(), failed to get algorithm used for public key"); rdssl_log_ssl_errors("rdssl_cert_to_key()"); return NULL; } - if (!(rsa = d2i_RSAPublicKey(NULL, &p, pklen))) { + if (!(rsa = d2i_RSAPublicKey(NULL, &p, pklen))) + { logger(Protocol, Error, - "rdssl_cert_to_key(), failed to extract public key from certificate"); + "rdssl_cert_to_key(), failed to extract public key from certificate"); rdssl_log_ssl_errors("rdssl_cert_to_key()"); return NULL; diff --git a/xkeymap.c b/xkeymap.c index 0643b1d..429694e 100644 --- a/xkeymap.c +++ b/xkeymap.c @@ -664,22 +664,21 @@ handle_special_keys(uint32 keysym, unsigned int state, uint32 ev_time, RD_BOOL p case XK_Pause: /* According to the RDP documentation (MS-RDPBCGR, page 164), - pressing Pause must result in: - CTRL (0x1D) DOWN with the KBDFLAGS_EXTENDED1 flag - NUMLOCK (0x45) DOWN - CTRL (0x1D) UP with the KBDFLAGS_EXTENDED1 flag - NUMLOCK (0x45) UP - */ + pressing Pause must result in: + CTRL (0x1D) DOWN with the KBDFLAGS_EXTENDED1 flag + NUMLOCK (0x45) DOWN + CTRL (0x1D) UP with the KBDFLAGS_EXTENDED1 flag + NUMLOCK (0x45) UP + */ if (pressed) { - rdp_send_input(ev_time, RDP_INPUT_SCANCODE, RDP_KEYPRESS | KBD_FLAG_EXT1, - 0x1d, 0); - rdp_send_input(ev_time, RDP_INPUT_SCANCODE, RDP_KEYPRESS, - 0x45, 0); - rdp_send_input(ev_time, RDP_INPUT_SCANCODE, RDP_KEYRELEASE | KBD_FLAG_EXT1, - 0x1d, 0); - rdp_send_input(ev_time, RDP_INPUT_SCANCODE, RDP_KEYRELEASE, - 0x45, 0); + rdp_send_input(ev_time, RDP_INPUT_SCANCODE, + RDP_KEYPRESS | KBD_FLAG_EXT1, 0x1d, 0); + rdp_send_input(ev_time, RDP_INPUT_SCANCODE, RDP_KEYPRESS, 0x45, 0); + rdp_send_input(ev_time, RDP_INPUT_SCANCODE, + RDP_KEYRELEASE | KBD_FLAG_EXT1, 0x1d, 0); + rdp_send_input(ev_time, RDP_INPUT_SCANCODE, RDP_KEYRELEASE, 0x45, + 0); } return True; break; @@ -874,7 +873,7 @@ xkeymap_send_keys(uint32 keysym, unsigned int keycode, unsigned int state, uint3 } uint16 -xkeymap_translate_button(unsigned int button, uint16* input_type) +xkeymap_translate_button(unsigned int button, uint16 * input_type) { *input_type = RDP_INPUT_MOUSE; @@ -890,10 +889,10 @@ xkeymap_translate_button(unsigned int button, uint16* input_type) return MOUSE_FLAG_BUTTON4; case Button5: /* wheel down */ return MOUSE_FLAG_BUTTON5; - case 8: /* button 4 */ + case 8: /* button 4 */ *input_type = RDP_INPUT_MOUSEX; return MOUSEX_FLAG_BUTTON1; - case 9: /* button 5 */ + case 9: /* button 5 */ *input_type = RDP_INPUT_MOUSEX; return MOUSEX_FLAG_BUTTON2; }