OSDN Git Service

Change behavior of automatic IPv4/IPv6 selection.
[ffftp/ffftp.git] / hostman.c
index 1e1c298..4fcdd9e 100644 (file)
--- a/hostman.c
+++ b/hostman.c
@@ -1,6 +1,6 @@
-/*=============================================================================\r
+/*=============================================================================\r
 *\r
-*                                                              \83z\83X\83g\88ê\97\97\r
+*                                                              ホスト一覧\r
 *\r
 ===============================================================================\r
 / Copyright (C) 1997-2007 Sota. All rights reserved.\r
@@ -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
 #include <htmlhelp.h>\r
 #include "helpid.h"\r
 \r
-// UTF-8\91Î\89\9e\r
+// UTF-8対応\r
 #undef __MBSWRAPPER_H__\r
 #include "mbswrapper.h"\r
 \r
 \r
-/*===== \83v\83\8d\83g\83^\83C\83v =====*/\r
+/*===== プロトタイプ =====*/\r
 \r
-static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);\r
+// 64ビット対応\r
+//static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);\r
+static INT_PTR CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);\r
 static LRESULT CALLBACK HostListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);\r
 static HOSTLISTDATA *GetNextNode(HOSTLISTDATA *Pos);\r
 static int GetNodeLevel(int Num);\r
@@ -62,44 +66,52 @@ static int DeleteChildAndNext(HOSTLISTDATA *Pos);
 static void SendAllHostNames(HWND hWnd, int Cur);\r
 static int IsNodeGroup(int Num);\r
 static int DispHostSetDlg(HWND hDlg);\r
-static BOOL CALLBACK MainSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
-static BOOL CALLBACK AdvSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
-static BOOL CALLBACK CodeSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
-static BOOL CALLBACK DialupSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
-static BOOL CALLBACK Adv2SettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
-// \88Ã\8d\86\89»\92Ê\90M\91Î\89\9e\r
-static BOOL CALLBACK CryptSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
-\r
-/*===== \8aO\95\94\8eQ\8fÆ =====*/\r
+// 64ビット対応\r
+//static BOOL CALLBACK MainSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
+//static BOOL CALLBACK AdvSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
+//static BOOL CALLBACK CodeSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
+//static BOOL CALLBACK DialupSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
+//static BOOL CALLBACK Adv2SettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
+static INT_PTR CALLBACK MainSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
+static INT_PTR CALLBACK AdvSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
+static INT_PTR CALLBACK CodeSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
+static INT_PTR CALLBACK DialupSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
+static INT_PTR CALLBACK Adv2SettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
+// 暗号化通信対応\r
+static INT_PTR CALLBACK CryptSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
+// 同時接続対応\r
+static INT_PTR CALLBACK Adv3SettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
+\r
+/*===== 外部参照 =====*/\r
 \r
 extern HWND hHelpWin;\r
 \r
-/* \90Ý\92è\92l */\r
+/* 設定値 */\r
 extern char UserMailAdrs[USER_MAIL_LEN+1];\r
 extern HFONT ListFont;\r
 extern char DefaultLocalPath[FMAX_PATH+1];\r
 extern int ConnectAndSet;\r
 extern SIZE HostDlgSize;\r
 \r
-/*===== \83\8d\81[\83J\83\8b\82È\83\8f\81[\83N =====*/\r
+/*===== ローカルなワーク =====*/\r
 \r
-static int Hosts = 0;                                          /* \83z\83X\83g\90\94 */\r
-static int ConnectingHost;                                     /* \90Ú\91±\92\86\82Ì\83z\83X\83g */\r
-static int CurrentHost;                                                /* \83J\81[\83\\83\8b\88Ê\92u\82Ì\83z\83X\83g */\r
-static HOSTLISTDATA *HostListTop = NULL;       /* \83z\83X\83g\88ê\97\97\83f\81[\83^ */\r
-static HOSTDATA TmpHost;                                       /* \83z\83X\83g\8fî\95ñ\83R\83s\81[\97p */\r
-static int Apply;                                                      /* \83v\83\8d\83p\83e\83B\83V\81[\83g\82ÅOK\82ð\89\9f\82µ\82½\83t\83\89\83O */\r
+static int Hosts = 0;                                          /* ホスト数 */\r
+static int ConnectingHost;                                     /* 接続中のホスト */\r
+static int CurrentHost;                                                /* カーソル位置のホスト */\r
+static HOSTLISTDATA *HostListTop = NULL;       /* ホスト一覧データ */\r
+static HOSTDATA TmpHost;                                       /* ホスト情報コピー用 */\r
+static int Apply;                                                      /* プロパティシートでOKを押したフラグ */\r
 static WNDPROC HostListProcPtr;\r
 \r
 \r
 \r
-/*----- \83z\83X\83g\88ê\97\97\83E\83C\83\93\83h\83E --------------------------------------------------\r
+/*----- ホスト一覧ウインドウ --------------------------------------------------\r
 *\r
 *      Parameter\r
-*              int Type : \83_\83C\83A\83\8d\83O\82Ì\83^\83C\83v (DLG_TYPE_xxx)\r
+*              int Type : ダイアログのタイプ (DLG_TYPE_xxx)\r
 *\r
 *      Return Value\r
-*              \83X\83e\81[\83^\83X (YES=\8eÀ\8ds/NO=\8eæ\8fÁ)\r
+*              ステータス (YES=実行/NO=取消)\r
 *----------------------------------------------------------------------------*/\r
 \r
 int SelectHost(int Type)\r
@@ -113,27 +125,29 @@ int SelectHost(int Type)
 \r
        Sts = DialogBox(GetFtpInst(), MAKEINTRESOURCE(Dlg), GetMainHwnd(), SelectHostProc);\r
 \r
-       /* \83z\83X\83g\90Ý\92è\82ð\95Û\91 */\r
+       /* ホスト設定を保存 */\r
        SetNodeLevelAll();\r
-       SaveRegistory();\r
+       SaveRegistry();\r
 \r
        return(Sts);\r
 }\r
 \r
 \r
-/*----- \83z\83X\83g\88ê\97\97\83E\83C\83\93\83h\83E\82Ì\83R\81[\83\8b\83o\83b\83N ------------------------------------\r
+/*----- ホスト一覧ウインドウのコールバック ------------------------------------\r
 *\r
 *      Parameter\r
-*              HWND hDlg : \83E\83C\83\93\83h\83E\83n\83\93\83h\83\8b\r
-*              UINT message : \83\81\83b\83Z\81[\83W\94Ô\8d\86\r
-*              WPARAM wParam : \83\81\83b\83Z\81[\83W\82Ì WPARAM \88ø\90\94\r
-*              LPARAM lParam : \83\81\83b\83Z\81[\83W\82Ì LPARAM \88ø\90\94\r
+*              HWND hDlg : ウインドウハンドル\r
+*              UINT message : メッセージ番号\r
+*              WPARAM wParam : メッセージの WPARAM 引数\r
+*              LPARAM lParam : メッセージの LPARAM 引数\r
 *\r
 *      Return Value\r
 *              BOOL TRUE/FALSE\r
 *----------------------------------------------------------------------------*/\r
 \r
-static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)\r
+// 64ビット対応\r
+//static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)\r
+static INT_PTR CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)\r
 {\r
        static DIALOGSIZE DlgSize = {\r
                { HOST_NEW, HOST_FOLDER, HOST_SET, HOST_COPY, HOST_DEL, HOST_DOWN, HOST_UP, IDHELP, HOST_SIZEGRIP, -1 },\r
@@ -149,22 +163,26 @@ static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
        int Level2;\r
        HOSTLISTDATA *Data1;\r
        HOSTLISTDATA *Data2;\r
-       NM_TREEVIEW *tView;\r
+       // UTF-8対応\r
+//     NM_TREEVIEW *tView;\r
+       NM_TREEVIEWW *tView;\r
        HTREEITEM tViewPos;\r
        TV_HITTESTINFO HitInfo;\r
 \r
        switch (message)\r
        {\r
                case WM_INITDIALOG :\r
-                       /* TreeView\82Å\82Ì\83_\83u\83\8b\83N\83\8a\83b\83N\82ð\82Â\82©\82Ü\82¦\82é\82½\82ß */\r
-                       HostListProcPtr = (WNDPROC)SetWindowLong(GetDlgItem(hDlg, HOST_LIST), GWL_WNDPROC, (LONG)HostListWndProc);\r
+                       /* TreeViewでのダブルクリックをつかまえるため */\r
+                       // 64ビット対応\r
+//                     HostListProcPtr = (WNDPROC)SetWindowLong(GetDlgItem(hDlg, HOST_LIST), GWL_WNDPROC, (LONG)HostListWndProc);\r
+                       HostListProcPtr = (WNDPROC)SetWindowLongPtr(GetDlgItem(hDlg, HOST_LIST), GWLP_WNDPROC, (LONG_PTR)HostListWndProc);\r
 \r
 \r
 //             SetClassLong(hDlg, GCL_HICON, (LONG)LoadIcon(GetFtpInst(), MAKEINTRESOURCE(ffftp)));\r
 \r
                        if(AskConnecting() == YES)\r
                        {\r
-                               /* \90Ú\91±\92\86\82Í\81u\95Ï\8dX\81v\82Ì\82Ý\8b\96\89 */\r
+                               /* 接続中は「変更」のみ許可 */\r
                                EnableWindow(GetDlgItem(hDlg, HOST_NEW), FALSE);\r
                                EnableWindow(GetDlgItem(hDlg, HOST_FOLDER), FALSE);\r
                                EnableWindow(GetDlgItem(hDlg, HOST_COPY), FALSE);\r
@@ -199,7 +217,7 @@ static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
                                                EndDialog(hDlg, YES);\r
                                                break;\r
                                        }\r
-                                       /* \82±\82±\82Ébreak\82Í\82È\82¢ */\r
+                                       /* ここにbreakはない */\r
 \r
                                case IDCANCEL :\r
                                        AskDlgSize(hDlg, &DlgSize, &HostDlgSize);\r
@@ -301,8 +319,11 @@ static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
                                                CurrentHost = Item.lParam;\r
                                                Level1 = IsNodeGroup(CurrentHost);\r
 \r
-                                               if(((Level1 == YES) && (DialogBox(GetFtpInst(), MAKEINTRESOURCE(groupdel_dlg), GetMainHwnd(), ExeEscDialogProc) == YES)) ||\r
-                                                  ((Level1 == NO) && (DialogBox(GetFtpInst(), MAKEINTRESOURCE(hostdel_dlg), GetMainHwnd(), ExeEscDialogProc) == YES)))\r
+                                               // バグ修正\r
+//                                             if(((Level1 == YES) && (DialogBox(GetFtpInst(), MAKEINTRESOURCE(groupdel_dlg), GetMainHwnd(), ExeEscDialogProc) == YES)) ||\r
+//                                                ((Level1 == NO) && (DialogBox(GetFtpInst(), MAKEINTRESOURCE(hostdel_dlg), GetMainHwnd(), ExeEscDialogProc) == YES)))\r
+                                               if(((Level1 == YES) && (DialogBox(GetFtpInst(), MAKEINTRESOURCE(groupdel_dlg), hDlg, ExeEscDialogProc) == YES)) ||\r
+                                                  ((Level1 == NO) && (DialogBox(GetFtpInst(), MAKEINTRESOURCE(hostdel_dlg), hDlg, ExeEscDialogProc) == YES)))\r
                                                {\r
                                                        DelHostFromList(CurrentHost);\r
                                                        if(CurrentHost >= Hosts)\r
@@ -334,7 +355,7 @@ static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
 \r
                                                        if((Level1 == Level2) && (Data2->Set.Level & SET_LEVEL_GROUP))\r
                                                        {\r
-                                                               //Data2\82Ìchild\82Ö\r
+                                                               //Data2のchildへ\r
                                                                if(Data1->Next != NULL)\r
                                                                        Data1->Next->Prev = Data1->Prev;\r
                                                                if(Data1->Prev != NULL)\r
@@ -351,7 +372,7 @@ static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
                                                        }\r
                                                        else if(Level1 < Level2)\r
                                                        {\r
-                                                               //Data1\82ÌPrev\82ÌChild\82ÌNext\82Ì\96\96\94ö\82Ö\r
+                                                               //Data1のPrevのChildのNextの末尾へ\r
                                                                Data2 = Data1->Prev->Child;\r
                                                                while(Data2->Next != NULL)\r
                                                                        Data2 = Data2->Next;\r
@@ -372,7 +393,7 @@ static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
                                                        }\r
                                                        else\r
                                                        {\r
-                                                               //Data2\82Ìprev\82Ö\r
+                                                               //Data2のprevへ\r
                                                                if(Data1->Next != NULL)\r
                                                                        Data1->Next->Prev = Data1->Prev;\r
                                                                if(Data1->Prev != NULL)\r
@@ -427,7 +448,7 @@ static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
                                                        {\r
                                                                if(Data1->Next != NULL)\r
                                                                {\r
-                                                                       //Data2 = Data1\82ÌNext\r
+                                                                       //Data2 = Data1Next\r
                                                                        Data2 = Data1->Next;\r
                                                                        Level2 = GetNodeLevelByData(Data2);\r
                                                                }\r
@@ -442,7 +463,7 @@ static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
                                                if(((Data2 == NULL) && (Level1 > 0)) ||\r
                                                   (Level1 > Level2))\r
                                                {\r
-                                                       //Data1\82ÌParent\82ÌNext\82Ö\r
+                                                       //Data1のParentのNextへ\r
                                                        Data2 = Data1->Parent;\r
 \r
                                                        if(Data1->Next != NULL)\r
@@ -470,7 +491,7 @@ static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
                                                {\r
                                                        if(Data2->Set.Level & SET_LEVEL_GROUP)\r
                                                        {\r
-                                                               //Data2\82ÌChild\82Ö\r
+                                                               //Data2のChildへ\r
                                                                if(Data1->Next != NULL)\r
                                                                        Data1->Next->Prev = Data1->Prev;\r
                                                                if(Data1->Prev != NULL)\r
@@ -489,7 +510,7 @@ static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
                                                        }\r
                                                        else\r
                                                        {\r
-                                                               //Data2\82ÌNext\82Ö\r
+                                                               //Data2のNextへ\r
                                                                if(Data1->Next != NULL)\r
                                                                        Data1->Next->Prev = Data1->Prev;\r
                                                                if(Data1->Prev != NULL)\r
@@ -548,7 +569,9 @@ static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
                        break;\r
 \r
                case WM_NOTIFY:\r
-                       tView = (NM_TREEVIEW FAR *)lParam;\r
+                       // UTF-8対応\r
+//                     tView = (NM_TREEVIEW FAR *)lParam;\r
+                       tView = (NM_TREEVIEWW FAR *)lParam;\r
                        switch(tView->hdr.idFrom)\r
                        {\r
                                case HOST_LIST :\r
@@ -556,8 +579,10 @@ static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
                                        hItem = tView->itemNew.hItem;\r
                                        switch(tView->hdr.code)\r
                                        {\r
-                                               case TVN_SELCHANGED :\r
-                                                       /* \83t\83H\83\8b\83_\82ª\91I\82Î\82ê\82½\82Æ\82«\82Í\90Ú\91±\81A\83R\83s\81[\83{\83^\83\93\82Í\8bÖ\8e~ */\r
+                                               // UTF-8対応\r
+//                                             case TVN_SELCHANGED :\r
+                                               case TVN_SELCHANGEDW :\r
+                                                       /* フォルダが選ばれたときは接続、コピーボタンは禁止 */\r
                                                        Item.hItem = hItem;\r
                                                        Item.mask = TVIF_PARAM;\r
                                                        SendDlgItemMessage(hDlg, HOST_LIST, TVM_GETITEM, TVGN_CARET, (LPARAM)&Item);\r
@@ -582,16 +607,16 @@ static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
 }\r
 \r
 \r
-/*----- \83z\83X\83g\88ê\97\97TreeView\82Ì\83\81\83b\83Z\81[\83W\8f\88\97\9d ------------------------------------\r
+/*----- ホスト一覧TreeViewのメッセージ処理 ------------------------------------\r
 *\r
 *      Parameter\r
-*              HWND hWnd : \83E\83C\83\93\83h\83E\83n\83\93\83h\83\8b\r
-*              UINT message  : \83\81\83b\83Z\81[\83W\94Ô\8d\86\r
-*              WPARAM wParam : \83\81\83b\83Z\81[\83W\82Ì WPARAM \88ø\90\94\r
-*              LPARAM lParam : \83\81\83b\83Z\81[\83W\82Ì LPARAM \88ø\90\94\r
+*              HWND hWnd : ウインドウハンドル\r
+*              UINT message  : メッセージ番号\r
+*              WPARAM wParam : メッセージの WPARAM 引数\r
+*              LPARAM lParam : メッセージの LPARAM 引数\r
 *\r
 *      Return Value\r
-*              \83\81\83b\83Z\81[\83W\82É\91Î\89\9e\82·\82é\96ß\82è\92l\r
+*              メッセージに対応する戻り値\r
 *----------------------------------------------------------------------------*/\r
 \r
 static LRESULT CALLBACK HostListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)\r
@@ -606,14 +631,14 @@ static LRESULT CALLBACK HostListWndProc(HWND hWnd, UINT message, WPARAM wParam,
 }\r
 \r
 \r
-/*----- \8e\9f\82Ì\90Ý\92è\94Ô\8d\86\82Ì\83m\81[\83h\82ð\95Ô\82· --------------------------------------------\r
+/*----- 次の設定番号のノードを返す --------------------------------------------\r
 *\r
 *      Parameter\r
-*              HOSTLISTDATA *Pos : \83m\81[\83h\83f\81[\83^\r
+*              HOSTLISTDATA *Pos : ノードデータ\r
 *\r
 *      Return Value\r
-*              HOSTLISTDATA *\8e\9f\82Ì\83m\81[\83h\r
-*                      NULL=\8e\9f\82Í\82È\82¢\r
+*              HOSTLISTDATA *次のノード\r
+*                      NULL=次はない\r
 *----------------------------------------------------------------------------*/\r
 \r
 static HOSTLISTDATA *GetNextNode(HOSTLISTDATA *Pos)\r
@@ -644,13 +669,13 @@ static HOSTLISTDATA *GetNextNode(HOSTLISTDATA *Pos)
 }\r
 \r
 \r
-/*----- \83m\81[\83h\82Ì\83\8c\83x\83\8b\90\94\82ð\95Ô\82·\81i\90Ý\92è\94Ô\8d\86\8ew\92è\81j --------------------------------\r
+/*----- ノードのレベル数を返す(設定番号指定) --------------------------------\r
 *\r
 *      Parameter\r
-*              int Num : \90Ý\92è\92l\8d\86\94Ô\8d\86\r
+*              int Num : 設定値号番号\r
 *\r
 *      Return Value\r
-*              int \83\8c\83x\83\8b\90\94 (-1=\90Ý\92è\82ª\82È\82¢\81j\r
+*              int レベル数 (-1=設定がない)\r
 *----------------------------------------------------------------------------*/\r
 \r
 static int GetNodeLevel(int Num)\r
@@ -673,13 +698,13 @@ static int GetNodeLevel(int Num)
 }\r
 \r
 \r
-/*----- \83m\81[\83h\82Ì\83\8c\83x\83\8b\90\94\82ð\95Ô\82·\81i\83m\81[\83h\83f\81[\83^\8ew\92è\81j-----------------------------\r
+/*----- ノードのレベル数を返す(ノードデータ指定)-----------------------------\r
 *\r
 *      Parameter\r
-*              HOSTLISTDATA *Data : \90Ý\92è\92l\r
+*              HOSTLISTDATA *Data : 設定値\r
 *\r
 *      Return Value\r
-*              int \83\8c\83x\83\8b\90\94\r
+*              int レベル数\r
 *----------------------------------------------------------------------------*/\r
 \r
 static int GetNodeLevelByData(HOSTLISTDATA *Data)\r
@@ -696,13 +721,13 @@ static int GetNodeLevelByData(HOSTLISTDATA *Data)
 }\r
 \r
 \r
-/*----- \83m\81[\83h\82Ì\90Ý\92è\94Ô\8d\86\82ð\95Ô\82· ------------------------------------------------\r
+/*----- ノードの設定番号を返す ------------------------------------------------\r
 *\r
 *      Parameter\r
-*              HOSTLISTDATA *Data : \90Ý\92è\92l\r
+*              HOSTLISTDATA *Data : 設定値\r
 *\r
 *      Return Value\r
-*              int \90Ý\92è\94Ô\8d\86\r
+*              int 設定番号\r
 *----------------------------------------------------------------------------*/\r
 \r
 static int GetNodeNumByData(HOSTLISTDATA *Data)\r
@@ -721,13 +746,13 @@ static int GetNodeNumByData(HOSTLISTDATA *Data)
 }\r
 \r
 \r
-/*----- \8ew\92è\94Ô\8d\86\82Ì\83m\81[\83h\82ð\95Ô\82· ------------------------------------------------\r
+/*----- 指定番号のノードを返す ------------------------------------------------\r
 *\r
 *      Parameter\r
-*              int Num : \90Ý\92è\94Ô\8d\86\r
+*              int Num : 設定番号\r
 *\r
 *      Return Value\r
-*              HOSTLISTDATA * : \90Ý\92è\92l\r
+*              HOSTLISTDATA * : 設定値\r
 *----------------------------------------------------------------------------*/\r
 \r
 static HOSTLISTDATA *GetNodeByNum(int Num)\r
@@ -742,13 +767,13 @@ static HOSTLISTDATA *GetNodeByNum(int Num)
 }\r
 \r
 \r
-/*----- \90Ý\92è\92l\83\8a\83X\83g\82Ì\8ae\83m\81[\83h\82Ì\83\8c\83x\83\8b\94Ô\8d\86\82ð\83Z\83b\83g ----------------------------\r
+/*----- 設定値リストの各ノードのレベル番号をセット ----------------------------\r
 *\r
 *      Parameter\r
-*              int Num : \90Ý\92è\94Ô\8d\86\r
+*              int Num : 設定番号\r
 *\r
 *      Return Value\r
-*              HOSTLISTDATA * : \90Ý\92è\92l\r
+*              HOSTLISTDATA * : 設定値\r
 *----------------------------------------------------------------------------*/\r
 \r
 static int SetNodeLevelAll(void)\r
@@ -763,20 +788,20 @@ static int SetNodeLevelAll(void)
                Pos->Set.Level |= GetNodeLevelByData(Pos);\r
                Pos = GetNextNode(Pos);\r
        }\r
-       return(SUCCESS);\r
+       return(FFFTP_SUCCESS);\r
 }\r
 \r
 \r
-/*----- \90Ý\92è\92l\83\8a\83X\83g\82É\92Ç\89Á ----------------------------------------------------\r
+/*----- 設定値リストに追加 ----------------------------------------------------\r
 *\r
 *      Parameter\r
-*              HOSTDATA *Set : \92Ç\89Á\82·\82é\90Ý\92è\92l\r
-*              int Pos : \92Ç\89Á\82·\82é\88Ê\92u (0\81` : -1=\8dÅ\8cã)\r
-*              int Level : \83\8c\83x\83\8b\90\94 (SET_LEVEL_SAME=\92Ç\89Á\88Ê\92u\82Ì\82à\82Ì\82Æ\93¯\83\8c\83x\83\8b)\r
+*              HOSTDATA *Set : 追加する設定値\r
+*              int Pos : 追加する位置 (0~ : -1=最後)\r
+*              int Level : レベル数 (SET_LEVEL_SAME=追加位置のものと同レベル)\r
 *\r
 *      Return Value\r
-*              int \83X\83e\81[\83^\83X\r
-*                      SUCCESS/FAIL\r
+*              int ステータス\r
+*                      FFFTP_SUCCESS/FFFTP_FAIL\r
 *----------------------------------------------------------------------------*/\r
 \r
 int AddHostToList(HOSTDATA *Set, int Pos, int Level)\r
@@ -786,7 +811,7 @@ int AddHostToList(HOSTDATA *Set, int Pos, int Level)
        HOSTLISTDATA *Last;\r
        int Cur;\r
 \r
-       Sts = FAIL;\r
+       Sts = FFFTP_FAIL;\r
        if((Pos >= -1) && (Pos <= Hosts))\r
        {\r
                if(Pos == -1)\r
@@ -844,22 +869,22 @@ int AddHostToList(HOSTDATA *Set, int Pos, int Level)
                                }\r
                        }\r
                        Hosts++;\r
-                       Sts = SUCCESS;\r
+                       Sts = FFFTP_SUCCESS;\r
                }\r
        }\r
        return(Sts);\r
 }\r
 \r
 \r
-/*----- \90Ý\92è\92l\83\8a\83X\83g\82ð\8dX\90V\82·\82é ------------------------------------------------\r
+/*----- 設定値リストを更新する ------------------------------------------------\r
 *\r
 *      Parameter\r
-*              int Num : \90Ý\92è\92l\8d\86\94Ô\8d\86\r
-*              HOSTDATA *Set : \90Ý\92è\92l\82ð\83R\83s\81[\82·\82é\83\8f\81[\83N\r
+*              int Num : 設定値号番号\r
+*              HOSTDATA *Set : 設定値をコピーするワーク\r
 *\r
 *      Return Value\r
-*              int \83X\83e\81[\83^\83X\r
-*                      SUCCESS/FAIL\r
+*              int ステータス\r
+*                      FFFTP_SUCCESS/FFFTP_FAIL\r
 *----------------------------------------------------------------------------*/\r
 \r
 static int UpdateHostToList(int Num, HOSTDATA *Set)\r
@@ -867,25 +892,25 @@ static int UpdateHostToList(int Num, HOSTDATA *Set)
        int Sts;\r
        HOSTLISTDATA *Pos;\r
 \r
-       Sts = FAIL;\r
+       Sts = FFFTP_FAIL;\r
        if((Num >= 0) && (Num < Hosts))\r
        {\r
                Pos = GetNodeByNum(Num);\r
                memcpy(&Pos->Set, Set, sizeof(HOSTDATA));\r
-               Sts = SUCCESS;\r
+               Sts = FFFTP_SUCCESS;\r
        }\r
        return(Sts);\r
 }\r
 \r
 \r
-/*----- \90Ý\92è\92l\83\8a\83X\83g\82©\82ç\8dí\8f\9c --------------------------------------------------\r
+/*----- 設定値リストから削除 --------------------------------------------------\r
 *\r
 *      Parameter\r
-*              int Num : \8dí\8f\9c\82·\82é\94Ô\8d\86\r
+*              int Num : 削除する番号\r
 *\r
 *      Return Value\r
-*              int \83X\83e\81[\83^\83X\r
-*                      SUCCESS/FAIL\r
+*              int ステータス\r
+*                      FFFTP_SUCCESS/FFFTP_FAIL\r
 *----------------------------------------------------------------------------*/\r
 \r
 static int DelHostFromList(int Num)\r
@@ -893,7 +918,7 @@ static int DelHostFromList(int Num)
        int Sts;\r
        HOSTLISTDATA *Pos;\r
 \r
-       Sts = FAIL;\r
+       Sts = FFFTP_FAIL;\r
        if((Num >= 0) && (Num < Hosts))\r
        {\r
                if(Num == 0)\r
@@ -918,23 +943,23 @@ static int DelHostFromList(int Num)
                }\r
                free(Pos);\r
                Hosts--;\r
-               Sts = SUCCESS;\r
+               Sts = FFFTP_SUCCESS;\r
        }\r
        return(Sts);\r
 }\r
 \r
 \r
-/*----- \90Ý\92è\92l\83\8a\83X\83g\82©\82ç\83m\81[\83h\83f\81[\83^\82ð\8dí\8f\9c ------------------------------------\r
+/*----- 設定値リストからノードデータを削除 ------------------------------------\r
 *\r
 *      Parameter\r
-*              HOSTLISTDATA *Pos : \8dí\8f\9c\82·\82é\83m\81[\83h\r
+*              HOSTLISTDATA *Pos : 削除するノード\r
 *\r
 *      Return Value\r
-*              int \83X\83e\81[\83^\83X\r
-*                      SUCCESS/FAIL\r
+*              int ステータス\r
+*                      FFFTP_SUCCESS/FFFTP_FAIL\r
 *\r
 *      Note\r
-*              Pos->Next, Pos->Child\82Ì\91S\82Ä\82Ì\83m\81[\83h\82ð\8dí\8f\9c\82·\82é\r
+*              Pos->Next, Pos->Childの全てのノードを削除する\r
 *----------------------------------------------------------------------------*/\r
 \r
 static int DeleteChildAndNext(HOSTLISTDATA *Pos)\r
@@ -951,22 +976,22 @@ static int DeleteChildAndNext(HOSTLISTDATA *Pos)
                Hosts--;\r
                Pos = Next;\r
        }\r
-       return(SUCCESS);\r
+       return(FFFTP_SUCCESS);\r
 }\r
 \r
 \r
-/*----- \90Ý\92è\92l\83\8a\83X\83g\82©\82ç\90Ý\92è\92l\82ð\8eæ\82è\8fo\82· --------------------------------------\r
+/*----- 設定値リストから設定値を取り出す --------------------------------------\r
 *\r
 *      Parameter\r
-*              int Num : \90Ý\92è\92l\8d\86\94Ô\8d\86\r
-*              HOSTDATA *Set : \90Ý\92è\92l\82ð\83R\83s\81[\82·\82é\83\8f\81[\83N\r
+*              int Num : 設定値号番号\r
+*              HOSTDATA *Set : 設定値をコピーするワーク\r
 *\r
 *      Return Value\r
-*              int \83X\83e\81[\83^\83X\r
-*                      SUCCESS/FAIL\r
+*              int ステータス\r
+*                      FFFTP_SUCCESS/FFFTP_FAIL\r
 *\r
 *      Note\r
-*              \8c»\8dÝ\83z\83X\83g\82É\90Ú\91±\92\86\82Ì\8e\9e\82Í\81ACopyHostFromListInConnect() \82ð\8eg\82¤\8e\96\r
+*              現在ホストに接続中の時は、CopyHostFromListInConnect() を使う事\r
 *----------------------------------------------------------------------------*/\r
 \r
 int CopyHostFromList(int Num, HOSTDATA *Set)\r
@@ -974,29 +999,29 @@ int CopyHostFromList(int Num, HOSTDATA *Set)
        int Sts;\r
        HOSTLISTDATA *Pos;\r
 \r
-       Sts = FAIL;\r
+       Sts = FFFTP_FAIL;\r
        if((Num >= 0) && (Num < Hosts))\r
        {\r
                Pos = GetNodeByNum(Num);\r
                memcpy(Set, &Pos->Set, sizeof(HOSTDATA));\r
-               Sts = SUCCESS;\r
+               Sts = FFFTP_SUCCESS;\r
        }\r
        return(Sts);\r
 }\r
 \r
 \r
-/*----- \90Ý\92è\92l\83\8a\83X\83g\82©\82ç\90Ý\92è\92l\82ð\8eæ\82è\8fo\82· --------------------------------------\r
+/*----- 設定値リストから設定値を取り出す --------------------------------------\r
 *\r
 *      Parameter\r
-*              int Num : \90Ý\92è\92l\8d\86\94Ô\8d\86\r
-*              HOSTDATA *Set : \90Ý\92è\92l\82ð\83R\83s\81[\82·\82é\83\8f\81[\83N\r
+*              int Num : 設定値号番号\r
+*              HOSTDATA *Set : 設定値をコピーするワーク\r
 *\r
 *      Return Value\r
-*              int \83X\83e\81[\83^\83X\r
-*                      SUCCESS/FAIL\r
+*              int ステータス\r
+*                      FFFTP_SUCCESS/FFFTP_FAIL\r
 *\r
 *      Note\r
-*              \8c»\8dÝ\83z\83X\83g\82É\90Ú\91±\92\86\82Ì\8e\9e\82É\8eg\82¤\r
+*              現在ホストに接続中の時に使う\r
 *----------------------------------------------------------------------------*/\r
 \r
 int CopyHostFromListInConnect(int Num, HOSTDATA *Set)\r
@@ -1004,7 +1029,7 @@ int CopyHostFromListInConnect(int Num, HOSTDATA *Set)
        int Sts;\r
        HOSTLISTDATA *Pos;\r
 \r
-       Sts = FAIL;\r
+       Sts = FFFTP_FAIL;\r
        if((Num >= 0) && (Num < Hosts))\r
        {\r
                Pos = GetNodeByNum(Num);\r
@@ -1021,26 +1046,39 @@ int CopyHostFromListInConnect(int Num, HOSTDATA *Set)
                Set->UseNLST_R = Pos->Set.UseNLST_R;\r
                Set->LastDir = Pos->Set.LastDir;\r
                Set->TimeZone = Pos->Set.TimeZone;\r
-               // \88Ã\8d\86\89»\92Ê\90M\91Î\89\9e\r
+               // 暗号化通信対応\r
+               Set->UseNoEncryption = Pos->Set.UseNoEncryption;\r
                Set->UseFTPES = Pos->Set.UseFTPES;\r
                Set->UseFTPIS = Pos->Set.UseFTPIS;\r
                Set->UseSFTP = Pos->Set.UseSFTP;\r
-               Sts = SUCCESS;\r
+               // 同時接続対応\r
+               Set->MaxThreadCount = Pos->Set.MaxThreadCount;\r
+               Set->ReuseCmdSkt = Pos->Set.ReuseCmdSkt;\r
+               // MLSD対応\r
+               Set->UseMLSD = Pos->Set.UseMLSD;\r
+               // IPv6対応\r
+               Set->NetType = Pos->Set.NetType;\r
+               // 自動切断対策\r
+               Set->NoopInterval = Pos->Set.NoopInterval;\r
+               // 再転送対応\r
+               Set->TransferErrorMode = Pos->Set.TransferErrorMode;\r
+               Set->TransferErrorNotify = Pos->Set.TransferErrorNotify;\r
+               Sts = FFFTP_SUCCESS;\r
        }\r
        return(Sts);\r
 }\r
 \r
 \r
-/*----- \90Ý\92è\92l\83\8a\83X\83g\82Ì\83u\83b\83N\83}\81[\83N\82ð\8dX\90V --------------------------------------\r
+/*----- 設定値リストのブックマークを更新 --------------------------------------\r
 *\r
 *      Parameter\r
-*              int Num : \90Ý\92è\92l\8d\86\94Ô\8d\86\r
-*              char *Bmask : \83u\83b\83N\83}\81[\83N\95\8e\9a\97ñ\r
-*              int Len : \83u\83b\83N\83}\81[\83N\95\8e\9a\97ñ\82Ì\92·\82³\r
+*              int Num : 設定値号番号\r
+*              char *Bmask : ブックマーク文字列\r
+*              int Len : ブックマーク文字列の長さ\r
 *\r
 *      Return Value\r
-*              int \83X\83e\81[\83^\83X\r
-*                      SUCCESS/FAIL\r
+*              int ステータス\r
+*                      FFFTP_SUCCESS/FFFTP_FAIL\r
 *----------------------------------------------------------------------------*/\r
 \r
 int SetHostBookMark(int Num, char *Bmask, int Len)\r
@@ -1048,24 +1086,24 @@ int SetHostBookMark(int Num, char *Bmask, int Len)
        int Sts;\r
        HOSTLISTDATA *Pos;\r
 \r
-       Sts = FAIL;\r
+       Sts = FFFTP_FAIL;\r
        if((Num >= 0) && (Num < Hosts))\r
        {\r
                Pos = GetNodeByNum(Num);\r
                memcpy(Pos->Set.BookMark, Bmask, Len);\r
-               Sts = SUCCESS;\r
+               Sts = FFFTP_SUCCESS;\r
        }\r
        return(Sts);\r
 }\r
 \r
 \r
-/*----- \90Ý\92è\92l\83\8a\83X\83g\82Ì\83u\83b\83N\83}\81[\83N\95\8e\9a\97ñ\82ð\95Ô\82· --------------------------------\r
+/*----- 設定値リストのブックマーク文字列を返す --------------------------------\r
 *\r
 *      Parameter\r
-*              int Num : \90Ý\92è\92l\8d\86\94Ô\8d\86\r
+*              int Num : 設定値号番号\r
 *\r
 *      Return Value\r
-*              char *\83u\83b\83N\83}\81[\83N\95\8e\9a\97ñ\r
+*              char *ブックマーク文字列\r
 *----------------------------------------------------------------------------*/\r
 \r
 char *AskHostBookMark(int Num)\r
@@ -1083,16 +1121,16 @@ char *AskHostBookMark(int Num)
 }\r
 \r
 \r
-/*----- \90Ý\92è\92l\83\8a\83X\83g\82Ì\83f\83B\83\8c\83N\83g\83\8a\82ð\8dX\90V --------------------------------------\r
+/*----- 設定値リストのディレクトリを更新 --------------------------------------\r
 *\r
 *      Parameter\r
-*              int Num : \90Ý\92è\92l\8d\86\94Ô\8d\86\r
-*              char *LocDir : \83\8d\81[\83J\83\8b\82Ì\83f\83B\83\8c\83N\83g\83\8a\r
-*              char *HostDir : \83z\83X\83g\82Ì\83f\83B\83\8c\83N\83g\83\8a\r
+*              int Num : 設定値号番号\r
+*              char *LocDir : ローカルのディレクトリ\r
+*              char *HostDir : ホストのディレクトリ\r
 *\r
 *      Return Value\r
-*              int \83X\83e\81[\83^\83X\r
-*                      SUCCESS/FAIL\r
+*              int ステータス\r
+*                      FFFTP_SUCCESS/FFFTP_FAIL\r
 *----------------------------------------------------------------------------*/\r
 \r
 int SetHostDir(int Num, char *LocDir, char *HostDir)\r
@@ -1100,27 +1138,27 @@ int SetHostDir(int Num, char *LocDir, char *HostDir)
        int Sts;\r
        HOSTLISTDATA *Pos;\r
 \r
-       Sts = FAIL;\r
+       Sts = FFFTP_FAIL;\r
        if((Num >= 0) && (Num < Hosts))\r
        {\r
                Pos = GetNodeByNum(Num);\r
                strcpy(Pos->Set.LocalInitDir, LocDir);\r
                strcpy(Pos->Set.RemoteInitDir, HostDir);\r
-               Sts = SUCCESS;\r
+               Sts = FFFTP_SUCCESS;\r
        }\r
        return(Sts);\r
 }\r
 \r
 \r
-/*----- \90Ý\92è\92l\83\8a\83X\83g\82Ì\83p\83X\83\8f\81[\83h\82ð\8dX\90V ----------------------------------------\r
+/*----- 設定値リストのパスワードを更新 ----------------------------------------\r
 *\r
 *      Parameter\r
-*              int Num : \90Ý\92è\92l\8d\86\94Ô\8d\86\r
-*              char *Pass : \83p\83X\83\8f\81[\83h\r
+*              int Num : 設定値号番号\r
+*              char *Pass : パスワード\r
 *\r
 *      Return Value\r
-*              int \83X\83e\81[\83^\83X\r
-*                      SUCCESS/FAIL\r
+*              int ステータス\r
+*                      FFFTP_SUCCESS/FFFTP_FAIL\r
 *----------------------------------------------------------------------------*/\r
 \r
 int SetHostPassword(int Num, char *Pass)\r
@@ -1128,25 +1166,25 @@ int SetHostPassword(int Num, char *Pass)
        int Sts;\r
        HOSTLISTDATA *Pos;\r
 \r
-       Sts = FAIL;\r
+       Sts = FFFTP_FAIL;\r
        if((Num >= 0) && (Num < Hosts))\r
        {\r
                Pos = GetNodeByNum(Num);\r
                strcpy(Pos->Set.PassWord, Pass);\r
-               Sts = SUCCESS;\r
+               Sts = FFFTP_SUCCESS;\r
        }\r
        return(Sts);\r
 }\r
 \r
 \r
-/*----- \8ew\92è\82Ì\90Ý\92è\96¼\82ð\8e\9d\82Â\90Ý\92è\82Ì\94Ô\8d\86\82ð\95Ô\82· ------------------------------------\r
+/*----- 指定の設定名を持つ設定の番号を返す ------------------------------------\r
 *\r
 *      Parameter\r
-*              char *Name : \90Ý\92è\96¼\r
+*              char *Name : 設定名\r
 *\r
 *      Return Value\r
-*              int \90Ý\92è\94Ô\8d\86 (0\81`)\r
-*                      -1=\8c©\82Â\82©\82ç\82È\82¢\r
+*              int 設定番号 (0~)\r
+*                      -1=見つからない\r
 *----------------------------------------------------------------------------*/\r
 \r
 int SearchHostName(char *Name)\r
@@ -1170,18 +1208,18 @@ int SearchHostName(char *Name)
 }\r
 \r
 \r
-/*----- \90Ý\92è\92l\83\8a\83X\83g\82Ì\83\\81[\83g\95û\96@\82ð\8dX\90V ----------------------------------------\r
+/*----- 設定値リストのソート方法を更新 ----------------------------------------\r
 *\r
 *      Parameter\r
-*              int Num : \90Ý\92è\92l\8d\86\94Ô\8d\86\r
-*              int LFSort : \83\8d\81[\83J\83\8b\82Ì\83t\83@\83C\83\8b\82Ì\83\\81[\83g\95û\96@\r
-*              int LDSort : \83\8d\81[\83J\83\8b\82Ì\83t\83H\83\8b\83_\82Ì\83\\81[\83g\95û\96@\r
-*              int RFSort : \83\8a\83\82\81[\83g\82Ì\83t\83@\83C\83\8b\82Ì\83\\81[\83g\95û\96@\r
-*              int RDSort : \83\8a\83\82\81[\83g\82Ì\83t\83H\83\8b\83_\82Ì\83\\81[\83g\95û\96@\r
+*              int Num : 設定値号番号\r
+*              int LFSort : ローカルのファイルのソート方法\r
+*              int LDSort : ローカルのフォルダのソート方法\r
+*              int RFSort : リモートのファイルのソート方法\r
+*              int RDSort : リモートのフォルダのソート方法\r
 *\r
 *      Return Value\r
-*              int \83X\83e\81[\83^\83X\r
-*                      SUCCESS/FAIL\r
+*              int ステータス\r
+*                      FFFTP_SUCCESS/FFFTP_FAIL\r
 *----------------------------------------------------------------------------*/\r
 \r
 int SetHostSort(int Num, int LFSort, int LDSort, int RFSort, int RDSort)\r
@@ -1189,28 +1227,28 @@ int SetHostSort(int Num, int LFSort, int LDSort, int RFSort, int RDSort)
        int Sts;\r
        HOSTLISTDATA *Pos;\r
 \r
-       Sts = FAIL;\r
+       Sts = FFFTP_FAIL;\r
        if((Num >= 0) && (Num < Hosts))\r
        {\r
                Pos = GetNodeByNum(Num);\r
                Pos->Set.Sort = LFSort * 0x1000000 | LDSort * 0x10000 | RFSort * 0x100 | RDSort;\r
-               Sts = SUCCESS;\r
+               Sts = FFFTP_SUCCESS;\r
        }\r
        return(Sts);\r
 }\r
 \r
 \r
-/*----- \93o\98^\82³\82ê\82Ä\82¢\82é\83\\81[\83g\95û\96@\82ð\95ª\89ð\82·\82é ------------------------------------\r
+/*----- 登録されているソート方法を分解する ------------------------------------\r
 *\r
 *      Parameter\r
-*              ulong Sort : \83\\81[\83g\95û\96@ \r
-*              int *LFSort : \83\8d\81[\83J\83\8b\82Ì\83t\83@\83C\83\8b\82Ì\83\\81[\83g\95û\96@\82ð\8ai\94[\82·\82é\83\8f\81[\83N\r
-*              int *LDSort : \83\8d\81[\83J\83\8b\82Ì\83t\83H\83\8b\83_\82Ì\83\\81[\83g\95û\96@\82ð\8ai\94[\82·\82é\83\8f\81[\83N\r
-*              int *RFSort : \83\8a\83\82\81[\83g\82Ì\83t\83@\83C\83\8b\82Ì\83\\81[\83g\95û\96@\82ð\8ai\94[\82·\82é\83\8f\81[\83N\r
-*              int *RDSort : \83\8a\83\82\81[\83g\82Ì\83t\83H\83\8b\83_\82Ì\83\\81[\83g\95û\96@\82ð\8ai\94[\82·\82é\83\8f\81[\83N\r
+*              ulong Sort : ソート方法 \r
+*              int *LFSort : ローカルのファイルのソート方法を格納するワーク\r
+*              int *LDSort : ローカルのフォルダのソート方法を格納するワーク\r
+*              int *RFSort : リモートのファイルのソート方法を格納するワーク\r
+*              int *RDSort : リモートのフォルダのソート方法を格納するワーク\r
 *\r
 *      Return Value\r
-*              \82È\82µ\r
+*              なし\r
 *----------------------------------------------------------------------------*/\r
 \r
 void DecomposeSortType(ulong Sort, int *LFSort, int *LDSort, int *RFSort, int *RDSort)\r
@@ -1223,13 +1261,13 @@ void DecomposeSortType(ulong Sort, int *LFSort, int *LDSort, int *RFSort, int *R
 }\r
 \r
 \r
-/*----- \8c»\8dÝ\90Ú\91±\92\86\82Ì\90Ý\92è\94Ô\8d\86\82ð\95Ô\82· --------------------------------------------\r
+/*----- 現在接続中の設定番号を返す --------------------------------------------\r
 *\r
 *      Parameter\r
-*              \82È\82µ\r
+*              なし\r
 *\r
 *      Return Value\r
-*              int \90Ý\92è\94Ô\8d\86\r
+*              int 設定番号\r
 *----------------------------------------------------------------------------*/\r
 \r
 int AskCurrentHost(void)\r
@@ -1238,13 +1276,13 @@ int AskCurrentHost(void)
 }\r
 \r
 \r
-/*----- \8c»\8dÝ\90Ú\91±\92\86\82Ì\90Ý\92è\94Ô\8d\86\82ð\83Z\83b\83g\82·\82é --------------------------------------\r
+/*----- 現在接続中の設定番号をセットする --------------------------------------\r
 *\r
 *      Parameter\r
-*              int Num : \90Ý\92è\94Ô\8d\86\r
+*              int Num : 設定番号\r
 *\r
 *      Return Value\r
-*              \82È\82µ\r
+*              なし\r
 *----------------------------------------------------------------------------*/\r
 \r
 void SetCurrentHost(int Num)\r
@@ -1254,13 +1292,13 @@ void SetCurrentHost(int Num)
 }\r
 \r
 \r
-/*----- \83f\83t\83H\83\8b\83g\90Ý\92è\92l\82ð\8eæ\82è\8fo\82· --------------------------------------------\r
+/*----- デフォルト設定値を取り出す --------------------------------------------\r
 *\r
 *      Parameter\r
-*              HOSTDATA *Set : \90Ý\92è\92l\82ð\83R\83s\81[\82·\82é\83\8f\81[\83N\r
+*              HOSTDATA *Set : 設定値をコピーするワーク\r
 *\r
 *      Return Value\r
-*              \82È\82µ\r
+*              なし\r
 *----------------------------------------------------------------------------*/\r
 \r
 void CopyDefaultHost(HOSTDATA *Set)\r
@@ -1282,6 +1320,8 @@ void CopyDefaultHost(HOSTDATA *Set)
        Set->KanjiCode = KANJI_NOCNV;\r
        Set->KanaCnv = YES;\r
        Set->NameKanjiCode = KANJI_NOCNV;\r
+       // UTF-8対応\r
+       Set->CurNameKanjiCode = KANJI_NOCNV;\r
        Set->NameKanaCnv = NO;\r
        Set->Pasv = YES;\r
        Set->FireWall = NO;\r
@@ -1298,23 +1338,40 @@ void CopyDefaultHost(HOSTDATA *Set)
        Set->DialupAlways = NO;\r
        Set->DialupNotify = YES;\r
        strcpy(Set->DialEntry, "");\r
-       // \88Ã\8d\86\89»\92Ê\90M\91Î\89\9e\r
+       // 暗号化通信対応\r
        Set->CryptMode = CRYPT_NONE;\r
+       Set->UseNoEncryption = YES;\r
        Set->UseFTPES = YES;\r
        Set->UseFTPIS = YES;\r
        Set->UseSFTP = YES;\r
+       strcpy(Set->PrivateKey, "");\r
+       // 同時接続対応\r
+       Set->MaxThreadCount = 1;\r
+       Set->ReuseCmdSkt = YES;\r
+       Set->NoDisplayUI = NO;\r
+       // MLSD対応\r
+       Set->Feature = 0;\r
+       Set->UseMLSD = YES;\r
+       // IPv6対応\r
+       Set->NetType = NTYPE_AUTO;\r
+       Set->CurNetType = NTYPE_AUTO;\r
+       // 自動切断対策\r
+       Set->NoopInterval = 0;\r
+       // 再転送対応\r
+       Set->TransferErrorMode = EXIST_OVW;\r
+       Set->TransferErrorNotify = YES;\r
        return;\r
 }\r
 \r
 \r
-/*----- \90Ý\92è\96¼\88ê\97\97\82ð\83E\83B\83\93\83h\83E\82É\91\97\82é ------------------------------------------\r
+/*----- 設定名一覧をウィンドウに送る ------------------------------------------\r
 *\r
 *      Parameter\r
-*              HWND hWnd : \83E\83C\83\93\83h\83E\83n\83\93\83h\83\8b\r
+*              HWND hWnd : ウインドウハンドル\r
 *              int Cur : \r
 *\r
 *      Return Value\r
-*              \82È\82µ\r
+*              なし\r
 *----------------------------------------------------------------------------*/\r
 \r
 static void SendAllHostNames(HWND hWnd, int Cur)\r
@@ -1329,10 +1386,10 @@ static void SendAllHostNames(HWND hWnd, int Cur)
 \r
        hItemCur = NULL;\r
 \r
-       /* \82¿\82ç\82Â\82­\82Ì\82Å\8dÄ\95`\89æ\8bÖ\8e~ */\r
+       /* ちらつくので再描画禁止 */\r
        SendMessage(hWnd, WM_SETREDRAW, (WPARAM)FALSE, 0);\r
 \r
-       SendMessage(hWnd, TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT);         /* \91S\82Ä\82ð\8dí\8f\9c */\r
+       SendMessage(hWnd, TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT);         /* 全てを削除 */\r
 \r
        if((Level = malloc(sizeof(HTREEITEM*) * Hosts + 1)) != NULL)\r
        {\r
@@ -1380,7 +1437,7 @@ static void SendAllHostNames(HWND hWnd, int Cur)
                free(Level);\r
        }\r
 \r
-       /* \8dÄ\95`\89æ */\r
+       /* 再描画 */\r
        SendMessage(hWnd, WM_SETREDRAW, (WPARAM)TRUE, 0);\r
 \r
        if(hItemCur != NULL)\r
@@ -1394,14 +1451,14 @@ static void SendAllHostNames(HWND hWnd, int Cur)
 }\r
 \r
 \r
-/*----- \90Ý\92è\92l\82ª\83O\83\8b\81[\83v\82©\82Ç\82¤\82©\82ð\95Ô\82· ----------------------------------------\r
+/*----- 設定値がグループかどうかを返す ----------------------------------------\r
 *\r
 *      Parameter\r
-*              int Num : \90Ý\92è\92l\8d\86\94Ô\8d\86\r
+*              int Num : 設定値号番号\r
 *\r
 *      Return Value\r
-*              int \83O\83\8b\81[\83v\82©\82Ç\82¤\82©\r
-*                      YES/NO/-1=\90Ý\92è\92l\82ª\82È\82¢\r
+*              int グループかどうか\r
+*                      YES/NO/-1=設定値がない\r
 *----------------------------------------------------------------------------*/\r
 \r
 static int IsNodeGroup(int Num)\r
@@ -1419,13 +1476,13 @@ static int IsNodeGroup(int Num)
 }\r
 \r
 \r
-/*----- WS_FTP.INI\82©\82ç\82Ì\83C\83\93\83|\81[\83g --------------------------------------------\r
+/*----- WS_FTP.INIからのインポート --------------------------------------------\r
 *\r
 *      Parameter\r
-*              \82È\82µ\r
+*              なし\r
 *\r
 *      Return Value\r
-*              \82È\82µ\r
+*              なし\r
 *----------------------------------------------------------------------------*/\r
 \r
 void ImportFromWSFTP(void)\r
@@ -1503,22 +1560,27 @@ void ImportFromWSFTP(void)
 \r
 \r
 \r
-/*----- \83z\83X\83g\90Ý\92è\82Ì\83v\83\8d\83p\83e\83B\83V\81[\83g ------------------------------------------\r
+/*----- ホスト設定のプロパティシート ------------------------------------------\r
 *\r
 *      Parameter\r
-*              HWND hDlg : \90e\83E\83C\83\93\83h\83E\82Ì\83n\83\93\83h\83\8b\r
+*              HWND hDlg : 親ウインドウのハンドル\r
 *\r
 *      Return Value\r
-*              \82È\82µ\r
+*              なし\r
 *----------------------------------------------------------------------------*/\r
 \r
 static int DispHostSetDlg(HWND hDlg)\r
 {\r
-// SFTP\81AFTPES\81AFTPIS\91Î\89\9e\r
+       // SFTP、FTPES、FTPIS対応\r
+       // 同時接続対応\r
 //     PROPSHEETPAGE psp[5];\r
-       PROPSHEETPAGE psp[6];\r
+       PROPSHEETPAGE psp[7];\r
        PROPSHEETHEADER psh;\r
 \r
+       // 変数が未初期化のバグ修正\r
+       memset(&psp, 0, sizeof(psp));\r
+       memset(&psh, 0, sizeof(psh));\r
+\r
        psp[0].dwSize = sizeof(PROPSHEETPAGE);\r
        psp[0].dwFlags = PSP_USETITLE | PSP_HASHELP;\r
        psp[0].hInstance = GetFtpInst();\r
@@ -1569,7 +1631,7 @@ static int DispHostSetDlg(HWND hDlg)
        psp[4].lParam = 0;\r
        psp[4].pfnCallback = NULL;\r
 \r
-// SFTP\81AFTPES\81AFTPIS\91Î\89\9e\r
+       // SFTP、FTPES、FTPIS対応\r
        psp[5].dwSize = sizeof(PROPSHEETPAGE);\r
        psp[5].dwFlags = PSP_USETITLE | PSP_HASHELP;\r
        psp[5].hInstance = GetFtpInst();\r
@@ -1580,6 +1642,17 @@ static int DispHostSetDlg(HWND hDlg)
        psp[5].lParam = 0;\r
        psp[5].pfnCallback = NULL;\r
 \r
+       // 同時接続対応\r
+       psp[6].dwSize = sizeof(PROPSHEETPAGE);\r
+       psp[6].dwFlags = PSP_USETITLE | PSP_HASHELP;\r
+       psp[6].hInstance = GetFtpInst();\r
+       psp[6].pszTemplate = MAKEINTRESOURCE(hset_adv3_dlg);\r
+       psp[6].pszIcon = NULL;\r
+       psp[6].pfnDlgProc = Adv3SettingProc;\r
+       psp[6].pszTitle = MSGJPN320;\r
+       psp[6].lParam = 0;\r
+       psp[6].pfnCallback = NULL;\r
+\r
        psh.dwSize = sizeof(PROPSHEETHEADER);\r
        psh.dwFlags = PSH_HASHELP | PSH_NOAPPLYNOW | PSH_PROPSHEETPAGE;\r
        psh.hwndParent = hDlg;\r
@@ -1598,21 +1671,25 @@ static int DispHostSetDlg(HWND hDlg)
 }\r
 \r
 \r
-/*----- \8aî\96{\90Ý\92è\83E\83C\83\93\83h\83E\82Ì\83R\81[\83\8b\83o\83b\83N --------------------------------------\r
+/*----- 基本設定ウインドウのコールバック --------------------------------------\r
 *\r
 *      Parameter\r
-*              HWND hDlg : \83E\83C\83\93\83h\83E\83n\83\93\83h\83\8b\r
-*              UINT message : \83\81\83b\83Z\81[\83W\94Ô\8d\86\r
-*              WPARAM wParam : \83\81\83b\83Z\81[\83W\82Ì WPARAM \88ø\90\94\r
-*              LPARAM lParam : \83\81\83b\83Z\81[\83W\82Ì LPARAM \88ø\90\94\r
+*              HWND hDlg : ウインドウハンドル\r
+*              UINT message : メッセージ番号\r
+*              WPARAM wParam : メッセージの WPARAM 引数\r
+*              LPARAM lParam : メッセージの LPARAM 引数\r
 *\r
 *      Return Value\r
 *              BOOL TRUE/FALSE\r
 *----------------------------------------------------------------------------*/\r
 \r
-static BOOL CALLBACK MainSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
+// 64ビット対応\r
+//static BOOL CALLBACK MainSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
+static INT_PTR CALLBACK MainSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
 {\r
-       long wStyle;\r
+       // 64ビット対応\r
+//     long wStyle;\r
+       LONG_PTR wStyle;\r
        char Tmp[FMAX_PATH+1];\r
        NMHDR *pnmhdr;\r
 \r
@@ -1690,17 +1767,25 @@ static BOOL CALLBACK MainSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LP
                                        if(SendDlgItemMessage(hDlg, HSET_ANONYMOUS, BM_GETCHECK, 0, 0) == 1)\r
                                        {\r
                                                SendDlgItemMessage(hDlg, HSET_USER, WM_SETTEXT, 0, (LPARAM)"anonymous");\r
-                                               wStyle = GetWindowLong(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE);\r
+                                               // 64ビット対応\r
+//                                             wStyle = GetWindowLong(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE);\r
+                                               wStyle = GetWindowLongPtr(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE);\r
                                                wStyle &= ~ES_PASSWORD;\r
-                                               SetWindowLong(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE, wStyle);\r
+                                               // 64ビット対応\r
+//                                             SetWindowLong(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE, wStyle);\r
+                                               SetWindowLongPtr(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE, wStyle);\r
                                                SendDlgItemMessage(hDlg, HSET_PASS, WM_SETTEXT, 0, (LPARAM)UserMailAdrs);\r
                                        }\r
                                        else\r
                                        {\r
                                                SendDlgItemMessage(hDlg, HSET_USER, WM_SETTEXT, 0, (LPARAM)"");\r
-                                               wStyle = GetWindowLong(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE);\r
+                                               // 64ビット対応\r
+//                                             wStyle = GetWindowLong(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE);\r
+                                               wStyle = GetWindowLongPtr(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE);\r
                                                wStyle |= ES_PASSWORD;\r
-                                               SetWindowLong(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE, wStyle);\r
+                                               // 64ビット対応\r
+//                                             SetWindowLong(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE, wStyle);\r
+                                               SetWindowLongPtr(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE, wStyle);\r
                                                SendDlgItemMessage(hDlg, HSET_PASS, WM_SETTEXT, 0, (LPARAM)"");\r
                                        }\r
                                        break;\r
@@ -1711,19 +1796,21 @@ static BOOL CALLBACK MainSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LP
 }\r
 \r
 \r
-/*----- \8ag\92£\90Ý\92è\83E\83C\83\93\83h\83E\82Ì\83R\81[\83\8b\83o\83b\83N --------------------------------------\r
+/*----- 拡張設定ウインドウのコールバック --------------------------------------\r
 *\r
 *      Parameter\r
-*              HWND hDlg : \83E\83C\83\93\83h\83E\83n\83\93\83h\83\8b\r
-*              UINT message : \83\81\83b\83Z\81[\83W\94Ô\8d\86\r
-*              WPARAM wParam : \83\81\83b\83Z\81[\83W\82Ì WPARAM \88ø\90\94\r
-*              LPARAM lParam : \83\81\83b\83Z\81[\83W\82Ì LPARAM \88ø\90\94\r
+*              HWND hDlg : ウインドウハンドル\r
+*              UINT message : メッセージ番号\r
+*              WPARAM wParam : メッセージの WPARAM 引数\r
+*              LPARAM lParam : メッセージの LPARAM 引数\r
 *\r
 *      Return Value\r
 *              BOOL TRUE/FALSE\r
 *----------------------------------------------------------------------------*/\r
 \r
-static BOOL CALLBACK AdvSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
+// 64ビット対応\r
+//static BOOL CALLBACK AdvSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
+static INT_PTR CALLBACK AdvSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
 {\r
        NMHDR *pnmhdr;\r
        char Tmp[20];\r
@@ -1760,6 +1847,11 @@ static BOOL CALLBACK AdvSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPA
                        SendDlgItemMessage(hDlg, HSET_SECURITY, CB_SETCURSEL, TmpHost.Security, 0);\r
                        SendDlgItemMessage(hDlg, HSET_INITCMD, EM_LIMITTEXT, INITCMD_LEN, 0);\r
                        SendDlgItemMessage(hDlg, HSET_INITCMD, WM_SETTEXT, 0, (LPARAM)TmpHost.InitCmd);\r
+                       // IPv6対応\r
+                       SendDlgItemMessage(hDlg, HSET_NETTYPE, CB_ADDSTRING, 0, (LPARAM)MSGJPN332);\r
+                       SendDlgItemMessage(hDlg, HSET_NETTYPE, CB_ADDSTRING, 0, (LPARAM)MSGJPN333);\r
+                       SendDlgItemMessage(hDlg, HSET_NETTYPE, CB_ADDSTRING, 0, (LPARAM)MSGJPN334);\r
+                       SendDlgItemMessage(hDlg, HSET_NETTYPE, CB_SETCURSEL, TmpHost.NetType, 0);\r
                        return(TRUE);\r
 \r
                case WM_NOTIFY:\r
@@ -1776,6 +1868,8 @@ static BOOL CALLBACK AdvSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPA
                                        TmpHost.TimeZone = SendDlgItemMessage(hDlg, HSET_TIMEZONE, CB_GETCURSEL, 0, 0) - 12;\r
                                        TmpHost.Security = SendDlgItemMessage(hDlg, HSET_SECURITY, CB_GETCURSEL, 0, 0);\r
                                        SendDlgItemMessage(hDlg, HSET_INITCMD, WM_GETTEXT, INITCMD_LEN+1, (LPARAM)TmpHost.InitCmd);\r
+                                       // IPv6対応\r
+                                       TmpHost.NetType = SendDlgItemMessage(hDlg, HSET_NETTYPE, CB_GETCURSEL, 0, 0);\r
                                        Apply = YES;\r
                                        break;\r
 \r
@@ -1802,29 +1896,32 @@ static BOOL CALLBACK AdvSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPA
 }\r
 \r
 \r
-/*----- \95\8e\9a\83R\81[\83h\90Ý\92è\83E\83C\83\93\83h\83E\82Ì\83R\81[\83\8b\83o\83b\83N --------------------------------\r
+/*----- 文字コード設定ウインドウのコールバック --------------------------------\r
 *\r
 *      Parameter\r
-*              HWND hDlg : \83E\83C\83\93\83h\83E\83n\83\93\83h\83\8b\r
-*              UINT message : \83\81\83b\83Z\81[\83W\94Ô\8d\86\r
-*              WPARAM wParam : \83\81\83b\83Z\81[\83W\82Ì WPARAM \88ø\90\94\r
-*              LPARAM lParam : \83\81\83b\83Z\81[\83W\82Ì LPARAM \88ø\90\94\r
+*              HWND hDlg : ウインドウハンドル\r
+*              UINT message : メッセージ番号\r
+*              WPARAM wParam : メッセージの WPARAM 引数\r
+*              LPARAM lParam : メッセージの LPARAM 引数\r
 *\r
 *      Return Value\r
 *              BOOL TRUE/FALSE\r
 *----------------------------------------------------------------------------*/\r
 \r
-static BOOL CALLBACK CodeSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
+// 64ビット対応\r
+//static BOOL CALLBACK CodeSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
+static INT_PTR CALLBACK CodeSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
 {\r
        NMHDR *pnmhdr;\r
 \r
-       // UTF-8\91Î\89\9e\r
+       // UTF-8対応\r
        static const RADIOBUTTON KanjiButton[] = {\r
                { HSET_NO_CNV, KANJI_NOCNV },\r
                { HSET_SJIS_CNV, KANJI_SJIS },\r
                { HSET_JIS_CNV, KANJI_JIS },\r
                { HSET_EUC_CNV, KANJI_EUC },\r
-               { HSET_UTF8N_CNV, KANJI_UTF8N }\r
+               { HSET_UTF8N_CNV, KANJI_UTF8N },\r
+               { HSET_UTF8BOM_CNV, KANJI_UTF8BOM }\r
        };\r
        #define KANJIBUTTONS    (sizeof(KanjiButton)/sizeof(RADIOBUTTON))\r
 \r
@@ -1835,7 +1932,7 @@ static BOOL CALLBACK CodeSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LP
                { HSET_FN_EUC_CNV, KANJI_EUC },\r
                { HSET_FN_SMH_CNV, KANJI_SMB_HEX },\r
                { HSET_FN_SMC_CNV, KANJI_SMB_CAP },\r
-               { HSET_FN_UTF8N_CNV, KANJI_UTF8N }              // UTF-8N\91Î\89\9e\r
+               { HSET_FN_UTF8N_CNV, KANJI_UTF8N }              // UTF-8対応\r
        };\r
        #define NAMEKANJIBUTTONS        (sizeof(NameKanjiButton)/sizeof(RADIOBUTTON))\r
 \r
@@ -1872,18 +1969,19 @@ static BOOL CALLBACK CodeSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LP
                case WM_COMMAND :\r
                        switch(GET_WM_COMMAND_ID(wParam, lParam))\r
                        {\r
+                               case HSET_SJIS_CNV :\r
                                case HSET_JIS_CNV :\r
                                case HSET_EUC_CNV :\r
                                        EnableWindow(GetDlgItem(hDlg, HSET_HANCNV), TRUE);\r
                                        break;\r
 \r
-                               // UTF-8\91Î\89\9e\r
+                               // UTF-8対応\r
                                case HSET_NO_CNV :\r
                                case HSET_UTF8N_CNV :\r
+                               case HSET_UTF8BOM_CNV :\r
                                        EnableWindow(GetDlgItem(hDlg, HSET_HANCNV), FALSE);\r
                                        break;\r
 \r
-                               case HSET_SJIS_CNV :\r
                                case HSET_FN_JIS_CNV :\r
                                case HSET_FN_EUC_CNV :\r
                                        EnableWindow(GetDlgItem(hDlg, HSET_FN_HANCNV), TRUE);\r
@@ -1893,7 +1991,7 @@ static BOOL CALLBACK CodeSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LP
                                case HSET_FN_SJIS_CNV :\r
                                case HSET_FN_SMH_CNV :\r
                                case HSET_FN_SMC_CNV :\r
-                               case HSET_FN_UTF8N_CNV :        // UTF-8N\91Î\89\9e\r
+                               case HSET_FN_UTF8N_CNV :        // UTF-8対応\r
                                        EnableWindow(GetDlgItem(hDlg, HSET_FN_HANCNV), FALSE);\r
                                        break;\r
                        }\r
@@ -1903,19 +2001,21 @@ static BOOL CALLBACK CodeSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LP
 }\r
 \r
 \r
-/*----- \83_\83C\83A\83\8b\83A\83b\83v\90Ý\92è\83E\83C\83\93\83h\83E\82Ì\83R\81[\83\8b\83o\83b\83N ----------------------------\r
+/*----- ダイアルアップ設定ウインドウのコールバック ----------------------------\r
 *\r
 *      Parameter\r
-*              HWND hDlg : \83E\83C\83\93\83h\83E\83n\83\93\83h\83\8b\r
-*              UINT message : \83\81\83b\83Z\81[\83W\94Ô\8d\86\r
-*              WPARAM wParam : \83\81\83b\83Z\81[\83W\82Ì WPARAM \88ø\90\94\r
-*              LPARAM lParam : \83\81\83b\83Z\81[\83W\82Ì LPARAM \88ø\90\94\r
+*              HWND hDlg : ウインドウハンドル\r
+*              UINT message : メッセージ番号\r
+*              WPARAM wParam : メッセージの WPARAM 引数\r
+*              LPARAM lParam : メッセージの LPARAM 引数\r
 *\r
 *      Return Value\r
 *              BOOL TRUE/FALSE\r
 *----------------------------------------------------------------------------*/\r
 \r
-static BOOL CALLBACK DialupSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
+// 64ビット対応\r
+//static BOOL CALLBACK DialupSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
+static INT_PTR CALLBACK DialupSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
 {\r
        NMHDR *pnmhdr;\r
 \r
@@ -1975,7 +2075,7 @@ static BOOL CALLBACK DialupSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam,
                                                EnableWindow(GetDlgItem(hDlg, HSET_DIALENTRY), TRUE);\r
                                                EnableWindow(GetDlgItem(hDlg, HSET_DIALUSETHIS), TRUE);\r
                                        }\r
-                                       /* \82±\82±\82Ébreak\82Í\82È\82¢ */\r
+                                       /* ここにbreakはない */\r
 \r
                                case HSET_DIALUSETHIS :\r
                                        if(SendDlgItemMessage(hDlg, HSET_DIALUSETHIS, BM_GETCHECK, 0, 0) == 0)\r
@@ -1990,19 +2090,21 @@ static BOOL CALLBACK DialupSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam,
 }\r
 \r
 \r
-/*----- \8d\82\93x\90Ý\92è\83E\83C\83\93\83h\83E\82Ì\83R\81[\83\8b\83o\83b\83N --------------------------------------\r
+/*----- 高度設定ウインドウのコールバック --------------------------------------\r
 *\r
 *      Parameter\r
-*              HWND hDlg : \83E\83C\83\93\83h\83E\83n\83\93\83h\83\8b\r
-*              UINT message : \83\81\83b\83Z\81[\83W\94Ô\8d\86\r
-*              WPARAM wParam : \83\81\83b\83Z\81[\83W\82Ì WPARAM \88ø\90\94\r
-*              LPARAM lParam : \83\81\83b\83Z\81[\83W\82Ì LPARAM \88ø\90\94\r
+*              HWND hDlg : ウインドウハンドル\r
+*              UINT message : メッセージ番号\r
+*              WPARAM wParam : メッセージの WPARAM 引数\r
+*              LPARAM lParam : メッセージの LPARAM 引数\r
 *\r
 *      Return Value\r
 *              BOOL TRUE/FALSE\r
 *----------------------------------------------------------------------------*/\r
 \r
-static BOOL CALLBACK Adv2SettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
+// 64ビット対応\r
+//static BOOL CALLBACK Adv2SettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
+static INT_PTR CALLBACK Adv2SettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
 {\r
        NMHDR *pnmhdr;\r
        int Num;\r
@@ -2017,6 +2119,10 @@ static BOOL CALLBACK Adv2SettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LP
                        SendDlgItemMessage(hDlg, HSET_LISTCMD, BM_SETCHECK, TmpHost.ListCmdOnly, 0);\r
                        if(TmpHost.ListCmdOnly == YES)\r
                                EnableWindow(GetDlgItem(hDlg, HSET_NLST_R), FALSE);\r
+                       // MLSD対応\r
+                       else\r
+                               EnableWindow(GetDlgItem(hDlg, HSET_MLSDCMD), FALSE);\r
+                       SendDlgItemMessage(hDlg, HSET_MLSDCMD, BM_SETCHECK, TmpHost.UseMLSD, 0);\r
                        SendDlgItemMessage(hDlg, HSET_NLST_R, BM_SETCHECK, TmpHost.UseNLST_R, 0);\r
                        SendDlgItemMessage(hDlg, HSET_FULLPATH, BM_SETCHECK, TmpHost.NoFullPath, 0);\r
                        SendDlgItemMessage(hDlg, HSET_HOSTTYPE, CB_ADDSTRING, 0, (LPARAM)MSGJPN139);\r
@@ -2027,8 +2133,15 @@ static BOOL CALLBACK Adv2SettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LP
                        SendDlgItemMessage(hDlg, HSET_HOSTTYPE, CB_ADDSTRING, 0, (LPARAM)MSGJPN144);\r
                        SendDlgItemMessage(hDlg, HSET_HOSTTYPE, CB_ADDSTRING, 0, (LPARAM)MSGJPN289);\r
                        SendDlgItemMessage(hDlg, HSET_HOSTTYPE, CB_ADDSTRING, 0, (LPARAM)MSGJPN295);\r
+#if defined(HAVE_TANDEM)\r
+                       SendDlgItemMessage(hDlg, HSET_HOSTTYPE, CB_ADDSTRING, 0, (LPARAM)MSGJPN2000);\r
+#endif\r
                        SendDlgItemMessage(hDlg, HSET_HOSTTYPE, CB_SETCURSEL, TmpHost.HostType, 0);\r
+#if defined(HAVE_TANDEM)\r
+                       if(TmpHost.HostType == 2 || TmpHost.HostType == HTYPE_TANDEM)  /* VAX or Tandem */\r
+#else\r
                        if(TmpHost.HostType == 2)\r
+#endif\r
                        {\r
                                EnableWindow(GetDlgItem(hDlg, HSET_NLST_R), FALSE);\r
                                EnableWindow(GetDlgItem(hDlg, HSET_LISTCMD), FALSE);\r
@@ -2044,6 +2157,8 @@ static BOOL CALLBACK Adv2SettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LP
                                        SendDlgItemMessage(hDlg, HSET_CHMOD_CMD, WM_GETTEXT, CHMOD_CMD_LEN+1, (LPARAM)TmpHost.ChmodCmd);\r
                                        SendDlgItemMessage(hDlg, HSET_LS_FNAME, WM_GETTEXT, NLST_NAME_LEN+1, (LPARAM)TmpHost.LsName);\r
                                        TmpHost.ListCmdOnly = SendDlgItemMessage(hDlg, HSET_LISTCMD, BM_GETCHECK, 0, 0);\r
+                                       // MLSD対応\r
+                                       TmpHost.UseMLSD = SendDlgItemMessage(hDlg, HSET_MLSDCMD, BM_GETCHECK, 0, 0);\r
                                        TmpHost.UseNLST_R = SendDlgItemMessage(hDlg, HSET_NLST_R, BM_GETCHECK, 0, 0);\r
                                        TmpHost.NoFullPath = SendDlgItemMessage(hDlg, HSET_FULLPATH, BM_GETCHECK, 0, 0);\r
                                        TmpHost.HostType = SendDlgItemMessage(hDlg, HSET_HOSTTYPE, CB_GETCURSEL, 0, 0);\r
@@ -2072,9 +2187,19 @@ static BOOL CALLBACK Adv2SettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LP
 \r
                                case HSET_LISTCMD :\r
                                        if(SendDlgItemMessage(hDlg, HSET_LISTCMD, BM_GETCHECK, 0, 0) == 0)\r
+                                               // MLSD対応\r
+//                                             EnableWindow(GetDlgItem(hDlg, HSET_NLST_R), TRUE);\r
+                                       {\r
+                                               EnableWindow(GetDlgItem(hDlg, HSET_MLSDCMD), FALSE);\r
                                                EnableWindow(GetDlgItem(hDlg, HSET_NLST_R), TRUE);\r
+                                       }\r
                                        else\r
+                                               // MLSD対応\r
+//                                             EnableWindow(GetDlgItem(hDlg, HSET_NLST_R), FALSE);\r
+                                       {\r
+                                               EnableWindow(GetDlgItem(hDlg, HSET_MLSDCMD), TRUE);\r
                                                EnableWindow(GetDlgItem(hDlg, HSET_NLST_R), FALSE);\r
+                                       }\r
                                        break;\r
 \r
                                case HSET_HOSTTYPE :\r
@@ -2085,12 +2210,34 @@ static BOOL CALLBACK Adv2SettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LP
                                                EnableWindow(GetDlgItem(hDlg, HSET_LISTCMD), FALSE);\r
                                                EnableWindow(GetDlgItem(hDlg, HSET_FULLPATH), FALSE);\r
                                        }\r
+#if defined(HAVE_TANDEM)\r
+                                       else if(Num == HTYPE_TANDEM) /* Tandem */\r
+                                       {\r
+                                               /* Tandem を選択すると自動的に LIST にチェックをいれる */\r
+                                               SendDlgItemMessage(hDlg, HSET_LISTCMD, BM_SETCHECK, 1, 0);\r
+                                               EnableWindow(GetDlgItem(hDlg, HSET_NLST_R), FALSE);\r
+                                               EnableWindow(GetDlgItem(hDlg, HSET_LISTCMD), FALSE);\r
+                                               EnableWindow(GetDlgItem(hDlg, HSET_FULLPATH), FALSE);\r
+                                       }\r
+                                       else\r
+                                       {\r
+                                               if(SendDlgItemMessage(hDlg, HSET_LISTCMD, BM_GETCHECK, 0, 0) == 0) {\r
+                                                       EnableWindow(GetDlgItem(hDlg, HSET_NLST_R), TRUE);\r
+                                                       EnableWindow(GetDlgItem(hDlg, HSET_LISTCMD), TRUE);\r
+                                               } else {\r
+                                                       EnableWindow(GetDlgItem(hDlg, HSET_NLST_R), FALSE);\r
+                                                       EnableWindow(GetDlgItem(hDlg, HSET_LISTCMD), TRUE);\r
+                                               }\r
+                                               EnableWindow(GetDlgItem(hDlg, HSET_FULLPATH), TRUE);\r
+                                       }\r
+#else\r
                                        else\r
                                        {\r
                                                EnableWindow(GetDlgItem(hDlg, HSET_NLST_R), TRUE);\r
                                                EnableWindow(GetDlgItem(hDlg, HSET_LISTCMD), TRUE);\r
                                                EnableWindow(GetDlgItem(hDlg, HSET_FULLPATH), TRUE);\r
                                        }\r
+#endif\r
                                        break;\r
                        }\r
                        return(TRUE);\r
@@ -2099,20 +2246,20 @@ static BOOL CALLBACK Adv2SettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LP
 }\r
 \r
 \r
-// \88Ã\8d\86\89»\92Ê\90M\91Î\89\9e\r
-static BOOL CALLBACK CryptSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
+// 暗号化通信対応\r
+static INT_PTR CALLBACK CryptSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
 {\r
        NMHDR *pnmhdr;\r
-       int Num;\r
+//     int Num;\r
 \r
        switch (iMessage)\r
        {\r
                case WM_INITDIALOG :\r
+                       SendDlgItemMessage(hDlg, HSET_NO_ENCRYPTION, BM_SETCHECK, TmpHost.UseNoEncryption, 0);\r
                        if(IsOpenSSLLoaded())\r
                        {\r
                                SendDlgItemMessage(hDlg, HSET_FTPES, BM_SETCHECK, TmpHost.UseFTPES, 0);\r
                                SendDlgItemMessage(hDlg, HSET_FTPIS, BM_SETCHECK, TmpHost.UseFTPIS, 0);\r
-                               SendDlgItemMessage(hDlg, HSET_SFTP, BM_SETCHECK, TmpHost.UseSFTP, 0);\r
                        }\r
                        else\r
                        {\r
@@ -2120,15 +2267,19 @@ static BOOL CALLBACK CryptSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, L
                                EnableWindow(GetDlgItem(hDlg, HSET_FTPES), FALSE);\r
                                SendDlgItemMessage(hDlg, HSET_FTPIS, BM_SETCHECK, BST_UNCHECKED, 0);\r
                                EnableWindow(GetDlgItem(hDlg, HSET_FTPIS), FALSE);\r
+                       }\r
+                       if(IsPuTTYLoaded())\r
+                       {\r
+                               SendDlgItemMessage(hDlg, HSET_SFTP, BM_SETCHECK, TmpHost.UseSFTP, 0);\r
+                               SendDlgItemMessage(hDlg, HSET_PRIVATE_KEY, WM_SETTEXT, 0, (LPARAM)TmpHost.PrivateKey);\r
+                       }\r
+                       else\r
+                       {\r
                                SendDlgItemMessage(hDlg, HSET_SFTP, BM_SETCHECK, BST_UNCHECKED, 0);\r
                                EnableWindow(GetDlgItem(hDlg, HSET_SFTP), FALSE);\r
+                               EnableWindow(GetDlgItem(hDlg, PKEY_FILE_BR), FALSE);\r
+                               EnableWindow(GetDlgItem(hDlg, HSET_PRIVATE_KEY), FALSE);\r
                        }\r
-                       // TODO: FTPIS\91Î\89\9e\r
-                       SendDlgItemMessage(hDlg, HSET_FTPIS, BM_SETCHECK, BST_UNCHECKED, 0);\r
-                       EnableWindow(GetDlgItem(hDlg, HSET_FTPIS), FALSE);\r
-                       // TODO: SFTP\91Î\89\9e\r
-                       SendDlgItemMessage(hDlg, HSET_SFTP, BM_SETCHECK, BST_UNCHECKED, 0);\r
-                       EnableWindow(GetDlgItem(hDlg, HSET_SFTP), FALSE);\r
                        return(TRUE);\r
 \r
                case WM_NOTIFY:\r
@@ -2136,13 +2287,16 @@ static BOOL CALLBACK CryptSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, L
                        switch(pnmhdr->code)\r
                        {\r
                                case PSN_APPLY :\r
+                                       TmpHost.UseNoEncryption = SendDlgItemMessage(hDlg, HSET_NO_ENCRYPTION, BM_GETCHECK, 0, 0);\r
                                        if(IsOpenSSLLoaded())\r
                                        {\r
                                                TmpHost.UseFTPES = SendDlgItemMessage(hDlg, HSET_FTPES, BM_GETCHECK, 0, 0);\r
-                                               // TODO: FTPIS\91Î\89\9e\r
-//                                             TmpHost.UseFTPIS = SendDlgItemMessage(hDlg, HSET_FTPIS, BM_GETCHECK, 0, 0);\r
-                                               // TODO: SFTP\91Î\89\9e\r
-//                                             TmpHost.UseSFTP = SendDlgItemMessage(hDlg, HSET_SFTP, BM_GETCHECK, 0, 0);\r
+                                               TmpHost.UseFTPIS = SendDlgItemMessage(hDlg, HSET_FTPIS, BM_GETCHECK, 0, 0);\r
+                                       }\r
+                                       if(IsPuTTYLoaded())\r
+                                       {\r
+                                               TmpHost.UseSFTP = SendDlgItemMessage(hDlg, HSET_SFTP, BM_GETCHECK, 0, 0);\r
+                                               SendDlgItemMessage(hDlg, HSET_PRIVATE_KEY, WM_GETTEXT, PRIVATE_KEY_LEN+1, (LPARAM)TmpHost.PrivateKey);\r
                                        }\r
                                        Apply = YES;\r
                                        break;\r
@@ -2159,4 +2313,110 @@ static BOOL CALLBACK CryptSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, L
        return(FALSE);\r
 }\r
 \r
+// 同時接続対応\r
+static INT_PTR CALLBACK Adv3SettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
+{\r
+       NMHDR *pnmhdr;\r
+//     int Num;\r
+\r
+       // UTF-8対応\r
+       static const RADIOBUTTON KanjiButton[] = {\r
+               { HSET_NO_CNV, KANJI_NOCNV },\r
+               { HSET_SJIS_CNV, KANJI_SJIS },\r
+               { HSET_JIS_CNV, KANJI_JIS },\r
+               { HSET_EUC_CNV, KANJI_EUC },\r
+               { HSET_UTF8N_CNV, KANJI_UTF8N },\r
+               { HSET_UTF8BOM_CNV, KANJI_UTF8BOM }\r
+       };\r
+       #define KANJIBUTTONS    (sizeof(KanjiButton)/sizeof(RADIOBUTTON))\r
+\r
+       switch (iMessage)\r
+       {\r
+               case WM_INITDIALOG :\r
+                       SendDlgItemMessage(hDlg, HSET_THREAD_COUNT, EM_LIMITTEXT, (WPARAM)1, 0);\r
+                       SetDecimalText(hDlg, HSET_THREAD_COUNT, TmpHost.MaxThreadCount);\r
+                       SendDlgItemMessage(hDlg, HSET_THREAD_COUNT_SPN, UDM_SETRANGE, 0, (LPARAM)MAKELONG(MAX_DATA_CONNECTION, 1));\r
+                       SendDlgItemMessage(hDlg, HSET_REUSE_SOCKET, BM_SETCHECK, TmpHost.ReuseCmdSkt, 0);\r
+                       SendDlgItemMessage(hDlg, HSET_NOOP_INTERVAL, EM_LIMITTEXT, (WPARAM)3, 0);\r
+                       SetDecimalText(hDlg, HSET_NOOP_INTERVAL, TmpHost.NoopInterval);\r
+                       SendDlgItemMessage(hDlg, HSET_NOOP_INTERVAL_SPN, UDM_SETRANGE, 0, (LPARAM)MAKELONG(300, 0));\r
+                       SendDlgItemMessage(hDlg, HSET_ERROR_MODE, CB_ADDSTRING, 0, (LPARAM)MSGJPN335);\r
+                       SendDlgItemMessage(hDlg, HSET_ERROR_MODE, CB_ADDSTRING, 0, (LPARAM)MSGJPN336);\r
+                       SendDlgItemMessage(hDlg, HSET_ERROR_MODE, CB_ADDSTRING, 0, (LPARAM)MSGJPN337);\r
+                       SendDlgItemMessage(hDlg, HSET_ERROR_MODE, CB_ADDSTRING, 0, (LPARAM)MSGJPN338);\r
+                       if(TmpHost.TransferErrorNotify == YES)\r
+                               SendDlgItemMessage(hDlg, HSET_ERROR_MODE, CB_SETCURSEL, 0, 0);\r
+                       else if(TmpHost.TransferErrorMode == EXIST_OVW)\r
+                               SendDlgItemMessage(hDlg, HSET_ERROR_MODE, CB_SETCURSEL, 1, 0);\r
+                       else if(TmpHost.TransferErrorMode == EXIST_RESUME)\r
+                               SendDlgItemMessage(hDlg, HSET_ERROR_MODE, CB_SETCURSEL, 2, 0);\r
+                       else if(TmpHost.TransferErrorMode == EXIST_IGNORE)\r
+                               SendDlgItemMessage(hDlg, HSET_ERROR_MODE, CB_SETCURSEL, 3, 0);\r
+                       else\r
+                               SendDlgItemMessage(hDlg, HSET_ERROR_MODE, CB_SETCURSEL, 0, 0);\r
+                       return(TRUE);\r
+\r
+               case WM_NOTIFY:\r
+                       pnmhdr = (NMHDR FAR *)lParam;\r
+                       switch(pnmhdr->code)\r
+                       {\r
+                               case PSN_APPLY :\r
+                                       TmpHost.MaxThreadCount = GetDecimalText(hDlg, HSET_THREAD_COUNT);\r
+                                       CheckRange2(&TmpHost.MaxThreadCount, MAX_DATA_CONNECTION, 1);\r
+                                       TmpHost.ReuseCmdSkt = SendDlgItemMessage(hDlg, HSET_REUSE_SOCKET, BM_GETCHECK, 0, 0);\r
+                                       TmpHost.NoopInterval = GetDecimalText(hDlg, HSET_NOOP_INTERVAL);\r
+                                       CheckRange2(&TmpHost.NoopInterval, 300, 0);\r
+                                       switch(SendDlgItemMessage(hDlg, HSET_ERROR_MODE, CB_GETCURSEL, 0, 0))\r
+                                       {\r
+                                       case 0:\r
+                                               TmpHost.TransferErrorMode = EXIST_OVW;\r
+                                               TmpHost.TransferErrorNotify = YES;\r
+                                               break;\r
+                                       case 1:\r
+                                               TmpHost.TransferErrorMode = EXIST_OVW;\r
+                                               TmpHost.TransferErrorNotify = NO;\r
+                                               break;\r
+                                       case 2:\r
+                                               TmpHost.TransferErrorMode = EXIST_RESUME;\r
+                                               TmpHost.TransferErrorNotify = NO;\r
+                                               break;\r
+                                       case 3:\r
+                                               TmpHost.TransferErrorMode = EXIST_IGNORE;\r
+                                               TmpHost.TransferErrorNotify = NO;\r
+                                               break;\r
+                                       }\r
+                                       Apply = YES;\r
+                                       break;\r
+\r
+                               case PSN_RESET :\r
+                                       break;\r
+\r
+                               case PSN_HELP :\r
+                                       hHelpWin = HtmlHelp(NULL, AskHelpFilePath(), HH_HELP_CONTEXT, IDH_HELP_TOPIC_0000066);\r
+                                       break;\r
+                       }\r
+                       break;\r
+       }\r
+       return(FALSE);\r
+}\r
+\r
+// 暗号化通信対応\r
+// ホストの暗号化設定を更新\r
+int SetHostExcryption(int Num, int UseNoEncryption, int UseFTPES, int UseFTPIS, int UseSFTP)\r
+{\r
+       int Sts;\r
+       HOSTLISTDATA *Pos;\r
+\r
+       Sts = FFFTP_FAIL;\r
+       if((Num >= 0) && (Num < Hosts))\r
+       {\r
+               Pos = GetNodeByNum(Num);\r
+               Pos->Set.UseNoEncryption = UseNoEncryption;\r
+               Pos->Set.UseFTPES = UseFTPES;\r
+               Pos->Set.UseFTPIS = UseFTPIS;\r
+               Pos->Set.UseSFTP = UseSFTP;\r
+               Sts = FFFTP_SUCCESS;\r
+       }\r
+       return(Sts);\r
+}\r
 \r