Revision: 9789 https://osdn.net/projects/ttssh2/scm/svn/commits/9789 Author: zmatsuo Date: 2022-03-08 23:36:45 +0900 (Tue, 08 Mar 2022) Log Message: ----------- コンパイラ警告、ビルドに失敗する場合があったので修正 - filesys_log.cpp - strdup() -> _strdup() - ttknownfolders.c - 定数 FOLDERID_* を常に obj 内に生成するようにした - compat_win.cpp - Unicodeビルドの時でも正しくコンパイルできるように修正 - ttset.c - CLEARTYPE_QUALITY の define を削除 Modified Paths: -------------- trunk/teraterm/common/compat_win.cpp trunk/teraterm/common/ttknownfolders.c trunk/teraterm/teraterm/filesys_log.cpp trunk/teraterm/ttpset/ttset.c -------------- next part -------------- Modified: trunk/teraterm/common/compat_win.cpp =================================================================== --- trunk/teraterm/common/compat_win.cpp 2022-03-05 17:00:45 UTC (rev 9788) +++ trunk/teraterm/common/compat_win.cpp 2022-03-08 14:36:45 UTC (rev 9789) @@ -62,7 +62,7 @@ HWND (WINAPI *pGetConsoleWindow)(void); DWORD (WINAPI *pExpandEnvironmentStringsW)(LPCWSTR lpSrc, LPWSTR lpDst, DWORD nSize); static ULONGLONG (WINAPI *pVerSetConditionMask)(ULONGLONG dwlConditionMask, DWORD dwTypeBitMask, BYTE dwConditionMask); -static BOOL (WINAPI *pVerifyVersionInfoA)(LPOSVERSIONINFOEX lpVersionInformation, DWORD dwTypeMask, DWORDLONG dwlConditionMask); +static BOOL (WINAPI *pVerifyVersionInfoA)(LPOSVERSIONINFOEXA lpVersionInformation, DWORD dwTypeMask, DWORDLONG dwlConditionMask); BOOL (WINAPI *pSetDefaultDllDirectories)(DWORD DirectoryFlags); BOOL (WINAPI *pSetDllDirectoryA)(LPCSTR lpPathName); @@ -126,7 +126,7 @@ char pszOldWindowTitle[MY_BUFSIZE]; // Contains original WindowTitle. // Fetch current window title. - DWORD size = GetConsoleTitle(pszOldWindowTitle, MY_BUFSIZE); + DWORD size = GetConsoleTitleA(pszOldWindowTitle, MY_BUFSIZE); if (size == 0) { DWORD err = GetLastError(); if (err == ERROR_INVALID_HANDLE) { @@ -136,19 +136,19 @@ } // Format a "unique" NewWindowTitle. - wsprintf(pszNewWindowTitle, "%d/%d", GetTickCount(), GetCurrentProcessId()); + wsprintfA(pszNewWindowTitle, "%d/%d", GetTickCount(), GetCurrentProcessId()); // Change current window title. - SetConsoleTitle(pszNewWindowTitle); + SetConsoleTitleA(pszNewWindowTitle); // Ensure window title has been updated. Sleep(40); // Look for NewWindowTitle. - hwndFound = FindWindow(NULL, pszNewWindowTitle); + hwndFound = FindWindowA(NULL, pszNewWindowTitle); // Restore original window title. - SetConsoleTitle(pszOldWindowTitle); + SetConsoleTitleA(pszOldWindowTitle); return hwndFound; } @@ -384,7 +384,7 @@ +------------------------------------------- condition of wProductType */ static BOOL _myVerifyVersionInfo( - LPOSVERSIONINFOEX lpVersionInformation, + LPOSVERSIONINFOEXA lpVersionInformation, DWORD dwTypeMask, DWORDLONG dwlConditionMask) { Modified: trunk/teraterm/common/ttknownfolders.c =================================================================== --- trunk/teraterm/common/ttknownfolders.c 2022-03-05 17:00:45 UTC (rev 9788) +++ trunk/teraterm/common/ttknownfolders.c 2022-03-08 14:36:45 UTC (rev 9789) @@ -28,9 +28,6 @@ #include <windows.h> -#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_VISTA) -// FOLDERID_* \x82\xAASDK\x93\xE0\x82ɒ\xE8\x8B`\x82\xB3\x82\xEA\x82Ă\xA2\x82Ȃ\xA2 // \x82\xB1\x82̃t\x83@\x83C\x83\x8B(*.obj)\x82Ɏ\xC0\x91̂\xF0\x92u\x82\xAD #define INITGUID #include "ttknownfolders.h" -#endif Modified: trunk/teraterm/teraterm/filesys_log.cpp =================================================================== --- trunk/teraterm/teraterm/filesys_log.cpp 2022-03-05 17:00:45 UTC (rev 9788) +++ trunk/teraterm/teraterm/filesys_log.cpp 2022-03-08 14:36:45 UTC (rev 9789) @@ -1347,7 +1347,7 @@ char *logdir; if (strlen(ts.LogDefaultPath) > 0) { - logdir = strdup(ts.LogDefaultPath); + logdir = _strdup(ts.LogDefaultPath); } else { logdir = ToCharW(ts.LogDirW); Modified: trunk/teraterm/ttpset/ttset.c =================================================================== --- trunk/teraterm/ttpset/ttset.c 2022-03-05 17:00:45 UTC (rev 9788) +++ trunk/teraterm/ttpset/ttset.c 2022-03-08 14:36:45 UTC (rev 9789) @@ -53,10 +53,6 @@ #define DllExport __declspec(dllexport) #include "ttset.h" -#ifndef CLEARTYPE_QUALITY -#define CLEARTYPE_QUALITY 5 -#endif - #define Section "Tera Term" #define SectionW L"Tera Term"