[Ttssh2-commit] [7935] グローバル変数void *pVTWinをファイル内static変数にした

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 8月 10日 (土) 16:32:33 JST


Revision: 7935
          https://osdn.net/projects/ttssh2/scm/svn/commits/7935
Author:   zmatsuo
Date:     2019-08-10 16:32:33 +0900 (Sat, 10 Aug 2019)
Log Message:
-----------
グローバル変数void *pVTWinをファイル内static変数にした

- void *pVTWin で参照すると誤って使用できる
- r7933 の修正で pVTWin がグローバル変数でなくてもよくなった
- teraterm/teraterm.cpp へ CVTWindow* pVTWin として移動

Revision Links:
--------------
    https://osdn.net/projects/ttssh2/scm/svn/commits/7933

Modified Paths:
--------------
    trunk/teraterm/teraterm/teraterm.cpp
    trunk/teraterm/teraterm/ttwinman.c
    trunk/teraterm/teraterm/ttwinman.h

-------------- next part --------------
Modified: trunk/teraterm/teraterm/teraterm.cpp
===================================================================
--- trunk/teraterm/teraterm/teraterm.cpp	2019-08-10 07:32:22 UTC (rev 7934)
+++ trunk/teraterm/teraterm/teraterm.cpp	2019-08-10 07:32:33 UTC (rev 7935)
@@ -60,6 +60,7 @@
 
 static BOOL AddFontFlag;
 static TCHAR TSpecialFont[MAX_PATH];
+static CVTWindow* pVTWin;
 
 static void LoadSpecialFont()
 {
@@ -144,7 +145,7 @@
 			else {
 				switch (ActiveWin) {
 				case IdVT:
-					Change =  ((CVTWindow*)pVTWin)->Parse();
+					Change = pVTWin->Parse();
 					// TEK window\x82̃A\x83N\x83e\x83B\x83u\x92\x86\x82\xC9 pause \x82\xF0\x8Eg\x82\xA4\x82ƁACPU\x8Eg\x97p\x97\xA6100%\x82ƂȂ\xE9
 					// \x8C\xBB\x8Fۂւ̎b\x92\xE8\x91Ώ\x88\x81B(2006.2.6 yutaka)
 					// \x91҂\xBF\x8E\x9E\x8AԂ\xF0\x82Ȃ\xAD\x82\xB5\x81A\x83R\x83\x93\x83e\x83L\x83X\x83g\x83X\x83C\x83b\x83`\x82\xBE\x82\xAF\x82ɂ\xB7\x82\xE9\x81B(2006.3.20 yutaka)
@@ -172,7 +173,7 @@
 						VTActivate();
 						break;
 					case IdTEK:
-						((CVTWindow*)pVTWin)->OpenTEK();
+						pVTWin->OpenTEK();
 						break;
 				}
 			}

Modified: trunk/teraterm/teraterm/ttwinman.c
===================================================================
--- trunk/teraterm/teraterm/ttwinman.c	2019-08-10 07:32:22 UTC (rev 7934)
+++ trunk/teraterm/teraterm/ttwinman.c	2019-08-10 07:32:33 UTC (rev 7935)
@@ -55,7 +55,6 @@
 TComVar cv;
 
 /* pointers to window objects */
-void* pVTWin = NULL;
 void* pTEKWin = NULL;
 /* instance handle */
 HINSTANCE hInst;

Modified: trunk/teraterm/teraterm/ttwinman.h
===================================================================
--- trunk/teraterm/teraterm/ttwinman.h	2019-08-10 07:32:22 UTC (rev 7934)
+++ trunk/teraterm/teraterm/ttwinman.h	2019-08-10 07:32:33 UTC (rev 7935)
@@ -55,7 +55,6 @@
 extern TComVar cv;
 
 /* pointers to window objects */
-extern void* pVTWin;
 extern void* pTEKWin;
 /* instance handle */
 extern HINSTANCE hInst;


Ttssh2-commit メーリングリストの案内
Back to archive index