• R/O
  • SSH
  • HTTPS

ttssh2: コミット


コミットメタ情報

リビジョン7257 (tree)
日時2018-11-04 00:33:38
作者zmatsuo

ログメッセージ

64bit考慮

変更サマリ

差分

--- branches/cmake/teraterm/teraterm/CMakeLists.txt (revision 7256)
+++ branches/cmake/teraterm/teraterm/CMakeLists.txt (revision 7257)
@@ -4,14 +4,10 @@
44 include(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/lib_oniguruma.cmake)
55
66 if (MSVC)
7- string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
8- string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_MINSIZEREL ${CMAKE_C_FLAGS_MINSIZEREL})
9- string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
10- string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO})
11- string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
12- string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_MINSIZEREL ${CMAKE_CXX_FLAGS_MINSIZEREL})
13- string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
14- string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
7+ string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
8+ string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
9+ string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
10+ string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
1511 endif ()
1612
1713 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/")
--- branches/cmake/teraterm/ttpdlg/ttdlg.c (revision 7256)
+++ branches/cmake/teraterm/ttpdlg/ttdlg.c (revision 7257)
@@ -140,7 +140,7 @@
140140 switch (Message) {
141141 case WM_INITDIALOG:
142142 ts = (PTTSet)lParam;
143- SetWindowLong(Dialog, DWL_USER, lParam);
143+ SetWindowLong(Dialog, DWLP_USER, lParam);
144144
145145 SetDlgTexts(Dialog, TextInfosCom, _countof(TextInfosCom), UILanguageFile);
146146 if ( ts->Language==IdJapanese ) {
@@ -273,7 +273,7 @@
273273 case WM_COMMAND:
274274 switch (LOWORD(wParam)) {
275275 case IDOK:
276- ts = (PTTSet)GetWindowLong(Dialog,DWL_USER);
276+ ts = (PTTSet)GetWindowLong(Dialog,DWLP_USER);
277277
278278 if ( ts!=NULL ) {
279279 int width, height;
@@ -551,7 +551,7 @@
551551 switch (Message) {
552552 case WM_INITDIALOG:
553553 ts = (PTTSet)lParam;
554- SetWindowLong(Dialog, DWL_USER, lParam);
554+ SetWindowLong(Dialog, DWLP_USER, lParam);
555555
556556 SetDlgTexts(Dialog, TextInfos, _countof(TextInfos), UILanguageFile);
557557 SetDlgItemText(Dialog, IDC_WINTITLE, ts->Title);
@@ -689,7 +689,7 @@
689689 return TRUE;
690690
691691 case WM_COMMAND:
692- ts = (PTTSet)GetWindowLong(Dialog,DWL_USER);
692+ ts = (PTTSet)GetWindowLong(Dialog,DWLP_USER);
693693 RestoreVar(Dialog,ts,&IAttr,&IOffset);
694694 switch (LOWORD(wParam)) {
695695 case IDOK:
@@ -941,7 +941,7 @@
941941 break;
942942
943943 case WM_PAINT:
944- ts = (PTTSet)GetWindowLong(Dialog,DWL_USER);
944+ ts = (PTTSet)GetWindowLong(Dialog,DWLP_USER);
945945 if ( ts==NULL ) {
946946 return TRUE;
947947 }
@@ -950,7 +950,7 @@
950950 break;
951951
952952 case WM_HSCROLL:
953- ts = (PTTSet)GetWindowLong(Dialog,DWL_USER);
953+ ts = (PTTSet)GetWindowLong(Dialog,DWLP_USER);
954954 if (ts==NULL) {
955955 return TRUE;
956956 }
@@ -1043,7 +1043,7 @@
10431043 switch (Message) {
10441044 case WM_INITDIALOG:
10451045 ts = (PTTSet)lParam;
1046- SetWindowLong(Dialog, DWL_USER, lParam);
1046+ SetWindowLong(Dialog, DWLP_USER, lParam);
10471047
10481048 SetDlgTexts(Dialog, TextInfos, _countof(TextInfos), UILanguageFile);
10491049
@@ -1069,7 +1069,7 @@
10691069 case WM_COMMAND:
10701070 switch (LOWORD(wParam)) {
10711071 case IDOK:
1072- ts = (PTTSet)GetWindowLong(Dialog,DWL_USER);
1072+ ts = (PTTSet)GetWindowLong(Dialog,DWLP_USER);
10731073 if ( ts!=NULL ) {
10741074 WORD w;
10751075
@@ -1133,7 +1133,7 @@
11331133 switch (Message) {
11341134 case WM_INITDIALOG:
11351135 ts = (PTTSet)lParam;
1136- SetWindowLong(Dialog, DWL_USER, lParam);
1136+ SetWindowLong(Dialog, DWLP_USER, lParam);
11371137
11381138 SetDlgTexts(Dialog, TextInfos, _countof(TextInfos), UILanguageFile);
11391139
@@ -1204,7 +1204,7 @@
12041204 case WM_COMMAND:
12051205 switch (LOWORD(wParam)) {
12061206 case IDOK:
1207- ts = (PTTSet)GetWindowLong(Dialog,DWL_USER);
1207+ ts = (PTTSet)GetWindowLong(Dialog,DWLP_USER);
12081208 if ( ts!=NULL ) {
12091209 memset(Temp, 0, sizeof(Temp));
12101210 GetDlgItemText(Dialog, IDC_SERIALPORT, Temp, sizeof(Temp)-1);
@@ -1284,7 +1284,7 @@
12841284 switch (Message) {
12851285 case WM_INITDIALOG:
12861286 ts = (PTTSet)lParam;
1287- SetWindowLong(Dialog, DWL_USER, lParam);
1287+ SetWindowLong(Dialog, DWLP_USER, lParam);
12881288
12891289 SetDlgTexts(Dialog, TextInfos, _countof(TextInfos), UILanguageFile);
12901290
@@ -1322,7 +1322,7 @@
13221322 case WM_COMMAND:
13231323 switch (LOWORD(wParam)) {
13241324 case IDOK:
1325- ts = (PTTSet)GetWindowLong(Dialog,DWL_USER);
1325+ ts = (PTTSet)GetWindowLong(Dialog,DWLP_USER);
13261326 if (ts!=NULL) {
13271327 WritePrivateProfileString("Hosts",NULL,NULL,ts->SetupFName);
13281328
@@ -1471,7 +1471,7 @@
14711471 GetRB(Dialog,&w,IDC_TCPIPTELNET,IDC_TCPIPTELNET);
14721472 if (w==1) {
14731473 EnableDlgItem(Dialog,IDC_TCPIPTERMTYPELABEL,IDC_TCPIPTERMTYPE);
1474- ts = (PTTSet)GetWindowLong(Dialog,DWL_USER);
1474+ ts = (PTTSet)GetWindowLong(Dialog,DWLP_USER);
14751475 if (ts!=NULL) {
14761476 SetDlgItemInt(Dialog,IDC_TCPIPPORT,ts->TelPort,FALSE);
14771477 }
@@ -1515,7 +1515,7 @@
15151515 switch (Message) {
15161516 case WM_INITDIALOG:
15171517 GetHNRec = (PGetHNRec)lParam;
1518- SetWindowLong(Dialog, DWL_USER, lParam);
1518+ SetWindowLong(Dialog, DWLP_USER, lParam);
15191519
15201520 SetDlgTexts(Dialog, TextInfos, _countof(TextInfos), UILanguageFile);
15211521
@@ -1620,7 +1620,7 @@
16201620 case WM_COMMAND:
16211621 switch (LOWORD(wParam)) {
16221622 case IDOK:
1623- GetHNRec = (PGetHNRec)GetWindowLong(Dialog,DWL_USER);
1623+ GetHNRec = (PGetHNRec)GetWindowLong(Dialog,DWLP_USER);
16241624 if ( GetHNRec!=NULL ) {
16251625 char afstr[BUFSIZ];
16261626 GetRB(Dialog,&GetHNRec->PortType,IDC_HOSTTCPIP,IDC_HOSTSERIAL);
@@ -1681,7 +1681,7 @@
16811681 case IDC_HOSTTELNET:
16821682 GetRB(Dialog,&i,IDC_HOSTTELNET,IDC_HOSTTELNET);
16831683 if ( i==1 ) {
1684- GetHNRec = (PGetHNRec)GetWindowLong(Dialog,DWL_USER);
1684+ GetHNRec = (PGetHNRec)GetWindowLong(Dialog,DWLP_USER);
16851685 if ( GetHNRec!=NULL ) {
16861686 SetDlgItemInt(Dialog,IDC_HOSTTCPPORT,GetHNRec->TelPort,FALSE);
16871687 }
@@ -1746,7 +1746,7 @@
17461746 SetDlgTexts(Dialog, TextInfos, _countof(TextInfos), UILanguageFile);
17471747
17481748 CurDir = (PCHAR)(lParam);
1749- SetWindowLong(Dialog, DWL_USER, lParam);
1749+ SetWindowLong(Dialog, DWLP_USER, lParam);
17501750
17511751 SetDlgItemText(Dialog, IDC_DIRCURRENT, CurDir);
17521752 SendDlgItemMessage(Dialog, IDC_DIRNEW, EM_LIMITTEXT,
@@ -1825,7 +1825,7 @@
18251825 case WM_COMMAND:
18261826 switch (LOWORD(wParam)) {
18271827 case IDOK:
1828- CurDir = (PCHAR)GetWindowLong(Dialog,DWL_USER);
1828+ CurDir = (PCHAR)GetWindowLong(Dialog,DWLP_USER);
18291829 if ( CurDir!=NULL ) {
18301830 _getcwd(HomeDir,sizeof(HomeDir));
18311831 _chdir(CurDir);
@@ -2551,7 +2551,7 @@
25512551 switch (Message) {
25522552 case WM_INITDIALOG:
25532553 ts = (PTTSet)lParam;
2554- SetWindowLong(Dialog, DWL_USER, lParam);
2554+ SetWindowLong(Dialog, DWLP_USER, lParam);
25552555
25562556 SetDlgTexts(Dialog, TextInfos, _countof(TextInfos), UILanguageFile);
25572557
@@ -2593,7 +2593,7 @@
25932593 case WM_COMMAND:
25942594 switch (LOWORD(wParam)) {
25952595 case IDOK:
2596- ts = (PTTSet)GetWindowLong(Dialog,DWL_USER);
2596+ ts = (PTTSet)GetWindowLong(Dialog,DWLP_USER);
25972597 if (ts!=NULL) {
25982598 w = (WORD)GetCurSel(Dialog, IDC_GENPORT);
25992599 if (w>1) {
@@ -2674,7 +2674,7 @@
26742674 switch (Message) {
26752675 case WM_INITDIALOG:
26762676 Close = (PBOOL)lParam;
2677- SetWindowLong(Dialog, DWL_USER, lParam);
2677+ SetWindowLong(Dialog, DWLP_USER, lParam);
26782678
26792679 SetDlgTexts(Dialog, TextInfos, _countof(TextInfos), UILanguageFile);
26802680
@@ -2719,7 +2719,7 @@
27192719 PostMessage(Hw,WM_SYSCOMMAND,SC_CLOSE,0);
27202720 }
27212721 else {
2722- Close = (PBOOL)GetWindowLong(Dialog,DWL_USER);
2722+ Close = (PBOOL)GetWindowLong(Dialog,DWLP_USER);
27232723 if (Close!=NULL) {
27242724 *Close = TRUE;
27252725 }
--- branches/cmake/teraterm/ttpfile/ttfile.c (revision 7256)
+++ branches/cmake/teraterm/ttpfile/ttfile.c (revision 7257)
@@ -270,7 +270,7 @@
270270 ofn = (LPOPENFILENAME)lParam;
271271 pl = (LPLONG)(ofn->lCustData);
272272 opt = *pl;
273- SetWindowLongPtr(Dialog, DWLP_USER, (LONG)pl);
273+ SetWindowLongPtr(Dialog, DWLP_USER, (LONG_PTR)pl);
274274
275275 font = (HFONT)SendMessage(Dialog, WM_GETFONT, 0, 0);
276276 GetObject(font, sizeof(LOGFONT), &logfont);
@@ -602,7 +602,7 @@
602602 case WM_INITDIALOG:
603603 ofn = (LPOPENFILENAME)lParam;
604604 pw = (LPWORD)ofn->lCustData;
605- SetWindowLong(Dialog, DWL_USER, (LONG)pw);
605+ SetWindowLongPtr(Dialog, DWLP_USER, (LONG_PTR)pw);
606606
607607 font = (HFONT)SendMessage(Dialog, WM_GETFONT, 0, 0);
608608 GetObject(font, sizeof(LOGFONT), &logfont);
@@ -629,7 +629,7 @@
629629 case WM_COMMAND: // for old style dialog
630630 switch (LOWORD(wParam)) {
631631 case IDOK:
632- pw = (LPWORD)GetWindowLong(Dialog,DWL_USER);
632+ pw = (LPWORD)GetWindowLongPtr(Dialog,DWLP_USER);
633633 if (pw!=NULL)
634634 GetRB(Dialog,pw,IDC_FOPTBIN,IDC_FOPTBIN);
635635 if (DlgFoptFont != NULL) {
@@ -647,7 +647,7 @@
647647 notify = (LPOFNOTIFY)lParam;
648648 switch (notify->hdr.code) {
649649 case CDN_FILEOK:
650- pw = (LPWORD)GetWindowLong(Dialog,DWL_USER);
650+ pw = (LPWORD)GetWindowLongPtr(Dialog,DWLP_USER);
651651 if (pw!=NULL)
652652 GetRB(Dialog,pw,IDC_FOPTBIN,IDC_FOPTBIN);
653653 if (DlgFoptFont != NULL) {
@@ -822,7 +822,7 @@
822822 switch (Message) {
823823 case WM_INITDIALOG:
824824 fv = (PFileVar)lParam;
825- SetWindowLong(Dialog, DWL_USER, lParam);
825+ SetWindowLongPtr(Dialog, DWLP_USER, lParam);
826826 SendDlgItemMessage(Dialog, IDC_GETFN, EM_LIMITTEXT, sizeof(TempFull)-1,0);
827827
828828 font = (HFONT)SendMessage(Dialog, WM_GETFONT, 0, 0);
@@ -857,7 +857,7 @@
857857 return TRUE;
858858
859859 case WM_COMMAND:
860- fv = (PFileVar)GetWindowLong(Dialog,DWL_USER);
860+ fv = (PFileVar)GetWindowLongPtr(Dialog,DWLP_USER);
861861 switch (LOWORD(wParam)) {
862862 case IDOK:
863863 if (fv!=NULL) {
@@ -985,7 +985,7 @@
985985 case WM_INITDIALOG:
986986 ofn = (LPOPENFILENAME)lParam;
987987 pl = (LPLONG)ofn->lCustData;
988- SetWindowLong(Dialog, DWL_USER, (LONG)pl);
988+ SetWindowLongPtr(Dialog, DWLP_USER, (LONG)pl);
989989
990990 font = (HFONT)SendMessage(Dialog, WM_GETFONT, 0, 0);
991991 GetObject(font, sizeof(LOGFONT), &logfont);
@@ -1042,7 +1042,7 @@
10421042 case WM_COMMAND: // for old style dialog
10431043 switch (LOWORD(wParam)) {
10441044 case IDOK:
1045- pl = (LPLONG)GetWindowLong(Dialog,DWL_USER);
1045+ pl = (LPLONG)GetWindowLongPtr(Dialog,DWLP_USER);
10461046 if (pl!=NULL)
10471047 {
10481048 if (LOWORD(*pl)==0xFFFF) { // Send
@@ -1077,7 +1077,7 @@
10771077 notify = (LPOFNOTIFY)lParam;
10781078 switch (notify->hdr.code) {
10791079 case CDN_FILEOK:
1080- pl = (LPLONG)GetWindowLong(Dialog,DWL_USER);
1080+ pl = (LPLONG)GetWindowLongPtr(Dialog,DWLP_USER);
10811081 if (pl!=NULL) {
10821082 if (LOWORD(*pl) == 0xFFFF) { // Send
10831083 Lo = 0xFFFF;
--- branches/cmake/ttpmenu/ttpmenu.cpp (revision 7256)
+++ branches/cmake/ttpmenu/ttpmenu.cpp (revision 7257)
@@ -655,8 +655,8 @@
655655 {
656656 HWND passwordControl = GetDlgItem(dlg, item);
657657
658- SetWindowLong(passwordControl, GWL_USERDATA,
659- SetWindowLong(passwordControl, GWL_WNDPROC,
658+ SetWindowLong(passwordControl, GWLP_USERDATA,
659+ SetWindowLong(passwordControl, GWLP_WNDPROC,
660660 (LONG) password_wnd_proc));
661661 }
662662
@@ -2076,7 +2076,7 @@
20762076 case BUTTON_ETC:
20772077 ::GetDlgItemText(hWnd, EDIT_ENTRY, g_JobInfo.szName, MAX_PATH);
20782078 g_JobInfo.bTtssh = ::IsDlgButtonChecked(hWnd, CHECK_TTSSH);
2079- if (::DialogBox(g_hI, (LPCTSTR) DIALOG_ETC, hWnd, DlgCallBack_Etc) == TRUE) {
2079+ if (::DialogBox(g_hI, (LPCTSTR) DIALOG_ETC, hWnd, (DLGPROC)DlgCallBack_Etc) == TRUE) {
20802080 ::CheckDlgButton(hWnd, CHECK_TTSSH, 0);
20812081 if ((pt = lstrstri(g_JobInfo.szTeraTerm, TTSSH)) != NULL)
20822082 if (::lstrcmpi(pt, TTSSH) == 0)
@@ -2279,13 +2279,13 @@
22792279
22802280 switch(LOWORD(wParam)) {
22812281 case ID_TMENU_ADD:
2282- ::DialogBox(g_hI, (LPCTSTR) DIALOG_CONFIG, 0, DlgCallBack_Config);
2282+ ::DialogBox(g_hI, (LPCTSTR) DIALOG_CONFIG, 0, (DLGPROC)DlgCallBack_Config);
22832283 return TRUE;
22842284 case ID_TMENU_CLOSE:
22852285 ::DestroyWindow(hWnd);
22862286 return TRUE;
22872287 case ID_VERSION:
2288- ::DialogBox(g_hI, (LPCTSTR) DIALOG_VERSION, hWnd, DlgCallBack_Version);
2288+ ::DialogBox(g_hI, (LPCTSTR) DIALOG_VERSION, hWnd, (DLGPROC)DlgCallBack_Version);
22892289 return TRUE;
22902290 case ID_ICON:
22912291 if (GetMenuState(g_hConfigMenu, ID_ICON, MF_BYCOMMAND & MF_CHECKED) != 0) {
--- branches/cmake/ttpmenu/winmisc.cpp (revision 7256)
+++ branches/cmake/ttpmenu/winmisc.cpp (revision 7257)
@@ -457,6 +457,6 @@
457457 }
458458 }
459459
460- return CallWindowProc((WNDPROC) GetWindowLong(control, GWL_USERDATA),
460+ return CallWindowProc((WNDPROC) GetWindowLong(control, GWLP_USERDATA),
461461 control, msg, wParam, lParam);
462462 }
--- branches/cmake/ttssh2/ttxssh/auth.c (revision 7256)
+++ branches/cmake/ttssh2/ttxssh/auth.c (revision 7257)
@@ -78,7 +78,7 @@
7878 }
7979 }
8080
81- return CallWindowProc((WNDPROC) GetWindowLong(control, GWL_USERDATA),
81+ return CallWindowProc((WNDPROC) GetWindowLongPtr(control, GWLP_USERDATA),
8282 control, msg, wParam, lParam);
8383 }
8484
@@ -86,9 +86,9 @@
8686 {
8787 HWND passwordControl = GetDlgItem(dlg, IDC_SSHPASSWORD);
8888
89- SetWindowLong(passwordControl, GWL_USERDATA,
90- SetWindowLong(passwordControl, GWL_WNDPROC,
91- (LONG) password_wnd_proc));
89+ SetWindowLongPtr(passwordControl, GWLP_USERDATA,
90+ SetWindowLongPtr(passwordControl, GWLP_WNDPROC,
91+ (LONG_PTR) password_wnd_proc));
9292
9393 SetFocus(passwordControl);
9494 }
@@ -691,7 +691,7 @@
691691 case WM_INITDIALOG:
692692 pvar = (PTInstVar) lParam;
693693 pvar->auth_state.auth_dialog = dlg;
694- SetWindowLong(dlg, DWL_USER, lParam);
694+ SetWindowLongPtr(dlg, DWLP_USER, lParam);
695695
696696 init_auth_dlg(pvar, dlg);
697697
@@ -748,7 +748,7 @@
748748 return FALSE; /* because we set the focus */
749749
750750 case WM_TIMER:
751- pvar = (PTInstVar) GetWindowLong(dlg, DWL_USER);
751+ pvar = (PTInstVar) GetWindowLong(dlg, DWLP_USER);
752752 // 認証準備ができてから、認証データを送信する。早すぎると、落ちる。(2004.12.16 yutaka)
753753 if (wParam == IDC_TIMER1) {
754754 // 自動ログインのため
@@ -839,7 +839,7 @@
839839 return FALSE;
840840
841841 case WM_COMMAND:
842- pvar = (PTInstVar) GetWindowLong(dlg, DWL_USER);
842+ pvar = (PTInstVar) GetWindowLong(dlg, DWLP_USER);
843843
844844 switch (LOWORD(wParam)) {
845845 case IDOK:
@@ -1145,7 +1145,7 @@
11451145 case WM_INITDIALOG:
11461146 pvar = (PTInstVar) lParam;
11471147 pvar->auth_state.auth_dialog = dlg;
1148- SetWindowLong(dlg, DWL_USER, lParam);
1148+ SetWindowLongPtr(dlg, DWLP_USER, lParam);
11491149
11501150 init_TIS_dlg(pvar, dlg);
11511151
@@ -1171,7 +1171,7 @@
11711171 return FALSE; /* because we set the focus */
11721172
11731173 case WM_COMMAND:
1174- pvar = (PTInstVar) GetWindowLong(dlg, DWL_USER);
1174+ pvar = (PTInstVar) GetWindowLong(dlg, DWLP_USER);
11751175
11761176 switch (LOWORD(wParam)) {
11771177 case IDOK:
@@ -1366,7 +1366,7 @@
13661366 switch (msg) {
13671367 case WM_INITDIALOG:
13681368 pvar = (PTInstVar) lParam;
1369- SetWindowLong(dlg, DWL_USER, lParam);
1369+ SetWindowLongPtr(dlg, DWLP_USER, lParam);
13701370
13711371 init_default_auth_dlg(pvar, dlg);
13721372
@@ -1398,7 +1398,7 @@
13981398 return TRUE; /* because we do not set the focus */
13991399
14001400 case WM_COMMAND:
1401- pvar = (PTInstVar) GetWindowLong(dlg, DWL_USER);
1401+ pvar = (PTInstVar) GetWindowLong(dlg, DWLP_USER);
14021402
14031403 switch (LOWORD(wParam)) {
14041404 case IDOK:
--- branches/cmake/ttssh2/ttxssh/fwd.c (revision 7256)
+++ branches/cmake/ttssh2/ttxssh/fwd.c (revision 7257)
@@ -533,11 +533,11 @@
533533 hInst, NULL);
534534 if (pvar->fwd_state.accept_wnd != NULL) {
535535 pvar->fwd_state.old_accept_wnd_proc =
536- (WNDPROC) SetWindowLong(pvar->fwd_state.accept_wnd,
537- GWL_WNDPROC,
538- (LONG) accept_wnd_proc);
539- SetWindowLong(pvar->fwd_state.accept_wnd, GWL_USERDATA,
540- (LONG) pvar);
536+ (WNDPROC) SetWindowLongPtr(pvar->fwd_state.accept_wnd,
537+ GWLP_WNDPROC,
538+ (LONG_PTR) accept_wnd_proc);
539+ SetWindowLongPtr(pvar->fwd_state.accept_wnd, GWLP_USERDATA,
540+ (LONG_PTR) pvar);
541541 }
542542 }
543543
@@ -747,7 +747,7 @@
747747 static LRESULT CALLBACK accept_wnd_proc(HWND wnd, UINT msg, WPARAM wParam,
748748 LPARAM lParam)
749749 {
750- PTInstVar pvar = (PTInstVar) GetWindowLong(wnd, GWL_USERDATA);
750+ PTInstVar pvar = (PTInstVar) GetWindowLongPtr(wnd, GWLP_USERDATA);
751751
752752 if (msg == WM_SOCK_ACCEPT &&
753753 (LOWORD(lParam) == FD_READ || LOWORD(lParam) == FD_CLOSE ||
--- branches/cmake/ttssh2/ttxssh/fwdui.c (revision 7256)
+++ branches/cmake/ttssh2/ttxssh/fwdui.c (revision 7257)
@@ -982,7 +982,7 @@
982982 switch (msg) {
983983 case WM_INITDIALOG:
984984 closure = (FWDEditClosure *) lParam;
985- SetWindowLong(dlg, DWL_USER, lParam);
985+ SetWindowLongPtr(dlg, DWLP_USER, lParam);
986986
987987 pvar = closure->pvar;
988988 init_fwd_edit_dlg(pvar, closure->spec, dlg);
@@ -1020,7 +1020,7 @@
10201020 return FALSE; /* because we set the focus */
10211021
10221022 case WM_COMMAND:
1023- closure = (FWDEditClosure *) GetWindowLong(dlg, DWL_USER);
1023+ closure = (FWDEditClosure *) GetWindowLongPtr(dlg, DWLP_USER);
10241024
10251025 switch (LOWORD(wParam)) {
10261026 case IDOK:
@@ -1147,7 +1147,7 @@
11471147 switch (msg) {
11481148 case WM_INITDIALOG:
11491149 pvar = (PTInstVar) lParam;
1150- SetWindowLong(dlg, DWL_USER, lParam);
1150+ SetWindowLongPtr(dlg, DWLP_USER, lParam);
11511151
11521152 init_fwd_dlg(pvar, dlg);
11531153
@@ -1171,7 +1171,7 @@
11711171 return TRUE; /* because we do not set the focus */
11721172
11731173 case WM_COMMAND:
1174- pvar = (PTInstVar) GetWindowLong(dlg, DWL_USER);
1174+ pvar = (PTInstVar) GetWindowLongPtr(dlg, DWLP_USER);
11751175
11761176 switch (LOWORD(wParam)) {
11771177 case IDOK:
--- branches/cmake/ttssh2/ttxssh/hosts.c (revision 7256)
+++ branches/cmake/ttssh2/ttxssh/hosts.c (revision 7257)
@@ -1710,7 +1710,7 @@
17101710 case WM_INITDIALOG:
17111711 pvar = (PTInstVar) lParam;
17121712 pvar->hosts_state.hosts_dialog = dlg;
1713- SetWindowLong(dlg, DWL_USER, lParam);
1713+ SetWindowLong(dlg, DWLP_USER, lParam);
17141714
17151715 // 追加・置き換えとも init_hosts_dlg を呼んでいるので、その前にセットする必要がある
17161716 GetWindowText(dlg, uimsg, sizeof(uimsg));
@@ -1803,7 +1803,7 @@
18031803 return TRUE; /* because we do not set the focus */
18041804
18051805 case WM_COMMAND:
1806- pvar = (PTInstVar) GetWindowLong(dlg, DWL_USER);
1806+ pvar = (PTInstVar) GetWindowLong(dlg, DWLP_USER);
18071807
18081808 switch (LOWORD(wParam)) {
18091809 case IDC_CONTINUE:
@@ -1876,7 +1876,7 @@
18761876 case WM_INITDIALOG:
18771877 pvar = (PTInstVar) lParam;
18781878 pvar->hosts_state.hosts_dialog = dlg;
1879- SetWindowLong(dlg, DWL_USER, lParam);
1879+ SetWindowLong(dlg, DWLP_USER, lParam);
18801880
18811881 // 追加・置き換えとも init_hosts_dlg を呼んでいるので、その前にセットする必要がある
18821882 GetWindowText(dlg, uimsg, sizeof(uimsg));
@@ -1966,7 +1966,7 @@
19661966 return TRUE; /* because we do not set the focus */
19671967
19681968 case WM_COMMAND:
1969- pvar = (PTInstVar) GetWindowLong(dlg, DWL_USER);
1969+ pvar = (PTInstVar) GetWindowLong(dlg, DWLP_USER);
19701970
19711971 switch (LOWORD(wParam)) {
19721972 case IDC_CONTINUE:
@@ -2040,7 +2040,7 @@
20402040 case WM_INITDIALOG:
20412041 pvar = (PTInstVar) lParam;
20422042 pvar->hosts_state.hosts_dialog = dlg;
2043- SetWindowLong(dlg, DWL_USER, lParam);
2043+ SetWindowLong(dlg, DWLP_USER, lParam);
20442044
20452045 // 追加・置き換えとも init_hosts_dlg を呼んでいるので、その前にセットする必要がある
20462046 GetWindowText(dlg, uimsg, sizeof(uimsg));
@@ -2133,7 +2133,7 @@
21332133 return TRUE; /* because we do not set the focus */
21342134
21352135 case WM_COMMAND:
2136- pvar = (PTInstVar) GetWindowLong(dlg, DWL_USER);
2136+ pvar = (PTInstVar) GetWindowLong(dlg, DWLP_USER);
21372137
21382138 switch (LOWORD(wParam)) {
21392139 case IDC_CONTINUE:
--- branches/cmake/ttssh2/ttxssh/key.c (revision 7256)
+++ branches/cmake/ttssh2/ttxssh/key.c (revision 7257)
@@ -2200,7 +2200,7 @@
22002200 switch (msg) {
22012201 case WM_INITDIALOG:
22022202 pvar = (PTInstVar)lParam;
2203- SetWindowLong(dlg, DWL_USER, lParam);
2203+ SetWindowLong(dlg, DWLP_USER, lParam);
22042204
22052205 GetWindowText(dlg, uimsg, sizeof(uimsg));
22062206 UTIL_get_lang_msg("DLG_HOSTKEY_ROTATION_TITLE", pvar, uimsg);
@@ -2261,7 +2261,7 @@
22612261 return TRUE; /* because we do not set the focus */
22622262
22632263 case WM_COMMAND:
2264- pvar = (PTInstVar)GetWindowLong(dlg, DWL_USER);
2264+ pvar = (PTInstVar)GetWindowLong(dlg, DWLP_USER);
22652265
22662266 switch (LOWORD(wParam)) {
22672267 case IDOK:
--- branches/cmake/ttssh2/ttxssh/sftp.c (revision 7256)
+++ branches/cmake/ttssh2/ttxssh/sftp.c (revision 7257)
@@ -1073,8 +1073,8 @@
10731073 SetFocus(hEdit);
10741074
10751075 // エディットコントロールのサブクラス化
1076- hEditProc = (WNDPROC)GetWindowLong(hEdit, GWL_WNDPROC);
1077- SetWindowLong(hEdit, GWL_WNDPROC, (LONG)EditProc);
1076+ hEditProc = (WNDPROC)GetWindowLong(hEdit, GWLP_WNDPROC);
1077+ SetWindowLong(hEdit, GWLP_WNDPROC, (LONG)EditProc);
10781078
10791079 return TRUE;
10801080
--- branches/cmake/ttssh2/ttxssh/ttxssh.c (revision 7256)
+++ branches/cmake/ttssh2/ttxssh/ttxssh.c (revision 7257)
@@ -1255,7 +1255,7 @@
12551255 switch (msg) {
12561256 case WM_INITDIALOG:
12571257 GetHNRec = (PGetHNRec) lParam;
1258- SetWindowLong(dlg, DWL_USER, lParam);
1258+ SetWindowLong(dlg, DWLP_USER, lParam);
12591259
12601260 GetWindowText(dlg, uimsg, sizeof(uimsg));
12611261 UTIL_get_lang_msg("DLG_HOST_TITLE", pvar, uimsg);
@@ -1332,8 +1332,8 @@
13321332 // C-n/C-p のためにサブクラス化 (2007.9.4 maya)
13331333 hwndHostname = GetDlgItem(dlg, IDC_HOSTNAME);
13341334 hwndHostnameEdit = GetWindow(hwndHostname, GW_CHILD);
1335- OrigHostnameEditProc = (WNDPROC)GetWindowLong(hwndHostnameEdit, GWL_WNDPROC);
1336- SetWindowLong(hwndHostnameEdit, GWL_WNDPROC, (LONG)HostnameEditProc);
1335+ OrigHostnameEditProc = (WNDPROC)GetWindowLong(hwndHostnameEdit, GWLP_WNDPROC);
1336+ SetWindowLong(hwndHostnameEdit, GWLP_WNDPROC, (LONG)HostnameEditProc);
13371337
13381338 CheckRadioButton(dlg, IDC_HOSTTELNET, IDC_HOSTOTHER,
13391339 pvar->settings.Enabled ? IDC_HOSTSSH : GetHNRec->
@@ -1488,7 +1488,7 @@
14881488 case WM_COMMAND:
14891489 switch (LOWORD(wParam)) {
14901490 case IDOK:
1491- GetHNRec = (PGetHNRec) GetWindowLong(dlg, DWL_USER);
1491+ GetHNRec = (PGetHNRec) GetWindowLong(dlg, DWLP_USER);
14921492 if (GetHNRec != NULL) {
14931493 if (IsDlgButtonChecked(dlg, IDC_HOSTTCPIP)) {
14941494 char afstr[BUFSIZ];
@@ -1554,7 +1554,7 @@
15541554 }
15551555 }
15561556 }
1557- SetWindowLong(hwndHostnameEdit, GWL_WNDPROC, (LONG)OrigHostnameEditProc);
1557+ SetWindowLong(hwndHostnameEdit, GWLP_WNDPROC, (LONG)OrigHostnameEditProc);
15581558 EndDialog(dlg, 1);
15591559
15601560 if (DlgHostFont != NULL) {
@@ -1564,7 +1564,7 @@
15641564 return TRUE;
15651565
15661566 case IDCANCEL:
1567- SetWindowLong(hwndHostnameEdit, GWL_WNDPROC, (LONG)OrigHostnameEditProc);
1567+ SetWindowLong(hwndHostnameEdit, GWLP_WNDPROC, (LONG)OrigHostnameEditProc);
15681568 EndDialog(dlg, 0);
15691569
15701570 if (DlgHostFont != NULL) {
@@ -1614,7 +1614,7 @@
16141614 enable_dlg_items(dlg, IDC_SSH_VERSION, IDC_SSH_VERSION, FALSE); // disabled
16151615 hostssh_enabled:
16161616
1617- GetHNRec = (PGetHNRec) GetWindowLong(dlg, DWL_USER);
1617+ GetHNRec = (PGetHNRec) GetWindowLong(dlg, DWLP_USER);
16181618
16191619 if (IsDlgButtonChecked(dlg, IDC_HOSTTELNET)) {
16201620 if (GetHNRec != NULL)
@@ -3297,7 +3297,7 @@
32973297
32983298 switch (msg) {
32993299 case WM_INITDIALOG:
3300- SetWindowLong(dlg, DWL_USER, lParam);
3300+ SetWindowLong(dlg, DWLP_USER, lParam);
33013301 init_setup_dlg((PTInstVar) lParam, dlg);
33023302
33033303 font = (HFONT)SendMessage(dlg, WM_GETFONT, 0, 0);
@@ -3361,7 +3361,7 @@
33613361 case WM_COMMAND:
33623362 switch (LOWORD(wParam)) {
33633363 case IDOK:
3364- complete_setup_dlg((PTInstVar) GetWindowLong(dlg, DWL_USER), dlg);
3364+ complete_setup_dlg((PTInstVar) GetWindowLong(dlg, DWLP_USER), dlg);
33653365 EndDialog(dlg, 1);
33663366 if (DlgSetupFont != NULL) {
33673367 DeleteObject(DlgSetupFont);
@@ -4128,8 +4128,8 @@
41284128 {
41294129 HWND passwordControl = GetDlgItem(dlg, item);
41304130
4131- SetWindowLong(passwordControl, GWL_USERDATA,
4132- SetWindowLong(passwordControl, GWL_WNDPROC,
4131+ SetWindowLong(passwordControl, GWLP_USERDATA,
4132+ SetWindowLong(passwordControl, GWLP_WNDPROC,
41334133 (LONG) password_wnd_proc));
41344134 }
41354135
旧リポジトリブラウザで表示