[Ttssh2-commit] [9153] keyboard.c に emacs 用ローカル変数を追加

Zurück zum Archiv-Index
scmno****@osdn***** scmno****@osdn*****
2021年 2月 11日 (木) 00:11:13 JST


Revision: 9153
          https://osdn.net/projects/ttssh2/scm/svn/commits/9153
Author:   zmatsuo
Date:     2021-02-11 00:11:13 +0900 (Thu, 11 Feb 2021)
Log Message:
-----------
keyboard.c に emacs 用ローカル変数を追加

- インデントが崩れないようにした

Modified Paths:
--------------
    trunk/teraterm/teraterm/keyboard.c
    trunk/teraterm/teraterm/ttdde.c

-------------- next part --------------
Modified: trunk/teraterm/teraterm/keyboard.c
===================================================================
--- trunk/teraterm/teraterm/keyboard.c	2021-02-10 15:10:58 UTC (rev 9152)
+++ trunk/teraterm/teraterm/keyboard.c	2021-02-10 15:11:13 UTC (rev 9153)
@@ -139,7 +139,7 @@
   FuncKeyLen[NewKeyId] = NewKeyLen;
 }
 
-int VKey2KeyStr(WORD VKey, HWND HWin, char *Code, size_t CodeSize, WORD *CodeType, WORD ModStat) {
+static int VKey2KeyStr(WORD VKey, HWND HWin, char *Code, size_t CodeSize, WORD *CodeType, WORD ModStat) {
   BOOL Single, Control, Shift;
   int CodeLength = 0;
 
@@ -634,7 +634,6 @@
 {
   WORD Key;
   MSG M;
-  BYTE KeyState[256];
   int i;
   int CodeCount;
   int CodeLength;
@@ -746,6 +745,7 @@
 
   if (VKey==VK_NUMLOCK) {
     /* keep NumLock LED status */
+    BYTE KeyState[256];
     GetKeyboardState((PBYTE)KeyState);
     KeyState[VK_NUMLOCK] = KeyState[VK_NUMLOCK] ^ 1;
     SetKeyboardState((PBYTE)KeyState);
@@ -933,3 +933,10 @@
   if (KeyMap != NULL)
     free(KeyMap);
 }
+
+/*
+ * Local Variables:
+ * tab-width: 8
+ * c-basic-offset: 2
+ * End:
+ */

Modified: trunk/teraterm/teraterm/ttdde.c
===================================================================
--- trunk/teraterm/teraterm/ttdde.c	2021-02-10 15:10:58 UTC (rev 9152)
+++ trunk/teraterm/teraterm/ttdde.c	2021-02-10 15:11:13 UTC (rev 9153)
@@ -385,7 +385,6 @@
 {
 	char Command[MaxStrLen + 1];
 	int i;
-	WORD w, c;
 	wchar_t *ParamFileNameW;
 	BOOL r;
 
@@ -642,11 +641,12 @@
 			return DDE_FNOTPROCESSED;
 		break;
 	}
-	case CmdSendKCode:
-		w = HexStr2Word(ParamFileName);
-		c = HexStr2Word(&ParamFileName[4]);
+	case CmdSendKCode: {
+		WORD w = HexStr2Word(ParamFileName);
+		WORD c = HexStr2Word(&ParamFileName[4]);
 		PostMessage(HVTWin,WM_USER_KEYCODE,w,(LPARAM)c);
 		break;
+	}
 	case CmdSetEcho:
 		ts.LocalEcho = ParamBinaryFlag;
 		if (cv.Ready && cv.TelFlag && (ts.TelEcho>0))


Ttssh2-commit メーリングリストの案内
Zurück zum Archiv-Index