OSDN Git Service

Change the character code of windows into UTF-16 completely.
[ffftp/ffftp.git] / ftpproc.c
index 08bcc52..ee92ecb 100644 (file)
--- a/ftpproc.c
+++ b/ftpproc.c
@@ -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
@@ -129,9 +131,6 @@ void DownLoadProc(int ChName, int ForceFile, int All)
        {\r
                DisableUserOpe();\r
 \r
-               // 同時接続対応\r
-               SktShareProh();\r
-\r
                ExistNotify = YES;\r
 //             KeepTransferDialog(YES);\r
 \r
@@ -263,9 +262,6 @@ void DirectDownLoadProc(char *Fname)
        {\r
                DisableUserOpe();\r
 \r
-               // 同時接続対応\r
-               SktShareProh();\r
-\r
                ExistNotify = YES;\r
 //             KeepTransferDialog(YES);\r
 \r
@@ -405,9 +401,6 @@ void MirrorDownloadProc(int Notify)
        {\r
                DisableUserOpe();\r
 \r
-               // 同時接続対応\r
-               SktShareProh();\r
-\r
                Base = NULL;\r
 \r
                if(Notify == YES)\r
@@ -879,9 +872,6 @@ void UpLoadListProc(int ChName, int All)
        {\r
                DisableUserOpe();\r
 \r
-               // 同時接続対応\r
-               SktShareProh();\r
-\r
                // ローカル側で選ばれているファイルをFileListBaseに登録\r
                FileListBase = NULL;\r
                MakeSelectedFileList(WIN_LOCAL, YES, All, &FileListBase, &CancelFlg);\r
@@ -1050,9 +1040,6 @@ void UpLoadDragProc(WPARAM wParam)
        {\r
                DisableUserOpe();\r
 \r
-               // 同時接続対応\r
-               SktShareProh();\r
-\r
                // ローカル側で選ばれているファイルをFileListBaseに登録\r
                FileListBase = NULL;\r
                MakeDroppedFileList(wParam, Cur, &FileListBase);\r
@@ -1212,9 +1199,6 @@ void MirrorUploadProc(int Notify)
        {\r
                DisableUserOpe();\r
 \r
-               // 同時接続対応\r
-               SktShareProh();\r
-\r
                Base = NULL;\r
 \r
                if(Notify == YES)\r
@@ -2116,7 +2100,9 @@ static void DelNotifyAndDo(FILELIST *Dt, int Win, int *Sw, int *Flg, char *CurDi
        {\r
                sprintf(TmpString, "%s", Path);\r
 \r
-               if(AskHostType() == HTYPE_VMS)\r
+               // ローカルのファイルのパスの最後の'\\'が消えるバグ修正\r
+//             if(AskHostType() == HTYPE_VMS)\r
+               if(Win == WIN_REMOTE && AskHostType() == HTYPE_VMS)\r
                        ReformToVMSstylePathName(TmpString);\r
 \r
                CurWin = Win;\r
@@ -3375,3 +3361,20 @@ static int RenameUnuseableName(char *Fname)
 }\r
 \r
 \r
+// 自動切断対策\r
+// NOOPコマンドでは効果が無いホストが多いためLISTコマンドを使用\r
+void NoopProc(void)\r
+{\r
+       int CancelCheckWork;\r
+       CancelCheckWork = NO;\r
+       if(AskConnecting() == YES && AskUserOpeDisabled() == NO)\r
+       {\r
+               if(AskReuseCmdSkt() == NO || AskShareProh() == YES)\r
+               {\r
+                       DisableUserOpe();\r
+                       DoDirListCmdSkt("", "", 999, &CancelCheckWork);\r
+                       EnableUserOpe();\r
+               }\r
+       }\r
+}\r
+\r