• R/O
  • HTTP
  • SSH
  • HTTPS

ffftp: Commit

FFFTPのソースコードです。


Commit MetaInfo

Revision655d3abe20bfad379664c01be9980509564708f3 (tree)
Time2017-03-25 12:08:45
Authors_kawamoto <s_kawamoto@user...>
Commiters_kawamoto

Log Message

Fix bugs of automatic software update.
Fix bugs of timestamp comparison.
Replace 4 whitespaces at beginning of lines with a tab.

Change Summary

Incremental Difference

Binary files a/FFFTP_Eng_Release/FFFTP.exe and b/FFFTP_Eng_Release/FFFTP.exe differ
Binary files a/FFFTP_Eng_Release_64/FFFTP.exe and b/FFFTP_Eng_Release_64/FFFTP.exe differ
Binary files a/Release/FFFTP.exe and b/Release/FFFTP.exe differ
Binary files a/Release_64/FFFTP.exe and b/Release_64/FFFTP.exe differ
--- a/Resource/FFFTP.rc
+++ b/Resource/FFFTP.rc
@@ -242,7 +242,7 @@ FONT 9, "MS Shell Dlg", 0, 0, 0x0
242242 BEGIN
243243 DEFPUSHBUTTON "OK",IDOK,133,294,50,14
244244 ICON ffftp,-1,7,4,20,20
245- CTEXT "FFFTP Ver 1.99a-20170320",-1,113,11,90,8
245+ CTEXT "FFFTP Ver 1.99a-20170325",-1,113,11,90,8
246246 CTEXT "FFFTPはfreewareです",-1,7,279,305,8
247247 CTEXT "Copyright(C) 1997-2010 Sota & ご協力いただいた方々\nCopyright (C) 2011-2017 FFFTP Project (Hiromichi Matsushima, Suguru Kawamoto, IWAMOTO Kouichi, vitamin0x, うなー, Asami, fortran90, tomo1192, Yuji Tanaka, Moriguchi Hirokazu, ふうせん)",-1,7,25,305,44,SS_NOPREFIX
248248 CTEXT "",ABOUT_JRE,7,96,305,8
@@ -2213,8 +2213,8 @@ nodrop_csr CURSOR "nodrop_c.cur"
22132213 //
22142214
22152215 VS_VERSION_INFO VERSIONINFO
2216- FILEVERSION 1,99,1,12
2217- PRODUCTVERSION 1,99,1,12
2216+ FILEVERSION 1,99,1,13
2217+ PRODUCTVERSION 1,99,1,13
22182218 FILEFLAGSMASK 0x3fL
22192219 #ifdef _DEBUG
22202220 FILEFLAGS 0x1L
@@ -2232,12 +2232,12 @@ BEGIN
22322232 VALUE "Comments", "これはフリーソフトウエアです。"
22332233 VALUE "CompanyName", "Sota, FFFTP Project"
22342234 VALUE "FileDescription", "FFFTP"
2235- VALUE "FileVersion", "1, 99, 1, 12"
2235+ VALUE "FileVersion", "1, 99, 1, 13"
22362236 VALUE "InternalName", "FFFTP"
22372237 VALUE "LegalCopyright", "Copyright (C) 1997-2010 Sota & ご協力いただいた方々\nCopyright (C) 2011-2017 FFFTP Project (Hiromichi Matsushima, Suguru Kawamoto, IWAMOTO Kouichi, vitamin0x, うなー, Asami, fortran90, tomo1192, Yuji Tanaka, Moriguchi Hirokazu, ふうせん)."
22382238 VALUE "OriginalFilename", "FFFTP.exe"
22392239 VALUE "ProductName", "FFFTP"
2240- VALUE "ProductVersion", "1, 99, 1, 12"
2240+ VALUE "ProductVersion", "1, 99, 1, 13"
22412241 END
22422242 END
22432243 BLOCK "VarFileInfo"
--- a/Resource_eng/ffftp.rc
+++ b/Resource_eng/ffftp.rc
@@ -242,7 +242,7 @@ FONT 9, "MS Shell Dlg", 0, 0, 0x0
242242 BEGIN
243243 DEFPUSHBUTTON "OK",IDOK,132,296,50,14
244244 ICON ffftp,-1,7,4,20,20
245- CTEXT "FFFTP Ver 1.99a-20170320",-1,110,11,90,8
245+ CTEXT "FFFTP Ver 1.99a-20170325",-1,110,11,90,8
246246 CTEXT "FFFTP is freeware",-1,7,281,301,8
247247 CTEXT "Copyright(C) 1997-2010 Sota && cooperators\nCopyright (C) 2011-2017 FFFTP Project (Hiromichi Matsushima, Suguru Kawamoto, IWAMOTO Kouichi, vitamin0x, unarist, Asami, fortran90, tomo1192, Yuji Tanaka, Moriguchi Hirokazu, Fu-sen)",-1,7,25,301,44
248248 CTEXT "",ABOUT_JRE,7,93,301,8
@@ -2253,8 +2253,8 @@ nodrop_csr CURSOR "nodrop_c.cur"
22532253 //
22542254
22552255 VS_VERSION_INFO VERSIONINFO
2256- FILEVERSION 1,99,1,12
2257- PRODUCTVERSION 1,99,1,12
2256+ FILEVERSION 1,99,1,13
2257+ PRODUCTVERSION 1,99,1,13
22582258 FILEFLAGSMASK 0x3fL
22592259 #ifdef _DEBUG
22602260 FILEFLAGS 0x1L
@@ -2272,12 +2272,12 @@ BEGIN
22722272 VALUE "Comments", "This software is Free Software"
22732273 VALUE "CompanyName", "Sota, FFFTP Project"
22742274 VALUE "FileDescription", "FFFTP"
2275- VALUE "FileVersion", "1, 99, 1, 12"
2275+ VALUE "FileVersion", "1, 99, 1, 13"
22762276 VALUE "InternalName", "FFFTP"
22772277 VALUE "LegalCopyright", "Copyright (C) 1997-2010 Sota & cooperators\nCopyright (C) 2011-2017 FFFTP Project (Hiromichi Matsushima, Suguru Kawamoto, IWAMOTO Kouichi, vitamin0x, unarist, Asami, fortran90, tomo1192, Yuji Tanaka, Moriguchi Hirokazu, Fu-sen)."
22782278 VALUE "OriginalFilename", "FFFTP.exe"
22792279 VALUE "ProductName", "FFFTP"
2280- VALUE "ProductVersion", "1, 99, 1, 12"
2280+ VALUE "ProductVersion", "1, 99, 1, 13"
22812281 END
22822282 END
22832283 BLOCK "VarFileInfo"
--- a/bookmark.c
+++ b/bookmark.c
@@ -420,7 +420,7 @@ static INT_PTR CALLBACK EditBookMarkProc(HWND hDlg, UINT message, WPARAM wParam,
420420 GetWindowRect(hDlg, &Rect);
421421 DlgSizeChange(hDlg, &DlgSize, &Rect, 0);
422422 RedrawWindow(hDlg, NULL, NULL, RDW_INVALIDATE | RDW_ERASE | RDW_ALLCHILDREN);
423- break;
423+ break;
424424
425425 case WM_INITDIALOG :
426426 if(ListFont != NULL)
@@ -438,7 +438,7 @@ static INT_PTR CALLBACK EditBookMarkProc(HWND hDlg, UINT message, WPARAM wParam,
438438 SendDlgItemMessage(hDlg, BMARK_LIST, LB_ADDSTRING, 0, (LPARAM)Tmp);
439439 }
440440 DlgSizeInit(hDlg, &DlgSize, &BmarkDlgSize);
441- return(TRUE);
441+ return(TRUE);
442442
443443 case WM_COMMAND :
444444 switch(GET_WM_COMMAND_ID(wParam, lParam))
@@ -529,10 +529,10 @@ static INT_PTR CALLBACK EditBookMarkProc(HWND hDlg, UINT message, WPARAM wParam,
529529
530530 case WM_SIZING :
531531 DlgSizeChange(hDlg, &DlgSize, (RECT *)lParam, (int)wParam);
532- return(TRUE);
532+ return(TRUE);
533533
534534 }
535- return(FALSE);
535+ return(FALSE);
536536 }
537537
538538
@@ -625,7 +625,7 @@ static INT_PTR CALLBACK BookMarkEditCallBack(HWND hDlg, UINT iMessage, WPARAM wP
625625 EndDialog(hDlg, NO);
626626 break;
627627 }
628- return(TRUE);
628+ return(TRUE);
629629 }
630630 return(FALSE);
631631 }
--- a/codecnv.c
+++ b/codecnv.c
@@ -1143,7 +1143,7 @@ int ConvSJIStoSMB_HEX(CODECONVINFO *cInfo)
11431143
11441144 if((cInfo->StrLen >= 2) &&
11451145 ((((uchar)*Str >= (uchar)0x81) && ((uchar)*Str <= (uchar)0x9F)) ||
1146- ((uchar)*Str >= (uchar)0xE0)))
1146+ ((uchar)*Str >= (uchar)0xE0)))
11471147 {
11481148 sprintf(Put, "%c%02x%c%02x", SAMBA_HEX_TAG, (uchar)*Str, SAMBA_HEX_TAG, (uchar)*(Str+1));
11491149 Str += 2;
--- a/common.h
+++ b/common.h
@@ -72,16 +72,16 @@
7272 //#define PROGRAM_VERSION_NUM 1972 /* バージョン */
7373 // 64ビット対応
7474 #ifdef _WIN64
75-#define VER_STR "1.99a-20170320 64bit"
75+#define VER_STR "1.99a-20170325 64bit"
7676 #else
77-#define VER_STR "1.99a-20170320"
77+#define VER_STR "1.99a-20170325"
7878 #endif
7979 #define VER_NUM 1990 /* 設定バージョン */
8080 #define PROGRAM_VERSION_NUM 1990 /* バージョン */
8181 // ソフトウェア自動更新
8282 // リリースバージョンはリリース予定年(10進数4桁)+月(2桁)+日(2桁)+通し番号(0スタート2桁)とする
8383 // 2014年7月31日中の30個目のリリースは2014073129
84-#define RELEASE_VERSION_NUM 2017032000 /* リリースバージョン */
84+#define RELEASE_VERSION_NUM 2017032500 /* リリースバージョン */
8585
8686
8787 // SourceForge.JPによるフォーク
@@ -448,8 +448,8 @@
448448
449449 0 1 2 3 4 5
450450 -------------------------------------------------------
451- -rwxrwxrwx SEQ 36203776 01/07/07 12:38:28 ADRS001
452- -rwxrwxrwx SEQ 70172160 01/07/07 13:59:58 ADRS002
451+ -rwxrwxrwx SEQ 36203776 01/07/07 12:38:28 ADRS001
452+ -rwxrwxrwx SEQ 70172160 01/07/07 13:59:58 ADRS002
453453
454454 *LIST_UNIX_54
455455 0 1 2 3 4 5 6
@@ -585,14 +585,14 @@ LIST_UNIX_70
585585 *LIST_DOS_4
586586 0 1 2 3
587587 -------------------------------------------------------
588- 1998/07/30 15:39:02 <DIR> Linux
589- 1998/07/30 15:42:19 11623 test.txt
588+ 1998/07/30 15:39:02 <DIR> Linux
589+ 1998/07/30 15:42:19 11623 test.txt
590590
591591 *LIST_ACOS
592592 0
593593 -------------------------------------------------------
594594 test.txt
595-  ディレクトリなし、
595+ ディレクトリなし、
596596
597597 *LIST_AS400
598598 0 1 2 3 4 5
@@ -614,8 +614,8 @@ LIST_UNIX_70
614614 *LIST_CHAMELEON
615615 0 1 2 3 4 5 6
616616 -------------------------------------------------------
617- Linux <DIR> Nov 6 1997 14:21 drw-
618- test.txt 12 Nov 6 1886 14:21 -rwa
617+ Linux <DIR> Nov 6 1997 14:21 drw-
618+ test.txt 12 Nov 6 1886 14:21 -rwa
619619
620620 *LIST_GP6000
621621 0 1 2 3 4 5 6
@@ -626,16 +626,16 @@ LIST_UNIX_70
626626 *LIST_OS2
627627 0 1 2 3 4
628628 -------------------------------------------------------
629- 345 A 12-02-98 10:59 VirtualDevice.java
630- 0 DIR 12-09-98 09:43 ディレクトリ
631- 0 DIR 12-09-100 09:43 ディレクトリ
629+ 345 A 12-02-98 10:59 VirtualDevice.java
630+ 0 DIR 12-09-98 09:43 ディレクトリ
631+ 0 DIR 12-09-100 09:43 ディレクトリ
632632
633633 *LIST_MELCOM
634634 0 1 2 3 4 5 6 7 8
635635 ---------------------------------------------------------------
636- - RW-RW-RW- 1 TERA 50 DEC 1 1997 AAAJ B(B)
637- - RW-RW-RW- 1 TERA 1 AUG 7 1998 12345678901234B(B)
638- d RWXRWXRWX 2 TERA 64 NOV 13 1997 Q2000 -
636+ - RW-RW-RW- 1 TERA 50 DEC 1 1997 AAAJ B(B)
637+ - RW-RW-RW- 1 TERA 1 AUG 7 1998 12345678901234B(B)
638+ d RWXRWXRWX 2 TERA 64 NOV 13 1997 Q2000 -
639639
640640 *LIST_VMS
641641 0 1 2 3 4
@@ -649,19 +649,19 @@ LIST_UNIX_70
649649 *LIST_OS7_1
650650 0 1 2 3
651651 ---------------------------------------------------------------
652- drwxrwxrwx 99/05/13 11:38:34 APL
652+ drwxrwxrwx 99/05/13 11:38:34 APL
653653 *LIST_OS7_2
654654 0 1 2 3 4 5
655655 ---------------------------------------------------------------
656- -rwxrwxrwx SEQ 17408 96/12/06 10:11:27 INIT_CONFIG
656+ -rwxrwxrwx SEQ 17408 96/12/06 10:11:27 INIT_CONFIG
657657
658658 *LIST_IRMX
659659 0 1 2 3 4 5 6 7 8 9 10 11
660660 ---------------------------------------------------------------
661- world DR DLAC 1 416 1,024 1 WORLD 05 FEB 98
662- world DR 1 416 1,024 1 WORLD 05 FEB 98
663- name.f38 DRAU 5 4,692 1,024 1 # 0 24 MAR 99
664- name.f38 5 4,692 1,024 1 # 0 24 MAR 99
661+ world DR DLAC 1 416 1,024 1 WORLD 05 FEB 98
662+ world DR 1 416 1,024 1 WORLD 05 FEB 98
663+ name.f38 DRAU 5 4,692 1,024 1 # 0 24 MAR 99
664+ name.f38 5 4,692 1,024 1 # 0 24 MAR 99
665665
666666 *LIST_STRATUS
667667 0 1 2 3 4 5
@@ -680,26 +680,26 @@ LIST_UNIX_70
680680 *LIST_OS9
681681 0 1 2 3 4 5 6
682682 ---------------------------------------------------------------
683- 0.0 01/02/13 0945 d-----wr 3C0 148724 W_017
684- 0.0 01/02/13 0945 ------wr C20 48828 W_017.CLG
683+ 0.0 01/02/13 0945 d-----wr 3C0 148724 W_017
684+ 0.0 01/02/13 0945 ------wr C20 48828 W_017.CLG
685685
686686 *LIST_IBM
687687 0 1 2 3 4 5 6 7 8 9
688688 ---------------------------------------------------------------
689- JXSIB1 3390 2000/12/27 1 810 FB 240 24000 PO DIRNAME
690- JXSW01 3390 2000/12/27 1 5 VBA 240 3120 PS FILENAME
689+ JXSIB1 3390 2000/12/27 1 810 FB 240 24000 PO DIRNAME
690+ JXSW01 3390 2000/12/27 1 5 VBA 240 3120 PS FILENAME
691691
692692 *LIST_AGILENT
693693 0 1 2 3 4 5
694694 ---------------------------------------------------------------
695- drwxrwxrwx 1 1 1 1024 system
696- -rw-rw-rw- 1 1 1 1792 abc.aaa
695+ drwxrwxrwx 1 1 1 1024 system
696+ -rw-rw-rw- 1 1 1 1792 abc.aaa
697697
698698 *LIST_SHIBASOKU
699699 0 1 2 3 4
700700 ---------------------------------------------------------------
701- 512 Jan-30-2002 14:52:04 DIRNAME <DIR>
702- 61191 Aug-30-2002 17:30:38 FILENAME.C
701+ 512 Jan-30-2002 14:52:04 DIRNAME <DIR>
702+ 61191 Aug-30-2002 17:30:38 FILENAME.C
703703
704704
705705 // linux-ftpd
--- a/connect.c
+++ b/connect.c
@@ -476,7 +476,7 @@ static INT_PTR CALLBACK QuickConDialogCallBack(HWND hDlg, UINT iMessage, WPARAM
476476 // DoPrintf("EDIT");
477477 // break;
478478 }
479- return(TRUE);
479+ return(TRUE);
480480 }
481481 return(FALSE);
482482 }
@@ -2637,9 +2637,9 @@ SOCKET GetFTPListenSocketIPv4(SOCKET ctrl_skt, int *CancelCheckWork)
26372637 // IPv6対応
26382638 struct sockaddr_in SocksSockAddr; /* SOCKSサーバのアドレス情報 */
26392639 struct sockaddr_in CurSockAddr; /* 接続先ホストのアドレス情報 */
2640- SOCKET listen_skt;
2641- int iLength;
2642- char *a,*p;
2640+ SOCKET listen_skt;
2641+ int iLength;
2642+ char *a,*p;
26432643 struct sockaddr_in saCtrlAddr;
26442644 struct sockaddr_in saTmpAddr;
26452645 SOCKS4CMD Socks4Cmd;
@@ -2838,9 +2838,9 @@ SOCKET GetFTPListenSocketIPv6(SOCKET ctrl_skt, int *CancelCheckWork)
28382838 {
28392839 struct sockaddr_in6 SocksSockAddr; /* SOCKSサーバのアドレス情報 */
28402840 struct sockaddr_in6 CurSockAddr; /* 接続先ホストのアドレス情報 */
2841- SOCKET listen_skt;
2842- int iLength;
2843- char *a,*p;
2841+ SOCKET listen_skt;
2842+ int iLength;
2843+ char *a,*p;
28442844 struct sockaddr_in6 saCtrlAddr;
28452845 struct sockaddr_in6 saTmpAddr;
28462846 SOCKS5REQUEST Socks5Cmd;
--- a/filelist.c
+++ b/filelist.c
@@ -230,9 +230,9 @@ int MakeListWin(HWND hWnd, HINSTANCE hInst)
230230 // LocalProcPtr = (WNDPROC)SetWindowLong(hWndListLocal, GWL_WNDPROC, (LONG)LocalWndProc);
231231 LocalProcPtr = (WNDPROC)SetWindowLongPtr(hWndListLocal, GWLP_WNDPROC, (LONG_PTR)LocalWndProc);
232232
233- Tmp = SendMessage(hWndListLocal, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
234- Tmp |= LVS_EX_FULLROWSELECT;
235- SendMessage(hWndListLocal, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)Tmp);
233+ Tmp = SendMessage(hWndListLocal, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
234+ Tmp |= LVS_EX_FULLROWSELECT;
235+ SendMessage(hWndListLocal, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)Tmp);
236236
237237 if(ListFont != NULL)
238238 SendMessage(hWndListLocal, WM_SETFONT, (WPARAM)ListFont, MAKELPARAM(TRUE, 0));
@@ -287,9 +287,9 @@ int MakeListWin(HWND hWnd, HINSTANCE hInst)
287287 // RemoteProcPtr = (WNDPROC)SetWindowLong(hWndListRemote, GWL_WNDPROC, (LONG)RemoteWndProc);
288288 RemoteProcPtr = (WNDPROC)SetWindowLongPtr(hWndListRemote, GWLP_WNDPROC, (LONG_PTR)RemoteWndProc);
289289
290- Tmp = SendMessage(hWndListRemote, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
291- Tmp |= LVS_EX_FULLROWSELECT;
292- SendMessage(hWndListRemote, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)Tmp);
290+ Tmp = SendMessage(hWndListRemote, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
291+ Tmp |= LVS_EX_FULLROWSELECT;
292+ SendMessage(hWndListRemote, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)Tmp);
293293
294294 if(ListFont != NULL)
295295 SendMessage(hWndListRemote, WM_SETFONT, (WPARAM)ListFont, MAKELPARAM(TRUE, 0));
@@ -819,7 +819,7 @@ static LRESULT FileListCommonWndProc(HWND hWnd, UINT message, WPARAM wParam, LPA
819819
820820 switch (message)
821821 {
822- case WM_SYSKEYDOWN:
822+ case WM_SYSKEYDOWN:
823823 if (wParam == 'D') { // Alt+D
824824 SetFocus(hWndHistEdit);
825825 break;
@@ -827,7 +827,7 @@ static LRESULT FileListCommonWndProc(HWND hWnd, UINT message, WPARAM wParam, LPA
827827 EraseListViewTips();
828828 return(CallWindowProc(ProcPtr, hWnd, message, wParam, lParam));
829829
830- case WM_KEYDOWN:
830+ case WM_KEYDOWN:
831831 if(wParam == 0x09)
832832 {
833833 SetFocus(hWndDst);
@@ -1162,7 +1162,7 @@ static LRESULT FileListCommonWndProc(HWND hWnd, UINT message, WPARAM wParam, LPA
11621162 case WM_MOUSEWHEEL :
11631163 if(Dragging == NO)
11641164 {
1165- short zDelta = (short)HIWORD(wParam);
1165+ short zDelta = (short)HIWORD(wParam);
11661166
11671167 EraseListViewTips();
11681168 Point.x = (short)LOWORD(lParam);
@@ -1187,7 +1187,7 @@ static LRESULT FileListCommonWndProc(HWND hWnd, UINT message, WPARAM wParam, LPA
11871187 default :
11881188 return(CallWindowProc(ProcPtr, hWnd, message, wParam, lParam));
11891189 }
1190- return(0L);
1190+ return(0L);
11911191 }
11921192
11931193
@@ -1620,7 +1620,7 @@ static void AddDispFileList(FLISTANCHOR *Anchor, char *Name, FILETIME *Time, LON
16201620 // ((Cmp = _mbsicmp(GetFileExt(Name), GetFileExt(Pos->File))) < 0)) ||
16211621 //#if defined(HAVE_TANDEM)
16221622 // ((AskHostType() == HTYPE_TANDEM) &&
1623-// ((Sort & SORT_MASK_ORD) == SORT_EXT) &&
1623+// ((Sort & SORT_MASK_ORD) == SORT_EXT) &&
16241624 // ((Cmp = Attr - Pos->Attr) < 0)) ||
16251625 //#endif
16261626 // (((Sort & SORT_MASK_ORD) == SORT_SIZE) &&
@@ -1659,7 +1659,7 @@ static void AddDispFileList(FLISTANCHOR *Anchor, char *Name, FILETIME *Time, LON
16591659 // ((Cmp = _mbsicmp(GetFileExt(Name), GetFileExt(Pos->File))) > 0)) ||
16601660 //#if defined(HAVE_TANDEM)
16611661 // ((AskHostType() == HTYPE_TANDEM) &&
1662-// ((Sort & SORT_MASK_ORD) == SORT_EXT) &&
1662+// ((Sort & SORT_MASK_ORD) == SORT_EXT) &&
16631663 // ((Cmp = Attr - Pos->Attr) > 0)) ||
16641664 //#endif
16651665 // (((Sort & SORT_MASK_ORD) == SORT_SIZE) &&
@@ -1674,7 +1674,7 @@ static void AddDispFileList(FLISTANCHOR *Anchor, char *Name, FILETIME *Time, LON
16741674 break;
16751675 #if defined(HAVE_TANDEM)
16761676 if(((AskHostType() == HTYPE_TANDEM) &&
1677- ((Sort & SORT_MASK_ORD) == SORT_EXT) &&
1677+ ((Sort & SORT_MASK_ORD) == SORT_EXT) &&
16781678 ((Cmp = Attr - Pos->Attr) > 0)))
16791679 break;
16801680 #endif
@@ -2116,7 +2116,7 @@ static INT_PTR CALLBACK SelectDialogCallBack(HWND hDlg, UINT iMessage, WPARAM wP
21162116 hHelpWin = HtmlHelp(NULL, AskHelpFilePath(), HH_HELP_CONTEXT, IDH_HELP_TOPIC_0000061);
21172117 break;
21182118 }
2119- return(TRUE);
2119+ return(TRUE);
21202120 }
21212121 return(FALSE);
21222122 }
@@ -3012,6 +3012,8 @@ void MakeDroppedFileList(WPARAM wParam, char *Cur, FILELIST **Base)
30123012 FILELIST Pkt;
30133013 HANDLE fHnd;
30143014 WIN32_FIND_DATA Find;
3015+ // タイムスタンプのバグ修正
3016+ SYSTEMTIME TmpStime;
30153017
30163018 Max = DragQueryFile((HDROP)wParam, 0xFFFFFFFF, NULL, 0);
30173019
@@ -3040,6 +3042,16 @@ void MakeDroppedFileList(WPARAM wParam, char *Cur, FILELIST **Base)
30403042 {
30413043 FindClose(fHnd);
30423044 Pkt.Time = Find.ftLastWriteTime;
3045+ // タイムスタンプのバグ修正
3046+ if(FileTimeToSystemTime(&Pkt.Time, &TmpStime))
3047+ {
3048+ if(DispTimeSeconds == NO)
3049+ TmpStime.wSecond = 0;
3050+ TmpStime.wMilliseconds = 0;
3051+ SystemTimeToFileTime(&TmpStime, &Pkt.Time);
3052+ }
3053+ else
3054+ memset(&Pkt.Time, 0, sizeof(FILETIME));
30433055 #if defined(HAVE_TANDEM)
30443056 Pkt.Size = MakeLongLong(Find.nFileSizeHigh, Find.nFileSizeLow);
30453057 Pkt.InfoExist |= (FINFO_TIME | FINFO_DATE | FINFO_SIZE);
@@ -4285,7 +4297,7 @@ static int CheckUnixType(char *Str, char *Tmp, int Add1, int Add2, int Day)
42854297 (((atoi(Tmp) >= 1) && (atoi(Tmp) <= 9) &&
42864298 ((unsigned char)Tmp[1] == 0xD4) &&
42874299 ((unsigned char)Tmp[2] == 0xC2)) ||
4288- ((atoi(Tmp) >= 10) && (atoi(Tmp) <= 12) &&
4300+ ((atoi(Tmp) >= 10) && (atoi(Tmp) <= 12) &&
42894301 ((unsigned char)Tmp[2] == 0xD4) &&
42904302 ((unsigned char)Tmp[3] == 0xC2))))
42914303 {
@@ -6250,7 +6262,7 @@ static INT_PTR CALLBACK FilterWndProc(HWND hDlg, UINT iMessage, WPARAM wParam, L
62506262 hHelpWin = HtmlHelp(NULL, AskHelpFilePath(), HH_HELP_CONTEXT, IDH_HELP_TOPIC_0000021);
62516263 break;
62526264 }
6253- return(TRUE);
6265+ return(TRUE);
62546266 }
62556267 return(FALSE);
62566268 }
--- a/ftpproc.c
+++ b/ftpproc.c
@@ -114,6 +114,8 @@ extern int MakeAllDir;
114114 extern int AbortOnListError;
115115 // ミラーリング設定追加
116116 extern int MirrorNoTransferContents;
117+// タイムスタンプのバグ修正
118+extern int DispTimeSeconds;
117119
118120 /*===== ローカルなワーク =====*/
119121
@@ -879,6 +881,8 @@ static int CheckLocalFile(TRANSPACKET *Pkt)
879881 HANDLE fHnd;
880882 WIN32_FIND_DATA Find;
881883 int Ret;
884+ // タイムスタンプのバグ修正
885+ SYSTEMTIME TmpStime;
882886
883887 Ret = EXIST_OVW;
884888 Pkt->ExistSize = 0;
@@ -904,6 +908,16 @@ static int CheckLocalFile(TRANSPACKET *Pkt)
904908 if(Ret == EXIST_NEW)
905909 {
906910 /*ファイル日付チェック */
911+ // タイムスタンプのバグ修正
912+ if(FileTimeToSystemTime(&Find.ftLastWriteTime, &TmpStime))
913+ {
914+ if(DispTimeSeconds == NO)
915+ TmpStime.wSecond = 0;
916+ TmpStime.wMilliseconds = 0;
917+ SystemTimeToFileTime(&TmpStime, &Find.ftLastWriteTime);
918+ }
919+ else
920+ memset(&Find.ftLastWriteTime, 0, sizeof(FILETIME));
907921 if(CompareFileTime(&Find.ftLastWriteTime, &Pkt->Time) < 0)
908922 Ret = EXIST_OVW;
909923 else
@@ -991,7 +1005,7 @@ static INT_PTR CALLBACK DownExistDialogCallBack(HWND hDlg, UINT iMessage, WPARAM
9911005 hHelpWin = HtmlHelp(NULL, AskHelpFilePath(), HH_HELP_CONTEXT, IDH_HELP_TOPIC_0000009);
9921006 break;
9931007 }
994- return(TRUE);
1008+ return(TRUE);
9951009 }
9961010 return(FALSE);
9971011 }
@@ -1866,7 +1880,7 @@ static INT_PTR CALLBACK MirrorNotifyCallBack(HWND hDlg, UINT iMessage, WPARAM wP
18661880 else
18671881 hHelpWin = HtmlHelp(NULL, AskHelpFilePath(), HH_HELP_CONTEXT, IDH_HELP_TOPIC_0000012);
18681882 }
1869- return(TRUE);
1883+ return(TRUE);
18701884 }
18711885 return(FALSE);
18721886 }
@@ -1913,7 +1927,7 @@ static INT_PTR CALLBACK MirrorDispListCallBack(HWND hDlg, UINT iMessage, WPARAM
19131927 GetWindowRect(hDlg, &Rect);
19141928 DlgSizeChange(hDlg, &DlgSize, &Rect, 0);
19151929 RedrawWindow(hDlg, NULL, NULL, RDW_INVALIDATE | RDW_ERASE | RDW_ALLCHILDREN);
1916- break;
1930+ break;
19171931
19181932 case WM_INITDIALOG :
19191933 Base = (TRANSPACKET **)lParam;
@@ -2003,11 +2017,11 @@ static INT_PTR CALLBACK MirrorDispListCallBack(HWND hDlg, UINT iMessage, WPARAM
20032017 case IDHELP :
20042018 hHelpWin = HtmlHelp(NULL, AskHelpFilePath(), HH_HELP_CONTEXT, IDH_HELP_TOPIC_0000012);
20052019 }
2006- return(TRUE);
2020+ return(TRUE);
20072021
20082022 case WM_SIZING :
20092023 DlgSizeChange(hDlg, &DlgSize, (RECT *)lParam, (int)wParam);
2010- return(TRUE);
2024+ return(TRUE);
20112025 }
20122026 return(FALSE);
20132027 }
@@ -2296,7 +2310,7 @@ static INT_PTR CALLBACK UpExistDialogCallBack(HWND hDlg, UINT iMessage, WPARAM w
22962310 hHelpWin = HtmlHelp(NULL, AskHelpFilePath(), HH_HELP_CONTEXT, IDH_HELP_TOPIC_0000011);
22972311 break;
22982312 }
2299- return(TRUE);
2313+ return(TRUE);
23002314 }
23012315 return(FALSE);
23022316 }
@@ -2343,7 +2357,7 @@ static INT_PTR CALLBACK UpDownAsDialogCallBack(HWND hDlg, UINT iMessage, WPARAM
23432357 EndDialog(hDlg, NO_ALL);
23442358 break;
23452359 }
2346- return(TRUE);
2360+ return(TRUE);
23472361 }
23482362 return(FALSE);
23492363 }
@@ -2393,7 +2407,7 @@ static INT_PTR CALLBACK UpDownAsWithExtDialogCallBack(HWND hDlg, UINT iMessage,
23932407 EndDialog(hDlg, NO_ALL);
23942408 break;
23952409 }
2396- return(TRUE);
2410+ return(TRUE);
23972411 }
23982412 return(FALSE);
23992413 }
@@ -2656,7 +2670,7 @@ static INT_PTR CALLBACK DeleteDialogCallBack(HWND hDlg, UINT iMessage, WPARAM wP
26562670 EndDialog(hDlg, NO_ALL);
26572671 break;
26582672 }
2659- return(TRUE);
2673+ return(TRUE);
26602674 }
26612675 return(FALSE);
26622676 }
@@ -2914,7 +2928,7 @@ static INT_PTR CALLBACK RenameDialogCallBack(HWND hDlg, UINT iMessage, WPARAM wP
29142928 EndDialog(hDlg, NO_ALL);
29152929 break;
29162930 }
2917- return(TRUE);
2931+ return(TRUE);
29182932 }
29192933 return(FALSE);
29202934 }
@@ -3290,7 +3304,7 @@ INT_PTR CALLBACK ChmodDialogCallBack(HWND hDlg, UINT iMessage, WPARAM wParam, LP
32903304 hHelpWin = HtmlHelp(NULL, AskHelpFilePath(), HH_HELP_CONTEXT, IDH_HELP_TOPIC_0000017);
32913305 break;
32923306 }
3293- return(TRUE);
3307+ return(TRUE);
32943308 }
32953309 return(FALSE);
32963310 }
@@ -3513,7 +3527,7 @@ static LRESULT CALLBACK SizeNotifyDlgWndProc(HWND hDlg, UINT message, WPARAM wPa
35133527 }
35143528 return(TRUE);
35153529 }
3516- return(FALSE);
3530+ return(FALSE);
35173531 }
35183532
35193533
@@ -3556,7 +3570,7 @@ static LRESULT CALLBACK SizeDlgWndProc(HWND hDlg, UINT message, WPARAM wParam, L
35563570 }
35573571 return(TRUE);
35583572 }
3559- return(FALSE);
3573+ return(FALSE);
35603574 }
35613575
35623576
--- a/getput.c
+++ b/getput.c
@@ -2573,7 +2573,7 @@ static INT_PTR CALLBACK UpDownErrorDialogProc(HWND hDlg, UINT message, WPARAM wP
25732573 // hHelpWin = HtmlHelp(NULL, AskHelpFilePath(), HH_HELP_CONTEXT, IDH_HELP_TOPIC_0000009);
25742574 break;
25752575 }
2576- return(TRUE);
2576+ return(TRUE);
25772577 }
25782578 return(FALSE);
25792579 }
@@ -2667,7 +2667,7 @@ static INT_PTR CALLBACK NoResumeWndProc(HWND hDlg, UINT iMessage, WPARAM wParam,
26672667 EndDialog(hDlg, NO_ALL);
26682668 break;
26692669 }
2670- return(TRUE);
2670+ return(TRUE);
26712671 }
26722672 return(FALSE);
26732673 }
@@ -4366,7 +4366,7 @@ static INT_PTR CALLBACK MirrorDeleteDialogCallBack(HWND hDlg, UINT iMessage, WPA
43664366 EndDialog(hDlg, NO_ALL);
43674367 break;
43684368 }
4369- return(TRUE);
4369+ return(TRUE);
43704370 }
43714371 return(FALSE);
43724372 }
--- a/hostman.c
+++ b/hostman.c
@@ -183,7 +183,7 @@ static INT_PTR CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, L
183183 GetWindowRect(hDlg, &Rect);
184184 DlgSizeChange(hDlg, &DlgSize, &Rect, 0);
185185 RedrawWindow(hDlg, NULL, NULL, RDW_INVALIDATE | RDW_ERASE | RDW_ALLCHILDREN);
186- break;
186+ break;
187187
188188 case WM_INITDIALOG :
189189 /* TreeViewでのダブルクリックをつかまえるため */
@@ -213,7 +213,7 @@ static INT_PTR CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, L
213213 CurrentHost = ConnectingHost;
214214 SendAllHostNames(GetDlgItem(hDlg, HOST_LIST), CurrentHost);
215215 DlgSizeInit(hDlg, &DlgSize, &HostDlgSize);
216- return(TRUE);
216+ return(TRUE);
217217
218218 case WM_COMMAND :
219219 switch(GET_WM_COMMAND_ID(wParam, lParam))
@@ -574,7 +574,7 @@ static INT_PTR CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, L
574574
575575 case WM_SIZING :
576576 DlgSizeChange(hDlg, &DlgSize, (RECT *)lParam, (int)wParam);
577- return(TRUE);
577+ return(TRUE);
578578
579579 case WM_SELECT_HOST :
580580 HitInfo.pt.x = LOWORD(lParam);
@@ -624,7 +624,7 @@ static INT_PTR CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, L
624624 }
625625 break;
626626 }
627- return(FALSE);
627+ return(FALSE);
628628 }
629629
630630
@@ -1878,7 +1878,7 @@ static INT_PTR CALLBACK MainSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam,
18781878 }
18791879 break;
18801880 }
1881- return(TRUE);
1881+ return(TRUE);
18821882 }
18831883 return(FALSE);
18841884 }
--- a/lvtips.c
+++ b/lvtips.c
@@ -129,7 +129,7 @@ void DeleteListViewTips(void)
129129 void EraseListViewTips(void)
130130 {
131131 ReleaseCapture();
132- ShowWindow(hWndTips, SW_HIDE);
132+ ShowWindow(hWndTips, SW_HIDE);
133133 return;
134134 }
135135
@@ -176,8 +176,8 @@ void CheckTipsDisplay(HWND hWnd, LPARAM lParam)
176176 if(InRect == NO)
177177 {
178178 row = CellRectFromPoint(hWnd, Point, &cellrect, &col);
179- if(row != -1)
180- {
179+ if(row != -1)
180+ {
181181 cur_rect=cellrect;
182182 offset = 6;
183183 offset2 = offset;
@@ -225,13 +225,13 @@ static void TipsShow(HWND hWnd, RECT rectTitle, LPCTSTR lpszTitleText, int xoffs
225225 {
226226 HDC dc;
227227 HFONT pFont;
228- HFONT pFontDC;
228+ HFONT pFontDC;
229229 RECT rectDisplay;
230230 SIZE size;
231231
232232 if(InRect == NO)
233233 {
234- if(GetFocus() != NULL)
234+ if(GetFocus() != NULL)
235235 {
236236 RectClientToScreen(hWnd, &rectTitle);
237237
@@ -255,7 +255,7 @@ static void TipsShow(HWND hWnd, RECT rectTitle, LPCTSTR lpszTitleText, int xoffs
255255 {
256256 rectDisplay.right += 1;
257257
258- SetWindowPos(hWndTips, HWND_TOPMOST,
258+ SetWindowPos(hWndTips, HWND_TOPMOST,
259259 rectDisplay.left, rectDisplay.top,
260260 rectDisplay.right - rectDisplay.left,
261261 rectDisplay.bottom - rectDisplay.top,
@@ -263,7 +263,7 @@ static void TipsShow(HWND hWnd, RECT rectTitle, LPCTSTR lpszTitleText, int xoffs
263263
264264 TextOut(dc, 0, 0, lpszTitleText, strlen(lpszTitleText));
265265
266- SetCapture(hWnd);
266+ SetCapture(hWnd);
267267 }
268268
269269 SelectObject(dc, pFontDC);
@@ -328,7 +328,7 @@ static int CellRectFromPoint(HWND hWnd, POINT point, RECT *cellrect, int *col)
328328 if(rect.right > rectClient.right)
329329 rect.right = rectClient.right;
330330 *cellrect = rect;
331- *col = colnum;
331+ *col = colnum;
332332 Ret = row;
333333 break;
334334 }
--- a/main.c
+++ b/main.c
@@ -313,7 +313,7 @@ int FwallNoSaveUser = NO;
313313
314314 int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int cmdShow)
315315 {
316- MSG Msg;
316+ MSG Msg;
317317 int Ret;
318318 BOOL Sts;
319319 // プロセス保護
@@ -519,7 +519,7 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLi
519519 }
520520 Ret = Msg.wParam;
521521 }
522- UnregisterClass(FtpClassStr, hInstFtp);
522+ UnregisterClass(FtpClassStr, hInstFtp);
523523 // FTPS対応
524524 #ifdef USE_OPENSSL
525525 FreeOpenSSL();
@@ -2088,8 +2088,8 @@ static LRESULT CALLBACK FtpWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
20882088 break;
20892089
20902090 case WM_PAINT :
2091- BeginPaint(hWnd, (LPPAINTSTRUCT) &ps);
2092- EndPaint(hWnd, (LPPAINTSTRUCT) &ps);
2091+ BeginPaint(hWnd, (LPPAINTSTRUCT) &ps);
2092+ EndPaint(hWnd, (LPPAINTSTRUCT) &ps);
20932093 break;
20942094
20952095 case WM_DESTROY :
@@ -2122,7 +2122,7 @@ static LRESULT CALLBACK FtpWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
21222122 default :
21232123 return(DefWindowProc(hWnd, message, wParam, lParam));
21242124 }
2125- return(0L);
2125+ return(0L);
21262126 }
21272127
21282128
@@ -3320,7 +3320,7 @@ static INT_PTR CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam,
33203320 }
33213321 return(TRUE);
33223322 }
3323- return(FALSE);
3323+ return(FALSE);
33243324 }
33253325
33263326
@@ -3414,7 +3414,7 @@ int AskForceIni(void)
34143414
34153415 int BackgrndMessageProc(void)
34163416 {
3417- MSG Msg;
3417+ MSG Msg;
34183418 int Ret;
34193419
34203420 Ret = NO;
--- a/misc.c
+++ b/misc.c
@@ -179,7 +179,7 @@ static INT_PTR CALLBACK InputDialogCallBack(HWND hDlg, UINT iMessage, WPARAM wPa
179179 SendDlgItemMessage(hDlg, INP_INPSTR, WM_SETTEXT, 0, (LPARAM)Tmp);
180180 break;
181181 }
182- return(TRUE);
182+ return(TRUE);
183183 }
184184 return(FALSE);
185185 }
@@ -219,7 +219,7 @@ INT_PTR CALLBACK ExeEscDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
219219 }
220220 return(TRUE);
221221 }
222- return(FALSE);
222+ return(FALSE);
223223 }
224224
225225
@@ -258,7 +258,7 @@ INT_PTR CALLBACK ExeEscTextDialogProc(HWND hDlg, UINT message, WPARAM wParam, LP
258258 }
259259 return(TRUE);
260260 }
261- return(FALSE);
261+ return(FALSE);
262262 }
263263
264264
@@ -280,7 +280,7 @@ INT_PTR CALLBACK AnyButtonDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPA
280280 }
281281 return(TRUE);
282282 }
283- return(FALSE);
283+ return(FALSE);
284284 }
285285
286286 /*----- 文字列の最後に "\" を付ける -------------------------------------------
@@ -345,7 +345,7 @@ void RemoveYenTail(char *Str)
345345 void SetSlashTail(char *Str)
346346 {
347347 #if defined(HAVE_TANDEM)
348- /* Tandem では / の代わりに . を追加 */
348+ /* Tandem では / の代わりに . を追加 */
349349 if(AskHostType() == HTYPE_TANDEM) {
350350 if(_mbscmp(_mbsninc(Str, _mbslen(Str) - 1), ".") != 0)
351351 strcat(Str, ".");
@@ -1141,8 +1141,8 @@ int TimeString2FileTime(char *Time, FILETIME *Buf)
11411141 int Ret;
11421142
11431143 Ret = NO;
1144- Buf->dwLowDateTime = 0;
1145- Buf->dwHighDateTime = 0;
1144+ Buf->dwLowDateTime = 0;
1145+ Buf->dwHighDateTime = 0;
11461146
11471147 if(strlen(Time) >= 16)
11481148 {
@@ -1560,8 +1560,8 @@ int SelectDir(HWND hWnd, char *Buf, int MaxLen)
15601560 strncpy(Buf, Tmp, MaxLen-1);
15611561 Sts = TRUE;
15621562 lpMalloc->lpVtbl->Free(lpMalloc, lpIdll);
1563- }
1564- lpMalloc->lpVtbl->Release(lpMalloc);
1563+ }
1564+ lpMalloc->lpVtbl->Release(lpMalloc);
15651565 SetCurrentDirectory(Cur);
15661566 }
15671567 return(Sts);
--- a/option.c
+++ b/option.c
@@ -490,7 +490,7 @@ static INT_PTR CALLBACK UserSettingProc(HWND hDlg, UINT message, WPARAM wParam,
490490 case WM_INITDIALOG :
491491 SendDlgItemMessage(hDlg, USER_ADRS, EM_LIMITTEXT, PASSWORD_LEN, 0);
492492 SendDlgItemMessage(hDlg, USER_ADRS, WM_SETTEXT, 0, (LPARAM)UserMailAdrs);
493- return(TRUE);
493+ return(TRUE);
494494
495495 case WM_NOTIFY:
496496 pnmhdr = (NMHDR FAR *)lParam;
@@ -509,7 +509,7 @@ static INT_PTR CALLBACK UserSettingProc(HWND hDlg, UINT message, WPARAM wParam,
509509 }
510510 break;
511511 }
512- return(FALSE);
512+ return(FALSE);
513513 }
514514
515515
@@ -556,7 +556,7 @@ static INT_PTR CALLBACK Trmode1SettingProc(HWND hDlg, UINT message, WPARAM wPara
556556
557557 SendMessage(hDlg, WM_COMMAND, MAKEWPARAM(TRMODE_EXT_LIST, 0), 0);
558558
559- return(TRUE);
559+ return(TRUE);
560560
561561 case WM_NOTIFY:
562562 pnmhdr = (NMHDR FAR *)lParam;
@@ -613,7 +613,7 @@ static INT_PTR CALLBACK Trmode1SettingProc(HWND hDlg, UINT message, WPARAM wPara
613613 }
614614 return(TRUE);
615615 }
616- return(FALSE);
616+ return(FALSE);
617617 }
618618
619619
@@ -655,7 +655,7 @@ static INT_PTR CALLBACK Trmode2SettingProc(HWND hDlg, UINT message, WPARAM wPara
655655 sprintf(Tmp, "%d", TimeOut);
656656 SendDlgItemMessage(hDlg, TRMODE2_TIMEOUT, WM_SETTEXT, 0, (LPARAM)Tmp);
657657 SendDlgItemMessage(hDlg, TRMODE2_TIMEOUT_SPN, UDM_SETRANGE, 0, MAKELONG(300, 0));
658- return(TRUE);
658+ return(TRUE);
659659
660660 case WM_NOTIFY:
661661 pnmhdr = (NMHDR FAR *)lParam;
@@ -690,7 +690,7 @@ static INT_PTR CALLBACK Trmode2SettingProc(HWND hDlg, UINT message, WPARAM wPara
690690 }
691691 return(TRUE);
692692 }
693- return(FALSE);
693+ return(FALSE);
694694 }
695695
696696
@@ -722,9 +722,9 @@ static INT_PTR CALLBACK Trmode3SettingProc(HWND hDlg, UINT message, WPARAM wPara
722722 switch (message)
723723 {
724724 case WM_INITDIALOG :
725- Tmp = SendDlgItemMessage(hDlg, TRMODE3_LIST, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
726- Tmp |= LVS_EX_FULLROWSELECT;
727- SendDlgItemMessage(hDlg, TRMODE3_LIST, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)Tmp);
725+ Tmp = SendDlgItemMessage(hDlg, TRMODE3_LIST, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
726+ Tmp |= LVS_EX_FULLROWSELECT;
727+ SendDlgItemMessage(hDlg, TRMODE3_LIST, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)Tmp);
728728
729729 GetClientRect(GetDlgItem(hDlg, TRMODE3_LIST), &Rect);
730730
@@ -756,7 +756,7 @@ static INT_PTR CALLBACK Trmode3SettingProc(HWND hDlg, UINT message, WPARAM wPara
756756 SendDlgItemMessage(hDlg, TRMODE3_FOLDER_ATTR, EM_LIMITTEXT, (WPARAM)5, 0);
757757 sprintf(TmpStr, "%03d", FolderAttrNum);
758758 SendDlgItemMessage(hDlg, TRMODE3_FOLDER_ATTR, WM_SETTEXT, 0, (LPARAM)TmpStr);
759- return(TRUE);
759+ return(TRUE);
760760
761761 case WM_NOTIFY:
762762 pnmhdr = (NMHDR FAR *)lParam;
@@ -803,7 +803,7 @@ static INT_PTR CALLBACK Trmode3SettingProc(HWND hDlg, UINT message, WPARAM wPara
803803 }
804804 return(TRUE);
805805 }
806- return(FALSE);
806+ return(FALSE);
807807 }
808808
809809
@@ -826,7 +826,7 @@ static INT_PTR CALLBACK Trmode4SettingProc(HWND hDlg, UINT message, WPARAM wPara
826826 case WM_INITDIALOG :
827827 SetRadioButtonByValue(hDlg, AskLocalKanjiCode(), KanjiButton, KANJIBUTTONS);
828828
829- return(TRUE);
829+ return(TRUE);
830830
831831 case WM_NOTIFY:
832832 pnmhdr = (NMHDR FAR *)lParam;
@@ -846,7 +846,7 @@ static INT_PTR CALLBACK Trmode4SettingProc(HWND hDlg, UINT message, WPARAM wPara
846846 }
847847 break;
848848 }
849- return(FALSE);
849+ return(FALSE);
850850 }
851851
852852
@@ -875,7 +875,7 @@ static INT_PTR CALLBACK DefAttrDlgProc(HWND hDlg, UINT message, WPARAM wParam, L
875875 AttrSet = (ATTRSET *)lParam;
876876 SendDlgItemMessage(hDlg, DEFATTR_FNAME, EM_LIMITTEXT, (WPARAM)FMAX_PATH, 0);
877877 SendDlgItemMessage(hDlg, DEFATTR_ATTR, EM_LIMITTEXT, (WPARAM)4, 0);
878- return(TRUE);
878+ return(TRUE);
879879
880880 case WM_COMMAND :
881881 switch(GET_WM_COMMAND_ID(wParam, lParam))
@@ -898,7 +898,7 @@ static INT_PTR CALLBACK DefAttrDlgProc(HWND hDlg, UINT message, WPARAM wParam, L
898898 }
899899 return(TRUE);
900900 }
901- return(FALSE);
901+ return(FALSE);
902902 }
903903
904904
@@ -1017,7 +1017,7 @@ static INT_PTR CALLBACK MirrorSettingProc(HWND hDlg, UINT message, WPARAM wParam
10171017 SendDlgItemMessage(hDlg, MIRROR_DOWNDEL_NOTIFY, BM_SETCHECK, MirDownDelNotify, 0);
10181018 // ミラーリング設定追加
10191019 SendDlgItemMessage(hDlg, MIRROR_NO_TRANSFER, BM_SETCHECK, MirrorNoTransferContents, 0);
1020- return(TRUE);
1020+ return(TRUE);
10211021
10221022 case WM_NOTIFY:
10231023 pnmhdr = (NMHDR FAR *)lParam;
@@ -1069,7 +1069,7 @@ static INT_PTR CALLBACK MirrorSettingProc(HWND hDlg, UINT message, WPARAM wParam
10691069 }
10701070 return(TRUE);
10711071 }
1072- return(FALSE);
1072+ return(FALSE);
10731073 }
10741074
10751075
@@ -1123,7 +1123,7 @@ static INT_PTR CALLBACK NotifySettingProc(HWND hDlg, UINT message, WPARAM wParam
11231123 SetRadioButtonByValue(hDlg, SendMode, UpButton, UPBUTTONS);
11241124 SetRadioButtonByValue(hDlg, DclickOpen, DclickButton, DCLICKBUTTONS);
11251125 SetRadioButtonByValue(hDlg, MoveMode, MoveButton, MOVEBUTTONS);
1126- return(TRUE);
1126+ return(TRUE);
11271127
11281128 case WM_NOTIFY:
11291129 pnmhdr = (NMHDR FAR *)lParam;
@@ -1145,7 +1145,7 @@ static INT_PTR CALLBACK NotifySettingProc(HWND hDlg, UINT message, WPARAM wParam
11451145 }
11461146 break;
11471147 }
1148- return(FALSE);
1148+ return(FALSE);
11491149 }
11501150
11511151
@@ -1181,7 +1181,7 @@ static INT_PTR CALLBACK Disp1SettingProc(HWND hDlg, UINT message, WPARAM wParam,
11811181 SendDlgItemMessage(hDlg, DISP_ICON, BM_SETCHECK, DispFileIcon, 0);
11821182 // タイムスタンプのバグ修正
11831183 SendDlgItemMessage(hDlg, DISP_SECOND, BM_SETCHECK, DispTimeSeconds, 0);
1184- return(TRUE);
1184+ return(TRUE);
11851185
11861186 case WM_NOTIFY:
11871187 pnmhdr = (NMHDR FAR *)lParam;
@@ -1220,7 +1220,7 @@ static INT_PTR CALLBACK Disp1SettingProc(HWND hDlg, UINT message, WPARAM wParam,
12201220 }
12211221 return(TRUE);
12221222 }
1223- return(FALSE);
1223+ return(FALSE);
12241224 }
12251225
12261226
@@ -1237,7 +1237,7 @@ static INT_PTR CALLBACK Disp2SettingProc(HWND hDlg, UINT message, WPARAM wParam,
12371237 SendDlgItemMessage(hDlg, DISP2_PERMIT_NUM, BM_SETCHECK, DispPermissionsNumber, 0);
12381238 SendDlgItemMessage(hDlg, DISP2_AUTO_REFRESH, BM_SETCHECK, AutoRefreshFileList, 0);
12391239 SendDlgItemMessage(hDlg, DISP2_REMOVE_OLD_LOG, BM_SETCHECK, RemoveOldLog, 0);
1240- return(TRUE);
1240+ return(TRUE);
12411241
12421242 case WM_NOTIFY:
12431243 pnmhdr = (NMHDR FAR *)lParam;
@@ -1258,7 +1258,7 @@ static INT_PTR CALLBACK Disp2SettingProc(HWND hDlg, UINT message, WPARAM wParam,
12581258 }
12591259 break;
12601260 }
1261- return(FALSE);
1261+ return(FALSE);
12621262 }
12631263
12641264
@@ -1334,7 +1334,7 @@ static INT_PTR CALLBACK ConnectSettingProc(HWND hDlg, UINT message, WPARAM wPara
13341334 SendDlgItemMessage(hDlg, CONNECT_NORAS, BM_SETCHECK, NoRasControl, 0);
13351335 // UPnP対応
13361336 SendDlgItemMessage(hDlg, CONNECT_UPNP, BM_SETCHECK, UPnPEnabled, 0);
1337- return(TRUE);
1337+ return(TRUE);
13381338
13391339 case WM_NOTIFY:
13401340 pnmhdr = (NMHDR FAR *)lParam;
@@ -1376,7 +1376,7 @@ static INT_PTR CALLBACK ConnectSettingProc(HWND hDlg, UINT message, WPARAM wPara
13761376 }
13771377 return(TRUE);
13781378 }
1379- return(FALSE);
1379+ return(FALSE);
13801380 }
13811381
13821382
@@ -1464,7 +1464,7 @@ static INT_PTR CALLBACK FireSettingProc(HWND hDlg, UINT message, WPARAM wParam,
14641464 // FireWall設定追加
14651465 SendDlgItemMessage(hDlg, FIRE_SHARED, BM_SETCHECK, FwallNoSaveUser, 0);
14661466
1467- return(TRUE);
1467+ return(TRUE);
14681468
14691469 case WM_NOTIFY:
14701470 pnmhdr = (NMHDR FAR *)lParam;
@@ -1513,7 +1513,7 @@ static INT_PTR CALLBACK FireSettingProc(HWND hDlg, UINT message, WPARAM wParam,
15131513 }
15141514 return(TRUE);
15151515 }
1516- return(FALSE);
1516+ return(FALSE);
15171517 }
15181518
15191519
@@ -1545,7 +1545,7 @@ static INT_PTR CALLBACK ToolSettingProc(HWND hDlg, UINT message, WPARAM wParam,
15451545 SendDlgItemMessage(hDlg, TOOL_EDITOR1, WM_SETTEXT, 0, (LPARAM)ViewerName[0]);
15461546 SendDlgItemMessage(hDlg, TOOL_EDITOR2, WM_SETTEXT, 0, (LPARAM)ViewerName[1]);
15471547 SendDlgItemMessage(hDlg, TOOL_EDITOR3, WM_SETTEXT, 0, (LPARAM)ViewerName[2]);
1548- return(TRUE);
1548+ return(TRUE);
15491549
15501550 case WM_NOTIFY:
15511551 pnmhdr = (NMHDR FAR *)lParam;
@@ -1594,7 +1594,7 @@ static INT_PTR CALLBACK ToolSettingProc(HWND hDlg, UINT message, WPARAM wParam,
15941594 }
15951595 return(TRUE);
15961596 }
1597- return(FALSE);
1597+ return(FALSE);
15981598 }
15991599
16001600
@@ -1630,7 +1630,7 @@ static INT_PTR CALLBACK SoundSettingProc(HWND hDlg, UINT message, WPARAM wParam,
16301630 SendDlgItemMessage(hDlg, SOUND_CONNECT_WAV, WM_SETTEXT, 0, (LPARAM)Sound[SND_CONNECT].Fname);
16311631 SendDlgItemMessage(hDlg, SOUND_TRANS_WAV, WM_SETTEXT, 0, (LPARAM)Sound[SND_TRANS].Fname);
16321632 SendDlgItemMessage(hDlg, SOUND_ERROR_WAV, WM_SETTEXT, 0, (LPARAM)Sound[SND_ERROR].Fname);
1633- return(TRUE);
1633+ return(TRUE);
16341634
16351635 case WM_NOTIFY:
16361636 pnmhdr = (NMHDR FAR *)lParam;
@@ -1697,7 +1697,7 @@ static INT_PTR CALLBACK SoundSettingProc(HWND hDlg, UINT message, WPARAM wParam,
16971697 }
16981698 return(TRUE);
16991699 }
1700- return(FALSE);
1700+ return(FALSE);
17011701 }
17021702
17031703
@@ -1751,7 +1751,7 @@ static INT_PTR CALLBACK MiscSettingProc(HWND hDlg, UINT message, WPARAM wParam,
17511751
17521752 SendDlgItemMessage(hDlg, MISC_CACHEDIR, EM_LIMITTEXT, (WPARAM)FMAX_PATH, 0);
17531753 SendDlgItemMessage(hDlg, MISC_CACHEDIR, WM_SETTEXT, 0, (LPARAM)TmpPath);
1754- return(TRUE);
1754+ return(TRUE);
17551755
17561756 case WM_NOTIFY:
17571757 pnmhdr = (NMHDR FAR *)lParam;
@@ -1815,7 +1815,7 @@ static INT_PTR CALLBACK MiscSettingProc(HWND hDlg, UINT message, WPARAM wParam,
18151815 }
18161816 return(TRUE);
18171817 }
1818- return(FALSE);
1818+ return(FALSE);
18191819 }
18201820
18211821
@@ -1920,7 +1920,7 @@ static INT_PTR CALLBACK SortSettingProc(HWND hDlg, UINT message, WPARAM wParam,
19201920
19211921 SendDlgItemMessage(hDlg, SORT_SAVEHOST, BM_SETCHECK, AskSaveSortToHost(), 0);
19221922
1923- return(TRUE);
1923+ return(TRUE);
19241924
19251925 case WM_COMMAND :
19261926 switch(GET_WM_COMMAND_ID(wParam, lParam))
@@ -1963,7 +1963,7 @@ static INT_PTR CALLBACK SortSettingProc(HWND hDlg, UINT message, WPARAM wParam,
19631963 }
19641964 return(TRUE);
19651965 }
1966- return(FALSE);
1966+ return(FALSE);
19671967 }
19681968
19691969
@@ -1992,7 +1992,7 @@ static INT_PTR CALLBACK UpdatesSettingProc(HWND hDlg, UINT message, WPARAM wPara
19921992 EnableWindow(GetDlgItem(hDlg, UPDATES_INTERVAL), FALSE);
19931993 EnableWindow(GetDlgItem(hDlg, UPDATES_INTERVAL_SPN), FALSE);
19941994 }
1995- return(TRUE);
1995+ return(TRUE);
19961996
19971997 case WM_NOTIFY:
19981998 pnmhdr = (NMHDR FAR *)lParam;
@@ -2034,7 +2034,7 @@ static INT_PTR CALLBACK UpdatesSettingProc(HWND hDlg, UINT message, WPARAM wPara
20342034 }
20352035 return(TRUE);
20362036 }
2037- return(FALSE);
2037+ return(FALSE);
20382038 }
20392039
20402040 /*----- ダイアログのコントロールから10進数を取得 ----------------------------
--- a/ras.c
+++ b/ras.c
@@ -218,9 +218,9 @@ static int GetCurConnections(RASCONN **Buf)
218218 RasConn->dwSize = sizeof(RASCONN);
219219 Sts = (*m_RasEnumConnections)(RasConn, &Size, &Num);
220220 if((Sts == ERROR_BUFFER_TOO_SMALL) || (Sts == ERROR_NOT_ENOUGH_MEMORY))
221- {
221+ {
222222 if((Tmp = realloc(RasConn, Size)) != NULL)
223- {
223+ {
224224 RasConn = Tmp;
225225 Sts = (*m_RasEnumConnections)(RasConn, &Size, &Num);
226226 }
@@ -358,7 +358,7 @@ int SetRasEntryToComboBox(HWND hDlg, int Item, char *CurName)
358358 if((Sts == ERROR_BUFFER_TOO_SMALL) || (Sts == ERROR_NOT_ENOUGH_MEMORY))
359359 {
360360 if((Tmp = realloc(Entry, Size)) != NULL)
361- {
361+ {
362362 Entry = Tmp;
363363 Sts = (*m_RasEnumEntries)(NULL, NULL, Entry, &Size, &Num);
364364 }
@@ -521,8 +521,8 @@ static BOOL CALLBACK DialCallBackProc(HWND hDlg, UINT message, WPARAM wParam, LP
521521 SendMessage(hDlg, WM_SETTEXT, 0, (LPARAM)Tmp);
522522 Sts = (*m_RasDial)(NULL, NULL, Param, 0, &RasDialFunc, &hRasConn);
523523 if(Sts != 0)
524- EndDialog(hDlg, NO);
525- return(TRUE);
524+ EndDialog(hDlg, NO);
525+ return(TRUE);
526526
527527 case WM_COMMAND :
528528 switch(GET_WM_COMMAND_ID(wParam, lParam))
@@ -591,58 +591,58 @@ static VOID WINAPI RasDialFunc(UINT unMsg, RASCONNSTATE rasconnstate, DWORD dwEr
591591
592592 static void MakeRasConnMsg(char *Phone, RASCONNSTATE rasconn, char *Buf)
593593 {
594- switch( rasconn )
595- {
596- case RASCS_OpenPort:
597- strcpy(Buf, MSGJPN226);
594+ switch( rasconn )
595+ {
596+ case RASCS_OpenPort:
597+ strcpy(Buf, MSGJPN226);
598598 break;
599- case RASCS_PortOpened:
600- strcpy(Buf, MSGJPN227);
599+ case RASCS_PortOpened:
600+ strcpy(Buf, MSGJPN227);
601601 break;
602- case RASCS_ConnectDevice:
603- sprintf(Buf, MSGJPN228);
602+ case RASCS_ConnectDevice:
603+ sprintf(Buf, MSGJPN228);
604604 break;
605- case RASCS_DeviceConnected:
606- strcpy(Buf, MSGJPN229);
605+ case RASCS_DeviceConnected:
606+ strcpy(Buf, MSGJPN229);
607607 break;
608- case RASCS_AllDevicesConnected:
609- strcpy(Buf, MSGJPN230);
608+ case RASCS_AllDevicesConnected:
609+ strcpy(Buf, MSGJPN230);
610610 break;
611- case RASCS_Authenticate:
612- case RASCS_AuthNotify:
613- strcpy(Buf, MSGJPN231);
611+ case RASCS_Authenticate:
612+ case RASCS_AuthNotify:
613+ strcpy(Buf, MSGJPN231);
614614 break;
615- case RASCS_AuthRetry:
616- case RASCS_ReAuthenticate:
617- strcpy(Buf, MSGJPN232);
615+ case RASCS_AuthRetry:
616+ case RASCS_ReAuthenticate:
617+ strcpy(Buf, MSGJPN232);
618618 break;
619- case RASCS_AuthChangePassword:
620- strcpy(Buf, MSGJPN233);
619+ case RASCS_AuthChangePassword:
620+ strcpy(Buf, MSGJPN233);
621621 break;
622- case RASCS_Authenticated:
623- strcpy(Buf, MSGJPN234);
622+ case RASCS_Authenticated:
623+ strcpy(Buf, MSGJPN234);
624624 break;
625- case RASCS_Connected:
626- strcpy(Buf, MSGJPN235);
625+ case RASCS_Connected:
626+ strcpy(Buf, MSGJPN235);
627627 break;
628- case RASCS_Disconnected:
629- strcpy(Buf, MSGJPN236);
628+ case RASCS_Disconnected:
629+ strcpy(Buf, MSGJPN236);
630630 break;
631- case RASCS_AuthCallback:
632- case RASCS_PrepareForCallback:
633- case RASCS_WaitForModemReset:
634- case RASCS_WaitForCallback:
635- case RASCS_Interactive:
636- case RASCS_RetryAuthentication:
637- case RASCS_CallbackSetByCaller:
638- case RASCS_PasswordExpired:
639- case RASCS_AuthProject:
640- case RASCS_AuthLinkSpeed:
641- case RASCS_AuthAck:
642- default:
643- strcpy(Buf, MSGJPN237);
631+ case RASCS_AuthCallback:
632+ case RASCS_PrepareForCallback:
633+ case RASCS_WaitForModemReset:
634+ case RASCS_WaitForCallback:
635+ case RASCS_Interactive:
636+ case RASCS_RetryAuthentication:
637+ case RASCS_CallbackSetByCaller:
638+ case RASCS_PasswordExpired:
639+ case RASCS_AuthProject:
640+ case RASCS_AuthLinkSpeed:
641+ case RASCS_AuthAck:
642+ default:
643+ strcpy(Buf, MSGJPN237);
644644 break;
645- }
645+ }
646646 return;
647647 }
648648
@@ -674,7 +674,7 @@ static BOOL CALLBACK DialPassCallBackProc(HWND hDlg, UINT message, WPARAM wParam
674674 SendDlgItemMessage(hDlg, RASPASS_PASS, EM_LIMITTEXT, PWLEN, 0);
675675 SendDlgItemMessage(hDlg, RASPASS_USER, WM_SETTEXT, 0, (LPARAM)Param->szUserName);
676676 SendDlgItemMessage(hDlg, RASPASS_PASS, WM_SETTEXT, 0, (LPARAM)Param->szPassword);
677- return(TRUE);
677+ return(TRUE);
678678
679679 case WM_COMMAND :
680680 switch(GET_WM_COMMAND_ID(wParam, lParam))
--- a/registry.c
+++ b/registry.c
@@ -2340,11 +2340,11 @@ static int CreateAesKey(unsigned char *AesKey, const char* Key)
23402340
23412341 strcpy(HashKey, Key);
23422342 strcat(HashKey, ">g^r=@N7=//z<[`:");
2343- sha_memory((uchar *)HashKey, HashKeyLen, results);
2343+ sha_memory((uchar *)HashKey, HashKeyLen, results);
23442344
23452345 strcpy(HashKey, Key);
23462346 strcat(HashKey, "VG77dO1#EyC]$|C@");
2347- sha_memory((uchar *)HashKey, HashKeyLen, results + 5);
2347+ sha_memory((uchar *)HashKey, HashKeyLen, results + 5);
23482348
23492349 KeyIndex = 0;
23502350 ResIndex = 0;
--- a/remote.c
+++ b/remote.c
@@ -494,8 +494,8 @@ int DoMDTM(SOCKET cSkt, char *Path, FILETIME *Time, int *CancelCheckWork)
494494 char Tmp[1024];
495495 SYSTEMTIME sTime;
496496
497- Time->dwLowDateTime = 0;
498- Time->dwHighDateTime = 0;
497+ Time->dwLowDateTime = 0;
498+ Time->dwHighDateTime = 0;
499499
500500 // 同時接続対応
501501 // ホスト側の日時取得
--- a/skey.c
+++ b/skey.c
@@ -353,10 +353,10 @@ static int keycrunch(char *result, char *seed, char *passwd, int Type)
353353 }
354354 else
355355 {
356- sha_memory((uchar *)buf, buflen, results);
357- results [0] ^= results [2];
358- results [1] ^= results [3];
359- results [0] ^= results [4];
356+ sha_memory((uchar *)buf, buflen, results);
357+ results [0] ^= results [2];
358+ results [1] ^= results [3];
359+ results [0] ^= results [4];
360360 }
361361 free(buf);
362362
@@ -392,10 +392,10 @@ static void secure_hash(char *x, int Type)
392392 }
393393 else
394394 {
395- sha_memory((uchar *)x, 8, results);
396- results [0] ^= results [2];
397- results [1] ^= results [3];
398- results [0] ^= results [4];
395+ sha_memory((uchar *)x, 8, results);
396+ results [0] ^= results [2];
397+ results [1] ^= results [3];
398+ results [0] ^= results [4];
399399 }
400400
401401 /* Only works on byte-addressed little-endian machines!! */
--- a/socket.c
+++ b/socket.c
@@ -314,7 +314,7 @@ static LRESULT CALLBACK SocketWndProc(HWND hWnd, UINT message, WPARAM wParam, LP
314314 default :
315315 return(DefWindowProc(hWnd, message, wParam, lParam));
316316 }
317- return(0);
317+ return(0);
318318 }
319319
320320
--- a/tool.c
+++ b/tool.c
@@ -112,7 +112,7 @@ static INT_PTR CALLBACK OtpCalcWinProc(HWND hDlg, UINT message, WPARAM wParam, L
112112 SendDlgItemMessage(hDlg, OTPCALC_KEY, EM_LIMITTEXT, 40, 0);
113113 SendDlgItemMessage(hDlg, OTPCALC_PASS, EM_LIMITTEXT, PASSWORD_LEN, 0);
114114 SetRadioButtonByValue(hDlg, MD4, AlgoButton, ALGOBUTTONS);
115- return(TRUE);
115+ return(TRUE);
116116
117117 case WM_COMMAND :
118118 switch(GET_WM_COMMAND_ID(wParam, lParam))
@@ -158,7 +158,7 @@ static INT_PTR CALLBACK OtpCalcWinProc(HWND hDlg, UINT message, WPARAM wParam, L
158158 }
159159 return(TRUE);
160160 }
161- return(FALSE);
161+ return(FALSE);
162162 }
163163
164164
--- a/toolmenu.c
+++ b/toolmenu.c
@@ -532,7 +532,7 @@ static LRESULT CALLBACK HistEditBoxWndProc(HWND hWnd, UINT message, WPARAM wPara
532532 default :
533533 return(CallWindowProc(HistEditBoxProcPtr, hWnd, message, wParam, lParam));
534534 }
535- return(0L);
535+ return(0L);
536536 }
537537
538538
--- a/updater.c
+++ b/updater.c
@@ -89,33 +89,30 @@ BOOL ReadFileViaHTTPW(void* pOut, DWORD Length, DWORD* pLength, LPCWSTR UserAgen
8989 }
9090 else if(WinHttpGetIEProxyConfigForCurrentUser(&ProxyConfig))
9191 {
92- if(!ProxyConfig.fAutoDetect)
92+ if(ProxyConfig.lpszAutoConfigUrl)
9393 {
94- if(ProxyConfig.lpszAutoConfigUrl)
95- {
96- memset(&AutoProxyOptions, 0, sizeof(WINHTTP_AUTOPROXY_OPTIONS));
97- AutoProxyOptions.dwFlags = WINHTTP_AUTOPROXY_CONFIG_URL;
98- AutoProxyOptions.lpszAutoConfigUrl = ProxyConfig.lpszAutoConfigUrl;
99- AutoProxyOptions.fAutoLogonIfChallenged = TRUE;
100- memset(&ProxyInfo, 0, sizeof(WINHTTP_PROXY_INFO));
101- if(WinHttpGetProxyForUrl(hSession, Url, &AutoProxyOptions, &ProxyInfo))
102- {
103- WinHttpSetOption(hRequest, WINHTTP_OPTION_PROXY, &ProxyInfo, sizeof(WINHTTP_PROXY_INFO));
104- if(ProxyInfo.lpszProxy)
105- GlobalFree(ProxyInfo.lpszProxy);
106- if(ProxyInfo.lpszProxyBypass)
107- GlobalFree(ProxyInfo.lpszProxyBypass);
108- }
109- }
110- else
94+ memset(&AutoProxyOptions, 0, sizeof(WINHTTP_AUTOPROXY_OPTIONS));
95+ AutoProxyOptions.dwFlags = WINHTTP_AUTOPROXY_CONFIG_URL;
96+ AutoProxyOptions.lpszAutoConfigUrl = ProxyConfig.lpszAutoConfigUrl;
97+ AutoProxyOptions.fAutoLogonIfChallenged = TRUE;
98+ memset(&ProxyInfo, 0, sizeof(WINHTTP_PROXY_INFO));
99+ if(WinHttpGetProxyForUrl(hSession, Url, &AutoProxyOptions, &ProxyInfo))
111100 {
112- memset(&ProxyInfo, 0, sizeof(WINHTTP_PROXY_INFO));
113- ProxyInfo.dwAccessType = WINHTTP_ACCESS_TYPE_NAMED_PROXY;
114- ProxyInfo.lpszProxy = ProxyConfig.lpszProxy;
115- ProxyInfo.lpszProxyBypass = ProxyConfig.lpszProxyBypass;
116101 WinHttpSetOption(hRequest, WINHTTP_OPTION_PROXY, &ProxyInfo, sizeof(WINHTTP_PROXY_INFO));
102+ if(ProxyInfo.lpszProxy)
103+ GlobalFree(ProxyInfo.lpszProxy);
104+ if(ProxyInfo.lpszProxyBypass)
105+ GlobalFree(ProxyInfo.lpszProxyBypass);
117106 }
118107 }
108+ else if(ProxyConfig.lpszProxy)
109+ {
110+ memset(&ProxyInfo, 0, sizeof(WINHTTP_PROXY_INFO));
111+ ProxyInfo.dwAccessType = WINHTTP_ACCESS_TYPE_NAMED_PROXY;
112+ ProxyInfo.lpszProxy = ProxyConfig.lpszProxy;
113+ ProxyInfo.lpszProxyBypass = ProxyConfig.lpszProxyBypass;
114+ WinHttpSetOption(hRequest, WINHTTP_OPTION_PROXY, &ProxyInfo, sizeof(WINHTTP_PROXY_INFO));
115+ }
119116 if(ProxyConfig.lpszAutoConfigUrl)
120117 GlobalFree(ProxyConfig.lpszAutoConfigUrl);
121118 if(ProxyConfig.lpszProxy)
Show on old repository browser