[Ttssh2-commit] [7179] Visual Studio 2005 でコンパイルできない書き方を修正

scmno****@osdn***** scmno****@osdn*****
2018年 8月 18日 (土) 11:31:03 JST


Revision: 7179
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7179
Author:   maya
Date:     2018-08-18 11:31:03 +0900 (Sat, 18 Aug 2018)
Log Message:
-----------
Visual Studio 2005 でコンパイルできない書き方を修正

Modified Paths:
--------------
    trunk/teraterm/common/dlglib.c

-------------- next part --------------
Modified: trunk/teraterm/common/dlglib.c
===================================================================
--- trunk/teraterm/common/dlglib.c	2018-08-16 14:25:35 UTC (rev 7178)
+++ trunk/teraterm/common/dlglib.c	2018-08-18 02:31:03 UTC (rev 7179)
@@ -359,7 +359,8 @@
 
 void SetDlgTexts(HWND hDlgWnd, const DlgTextInfo *infos, int infoCount, const char *UILanguageFile)
 {
-	for (int i = 0 ; i < infoCount; i++) {
+	int i;
+	for (i = 0 ; i < infoCount; i++) {
 		char *key = infos[i].key;
 		char uimsg[MAX_UIMSG];
 		get_lang_msg(key, uimsg, sizeof(uimsg), "", UILanguageFile);
@@ -375,15 +376,17 @@
 }
 
 HFONT SetDlgFonts(HWND hDlg, const int nIDDlgItems[], int nIDDlgItemCount,
-				  const char *UILanguageFile, PCHAR key)
+                  const char *UILanguageFile, PCHAR key)
 {
+	HFONT hPrevFont;
+	LOGFONT logfont;
+	HFONT hNewFont;
+	int i;
 	if (key == NULL) key = "DLG_TAHOMA_FONT";
-	HFONT hPrevFont = (HFONT)SendMessage(hDlg, WM_GETFONT, 0, 0);
-	LOGFONT logfont;
+	hPrevFont = (HFONT)SendMessage(hDlg, WM_GETFONT, 0, 0);
 	GetObject(hPrevFont, sizeof(LOGFONT), &logfont);
-	HFONT hNewFont;
 	if (get_lang_font(key, hDlg, &logfont, &hNewFont, UILanguageFile)) {
-		for (int i = 0 ; i < nIDDlgItemCount ; i++) {
+		for (i = 0 ; i < nIDDlgItemCount ; i++) {
 			const int nIDDlgItem = nIDDlgItems[i];
 			SendDlgItemMessage(hDlg, nIDDlgItem, WM_SETFONT, (WPARAM)hNewFont, MAKELPARAM(TRUE,0));
 		}



Ttssh2-commit メーリングリストの案内