//#define _WIN32_WINNT 0x400\r
\r
#define STRICT\r
+// IPv6対応\r
+#include <winsock2.h>\r
#include <windows.h>\r
#include <stdio.h>\r
#include <stdlib.h>\r
static void EraseDispFileList(FLISTANCHOR *Anchor);\r
static void DispFileList2View(HWND hWnd, FLISTANCHOR *Anchor);\r
static void AddListView(HWND hWnd, int Pos, char *Name, int Type, LONGLONG Size, FILETIME *Time, int Attr, char *Owner, int Link, int InfoExist);\r
-static BOOL CALLBACK SelectDialogCallBack(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
+// 64ビット対応\r
+//static BOOL CALLBACK SelectDialogCallBack(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
+static INT_PTR CALLBACK SelectDialogCallBack(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
static void DispListList(FILELIST *Pos, char *Title);\r
static void MakeRemoteTree1(char *Path, char *Cur, FILELIST **Base, int *CancelCheckWork);\r
static void MakeRemoteTree2(char *Path, char *Cur, FILELIST **Base, int *CancelCheckWork);\r
static int GetVMSdate(char *Str, WORD *Year, WORD *Month, WORD *Day);\r
static int CheckSpecialDirName(char *Fname);\r
static int AskFilterStr(char *Fname, int Type);\r
-static BOOL CALLBACK FilterWndProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
+// 64ビット対応\r
+//static BOOL CALLBACK FilterWndProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
+static INT_PTR CALLBACK FilterWndProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);\r
static int atoi_n(const char *Str, int Len);\r
\r
/*===== 外部参照 =====*/\r
\r
if(hWndListLocal != NULL)\r
{\r
- LocalProcPtr = (WNDPROC)SetWindowLong(hWndListLocal, GWL_WNDPROC, (LONG)LocalWndProc);\r
+ // 64ビット対応\r
+// LocalProcPtr = (WNDPROC)SetWindowLong(hWndListLocal, GWL_WNDPROC, (LONG)LocalWndProc);\r
+ LocalProcPtr = (WNDPROC)SetWindowLongPtr(hWndListLocal, GWLP_WNDPROC, (LONG_PTR)LocalWndProc);\r
\r
Tmp = SendMessage(hWndListLocal, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);\r
Tmp |= LVS_EX_FULLROWSELECT;\r
\r
if(hWndListRemote != NULL)\r
{\r
- RemoteProcPtr = (WNDPROC)SetWindowLong(hWndListRemote, GWL_WNDPROC, (LONG)RemoteWndProc);\r
+ // 64ビット対応\r
+// RemoteProcPtr = (WNDPROC)SetWindowLong(hWndListRemote, GWL_WNDPROC, (LONG)RemoteWndProc);\r
+ RemoteProcPtr = (WNDPROC)SetWindowLongPtr(hWndListRemote, GWLP_WNDPROC, (LONG_PTR)RemoteWndProc);\r
\r
Tmp = SendMessage(hWndListRemote, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);\r
Tmp |= LVS_EX_FULLROWSELECT;\r
int CancelFlg = NO;\r
char LocDir[FMAX_PATH+1];\r
char TmpDir[FMAX_PATH+1];\r
- char buf[32];\r
+ // 環境依存の不具合対策\r
+// char buf[32];\r
int i;\r
- DWORD pid;\r
+ // 環境依存の不具合対策\r
+// DWORD pid;\r
\r
// すでにリモートから転送済みなら何もしない。(2007.9.3 yutaka)\r
if (remoteFileListBase != NULL)\r
\r
// アプリを多重起動してもコンフリクトしないように、テンポラリフォルダ名にプロセスID\r
// を付加する。(2007.9.13 yutaka)\r
- GetTempPath(sizeof(TmpDir), TmpDir);\r
- pid = GetCurrentProcessId();\r
- _snprintf_s(buf, sizeof(buf), _TRUNCATE, "ffftp%d", pid);\r
- strncat_s(TmpDir, sizeof(TmpDir), buf, _TRUNCATE);\r
+ // 環境依存の不具合対策\r
+// GetTempPath(sizeof(TmpDir), TmpDir);\r
+// pid = GetCurrentProcessId();\r
+// _snprintf_s(buf, sizeof(buf), _TRUNCATE, "ffftp%d", pid);\r
+// strncat_s(TmpDir, sizeof(TmpDir), buf, _TRUNCATE);\r
+ GetAppTempPath(TmpDir);\r
+ _mkdir(TmpDir);\r
+ SetYenTail(TmpDir);\r
+ strcat(TmpDir, "file");\r
_mkdir(TmpDir);\r
#if 0\r
if (TmpDir[strlen(TmpDir) - 1] == '\\') {\r
\r
void SetListViewType(void)\r
{\r
- long lStyle;\r
+ // 64ビット対応\r
+// long lStyle;\r
+ LONG_PTR lStyle;\r
\r
switch(ListType)\r
{\r
case LVS_LIST :\r
- lStyle = GetWindowLong(GetLocalHwnd(), GWL_STYLE);\r
+ // 64ビット対応\r
+// lStyle = GetWindowLong(GetLocalHwnd(), GWL_STYLE);\r
+ lStyle = GetWindowLongPtr(GetLocalHwnd(), GWL_STYLE);\r
lStyle &= ~(LVS_REPORT | LVS_LIST);\r
lStyle |= LVS_LIST;\r
- SetWindowLong(GetLocalHwnd(), GWL_STYLE, lStyle);\r
+ // 64ビット対応\r
+// SetWindowLong(GetLocalHwnd(), GWL_STYLE, lStyle);\r
+ SetWindowLongPtr(GetLocalHwnd(), GWL_STYLE, lStyle);\r
\r
- lStyle = GetWindowLong(GetRemoteHwnd(), GWL_STYLE);\r
+ // 64ビット対応\r
+// lStyle = GetWindowLong(GetRemoteHwnd(), GWL_STYLE);\r
+ lStyle = GetWindowLongPtr(GetRemoteHwnd(), GWL_STYLE);\r
lStyle &= ~(LVS_REPORT | LVS_LIST);\r
lStyle |= LVS_LIST;\r
- SetWindowLong(GetRemoteHwnd(), GWL_STYLE, lStyle);\r
+ // 64ビット対応\r
+// SetWindowLong(GetRemoteHwnd(), GWL_STYLE, lStyle);\r
+ SetWindowLongPtr(GetRemoteHwnd(), GWL_STYLE, lStyle);\r
break;\r
\r
default :\r
- lStyle = GetWindowLong(GetLocalHwnd(), GWL_STYLE);\r
+ // 64ビット対応\r
+// lStyle = GetWindowLong(GetLocalHwnd(), GWL_STYLE);\r
+ lStyle = GetWindowLongPtr(GetLocalHwnd(), GWL_STYLE);\r
lStyle &= ~(LVS_REPORT | LVS_LIST);\r
lStyle |= LVS_REPORT;\r
- SetWindowLong(GetLocalHwnd(), GWL_STYLE, lStyle);\r
+ // 64ビット対応\r
+// SetWindowLong(GetLocalHwnd(), GWL_STYLE, lStyle);\r
+ SetWindowLongPtr(GetLocalHwnd(), GWL_STYLE, lStyle);\r
\r
- lStyle = GetWindowLong(GetRemoteHwnd(), GWL_STYLE);\r
+ // 64ビット対応\r
+// lStyle = GetWindowLong(GetRemoteHwnd(), GWL_STYLE);\r
+ lStyle = GetWindowLongPtr(GetRemoteHwnd(), GWL_STYLE);\r
lStyle &= ~(LVS_REPORT | LVS_LIST);\r
lStyle |= LVS_REPORT;\r
- SetWindowLong(GetRemoteHwnd(), GWL_STYLE, lStyle);\r
+ // 64ビット対応\r
+// SetWindowLong(GetRemoteHwnd(), GWL_STYLE, lStyle);\r
+ SetWindowLongPtr(GetRemoteHwnd(), GWL_STYLE, lStyle);\r
break;\r
}\r
return;\r
* BOOL TRUE/FALSE\r
*----------------------------------------------------------------------------*/\r
\r
-static BOOL CALLBACK SelectDialogCallBack(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
+// 64ビット対応\r
+//static BOOL CALLBACK SelectDialogCallBack(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
+static INT_PTR CALLBACK SelectDialogCallBack(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
{\r
switch (iMessage)\r
{\r
}\r
}\r
\r
+ // linux-ftpd\r
+ if((Ret == LIST_UNKNOWN) &&\r
+ (FindField(Str, Tmp, 7+Add1, NO) == FFFTP_SUCCESS))\r
+ {\r
+ if((FindField(Str, Tmp, 5, NO) == FFFTP_SUCCESS) &&\r
+ (CheckYYYYMMDDformat(Tmp, NUL) != 0))\r
+ {\r
+ if((FindField(Str, Tmp, 6, NO) == FFFTP_SUCCESS) &&\r
+ (CheckHHMMformat(Tmp) == YES))\r
+ {\r
+ Ret = LIST_UNIX_16;\r
+ }\r
+ }\r
+ }\r
+\r
if((Ret != LIST_UNKNOWN) && (Flag1 == YES))\r
Ret |= LIST_MELCOM;\r
}\r
case LIST_UNIX_75 :\r
// MELCOMはビットフラグになっている\r
// case LIST_MELCOM :\r
+ // linux-ftpd\r
+ case LIST_UNIX_16 :\r
default:\r
/* offsはサイズの位置, offs=0はカラム4 */\r
offs = 0;\r
\r
/* offs2は時間(もしくは年)の位置 */\r
offs2 = 0;\r
+ // linux-ftpd\r
+// if((ListType == LIST_UNIX_11) ||\r
+// (ListType == LIST_UNIX_13) ||\r
+// (ListType == LIST_UNIX_21) ||\r
+// (ListType == LIST_UNIX_23) ||\r
+// (ListType == LIST_UNIX_51) ||\r
+// (ListType == LIST_UNIX_61) ||\r
+// (ListType == LIST_UNIX_63) ||\r
+// (ListType == LIST_UNIX_71) ||\r
+// (ListType == LIST_UNIX_73))\r
if((ListType == LIST_UNIX_11) ||\r
(ListType == LIST_UNIX_13) ||\r
(ListType == LIST_UNIX_21) ||\r
(ListType == LIST_UNIX_61) ||\r
(ListType == LIST_UNIX_63) ||\r
(ListType == LIST_UNIX_71) ||\r
- (ListType == LIST_UNIX_73))\r
+ (ListType == LIST_UNIX_73) ||\r
+ (ListType == LIST_UNIX_16))\r
offs2 = -1;\r
\r
/* offs3はオーナ名の位置 */\r
if(GetHourAndMinute(Buf, &sTime.wHour, &sTime.wMinute) == FFFTP_SUCCESS)\r
*InfoExist |= FINFO_TIME;\r
}\r
+ // linux-ftpd\r
+ else if(CheckYYYYMMDDformat(Buf, NUL) != 0)\r
+ {\r
+ sTime.wYear = atoi(Buf);\r
+ sTime.wMonth = atoi(Buf+5);\r
+ sTime.wDay = atoi(Buf+8);\r
+ FindField(Str, Buf, 7+offs+offs2, NO);\r
+ sTime.wHour = atoi_n(Buf, 2);\r
+ sTime.wMinute = atoi(Buf+2);\r
+ }\r
else\r
{\r
GetMonth(Buf, &sTime.wMonth, &sTime.wDay);\r
sTime.wHour = atoi_n(Value + 8, 2);\r
sTime.wMinute = atoi_n(Value + 10, 2);\r
sTime.wSecond = atoi_n(Value + 12, 2);\r
+ sTime.wMilliseconds = 0;\r
SystemTimeToFileTime(&sTime, Time);\r
// SpecificLocalFileTime2FileTime(Time, AskHostTimeZone());\r
*InfoExist |= FINFO_DATE | FINFO_TIME;\r
* BOOL TRUE/FALSE\r
*----------------------------------------------------------------------------*/\r
\r
-static BOOL CALLBACK FilterWndProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
+// 64ビット対応\r
+//static BOOL CALLBACK FilterWndProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
+static INT_PTR CALLBACK FilterWndProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)\r
{\r
switch (iMessage)\r
{\r