OSDN Git Service

Enlarge buffers for replies on transferring files.
[ffftp/ffftp.git] / toolmenu.c
index 786a754..217e2c9 100644 (file)
@@ -28,6 +28,8 @@
 /============================================================================*/\r
 \r
 #define  STRICT\r
+// IPv6対応\r
+#include <winsock2.h>\r
 #include <windows.h>\r
 #include <stdio.h>\r
 #include <stdlib.h>\r
@@ -37,7 +39,8 @@
 #include <windowsx.h>\r
 #include <commctrl.h>\r
 #include <stdarg.h>\r
-#include <winsock.h>\r
+// IPv6対応\r
+//#include <winsock.h>\r
 \r
 #include "common.h"\r
 #include "resource.h"\r
@@ -249,7 +252,9 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst)
        if(hWndTbarMain != NULL)\r
        {\r
                /* 2007/09/21 sunasunamix  ここから *********************/\r
-               pOldTbarMainProc = (WNDPROC)SetWindowLong(hWndTbarMain, GWL_WNDPROC, (DWORD)CountermeasureTbarMainProc);\r
+               // 64ビット対応\r
+//             pOldTbarMainProc = (WNDPROC)SetWindowLong(hWndTbarMain, GWL_WNDPROC, (DWORD)CountermeasureTbarMainProc);\r
+               pOldTbarMainProc = (WNDPROC)SetWindowLongPtr(hWndTbarMain, GWLP_WNDPROC, (LONG_PTR)CountermeasureTbarMainProc);\r
                /********************************************* ここまで */\r
 \r
                GetClientRect(hWnd, &Rect1);\r
@@ -274,7 +279,9 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst)
        if(hWndTbarLocal != NULL)\r
        {\r
                /* 2007/09/21 sunasunamix  ここから *********************/\r
-               pOldTbarLocalProc = (WNDPROC)SetWindowLong(hWndTbarLocal, GWL_WNDPROC, (DWORD)CountermeasureTbarLocalProc);\r
+               // 64ビット対応\r
+//             pOldTbarLocalProc = (WNDPROC)SetWindowLong(hWndTbarLocal, GWL_WNDPROC, (DWORD)CountermeasureTbarLocalProc);\r
+               pOldTbarLocalProc = (WNDPROC)SetWindowLongPtr(hWndTbarLocal, GWLP_WNDPROC, (LONG_PTR)CountermeasureTbarLocalProc);\r
                /********************************************* ここまで */\r
 \r
                MoveWindow(hWndTbarLocal, 0, TOOLWIN_HEIGHT, LocalWidth, TOOLWIN_HEIGHT, FALSE);\r
@@ -299,7 +306,9 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst)
                        /* エディットコントロールを探す */\r
                        hWndDirLocalEdit = GetWindow(hWndDirLocal, GW_CHILD);\r
                        if(hWndDirLocalEdit != NULL)\r
-                               HistEditBoxProcPtr = (WNDPROC)SetWindowLong(hWndDirLocalEdit, GWL_WNDPROC, (LONG)HistEditBoxWndProc);\r
+                               // 64ビット対応\r
+//                             HistEditBoxProcPtr = (WNDPROC)SetWindowLong(hWndDirLocalEdit, GWL_WNDPROC, (LONG)HistEditBoxWndProc);\r
+                               HistEditBoxProcPtr = (WNDPROC)SetWindowLongPtr(hWndDirLocalEdit, GWLP_WNDPROC, (LONG_PTR)HistEditBoxWndProc);\r
 \r
                        SendMessage(hWndDirLocal, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE, 0));\r
                        SendMessage(hWndDirLocal, CB_LIMITTEXT, FMAX_PATH, 0);\r
@@ -337,7 +346,9 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst)
        if(hWndTbarRemote != NULL)\r
        {\r
                /* 2007/09/21 sunasunamix  ここから *********************/\r
-               pOldTbarRemoteProc = (WNDPROC)SetWindowLong(hWndTbarRemote, GWL_WNDPROC, (DWORD)CountermeasureTbarRemoteProc);\r
+               // 64ビット対応\r
+//             pOldTbarRemoteProc = (WNDPROC)SetWindowLong(hWndTbarRemote, GWL_WNDPROC, (DWORD)CountermeasureTbarRemoteProc);\r
+               pOldTbarRemoteProc = (WNDPROC)SetWindowLongPtr(hWndTbarRemote, GWLP_WNDPROC, (LONG_PTR)CountermeasureTbarRemoteProc);\r
                /********************************************* ここまで */\r
 \r
                MoveWindow(hWndTbarRemote, LocalWidth + SepaWidth, TOOLWIN_HEIGHT, RemoteWidth, TOOLWIN_HEIGHT, FALSE);\r
@@ -356,7 +367,9 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst)
                        /* エディットコントロールを探す */\r
                        hWndDirRemoteEdit = GetWindow(hWndDirRemote, GW_CHILD);\r
                        if(hWndDirRemoteEdit != NULL)\r
-                               HistEditBoxProcPtr = (WNDPROC)SetWindowLong(hWndDirRemoteEdit, GWL_WNDPROC, (LONG)HistEditBoxWndProc);\r
+                               // 64ビット対応\r
+//                             HistEditBoxProcPtr = (WNDPROC)SetWindowLong(hWndDirRemoteEdit, GWL_WNDPROC, (LONG)HistEditBoxWndProc);\r
+                               HistEditBoxProcPtr = (WNDPROC)SetWindowLongPtr(hWndDirRemoteEdit, GWLP_WNDPROC, (LONG_PTR)HistEditBoxWndProc);\r
 \r
                        SendMessage(hWndDirRemote, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE, 0));\r
                        SendMessage(hWndDirRemote, CB_LIMITTEXT, FMAX_PATH, 0);\r
@@ -1833,9 +1846,18 @@ void RemoteRbuttonMenu(int Pos)
                AppendMenu(hMenu, MF_STRING | Flg1, MENU_DOWNLOAD_ALL, MSGJPN266);\r
                AppendMenu(hMenu, MF_STRING | Flg1 | Flg2, MENU_DELETE, MSGJPN267);\r
                AppendMenu(hMenu, MF_STRING | Flg1 | Flg2, MENU_RENAME, MSGJPN268);\r
+#if defined(HAVE_TANDEM)\r
+               /* HP NonStop Server では CHMOD の仕様が異なるため使用不可 */\r
+               if (AskRealHostType() != HTYPE_TANDEM)\r
+#endif\r
                AppendMenu(hMenu, MF_STRING | Flg1 | Flg2, MENU_CHMOD, MSGJPN269);\r
                AppendMenu(hMenu, MF_STRING | Flg1, MENU_MKDIR, MSGJPN270);\r
                AppendMenu(hMenu, MF_STRING | Flg1 | Flg2, MENU_URL_COPY, MSGJPN271);\r
+#if defined(HAVE_TANDEM)\r
+               /* OSS モードのときに表示されるように AskRealHostType() を使用する */\r
+               if (AskRealHostType() == HTYPE_TANDEM)\r
+                       AppendMenu(hMenu, MF_STRING | Flg1, MENU_SWITCH_OSS, MSGJPN2001);\r
+#endif\r
                AppendMenu(hMenu, MF_SEPARATOR, 0, NULL);\r
                AppendMenu(hMenu, MF_STRING | Flg1, MENU_FILESIZE, MSGJPN272);\r
                AppendMenu(hMenu, MF_SEPARATOR, 0, NULL);\r
@@ -1896,7 +1918,9 @@ static LRESULT CALLBACK CountermeasureTbarMainProc(HWND hWnd,UINT uMessage,WPARA
 {\r
        switch (uMessage) {\r
        case WM_DESTROY :\r
-               SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarMainProc);\r
+               // 64ビット対応\r
+//             SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarMainProc);\r
+               SetWindowLongPtr(hWnd,GWLP_WNDPROC,(LONG_PTR)pOldTbarMainProc);\r
                break;\r
        case WM_RBUTTONDBLCLK :\r
        case WM_RBUTTONDOWN :\r
@@ -1913,7 +1937,9 @@ static LRESULT CALLBACK CountermeasureTbarLocalProc(HWND hWnd,UINT uMessage,WPAR
 {\r
        switch (uMessage) {\r
        case WM_DESTROY :\r
-               SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarLocalProc);\r
+               // 64ビット対応\r
+//             SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarLocalProc);\r
+               SetWindowLongPtr(hWnd,GWLP_WNDPROC,(LONG_PTR)pOldTbarLocalProc);\r
                break;\r
        case WM_RBUTTONDBLCLK :\r
        case WM_RBUTTONDOWN :\r
@@ -1930,7 +1956,9 @@ static LRESULT CALLBACK CountermeasureTbarRemoteProc(HWND hWnd,UINT uMessage,WPA
 {\r
        switch (uMessage) {\r
        case WM_DESTROY :\r
-               SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarRemoteProc);\r
+               // 64ビット対応\r
+//             SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarRemoteProc);\r
+               SetWindowLongPtr(hWnd,GWLP_WNDPROC,(LONG_PTR)pOldTbarRemoteProc);\r
                break;\r
        case WM_RBUTTONDBLCLK :\r
        case WM_RBUTTONDOWN :\r