Revision: 9324 https://osdn.net/projects/ttssh2/scm/svn/commits/9324 Author: zmatsuo Date: 2021-06-30 00:20:20 +0900 (Wed, 30 Jun 2021) Log Message: ----------- layer for unicode 向けのコードを削除 Modified Paths: -------------- trunk/TTProxy/ProxyWSockHook.h trunk/TTXSamples/TTXCheckUpdate/ttxcheckupdate.c trunk/teraterm/common/CMakeLists.txt trunk/teraterm/common/common_static.v16.vcxproj trunk/teraterm/common/common_static.v8.vcproj trunk/teraterm/common/dlglib.c trunk/teraterm/common/dlglib_cpp.cpp trunk/teraterm/common/dllutil.cpp trunk/teraterm/common/i18n_static.c trunk/teraterm/common/tipwin.cpp trunk/teraterm/common/tmfc.cpp trunk/teraterm/common/tmfc_frame.cpp trunk/teraterm/common/tmfc_property.cpp trunk/teraterm/common/ttlib.c trunk/teraterm/common/ttlib_static.c trunk/teraterm/common/ttlib_static_cpp.cpp trunk/teraterm/common/win32helper.cpp trunk/teraterm/libmingw/test/outputdebugprintf.cpp trunk/teraterm/susie_plugin/CMakeLists.txt trunk/teraterm/susie_plugin/libsusieplugin.cpp trunk/teraterm/teraterm/CMakeLists.txt trunk/teraterm/teraterm/addsetting.cpp trunk/teraterm/teraterm/broadcast.cpp trunk/teraterm/teraterm/clipboarddlg.cpp trunk/teraterm/teraterm/coding_pp.cpp trunk/teraterm/teraterm/dnddlg.cpp trunk/teraterm/teraterm/filesys.cpp trunk/teraterm/teraterm/filesys_log.cpp trunk/teraterm/teraterm/filesys_proto.cpp trunk/teraterm/teraterm/font_pp.cpp trunk/teraterm/teraterm/sendfiledlg.cpp trunk/teraterm/teraterm/tekwin.cpp trunk/teraterm/teraterm/teraprn.cpp trunk/teraterm/teraterm/teraterm.cpp trunk/teraterm/teraterm/ttermpro.v10.vcxproj trunk/teraterm/teraterm/ttermpro.v10.vcxproj.filters trunk/teraterm/teraterm/ttermpro.v11.vcxproj trunk/teraterm/teraterm/ttermpro.v11.vcxproj.filters trunk/teraterm/teraterm/ttermpro.v12.vcxproj trunk/teraterm/teraterm/ttermpro.v12.vcxproj.filters trunk/teraterm/teraterm/ttermpro.v14.vcxproj trunk/teraterm/teraterm/ttermpro.v14.vcxproj.filters trunk/teraterm/teraterm/ttermpro.v15.vcxproj trunk/teraterm/teraterm/ttermpro.v15.vcxproj.filters trunk/teraterm/teraterm/ttermpro.v16.vcxproj trunk/teraterm/teraterm/ttermpro.v16.vcxproj.filters trunk/teraterm/teraterm/ttermpro.v9.vcproj trunk/teraterm/teraterm/ttime.c trunk/teraterm/teraterm/ttplug.c trunk/teraterm/teraterm/ttwinman.c trunk/teraterm/teraterm/vtwin.cpp trunk/teraterm/ttpcmn/ttcmn.c trunk/teraterm/ttpcmn/ttcmn_notify.cpp trunk/teraterm/ttpdlg/ttdlg.c trunk/teraterm/ttpfile/bplus.c trunk/teraterm/ttpfile/filesys_win32.cpp trunk/teraterm/ttpmacro/CMakeLists.txt trunk/teraterm/ttpmacro/ttl.cpp trunk/teraterm/ttpmacro/ttl_gui.cpp trunk/teraterm/ttpmacro/ttmlib.c trunk/teraterm/ttpmacro/ttpmacro.v10.vcxproj trunk/teraterm/ttpmacro/ttpmacro.v11.vcxproj trunk/teraterm/ttpmacro/ttpmacro.v12.vcxproj trunk/teraterm/ttpmacro/ttpmacro.v14.vcxproj trunk/teraterm/ttpmacro/ttpmacro.v15.vcxproj trunk/teraterm/ttpmacro/ttpmacro.v16.vcxproj trunk/teraterm/ttpmacro/ttpmacro.v16.vcxproj.filters trunk/teraterm/ttpmacro/ttpmacro.v8.vcproj trunk/teraterm/ttpmacro/ttpmacro.v9.vcproj trunk/teraterm/ttpset/CMakeLists.txt trunk/teraterm/ttpset/ttset.c trunk/teraterm/ttpset/ttset_keyboard.c trunk/ttssh2/ttxssh/CMakeLists.txt trunk/ttssh2/ttxssh/auth.c trunk/ttssh2/ttxssh/hosts.c trunk/ttssh2/ttxssh/ssh.c trunk/ttssh2/ttxssh/ttxssh.c trunk/ttssh2/ttxssh/ttxssh.v10.vcxproj trunk/ttssh2/ttxssh/ttxssh.v11.vcxproj trunk/ttssh2/ttxssh/ttxssh.v12.vcxproj trunk/ttssh2/ttxssh/ttxssh.v14.vcxproj trunk/ttssh2/ttxssh/ttxssh.v15.vcxproj trunk/ttssh2/ttxssh/ttxssh.v16.vcxproj trunk/ttssh2/ttxssh/ttxssh.v8.vcproj trunk/ttssh2/ttxssh/ttxssh.v9.vcproj -------------- next part -------------- Modified: trunk/TTProxy/ProxyWSockHook.h =================================================================== --- trunk/TTProxy/ProxyWSockHook.h 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/TTProxy/ProxyWSockHook.h 2021-06-29 15:20:20 UTC (rev 9324) @@ -17,7 +17,6 @@ #include "ttlib.h" #include "i18n.h" -#include "layer_for_unicode.h" extern char UILanguageFile[MAX_PATH]; @@ -1065,7 +1064,7 @@ ProxyInfo proxy; SettingDialog():lock(false) { } - + int open(HWND owner) { return Dialog::open(instance().resource_module, IDD_SETTING, owner); } @@ -1095,7 +1094,7 @@ L"YebisuyaHompo"); UTIL_get_lang_msgW("DLG_ABOUT_HOMEPAGE", uimsg3, sizeof(uimsg3), L"TTProxy home page"); - _GetDlgItemTextW(hWnd, IDC_VERSION, buf, _countof(buf)); + GetDlgItemTextW(hWnd, IDC_VERSION, buf, _countof(buf)); len = wcslen(buf) + 50; buf2 = (wchar_t *)_alloca(sizeof(wchar_t) * len); if (buf2 == NULL) { @@ -1106,7 +1105,7 @@ if (n == 4) { swprintf_s(buf2, len, buf, uimsg, a, b, c, d, uimsg2, uimsg3); } - _SetDlgItemTextW(hWnd, IDC_VERSION, (n == 4) ? buf2 : buf); + SetDlgItemTextW(hWnd, IDC_VERSION, (n == 4) ? buf2 : buf); CenterWindow(hWnd, GetParent()); @@ -1164,7 +1163,7 @@ * * return: * 1\x88ȏ\xE3 \x8E\xF3\x90M\x83f\x81[\x83^\x90\x94(byte)\x81Bsize\x82\xE6\x82菬\x82\xB3\x82\xA2\x8Fꍇ\x82\xE0\x82\xA0\x82\xE9\x81B - * -1 SOCKET_ERROR + * -1 SOCKET_ERROR */ int recieveFromSocketTimeout(SOCKET s, unsigned char* buffer, int size, int timeout) { int ready = 0; @@ -1291,7 +1290,7 @@ strcpy_s(auth, authlen + 1, proxy.user); auth[userlen] = ':'; strcpy_s(auth + userlen + 1, passlen + 1, proxy.pass); - + /* make base64 string */ while (*src != '\0') { data = (data << 8) | *src++; @@ -1306,7 +1305,7 @@ *dst++ = base64_table[0x3F & (data << (6 - bits))]; encodedlen--; } - while (encodedlen-- > 0) { + while (encodedlen-- > 0) { *dst++ = '='; } *dst = '\0'; @@ -1343,7 +1342,7 @@ default: UTIL_get_lang_msg("MSG_PROXY_BAD_REQUEST", tmp, sizeof(tmp), "Proxy prevent this connection!"); - _snprintf_s(uimsg, sizeof(uimsg), _TRUNCATE, "%s(HTTP: status code %d)", + _snprintf_s(uimsg, sizeof(uimsg), _TRUNCATE, "%s(HTTP: status code %d)", tmp, status_code); break; } @@ -1430,9 +1429,9 @@ ptr += len; /* send it and get answer */ - if (sendToSocket(s, buf, ptr - buf) == SOCKET_ERROR) + if (sendToSocket(s, buf, ptr - buf) == SOCKET_ERROR) return SOCKET_ERROR; - if (recieveFromSocket(s, buf, 2) == SOCKET_ERROR) + if (recieveFromSocket(s, buf, 2) == SOCKET_ERROR) return SOCKET_ERROR; /* check status */ @@ -1498,9 +1497,9 @@ if (recieveFromSocket(s, buf, 4) == SOCKET_ERROR) return SOCKET_ERROR; /* SOCKS\x83\x8A\x83N\x83G\x83X\x83g\x82ɑ\xB7\x82郊\x83v\x83\x89\x83C - + buf[0] VER protocol version: X'05' - buf[1] REP Reply field: + buf[1] REP Reply field: o X'00' succeeded o X'01' general SOCKS server failure o X'02' connection not allowed by ruleset @@ -1517,7 +1516,7 @@ o DOMAINNAME: X'03' o IP V6 address: X'04' buf[4:N] BND.ADDR server bound address - buf[N+1] BND.PORT server bound port in network octet order + buf[N+1] BND.PORT server bound port in network octet order */ if (buf[0] != SOCKS5_VERSION || buf[1] != SOCKS5_REP_SUCCEEDED) { /* check reply code */ char tmp[MAX_UIMSG + 32]; @@ -1525,7 +1524,7 @@ UTIL_get_lang_msg("MSG_PROXY_BAD_REQUEST", uimsg, sizeof(uimsg), "Proxy prevent this connection!"); // \x83\x8A\x83v\x83\x89\x83C\x8F\xEE\x95\xF1\x82\xF0\x92NjL\x82\xB5\x82ă\x81\x83b\x83Z\x81[\x83W\x95\\x8E\xA6\x82\xB7\x82\xE9\x81B - _snprintf_s(tmp, sizeof(tmp), _TRUNCATE, "%s(SOCKS5:VER %u REP %u ATYP %u)", + _snprintf_s(tmp, sizeof(tmp), _TRUNCATE, "%s(SOCKS5:VER %u REP %u ATYP %u)", uimsg, buf[0], buf[1], buf[3]); return setError(s, tmp); } @@ -1566,7 +1565,7 @@ int begin_relay_socks4(ProxyInfo& proxy, String realhost, unsigned short realport, SOCKET s) { unsigned char buf[256], *ptr; - /* make connect request packet + /* make connect request packet protocol v4: VN:1, CD:1, PORT:2, ADDR:4, USER:n, NULL:1 protocol v4a: @@ -1624,7 +1623,7 @@ return SOCKET_ERROR; } /* SOCKS4\x82̕ԓ\x9A\x83p\x83P\x83b\x83g - + buf[0] VN \x8F\xED\x82\xC90 buf[1] CD 90 request granted @@ -1655,7 +1654,7 @@ _snprintf_s(tmp, sizeof(tmp), _TRUNCATE, "%s(SOCKS4:VN %u CD %u)", uimsg, buf[0], buf[1]); return setError(s, tmp); } - + /* Conguraturation, connected via SOCKS4 server! */ return 0; } Modified: trunk/TTXSamples/TTXCheckUpdate/ttxcheckupdate.c =================================================================== --- trunk/TTXSamples/TTXCheckUpdate/ttxcheckupdate.c 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/TTXSamples/TTXCheckUpdate/ttxcheckupdate.c 2021-06-29 15:20:20 UTC (rev 9324) @@ -39,7 +39,6 @@ #include "codeconv.h" #include "dlglib.h" #include "i18n.h" -#include "layer_for_unicode.h" #include "asprintf.h" #include "tt-version.h" // for TT_VERSION_MAJOR, TT_VERSION_MINOR #include "svnversion.h" // for SVNVERSION @@ -89,11 +88,11 @@ SetDlgItemTextA(hDlg, IDC_VERSION_LABEL, str); free(str); - _SendDlgItemMessageW(hDlg, IDC_VERSION_DROPDOWN, CB_RESETCONTENT, 0, 0); + SendDlgItemMessageW(hDlg, IDC_VERSION_DROPDOWN, CB_RESETCONTENT, 0, 0); for (i = 0; i < pvar->versions_count; i++) { const version_one_t *v = &pvar->versions[i]; wchar_t *strW = ToWcharU8(v->version_text); - _SendDlgItemMessageW(hDlg, IDC_VERSION_DROPDOWN, CB_ADDSTRING, 0, (LPARAM)strW); + SendDlgItemMessageW(hDlg, IDC_VERSION_DROPDOWN, CB_ADDSTRING, 0, (LPARAM)strW); free(strW); if (cursor == -1 && v->version_major == version_major) { cursor = (int)i; @@ -113,7 +112,7 @@ const version_one_t *v = version; wchar_t *strW = ToWcharU8(v->text); - _SetWindowTextW(GetDlgItem(hDlg, IDC_DETAIL_EDIT), strW); + SetWindowTextW(GetDlgItem(hDlg, IDC_DETAIL_EDIT), strW); free(strW); if (v->url == NULL) { @@ -203,7 +202,7 @@ swprintf(agent, _countof(agent), L"%s_%d", agent_base, pvar->ts->RunningVersion); result_bool = GetContent(update_info_url, agent, (void**)&json_raw_ptr, &json_raw_size); if (!result_bool) { - _MessageBoxW(hWnd, L"access error?", L"Tera Term", MB_OK | MB_ICONEXCLAMATION); + MessageBoxW(hWnd, L"access error?", L"Tera Term", MB_OK | MB_ICONEXCLAMATION); return; } json_size = json_raw_size + 1; @@ -218,7 +217,7 @@ /* json\x82\xF0\x83p\x81[\x83X\x82\xB7\x82\xE9, versions\x82ɏ\xEE\x95\xFC\x82\xE9 */ pvar->versions = ParseJson(json_ptr, &pvar->versions_count); if (pvar->versions == NULL) { - _MessageBoxW(hWnd, L"parse error?", L"Tera Term", MB_OK | MB_ICONEXCLAMATION); + MessageBoxW(hWnd, L"parse error?", L"Tera Term", MB_OK | MB_ICONEXCLAMATION); return; } Modified: trunk/teraterm/common/CMakeLists.txt =================================================================== --- trunk/teraterm/common/CMakeLists.txt 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/common/CMakeLists.txt 2021-06-29 15:20:20 UTC (rev 9324) @@ -25,9 +25,6 @@ getcontent.h i18n.h i18n_static.c - layer_for_unicode.cpp - layer_for_unicode.h - layer_for_unicode_comctl32.cpp layer_for_unicode_crt.h layer_for_unicode_crt.cpp tipwin.cpp Modified: trunk/teraterm/common/common_static.v16.vcxproj =================================================================== --- trunk/teraterm/common/common_static.v16.vcxproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/common/common_static.v16.vcxproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -147,8 +147,6 @@ <ClCompile Include="dllutil.cpp" /> <ClCompile Include="getcontent.cpp" /> <ClCompile Include="i18n_static.c" /> - <ClCompile Include="layer_for_unicode.cpp" /> - <ClCompile Include="layer_for_unicode_comctl32.cpp" /> <ClCompile Include="ttlib_static.c" /> <ClCompile Include="ttlib_static_cpp.cpp" /> <ClCompile Include="win16api.c" /> @@ -167,7 +165,6 @@ <ClInclude Include="i18n.h" /> <ClInclude Include="codeconv.h" /> <ClInclude Include="getcontent.h" /> - <ClInclude Include="layer_for_unicode.h" /> <ClInclude Include="ttlib.h" /> <ClInclude Include="win16api.h" /> <ClInclude Include="win32helper.h" /> Modified: trunk/teraterm/common/common_static.v8.vcproj =================================================================== --- trunk/teraterm/common/common_static.v8.vcproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/common/common_static.v8.vcproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -249,18 +249,6 @@ > </File> <File - RelativePath=".\layer_for_unicode.cpp" - > - </File> - <File - RelativePath=".\layer_for_unicode.h" - > - </File> - <File - RelativePath=".\layer_for_unicode_comctl32.cpp" - > - </File> - <File RelativePath=".\layer_for_unicode_crt.cpp" > </File> Modified: trunk/teraterm/common/dlglib.c =================================================================== --- trunk/teraterm/common/dlglib.c 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/common/dlglib.c 2021-06-29 15:20:20 UTC (rev 9324) @@ -42,7 +42,6 @@ #include <crtdbg.h> #include <wchar.h> #include "ttlib.h" // for get_lang_font() -#include "layer_for_unicode.h" #include "codeconv.h" void EnableDlgItem(HWND HDlg, int FirstId, int LastId) @@ -262,9 +261,9 @@ case 0x50: // Ctrl+p ... up if (data->IsComboBox) { HWND parent = GetParent(dlg); - select = (DWORD)_SendMessageW(parent, CB_GETCURSEL, 0, 0); + select = (DWORD)SendMessageW(parent, CB_GETCURSEL, 0, 0); if (select == CB_ERR) { - max = (DWORD)_SendMessageW(parent, CB_GETCOUNT, 0, 0); + max = (DWORD)SendMessageW(parent, CB_GETCOUNT, 0, 0); PostMessageW(parent, CB_SETCURSEL, max - 1, 0); } else if (select > 0) { @@ -276,8 +275,8 @@ case 0x4e: // Ctrl+n ... down if (data->IsComboBox) { HWND parent = GetParent(dlg); - max = (DWORD)_SendMessageW(parent, CB_GETCOUNT, 0, 0); - select = (DWORD)_SendMessageW(parent, CB_GETCURSEL, 0, 0); + max = (DWORD)SendMessageW(parent, CB_GETCOUNT, 0, 0); + select = (DWORD)SendMessageW(parent, CB_GETCURSEL, 0, 0); if (select == CB_ERR) { PostMessageW(parent, CB_SETCURSEL, 0, 0); } else if (select < max - 1) { @@ -288,16 +287,16 @@ break; case 0x42: { // Ctrl+b ... left - _SendMessageW(dlg, EM_GETSEL, 0, (LPARAM)&select); + SendMessageW(dlg, EM_GETSEL, 0, (LPARAM)&select); if (select > 0) { wchar_t *str; - max = _GetWindowTextLengthW(dlg); + max = GetWindowTextLengthW(dlg); max++; // '\0' str = (wchar_t *)malloc(sizeof(wchar_t) * max); if (str == NULL) { return 0; } - _GetWindowTextW(dlg, str, (int)max); + GetWindowTextW(dlg, str, (int)max); select = select - 1; if (IsLowSurrogate(str[select])) { select = select - 1; @@ -309,8 +308,8 @@ } case 0x46: { // Ctrl+f ... right - _SendMessageW(dlg, EM_GETSEL, 0, (LPARAM)&select); - max = _GetWindowTextLengthW(dlg); + SendMessageW(dlg, EM_GETSEL, 0, (LPARAM)&select); + max = GetWindowTextLengthW(dlg); if (select < max) { wchar_t *str; max++; // '\0' @@ -318,7 +317,7 @@ if (str == NULL) { return 0; } - _GetWindowTextW(dlg, str, (int)max); + GetWindowTextW(dlg, str, (int)max); select = select + 1; if (IsLowSurrogate(str[select])) { select = select + 1; @@ -332,7 +331,7 @@ PostMessageW(dlg, EM_SETSEL, 0, 0); return 0; case 0x45: // Ctrl+e ... end - max = _GetWindowTextLengthW(dlg) ; + max = GetWindowTextLengthW(dlg) ; PostMessageW(dlg, EM_SETSEL, max, max); return 0; @@ -341,12 +340,12 @@ case 0x55: { // Ctrl+u wchar_t *str, *orgstr; - _SendMessageW(dlg, EM_GETSEL, 0, (LPARAM)&select); - max = _GetWindowTextLengthW(dlg); + SendMessageW(dlg, EM_GETSEL, 0, (LPARAM)&select); + max = GetWindowTextLengthW(dlg); max++; // '\0' orgstr = str = (wchar_t *)malloc(sizeof(wchar_t) * max); if (str != NULL) { - len = _GetWindowTextW(dlg, str, (int)max); + len = GetWindowTextW(dlg, str, (int)max); if (select < len) { if (wParam == 0x44) { // Ctrl+d \x83J\x81[\x83\\x83\x8B\x94z\x89\xBA\x82̕\xB6\x8E\x9A\x82݂̂\xF0\x8D폜\x82\xB7\x82\xE9 wmemmove(&str[select], &str[select + 1], len - select - 1); @@ -367,8 +366,8 @@ select = 0; } - _SetWindowTextW(dlg, str); - _SendMessageW(dlg, EM_SETSEL, select, select); + SetWindowTextW(dlg, str); + SendMessageW(dlg, EM_SETSEL, select, select); free(orgstr); return 0; } @@ -397,17 +396,17 @@ break; } - _SetWindowLongPtrW(dlg, GWLP_WNDPROC, (LONG_PTR)data->OrigProc); + SetWindowLongPtrW(dlg, GWLP_WNDPROC, (LONG_PTR)data->OrigProc); SetWindowLongPtr(dlg, GWLP_USERDATA, (LONG_PTR)data->OrigUser); - Result = _CallWindowProcW(data->OrigProc, dlg, msg, wParam, lParam); + Result = CallWindowProcW(data->OrigProc, dlg, msg, wParam, lParam); data->OrigProc = (WNDPROC)GetWindowLongPtr(dlg, GWLP_WNDPROC); data->OrigUser = GetWindowLongPtr(dlg, GWLP_USERDATA); - _SetWindowLongPtrW(dlg, GWLP_WNDPROC, (LONG_PTR)HostnameEditProc); + SetWindowLongPtrW(dlg, GWLP_WNDPROC, (LONG_PTR)HostnameEditProc); SetWindowLongPtr(dlg, GWLP_USERDATA, (LONG_PTR)data); switch (msg) { case WM_NCDESTROY: - _SetWindowLongPtrW(dlg, GWLP_WNDPROC, (LONG_PTR)data->OrigProc); + SetWindowLongPtrW(dlg, GWLP_WNDPROC, (LONG_PTR)data->OrigProc); SetWindowLongPtr(dlg, GWLP_USERDATA, (LONG_PTR)data->OrigUser); free(data); break; @@ -434,10 +433,10 @@ IsCombobox = TRUE; } data = (EditSubclassData *)malloc(sizeof(EditSubclassData)); - data->OrigProc = (WNDPROC)_GetWindowLongPtrW(hWndEdit, GWLP_WNDPROC); + data->OrigProc = (WNDPROC)GetWindowLongPtrW(hWndEdit, GWLP_WNDPROC); data->OrigUser = (LONG_PTR)GetWindowLongPtr(hWndEdit, GWLP_USERDATA); data->IsComboBox = IsCombobox; - _SetWindowLongPtrW(hWndEdit, GWLP_WNDPROC, (LONG_PTR)HostnameEditProc); + SetWindowLongPtrW(hWndEdit, GWLP_WNDPROC, (LONG_PTR)HostnameEditProc); SetWindowLongPtr(hWndEdit, GWLP_USERDATA, (LONG_PTR)data); } @@ -505,7 +504,7 @@ return NULL; } - _GetWindowTextW(hWnd, strW, len + 1); + GetWindowTextW(hWnd, strW, len + 1); strW[len] = 0; return strW; } Modified: trunk/teraterm/common/dlglib_cpp.cpp =================================================================== --- trunk/teraterm/common/dlglib_cpp.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/common/dlglib_cpp.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -38,7 +38,6 @@ #include "dlglib.h" #include "ttlib.h" -#include "layer_for_unicode.h" #include "codeconv.h" /** @@ -60,7 +59,7 @@ LPARAM lParamInit) // \x8F\x89\x8A\xFA\x89\xBB\x92l { DLGTEMPLATE *lpTemplate = TTGetDlgTemplate(hInstance, lpTemplateName); - HWND hDlgWnd = _CreateDialogIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, lParamInit); + HWND hDlgWnd = CreateDialogIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, lParamInit); free(lpTemplate); return hDlgWnd; } @@ -102,7 +101,7 @@ LPARAM lParamInit) // \x8F\x89\x8A\xFA\x89\xBB\x92l { DLGTEMPLATE *lpTemplate = TTGetDlgTemplate(hInstance, lpTemplateName); - INT_PTR DlgResult = _DialogBoxIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, lParamInit); + INT_PTR DlgResult = DialogBoxIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, lParamInit); free(lpTemplate); return DlgResult; } Modified: trunk/teraterm/common/dllutil.cpp =================================================================== --- trunk/teraterm/common/dllutil.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/common/dllutil.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -33,8 +33,6 @@ #endif #include <crtdbg.h> -#include "layer_for_unicode.h" - #include "dllutil.h" typedef struct { @@ -56,7 +54,7 @@ int r; if (LoadFlag == DLL_GET_MODULE_HANDLE) { - module = _GetModuleHandleW(dllName); + module = GetModuleHandleW(dllName); assert(module != NULL); return module; } @@ -75,12 +73,12 @@ dllPath[0] = 0; switch (LoadFlag) { case DLL_LOAD_LIBRARY_SYSTEM: - r = _GetSystemDirectoryW(dllPath, _countof(dllPath)); + r = GetSystemDirectoryW(dllPath, _countof(dllPath)); assert(r != 0); if (r == 0) return NULL; break; case DLL_LOAD_LIBRARY_CURRENT: - r = _GetModuleFileNameW(NULL, dllPath, _countof(dllPath)); + r = GetModuleFileNameW(NULL, dllPath, _countof(dllPath)); assert(r != 0); if (r == 0) return NULL; *wcsrchr(dllPath, L'\\') = 0; @@ -90,7 +88,7 @@ } wcscat_s(dllPath, _countof(dllPath), L"\\"); wcscat_s(dllPath, _countof(dllPath), dllName); - module = _LoadLibraryW(dllPath); + module = LoadLibraryW(dllPath); if (module == NULL) { // \x91\xB6\x8D݂\xB5\x82Ȃ\xA2,dll\x82\xB6\x82\xE1\x82Ȃ\xA2? return NULL; Modified: trunk/teraterm/common/i18n_static.c =================================================================== --- trunk/teraterm/common/i18n_static.c 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/common/i18n_static.c 2021-06-29 15:20:20 UTC (rev 9324) @@ -29,7 +29,6 @@ #include "i18n.h" #include "codeconv.h" #include "compat_win.h" -#include "layer_for_unicode.h" #include <assert.h> @@ -109,10 +108,10 @@ if (infos->key != NULL) { wchar_t uimsg[MAX_UIMSG]; GetI18nStrW(section, infos->key, uimsg, _countof(uimsg), infos->default_text, UILanguageFile); - _SendDlgItemMessageW(hDlg, nIDDlgItem, ADDSTRING, 0, (LPARAM)uimsg); + SendDlgItemMessageW(hDlg, nIDDlgItem, ADDSTRING, 0, (LPARAM)uimsg); } else { - _SendDlgItemMessageW(hDlg, nIDDlgItem, ADDSTRING, 0, (LPARAM)infos->default_text); + SendDlgItemMessageW(hDlg, nIDDlgItem, ADDSTRING, 0, (LPARAM)infos->default_text); } infos++; } Modified: trunk/teraterm/common/tipwin.cpp =================================================================== --- trunk/teraterm/common/tipwin.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/common/tipwin.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -66,7 +66,6 @@ #include "ttlib.h" // for GetMessageboxFont() #include "codeconv.h" -#include "layer_for_unicode.h" #include "tipwin.h" @@ -91,8 +90,8 @@ SelectObject(hdc, tWin->tip_font); tWin->str_rect.top = 0; tWin->str_rect.left = 0; - _DrawTextW(hdc, tWin->str, (int)tWin->str_len, - &tWin->str_rect, DT_LEFT|DT_CALCRECT); + DrawTextW(hdc, tWin->str, (int)tWin->str_len, + &tWin->str_rect, DT_LEFT|DT_CALCRECT); DeleteDC(hdc); } @@ -141,7 +140,7 @@ rect.right = rect.right + TIP_WIN_FRAME_WIDTH; rect.top = rect.top + TIP_WIN_FRAME_WIDTH; rect.bottom = rect.bottom + TIP_WIN_FRAME_WIDTH; - _DrawTextW(hdc, self->tWin->str, (int)self->tWin->str_len, &rect, DT_LEFT); + DrawTextW(hdc, self->tWin->str, (int)self->tWin->str_len, &rect, DT_LEFT); } SelectObject(hdc, holdbr); @@ -202,7 +201,7 @@ wc.hbrBackground = NULL; wc.lpszMenuName = NULL; wc.lpszClassName = class_name; - return _RegisterClassW(&wc); + return RegisterClassW(&wc); } VOID CTipWin::Create(HWND pHwnd) @@ -232,12 +231,12 @@ logfont.lfHeight = MulDiv(logfont.lfHeight, uDpi, 96); tWin->tip_font = CreateFontIndirect(&logfont); tWin->tip_wnd = - _CreateWindowExW(WS_EX_TOOLWINDOW | WS_EX_TOPMOST, - class_name, - NULL, WS_POPUP, - 0, 0, - 0, 0, - pHwnd, NULL, hInstance, this); + CreateWindowExW(WS_EX_TOOLWINDOW | WS_EX_TOPMOST, + class_name, + NULL, WS_POPUP, + 0, 0, + 0, 0, + pHwnd, NULL, hInstance, this); timerid = 0; } @@ -450,7 +449,7 @@ SelectObject(hdc, tip_font); str_rect.top = 0; str_rect.left = 0; - _DrawTextW(hdc, str, (int)str_len, &str_rect, DT_LEFT|DT_CALCRECT); + DrawTextW(hdc, str, (int)str_len, &str_rect, DT_LEFT|DT_CALCRECT); *width = str_rect.right - str_rect.left; *height = str_rect.bottom - str_rect.top; DeleteDC(hdc); Modified: trunk/teraterm/common/tmfc.cpp =================================================================== --- trunk/teraterm/common/tmfc.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/common/tmfc.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -36,7 +36,6 @@ #include "dlglib.h" #include "ttlib.h" #include "compat_win.h" -#include "layer_for_unicode.h" // \x83e\x83\x93\x83v\x83\x8C\x81[\x83g\x82̏\x91\x82\xAB\x8A\xB7\x82\xA6\x82\xF0\x8Ds\x82\xA4 #define REWRITE_TEMPLATE @@ -67,7 +66,7 @@ LRESULT TTCWnd::SendDlgItemMessageW(int id, UINT msg, WPARAM wp, LPARAM lp) { - return ::_SendDlgItemMessageW(m_hWnd, id, msg, wp, lp); + return ::SendDlgItemMessageW(m_hWnd, id, msg, wp, lp); } LRESULT TTCWnd::SendDlgItemMessageA(int id, UINT msg, WPARAM wp, LPARAM lp) @@ -77,7 +76,7 @@ void TTCWnd::GetDlgItemTextW(int id, wchar_t *buf, size_t size) { - _GetDlgItemTextW(m_hWnd, id, buf, (int)size); + ::GetDlgItemTextW(m_hWnd, id, buf, (int)size); } void TTCWnd::GetDlgItemTextA(int id, char *buf, size_t size) @@ -87,7 +86,7 @@ void TTCWnd::SetDlgItemTextW(int id, const wchar_t *str) { - _SetDlgItemTextW(m_hWnd, id, str); + ::SetDlgItemTextW(m_hWnd, id, str); } void TTCWnd::SetDlgItemTextA(int id, const char *str) @@ -162,7 +161,7 @@ void TTCWnd::SetWindowTextW(const wchar_t *str) { - _SetWindowTextW(m_hWnd, str); + ::SetWindowTextW(m_hWnd, str); } void TTCWnd::SetWindowTextA(const char *str) @@ -525,7 +524,7 @@ dlgproc = nullptr; } pseudoPtr = this; - HWND hWnd = _CreateDialogIndirectParamW( + HWND hWnd = CreateDialogIndirectParamW( hInstance, lpTemplate, hParent, dlgproc, (LPARAM)this); pseudoPtr = nullptr; @@ -597,4 +596,3 @@ ::DestroyWindow(hWnd); } } - Modified: trunk/teraterm/common/tmfc_frame.cpp =================================================================== --- trunk/teraterm/common/tmfc_frame.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/common/tmfc_frame.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -32,7 +32,6 @@ #include "tmfc.h" #include "ttlib.h" #include "compat_win.h" -#include "layer_for_unicode.h" #if (defined(_MSC_VER) && (_MSC_VER <= 1500)) || \ (__cplusplus <= 199711L) @@ -102,7 +101,7 @@ m_hInst = hInstance; m_hParentWnd = hParentWnd; pseudoPtr = this; - HWND hWnd = _CreateWindowExW( + HWND hWnd = CreateWindowExW( WS_EX_OVERLAPPEDWINDOW, lpszClassName, lpszWindowName, Modified: trunk/teraterm/common/tmfc_property.cpp =================================================================== --- trunk/teraterm/common/tmfc_property.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/common/tmfc_property.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -36,7 +36,6 @@ #include <assert.h> #include "dlglib.h" #include "ttlib.h" -#include "layer_for_unicode.h" // \x83e\x83\x93\x83v\x83\x8C\x81[\x83g\x82̏\x91\x82\xAB\x8A\xB7\x82\xA6\x82\xF0\x8Ds\x82\xA4 #define REWRITE_TEMPLATE @@ -65,7 +64,7 @@ HPROPSHEETPAGE TTCPropertyPage::CreatePropertySheetPage() { - return ::_CreatePropertySheetPageW(&m_psp); + return ::CreatePropertySheetPageW((LPCPROPSHEETPAGEW)&m_psp); } void TTCPropertyPage::OnInitDialog() @@ -132,4 +131,3 @@ } return FALSE; } - Modified: trunk/teraterm/common/ttlib.c =================================================================== --- trunk/teraterm/common/ttlib.c 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/common/ttlib.c 2021-06-29 15:20:20 UTC (rev 9324) @@ -43,7 +43,6 @@ #include "tttypes.h" #include "compat_win.h" #include "codeconv.h" -#include "layer_for_unicode.h" #include "../teraterm/unicode_test.h" @@ -1019,8 +1018,8 @@ SetupFName = GetDefaultSetupFNameW(HomeDirW); /* Get LanguageFile name */ - _GetPrivateProfileStringW(L"Tera Term", entryW, L"off", - Temp, _countof(Temp), SetupFName); + GetPrivateProfileStringW(L"Tera Term", entryW, L"off", + Temp, _countof(Temp), SetupFName); TempA = ToCharW(Temp); strncpy_s(buf, buflen, TempA, _TRUNCATE); Modified: trunk/teraterm/common/ttlib_static.c =================================================================== --- trunk/teraterm/common/ttlib_static.c 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/common/ttlib_static.c 2021-06-29 15:20:20 UTC (rev 9324) @@ -41,7 +41,6 @@ #include "teraterm.h" #include "tttypes.h" #include "compat_win.h" -#include "layer_for_unicode.h" #include "../teraterm/unicode_test.h" @@ -285,7 +284,7 @@ va_start(arg, fmt); _vsnwprintf_s(tmp, _countof(tmp), _TRUNCATE, fmt, arg); va_end(arg); - _OutputDebugStringW(tmp); + OutputDebugStringW(tmp); } static int CALLBACK setDefaultFolder(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData) @@ -328,10 +327,10 @@ bi.lpfn = setDefaultFolder; bi.lParam = (LPARAM)def; // \x83t\x83H\x83\x8B\x83_\x91I\x91\xF0\x83_\x83C\x83A\x83\x8D\x83O\x82̕\\x8E\xA6 - pidlBrowse = _SHBrowseForFolderW(&bi); + pidlBrowse = SHBrowseForFolderW(&bi); if (pidlBrowse != NULL) { // PIDL\x8C`\x8E\xAE\x82̖߂\xE8\x92l\x82̃t\x83@\x83C\x83\x8B\x83V\x83X\x83e\x83\x80\x82̃p\x83X\x82ɕϊ\xB7 - if (_SHGetPathFromIDListW(pidlBrowse, buf)) { + if (SHGetPathFromIDListW(pidlBrowse, buf)) { // \x8E擾\x90\xAC\x8C\xF7 wcsncpy_s(path, pathlen, buf, _TRUNCATE); ret = TRUE; Modified: trunk/teraterm/common/ttlib_static_cpp.cpp =================================================================== --- trunk/teraterm/common/ttlib_static_cpp.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/common/ttlib_static_cpp.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -36,9 +36,9 @@ #include <crtdbg.h> #include <assert.h> #include <wchar.h> +#include <shlobj.h> #include "i18n.h" -#include "layer_for_unicode.h" #include "asprintf.h" #include "win32helper.h" #include "codeconv.h" @@ -98,7 +98,7 @@ free(format); } - int r = _MessageBoxW(hWnd, message, title, uType); + int r = MessageBoxW(hWnd, message, title, uType); free(title); free(message); @@ -185,12 +185,12 @@ } if (Cf == CF_HDROP) { HDROP hDrop = (HDROP)TmpHandle; - UINT count = _DragQueryFileW(hDrop, (UINT)-1, NULL, 0); + UINT count = DragQueryFileW(hDrop, (UINT)-1, NULL, 0); // text length size_t length = 0; for (UINT i = 0; i < count; i++) { - const UINT l = _DragQueryFileW(hDrop, i, NULL, 0); + const UINT l = DragQueryFileW(hDrop, i, NULL, 0); if (l == 0) { continue; } @@ -201,7 +201,7 @@ str_w = (wchar_t *)malloc(length * sizeof(wchar_t)); wchar_t *p = str_w; for (UINT i = 0; i < count; i++) { - const UINT l = _DragQueryFileW(hDrop, i, p, (UINT)(length - (p - str_w))); + const UINT l = DragQueryFileW(hDrop, i, p, (UINT)(length - (p - str_w))); if (l == 0) { continue; } @@ -596,8 +596,8 @@ unsigned long long GetFSize64W(const wchar_t *FName) { - HANDLE hFile = _CreateFileW(FName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, NULL); + HANDLE hFile = CreateFileW(FName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { return 0; } @@ -872,7 +872,7 @@ IMalloc *pmalloc; SHGetMalloc(&pmalloc); if (SHGetSpecialFolderLocation(NULL, CSIDL_PERSONAL, &pidl) == S_OK) { - _SHGetPathFromIDListW(pidl, MyDoc); + SHGetPathFromIDListW(pidl, MyDoc); pmalloc->Free(pidl); pmalloc->Release(); } @@ -888,7 +888,7 @@ wcscpy(dest, MyDoc); AppendSlashW(dest,destlen); wcsncat_s(dest, destlen, file, _TRUNCATE); - if (_GetFileAttributesW(dest) != INVALID_FILE_ATTRIBUTES) { + if (GetFileAttributesW(dest) != INVALID_FILE_ATTRIBUTES) { // My Documents \x82̐ݒ\xE8\x83t\x83@\x83C\x83\x8B return dest; } Modified: trunk/teraterm/common/win32helper.cpp =================================================================== --- trunk/teraterm/common/win32helper.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/common/win32helper.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -31,8 +31,6 @@ #include <stdlib.h> #include <crtdbg.h> -#include "layer_for_unicode.h" - #include "win32helper.h" /** @@ -53,7 +51,7 @@ } for(;;) { - DWORD r = _GetModuleFileNameW(hModule, b, (DWORD)size); + DWORD r = GetModuleFileNameW(hModule, b, (DWORD)size); if (r == 0) { // \x8A\x94\x82\xAA\x8E\xB8\x94s error = GetLastError(); @@ -101,7 +99,7 @@ } b[0] = 0; for(;;) { - DWORD r = _GetPrivateProfileStringW(section, key, def, b, (DWORD)size, ini); + DWORD r = GetPrivateProfileStringW(section, key, def, b, (DWORD)size, ini); if (r == 0 || b[0] == L'\0') { // \x8E\x9F\x82̏ꍇ\x82\xB1\x82\xB1\x82ɓ\xFC\x82\xE9 // ini\x82\xC9'key='\x82ƋL\x8Fq ("="\x82̌\xE3\x82ɉ\xBD\x82\xE0\x8F\x91\x82\xA2\x82Ă\xA2\x82Ȃ\xA2) @@ -143,7 +141,7 @@ */ DWORD hGetFullPathNameW(const wchar_t *lpFileName, wchar_t **fullpath, wchar_t **filepart) { - size_t len = _GetFullPathNameW(lpFileName, 0, NULL, NULL); // include L'\0' + size_t len = GetFullPathNameW(lpFileName, 0, NULL, NULL); // include L'\0' if (len == 0) { *fullpath = NULL; *filepart = NULL; @@ -151,7 +149,7 @@ } wchar_t *path = (wchar_t *)malloc(sizeof(wchar_t) * len); wchar_t *file; - len = _GetFullPathNameW(lpFileName, (DWORD)len, path, &file); + len = GetFullPathNameW(lpFileName, (DWORD)len, path, &file); if (len == 0) { free(path); return GetLastError(); Modified: trunk/teraterm/libmingw/test/outputdebugprintf.cpp =================================================================== --- trunk/teraterm/libmingw/test/outputdebugprintf.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/libmingw/test/outputdebugprintf.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -3,7 +3,6 @@ #include <windows.h> #include "ttlib.h" -#include "layer_for_unicode.h" #include "compat_win.h" void OutputDebugPrintf(const char *fmt, ...) @@ -23,5 +22,5 @@ va_start(arg, fmt); _vsnwprintf_s(tmp, _countof(tmp), _TRUNCATE, fmt, arg); va_end(arg); - _OutputDebugStringW(tmp); + OutputDebugStringW(tmp); } Modified: trunk/teraterm/susie_plugin/CMakeLists.txt =================================================================== --- trunk/teraterm/susie_plugin/CMakeLists.txt 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/susie_plugin/CMakeLists.txt 2021-06-29 15:20:20 UTC (rev 9324) @@ -33,12 +33,6 @@ . ) -target_compile_definitions( - spi_tester - PRIVATE - WITHOUT_TERATERM - ) - add_library( ttspijpeg SHARED plugin/spi_jpeg.cpp Modified: trunk/teraterm/susie_plugin/libsusieplugin.cpp =================================================================== --- trunk/teraterm/susie_plugin/libsusieplugin.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/susie_plugin/libsusieplugin.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -28,16 +28,6 @@ #include "libsusieplugin.h" -#if !defined(WITHOUT_TERATERM) -#include "layer_for_unicode.h" -#define CreateFileW _CreateFileW -#define GetFileAttributesW _GetFileAttributesW -#define GetFullPathNameW _GetFullPathNameW -#define FindFirstFileW _FindFirstFileW -#define FindNextFileW _FindNextFileW -#define LoadLibraryW _LoadLibraryW -#endif - #if defined(_M_X64) #define PLUGIN_EXT L".sph" #else Modified: trunk/teraterm/teraterm/CMakeLists.txt =================================================================== --- trunk/teraterm/teraterm/CMakeLists.txt 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/CMakeLists.txt 2021-06-29 15:20:20 UTC (rev 9324) @@ -138,7 +138,6 @@ ../common/dllutil.h ../common/codeconv.h ../common/tipwin.h - ../common/layer_for_unicode.h # ../teraterm/unisym2decsp.map ../teraterm/uni2sjis.map @@ -286,7 +285,6 @@ PRIVATE common_static ttpcmn - #ttpfile ttpset ttptek ${ONIGURUMA_LIB} Modified: trunk/teraterm/teraterm/addsetting.cpp =================================================================== --- trunk/teraterm/teraterm/addsetting.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/addsetting.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -51,7 +51,6 @@ #include "tipwin.h" #include "i18n.h" #include "codeconv.h" -#include "layer_for_unicode.h" #include "coding_pp.h" #include "font_pp.h" @@ -530,7 +529,7 @@ ofn.nMaxFile = _countof(fileW); ofn.lpstrTitle = TTGetLangStrW("Tera Term", "FILEDLG_SELECT_CONFIRM_STRING_APP_TITLE", L"Choose a file including strings for ConfirmChangePaste", ts.UILanguageFile); ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY; - BOOL ok = _GetOpenFileNameW(&ofn); + BOOL ok = GetOpenFileNameW(&ofn); if (ok) { char *file = ToCharW(fileW); strncpy_s(ts.ConfirmChangePasteStringFile, sizeof(ts.ConfirmChangePasteStringFile), file, _TRUNCATE); @@ -953,7 +952,7 @@ ofn.nMaxFile = _countof(szFile); ofn.lpstrTitle = L"select image file"; ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY; - BOOL ok = _GetOpenFileNameW(&ofn); + BOOL ok = GetOpenFileNameW(&ofn); if (ok) { SetDlgItemTextW(IDC_BGIMG_EDIT, szFile); } @@ -1406,7 +1405,7 @@ ofn.nMaxFile = _countof(fileW); ofn.lpstrTitle = TTGetLangStrW("Tera Term", "FILEDLG_SELECT_LOGVIEW_APP_TITLE", L"Choose a executing file with launching logging file", ts.UILanguageFile); ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY; - BOOL ok = _GetOpenFileNameW(&ofn); + BOOL ok = GetOpenFileNameW(&ofn); if (ok) { char *file = ToCharW(fileW); strncpy_s(ts.ViewlogEditor, sizeof(ts.ViewlogEditor), file, _TRUNCATE); @@ -1797,5 +1796,5 @@ { ghInstance = m_hInst; gTTCPS = this; - return _PropertySheetW(&m_psh); + return PropertySheetW(&m_psh); } Modified: trunk/teraterm/teraterm/broadcast.cpp =================================================================== --- trunk/teraterm/teraterm/broadcast.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/broadcast.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -47,7 +47,6 @@ #include "ttlib.h" #include "dlglib.h" #include "tt_res.h" -#include "layer_for_unicode.h" #include "codeconv.h" #include "sendmem.h" //#include "clipboar.h" // TODO \x8F\xC1\x82\xB7 @@ -231,7 +230,7 @@ default: break; } - return _CallWindowProcW(OrigBroadcastEditProc, dlg, msg, wParam, lParam); + return CallWindowProcW(OrigBroadcastEditProc, dlg, msg, wParam, lParam); } static void UpdateBroadcastWindowList(HWND hWnd) @@ -462,7 +461,7 @@ // \x83T\x83u\x83N\x83\x89\x83X\x89\xBB\x82\xB3\x82\xB9\x82ă\x8A\x83A\x83\x8B\x83^\x83C\x83\x80\x83\x82\x81[\x83h\x82ɂ\xB7\x82\xE9 (2008.1.21 yutaka) hwndBroadcast = GetDlgItem(hWnd, IDC_COMMAND_EDIT); hwndBroadcastEdit = GetWindow(hwndBroadcast, GW_CHILD); - OrigBroadcastEditProc = (WNDPROC)_SetWindowLongPtrW(hwndBroadcastEdit, GWLP_WNDPROC, (LONG_PTR)BroadcastEditProc); + OrigBroadcastEditProc = (WNDPROC)SetWindowLongPtrW(hwndBroadcastEdit, GWLP_WNDPROC, (LONG_PTR)BroadcastEditProc); // \x83f\x83t\x83H\x83\x8B\x83g\x82\xCDon\x81B\x8Ec\x82\xE8\x82\xCDdisable\x81B SendMessage(GetDlgItem(hWnd, IDC_REALTIME_CHECK), BM_SETCHECK, BST_CHECKED, 0); // default on EnableWindow(GetDlgItem(hWnd, IDC_HISTORY_CHECK), FALSE); @@ -537,7 +536,7 @@ // new handler hwndBroadcast = GetDlgItem(hWnd, IDC_COMMAND_EDIT); hwndBroadcastEdit = GetWindow(hwndBroadcast, GW_CHILD); - OrigBroadcastEditProc = (WNDPROC)_SetWindowLongPtrW(hwndBroadcastEdit, GWLP_WNDPROC, (LONG_PTR)BroadcastEditProc); + OrigBroadcastEditProc = (WNDPROC)SetWindowLongPtrW(hwndBroadcastEdit, GWLP_WNDPROC, (LONG_PTR)BroadcastEditProc); EnableWindow(GetDlgItem(hWnd, IDC_HISTORY_CHECK), FALSE); EnableWindow(GetDlgItem(hWnd, IDC_RADIO_CRLF), FALSE); @@ -548,7 +547,7 @@ EnableWindow(GetDlgItem(hWnd, IDC_LIST), TRUE); // true } else { // restore old handler - _SetWindowLongPtrW(hwndBroadcastEdit, GWLP_WNDPROC, (LONG_PTR)OrigBroadcastEditProc); + SetWindowLongPtrW(hwndBroadcastEdit, GWLP_WNDPROC, (LONG_PTR)OrigBroadcastEditProc); EnableWindow(GetDlgItem(hWnd, IDC_HISTORY_CHECK), TRUE); EnableWindow(GetDlgItem(hWnd, IDC_RADIO_CRLF), TRUE); @@ -576,7 +575,7 @@ SetDlgItemTextA(hWnd, IDC_COMMAND_EDIT, ""); } else { - UINT ret = _GetDlgItemTextW(hWnd, IDC_COMMAND_EDIT, buf, 256 - 1); + UINT ret = GetDlgItemTextW(hWnd, IDC_COMMAND_EDIT, buf, 256 - 1); if (ret == 0) { // error memset(buf, 0, sizeof(buf)); } Modified: trunk/teraterm/teraterm/clipboarddlg.cpp =================================================================== --- trunk/teraterm/teraterm/clipboarddlg.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/clipboarddlg.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -41,7 +41,6 @@ #include "ttcommon.h" #include "ttlib.h" #include "dlglib.h" -#include "layer_for_unicode.h" #include "tt_res.h" #include "clipboarddlg.h" #include "compat_win.h" @@ -92,7 +91,7 @@ SetDlgTexts(hDlgWnd, TextInfos, _countof(TextInfos), data->UILanguageFile); if (data->strW_ptr != NULL) { - _SetDlgItemTextW(hDlgWnd, IDC_EDIT, data->strW_ptr); + SetDlgItemTextW(hDlgWnd, IDC_EDIT, data->strW_ptr); } else { SetDlgItemTextA(hDlgWnd, IDC_EDIT, data->strA_ptr); } @@ -184,11 +183,11 @@ { INT_PTR result = IDCANCEL; - size_t len = _SendDlgItemMessageW(hDlgWnd, IDC_EDIT, WM_GETTEXTLENGTH, 0, 0); + size_t len = SendDlgItemMessageW(hDlgWnd, IDC_EDIT, WM_GETTEXTLENGTH, 0, 0); len++; // for '\0' wchar_t *strW = (wchar_t *)malloc(sizeof(wchar_t) * len); if (strW != NULL) { - _GetDlgItemTextW(hDlgWnd, IDC_EDIT, strW, (int)len); + GetDlgItemTextW(hDlgWnd, IDC_EDIT, strW, (int)len); strW[len - 1] = '\0'; result = IDOK; } Modified: trunk/teraterm/teraterm/coding_pp.cpp =================================================================== --- trunk/teraterm/teraterm/coding_pp.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/coding_pp.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -39,7 +39,6 @@ #include "dlglib.h" #include "compat_win.h" #include "setting.h" -#include "layer_for_unicode.h" #include "helpid.h" #include "coding_pp.h" @@ -333,6 +332,6 @@ psp.pfnDlgProc = Proc; psp.lParam = (LPARAM)Param; - HPROPSHEETPAGE hpsp = _CreatePropertySheetPageW(&psp); + HPROPSHEETPAGE hpsp = CreatePropertySheetPageW((LPCPROPSHEETPAGEW)&psp); return hpsp; } Modified: trunk/teraterm/teraterm/dnddlg.cpp =================================================================== --- trunk/teraterm/teraterm/dnddlg.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/dnddlg.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -37,7 +37,6 @@ #include "i18n.h" #include "ttlib.h" #include "dlglib.h" -#include "layer_for_unicode.h" struct DrapDropDlgParam { const wchar_t *TargetFilename; @@ -93,7 +92,7 @@ SetDlgTexts(hDlgWnd, TextInfos, _countof(TextInfos), Param->UILanguageFile); // target file - _SetDlgItemTextW(hDlgWnd, IDC_FILENAME_EDIT, Param->TargetFilename); + SetDlgItemTextW(hDlgWnd, IDC_FILENAME_EDIT, Param->TargetFilename); // checkbox CheckRadioButton(hDlgWnd, IDC_SCP_RADIO, IDC_PASTE_RADIO, Modified: trunk/teraterm/teraterm/filesys.cpp =================================================================== --- trunk/teraterm/teraterm/filesys.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/filesys.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -39,7 +39,6 @@ #include "ttcommon.h" #include "ttdde.h" #include "vtterm.h" -#include "layer_for_unicode.h" #include "asprintf.h" #include "codeconv.h" @@ -198,7 +197,7 @@ SendVar->FullName = _wcsdup(filename); ts.TransBin = binary; - SendVar->FileHandle = _CreateFileW(SendVar->FullName, GENERIC_READ, FILE_SHARE_READ, NULL, + SendVar->FileHandle = CreateFileW(SendVar->FullName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL); if (SendVar->FileHandle == INVALID_HANDLE_VALUE) { FileSendEnd(); Modified: trunk/teraterm/teraterm/filesys_log.cpp =================================================================== --- trunk/teraterm/teraterm/filesys_log.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/filesys_log.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -50,8 +50,6 @@ #include "ftlib.h" #include "buffer.h" #include "helpid.h" -#include "layer_for_unicode.h" -#include "layer_for_unicode_crt.h" #include "codeconv.h" #include "asprintf.h" @@ -362,13 +360,13 @@ *bom = 0; // \x83t\x83@\x83C\x83\x8B\x82\xAA\x91\xB6\x8D݂\xB7\x82\xE9? - DWORD logdir = _GetFileAttributesW(filename); + DWORD logdir = GetFileAttributesW(filename); if ((logdir != INVALID_FILE_ATTRIBUTES) && ((logdir & FILE_ATTRIBUTE_DIRECTORY) == 0)) { // \x83t\x83@\x83C\x83\x8B\x82\xAA\x82\xA0\x82\xC1\x82\xBD *exist = TRUE; // BOM\x97L\x82\xE8/\x96\xB3\x82\xB5\x83`\x83F\x83b\x83N - FILE *fp = __wfopen(filename, L"rb"); + FILE *fp = _wfopen(filename, L"rb"); if (fp != NULL) { unsigned char tmp[4]; size_t l = fread(tmp, 1, sizeof(tmp), fp); @@ -504,7 +502,7 @@ SendDlgItemMessage(Dialog, IDC_TEXTCODING_DROPDOWN, CB_ADDSTRING, 0, (LPARAM)"UTF-16BE"); SendDlgItemMessage(Dialog, IDC_TEXTCODING_DROPDOWN, CB_SETCURSEL, 0, 0); - _SetDlgItemTextW(Dialog, IDC_FOPT_FILENAME_EDIT, work->info->filename); + SetDlgItemTextW(Dialog, IDC_FOPT_FILENAME_EDIT, work->info->filename); work->info->filename = NULL; // Binary/Text \x83`\x83F\x83b\x83N\x83{\x83b\x83N\x83X @@ -562,7 +560,7 @@ switch (LOWORD(wParam)) { case IDOK: { wchar_t filename[MAX_PATH]; - _GetDlgItemTextW(Dialog, IDC_FOPT_FILENAME_EDIT, filename, _countof(filename)); + GetDlgItemTextW(Dialog, IDC_FOPT_FILENAME_EDIT, filename, _countof(filename)); work->info->filename = _wcsdup(filename); work->info->append = IsDlgButtonChecked(Dialog, IDC_APPEND) == BST_CHECKED; work->info->bom = IsDlgButtonChecked(Dialog, IDC_BOM) == BST_CHECKED; @@ -581,7 +579,7 @@ /* save current dir */ const char *UILanguageFile = work->pts->UILanguageFile; wchar_t curdir[MAXPATHLEN]; - _GetCurrentDirectoryW(_countof(curdir), curdir); + GetCurrentDirectoryW(_countof(curdir), curdir); wchar_t fname[MAX_PATH]; GetDlgItemTextW(Dialog, IDC_FOPT_FILENAME_EDIT, fname, _countof(fname)); @@ -606,7 +604,7 @@ ofn.lpstrFile = fname; ofn.nMaxFile = _countof(fname); ofn.lpstrTitle = caption; - BOOL Ok = _GetSaveFileNameW(&ofn); + BOOL Ok = GetSaveFileNameW(&ofn); free(FNFilter); if (Ok) { SetDlgItemTextW(Dialog, IDC_FOPT_FILENAME_EDIT, fname); @@ -613,7 +611,7 @@ } /* restore dir */ - _SetCurrentDirectoryW(curdir); + SetCurrentDirectoryW(curdir); break; } @@ -658,16 +656,16 @@ case WM_DROPFILES: { // \x95\xA1\x90\x94\x83h\x83\x8D\x83b\x83v\x82\xB3\x82\xEA\x82Ă\xE0\x8Dŏ\x89\x82\xCC1\x82\xBE\x82\xAF\x82\xF0\x88\xB5\x82\xA4 HDROP hDrop = (HDROP)wParam; - const UINT len = _DragQueryFileW(hDrop, 0, NULL, 0); + const UINT len = DragQueryFileW(hDrop, 0, NULL, 0); if (len == 0) { DragFinish(hDrop); return TRUE; } wchar_t *filename = (wchar_t *)malloc(sizeof(wchar_t) * (len + 1)); - _DragQueryFileW(hDrop, 0, filename, len + 1); + DragQueryFileW(hDrop, 0, filename, len + 1); filename[len] = '\0'; CheckRadioButton(Dialog, IDC_NEW_OVERWRITE, IDC_APPEND, IDC_APPEND); - _SetDlgItemTextW(Dialog, IDC_FOPT_FILENAME_EDIT, filename); + SetDlgItemTextW(Dialog, IDC_FOPT_FILENAME_EDIT, filename); SendDlgItemMessage(Dialog, IDC_FOPT_FILENAME_EDIT, EM_SETSEL, len, len); free(filename); DragFinish(hDrop); @@ -685,7 +683,7 @@ if (!ts.LogLockExclusive) { dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; } - LogVar->FileHandle = _CreateFileW(LogVar->FullName, GENERIC_WRITE, dwShareMode, NULL, + LogVar->FileHandle = CreateFileW(LogVar->FullName, GENERIC_WRITE, dwShareMode, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); } @@ -892,7 +890,7 @@ for (i = 1 ; i <= loopmax ; i++) { wchar_t *filename; aswprintf(&filename, L"%s.%d", LogVar->FullName, i); - DWORD attr = _GetFileAttributesW(filename); + DWORD attr = GetFileAttributesW(filename); free(filename); if (attr == INVALID_FILE_ATTRIBUTES) break; @@ -911,8 +909,8 @@ aswprintf(&oldfile, L"%s.%d", LogVar->FullName, k); wchar_t *newfile; aswprintf(&newfile, L"%s.%d", LogVar->FullName, k+1); - _DeleteFileW(newfile); - if (_MoveFileW(oldfile, newfile) == 0) { + DeleteFileW(newfile); + if (MoveFileW(oldfile, newfile) == 0) { OutputDebugPrintf("%s: rename %d\n", __FUNCTION__, errno); } free(oldfile); @@ -1174,10 +1172,10 @@ case WM_COMMAND: switch (LOWORD(wp)) { case IDOK: { - size_t len = _SendDlgItemMessageW(hDlgWnd, IDC_EDIT_COMMENT, WM_GETTEXTLENGTH, 0, 0); + size_t len = SendDlgItemMessageW(hDlgWnd, IDC_EDIT_COMMENT, WM_GETTEXTLENGTH, 0, 0); len += 1; wchar_t *buf = (wchar_t *)malloc(len * sizeof(wchar_t)); - _GetDlgItemTextW(hDlgWnd, IDC_EDIT_COMMENT, buf, (int)len); + GetDlgItemTextW(hDlgWnd, IDC_EDIT_COMMENT, buf, (int)len); FLogWriteStr(buf); FLogWriteStr(L"\n"); // TODO \x89\xFC\x8Ds\x83R\x81[\x83h free(buf); Modified: trunk/teraterm/teraterm/filesys_proto.cpp =================================================================== --- trunk/teraterm/teraterm/filesys_proto.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/filesys_proto.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -48,7 +48,6 @@ #include "ftlib.h" #include "buffer.h" #include "helpid.h" -#include "layer_for_unicode.h" #include "codeconv.h" #include "asprintf.h" @@ -147,7 +146,7 @@ s = p + 1; } assert(fv->HWin != NULL); - _SetDlgItemTextW(fv->HWin, IDC_PROTOFNAME, wc::fromUtf8(s)); + SetDlgItemTextW(fv->HWin, IDC_PROTOFNAME, wc::fromUtf8(s)); } static void _InitDlgProgress(struct FileVarProto *fv, int *CurProgStat) @@ -216,7 +215,7 @@ // \x8E\xF3\x90M\x83t\x83H\x83\x8B\x83_ wchar_t FileDirExpanded[MAX_PATH]; - _ExpandEnvironmentStringsW((wc)ts.FileDir, FileDirExpanded, _countof(FileDirExpanded)); + ExpandEnvironmentStringsW((wc)ts.FileDir, FileDirExpanded, _countof(FileDirExpanded)); AppendSlashW(FileDirExpanded, _countof(FileDirExpanded)); fv->RecievePath = _wcsdup(FileDirExpanded); @@ -349,7 +348,7 @@ fv->Destroy(fv); return FALSE; } - _SetWindowTextW(fv->HWin, fv->DlgCaption); + SetWindowTextW(fv->HWin, fv->DlgCaption); PtDlg = pd; return TRUE; @@ -578,7 +577,7 @@ AppendSlashW(file, _countof(file)); wchar_t *FileSendFilterW = ToWcharA(FileSendFilterA); wcsncat_s(file, _countof(file), FileSendFilterW, _TRUNCATE); - DWORD attr = _GetFileAttributesW(file); + DWORD attr = GetFileAttributesW(file); if (attr != INVALID_FILE_ATTRIBUTES && (attr & FILE_ATTRIBUTE_DIRECTORY) == 0) { // \x83t\x83@\x83C\x83\x8B\x82\xAA\x91\xB6\x8D݂\xB7\x82\xE9 filename = _wcsdup(file); @@ -677,7 +676,7 @@ static wchar_t **_GetXFname(HWND HWin, BOOL Receive, const wchar_t *caption, LPLONG Option) { wchar_t FileDirExpanded[MAX_PATH]; - _ExpandEnvironmentStringsW((wc)ts.FileDir, FileDirExpanded, _countof(FileDirExpanded)); + ExpandEnvironmentStringsW((wc)ts.FileDir, FileDirExpanded, _countof(FileDirExpanded)); wchar_t *CurDir = FileDirExpanded; wchar_t *FNFilter = GetCommonDialogFilterW(!Receive ? ts.FileSendFilter : NULL, ts.UILanguageFile); @@ -719,17 +718,17 @@ /* save current dir */ wchar_t TempDir[MAX_PATH]; - _GetCurrentDirectoryW(_countof(TempDir), TempDir); + GetCurrentDirectoryW(_countof(TempDir), TempDir); BOOL Ok; if (!Receive) { - Ok = _GetOpenFileNameW(&ofn); + Ok = GetOpenFileNameW(&ofn); } else { - Ok = _GetSaveFileNameW(&ofn); + Ok = GetSaveFileNameW(&ofn); } free(FNFilter); - _SetCurrentDirectoryW(TempDir); + SetCurrentDirectoryW(TempDir); wchar_t **ret = NULL; if (Ok) { @@ -812,7 +811,7 @@ switch (LOWORD(wParam)) { case IDOK: if (fv!=NULL) { - _GetDlgItemTextW(Dialog, IDC_GETFN, TempFull, _countof(TempFull)); + GetDlgItemTextW(Dialog, IDC_GETFN, TempFull, _countof(TempFull)); if (wcslen(TempFull)==0) { fv->FileNames = NULL; return TRUE; @@ -933,11 +932,11 @@ const char *UILanguageFile = ts.UILanguageFile; wchar_t FileDirExpanded[MAX_PATH]; - _ExpandEnvironmentStringsW((wc)ts.FileDir, FileDirExpanded, _countof(FileDirExpanded)); + ExpandEnvironmentStringsW((wc)ts.FileDir, FileDirExpanded, _countof(FileDirExpanded)); wchar_t *CurDir = FileDirExpanded; /* save current dir */ - _GetCurrentDirectoryW(_countof(TempDir), TempDir); + GetCurrentDirectoryW(_countof(TempDir), TempDir); wchar_t *FnStrMem = (wchar_t *)malloc(FnStrMemSize * sizeof(wchar_t)); if (FnStrMem == NULL) { @@ -979,7 +978,7 @@ ofn.hInstance = hInst; - BOOL Ok = _GetOpenFileNameW(&ofn); + BOOL Ok = GetOpenFileNameW(&ofn); free(FNFilter); wchar_t **ret = NULL; @@ -990,7 +989,7 @@ free(FnStrMem); /* restore dir */ - _SetCurrentDirectoryW(TempDir); + SetCurrentDirectoryW(TempDir); return ret; } @@ -1497,11 +1496,11 @@ const char *UILanguageFile = ts.UILanguageFile; wchar_t FileDirExpanded[MAX_PATH]; - _ExpandEnvironmentStringsW((wc)ts.FileDir, FileDirExpanded, sizeof(FileDirExpanded)); + ExpandEnvironmentStringsW((wc)ts.FileDir, FileDirExpanded, sizeof(FileDirExpanded)); wchar_t *CurDir = FileDirExpanded; /* save current dir */ - _GetCurrentDirectoryW(_countof(TempDir), TempDir); + GetCurrentDirectoryW(_countof(TempDir), TempDir); wchar_t *FNFilter = GetCommonDialogFilterW(ts.FileSendFilter, UILanguageFile); @@ -1517,7 +1516,7 @@ ofn.lpstrTitle = DlgCaption; ofn.hInstance = hInst; - BOOL Ok = _GetOpenFileNameW(&ofn); + BOOL Ok = GetOpenFileNameW(&ofn); free(FNFilter); wchar_t **ret = NULL; @@ -1525,7 +1524,7 @@ ret = MakeStrArrayFromStr(FileName); } /* restore dir */ - _SetCurrentDirectoryW(TempDir); + SetCurrentDirectoryW(TempDir); return ret; } Modified: trunk/teraterm/teraterm/font_pp.cpp =================================================================== --- trunk/teraterm/teraterm/font_pp.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/font_pp.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -38,7 +38,6 @@ #include "font_pp_res.h" #include "dlglib.h" #include "setting.h" -#include "layer_for_unicode.h" #include "vtdisp.h" // for DispSetupFontDlg() #include "buffer.h" #include "compat_win.h" // for CF_INACTIVEFONTS @@ -79,7 +78,7 @@ wchar_t uimsg[MAX_UIMSG]; get_lang_msgW("DLG_CHOOSEFONT_STC6", uimsg, _countof(uimsg), L"\"Font style\" selection here won't affect actual font appearance.", dlg_data->UILanguageFile); - _SetDlgItemTextW(Dialog, stc6, uimsg); + SetDlgItemTextW(Dialog, stc6, uimsg); SetFocus(GetDlgItem(Dialog,cmb1)); @@ -282,6 +281,6 @@ psp.pfnDlgProc = Proc; psp.lParam = (LPARAM)Param; - HPROPSHEETPAGE hpsp = _CreatePropertySheetPageW(&psp); + HPROPSHEETPAGE hpsp = CreatePropertySheetPageW((LPPROPSHEETPAGEW)&psp); return hpsp; } Modified: trunk/teraterm/teraterm/sendfiledlg.cpp =================================================================== --- trunk/teraterm/teraterm/sendfiledlg.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/sendfiledlg.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -32,12 +32,12 @@ #include <stdlib.h> #include <crtdbg.h> #include <wchar.h> +#include <commctrl.h> #include "i18n.h" #include "tt_res.h" #include "ttlib.h" #include "dlglib.h" -#include "layer_for_unicode.h" #include "tttypes.h" // for WM_USER_DLGHELP2 #include "helpid.h" #include "codeconv.h" @@ -177,7 +177,7 @@ case IDOK | (BN_CLICKED << 16): { wchar_t *strW = AllocControlTextW(GetDlgItem(hDlgWnd, IDC_SENDFILE_FILENAME_EDIT)); - const DWORD attr = _GetFileAttributesW(strW); + const DWORD attr = GetFileAttributesW(strW); if (attr == INVALID_FILE_ATTRIBUTES || attr & FILE_ATTRIBUTE_DIRECTORY) { static const TTMessageBoxInfoW mbinfo = { "Tera Term", @@ -218,7 +218,7 @@ case IDC_SENDFILE_FILENAME_BUTTON | (BN_CLICKED << 16): { wchar_t TempDir[MAX_PATH]; - _GetCurrentDirectoryW(_countof(TempDir), TempDir); + GetCurrentDirectoryW(_countof(TempDir), TempDir); wchar_t *uimsg = TTGetLangStrW("Tera Term", "FILEDLG_TRANS_TITLE_SENDFILE", L"Send file", data->UILanguageFile); wchar_t *title; @@ -238,14 +238,14 @@ ofn.nFilterIndex = 0; ofn.lpstrTitle = title; ofn.Flags = OFN_FILEMUSTEXIST | OFN_SHOWHELP | OFN_HIDEREADONLY; - BOOL Ok = _GetOpenFileNameW(&ofn); + BOOL Ok = GetOpenFileNameW(&ofn); free(filterW); free(title); - _SetCurrentDirectoryW(TempDir); + SetCurrentDirectoryW(TempDir); if (Ok) { - _SetDlgItemTextW(hDlgWnd, IDC_SENDFILE_FILENAME_EDIT, filename); + SetDlgItemTextW(hDlgWnd, IDC_SENDFILE_FILENAME_EDIT, filename); PostMessage(hDlgWnd, WM_NEXTDLGCTL, (WPARAM)GetDlgItem(hDlgWnd, IDOK), TRUE); } @@ -266,15 +266,15 @@ case WM_DROPFILES: { // \x95\xA1\x90\x94\x83h\x83\x8D\x83b\x83v\x82\xB3\x82\xEA\x82Ă\xE0\x8Dŏ\x89\x82\xCC1\x82\xBE\x82\xAF\x82\xF0\x88\xB5\x82\xA4 HDROP hDrop = (HDROP)wp; - const UINT len = _DragQueryFileW(hDrop, 0, NULL, 0); + const UINT len = DragQueryFileW(hDrop, 0, NULL, 0); if (len == 0) { DragFinish(hDrop); return TRUE; } wchar_t *filename = (wchar_t *)malloc(sizeof(wchar_t) * (len + 1)); - _DragQueryFileW(hDrop, 0, filename, len + 1); + DragQueryFileW(hDrop, 0, filename, len + 1); filename[len] = '\0'; - _SetDlgItemTextW(hDlgWnd, IDC_SENDFILE_FILENAME_EDIT, filename); + SetDlgItemTextW(hDlgWnd, IDC_SENDFILE_FILENAME_EDIT, filename); SendDlgItemMessage(hDlgWnd, IDC_SENDFILE_FILENAME_EDIT, EM_SETSEL, len, len); PostMessage(hDlgWnd, WM_NEXTDLGCTL, (WPARAM)GetDlgItem(hDlgWnd, IDOK), TRUE); Modified: trunk/teraterm/teraterm/tekwin.cpp =================================================================== --- trunk/teraterm/teraterm/tekwin.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/tekwin.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -46,7 +46,6 @@ #include "ttlib.h" #include <htmlhelp.h> #include "dlglib.h" -#include "layer_for_unicode.h" #include "codeconv.h" #define TEKClassName L"TEKWin32" @@ -86,7 +85,7 @@ wc.lpszMenuName = NULL; wc.lpszClassName = TEKClassName; - _RegisterClassW(&wc); + RegisterClassW(&wc); if (ts.TEKPos.x==CW_USEDEFAULT) { rect = rectDefault; Modified: trunk/teraterm/teraterm/teraprn.cpp =================================================================== --- trunk/teraterm/teraterm/teraprn.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/teraprn.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -42,7 +42,6 @@ #include "ttlib.h" #include "codeconv.h" #include "vtdisp.h" -#include "layer_for_unicode.h" #include "tt_res.h" #include "tmfc.h" @@ -451,15 +450,15 @@ KillTimer(HVTWin, IdPrnStartTimer); wchar_t TempPath[MAX_PATH]; - _GetTempPathW(_countof(TempPath), TempPath); + GetTempPathW(_countof(TempPath), TempPath); wchar_t Temp[MAX_PATH]; - if (_GetTempFileNameW(TempPath, L"tmp", 0, Temp) == 0) { + if (GetTempFileNameW(TempPath, L"tmp", 0, Temp) == 0) { free(p); return NULL; } p->PrnFName = _wcsdup(Temp); - HANDLE h = _CreateFileW(p->PrnFName, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + HANDLE h = CreateFileW(p->PrnFName, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (h == INVALID_HANDLE_VALUE) { free(p); return NULL; @@ -475,7 +474,7 @@ if (handle->PrnFName == NULL) { return; } - _DeleteFileW(handle->PrnFName); + DeleteFileW(handle->PrnFName); free(handle->PrnFName); handle->PrnFName = NULL; } @@ -492,7 +491,7 @@ static void PrintFile_(PrintFile *handle) { if (VTPrintInit(IdPrnFile)==IdPrnFile) { - HANDLE HPrnFile = _CreateFileW(handle->PrnFName, + HANDLE HPrnFile = CreateFileW(handle->PrnFName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); @@ -590,7 +589,7 @@ PrnAbortDlg->Create(hInst,hParent,&PrintAbortFlag,&ts); HPrnAbortDlg = PrnAbortDlg->GetSafeHwnd(); - handle->HPrnFile = _CreateFileW(handle->PrnFName, + handle->HPrnFile = CreateFileW(handle->PrnFName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); PrintAbortFlag = (handle->HPrnFile == INVALID_HANDLE_VALUE) || ! PrnOpen(ts.PrnDev); Modified: trunk/teraterm/teraterm/teraterm.cpp =================================================================== --- trunk/teraterm/teraterm/teraterm.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/teraterm.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -52,7 +52,6 @@ #include "dlglib.h" #include "teraterml.h" #include "sendmem.h" -#include "layer_for_unicode.h" #include "ttdebug.h" #if defined(_DEBUG) && defined(_MSC_VER) @@ -71,7 +70,7 @@ return; } - if (_GetModuleFileNameW(NULL, TSpecialFont, _countof(TSpecialFont)) == 0) { + if (GetModuleFileNameW(NULL, TSpecialFont, _countof(TSpecialFont)) == 0) { AddFontFlag = FALSE; return; } @@ -88,7 +87,7 @@ // AddFontResourceEx() \x82\xAA\x8Eg\x82\xA6\x82Ȃ\xA9\x82\xC1\x82\xBD // \x83V\x83X\x83e\x83\x80\x91S\x91̂Ŏg\x82\xA6\x82\xE9\x83t\x83H\x83\x93\x83g\x82ƂȂ\xE9 // remove\x82\xB5\x82Ȃ\xA2\x82\xC6OS\x82\xAA\x92͂܂܂ƂȂ\xE9 - r = _AddFontResourceW(TSpecialFont); + r = AddFontResourceW(TSpecialFont); } if (r != 0) { AddFontFlag = TRUE; @@ -105,7 +104,7 @@ r = pRemoveFontResourceExW(TSpecialFont, FR_PRIVATE, NULL); } if (r == 0) { - _RemoveFontResourceW(TSpecialFont); + RemoveFontResourceW(TSpecialFont); } } Modified: trunk/teraterm/teraterm/ttermpro.v10.vcxproj =================================================================== --- trunk/teraterm/teraterm/ttermpro.v10.vcxproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/ttermpro.v10.vcxproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -218,7 +218,6 @@ <ClInclude Include="..\common\codeconv.h" /> <ClInclude Include="..\common\compat_win.h" /> <ClInclude Include="..\common\dlglib.h" /> - <ClInclude Include="..\common\layer_for_unicode.h" /> <ClInclude Include="..\common\tektypes.h" /> <ClInclude Include="..\common\teraterm.h" /> <ClInclude Include="..\common\tipwin.h" /> Modified: trunk/teraterm/teraterm/ttermpro.v10.vcxproj.filters =================================================================== --- trunk/teraterm/teraterm/ttermpro.v10.vcxproj.filters 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/ttermpro.v10.vcxproj.filters 2021-06-29 15:20:20 UTC (rev 9324) @@ -345,9 +345,6 @@ <ClInclude Include="..\common\compat_win.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\common\layer_for_unicode.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="unicode.h"> <Filter>Header Files</Filter> </ClInclude> Modified: trunk/teraterm/teraterm/ttermpro.v11.vcxproj =================================================================== --- trunk/teraterm/teraterm/ttermpro.v11.vcxproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/ttermpro.v11.vcxproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -215,7 +215,6 @@ <ClInclude Include="..\common\codeconv.h" /> <ClInclude Include="..\common\compat_win.h" /> <ClInclude Include="..\common\dlglib.h" /> - <ClInclude Include="..\common\layer_for_unicode.h" /> <ClInclude Include="..\common\tektypes.h" /> <ClInclude Include="..\common\teraterm.h" /> <ClInclude Include="..\common\tipwin.h" /> Modified: trunk/teraterm/teraterm/ttermpro.v11.vcxproj.filters =================================================================== --- trunk/teraterm/teraterm/ttermpro.v11.vcxproj.filters 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/ttermpro.v11.vcxproj.filters 2021-06-29 15:20:20 UTC (rev 9324) @@ -345,9 +345,6 @@ <ClInclude Include="..\common\compat_win.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\common\layer_for_unicode.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="unicode.h"> <Filter>Header Files</Filter> </ClInclude> Modified: trunk/teraterm/teraterm/ttermpro.v12.vcxproj =================================================================== --- trunk/teraterm/teraterm/ttermpro.v12.vcxproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/ttermpro.v12.vcxproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -215,7 +215,6 @@ <ClInclude Include="..\common\codeconv.h" /> <ClInclude Include="..\common\compat_win.h" /> <ClInclude Include="..\common\dlglib.h" /> - <ClInclude Include="..\common\layer_for_unicode.h" /> <ClInclude Include="..\common\tektypes.h" /> <ClInclude Include="..\common\teraterm.h" /> <ClInclude Include="..\common\tipwin.h" /> Modified: trunk/teraterm/teraterm/ttermpro.v12.vcxproj.filters =================================================================== --- trunk/teraterm/teraterm/ttermpro.v12.vcxproj.filters 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/ttermpro.v12.vcxproj.filters 2021-06-29 15:20:20 UTC (rev 9324) @@ -345,9 +345,6 @@ <ClInclude Include="..\common\compat_win.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\common\layer_for_unicode.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="unicode.h"> <Filter>Header Files</Filter> </ClInclude> Modified: trunk/teraterm/teraterm/ttermpro.v14.vcxproj =================================================================== --- trunk/teraterm/teraterm/ttermpro.v14.vcxproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/ttermpro.v14.vcxproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -217,7 +217,6 @@ <ClInclude Include="..\common\codeconv.h" /> <ClInclude Include="..\common\compat_win.h" /> <ClInclude Include="..\common\dlglib.h" /> - <ClInclude Include="..\common\layer_for_unicode.h" /> <ClInclude Include="..\common\tektypes.h" /> <ClInclude Include="..\common\teraterm.h" /> <ClInclude Include="..\common\tipwin.h" /> Modified: trunk/teraterm/teraterm/ttermpro.v14.vcxproj.filters =================================================================== --- trunk/teraterm/teraterm/ttermpro.v14.vcxproj.filters 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/ttermpro.v14.vcxproj.filters 2021-06-29 15:20:20 UTC (rev 9324) @@ -345,9 +345,6 @@ <ClInclude Include="..\common\compat_win.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\common\layer_for_unicode.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="unicode.h"> <Filter>Header Files</Filter> </ClInclude> Modified: trunk/teraterm/teraterm/ttermpro.v15.vcxproj =================================================================== --- trunk/teraterm/teraterm/ttermpro.v15.vcxproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/ttermpro.v15.vcxproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -220,7 +220,6 @@ <ClInclude Include="..\common\codeconv.h" /> <ClInclude Include="..\common\compat_win.h" /> <ClInclude Include="..\common\dlglib.h" /> - <ClInclude Include="..\common\layer_for_unicode.h" /> <ClInclude Include="..\common\tektypes.h" /> <ClInclude Include="..\common\teraterm.h" /> <ClInclude Include="..\common\tipwin.h" /> Modified: trunk/teraterm/teraterm/ttermpro.v15.vcxproj.filters =================================================================== --- trunk/teraterm/teraterm/ttermpro.v15.vcxproj.filters 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/ttermpro.v15.vcxproj.filters 2021-06-29 15:20:20 UTC (rev 9324) @@ -345,9 +345,6 @@ <ClInclude Include="..\common\compat_win.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\common\layer_for_unicode.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="unicode.h"> <Filter>Header Files</Filter> </ClInclude> Modified: trunk/teraterm/teraterm/ttermpro.v16.vcxproj =================================================================== --- trunk/teraterm/teraterm/ttermpro.v16.vcxproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/ttermpro.v16.vcxproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -238,7 +238,6 @@ <ClInclude Include="..\common\codeconv.h" /> <ClInclude Include="..\common\compat_win.h" /> <ClInclude Include="..\common\dlglib.h" /> - <ClInclude Include="..\common\layer_for_unicode.h" /> <ClInclude Include="..\common\tektypes.h" /> <ClInclude Include="..\common\teraterm.h" /> <ClInclude Include="..\common\tipwin.h" /> @@ -312,4 +311,4 @@ <UserProperties RESOURCE_FILE="ttermpro.rc" /> </VisualStudio> </ProjectExtensions> -</Project> \ No newline at end of file +</Project> Modified: trunk/teraterm/teraterm/ttermpro.v16.vcxproj.filters =================================================================== --- trunk/teraterm/teraterm/ttermpro.v16.vcxproj.filters 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/ttermpro.v16.vcxproj.filters 2021-06-29 15:20:20 UTC (rev 9324) @@ -375,9 +375,6 @@ <ClInclude Include="..\common\compat_win.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\common\layer_for_unicode.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="unicode.h"> <Filter>Header Files</Filter> </ClInclude> @@ -448,4 +445,4 @@ <Filter>Header Files</Filter> </ClInclude> </ItemGroup> -</Project> \ No newline at end of file +</Project> Modified: trunk/teraterm/teraterm/ttermpro.v9.vcproj =================================================================== --- trunk/teraterm/teraterm/ttermpro.v9.vcproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/ttermpro.v9.vcproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -630,14 +630,6 @@ > </File> <File - RelativePath="..\common\layer_for_unicode.cpp" - > - </File> - <File - RelativePath="..\common\layer_for_unicode.h" - > - </File> - <File RelativePath="ftdlg_lite.cpp" > </File> Modified: trunk/teraterm/teraterm/ttime.c =================================================================== --- trunk/teraterm/teraterm/ttime.c 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/ttime.c 2021-06-29 15:20:20 UTC (rev 9324) @@ -40,7 +40,6 @@ #include <imm.h> #include <assert.h> #include "asprintf.h" -#include "layer_for_unicode.h" #include "ttime.h" // #define ENABLE_DUMP 1 Modified: trunk/teraterm/teraterm/ttplug.c =================================================================== --- trunk/teraterm/teraterm/ttplug.c 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/ttplug.c 2021-06-29 15:20:20 UTC (rev 9324) @@ -41,7 +41,6 @@ #include "ttplugin.h" #include "codeconv.h" #include "asprintf.h" -#include "layer_for_unicode.h" #include "ttplug.h" @@ -67,7 +66,7 @@ const wchar_t *sub_message; HMODULE hPlugin; - hPlugin = _LoadLibraryW(fileName); + hPlugin = LoadLibraryW(fileName); if (hPlugin != NULL) { TTXBindProc bind = NULL; FARPROC *pbind = (FARPROC *)&bind; @@ -148,7 +147,7 @@ aswprintf(&load_mask, L"%s\\TTX*.DLL", HomeDirW); - hFind = _FindFirstFileW(load_mask, &fd); + hFind = FindFirstFileW(load_mask, &fd); if (hFind != INVALID_HANDLE_VALUE) { do { wchar_t *filename; @@ -155,7 +154,7 @@ aswprintf(&filename, L"%s\\%s", HomeDirW, fd.cFileName); loadExtension(filename); free(filename); - } while (_FindNextFileW(hFind, &fd)); + } while (FindNextFileW(hFind, &fd)); FindClose(hFind); } free(load_mask); Modified: trunk/teraterm/teraterm/ttwinman.c =================================================================== --- trunk/teraterm/teraterm/ttwinman.c 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/ttwinman.c 2021-06-29 15:20:20 UTC (rev 9324) @@ -39,7 +39,6 @@ #include "i18n.h" #include "commlib.h" #include "codeconv.h" -#include "layer_for_unicode.h" HWND HVTWin = NULL; HWND HTEKWin = NULL; @@ -201,7 +200,7 @@ if ((ts.TitleFormat & 4)!=0) // VT wcsncat_s(TempTitle,_countof(TempTitle),L" VT",_TRUNCATE); - _SetWindowTextW(HVTWin,TempTitle); + SetWindowTextW(HVTWin,TempTitle); if (HTEKWin!=0) { @@ -209,7 +208,7 @@ { wcsncat_s(TempTitle,_countof(TempTitle),L" TEK",_TRUNCATE); } - _SetWindowTextW(HTEKWin,TempTitle); + SetWindowTextW(HTEKWin,TempTitle); } } Modified: trunk/teraterm/teraterm/vtwin.cpp =================================================================== --- trunk/teraterm/teraterm/vtwin.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/teraterm/vtwin.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -96,7 +96,6 @@ #include "tipwin.h" #endif #include "codeconv.h" -#include "layer_for_unicode.h" #include "sendmem.h" #include "sendfiledlg.h" #include "setting.h" @@ -452,7 +451,7 @@ wc.lpszMenuName = NULL; wc.lpszClassName = VTClassName; - _RegisterClassW(&wc); + RegisterClassW(&wc); m_hAccel = ::LoadAccelerators(hInstance, MAKEINTRESOURCE(IDR_ACC)); if (ts.VTPos.x==CW_USEDEFAULT) { @@ -950,9 +949,9 @@ WinMenu = CreatePopupMenu(); get_lang_msgW("MENU_WINDOW", uimsg, _countof(uimsg), L"&Window", ts.UILanguageFile); - _InsertMenuW(hMenu, ID_HELPMENU, - MF_STRING | MF_ENABLED | MF_POPUP | MF_BYPOSITION, - (UINT_PTR)WinMenu, uimsg); + InsertMenuW(hMenu, ID_HELPMENU, + MF_STRING | MF_ENABLED | MF_POPUP | MF_BYPOSITION, + (UINT_PTR)WinMenu, uimsg); } TTXModifyMenu(hMenu); /* TTPLUG */ @@ -1488,8 +1487,8 @@ wchar_t uimsg[MAX_UIMSG]; get_lang_msgW("MSG_DISCONNECT_CONF", uimsg, _countof(uimsg), L"Disconnect?", ts.UILanguageFile); - int result = _MessageBoxW(HVTWin, uimsg, L"Tera Term", - MB_OKCANCEL | MB_ICONEXCLAMATION | MB_DEFBUTTON2); + int result = ::MessageBoxW(HVTWin, uimsg, L"Tera Term", + MB_OKCANCEL | MB_ICONEXCLAMATION | MB_DEFBUTTON2); if (result == IDCANCEL) { return; } @@ -1511,7 +1510,7 @@ wchar_t uimsg[MAX_UIMSG]; get_lang_msgW("MSG_ALL_TERMINATE_CONF", uimsg, _countof(uimsg), L"Terminate ALL Tera Term(s)?", ts.UILanguageFile); - if (_MessageBoxW(HVTWin, uimsg, L"Tera Term", MB_OKCANCEL | MB_ICONERROR | MB_DEFBUTTON2) == IDCANCEL) + if (::MessageBoxW(HVTWin, uimsg, L"Tera Term", MB_OKCANCEL | MB_ICONERROR | MB_DEFBUTTON2) == IDCANCEL) return; BroadcastClosingMessage(HVTWin); @@ -1666,7 +1665,7 @@ int DirectoryCount = 0; for (int i = 0; i < DropListCount; i++) { const wchar_t *FileName = DropLists[i]; - const DWORD attr = _GetFileAttributesW(FileName); + const DWORD attr = GetFileAttributesW(FileName); if (attr == INVALID_FILE_ATTRIBUTES) { FileCount++; } else if (attr & FILE_ATTRIBUTE_DIRECTORY) { @@ -1833,16 +1832,16 @@ { const UINT ShowDialog = ((GetAsyncKeyState(VK_CONTROL) & 0x8000) != 0) ? 1 : 0; - DropListCount = _DragQueryFileW(hDropInfo, -1, NULL, 0); + DropListCount = DragQueryFileW(hDropInfo, -1, NULL, 0); DropLists = (wchar_t **)malloc(sizeof(wchar_t *) * DropListCount); for (int i = 0; i < DropListCount; i++) { - const UINT cch = _DragQueryFileW(hDropInfo, i, NULL, 0); + const UINT cch = DragQueryFileW(hDropInfo, i, NULL, 0); if (cch == 0) { continue; } wchar_t *FileName = (wchar_t *)malloc(sizeof(wchar_t) * (cch + 1)); - _DragQueryFileW(hDropInfo,i,FileName,cch + 1); + DragQueryFileW(hDropInfo,i,FileName,cch + 1); FileName[cch] = '\0'; DropLists[i] = FileName; } @@ -3725,7 +3724,7 @@ get_lang_msgW("MSG_EXEC_TT_ERROR", uimsg2, _countof(uimsg2), L"Can't execute Tera Term. (%d)", ts.UILanguageFile); _snwprintf_s(buf, _countof(buf), _TRUNCATE, uimsg2, GetLastError()); - _MessageBoxW(NULL, buf, uimsg, MB_OK | MB_ICONWARNING); + ::MessageBoxW(NULL, buf, uimsg, MB_OK | MB_ICONWARNING); } else { CloseHandle(pi.hThread); CloseHandle(pi.hProcess); @@ -3782,7 +3781,7 @@ get_lang_msgW("MSG_ERROR", uimsg, _countof(uimsg), L"ERROR", ts.UILanguageFile); get_lang_msgW("MSG_FIND_CYGTERM_DIR_ERROR", uimsg2, sizeof(uimsg2), L"Can't find Cygwin directory.", ts.UILanguageFile); - _MessageBoxW(NULL, uimsg2, uimsg, MB_OK | MB_ICONWARNING); + ::MessageBoxW(NULL, uimsg2, uimsg, MB_OK | MB_ICONWARNING); return; found_dll:; @@ -3794,7 +3793,7 @@ get_lang_msgW("MSG_ERROR", uimsg, _countof(uimsg), L"ERROR", ts.UILanguageFile); get_lang_msgW("MSG_CYGTERM_ENV_ALLOC_ERROR", uimsg2, _countof(uimsg2), L"Can't allocate memory for environment variable.", ts.UILanguageFile); - _MessageBoxW(NULL, uimsg2, uimsg, MB_OK | MB_ICONWARNING); + ::MessageBoxW(NULL, uimsg2, uimsg, MB_OK | MB_ICONWARNING); free(envptr); return; } @@ -3806,7 +3805,7 @@ get_lang_msgW("MSG_ERROR", uimsg, _countof(uimsg), L"ERROR", ts.UILanguageFile); get_lang_msgW("MSG_CYGTERM_ENV_ALLOC_ERROR", uimsg2, _countof(uimsg2), L"Can't allocate memory for environment variable.", ts.UILanguageFile); - _MessageBoxW(NULL, uimsg2, uimsg, MB_OK | MB_ICONWARNING); + ::MessageBoxW(NULL, uimsg2, uimsg, MB_OK | MB_ICONWARNING); return; } _snprintf_s(envbuff, envbufflen, _TRUNCATE, "PATH=%s", file); @@ -3831,7 +3830,7 @@ get_lang_msgW("MSG_ERROR", uimsg, _countof(uimsg), L"ERROR", ts.UILanguageFile); get_lang_msgW("MSG_EXEC_CYGTERM_ERROR", uimsg2, _countof(uimsg2), L"Can't execute Cygterm.", ts.UILanguageFile); - _MessageBoxW(NULL, uimsg2, uimsg, MB_OK | MB_ICONWARNING); + ::MessageBoxW(NULL, uimsg2, uimsg, MB_OK | MB_ICONWARNING); } else { CloseHandle(pi.hThread); CloseHandle(pi.hProcess); @@ -3861,7 +3860,7 @@ get_lang_msgW("MSG_EXEC_TTMENU_ERROR", uimsg2, _countof(uimsg2), L"Can't execute TeraTerm Menu. (%d)", ts.UILanguageFile); _snwprintf_s(buf, _countof(buf), _TRUNCATE, uimsg2, GetLastError()); - _MessageBoxW(NULL, buf, uimsg, MB_OK | MB_ICONWARNING); + ::MessageBoxW(NULL, buf, uimsg, MB_OK | MB_ICONWARNING); } else { CloseHandle(pi.hThread); CloseHandle(pi.hProcess); @@ -3894,7 +3893,7 @@ get_lang_msgW("MSG_EXEC_LOGMETT_ERROR", uimsg2, _countof(uimsg2), L"Can't execute LogMeTT. (%d)", ts.UILanguageFile); _snwprintf_s(buf, _countof(buf), _TRUNCATE, uimsg2, GetLastError()); - _MessageBoxW(NULL, buf, uimsg, MB_OK | MB_ICONWARNING); + ::MessageBoxW(NULL, buf, uimsg, MB_OK | MB_ICONWARNING); } else { CloseHandle(pi.hThread); CloseHandle(pi.hProcess); @@ -3911,7 +3910,7 @@ const wchar_t *filename = info.filename; if (!info.append) { // \x83t\x83@\x83C\x83\x8B\x8D폜 - _DeleteFileW(filename); + DeleteFileW(filename); } BOOL r = FLogOpen(filename, info.code, info.bom); if (r != FALSE) { @@ -3972,8 +3971,8 @@ aswprintf(&command, L"\"%s\" \"%s\"", ViewlogEditor, filename); free(ViewlogEditor); - BOOL r = _CreateProcessW(NULL, command, NULL, NULL, FALSE, 0, - NULL, NULL, &si, &pi); + BOOL r = CreateProcessW(NULL, command, NULL, NULL, FALSE, 0, + NULL, NULL, &si, &pi); free(command); if (r == 0) { DWORD error = GetLastError(); @@ -4054,7 +4053,7 @@ get_lang_msgW("MSG_EXEC_TT_ERROR", uimsgW2, _countof(uimsgW2), L"Can't execute Tera Term. (%d)", ts.UILanguageFile); _snwprintf_s(buf, _countof(buf), _TRUNCATE, uimsgW2, GetLastError()); - _MessageBoxW(NULL, buf, uimsgW, MB_OK | MB_ICONWARNING); + ::MessageBoxW(NULL, buf, uimsgW, MB_OK | MB_ICONWARNING); } else { CloseHandle(pi.hThread); CloseHandle(pi.hProcess); @@ -4195,8 +4194,8 @@ wchar_t uimsg[MAX_UIMSG]; get_lang_msgW("MSG_DISCONNECT_CONF", uimsg, _countof(uimsg), L"Disconnect?", ts.UILanguageFile); - if (_MessageBoxW(HVTWin, uimsg, L"Tera Term", - MB_OKCANCEL | MB_ICONEXCLAMATION | MB_DEFBUTTON2)==IDCANCEL) { + if (::MessageBoxW(HVTWin, uimsg, L"Tera Term", + MB_OKCANCEL | MB_ICONEXCLAMATION | MB_DEFBUTTON2)==IDCANCEL) { return; } } @@ -4427,7 +4426,7 @@ wchar_t uimsg[MAX_UIMSG]; get_lang_msgW("DLG_CHOOSEFONT_STC6", uimsg, _countof(uimsg), L"\"Font style\" selection here won't affect actual font appearance.", ts.UILanguageFile); - _SetDlgItemTextW(Dialog, stc6, uimsg); + SetDlgItemTextW(Dialog, stc6, uimsg); SetFocus(GetDlgItem(Dialog,cmb1)); @@ -4613,7 +4612,7 @@ const char *UILanguageFile = ts->UILanguageFile; /* save current dir */ - _GetCurrentDirectoryW(_countof(TempDir), TempDir); + GetCurrentDirectoryW(_countof(TempDir), TempDir); /* File name filter */ if (FuncId==GSF_LOADKEY) { @@ -4654,7 +4653,7 @@ free(HomeDirW); } - _SetCurrentDirectoryW(DirW); + SetCurrentDirectoryW(DirW); /* OPENFILENAME record */ OPENFILENAMEW ofn = {}; @@ -4680,7 +4679,7 @@ // ofn.lpstrInitialDir = ts->SetupFName; ofn.lpstrInitialDir = DirW; ofn.lpstrTitle = _get_lang_msg("FILEDLG_SAVE_SETUP_TITLE", L"Tera Term: Save setup", UILanguageFile); - Ok = _GetSaveFileNameW(&ofn); + Ok = GetSaveFileNameW(&ofn); if (Ok) { char *Name = ToCharW(NameW); strncpy_s(ts->SetupFName, sizeof(ts->SetupFName), Name, _TRUNCATE); @@ -4691,7 +4690,7 @@ ofn.lpstrDefExt = L"ini"; ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_SHOWHELP; ofn.lpstrTitle = _get_lang_msg("FILEDLG_RESTORE_SETUP_TITLE", L"Tera Term: Restore setup", UILanguageFile); - Ok = _GetOpenFileNameW(&ofn); + Ok = GetOpenFileNameW(&ofn); if (Ok) { char *Name = ToCharW(NameW); strncpy_s(ts->SetupFName, sizeof(ts->SetupFName), Name, _TRUNCATE); @@ -4702,7 +4701,7 @@ ofn.lpstrDefExt = L"cnf"; ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_SHOWHELP; ofn.lpstrTitle = _get_lang_msg("FILEDLG_LOAD_KEYMAP_TITLE", L"Tera Term: Load key map", UILanguageFile); - Ok = _GetOpenFileNameW(&ofn); + Ok = GetOpenFileNameW(&ofn); if (Ok) { char *Name = ToCharW(NameW); strncpy_s(ts->KeyCnfFN, sizeof(ts->KeyCnfFN), Name, _TRUNCATE); @@ -4727,7 +4726,7 @@ free((void *)ofn.lpstrTitle); /* restore dir */ - _SetCurrentDirectoryW(TempDir); + SetCurrentDirectoryW(TempDir); return Ok; } @@ -4753,7 +4752,7 @@ get_lang_msgW("MSG_TT_ERROR", uimsg, _countof(uimsg), L"Tera Term: ERROR", ts.UILanguageFile); get_lang_msgW("MSG_SAVESETUP_PERMISSION_ERROR", uimsg2, _countof(uimsg2), L"TERATERM.INI file doesn't have the writable permission.", ts.UILanguageFile); - _MessageBoxW(HVTWin, uimsg2, uimsg, MB_OK|MB_ICONEXCLAMATION); + ::MessageBoxW(HVTWin, uimsg2, uimsg, MB_OK|MB_ICONEXCLAMATION); return; } } @@ -4834,7 +4833,7 @@ get_lang_msgW("DLG_SETUPDIR_NOFILE_ERROR", uimsg2, _countof(uimsg2), L"File does not exist.(%d)", ts.UILanguageFile); _snwprintf_s(buf, _countof(buf), _TRUNCATE, uimsg2, no); - _MessageBoxW(NULL, buf, uimsg, MB_OK | MB_ICONWARNING); + ::MessageBoxW(NULL, buf, uimsg, MB_OK | MB_ICONWARNING); goto error; } @@ -4851,7 +4850,7 @@ get_lang_msgW("DLG_SETUPDIR_OPENFILE_ERROR", uimsg2, _countof(uimsg2), L"Cannot open file.(%d)", ts.UILanguageFile); _snwprintf_s(buf, _countof(buf), _TRUNCATE, uimsg2, no); - _MessageBoxW(NULL, buf, uimsg, MB_OK | MB_ICONWARNING); + ::MessageBoxW(NULL, buf, uimsg, MB_OK | MB_ICONWARNING); goto error; } else { CloseHandle(pi.hThread); Modified: trunk/teraterm/ttpcmn/ttcmn.c =================================================================== --- trunk/teraterm/ttpcmn/ttcmn.c 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpcmn/ttcmn.c 2021-06-29 15:20:20 UTC (rev 9324) @@ -50,7 +50,6 @@ #define DllExport __declspec(dllexport) #include "ttcommon.h" -#include "layer_for_unicode.h" /* shared memory */ typedef struct { @@ -332,13 +331,13 @@ get_lang_msgW("MENU_WINDOW_STACKED_UNDO", uimsg, _countof(uimsg), L"&Undo - Stacked", langFile); else get_lang_msgW("MENU_WINDOW_SIDEBYSIDE_UNDO", uimsg, _countof(uimsg), L"&Undo - Side by Side", langFile); - _AppendMenuW(menu, MF_ENABLED | MF_STRING, ID_WINDOW_UNDO, uimsg); // TODO UNICODE + AppendMenuW(menu, MF_ENABLED | MF_STRING, ID_WINDOW_UNDO, uimsg); // TODO UNICODE } } else { get_lang_msgW("MENU_WINDOW_WINDOW", uimsg, _countof(uimsg), L"&Window", langFile); - _AppendMenuW(menu,MF_ENABLED | MF_STRING,ID_TEKWINDOW_WINDOW, uimsg); + AppendMenuW(menu,MF_ENABLED | MF_STRING,ID_TEKWINDOW_WINDOW, uimsg); } } Modified: trunk/teraterm/ttpcmn/ttcmn_notify.cpp =================================================================== --- trunk/teraterm/ttpcmn/ttcmn_notify.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpcmn/ttcmn_notify.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -47,21 +47,53 @@ #include "tttypes.h" #include "ttcommon.h" #include "codeconv.h" -#include "layer_for_unicode.h" +#if 0 +// TODO \x89\xBD\x82Ƃ\xA9\x82\xB7\x82\xE9 typedef struct { - TT_NOTIFYICONDATAW_V2 notify_icon; + DWORD cbSize; + HWND hWnd; + UINT uID; + UINT uFlags; + UINT uCallbackMessage; + HICON hIcon; + wchar_t szTip[128]; + DWORD dwState; + DWORD dwStateMask; + wchar_t szInfo[256]; + union { + UINT uTimeout; + UINT uVersion; // used with NIM_SETVERSION, values 0, 3 and 4 + } DUMMYUNIONNAME; + wchar_t szInfoTitle[64]; + DWORD dwInfoFlags; + //GUID guidItem; // XP+ + //HICON hBalloonIcon; // Vista+ +} TT_NOTIFYICONDATAW_V2; +#endif + +typedef struct { +// TT_NOTIFYICONDATAW_V2 notify_icon; + NOTIFYICONDATAW notify_icon; int NotifyIconShowCount; HICON CustomIcon; } NotifyIcon; +#define TT_NOTIFYICONDATAW_V2 NOTIFYICONDATAW + static NotifyIcon *NotifyCreate(HWND hWnd, HICON icon, UINT msg) { NotifyIcon *ni = (NotifyIcon *)malloc(sizeof(NotifyIcon)); memset(ni, 0, sizeof(*ni)); - TT_NOTIFYICONDATAW_V2 *p = &ni->notify_icon; + NOTIFYICONDATAW *p = &ni->notify_icon; +#if (_MSC_VER > 1400) + // VS2008+ + p->cbSize = offsetof(NOTIFYICONDATAW, guidItem); +#else + // VS2005 p->cbSize = sizeof(*p); +#endif p->hWnd = hWnd; p->uID = 1; p->uFlags = NIF_ICON | NIF_MESSAGE; @@ -68,7 +100,7 @@ p->uCallbackMessage = msg; p->hIcon = icon; - _Shell_NotifyIconW(NIM_ADD, p); + Shell_NotifyIconW(NIM_ADD, p); ni->NotifyIconShowCount = 0; @@ -78,7 +110,7 @@ static void NotifyDelete(NotifyIcon *ni) { TT_NOTIFYICONDATAW_V2 *NotifyIcon = &ni->notify_icon; - _Shell_NotifyIconW(NIM_DELETE, NotifyIcon); + Shell_NotifyIconW(NIM_DELETE, NotifyIcon); ni->NotifyIconShowCount = 0; } @@ -88,7 +120,7 @@ NotifyIcon->uFlags = NIF_STATE; NotifyIcon->dwState = 0; NotifyIcon->dwStateMask = NIS_HIDDEN; - _Shell_NotifyIconW(NIM_MODIFY, NotifyIcon); + Shell_NotifyIconW(NIM_MODIFY, NotifyIcon); ni->NotifyIconShowCount += 1; } @@ -102,7 +134,7 @@ NotifyIcon->uFlags = NIF_STATE; NotifyIcon->dwState = NIS_HIDDEN; NotifyIcon->dwStateMask = NIS_HIDDEN; - _Shell_NotifyIconW(NIM_MODIFY, NotifyIcon); + Shell_NotifyIconW(NIM_MODIFY, NotifyIcon); ni->NotifyIconShowCount = 0; } } @@ -111,7 +143,7 @@ { TT_NOTIFYICONDATAW_V2 *NotifyIcon = &ni->notify_icon; NotifyIcon->uVersion = ver; - _Shell_NotifyIconW(NIM_SETVERSION, NotifyIcon); + Shell_NotifyIconW(NIM_SETVERSION, NotifyIcon); } static void NotifySetMessageW(NotifyIcon *ni, const wchar_t *msg, const wchar_t *title, DWORD flag) @@ -140,7 +172,7 @@ wcsncpy_s(NotifyIcon->szInfo, _countof(NotifyIcon->szInfo), msg, _TRUNCATE); - _Shell_NotifyIconW(NIM_MODIFY, NotifyIcon); + Shell_NotifyIconW(NIM_MODIFY, NotifyIcon); ni->NotifyIconShowCount += 1; } Modified: trunk/teraterm/ttpdlg/ttdlg.c =================================================================== --- trunk/teraterm/ttpdlg/ttdlg.c 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpdlg/ttdlg.c 2021-06-29 15:20:20 UTC (rev 9324) @@ -52,7 +52,6 @@ #include "comportinfo.h" #include "codeconv.h" #include "helpid.h" -#include "layer_for_unicode.h" #include "asprintf.h" // Oniguruma: Regular expression library @@ -614,7 +613,7 @@ if (ts->VTFlag>0) { get_lang_msgW("DLG_WIN_PCBOLD16", uimsg, _countof(uimsg), L"&16 Colors (PC style)", UILanguageFile); - _SetDlgItemTextW(Dialog, IDC_WINCOLOREMU,uimsg); + SetDlgItemTextW(Dialog, IDC_WINCOLOREMU,uimsg); SetRB(Dialog, (ts->ColorFlag&CF_PCBOLD16)!=0, IDC_WINCOLOREMU, IDC_WINCOLOREMU); SetRB(Dialog, (ts->ColorFlag&CF_AIXTERM16)!=0, IDC_WINAIXTERM16, IDC_WINAIXTERM16); SetRB(Dialog, (ts->ColorFlag&CF_XTERM256)!=0,IDC_WINXTERM256,IDC_WINXTERM256); @@ -691,13 +690,13 @@ } ShowDlgItem(Dialog,IDC_WINATTRTEXT,IDC_WINATTR); get_lang_msgW("DLG_WIN_NORMAL", uimsg, _countof(uimsg), L"Normal", UILanguageFile); - _SendDlgItemMessageW(Dialog, IDC_WINATTR, CB_ADDSTRING, 0, (LPARAM)uimsg); + SendDlgItemMessageW(Dialog, IDC_WINATTR, CB_ADDSTRING, 0, (LPARAM)uimsg); get_lang_msgW("DLG_WIN_BOLD", uimsg, _countof(uimsg), L"Bold", UILanguageFile); - _SendDlgItemMessageW(Dialog, IDC_WINATTR, CB_ADDSTRING, 0, (LPARAM)uimsg); + SendDlgItemMessageW(Dialog, IDC_WINATTR, CB_ADDSTRING, 0, (LPARAM)uimsg); get_lang_msgW("DLG_WIN_BLINK", uimsg, _countof(uimsg), L"Blink", UILanguageFile); - _SendDlgItemMessageW(Dialog, IDC_WINATTR, CB_ADDSTRING, 0, (LPARAM)uimsg); + SendDlgItemMessageW(Dialog, IDC_WINATTR, CB_ADDSTRING, 0, (LPARAM)uimsg); get_lang_msgW("DLG_WIN_REVERSEATTR", uimsg, _countof(uimsg), L"Reverse", UILanguageFile); - _SendDlgItemMessageW(Dialog, IDC_WINATTR, CB_ADDSTRING, 0, (LPARAM)uimsg); + SendDlgItemMessageW(Dialog, IDC_WINATTR, CB_ADDSTRING, 0, (LPARAM)uimsg); /* begin - ishizaki */ SendDlgItemMessageA(Dialog, IDC_WINATTR, CB_ADDSTRING, 0, (LPARAM)"URL"); /* end - ishizaki */ Modified: trunk/teraterm/ttpfile/bplus.c =================================================================== --- trunk/teraterm/ttpfile/bplus.c 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpfile/bplus.c 2021-06-29 15:20:20 UTC (rev 9324) @@ -37,7 +37,6 @@ #include "ftlib.h" #include "ttcommon.h" #include "ttlib.h" -#include "layer_for_unicode.h" #include "bplus.h" @@ -131,7 +130,7 @@ break; } - _SetWindowTextW(fv->HWin,fv->DlgCaption); + SetWindowTextW(fv->HWin,fv->DlgCaption); } static BOOL BPInit(PFileVarProto fv, PComVar cv, PTTSet ts) Modified: trunk/teraterm/ttpfile/filesys_win32.cpp =================================================================== --- trunk/teraterm/ttpfile/filesys_win32.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpfile/filesys_win32.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -36,7 +36,6 @@ #include "filesys_win32.h" #include "tttypes.h" -#include "layer_for_unicode.h" #include "codeconv.h" #include "ftlib.h" @@ -61,7 +60,7 @@ { TFileIOWin32 *data = (TFileIOWin32 *)fv->data; wc filenameW = GetFilenameW(data, filename); - HANDLE hFile = _CreateFileW(filenameW, + HANDLE hFile = CreateFileW(filenameW, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { @@ -76,9 +75,9 @@ { TFileIOWin32 *data = (TFileIOWin32 *)fv->data; wc filenameW = GetFilenameW(data, filename); - HANDLE hFile = _CreateFileW(filenameW, - GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + HANDLE hFile = CreateFileW(filenameW, + GENERIC_WRITE, 0, NULL, + CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { data->FileHandle = INVALID_HANDLE_VALUE; return FALSE; Modified: trunk/teraterm/ttpmacro/CMakeLists.txt =================================================================== --- trunk/teraterm/ttpmacro/CMakeLists.txt 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpmacro/CMakeLists.txt 2021-06-29 15:20:20 UTC (rev 9324) @@ -77,7 +77,6 @@ ../common/win16api.h ../common/codeconv.h ../common/dllutil.h - ../common/layer_for_unicode.h ) source_group( Modified: trunk/teraterm/ttpmacro/ttl.cpp =================================================================== --- trunk/teraterm/ttpmacro/ttl.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpmacro/ttl.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -63,7 +63,6 @@ #include "win16api.h" #include "ttl_gui.h" #include "codeconv.h" -#include "layer_for_unicode.h" #include "dllutil.h" #define TTERMCOMMAND "TTERMPRO /D=" @@ -1071,7 +1070,7 @@ if (CurDir[0] != 0) { pCurdirW = CurDirW; } - bRet = _CreateProcessW(NULL, (LPWSTR)pStrW, NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, pCurdirW, &sui, &pi); + bRet = CreateProcessW(NULL, (LPWSTR)pStrW, NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, pCurdirW, &sui, &pi); if (bRet == FALSE) { // \x8E\xC0\x8Ds\x82ł\xAB\x82Ȃ\xA9\x82\xC1\x82\xBD\x8Fꍇ\x81Aresult\x82\xC9-1\x82\xF0\x95Ԃ\xB7 SetResult(-1); @@ -1207,9 +1206,9 @@ } wc FName1W = wc::fromUtf8(FName1); - HANDLE FH1 = _CreateFileW(FName1W, - GENERIC_WRITE, 0, NULL, - OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + HANDLE FH1 = CreateFileW(FName1W, + GENERIC_WRITE, 0, NULL, + OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (FH1 == INVALID_HANDLE_VALUE) { SetResult(3); return Err; @@ -1218,9 +1217,9 @@ int result = 0; wc FName2W = wc::fromUtf8(FName2); - HANDLE FH2 = _CreateFileW(FName2W, - GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + HANDLE FH2 = CreateFileW(FName2W, + GENERIC_READ, FILE_SHARE_READ, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (FH2 != INVALID_HANDLE_VALUE) { DWORD c; @@ -1281,7 +1280,7 @@ return Err; } - ret = _CopyFileW(wc::fromUtf8(FName1), wc::fromUtf8(FName2), FALSE); + ret = CopyFileW(wc::fromUtf8(FName1), wc::fromUtf8(FName2), FALSE); if (ret == 0) { SetResult(-4); return Err; @@ -1318,9 +1317,9 @@ wc FNameW = wc::fromUtf8(FName); // TTL \x82̃t\x83@\x83C\x83\x8B\x83n\x83\x93\x83h\x83\x8B\x82\xCD filelock \x82Ń\x8D\x83b\x83N\x82\xB7\x82\xE9\x82̂ŁA // dwShareMode \x82ł̋\xA4\x97L\x83\x82\x81[\x83h\x82\xCD Read/Write \x82Ƃ\xE0\x97L\x8C\xF8\x82ɂ\xB7\x82\xE9\x81B - FH = _CreateFileW(FNameW, - GENERIC_WRITE|GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + FH = CreateFileW(FNameW, + GENERIC_WRITE|GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, + CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (FH == INVALID_HANDLE_VALUE) { SetResult(2); } @@ -1355,7 +1354,7 @@ return Err; } - if (_DeleteFileW(wc::fromUtf8(FName)) == 0) { + if (DeleteFileW(wc::fromUtf8(FName)) == 0) { SetResult(-1); } else { @@ -1415,9 +1414,9 @@ wc FNameW = wc::fromUtf8(FName); if (ReadonlyFlag) { - FH = _CreateFileW(FNameW, - GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + FH = CreateFileW(FNameW, + GENERIC_READ, FILE_SHARE_READ, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); } else { // \x83t\x83@\x83C\x83\x8B\x82\xF0\x83I\x81[\x83v\x83\x93\x82\xB7\x82\xE9\x81B @@ -1424,9 +1423,9 @@ // \x91\xB6\x8D݂\xB5\x82Ȃ\xA2\x8Fꍇ\x82͍쐬\x82\xB5\x82\xBD\x8C\xE3\x83I\x81[\x83v\x83\x93\x82\xB7\x82\xE9\x81B // TTL \x82̃t\x83@\x83C\x83\x8B\x83n\x83\x93\x83h\x83\x8B\x82\xCD filelock \x82Ń\x8D\x83b\x83N\x82\xB7\x82\xE9\x82̂ŁA // dwShareMode \x82ł̋\xA4\x97L\x83\x82\x81[\x83h\x82\xCD Read/Write \x82Ƃ\xE0\x97L\x8C\xF8\x82ɂ\xB7\x82\xE9\x81B - FH = _CreateFileW(FNameW, - GENERIC_WRITE|GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, - OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + FH = CreateFileW(FNameW, + GENERIC_WRITE|GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, + OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); } if (FH == INVALID_HANDLE_VALUE) { SetIntVal(VarId, -1); @@ -1647,7 +1646,7 @@ SetResult(-2); return Err; } - if (_MoveFileW(wc::fromUtf8(FName1), wc::fromUtf8(FName2)) == 0) { + if (MoveFileW(wc::fromUtf8(FName1), wc::fromUtf8(FName2)) == 0) { // \x83\x8A\x83l\x81[\x83\x80\x82Ɏ\xB8\x94s\x82\xB5\x82\xBD\x82\xE7\x81A\x83G\x83\x89\x81[\x82ŕԂ\xB7\x81B SetResult(-3); return Err; @@ -1670,7 +1669,7 @@ if (Err!=0) return Err; GetAbsPath(FName,sizeof(FName)); - DWORD attr = _GetFileAttributesW(wc::fromUtf8(FName)); + DWORD attr = GetFileAttributesW(wc::fromUtf8(FName)); if (attr != INVALID_FILE_ATTRIBUTES) // exists file or folder SetResult(1); @@ -1748,8 +1747,8 @@ goto end; } - hFile = _CreateFileW(wc::fromUtf8(FName), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, NULL); + hFile = CreateFileW(wc::fromUtf8(FName), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { goto end; } @@ -1943,7 +1942,7 @@ Err = 0; // \x83t\x83@\x83C\x83\x8B\x83I\x81[\x83v\x83\x93\x81A\x91\xB6\x8D݂\xB5\x82Ȃ\xA2\x8Fꍇ\x82͐V\x8BK\x8D쐬 - hFile = _CreateFileW(wc::fromUtf8(FName), GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + hFile = CreateFileW(wc::fromUtf8(FName), GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { goto end; } @@ -2055,7 +2054,7 @@ i++; if (i<NumDirHandle) { - DirHandle[i] = _FindFirstFileW(wc::fromUtf8(Dir),&data); + DirHandle[i] = FindFirstFileW(wc::fromUtf8(Dir),&data); if (DirHandle[i]!= INVALID_HANDLE_VALUE) SetStrVal(Name,(u8)data.cFileName); else @@ -2091,7 +2090,7 @@ if ((DH>=0) && (DH<NumDirHandle) && (DirHandle[DH]!= INVALID_HANDLE_VALUE) && - (_FindNextFileW(DirHandle[DH],&data) != FALSE)) + (FindNextFileW(DirHandle[DH],&data) != FALSE)) { SetStrVal(Name,(u8)data.cFileName); SetResult(1); @@ -2160,7 +2159,7 @@ return Err; } - if (_RemoveDirectoryW(wc::fromUtf8(FName)) == 0) { + if (RemoveDirectoryW(wc::fromUtf8(FName)) == 0) { SetResult(2); } else { @@ -2182,7 +2181,7 @@ if (Err!=0) return Err; GetAbsPath(FName,sizeof(FName)); - DWORD attr = _GetFileAttributesW(wc::fromUtf8(FName)); + DWORD attr = GetFileAttributesW(wc::fromUtf8(FName)); if ((attr & FILE_ATTRIBUTE_DIRECTORY) != 0) { SetResult(1); } @@ -2282,7 +2281,7 @@ if (Err!=0) return Err; GetAbsPath(Filename, sizeof(Filename)); - SetResult(_GetFileAttributesW(wc::fromUtf8(Filename))); + SetResult(GetFileAttributesW(wc::fromUtf8(Filename))); return Err; } Modified: trunk/teraterm/ttpmacro/ttl_gui.cpp =================================================================== --- trunk/teraterm/ttpmacro/ttl_gui.cpp 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpmacro/ttl_gui.cpp 2021-06-29 15:20:20 UTC (rev 9324) @@ -46,7 +46,6 @@ #include "ttl.h" #include "ttl_gui.h" #include "codeconv.h" -#include "layer_for_unicode.h" #include "ttlib.h" #include "dlglib.h" @@ -177,11 +176,11 @@ BOOL ret; if (SaveFlag) { ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY; - ret = _GetSaveFileNameW(&ofn); + ret = GetSaveFileNameW(&ofn); } else { ofn.Flags = OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT; - ret = _GetOpenFileNameW(&ofn); + ret = GetOpenFileNameW(&ofn); } free(FNFilter); char *filenameU8 = ToU8W(filename); @@ -214,7 +213,7 @@ GetAbsPath(Str,sizeof(Str)); - _GetPrivateProfileStringW(L"Password", (wc)Str2, L"", + GetPrivateProfileStringW(L"Password", (wc)Str2, L"", Temp, _countof(Temp), (wc)Str); if (Temp[0]==0) // password not exist { @@ -225,7 +224,7 @@ if (Temp2[0]!=0) { char TempA[512]; Encrypt(Temp2, TempA); - if (_WritePrivateProfileStringW(L"Password", (wc)Str2, (wc)TempA, wc::fromUtf8(Str)) != 0) { + if (WritePrivateProfileStringW(L"Password", (wc)Str2, (wc)TempA, wc::fromUtf8(Str)) != 0) { result = 1; /* success */ } } Modified: trunk/teraterm/ttpmacro/ttmlib.c =================================================================== --- trunk/teraterm/ttpmacro/ttmlib.c 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpmacro/ttmlib.c 2021-06-29 15:20:20 UTC (rev 9324) @@ -38,7 +38,6 @@ #include "compat_win.h" #include "ttmlib.h" #include "codeconv.h" -#include "layer_for_unicode.h" static char CurrentDir[MAXPATHLEN]; @@ -187,13 +186,13 @@ wchar_t *pCurrentDirW = ToWcharU8(CurrentDir); wchar_t *DirW = ToWcharU8(Dir); char *pCurrentDirU8; - _GetCurrentDirectoryW(_countof(Temp), Temp); - _SetCurrentDirectoryW(pCurrentDirW); - _SetCurrentDirectoryW(DirW); - _GetCurrentDirectoryW(_countof(CurrentDirW), CurrentDirW); + GetCurrentDirectoryW(_countof(Temp), Temp); + SetCurrentDirectoryW(pCurrentDirW); + SetCurrentDirectoryW(DirW); + GetCurrentDirectoryW(_countof(CurrentDirW), CurrentDirW); pCurrentDirU8 = ToU8W(CurrentDirW); strncpy_s(CurrentDir, _countof(CurrentDir), pCurrentDirU8, _TRUNCATE); - _SetCurrentDirectoryW(Temp); + SetCurrentDirectoryW(Temp); free(pCurrentDirW); free(DirW); free(pCurrentDirU8); Modified: trunk/teraterm/ttpmacro/ttpmacro.v10.vcxproj =================================================================== --- trunk/teraterm/ttpmacro/ttpmacro.v10.vcxproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpmacro/ttpmacro.v10.vcxproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -157,7 +157,6 @@ <ClInclude Include="..\common\compat_win.h" /> <ClInclude Include="..\common\dlglib.h" /> <ClInclude Include="..\common\dllutil.h" /> - <ClInclude Include="..\common\layer_for_unicode.h" /> <ClInclude Include="..\common\tmfc.h" /> <ClInclude Include="..\common\ttddecmnd.h" /> <ClInclude Include="..\common\ttlib.h" /> Modified: trunk/teraterm/ttpmacro/ttpmacro.v11.vcxproj =================================================================== --- trunk/teraterm/ttpmacro/ttpmacro.v11.vcxproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpmacro/ttpmacro.v11.vcxproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -159,7 +159,6 @@ <ClInclude Include="..\common\compat_win.h" /> <ClInclude Include="..\common\dlglib.h" /> <ClInclude Include="..\common\dllutil.h" /> - <ClInclude Include="..\common\layer_for_unicode.h" /> <ClInclude Include="..\common\tmfc.h" /> <ClInclude Include="..\common\ttddecmnd.h" /> <ClInclude Include="..\common\ttlib.h" /> Modified: trunk/teraterm/ttpmacro/ttpmacro.v12.vcxproj =================================================================== --- trunk/teraterm/ttpmacro/ttpmacro.v12.vcxproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpmacro/ttpmacro.v12.vcxproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -159,7 +159,6 @@ <ClInclude Include="..\common\compat_win.h" /> <ClInclude Include="..\common\dlglib.h" /> <ClInclude Include="..\common\dllutil.h" /> - <ClInclude Include="..\common\layer_for_unicode.h" /> <ClInclude Include="..\common\tmfc.h" /> <ClInclude Include="..\common\ttddecmnd.h" /> <ClInclude Include="..\common\ttlib.h" /> Modified: trunk/teraterm/ttpmacro/ttpmacro.v14.vcxproj =================================================================== --- trunk/teraterm/ttpmacro/ttpmacro.v14.vcxproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpmacro/ttpmacro.v14.vcxproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -159,7 +159,6 @@ <ClInclude Include="..\common\compat_win.h" /> <ClInclude Include="..\common\dlglib.h" /> <ClInclude Include="..\common\dllutil.h" /> - <ClInclude Include="..\common\layer_for_unicode.h" /> <ClInclude Include="..\common\tmfc.h" /> <ClInclude Include="..\common\ttddecmnd.h" /> <ClInclude Include="..\common\ttlib.h" /> Modified: trunk/teraterm/ttpmacro/ttpmacro.v15.vcxproj =================================================================== --- trunk/teraterm/ttpmacro/ttpmacro.v15.vcxproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpmacro/ttpmacro.v15.vcxproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -162,7 +162,6 @@ <ClInclude Include="..\common\compat_win.h" /> <ClInclude Include="..\common\dlglib.h" /> <ClInclude Include="..\common\dllutil.h" /> - <ClInclude Include="..\common\layer_for_unicode.h" /> <ClInclude Include="..\common\tmfc.h" /> <ClInclude Include="..\common\ttddecmnd.h" /> <ClInclude Include="..\common\ttlib.h" /> Modified: trunk/teraterm/ttpmacro/ttpmacro.v16.vcxproj =================================================================== --- trunk/teraterm/ttpmacro/ttpmacro.v16.vcxproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpmacro/ttpmacro.v16.vcxproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -152,7 +152,6 @@ <ClInclude Include="..\common\compat_win.h" /> <ClInclude Include="..\common\dlglib.h" /> <ClInclude Include="..\common\dllutil.h" /> - <ClInclude Include="..\common\layer_for_unicode.h" /> <ClInclude Include="..\common\tmfc.h" /> <ClInclude Include="..\common\ttddecmnd.h" /> <ClInclude Include="..\common\ttlib.h" /> @@ -204,4 +203,4 @@ <UserProperties RESOURCE_FILE="ttpmacro.rc" /> </VisualStudio> </ProjectExtensions> -</Project> \ No newline at end of file +</Project> Modified: trunk/teraterm/ttpmacro/ttpmacro.v16.vcxproj.filters =================================================================== --- trunk/teraterm/ttpmacro/ttpmacro.v16.vcxproj.filters 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpmacro/ttpmacro.v16.vcxproj.filters 2021-06-29 15:20:20 UTC (rev 9324) @@ -144,9 +144,6 @@ <ClInclude Include="..\common\dllutil.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\common\layer_for_unicode.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="ttl_gui.h"> <Filter>Header Files</Filter> </ClInclude> @@ -170,4 +167,4 @@ <Filter>Source Files</Filter> </ResourceCompile> </ItemGroup> -</Project> \ No newline at end of file +</Project> Modified: trunk/teraterm/ttpmacro/ttpmacro.v8.vcproj =================================================================== --- trunk/teraterm/ttpmacro/ttpmacro.v8.vcproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpmacro/ttpmacro.v8.vcproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -289,10 +289,6 @@ > </File> <File - RelativePath="..\common\layer_for_unicode.h" - > - </File> - <File RelativePath="ListDlg.h" > </File> Modified: trunk/teraterm/ttpmacro/ttpmacro.v9.vcproj =================================================================== --- trunk/teraterm/ttpmacro/ttpmacro.v9.vcproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpmacro/ttpmacro.v9.vcproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -386,10 +386,6 @@ > </File> <File - RelativePath="..\common\layer_for_unicode.h" - > - </File> - <File RelativePath="..\common\dllutil.h" > </File> Modified: trunk/teraterm/ttpset/CMakeLists.txt =================================================================== --- trunk/teraterm/ttpset/CMakeLists.txt 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpset/CMakeLists.txt 2021-06-29 15:20:20 UTC (rev 9324) @@ -70,8 +70,6 @@ PRIVATE common_static ttpcmn - # - gdi32 ) install( Modified: trunk/teraterm/ttpset/ttset.c =================================================================== --- trunk/teraterm/ttpset/ttset.c 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpset/ttset.c 2021-06-29 15:20:20 UTC (rev 9324) @@ -46,7 +46,6 @@ #include "tt_res.h" #include "servicenames.h" #include "codeconv.h" -#include "layer_for_unicode.h" #include "win32helper.h" #define DllExport __declspec(dllexport) @@ -172,7 +171,7 @@ wchar_t *defW = ToWcharA(defA); DWORD lenW_max = size; wchar_t *strW = malloc(sizeof(wchar_t) * lenW_max); - DWORD lenW = _GetPrivateProfileStringW(appW, keyW, defW, strW, lenW_max, filenameW); + DWORD lenW = GetPrivateProfileStringW(appW, keyW, defW, strW, lenW_max, filenameW); free(appW); free(keyW); free(defW); @@ -202,7 +201,7 @@ wchar_t *appW = ToWcharA(appA); wchar_t *keyW = ToWcharA(keyA); wchar_t *strW = ToWcharA(strA); - BOOL r = _WritePrivateProfileStringW(appW, keyW, strW, filenameW); + BOOL r = WritePrivateProfileStringW(appW, keyW, strW, filenameW); free(appW); free(keyW); free(strW); @@ -216,7 +215,7 @@ { wchar_t *appW = ToWcharA(appA); wchar_t *keyW = ToWcharA(keyA); - UINT r = _GetPrivateProfileIntW(appW, keyW, def, filenameW); + UINT r = GetPrivateProfileIntW(appW, keyW, def, filenameW); free(appW); free(keyW); return r; Modified: trunk/teraterm/ttpset/ttset_keyboard.c =================================================================== --- trunk/teraterm/ttpset/ttset_keyboard.c 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/teraterm/ttpset/ttset_keyboard.c 2021-06-29 15:20:20 UTC (rev 9324) @@ -36,7 +36,6 @@ #include <crtdbg.h> #include "ttlib.h" #include "codeconv.h" -#include "layer_for_unicode.h" #include "../teraterm/keyboard_i.h" typedef struct { @@ -51,7 +50,7 @@ for (i = 0; i < count; i++) { wchar_t Temp[11]; WORD Num; - _GetPrivateProfileStringW(section, p->key_str, L"", Temp, _countof(Temp), FName); + GetPrivateProfileStringW(section, p->key_str, L"", Temp, _countof(Temp), FName); if (Temp[0] == 0) Num = 0xFFFF; else if (_wcsicmp(Temp, L"off") == 0) @@ -191,8 +190,8 @@ wchar_t EntName[7]; wchar_t TempStr[256]; _snwprintf_s(EntName, _countof(EntName), _TRUNCATE, L"User%d", i + 1); - _GetPrivateProfileStringW(L"User keys", EntName, L"", - TempStr, _countof(TempStr), FName); + GetPrivateProfileStringW(L"User keys", EntName, L"", + TempStr, _countof(TempStr), FName); if (TempStr[0] == 0) { continue; } Modified: trunk/ttssh2/ttxssh/CMakeLists.txt =================================================================== --- trunk/ttssh2/ttxssh/CMakeLists.txt 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/ttssh2/ttxssh/CMakeLists.txt 2021-06-29 15:20:20 UTC (rev 9324) @@ -105,7 +105,6 @@ ../../teraterm/common/servicenames.h ../../teraterm/common/codeconv.h ../../teraterm/common/tipwin.h - ../../teraterm/common/layer_for_unicode.h ../../teraterm/common/compat_win.h ../../teraterm/common/dllutil.h ) Modified: trunk/ttssh2/ttxssh/auth.c =================================================================== --- trunk/ttssh2/ttxssh/auth.c 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/ttssh2/ttxssh/auth.c 2021-06-29 15:20:20 UTC (rev 9324) @@ -52,7 +52,6 @@ #include "auth.h" #include "helpid.h" #include "codeconv.h" -#include "layer_for_unicode.h" #include "asprintf.h" #define AUTH_START_USER_AUTH_ON_ERROR_END 1 @@ -137,7 +136,7 @@ break; } - result = _CallWindowProcW(data->ProcOrg, control, msg, wParam, lParam); + result = CallWindowProcW(data->ProcOrg, control, msg, wParam, lParam); if (msg == WM_NCDESTROY) { SetWindowLongPtr(control, GWLP_WNDPROC, (LONG_PTR)data->ProcOrg); @@ -156,8 +155,8 @@ data->pvar = pvar; data->tipwin = NULL; data->UseControlChar = UseControlChar; - _SetWindowLongPtrW(passwordControl, GWLP_WNDPROC, (LONG_PTR)password_wnd_proc); - _SetWindowLongPtrW(passwordControl, GWLP_USERDATA, (LONG_PTR)data); + SetWindowLongPtrW(passwordControl, GWLP_WNDPROC, (LONG_PTR)password_wnd_proc); + SetWindowLongPtrW(passwordControl, GWLP_USERDATA, (LONG_PTR)data); SetFocus(passwordControl); } @@ -208,9 +207,9 @@ const char *host_name = SSH_get_host_name(pvar); wchar_t *host_nameW = ToWcharA(host_name); - _GetDlgItemTextW(dlg, IDC_SSHAUTHBANNER, buf2, _countof(buf2)); + GetDlgItemTextW(dlg, IDC_SSHAUTHBANNER, buf2, _countof(buf2)); aswprintf(&buf, buf2, host_nameW); - _SetDlgItemTextW(dlg, IDC_SSHAUTHBANNER, buf); + SetDlgItemTextW(dlg, IDC_SSHAUTHBANNER, buf); free(host_nameW); free(buf); } @@ -299,9 +298,9 @@ /* must be retrying a failed attempt */ wchar_t uimsg[MAX_UIMSG]; UTIL_get_lang_msgW("DLG_AUTH_BANNER2_FAILED", pvar, L"Authentication failed. Please retry.", uimsg); - _SetDlgItemTextW(dlg, IDC_SSHAUTHBANNER2, uimsg); + SetDlgItemTextW(dlg, IDC_SSHAUTHBANNER2, uimsg); UTIL_get_lang_msgW("DLG_AUTH_TITLE_FAILED", pvar, L"Retrying SSH Authentication", uimsg); - _SetWindowTextW(dlg, uimsg); + SetWindowTextW(dlg, uimsg); default_method = pvar->auth_state.failed_method; } @@ -540,8 +539,8 @@ SetFocus(GetDlgItem(dlg, file_ctl_ID)); destroy_malloced_string(&password); return FALSE; - } - + } + if (SSHv1(pvar)) { BOOL invalid_passphrase = FALSE; @@ -1085,13 +1084,13 @@ // \x95\x9A\x82\xB9\x8E\x9A on/off \x82\xF0\x90\xE8\x91ւ\xA6\x82\xE9 HWND hWnd = GetDlgItem(dlg, IDC_SSHPASSWORD); if (password_char == 0) { - password_char = (wchar_t)_SendMessageW(hWnd, EM_GETPASSWORDCHAR, 0, 0); + password_char = (wchar_t)SendMessageW(hWnd, EM_GETPASSWORDCHAR, 0, 0); } if (ShowPassPhrase) { - _SendMessageW(hWnd, EM_SETPASSWORDCHAR, 0, 0); + SendMessageW(hWnd, EM_SETPASSWORDCHAR, 0, 0); } else { if (IsWindowUnicode(hWnd)) { - _SendMessageW(hWnd, EM_SETPASSWORDCHAR, (WPARAM)password_char, 0); + SendMessageW(hWnd, EM_SETPASSWORDCHAR, (WPARAM)password_char, 0); } else { // EM_GETPASSWORDCHAR \x82\xC5 Unicode \x83L\x83\x83\x83\x89\x83N\x83^\x82\xAA\x8E擾\x82ł\xAB\x82Ă\xE0 @@ -1354,7 +1353,7 @@ if (SSHv2(pvar)) { pvar->keyboard_interactive_password_input = 1; handle_SSH2_userauth_inforeq(pvar); - } + } SSH_notify_cred(pvar); @@ -1727,7 +1726,7 @@ "RSA"); strncat_s(dest, len, buf, _TRUNCATE); } - } else { + } else { // SSH2:\x94F\x8F\x81\x83\\x83b\x83h\x82̔\xBB\x95\xCA (2004.12.23 yutaka) // keyboard-interactive\x83\x81\x83\\x83b\x83h\x82\xF0\x92lj\xC1 (2005.3.12 yutaka) if (pvar->auth_state.cur_cred.method == SSH_AUTH_PASSWORD || Modified: trunk/ttssh2/ttxssh/hosts.c =================================================================== --- trunk/ttssh2/ttxssh/hosts.c 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/ttssh2/ttxssh/hosts.c 2021-06-29 15:20:20 UTC (rev 9324) @@ -55,7 +55,6 @@ #include <memory.h> #include "codeconv.h" -#include "layer_for_unicode.h" #include "asprintf.h" #undef DialogBoxParam @@ -837,7 +836,7 @@ // \x8AY\x93\x96\x82\xB7\x82錮\x82\xAA\x8C\xA9\x82\xA9\x82\xC1\x82\xBD\x82\xE7\x81A\x83R\x81[\x83\x8B\x83o\x83b\x83N\x8A\x94\x82\xF0\x8CĂяo\x82\xB7\x81B if (key != NULL) { - if (callback(key, ctx) == 0) + if (callback(key, ctx) == 0) key_free(key); } } @@ -994,11 +993,11 @@ wchar_t *hostW; // \x83z\x83X\x83g\x96\xBC\x82ɒu\x8A\xB7\x82\xB7\x82\xE9 - _GetDlgItemTextW(dlg, IDC_HOSTWARNING, buf, _countof(buf)); + GetDlgItemTextW(dlg, IDC_HOSTWARNING, buf, _countof(buf)); hostW = ToWcharA(pvar->hosts_state.prefetched_hostname); aswprintf(&buf2, buf, hostW); free(hostW); - _SetDlgItemTextW(dlg, IDC_HOSTWARNING, buf2); + SetDlgItemTextW(dlg, IDC_HOSTWARNING, buf2); free(buf2); pvar->hFontFixed = UTIL_get_lang_fixedfont(dlg, pvar->ts->UILanguageFile); @@ -1112,7 +1111,7 @@ // setup if (pvar->ssh_state.tcpport == 22) { _snprintf_s(result, msize, _TRUNCATE, "%s %s %s\r\n", - pvar->hosts_state.prefetched_hostname, + pvar->hosts_state.prefetched_hostname, get_ssh2_hostkey_type_name_from_key(key), uu); } else { @@ -1804,7 +1803,7 @@ } init_hosts_dlg(pvar, dlg); - // add host check box\x82Ƀ`\x83F\x83b\x83N\x82\xF0\x83f\x83t\x83H\x83\x8B\x83g\x82œ\xFC\x82\xEA\x82Ă\xA8\x82\xAD + // add host check box\x82Ƀ`\x83F\x83b\x83N\x82\xF0\x83f\x83t\x83H\x83\x8B\x83g\x82œ\xFC\x82\xEA\x82Ă\xA8\x82\xAD SendMessage(GetDlgItem(dlg, IDC_ADDTOKNOWNHOSTS), BM_SETCHECK, BST_CHECKED, 0); CenterWindow(dlg, GetParent(dlg)); @@ -2269,7 +2268,7 @@ * \x95K\x97v\x82ɉ\x9E\x82\xB6\x82\xC4 known_hosts \x83_\x83C\x83A\x83\x8D\x83O\x82\xF0\x8CĂяo\x82\xB7\x81B * * hostname: \x90ڑ\xB1\x90\xE6\x82̃z\x83X\x83g\x96\xBC - * tcpport: \x90ڑ\xB1\x90\xE6\x83|\x81[\x83g\x94ԍ\x86 + * tcpport: \x90ڑ\xB1\x90\xE6\x83|\x81[\x83g\x94ԍ\x86 * key: \x83T\x81[\x83o\x82\xA9\x82\xE7\x82̌\xF6\x8AJ\x8C\xAE * * return: @@ -2290,7 +2289,7 @@ && _stricmp(pvar->hosts_state.prefetched_hostname, hostname) == 0 && HOSTS_compare_public_key(&pvar->hosts_state.hostkey, key) == 1) { - // \x89\xBD\x82\xE0\x82\xB9\x82\xB8\x82ɖ߂\xE9\x81B + // \x89\xBD\x82\xE0\x82\xB9\x82\xB8\x82ɖ߂\xE9\x81B return TRUE; } @@ -2335,7 +2334,7 @@ // "/nosecuritywarning"\x82\xAA\x8Ew\x92肳\x82\xEA\x82Ă\xA2\x82\xE9\x8Fꍇ\x81A\x83_\x83C\x83A\x83\x8D\x83O\x82\xF0\x95\\x8E\xA6\x82\xB3\x82\xB9\x82\xB8\x82\xC9 return success \x82\xB7\x82\xE9\x81B if (pvar->nocheck_known_hosts == TRUE) { - // \x89\xBD\x82\xE0\x82\xB9\x82\xB8\x82ɖ߂\xE9\x81B + // \x89\xBD\x82\xE0\x82\xB9\x82\xB8\x82ɖ߂\xE9\x81B return TRUE; } @@ -2370,8 +2369,8 @@ PostMessage(pvar->NotificationWindow, WM_COMMAND, id, 0); - logprintf(LOG_LEVEL_INFO, "Calling known_hosts dialog...(%s)", - id == ID_SSHDIFFERENTKEY ? "SSHDIFFERENTKEY" : + logprintf(LOG_LEVEL_INFO, "Calling known_hosts dialog...(%s)", + id == ID_SSHDIFFERENTKEY ? "SSHDIFFERENTKEY" : id == ID_SSHDIFFERENT_TYPE_KEY ? "SSHDIFFERENT_TYPE_KEY" : "SSHUNKNOWNHOST" ); Modified: trunk/ttssh2/ttxssh/ssh.c =================================================================== --- trunk/ttssh2/ttxssh/ssh.c 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/ttssh2/ttxssh/ssh.c 2021-06-29 15:20:20 UTC (rev 9324) @@ -34,7 +34,6 @@ #include "key.h" #include "ttcommon.h" #include "codeconv.h" -#include "layer_for_unicode.h" #include <openssl/bn.h> #include <openssl/evp.h> @@ -356,7 +355,7 @@ // SCP\x8E\xF3\x90M\x82̏ꍇ\x82̂݁ASCP\x97p\x83\x8A\x83X\x83g\x82̊J\x95\xFA\x82\xF0\x8Ds\x82\xA4\x81B // Windows9x\x82ŗ\x8E\x82\xBF\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B - if (c->scp.dir == FROMREMOTE) + if (c->scp.dir == FROMREMOTE) ssh2_scp_free_packetlist(c); } if (c->type == TYPE_AGENT) { @@ -529,7 +528,7 @@ { int i; - if (memtag_use > 0) + if (memtag_use > 0) return; for (i = 0 ; i < MEMTAG_MAX ; i++) { @@ -1192,7 +1191,7 @@ <----------------------------> SSH2 sending data on TCP - + NOTE: payload = type(1) + raw-data len = ssh_state.outgoing_packet_len = payload size @@ -2678,11 +2677,11 @@ set_uint32(outmsg, len); memcpy(outmsg + 4, cred->password, len); - + // \x83Z\x83b\x83V\x83\x87\x83\x93\x95\xA1\x90\xBB\x8E\x9E\x82Ƀp\x83X\x83\x8F\x81[\x83h\x82\xF0\x8Eg\x82\xA2\x89\xBD\x82\xA2\x82̂ŁA\x82\xB1\x82\xB1\x82ł̃\x8A\x83\\x81[\x83X\x89\xF0\x95\xFA\x82͂\xE2\x82߂\xE9\x81B // socket close\x8E\x9E\x82ɂ\xE0\x82\xB1\x82̊\x94\x82͌Ă\xEA\x82Ă\xA2\x82\xE9\x82̂ŁA\x82\xBD\x82Ԃ\xF1\x96\xE2\x91\xE8\x82Ȃ\xA2\x81B(2005.4.8 yutaka) //AUTH_destroy_cur_cred(pvar); - + enque_simple_auth_handlers(pvar); break; } @@ -3795,7 +3794,7 @@ c = ssh2_local_channel_lookup(local_channel_num); if (c == NULL) return; - + SSH2_channel_input_eof(pvar, c); } } @@ -3947,7 +3946,7 @@ return; } - // making the fake data + // making the fake data newlen = 2 * auth_data_len + 1; newdata = malloc(newlen); if (newdata == NULL) @@ -4181,7 +4180,7 @@ goto error; } } else { // copy remote to local - strncpy_s(c->scp.remotefile, sizeof(c->scp.remotefile), sendfile, _TRUNCATE); + strncpy_s(c->scp.remotefile, sizeof(c->scp.remotefile), sendfile, _TRUNCATE); if (dstfile == NULL || dstfile[0] == '\0') { // local file path is empty. char *fn; @@ -4236,7 +4235,7 @@ } // setup SCP data - c->scp.dir = direction; + c->scp.dir = direction; c->scp.state = SCP_INIT; // session open @@ -4484,7 +4483,7 @@ } // \x8Ew\x92肳\x82ꂽ\x95\xB6\x8E\x9A\x97\xF1\x82𑖍\xB8\x82\xB5\x81A\x8B\x96\x89\xB3\x82\xEA\x82Ă\xA2\x82Ȃ\xA2\x95\xB6\x8E\x9A\x81A\x8Fd\x95\xA1\x82\xB7\x82镶\x8E\x9A\x82͍폜\x82\xB7\x82\xE9\x81B - // + // // ex. (i=5 \x82̕\xB6\x8E\x9A\x82\xF0\x8D폜\x82\xB7\x82\xE9) // i=012345 // >:=9<87;A@?B3026(\0) @@ -4492,7 +4491,7 @@ // <------------> // \x81\xAB // >:=9<7;A@?B3026(\0) - // + // for (i = 0; buf[i] != 0; i++) { int num = buf[i] - '0'; @@ -4512,7 +4511,7 @@ } // \x8Ew\x92肳\x82\xEA\x82Ă\xA2\x82Ȃ\xA2\x95\xB6\x8E\x9A\x82\xAA\x82\xA0\x82\xEA\x82Adisabled line\x82̒\xBC\x91O\x82ɑ}\x93\xFC\x82\xB7\x82\xE9\x81B - // + // // ex. (Z\x82\xF0\x91}\x93\xFC\x82\xB7\x82\xE9) // k // >:=9<87;A@?B3026(\0) @@ -4522,7 +4521,7 @@ // >:=9<87;A@?B30026(\0) // \x81\xAB k // >:=9<87;A@?B3Z026(\0) - // + // for (j = 0; j < default_strings_len && default_strings[j] != 0; j++) { int num = default_strings[j]; @@ -5259,7 +5258,7 @@ _snprintf_s(tmpbuf, sizeof(tmpbuf), _TRUNCATE, pvar->ts->UIMsg, pvar->kexgex_max, grp_bits); } - + if (tmpbuf[0] != 0) { UTIL_get_lang_msg("MSG_SSH_GEX_SIZE_TITLE", pvar, "TTSSH: Confirm GEX group size"); @@ -5329,7 +5328,7 @@ // // KEX_ECDH_SHA2_256 or KEX_ECDH_SHA2_384 or KEX_ECDH_SHA2_521 // - + static void SSH2_ecdh_kex_init(PTInstVar pvar) { EC_KEY *client_key = NULL; @@ -5779,7 +5778,7 @@ clear_contents_for_known_hosts(pvar); - /* + /* * SSH2_MSG_NEWKEYS \x82\xF0\x8E\xF3\x90M\x82\xB5\x82Ă\xA2\x82\xBD\x82\xE7\x81A\x8E\xA9\x95\xAA\x82ŏ\x88\x97\x9D\x82\xF0\x8CĂяo\x82\xB7\x81B */ if (pvar->contents_after_known_hosts.SSH2_MSG_NEWKEYS_received) { @@ -5816,7 +5815,7 @@ Key *hostkey = NULL; // hostkey BOOL result = FALSE; int ret; - + logputs(LOG_LEVEL_VERBOSE, "SSH2_MSG_KEX_DH_GEX_REPLY was received."); memset(&hostkey, 0, sizeof(hostkey)); @@ -6057,7 +6056,7 @@ clear_contents_for_known_hosts(pvar); - /* + /* * SSH2_MSG_NEWKEYS \x82\xF0\x8E\xF3\x90M\x82\xB5\x82Ă\xA2\x82\xBD\x82\xE7\x81A\x8E\xA9\x95\xAA\x82ŏ\x88\x97\x9D\x82\xF0\x8CĂяo\x82\xB7\x81B */ if (pvar->contents_after_known_hosts.SSH2_MSG_NEWKEYS_received) { @@ -6344,7 +6343,7 @@ clear_contents_for_known_hosts(pvar); - /* + /* * SSH2_MSG_NEWKEYS \x82\xF0\x8E\xF3\x90M\x82\xB5\x82Ă\xA2\x82\xBD\x82\xE7\x81A\x8E\xA9\x95\xAA\x82ŏ\x88\x97\x9D\x82\xF0\x8CĂяo\x82\xB7\x81B */ if (pvar->contents_after_known_hosts.SSH2_MSG_NEWKEYS_received) { @@ -7202,7 +7201,7 @@ case 2: msgW = ToWcharU8(msg); if (msgW) { - _MessageBoxW(pvar->cv->HWin, msgW, L"Authentication Banner", MB_OK | MB_ICONINFORMATION); + MessageBoxW(pvar->cv->HWin, msgW, L"Authentication Banner", MB_OK | MB_ICONINFORMATION); free(msgW); } break; @@ -7243,7 +7242,7 @@ // SSH2 \x83\x81\x83b\x83Z\x81[\x83W 60 \x94Ԃ̏\x88\x97\x9D\x8A\x94 // // SSH2 \x82ł͈ȉ\xBA\x82̃\x81\x83b\x83Z\x81[\x83W\x82\xAA 60 \x94Ԃ֏d\x95\xA1\x82\xB5\x82Ċ\x84\x82蓖\x82Ă\xE7\x82\xEA\x82Ă\xA2\x82\xE9\x81B -// +// // * SSH2_MSG_USERAUTH_INFO_REQUEST (keyboard-interactive) // * SSH2_MSG_USERAUTH_PK_OK (publickey / Tera Term \x82ł\xCD Pageant \x94F\x8F̂\xDD) // * SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ (password) @@ -7250,7 +7249,7 @@ // // \x8C\xBB\x8F\xF3\x82̎\xC0\x91\x95\x82ł͓\xAF\x82\xB6\x83\x81\x83b\x83Z\x81[\x83W\x94ԍ\x86\x82\xAA\x91\xB6\x8D݂ł\xAB\x82Ȃ\xA2\x82̂ŁA // 60 \x94Ԃ͂\xB1\x82̊\x94\x82ŎAmethod \x82ɂ\xE6\x82\xC1\x82đΉ\x9E\x82\xB7\x82\xE9\x83n\x83\x93\x83h\x83\x89\x8A\x94\x82ɐU\x82蕪\x82\xAF\x82\xE9\x81B -// +// BOOL handle_SSH2_userauth_msg60(PTInstVar pvar) { if (pvar->auth_state.cur_cred.method == SSH_AUTH_TIS) { @@ -7337,7 +7336,7 @@ // \x83p\x83X\x83\x8F\x81[\x83h\x95ύX\x82̏ꍇ\x81A\x83\x81\x83b\x83Z\x81[\x83W\x82\xAA\x82\xA0\x82\xEA\x82A\x95\\x8E\xA6\x82\xB7\x82\xE9\x81B(2010.11.11 yutaka) if (num == 0) { - if (strlen(lprompt) > 0) + if (strlen(lprompt) > 0) MessageBox(pvar->cv->HWin, lprompt, "USERAUTH INFO_REQUEST", MB_OK | MB_ICONINFORMATION); } @@ -7913,7 +7912,7 @@ // SSH2 port-forwarding \x82ɂ\xA8\x82\xA2\x82ăZ\x83b\x83V\x83\x87\x83\x93\x82\xAA\x83I\x81[\x83v\x83\x93\x82ł\xAB\x82Ȃ\xA2\x8Fꍇ\x82̃T\x81[\x83o\x82\xA9\x82\xE7\x82̃\x8A\x83v\x83\x89\x83C\x81i\x8E\xB8\x94s\x81j static BOOL handle_SSH2_open_failure(PTInstVar pvar) -{ +{ int len; char *data; int id; @@ -8043,7 +8042,7 @@ // SSH2 port-forwarding (remote -> local)\x82ɑ\xB7\x82郊\x83v\x83\x89\x83C\x81i\x90\xAC\x8C\xF7\x81j static BOOL handle_SSH2_request_success(PTInstVar pvar) -{ +{ // \x95K\x97v\x82ł\xA0\x82\xEA\x82\x8D\x83O\x82\xF0\x8E\xE6\x82\xE9\x81B\x93\xC1\x82ɉ\xBD\x82\xE0\x82\xB5\x82Ȃ\xAD\x82Ă\xE0\x82悢\x81B logputs(LOG_LEVEL_VERBOSE, "SSH2_MSG_REQUEST_SUCCESS was received."); @@ -8054,7 +8053,7 @@ // SSH2 port-forwarding (remote -> local)\x82ɑ\xB7\x82郊\x83v\x83\x89\x83C\x81i\x8E\xB8\x94s\x81j static BOOL handle_SSH2_request_failure(PTInstVar pvar) -{ +{ // \x95K\x97v\x82ł\xA0\x82\xEA\x82\x8D\x83O\x82\xF0\x8E\xE6\x82\xE9\x81B\x93\xC1\x82ɉ\xBD\x82\xE0\x82\xB5\x82Ȃ\xAD\x82Ă\xE0\x82悢\x81B logputs(LOG_LEVEL_VERBOSE, "SSH2_MSG_REQUEST_FAILURE was received."); @@ -8064,7 +8063,7 @@ } static BOOL handle_SSH2_channel_success(PTInstVar pvar) -{ +{ Channel_t *c; #ifdef DONT_WANTCONFIRM int want_reply = 0; // false @@ -8482,7 +8481,7 @@ if (c->scp.state == SCP_INIT) { char buf[128]; - _snprintf_s(buf, sizeof(buf), _TRUNCATE, "T%lu 0 %lu 0\n", + _snprintf_s(buf, sizeof(buf), _TRUNCATE, "T%lu 0 %lu 0\n", (unsigned long)c->scp.filestat.st_mtime, (unsigned long)c->scp.filestat.st_atime); c->scp.state = SCP_TIMESTAMP; @@ -8491,7 +8490,7 @@ } else if (c->scp.state == SCP_TIMESTAMP) { char buf[128]; - _snprintf_s(buf, sizeof(buf), _TRUNCATE, "C0644 %lld %s\n", + _snprintf_s(buf, sizeof(buf), _TRUNCATE, "C0644 %lld %s\n", c->scp.filestat.st_size, c->scp.localfile); c->scp.state = SCP_FILEINFO; @@ -8877,7 +8876,7 @@ static BOOL handle_SSH2_channel_data(PTInstVar pvar) -{ +{ int len; char *data; int id; @@ -8959,7 +8958,7 @@ // \x83G\x83\x89\x81[\x83\x81\x83b\x83Z\x81[\x83W\x82\xF0 SSH2_MSG_CHANNEL_EXTENDED_DATA \x82ő\x97\x90M\x82\xB5\x82Ă\xAD\x82\xE9\x81B // SSH2_MSG_CHANNEL_EXTENDED_DATA \x82\xF0\x8F\x88\x97\x9D\x82\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B(2006.10.30 maya) static BOOL handle_SSH2_channel_extended_data(PTInstVar pvar) -{ +{ int len; char *data; int id; @@ -9042,7 +9041,7 @@ static BOOL handle_SSH2_channel_eof(PTInstVar pvar) -{ +{ int len; char *data; int id; @@ -9081,7 +9080,7 @@ } static BOOL handle_SSH2_channel_open(PTInstVar pvar) -{ +{ int len; char *data; Channel_t *c = NULL; @@ -9209,7 +9208,7 @@ c->remote_id = remote_id; c->remote_window = remote_window; c->remote_maxpacket = remote_maxpacket; - + SSH2_confirm_channel_open(pvar, c); } else { @@ -9243,7 +9242,7 @@ static BOOL handle_SSH2_channel_close(PTInstVar pvar) -{ +{ int len; char *data; int id; @@ -9395,7 +9394,7 @@ static BOOL handle_SSH2_window_adjust(PTInstVar pvar) -{ +{ int len; char *data; int id; Modified: trunk/ttssh2/ttxssh/ttxssh.c =================================================================== --- trunk/ttssh2/ttxssh/ttxssh.c 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/ttssh2/ttxssh/ttxssh.c 2021-06-29 15:20:20 UTC (rev 9324) @@ -84,7 +84,6 @@ #include "sftp.h" #include "compat_win.h" -#include "layer_for_unicode.h" #include "codeconv.h" #include "libputty.h" @@ -160,7 +159,7 @@ FWDUI_init(pvar); ssh_heartbeat_lock_initialize(); - + pvar->cc[MODE_IN] = NULL; pvar->cc[MODE_OUT] = NULL; // \x83\x81\x83\x82\x83\x8A\x8Am\x95ۂ\xCD CRYPT_start_encryption \x82̐\xE6\x82\xCC cipher_init_SSH2 \x82Ɉړ\xAE @@ -1046,12 +1045,12 @@ wchar_t EntNameW[128]; wchar_t TempHostW[HostNameMaxLength + 1]; _snwprintf_s(EntNameW, _countof(EntNameW), _TRUNCATE, L"host%d", i); - _GetPrivateProfileStringW(L"Hosts", EntNameW, L"", - TempHostW, _countof(TempHostW), - SetupFnW); + GetPrivateProfileStringW(L"Hosts", EntNameW, L"", + TempHostW, _countof(TempHostW), + SetupFnW); if (TempHostW[0] != 0) - _SendDlgItemMessageW(dlg, IDC_HOSTNAME, CB_ADDSTRING, - 0, (LPARAM) TempHostW); + SendDlgItemMessageW(dlg, IDC_HOSTNAME, CB_ADDSTRING, + 0, (LPARAM) TempHostW); i++; } while (i <= MAXHOSTLIST); free(SetupFnW); @@ -2042,7 +2041,7 @@ { wchar_t *strW = ToWcharU8(buf2); - _SetDlgItemTextW(dlg, IDC_ABOUTTEXT, strW); + SetDlgItemTextW(dlg, IDC_ABOUTTEXT, strW); free(strW); } } @@ -2158,7 +2157,7 @@ // Edit control\x82\xF0\x83T\x83u\x83N\x83\x89\x83X\x89\xBB\x82\xB7\x82\xE9\x81B g_deltaSumAboutDlg = 0; - g_defAboutDlgEditWndProc = (WNDPROC)_SetWindowLongPtrW(GetDlgItem(dlg, IDC_ABOUTTEXT), GWLP_WNDPROC, (LONG_PTR)AboutDlgEditWindowProc); + g_defAboutDlgEditWndProc = (WNDPROC)SetWindowLongPtrW(GetDlgItem(dlg, IDC_ABOUTTEXT), GWLP_WNDPROC, (LONG_PTR)AboutDlgEditWindowProc); CenterWindow(dlg, GetParent(dlg)); @@ -2299,8 +2298,8 @@ wchar_t *name = get_listbox_cipher_nameW(cipher, pvar); if (name != NULL) { - int index = _SendMessageW(cipherControl, LB_ADDSTRING, 0, (LPARAM) name); - _SendMessageW(cipherControl, LB_SETITEMDATA, index, cipher); + int index = SendMessageW(cipherControl, LB_ADDSTRING, 0, (LPARAM) name); + SendMessageW(cipherControl, LB_SETITEMDATA, index, cipher); free(name); } } @@ -2316,7 +2315,7 @@ if (index == 0) { UTIL_get_lang_msgW("DLG_SSHSETUP_KEX_BORDER", pvar, L"<KEXs below this line are disabled>", uimsg); - _SendMessageW(kexControl, LB_ADDSTRING, 0, (LPARAM)uimsg); + SendMessageW(kexControl, LB_ADDSTRING, 0, (LPARAM)uimsg); } else { const char *name = get_kex_algorithm_name(index); if (name != NULL) { @@ -2335,7 +2334,7 @@ if (index == 0) { UTIL_get_lang_msgW("DLG_SSHSETUP_HOST_KEY_BORDER", pvar, L"<Host Keys below this line are disabled>", uimsg); - _SendMessageW(hostkeyControl, LB_ADDSTRING, 0, (LPARAM)uimsg); + SendMessageW(hostkeyControl, LB_ADDSTRING, 0, (LPARAM)uimsg); } else { const char *name = get_ssh2_hostkey_type_name(index); if (name != NULL) { @@ -2354,7 +2353,7 @@ if (index == 0) { UTIL_get_lang_msgW("DLG_SSHSETUP_MAC_BORDER", pvar, L"<MACs below this line are disabled>", uimsg); - _SendMessageW(macControl, LB_ADDSTRING, 0, (LPARAM)uimsg); + SendMessageW(macControl, LB_ADDSTRING, 0, (LPARAM)uimsg); } else { const char *name = get_ssh2_mac_name_by_id(index); if (name != NULL) { @@ -2373,7 +2372,7 @@ if (index == 0) { UTIL_get_lang_msgW("DLG_SSHSETUP_COMP_BORDER", pvar, L"<Compression methods below this line are disabled>", uimsg); - _SendMessageW(compControl, LB_ADDSTRING, 0, (LPARAM)uimsg); + SendMessageW(compControl, LB_ADDSTRING, 0, (LPARAM)uimsg); } else { const char *name = get_ssh2_comp_name(index); if (name != NULL) { @@ -2435,7 +2434,7 @@ // hostkey rotation(OpenSSH 6.8) for (i = 0; i < SSH_UPDATE_HOSTKEYS_MAX; i++) { UTIL_get_lang_msgW(rotationItemKey[i], pvar, rotationItem[i], uimsg); - _SendMessageW(hostkeyRotationControlList, CB_INSERTSTRING, i, (LPARAM)uimsg); + SendMessageW(hostkeyRotationControlList, CB_INSERTSTRING, i, (LPARAM)uimsg); } ch = pvar->settings.UpdateHostkeys; if (!(ch >= 0 && ch < SSH_UPDATE_HOSTKEYS_MAX)) @@ -2535,7 +2534,7 @@ count = (int) SendMessage(cipherControl, LB_GETCOUNT, 0, 0); buf2index = 0; for (i = 0; i < count; i++) { - int chipher = _SendMessageW(cipherControl, LB_GETITEMDATA, i, 0); + int chipher = SendMessageW(cipherControl, LB_GETITEMDATA, i, 0); buf2[buf2index] = '0' + chipher; buf2index++; } @@ -2711,22 +2710,22 @@ static void move_cur_sel_delta(HWND listbox, int delta) { - int curPos = (int) _SendMessageW(listbox, LB_GETCURSEL, 0, 0); - int maxPos = (int) _SendMessageW(listbox, LB_GETCOUNT, 0, 0) - 1; + int curPos = (int) SendMessageW(listbox, LB_GETCURSEL, 0, 0); + int maxPos = (int) SendMessageW(listbox, LB_GETCOUNT, 0, 0) - 1; int newPos = curPos + delta; if (curPos >= 0 && newPos >= 0 && newPos <= maxPos) { int item_data; int index; - size_t len = _SendMessageW(listbox, LB_GETTEXTLEN, curPos, 0); + size_t len = SendMessageW(listbox, LB_GETTEXTLEN, curPos, 0); wchar_t *buf = malloc(sizeof(wchar_t) * (len+1)); buf[0] = 0; - _SendMessageW(listbox, LB_GETTEXT, curPos, (LPARAM) buf); - item_data = (int)_SendMessageW(listbox, LB_GETITEMDATA, curPos, 0); - _SendMessageW(listbox, LB_DELETESTRING, curPos, 0); - index = (int)_SendMessageW(listbox, LB_INSERTSTRING, newPos, (LPARAM)buf); - _SendMessageW(listbox, LB_SETITEMDATA, index, item_data); - _SendMessageW(listbox, LB_SETCURSEL, newPos, 0); + SendMessageW(listbox, LB_GETTEXT, curPos, (LPARAM) buf); + item_data = (int)SendMessageW(listbox, LB_GETITEMDATA, curPos, 0); + SendMessageW(listbox, LB_DELETESTRING, curPos, 0); + index = (int)SendMessageW(listbox, LB_INSERTSTRING, newPos, (LPARAM)buf); + SendMessageW(listbox, LB_SETITEMDATA, index, item_data); + SendMessageW(listbox, LB_SETCURSEL, newPos, 0); free(buf); } } Modified: trunk/ttssh2/ttxssh/ttxssh.v10.vcxproj =================================================================== --- trunk/ttssh2/ttxssh/ttxssh.v10.vcxproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/ttssh2/ttxssh/ttxssh.v10.vcxproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -180,7 +180,6 @@ <ClInclude Include="..\..\teraterm\common\codeconv.h" /> <ClInclude Include="..\..\teraterm\common\compat_win.h" /> <ClInclude Include="..\..\teraterm\common\dllutil.h" /> - <ClInclude Include="..\..\teraterm\common\layer_for_unicode.h" /> <ClInclude Include="..\..\teraterm\common\ttlib.h" /> <ClInclude Include="arc4random.h" /> <ClInclude Include="auth.h" /> Modified: trunk/ttssh2/ttxssh/ttxssh.v11.vcxproj =================================================================== --- trunk/ttssh2/ttxssh/ttxssh.v11.vcxproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/ttssh2/ttxssh/ttxssh.v11.vcxproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -185,7 +185,6 @@ <ClInclude Include="..\..\teraterm\common\codeconv.h" /> <ClInclude Include="..\..\teraterm\common\compat_win.h" /> <ClInclude Include="..\..\teraterm\common\dllutil.h" /> - <ClInclude Include="..\..\teraterm\common\layer_for_unicode.h" /> <ClInclude Include="..\..\teraterm\common\ttlib.h" /> <ClInclude Include="arc4random.h" /> <ClInclude Include="auth.h" /> Modified: trunk/ttssh2/ttxssh/ttxssh.v12.vcxproj =================================================================== --- trunk/ttssh2/ttxssh/ttxssh.v12.vcxproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/ttssh2/ttxssh/ttxssh.v12.vcxproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -185,7 +185,6 @@ <ClInclude Include="..\..\teraterm\common\codeconv.h" /> <ClInclude Include="..\..\teraterm\common\compat_win.h" /> <ClInclude Include="..\..\teraterm\common\dllutil.h" /> - <ClInclude Include="..\..\teraterm\common\layer_for_unicode.h" /> <ClInclude Include="..\..\teraterm\common\ttlib.h" /> <ClInclude Include="arc4random.h" /> <ClInclude Include="auth.h" /> Modified: trunk/ttssh2/ttxssh/ttxssh.v14.vcxproj =================================================================== --- trunk/ttssh2/ttxssh/ttxssh.v14.vcxproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/ttssh2/ttxssh/ttxssh.v14.vcxproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -185,7 +185,6 @@ <ClInclude Include="..\..\teraterm\common\codeconv.h" /> <ClInclude Include="..\..\teraterm\common\compat_win.h" /> <ClInclude Include="..\..\teraterm\common\dllutil.h" /> - <ClInclude Include="..\..\teraterm\common\layer_for_unicode.h" /> <ClInclude Include="..\..\teraterm\common\ttlib.h" /> <ClInclude Include="arc4random.h" /> <ClInclude Include="auth.h" /> Modified: trunk/ttssh2/ttxssh/ttxssh.v15.vcxproj =================================================================== --- trunk/ttssh2/ttxssh/ttxssh.v15.vcxproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/ttssh2/ttxssh/ttxssh.v15.vcxproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -186,7 +186,6 @@ <ClInclude Include="..\..\teraterm\common\codeconv.h" /> <ClInclude Include="..\..\teraterm\common\compat_win.h" /> <ClInclude Include="..\..\teraterm\common\dllutil.h" /> - <ClInclude Include="..\..\teraterm\common\layer_for_unicode.h" /> <ClInclude Include="..\..\teraterm\common\ttlib.h" /> <ClInclude Include="arc4random.h" /> <ClInclude Include="auth.h" /> Modified: trunk/ttssh2/ttxssh/ttxssh.v16.vcxproj =================================================================== --- trunk/ttssh2/ttxssh/ttxssh.v16.vcxproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/ttssh2/ttxssh/ttxssh.v16.vcxproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -187,7 +187,6 @@ <ClInclude Include="..\..\teraterm\common\codeconv.h" /> <ClInclude Include="..\..\teraterm\common\compat_win.h" /> <ClInclude Include="..\..\teraterm\common\dllutil.h" /> - <ClInclude Include="..\..\teraterm\common\layer_for_unicode.h" /> <ClInclude Include="..\..\teraterm\common\ttlib.h" /> <ClInclude Include="arc4random.h" /> <ClInclude Include="auth.h" /> Modified: trunk/ttssh2/ttxssh/ttxssh.v8.vcproj =================================================================== --- trunk/ttssh2/ttxssh/ttxssh.v8.vcproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/ttssh2/ttxssh/ttxssh.v8.vcproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -328,10 +328,6 @@ > </File> <File - RelativePath="..\..\teraterm\common\layer_for_unicode.h" - > - </File> - <File RelativePath="mac.h" > </File> Modified: trunk/ttssh2/ttxssh/ttxssh.v9.vcproj =================================================================== --- trunk/ttssh2/ttxssh/ttxssh.v9.vcproj 2021-06-29 15:20:06 UTC (rev 9323) +++ trunk/ttssh2/ttxssh/ttxssh.v9.vcproj 2021-06-29 15:20:20 UTC (rev 9324) @@ -335,10 +335,6 @@ > </File> <File - RelativePath="..\..\teraterm\common\layer_for_unicode.h" - > - </File> - <File RelativePath="..\..\teraterm\common\compat_win.h" > </File>