scmno****@osdn*****
scmno****@osdn*****
2018年 7月 24日 (火) 12:47:23 JST
Revision: 7165 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7165 Author: zmatsuo Date: 2018-07-24 12:47:23 +0900 (Tue, 24 Jul 2018) Log Message: ----------- merge trunk 7164 Modified Paths: -------------- branches/cmake/teraterm/teraterm/ttermpro.v10.vcxproj branches/cmake/teraterm/teraterm/ttermpro.v11.vcxproj branches/cmake/teraterm/teraterm/ttermpro.v12.vcxproj branches/cmake/teraterm/teraterm/ttermpro.v14.vcxproj branches/cmake/teraterm/teraterm/ttermpro.v15.vcxproj branches/cmake/teraterm/teraterm/ttermpro.v15.vcxproj.filters branches/cmake/teraterm/teraterm/ttermpro.v9.vcproj branches/cmake/teraterm/teraterm/ttermpro.vcproj branches/cmake/teraterm/ttpdlg/ttpdlg.v10.vcxproj branches/cmake/teraterm/ttpdlg/ttpdlg.v11.vcxproj branches/cmake/teraterm/ttpdlg/ttpdlg.v12.vcxproj branches/cmake/teraterm/ttpdlg/ttpdlg.v14.vcxproj branches/cmake/teraterm/ttpdlg/ttpdlg.v15.vcxproj branches/cmake/teraterm/ttpdlg/ttpdlg.v15.vcxproj.filters branches/cmake/teraterm/ttpdlg/ttpdlg.v9.vcproj branches/cmake/teraterm/ttpdlg/ttpdlg.vcproj branches/cmake/teraterm/ttpfile/ttpfile.v10.vcxproj branches/cmake/teraterm/ttpfile/ttpfile.v11.vcxproj branches/cmake/teraterm/ttpfile/ttpfile.v12.vcxproj branches/cmake/teraterm/ttpfile/ttpfile.v14.vcxproj branches/cmake/teraterm/ttpfile/ttpfile.v15.vcxproj branches/cmake/teraterm/ttpfile/ttpfile.v15.vcxproj.filters branches/cmake/teraterm/ttpfile/ttpfile.v9.vcproj branches/cmake/teraterm/ttpfile/ttpfile.vcproj Added Paths: ----------- branches/cmake/teraterm/common/dlglib.c Removed Paths: ------------- branches/cmake/teraterm/common/dlglib.cpp Property Changed: ---------------- branches/cmake/ branches/cmake/teraterm/ -------------- next part -------------- Index: branches/cmake =================================================================== --- branches/cmake 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake 2018-07-24 03:47:23 UTC (rev 7165) Property changes on: branches/cmake ___________________________________________________________________ Modified: svn:mergeinfo ## -1,4 +1,5 ## /branches/drag_and_drop:7130,7139,7141,7143-7147 /branches/ssh_ed25519:5495-5544 /branches/vs2015_warn:6194-6285 -/tags/teraterm-4_89:6182 \ No newline at end of property +/tags/teraterm-4_89:6182 +/trunk:7164 \ No newline at end of property Index: branches/cmake/teraterm =================================================================== --- branches/cmake/teraterm 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm 2018-07-24 03:47:23 UTC (rev 7165) Property changes on: branches/cmake/teraterm ___________________________________________________________________ Modified: svn:mergeinfo ## -1,2 +1,3 ## /branches/drag_and_drop/teraterm:7130,7139,7141,7143-7147 -/branches/vs2015_warn/teraterm:6194-6285 \ No newline at end of property +/branches/vs2015_warn/teraterm:6194-6285 +/trunk/teraterm:7164 \ No newline at end of property Copied: branches/cmake/teraterm/common/dlglib.c (from rev 7164, trunk/teraterm/common/dlglib.c) =================================================================== --- branches/cmake/teraterm/common/dlglib.c (rev 0) +++ branches/cmake/teraterm/common/dlglib.c 2018-07-24 03:47:23 UTC (rev 7165) @@ -0,0 +1,355 @@ +/* + * Copyright (C) 1994-1998 T. Teranishi + * (C) 2008-2018 TeraTerm Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* Routines for dialog boxes */ +#include <windows.h> +#include "dlglib.h" +#include <stdio.h> +#include <commctrl.h> + +void EnableDlgItem(HWND HDlg, int FirstId, int LastId) +{ + int i; + HWND HControl; + + for (i = FirstId ; i <= LastId ; i++) { + HControl = GetDlgItem(HDlg, i); + EnableWindow(HControl,TRUE); + } +} + +void DisableDlgItem(HWND HDlg, int FirstId, int LastId) +{ + int i; + HWND HControl; + + for (i = FirstId ; i <= LastId ; i++) { + HControl = GetDlgItem(HDlg, i); + EnableWindow(HControl,FALSE); + } +} + +void ShowDlgItem(HWND HDlg, int FirstId, int LastId) +{ + int i; + HWND HControl; + + for (i = FirstId ; i <= LastId ; i++) { + HControl = GetDlgItem(HDlg, i); + ShowWindow(HControl,SW_SHOW); + } +} + +void SetRB(HWND HDlg, int R, int FirstId, int LastId) +{ + HWND HControl; + DWORD Style; + + if ( R<1 ) { + return; + } + if ( FirstId+R-1 > LastId ) { + return; + } + HControl = GetDlgItem(HDlg, FirstId + R - 1); + SendMessage(HControl, BM_SETCHECK, 1, 0); + Style = GetClassLong(HControl, GCL_STYLE); + SetClassLong(HControl, GCL_STYLE, Style | WS_TABSTOP); +} + +void GetRB(HWND HDlg, LPWORD R, int FirstId, int LastId) +{ + int i; + + *R = 0; + for (i = FirstId ; i <= LastId ; i++) { + if (SendDlgItemMessage(HDlg, i, BM_GETCHECK, 0, 0) != 0) { + *R = i - FirstId + 1; + return; + } + } +} + +void SetDlgNum(HWND HDlg, int id_Item, LONG Num) +{ + char Temp[16]; + + /* In Win16, SetDlgItemInt can not be used to display long integer. */ + _snprintf_s(Temp,sizeof(Temp),_TRUNCATE,"%d",Num); + SetDlgItemText(HDlg,id_Item,Temp); +} + +void InitDlgProgress(HWND HDlg, int id_Progress, int *CurProgStat) { + HWND HProg; + HProg = GetDlgItem(HDlg, id_Progress); + + *CurProgStat = 0; + + SendMessage(HProg, PBM_SETRANGE, (WPARAM)0, MAKELPARAM(0, 100)); + SendMessage(HProg, PBM_SETSTEP, (WPARAM)1, 0); + SendMessage(HProg, PBM_SETPOS, (WPARAM)0, 0); + + ShowWindow(HProg, SW_SHOW); + return; +} + +void SetDlgPercent(HWND HDlg, int id_Item, int id_Progress, LONG a, LONG b, int *p) +{ + // 20MB\x88ȏ\xE3\x82̃t\x83@\x83C\x83\x8B\x82\xF0\x83A\x83b\x83v\x83\x8D\x81[\x83h\x82\xB5\x82悤\x82Ƃ\xB7\x82\xE9\x82ƁAbuffer overflow\x82\xC5 + // \x97\x8E\x82\xBF\x82\xE9\x96\xE2\x91\xE8\x82ւ̑Ώ\x88\x81B(2005.3.18 yutaka) + // cf. http://sourceforge.jp/tracker/index.php?func=detail&aid=5713&group_id=1412&atid=5333 + double Num; + char NumStr[10]; + + if (b==0) { + Num = 100.0; + } + else { + Num = 100.0 * (double)a / (double)b; + } + _snprintf_s(NumStr,sizeof(NumStr),_TRUNCATE,"%3.1f%%",Num); + SetDlgItemText(HDlg, id_Item, NumStr); + + if (id_Progress != 0 && p != NULL && *p >= 0 && (double)*p < Num) { + *p = (int)Num; + SendMessage(GetDlgItem(HDlg, id_Progress), PBM_SETPOS, (WPARAM)*p, 0); + } +} + +void SetDlgTime(HWND HDlg, int id_Item, DWORD stime, int bytes) +{ + static int prev_elapsed; + int elapsed, rate; + char buff[64]; + + elapsed = (GetTickCount() - stime) / 1000; + + if (elapsed == 0) { + prev_elapsed = 0; + SetDlgItemText(HDlg, id_Item, "0:00"); + return; + } + + if (elapsed == prev_elapsed) { + return; + } + prev_elapsed = elapsed; + + rate = bytes / elapsed; + if (rate < 1200) { + _snprintf_s(buff, sizeof(buff), _TRUNCATE, "%d:%02d (%dBytes/s)", elapsed / 60, elapsed % 60, rate); + } + else if (rate < 1200000) { + _snprintf_s(buff, sizeof(buff), _TRUNCATE, "%d:%02d (%d.%02dKB/s)", elapsed / 60, elapsed % 60, rate / 1000, rate / 10 % 100); + } + else { + _snprintf_s(buff, sizeof(buff), _TRUNCATE, "%d:%02d (%d.%02dMB/s)", elapsed / 60, elapsed % 60, rate / (1000 * 1000), rate / 10000 % 100); + } + + SetDlgItemText(HDlg, id_Item, buff); +} + +void SetDropDownList(HWND HDlg, int Id_Item, const TCHAR **List, int nsel) +{ + int i; + + i = 0; + while (List[i] != NULL) { + SendDlgItemMessage(HDlg, Id_Item, CB_ADDSTRING, + 0, (LPARAM)List[i]); + i++; + } + SendDlgItemMessage(HDlg, Id_Item, CB_SETCURSEL,nsel-1,0); +} + +LONG GetCurSel(HWND HDlg, int Id_Item) +{ + LONG n; + + n = SendDlgItemMessage(HDlg, Id_Item, CB_GETCURSEL, 0, 0); + if (n==CB_ERR) { + n = 0; + } + else { + n++; + } + + return n; +} + +typedef struct { + WNDPROC OrigProc; // Original window procedure + LONG_PTR OrigUser; // DWLP_USER + BOOL ComboBox; +} EditSubclassData; + +// C-n/C-p \x82̂\xBD\x82߂ɃT\x83u\x83N\x83\x89\x83X\x89\xBB (2007.9.4 maya) +// C-p/C-n/C-b/C-f/C-a/C-e \x82\xF0\x83T\x83|\x81[\x83g (2007.9.5 maya) +// C-d/C-k \x82\xF0\x83T\x83|\x81[\x83g (2007.10.3 yutaka) +// \x83h\x83\x8D\x83b\x83v\x83_\x83E\x83\x93\x82̒\x86\x82̃G\x83f\x83B\x83b\x83g\x83R\x83\x93\x83g\x83\x8D\x81[\x83\x8B\x82\xF0 +// \x83T\x83u\x83N\x83\x89\x83X\x89\xBB\x82\xB7\x82邽\x82߂̃E\x83C\x83\x93\x83h\x83E\x83v\x83\x8D\x83V\x81[\x83W\x83\x83 +static LRESULT CALLBACK HostnameEditProc(HWND dlg, UINT msg, + WPARAM wParam, LPARAM lParam) +{ + EditSubclassData *data = (EditSubclassData *)GetWindowLong(dlg, GWLP_USERDATA); + LRESULT Result; + int max, select, len; + char *str, *orgstr; + + switch (msg) { + // \x83L\x81[\x82\xAA\x89\x9F\x82\xB3\x82ꂽ\x82̂\xF0\x8C\x9F\x92m\x82\xB7\x82\xE9 + case WM_KEYDOWN: + if (GetKeyState(VK_CONTROL) < 0) { + switch (wParam) { + case 0x50: // Ctrl+p ... up + if (data->ComboBox) { + HWND parent = GetParent(dlg); + select = SendMessage(parent, CB_GETCURSEL, 0, 0); + if (select > 0) { + PostMessage(parent, CB_SETCURSEL, select - 1, 0); + } + return 0; + } + break; + case 0x4e: // Ctrl+n ... down + if (data->ComboBox) { + HWND parent = GetParent(dlg); + max = SendMessage(parent, CB_GETCOUNT, 0, 0); + select = SendMessage(parent, CB_GETCURSEL, 0, 0); + if (select < max - 1) { + PostMessage(parent, CB_SETCURSEL, select + 1, 0); + } + return 0; + } + break; + case 0x42: // Ctrl+b ... left + SendMessage(dlg, EM_GETSEL, 0, (LPARAM)&select); + PostMessage(dlg, EM_SETSEL, select-1, select-1); + return 0; + case 0x46: // Ctrl+f ... right + SendMessage(dlg, EM_GETSEL, 0, (LPARAM)&select); + max = GetWindowTextLength(dlg) ; + PostMessage(dlg, EM_SETSEL, select+1, select+1); + return 0; + case 0x41: // Ctrl+a ... home + PostMessage(dlg, EM_SETSEL, 0, 0); + return 0; + case 0x45: // Ctrl+e ... end + max = GetWindowTextLength(dlg) ; + PostMessage(dlg, EM_SETSEL, max, max); + return 0; + + case 0x44: // Ctrl+d + case 0x4b: // Ctrl+k + case 0x55: // Ctrl+u + SendMessage(dlg, EM_GETSEL, 0, (LPARAM)&select); + max = GetWindowTextLength(dlg); + max++; // '\0' + orgstr = str = (char *)malloc(max); + if (str != NULL) { + len = GetWindowText(dlg, str, max); + if (select >= 0 && select < len) { + if (wParam == 0x44) { // \x83J\x81[\x83\\x83\x8B\x94z\x89\xBA\x82̕\xB6\x8E\x9A\x82݂̂\xF0\x8D폜\x82\xB7\x82\xE9 + memmove(&str[select], &str[select + 1], len - select - 1); + str[len - 1] = '\0'; + + } else if (wParam == 0x4b) { // \x83J\x81[\x83\\x83\x8B\x82\xA9\x82\xE7\x8Ds\x96\x96\x82܂ō폜\x82\xB7\x82\xE9 + str[select] = '\0'; + + } + } + + if (wParam == 0x55) { // \x83J\x81[\x83\\x83\x8B\x82\xE6\x82荶\x91\xA4\x82\xF0\x82\xB7\x82ׂď\xC1\x82\xB7 + if (select >= len) { + str[0] = '\0'; + } else { + str = &str[select]; + } + select = 0; + } + + SetWindowText(dlg, str); + SendMessage(dlg, EM_SETSEL, select, select); + free(orgstr); + return 0; + } + break; + } + } + break; + + // \x8F\xE3\x82̃L\x81[\x82\xF0\x89\x9F\x82\xB5\x82\xBD\x8C\x8B\x89ʑ\x97\x82\xE7\x82\xEA\x82镶\x8E\x9A\x82ʼn\xB9\x82\xAA\x96\xE9\x82̂Ŏ̂Ă\xE9 + case WM_CHAR: + switch (wParam) { + case 0x01: + case 0x02: + case 0x04: + case 0x05: + case 0x06: + case 0x0b: + case 0x0e: + case 0x10: + case 0x15: + return 0; + } + break; + } + + SetWindowLongPtr(dlg, GWLP_WNDPROC, (LONG_PTR)data->OrigProc); + SetWindowLongPtr(dlg, GWLP_USERDATA, (LONG_PTR)data->OrigUser); + Result = CallWindowProc(data->OrigProc, dlg, msg, wParam, lParam); + SetWindowLongPtr(dlg, GWLP_WNDPROC, (LONG_PTR)HostnameEditProc); + SetWindowLongPtr(dlg, GWLP_USERDATA, (LONG_PTR)data); + + switch (msg) { + case WM_DESTROY: + SetWindowLongPtr(dlg, GWLP_WNDPROC, (LONG_PTR)data->OrigProc); + SetWindowLongPtr(dlg, GWLP_USERDATA, (LONG_PTR)data->OrigUser); + free(data); + break; + } + + return Result; +} + +// C-n/C-p \x82̂\xBD\x82߂ɃT\x83u\x83N\x83\x89\x83X\x89\xBB +void SetEditboxSubclass(HWND hDlg, int nID, BOOL ComboBox) +{ + EditSubclassData *data; + HWND hWndEdit = GetDlgItem(hDlg, nID); + if (ComboBox) { + hWndEdit = GetWindow(hWndEdit, GW_CHILD); + } + data = (EditSubclassData *)malloc(sizeof(EditSubclassData)); + data->OrigProc = (WNDPROC)GetWindowLong(hWndEdit, GWLP_WNDPROC); + data->OrigUser = (LONG_PTR)GetWindowLong(hWndEdit, GWLP_USERDATA); + data->ComboBox = ComboBox; + SetWindowLongPtr(hWndEdit, GWL_WNDPROC, (LONG_PTR)HostnameEditProc); + SetWindowLongPtr(hWndEdit, GWLP_USERDATA, (LONG_PTR)data); +} Deleted: branches/cmake/teraterm/common/dlglib.cpp =================================================================== --- branches/cmake/teraterm/common/dlglib.cpp 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/common/dlglib.cpp 2018-07-24 03:47:23 UTC (rev 7165) @@ -1,353 +0,0 @@ -/* - * Copyright (C) 1994-1998 T. Teranishi - * (C) 2008-2018 TeraTerm Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* Routines for dialog boxes */ -#include <windows.h> -#include "dlglib.h" -#include <stdio.h> -#include <commctrl.h> - -void EnableDlgItem(HWND HDlg, int FirstId, int LastId) -{ - int i; - HWND HControl; - - for (i = FirstId ; i <= LastId ; i++) { - HControl = GetDlgItem(HDlg, i); - EnableWindow(HControl,TRUE); - } -} - -void DisableDlgItem(HWND HDlg, int FirstId, int LastId) -{ - int i; - HWND HControl; - - for (i = FirstId ; i <= LastId ; i++) { - HControl = GetDlgItem(HDlg, i); - EnableWindow(HControl,FALSE); - } -} - -void ShowDlgItem(HWND HDlg, int FirstId, int LastId) -{ - int i; - HWND HControl; - - for (i = FirstId ; i <= LastId ; i++) { - HControl = GetDlgItem(HDlg, i); - ShowWindow(HControl,SW_SHOW); - } -} - -void SetRB(HWND HDlg, int R, int FirstId, int LastId) -{ - HWND HControl; - DWORD Style; - - if ( R<1 ) { - return; - } - if ( FirstId+R-1 > LastId ) { - return; - } - HControl = GetDlgItem(HDlg, FirstId + R - 1); - SendMessage(HControl, BM_SETCHECK, 1, 0); - Style = GetClassLong(HControl, GCL_STYLE); - SetClassLong(HControl, GCL_STYLE, Style | WS_TABSTOP); -} - -void GetRB(HWND HDlg, LPWORD R, int FirstId, int LastId) -{ - int i; - - *R = 0; - for (i = FirstId ; i <= LastId ; i++) { - if (SendDlgItemMessage(HDlg, i, BM_GETCHECK, 0, 0) != 0) { - *R = i - FirstId + 1; - return; - } - } -} - -void SetDlgNum(HWND HDlg, int id_Item, LONG Num) -{ - char Temp[16]; - - /* In Win16, SetDlgItemInt can not be used to display long integer. */ - _snprintf_s(Temp,sizeof(Temp),_TRUNCATE,"%d",Num); - SetDlgItemText(HDlg,id_Item,Temp); -} - -void InitDlgProgress(HWND HDlg, int id_Progress, int *CurProgStat) { - HWND HProg; - HProg = GetDlgItem(HDlg, id_Progress); - - *CurProgStat = 0; - - SendMessage(HProg, PBM_SETRANGE, (WPARAM)0, MAKELPARAM(0, 100)); - SendMessage(HProg, PBM_SETSTEP, (WPARAM)1, 0); - SendMessage(HProg, PBM_SETPOS, (WPARAM)0, 0); - - ShowWindow(HProg, SW_SHOW); - return; -} - -void SetDlgPercent(HWND HDlg, int id_Item, int id_Progress, LONG a, LONG b, int *p) -{ - // 20MB\x88ȏ\xE3\x82̃t\x83@\x83C\x83\x8B\x82\xF0\x83A\x83b\x83v\x83\x8D\x81[\x83h\x82\xB5\x82悤\x82Ƃ\xB7\x82\xE9\x82ƁAbuffer overflow\x82\xC5 - // \x97\x8E\x82\xBF\x82\xE9\x96\xE2\x91\xE8\x82ւ̑Ώ\x88\x81B(2005.3.18 yutaka) - // cf. http://sourceforge.jp/tracker/index.php?func=detail&aid=5713&group_id=1412&atid=5333 - double Num; - char NumStr[10]; - - if (b==0) { - Num = 100.0; - } - else { - Num = 100.0 * (double)a / (double)b; - } - _snprintf_s(NumStr,sizeof(NumStr),_TRUNCATE,"%3.1f%%",Num); - SetDlgItemText(HDlg, id_Item, NumStr); - - if (id_Progress != 0 && p != NULL && *p >= 0 && (double)*p < Num) { - *p = (int)Num; - SendMessage(GetDlgItem(HDlg, id_Progress), PBM_SETPOS, (WPARAM)*p, 0); - } -} - -void SetDlgTime(HWND HDlg, int id_Item, DWORD stime, int bytes) -{ - static int prev_elapsed; - int elapsed, rate; - char buff[64]; - - elapsed = (GetTickCount() - stime) / 1000; - - if (elapsed == 0) { - prev_elapsed = 0; - SetDlgItemText(HDlg, id_Item, "0:00"); - return; - } - - if (elapsed == prev_elapsed) { - return; - } - prev_elapsed = elapsed; - - rate = bytes / elapsed; - if (rate < 1200) { - _snprintf_s(buff, sizeof(buff), _TRUNCATE, "%d:%02d (%dBytes/s)", elapsed / 60, elapsed % 60, rate); - } - else if (rate < 1200000) { - _snprintf_s(buff, sizeof(buff), _TRUNCATE, "%d:%02d (%d.%02dKB/s)", elapsed / 60, elapsed % 60, rate / 1000, rate / 10 % 100); - } - else { - _snprintf_s(buff, sizeof(buff), _TRUNCATE, "%d:%02d (%d.%02dMB/s)", elapsed / 60, elapsed % 60, rate / (1000 * 1000), rate / 10000 % 100); - } - - SetDlgItemText(HDlg, id_Item, buff); -} - -void SetDropDownList(HWND HDlg, int Id_Item, const TCHAR **List, int nsel) -{ - int i; - - i = 0; - while (List[i] != NULL) { - SendDlgItemMessage(HDlg, Id_Item, CB_ADDSTRING, - 0, (LPARAM)List[i]); - i++; - } - SendDlgItemMessage(HDlg, Id_Item, CB_SETCURSEL,nsel-1,0); -} - -LONG GetCurSel(HWND HDlg, int Id_Item) -{ - LONG n; - - n = SendDlgItemMessage(HDlg, Id_Item, CB_GETCURSEL, 0, 0); - if (n==CB_ERR) { - n = 0; - } - else { - n++; - } - - return n; -} - -typedef struct { - WNDPROC OrigProc; // Original window procedure - LONG_PTR OrigUser; // DWLP_USER - BOOL ComboBox; -} EditSubclassData; - -// C-n/C-p \x82̂\xBD\x82߂ɃT\x83u\x83N\x83\x89\x83X\x89\xBB (2007.9.4 maya) -// C-p/C-n/C-b/C-f/C-a/C-e \x82\xF0\x83T\x83|\x81[\x83g (2007.9.5 maya) -// C-d/C-k \x82\xF0\x83T\x83|\x81[\x83g (2007.10.3 yutaka) -// \x83h\x83\x8D\x83b\x83v\x83_\x83E\x83\x93\x82̒\x86\x82̃G\x83f\x83B\x83b\x83g\x83R\x83\x93\x83g\x83\x8D\x81[\x83\x8B\x82\xF0 -// \x83T\x83u\x83N\x83\x89\x83X\x89\xBB\x82\xB7\x82邽\x82߂̃E\x83C\x83\x93\x83h\x83E\x83v\x83\x8D\x83V\x81[\x83W\x83\x83 -static LRESULT CALLBACK HostnameEditProc(HWND dlg, UINT msg, - WPARAM wParam, LPARAM lParam) -{ - EditSubclassData *data = (EditSubclassData *)GetWindowLong(dlg, GWLP_USERDATA); - int max, select, len; - char *str, *orgstr; - - switch (msg) { - // \x83L\x81[\x82\xAA\x89\x9F\x82\xB3\x82ꂽ\x82̂\xF0\x8C\x9F\x92m\x82\xB7\x82\xE9 - case WM_KEYDOWN: - if (GetKeyState(VK_CONTROL) < 0) { - switch (wParam) { - case 0x50: // Ctrl+p ... up - if (data->ComboBox) { - HWND parent = GetParent(dlg); - select = SendMessage(parent, CB_GETCURSEL, 0, 0); - if (select > 0) { - PostMessage(parent, CB_SETCURSEL, select - 1, 0); - } - return 0; - } - break; - case 0x4e: // Ctrl+n ... down - if (data->ComboBox) { - HWND parent = GetParent(dlg); - max = SendMessage(parent, CB_GETCOUNT, 0, 0); - select = SendMessage(parent, CB_GETCURSEL, 0, 0); - if (select < max - 1) { - PostMessage(parent, CB_SETCURSEL, select + 1, 0); - } - return 0; - } - break; - case 0x42: // Ctrl+b ... left - SendMessage(dlg, EM_GETSEL, 0, (LPARAM)&select); - PostMessage(dlg, EM_SETSEL, select-1, select-1); - return 0; - case 0x46: // Ctrl+f ... right - SendMessage(dlg, EM_GETSEL, 0, (LPARAM)&select); - max = GetWindowTextLength(dlg) ; - PostMessage(dlg, EM_SETSEL, select+1, select+1); - return 0; - case 0x41: // Ctrl+a ... home - PostMessage(dlg, EM_SETSEL, 0, 0); - return 0; - case 0x45: // Ctrl+e ... end - max = GetWindowTextLength(dlg) ; - PostMessage(dlg, EM_SETSEL, max, max); - return 0; - - case 0x44: // Ctrl+d - case 0x4b: // Ctrl+k - case 0x55: // Ctrl+u - SendMessage(dlg, EM_GETSEL, 0, (LPARAM)&select); - max = GetWindowTextLength(dlg); - max++; // '\0' - orgstr = str = (char *)malloc(max); - if (str != NULL) { - len = GetWindowText(dlg, str, max); - if (select >= 0 && select < len) { - if (wParam == 0x44) { // \x83J\x81[\x83\\x83\x8B\x94z\x89\xBA\x82̕\xB6\x8E\x9A\x82݂̂\xF0\x8D폜\x82\xB7\x82\xE9 - memmove(&str[select], &str[select + 1], len - select - 1); - str[len - 1] = '\0'; - - } else if (wParam == 0x4b) { // \x83J\x81[\x83\\x83\x8B\x82\xA9\x82\xE7\x8Ds\x96\x96\x82܂ō폜\x82\xB7\x82\xE9 - str[select] = '\0'; - - } - } - - if (wParam == 0x55) { // \x83J\x81[\x83\\x83\x8B\x82\xE6\x82荶\x91\xA4\x82\xF0\x82\xB7\x82ׂď\xC1\x82\xB7 - if (select >= len) { - str[0] = '\0'; - } else { - str = &str[select]; - } - select = 0; - } - - SetWindowText(dlg, str); - SendMessage(dlg, EM_SETSEL, select, select); - free(orgstr); - return 0; - } - break; - } - } - break; - - // \x8F\xE3\x82̃L\x81[\x82\xF0\x89\x9F\x82\xB5\x82\xBD\x8C\x8B\x89ʑ\x97\x82\xE7\x82\xEA\x82镶\x8E\x9A\x82ʼn\xB9\x82\xAA\x96\xE9\x82̂Ŏ̂Ă\xE9 - case WM_CHAR: - switch (wParam) { - case 0x01: - case 0x02: - case 0x04: - case 0x05: - case 0x06: - case 0x0b: - case 0x0e: - case 0x10: - case 0x15: - return 0; - } - break; - } - - SetWindowLongPtr(dlg, GWLP_WNDPROC, (LONG_PTR)data->OrigProc); - SetWindowLongPtr(dlg, GWLP_USERDATA, (LONG_PTR)data->OrigUser); - const LRESULT Result = CallWindowProc(data->OrigProc, dlg, msg, wParam, lParam); - SetWindowLongPtr(dlg, GWLP_WNDPROC, (LONG_PTR)HostnameEditProc); - SetWindowLongPtr(dlg, GWLP_USERDATA, (LONG_PTR)data); - - switch (msg) { - case WM_DESTROY: - SetWindowLongPtr(dlg, GWLP_WNDPROC, (LONG_PTR)data->OrigProc); - SetWindowLongPtr(dlg, GWLP_USERDATA, (LONG_PTR)data->OrigUser); - free(data); - break; - } - - return Result; -} - -// C-n/C-p \x82̂\xBD\x82߂ɃT\x83u\x83N\x83\x89\x83X\x89\xBB -void SetEditboxSubclass(HWND hDlg, int nID, BOOL ComboBox) -{ - HWND hWndEdit = GetDlgItem(hDlg, nID); - if (ComboBox) { - hWndEdit = GetWindow(hWndEdit, GW_CHILD); - } - EditSubclassData *data = (EditSubclassData *)malloc(sizeof(EditSubclassData)); - data->OrigProc = (WNDPROC)GetWindowLong(hWndEdit, GWLP_WNDPROC); - data->OrigUser = (LONG_PTR)GetWindowLong(hWndEdit, GWLP_USERDATA); - data->ComboBox = ComboBox; - SetWindowLongPtr(hWndEdit, GWL_WNDPROC, (LONG_PTR)HostnameEditProc); - SetWindowLongPtr(hWndEdit, GWLP_USERDATA, (LONG_PTR)data); -} Modified: branches/cmake/teraterm/teraterm/ttermpro.v10.vcxproj =================================================================== --- branches/cmake/teraterm/teraterm/ttermpro.v10.vcxproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/teraterm/ttermpro.v10.vcxproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> @@ -134,7 +134,7 @@ </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="addsetting.cpp" /> - <ClCompile Include="..\common\dlglib.cpp" /> + <ClCompile Include="..\common\dlglib.c" /> <ClCompile Include="filesys.cpp" /> <ClCompile Include="ftdlg.cpp" /> <ClCompile Include="prnabort.cpp" /> Modified: branches/cmake/teraterm/teraterm/ttermpro.v11.vcxproj =================================================================== --- branches/cmake/teraterm/teraterm/ttermpro.v11.vcxproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/teraterm/ttermpro.v11.vcxproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> @@ -131,7 +131,7 @@ </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="addsetting.cpp" /> - <ClCompile Include="..\common\dlglib.cpp" /> + <ClCompile Include="..\common\dlglib.c" /> <ClCompile Include="filesys.cpp" /> <ClCompile Include="ftdlg.cpp" /> <ClCompile Include="prnabort.cpp" /> Modified: branches/cmake/teraterm/teraterm/ttermpro.v12.vcxproj =================================================================== --- branches/cmake/teraterm/teraterm/ttermpro.v12.vcxproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/teraterm/ttermpro.v12.vcxproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> @@ -132,7 +132,7 @@ </Manifest> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="..\common\dlglib.cpp" /> + <ClCompile Include="..\common\dlglib.c" /> <ClCompile Include="..\common\stdafx.cpp" /> <ClCompile Include="..\common\ttlib.c" /> <ClCompile Include="addsetting.cpp" /> Modified: branches/cmake/teraterm/teraterm/ttermpro.v14.vcxproj =================================================================== --- branches/cmake/teraterm/teraterm/ttermpro.v14.vcxproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/teraterm/ttermpro.v14.vcxproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> @@ -134,7 +134,7 @@ </Manifest> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="..\common\dlglib.cpp" /> + <ClCompile Include="..\common\dlglib.c" /> <ClCompile Include="..\common\stdafx.cpp" /> <ClCompile Include="..\common\ttlib.c" /> <ClCompile Include="addsetting.cpp" /> Modified: branches/cmake/teraterm/teraterm/ttermpro.v15.vcxproj =================================================================== --- branches/cmake/teraterm/teraterm/ttermpro.v15.vcxproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/teraterm/ttermpro.v15.vcxproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -137,7 +137,7 @@ </Manifest> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="..\common\dlglib.cpp" /> + <ClCompile Include="..\common\dlglib.c" /> <ClCompile Include="..\common\stdafx.cpp" /> <ClCompile Include="..\common\ttlib.c" /> <ClCompile Include="addsetting.cpp" /> Modified: branches/cmake/teraterm/teraterm/ttermpro.v15.vcxproj.filters =================================================================== --- branches/cmake/teraterm/teraterm/ttermpro.v15.vcxproj.filters 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/teraterm/ttermpro.v15.vcxproj.filters 2018-07-24 03:47:23 UTC (rev 7165) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> <Filter Include="Source Files"> @@ -114,7 +114,7 @@ <ClCompile Include="addsetting.cpp"> <Filter>dialog</Filter> </ClCompile> - <ClCompile Include="..\common\dlglib.cpp"> + <ClCompile Include="..\common\dlglib.c"> <Filter>dialog</Filter> </ClCompile> </ItemGroup> @@ -271,4 +271,4 @@ <Filter>dialog</Filter> </ClInclude> </ItemGroup> -</Project> \ No newline at end of file +</Project> Modified: branches/cmake/teraterm/teraterm/ttermpro.v9.vcproj =================================================================== --- branches/cmake/teraterm/teraterm/ttermpro.v9.vcproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/teraterm/ttermpro.v9.vcproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -216,7 +216,7 @@ > </File> <File - RelativePath="..\common\dlglib.cpp" + RelativePath="..\common\dlglib.c" > </File> <File Modified: branches/cmake/teraterm/teraterm/ttermpro.vcproj =================================================================== --- branches/cmake/teraterm/teraterm/ttermpro.vcproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/teraterm/ttermpro.vcproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -217,7 +217,7 @@ > </File> <File - RelativePath="..\common\dlglib.cpp" + RelativePath="..\common\dlglib.c" > </File> <File Modified: branches/cmake/teraterm/ttpdlg/ttpdlg.v10.vcxproj =================================================================== --- branches/cmake/teraterm/ttpdlg/ttpdlg.v10.vcxproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/ttpdlg/ttpdlg.v10.vcxproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> @@ -126,7 +126,7 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="..\common\dlglib.cpp" /> + <ClCompile Include="..\common\dlglib.c" /> <ClCompile Include="ttdlg.c" /> <ClCompile Include="..\common\ttlib.c" /> </ItemGroup> Modified: branches/cmake/teraterm/ttpdlg/ttpdlg.v11.vcxproj =================================================================== --- branches/cmake/teraterm/ttpdlg/ttpdlg.v11.vcxproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/ttpdlg/ttpdlg.v11.vcxproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> @@ -130,7 +130,7 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="..\common\dlglib.cpp" /> + <ClCompile Include="..\common\dlglib.c" /> <ClCompile Include="ttdlg.c" /> <ClCompile Include="..\common\ttlib.c" /> </ItemGroup> Modified: branches/cmake/teraterm/ttpdlg/ttpdlg.v12.vcxproj =================================================================== --- branches/cmake/teraterm/ttpdlg/ttpdlg.v12.vcxproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/ttpdlg/ttpdlg.v12.vcxproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> @@ -130,7 +130,7 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="..\common\dlglib.cpp" /> + <ClCompile Include="..\common\dlglib.c" /> <ClCompile Include="..\common\ttlib.c" /> <ClCompile Include="ttdlg.c" /> </ItemGroup> Modified: branches/cmake/teraterm/ttpdlg/ttpdlg.v14.vcxproj =================================================================== --- branches/cmake/teraterm/ttpdlg/ttpdlg.v14.vcxproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/ttpdlg/ttpdlg.v14.vcxproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> @@ -130,7 +130,7 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="..\common\dlglib.cpp" /> + <ClCompile Include="..\common\dlglib.c" /> <ClCompile Include="..\common\ttlib.c" /> <ClCompile Include="ttdlg.c" /> </ItemGroup> Modified: branches/cmake/teraterm/ttpdlg/ttpdlg.v15.vcxproj =================================================================== --- branches/cmake/teraterm/ttpdlg/ttpdlg.v15.vcxproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/ttpdlg/ttpdlg.v15.vcxproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -133,7 +133,7 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="..\common\dlglib.cpp" /> + <ClCompile Include="..\common\dlglib.c" /> <ClCompile Include="..\common\ttlib.c" /> <ClCompile Include="ttdlg.c" /> </ItemGroup> Modified: branches/cmake/teraterm/ttpdlg/ttpdlg.v15.vcxproj.filters =================================================================== --- branches/cmake/teraterm/ttpdlg/ttpdlg.v15.vcxproj.filters 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/ttpdlg/ttpdlg.v15.vcxproj.filters 2018-07-24 03:47:23 UTC (rev 7165) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> <Filter Include="Source Files"> @@ -24,7 +24,7 @@ <ClCompile Include="..\common\ttlib.c"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\common\dlglib.cpp"> + <ClCompile Include="..\common\dlglib.c"> <Filter>Source Files</Filter> </ClCompile> </ItemGroup> @@ -60,4 +60,4 @@ <Filter>Def File</Filter> </None> </ItemGroup> -</Project> \ No newline at end of file +</Project> Modified: branches/cmake/teraterm/ttpdlg/ttpdlg.v9.vcproj =================================================================== --- branches/cmake/teraterm/ttpdlg/ttpdlg.v9.vcproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/ttpdlg/ttpdlg.v9.vcproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -206,7 +206,7 @@ Filter="cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" > <File - RelativePath="..\common\dlglib.cpp" + RelativePath="..\common\dlglib.c" > </File> <File Modified: branches/cmake/teraterm/ttpdlg/ttpdlg.vcproj =================================================================== --- branches/cmake/teraterm/ttpdlg/ttpdlg.vcproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/ttpdlg/ttpdlg.vcproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -207,7 +207,7 @@ Filter="cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" > <File - RelativePath="..\common\dlglib.cpp" + RelativePath="..\common\dlglib.c" > </File> <File Modified: branches/cmake/teraterm/ttpfile/ttpfile.v10.vcxproj =================================================================== --- branches/cmake/teraterm/ttpfile/ttpfile.v10.vcxproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/ttpfile/ttpfile.v10.vcxproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> @@ -121,7 +121,7 @@ </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="bplus.c" /> - <ClCompile Include="..\common\dlglib.cpp" /> + <ClCompile Include="..\common\dlglib.c" /> <ClCompile Include="ftlib.c" /> <ClCompile Include="kermit.c" /> <ClCompile Include="quickvan.c" /> Modified: branches/cmake/teraterm/ttpfile/ttpfile.v11.vcxproj =================================================================== --- branches/cmake/teraterm/ttpfile/ttpfile.v11.vcxproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/ttpfile/ttpfile.v11.vcxproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> @@ -125,7 +125,7 @@ </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="bplus.c" /> - <ClCompile Include="..\common\dlglib.cpp" /> + <ClCompile Include="..\common\dlglib.c" /> <ClCompile Include="ftlib.c" /> <ClCompile Include="kermit.c" /> <ClCompile Include="quickvan.c" /> Modified: branches/cmake/teraterm/ttpfile/ttpfile.v12.vcxproj =================================================================== --- branches/cmake/teraterm/ttpfile/ttpfile.v12.vcxproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/ttpfile/ttpfile.v12.vcxproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> @@ -124,7 +124,7 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="..\common\dlglib.cpp" /> + <ClCompile Include="..\common\dlglib.c" /> <ClCompile Include="..\common\ttlib.c" /> <ClCompile Include="bplus.c" /> <ClCompile Include="ftlib.c" /> Modified: branches/cmake/teraterm/ttpfile/ttpfile.v14.vcxproj =================================================================== --- branches/cmake/teraterm/ttpfile/ttpfile.v14.vcxproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/ttpfile/ttpfile.v14.vcxproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> @@ -124,7 +124,7 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="..\common\dlglib.cpp" /> + <ClCompile Include="..\common\dlglib.c" /> <ClCompile Include="..\common\ttlib.c" /> <ClCompile Include="bplus.c" /> <ClCompile Include="ftlib.c" /> Modified: branches/cmake/teraterm/ttpfile/ttpfile.v15.vcxproj =================================================================== --- branches/cmake/teraterm/ttpfile/ttpfile.v15.vcxproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/ttpfile/ttpfile.v15.vcxproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -127,7 +127,7 @@ </Link> </ItemDefinitionGroup> <ItemGroup> - <ClCompile Include="..\common\dlglib.cpp" /> + <ClCompile Include="..\common\dlglib.c" /> <ClCompile Include="..\common\ttlib.c" /> <ClCompile Include="bplus.c" /> <ClCompile Include="ftlib.c" /> Modified: branches/cmake/teraterm/ttpfile/ttpfile.v15.vcxproj.filters =================================================================== --- branches/cmake/teraterm/ttpfile/ttpfile.v15.vcxproj.filters 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/ttpfile/ttpfile.v15.vcxproj.filters 2018-07-24 03:47:23 UTC (rev 7165) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> <Filter Include="Source Files"> @@ -46,7 +46,7 @@ <ClCompile Include="zmodem.c"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\common\dlglib.cpp"> + <ClCompile Include="..\common\dlglib.c"> <Filter>Source Files</Filter> </ClCompile> </ItemGroup> @@ -92,4 +92,4 @@ <Filter>Def File</Filter> </None> </ItemGroup> -</Project> \ No newline at end of file +</Project> Modified: branches/cmake/teraterm/ttpfile/ttpfile.v9.vcproj =================================================================== --- branches/cmake/teraterm/ttpfile/ttpfile.v9.vcproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/ttpfile/ttpfile.v9.vcproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -208,7 +208,7 @@ > </File> <File - RelativePath="..\common\dlglib.cpp" + RelativePath="..\common\dlglib.c" > </File> <File Modified: branches/cmake/teraterm/ttpfile/ttpfile.vcproj =================================================================== --- branches/cmake/teraterm/ttpfile/ttpfile.vcproj 2018-07-24 03:28:00 UTC (rev 7164) +++ branches/cmake/teraterm/ttpfile/ttpfile.vcproj 2018-07-24 03:47:23 UTC (rev 7165) @@ -209,7 +209,7 @@ > </File> <File - RelativePath="..\common\dlglib.cpp" + RelativePath="..\common\dlglib.c" > </File> <File