• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Tera Termの個人的な作業用リポジトリ


Commit MetaInfo

Revisionded96dbfe6005824f2cf365a63158998007abcdc (tree)
Time2018-07-20 00:34:03
Authorzmatsuo <zmatsuo@user...>
Commiterzmatsuo

Log Message

dlglib.cをdlglib.cppにリネーム、
dlglib.cppインクルードヘッダファイルを最適化
vs2017のプロジェクトファイルを修正

git-svn-id: svn+ssh://svn.osdn.net/svnroot/ttssh2/trunk@7159 f5f01b69-1e22-0410-acbf-894ab4bd6246

Change Summary

Incremental Difference

--- a/teraterm/common/dlglib.c
+++ b/teraterm/common/dlglib.cpp
@@ -28,7 +28,8 @@
2828 */
2929
3030 /* Routines for dialog boxes */
31-#include "teraterm.h"
31+#include <windows.h>
32+#include "dlglib.h"
3233 #include <stdio.h>
3334 #include <commctrl.h>
3435
@@ -269,7 +270,7 @@ static LRESULT CALLBACK HostnameEditProc(HWND dlg, UINT msg,
269270 SendMessage(dlg, EM_GETSEL, 0, (LPARAM)&select);
270271 max = GetWindowTextLength(dlg);
271272 max++; // '\0'
272- orgstr = str = malloc(max);
273+ orgstr = str = (char *)malloc(max);
273274 if (str != NULL) {
274275 len = GetWindowText(dlg, str, max);
275276 if (select >= 0 && select < len) {
@@ -319,16 +320,16 @@ static LRESULT CALLBACK HostnameEditProc(HWND dlg, UINT msg,
319320 break;
320321 }
321322
322- SetWindowLong(dlg, GWL_WNDPROC, (LONG_PTR)data->OrigProc);
323- SetWindowLong(dlg, GWLP_USERDATA, (LONG_PTR)data->OrigUser);
324- LRESULT Result = CallWindowProc(data->OrigProc, dlg, msg, wParam, lParam);
325- SetWindowLong(dlg, GWL_WNDPROC, (LONG_PTR)HostnameEditProc);
326- SetWindowLong(dlg, GWLP_USERDATA, (LONG_PTR)data);
323+ SetWindowLongPtr(dlg, GWLP_WNDPROC, (LONG_PTR)data->OrigProc);
324+ SetWindowLongPtr(dlg, GWLP_USERDATA, (LONG_PTR)data->OrigUser);
325+ const LRESULT Result = CallWindowProc(data->OrigProc, dlg, msg, wParam, lParam);
326+ SetWindowLongPtr(dlg, GWLP_WNDPROC, (LONG_PTR)HostnameEditProc);
327+ SetWindowLongPtr(dlg, GWLP_USERDATA, (LONG_PTR)data);
327328
328329 switch (msg) {
329330 case WM_DESTROY:
330- SetWindowLong(dlg, GWL_WNDPROC, (LONG_PTR)data->OrigProc);
331- SetWindowLong(dlg, GWLP_USERDATA, (LONG_PTR)data->OrigUser);
331+ SetWindowLongPtr(dlg, GWLP_WNDPROC, (LONG_PTR)data->OrigProc);
332+ SetWindowLongPtr(dlg, GWLP_USERDATA, (LONG_PTR)data->OrigUser);
332333 free(data);
333334 break;
334335 }
@@ -344,9 +345,9 @@ void SetEditboxSubclass(HWND hDlg, int nID, BOOL ComboBox)
344345 hWndEdit = GetWindow(hWndEdit, GW_CHILD);
345346 }
346347 EditSubclassData *data = (EditSubclassData *)malloc(sizeof(EditSubclassData));
347- data->OrigProc = (WNDPROC)GetWindowLong(hWndEdit, GWL_WNDPROC);
348+ data->OrigProc = (WNDPROC)GetWindowLong(hWndEdit, GWLP_WNDPROC);
348349 data->OrigUser = (LONG_PTR)GetWindowLong(hWndEdit, GWLP_USERDATA);
349350 data->ComboBox = ComboBox;
350- SetWindowLong(hWndEdit, GWL_WNDPROC, (LONG_PTR)HostnameEditProc);
351- SetWindowLong(hWndEdit, GWLP_USERDATA, (LONG_PTR)data);
351+ SetWindowLongPtr(hWndEdit, GWL_WNDPROC, (LONG_PTR)HostnameEditProc);
352+ SetWindowLongPtr(hWndEdit, GWLP_USERDATA, (LONG_PTR)data);
352353 }
--- a/teraterm/teraterm/ttermpro.v15.vcxproj
+++ b/teraterm/teraterm/ttermpro.v15.vcxproj
@@ -142,7 +142,7 @@
142142 </Manifest>
143143 </ItemDefinitionGroup>
144144 <ItemGroup>
145- <ClCompile Include="..\common\dlglib.c" />
145+ <ClCompile Include="..\common\dlglib.cpp" />
146146 <ClCompile Include="..\common\stdafx.cpp" />
147147 <ClCompile Include="..\common\ttlib.c" />
148148 <ClCompile Include="addsetting.cpp" />
@@ -264,4 +264,4 @@
264264 <UserProperties RESOURCE_FILE="ttermpro.rc" />
265265 </VisualStudio>
266266 </ProjectExtensions>
267-</Project>
267+</Project>
\ No newline at end of file
--- a/teraterm/teraterm/ttermpro.v15.vcxproj.filters
+++ b/teraterm/teraterm/ttermpro.v15.vcxproj.filters
@@ -96,9 +96,6 @@
9696 <ClCompile Include="WSAAsyncGetAddrInfo.c">
9797 <Filter>Source Files %28C%29</Filter>
9898 </ClCompile>
99- <ClCompile Include="..\common\dlglib.c">
100- <Filter>dialog</Filter>
101- </ClCompile>
10299 <ClCompile Include="dnddlg.cpp">
103100 <Filter>dialog</Filter>
104101 </ClCompile>
@@ -117,6 +114,9 @@
117114 <ClCompile Include="addsetting.cpp">
118115 <Filter>dialog</Filter>
119116 </ClCompile>
117+ <ClCompile Include="..\common\dlglib.cpp">
118+ <Filter>dialog</Filter>
119+ </ClCompile>
120120 </ItemGroup>
121121 <ItemGroup>
122122 <Image Include="..\..\cygterm\cygterm.ico">
--- a/teraterm/ttpdlg/ttpdlg.v15.vcxproj
+++ b/teraterm/ttpdlg/ttpdlg.v15.vcxproj
@@ -1,4 +1,4 @@
1-<?xml version="1.0" encoding="utf-8"?>
1+<?xml version="1.0" encoding="utf-8"?>
22 <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33 <ItemGroup Label="ProjectConfigurations">
44 <ProjectConfiguration Include="Debug|Win32">
@@ -133,7 +133,7 @@
133133 </Link>
134134 </ItemDefinitionGroup>
135135 <ItemGroup>
136- <ClCompile Include="..\common\dlglib.c" />
136+ <ClCompile Include="..\common\dlglib.cpp" />
137137 <ClCompile Include="..\common\ttlib.c" />
138138 <ClCompile Include="ttdlg.c" />
139139 </ItemGroup>
@@ -167,4 +167,4 @@
167167 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
168168 <ImportGroup Label="ExtensionTargets">
169169 </ImportGroup>
170-</Project>
\ No newline at end of file
170+</Project>
--- a/teraterm/ttpdlg/ttpdlg.v15.vcxproj.filters
+++ b/teraterm/ttpdlg/ttpdlg.v15.vcxproj.filters
@@ -18,15 +18,15 @@
1818 </Filter>
1919 </ItemGroup>
2020 <ItemGroup>
21- <ClCompile Include="..\common\dlglib.c">
22- <Filter>Source Files</Filter>
23- </ClCompile>
2421 <ClCompile Include="ttdlg.c">
2522 <Filter>Source Files</Filter>
2623 </ClCompile>
2724 <ClCompile Include="..\common\ttlib.c">
2825 <Filter>Source Files</Filter>
2926 </ClCompile>
27+ <ClCompile Include="..\common\dlglib.cpp">
28+ <Filter>Source Files</Filter>
29+ </ClCompile>
3030 </ItemGroup>
3131 <ItemGroup>
3232 <ClInclude Include="dlg_res.h">
@@ -60,4 +60,4 @@
6060 <Filter>Def File</Filter>
6161 </None>
6262 </ItemGroup>
63-</Project>
63+</Project>
\ No newline at end of file
--- a/teraterm/ttpfile/ttpfile.v15.vcxproj
+++ b/teraterm/ttpfile/ttpfile.v15.vcxproj
@@ -1,4 +1,4 @@
1-<?xml version="1.0" encoding="utf-8"?>
1+<?xml version="1.0" encoding="utf-8"?>
22 <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33 <ItemGroup Label="ProjectConfigurations">
44 <ProjectConfiguration Include="Debug|Win32">
@@ -127,7 +127,7 @@
127127 </Link>
128128 </ItemDefinitionGroup>
129129 <ItemGroup>
130- <ClCompile Include="..\common\dlglib.c" />
130+ <ClCompile Include="..\common\dlglib.cpp" />
131131 <ClCompile Include="..\common\ttlib.c" />
132132 <ClCompile Include="bplus.c" />
133133 <ClCompile Include="ftlib.c" />
--- a/teraterm/ttpfile/ttpfile.v15.vcxproj.filters
+++ b/teraterm/ttpfile/ttpfile.v15.vcxproj.filters
@@ -22,9 +22,6 @@
2222 <ClCompile Include="bplus.c">
2323 <Filter>Source Files</Filter>
2424 </ClCompile>
25- <ClCompile Include="..\common\dlglib.c">
26- <Filter>Source Files</Filter>
27- </ClCompile>
2825 <ClCompile Include="ftlib.c">
2926 <Filter>Source Files</Filter>
3027 </ClCompile>
@@ -49,6 +46,9 @@
4946 <ClCompile Include="zmodem.c">
5047 <Filter>Source Files</Filter>
5148 </ClCompile>
49+ <ClCompile Include="..\common\dlglib.cpp">
50+ <Filter>Source Files</Filter>
51+ </ClCompile>
5252 </ItemGroup>
5353 <ItemGroup>
5454 <ClInclude Include="bplus.h">
@@ -92,4 +92,4 @@
9292 <Filter>Def File</Filter>
9393 </None>
9494 </ItemGroup>
95-</Project>
95+</Project>
\ No newline at end of file