• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

ギコナビ


Commit MetaInfo

修订版f1a67a1812afab51bb214fc9a41d1628954f7da6 (tree)
时间2004-10-03 03:37:55
作者cvs2git <cvs2git>
Commitercvs2git

Log Message

This commit was manufactured by cvs2svn to create tag 'v1_49_0_547'.

更改概述

差异

--- a/Giko.pas
+++ b/Giko.pas
@@ -2878,31 +2878,12 @@ begin
28782878 threadItem := GetActiveContent;
28792879 if Pos('about:blank..', Text) = 1 then begin
28802880 wkInt := LastDelimiter( '/', threadItem.URL );
2881- if Pos( '?', Copy( threadItem.URL, wkInt, MaxInt ) ) = 0 then begin
2882- // Thread.URL ‚Í PATH_INFO “n‚µ
2883- URL := Copy( threadItem.URL, 1, LastDelimiter( '/', threadItem.URL ) );
2884- wkInt := LastDelimiter( '/', Text );
2885- if Pos( '?', Copy( Text, wkInt, MaxInt ) ) = 0 then
2886- // Text ‚à PATH_INFO “n‚µ
2887- URL := URL + Copy( Text, LastDelimiter( '/', Text ) + 1, MaxInt )
2888- else
2889- // Text ‚Í QUERY_STRING “n‚µ
2890- URL := URL + Copy( Text, LastDelimiter( '?', Text ) + 1, MaxInt );
2891- end else begin
2892- // Thread.URL ‚Í QUERY_STRING “n‚µ
2893- URL := Copy( threadItem.URL, 1, LastDelimiter( '?', threadItem.URL ) );
2894- wkInt := LastDelimiter( '/', Text );
2895- if Pos( '?', Copy( Text, wkInt, MaxInt ) ) = 0 then begin
2896- // Text ‚Í PATH_INFO “n‚µ
2897- // URL ‚ɔ‚ƃL[‚ª‘«‚ç‚È‚¢‚Ì‚Å Text ‚©‚ç’¸‘Õ‚·‚é
2898- wkInt := LastDelimiter( '/', Copy( Text, 1, wkInt - 1 ) );
2899- wkInt := LastDelimiter( '/', Copy( Text, 1, wkInt - 1 ) );
2900- URL := Copy( URL, 1, Length( URL ) - 1 ) + Copy( Text, wkInt, MaxInt );
2901- end else begin
2902- // Text ‚à QUERY_STRING “n‚µ
2903- URL := URL + Copy( Text, LastDelimiter( '?', Text ) + 1, MaxInt )
2904- end;
2905- end;
2881+ if Pos( '?', Copy( threadItem.URL, wkInt, MaxInt ) ) = 0 then
2882+ URL := Copy( threadItem.URL, 1, LastDelimiter( '/', threadItem.URL ) ) +
2883+ Copy( Text, LastDelimiter( '/', Text ) + 1, MaxInt )
2884+ else
2885+ URL := Copy( threadItem.URL, 1, LastDelimiter( '?', threadItem.URL ) ) +
2886+ Copy( Text, LastDelimiter( '?', Text ) + 1, MaxInt )
29062887 end else begin
29072888 URL := Text;
29082889 end;
@@ -2911,9 +2892,8 @@ begin
29112892 if (PathRec.FNoParam) then begin
29122893 PathRec.FSt := 1;
29132894 PathRec.FTo := 1;
2914- end else begin
2895+ end else
29152896 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2916- end;
29172897 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
29182898
29192899 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
@@ -2940,10 +2920,10 @@ begin
29402920 // wkIntTo := 1;
29412921 //if PathRec.FFirst then
29422922 // wkIntSt := 1;
2943- //if PathRec.FStBegin then //http://````/-50‚Æ‚¢‚¤‚Æ‚«
2944- // wkIntSt := 1; //
2945- //if PathRec.FToEnd then //http://````/50-‚Æ‚¢‚¤‚Æ‚«
2946- // wkIntTo := 9999; // ‚Ç‚¿‚ç‚̏ꍇ‚àAGetPopupResNumber‚Å‚¤‚Ü‚­”ԍ†‚𒲐®‚·‚é‚̂łӂ悤B
2923+ if PathRec.FStBegin then
2924+ wkIntSt := 1;
2925+ if PathRec.FToEnd then
2926+ wkIntTo := 9999;
29472927
29482928 //ATitle := ActiveFileName <> PathRec.FKey;
29492929 if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
@@ -3671,7 +3651,7 @@ begin
36713651 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
36723652 if TObject(BrowserTab.Tabs.Objects[i]) is TBrowserRecord then begin
36733653 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
3674- Result := TBrowserRecord( BrowserTab.Tabs.Objects[i] );
3654+ Result := TBrowserRecord( BrowserTab.Tabs.Objects[j] );
36753655 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = nil then begin
36763656 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
36773657 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
@@ -3859,13 +3839,11 @@ begin
38593839
38603840
38613841 try
3862- {
38633842 if ThreadItem.UnRead then begin
38643843 ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
38653844 if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0;
38663845 TreeView.Refresh;
38673846 end;
3868- }
38693847 if(FActiveContent <> nil) and (FActiveContent <> Thread) then begin
38703848 if (FActiveContent.Browser <> BrowserNullTab.Browser) then
38713849 ShowWindow(FActiveContent.Browser.Handle, SW_HIDE);
@@ -4008,16 +3986,12 @@ end;
40083986 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean);
40093987 var
40103988 Board: TBoard;
4011- i: Integer;
40123989 begin
40133990 if ActiveList is TBoard then begin
4014- for i := Length( BBSs ) - 1 downto 0 do begin
4015- BBSs[i].SelectText := SelectText;
4016- BBSs[i].KubetsuChk := KubetsuChk;
4017- end;
40183991 Board := TBoard(ActiveList);
4019-// Board.ParentCategory.ParenTBBS.SelectText := SelectText;
4020-// Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
3992+
3993+ Board.ParentCategory.ParenTBBS.SelectText := SelectText;
3994+ Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
40213995 // Board.SelectText := SelectText;
40223996 // Board.KubetsuChk := KubetsuChk;
40233997 ViewType := AViewType;
@@ -6695,20 +6669,10 @@ begin
66956669 threadItem := BrowserRecord.Thread;
66966670
66976671 if (BrowserRecord <> nil) and (Length( BrowserRecord.Movement ) > 0) then begin
6698- if threadItem.UnRead then begin
6699- threadItem.UnRead := False;
6700- threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
6701- if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0;
6702- TreeView.Refresh;
6703- ListView.Refresh;
6704- end;
67056672 BrowserMovement( BrowserRecord.Movement, BrowserRecord );
67066673 BrowserRecord.Movement := '';
67076674 end else if threadItem.UnRead then begin
67086675 threadItem.UnRead := False;
6709- threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
6710- if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0;
6711- TreeView.Refresh;
67126676 BrowserMovement( 'new', BrowserRecord );
67136677 ListView.Refresh;
67146678 end else if threadItem.ScrollTop <> 0 then begin
@@ -7541,7 +7505,6 @@ begin
75417505 boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
75427506 Board := BBSsFindBoardFromURL( boardURL );
75437507 if Board = nil then begin
7544- //break;
75457508 // ¦ì‚Á‚Ä‚à’ljÁ‚·‚é‚Æ‚±‚낪–³‚¢‚Ì‚ÅŒƒ‚µ‚­•Û—¯
75467509 //GikoSys.OpenBrowser(inURL, gbtUserApp);
75477510 //Exit;
@@ -7555,35 +7518,38 @@ begin
75557518 GikoSys.ReadSubjectFile( Board );
75567519 Exit;
75577520 end;
7558- ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
7559- if ThreadItem = nil then begin
7560- ThreadItem := tmpThread;
7561- Board.Insert( 0, ThreadItem );
7562- if ActiveList is TBoard then begin
7563- if TBoard(ActiveList) = Board then
7564- ListView.Items.Count := ListView.Items.Count + 1;
7565- end;
7566- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
7567- browserRec := InsertBrowserTab( ThreadItem );
7521+ end;
7522+
7523+ ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
7524+ if ThreadItem = nil then begin
7525+ ThreadItem := tmpThread;
7526+ Board.Insert( 0, ThreadItem );
7527+ if ActiveList is TBoard then begin
7528+ if TBoard(ActiveList) = Board then
7529+ ListView.Items.Count := ListView.Items.Count + 1;
7530+ end;
7531+ GikoSys.GetPopupResNumber( inURL, stRes, edRes );
7532+ browserRec := InsertBrowserTab( ThreadItem );
7533+ if (browserRec <> nil) and (stRes > 0) then
7534+ browserRec.Movement := IntToStr( stRes );
7535+ DownloadContent( ThreadItem );
7536+ Exit;
7537+ end else begin
7538+ tmpThread.Free;
7539+ GikoSys.GetPopupResNumber( inURL, stRes, edRes );
7540+ browserRec := InsertBrowserTab( ThreadItem );
7541+ if ThreadItem.IsLogFile then begin
7542+ if (browserRec <> nil) and (stRes > 0) then
7543+ BrowserMovement( IntToStr( stRes ), browserRec );
7544+ end else begin
75687545 if (browserRec <> nil) and (stRes > 0) then
75697546 browserRec.Movement := IntToStr( stRes );
75707547 DownloadContent( ThreadItem );
7571- Exit;
7572- end else begin
7573- tmpThread.Free;
7574- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
7575- browserRec := InsertBrowserTab( ThreadItem );
7576- if ThreadItem.IsLogFile then begin
7577- if (browserRec <> nil) and (stRes > 0) then
7578- BrowserMovement( IntToStr( stRes ), browserRec );
7579- end else begin
7580- if (browserRec <> nil) and (stRes > 0) then
7581- browserRec.Movement := IntToStr( stRes );
7582- DownloadContent( ThreadItem );
7583- end;
7584- Exit;
75857548 end;
7549+ Exit;
75867550 end;
7551+
7552+ //Exit;
75877553 end;
75887554
75897555 atBoard:
@@ -9010,10 +8976,9 @@ begin
90108976 ModifySelectList;
90118977 end else if Length( SelectComboBox.Text ) = 0 then
90128978 begin
9013- {* SelectComboBox.Text‚ª‹ó‚Å‚àA“ü—Í“r’†‚ÅEsc‚µ‚½‚Æ‚©
9014- * ‹ó‚Ì‚Æ‚«‚ÉDelƒL[‚ð‰Ÿ‚µ‚½‚Æ‚©‚Ȃ̂ŁAƒXƒŒ‚̍iž‚Ý‚ðˆÛŽ‚·‚éB
9015- * i‚±‚±‚ł͉½‚à‚µ‚È‚¢j
9016- *}
8979+ AllItemAction.Checked := True;
8980+ LogItemAction.Checked := False;
8981+ NewItemAction.Checked := False;
90178982 end else begin
90188983 // ƒ`ƒ‰‚‚­‚ÆŒ™‚¾‚©‚çAˆê‰ž‰Ÿ‚µ‚Ä‚ ‚é‚Æ‚«‚¾‚¯ˆ—‚·‚é
90198984 if AllItemAction.Checked then
@@ -11165,16 +11130,12 @@ begin
1116511130 SelectListItem(List);
1116611131 for i := 0 to List.Count - 1 do begin
1116711132 if TObject(List[i]) is TThreadItem then begin
11168- if (TThreadItem(List[i]).UnRead) then begin
11169- TThreadItem(List[i]).UnRead := false;
11170- TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1;
11171- end;
11133+ TThreadItem(List[i]).UnRead := false;
11134+ TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1;
1117211135 end;
1117311136 end;
1117411137 if TreeView.Visible then
1117511138 TreeView.Refresh;
11176- if ListView.Visible then
11177- ListView.Refresh;
1117811139 finally
1117911140 List.Free;
1118011141 end;
@@ -11190,16 +11151,12 @@ begin
1119011151 SelectListItem(List);
1119111152 for i := 0 to List.Count - 1 do begin
1119211153 if TObject(List[i]) is TThreadItem then begin
11193- if (TThreadItem(List[i]).IsLogFile) and (not TThreadItem(List[i]).UnRead) then begin
11194- TThreadItem(List[i]).UnRead := true;
11195- TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1;
11196- end;
11154+ TThreadItem(List[i]).UnRead := true;
11155+ TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1;
1119711156 end;
1119811157 end;
1119911158 if TreeView.Visible then
1120011159 TreeView.Refresh;
11201- if ListView.Visible then
11202- ListView.Refresh;
1120311160 finally
1120411161 List.Free;
1120511162 end;
--- a/ItemDownload.pas
+++ b/ItemDownload.pas
@@ -1259,10 +1259,8 @@ begin
12591259 OldCnt := Body.IndexOf(oldBody.Strings[ LastIdx ]) + 1;
12601260 until ( OldCnt <> 0 ) or (LastIdx = 0);
12611261
1262- if OldCnt >= Body.Count then OldCnt := Body.Count - 1;
12631262 NewRes := Body.Count - OldCnt;
12641263
1265-
12661264 finally
12671265 oldBody.Free;
12681266 end;
@@ -1299,10 +1297,8 @@ begin
12991297 ThreadItem.AllResCount := ThreadItem.Count;
13001298 ThreadItem.IsLogFile := True;
13011299 ThreadItem.RoundDate := Now;
1302- if not ThreadItem.UnRead then begin
1303- ThreadItem.UnRead := True;
1304- ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead + 1;
1305- end;
1300+ ThreadItem.UnRead := True;
1301+ ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead + 1;
13061302 // if ThreadItem.RoundNo = 6 then
13071303 // ThreadItem.RoundNo := 0;
13081304
--- a/KuroutSetting.dfm
+++ b/KuroutSetting.dfm
@@ -147,7 +147,6 @@ object KuroutOption: TKuroutOption
147147 Height = 57
148148 Caption = #12395#12385#12419#12435#35486#26696#20869#27231#33021
149149 TabOrder = 2
150- Visible = False
151150 object Label5: TLabel
152151 Left = 8
153152 Top = 16
--- a/Setting.pas
+++ b/Setting.pas
@@ -1223,7 +1223,7 @@ begin
12231223 FDeleteSyria := ini.ReadBool('Abon','DeleteSyria',false);
12241224
12251225 // ƒGƒfƒBƒ^
1226- FSpaceToNBSP := ini.ReadBool( 'Editor', 'SpaceToNBSP', False );
1226+ FSpaceToNBSP := ini.ReadBool( 'Editor', 'SpaceToNBSP', True );
12271227 FAmpToCharRef := ini.ReadBool( 'Editor', 'AmpToCharRef', False );
12281228
12291229 //TabŽ©“®•Û‘¶A“ǂݍž‚Ý
Binary files a/gikoNavi.res and b/gikoNavi.res differ
--- a/readme/readme.txt
+++ b/readme/readme.txt
@@ -89,20 +89,16 @@ Windows Server 2003 Enterprise Edition IE6
8989 ------------------------------
9090 —š—ð
9191 ------------------------------
92-2004/10/XX
92+2004/XX/XX
9393 Version ÊÞÀ49
9494 ‚¨‹C‚É“ü‚è‚̓ǂݍž‚݂̍‚‘¬‰»‚É‚æ‚é‹N“®ŽžŠÔ‚Ì’Zk
95+ ƒXƒŒˆê——‚Ì•\Ž¦ƒJƒ‰ƒ€i—ñj‚ðÝ’è‚Å‚«‚é‚悤‚É‚È‚Á‚½
9596 StatusBar‚ÉNGƒ[ƒhƒtƒ@ƒCƒ‹‚Ì–¼‘O‚ªo‚È‚¢•s‹ï‡‚̏C³
9697 uŽw’肵‚½”ԍ†‚̃ŒƒX‚É”ò‚ԁv‹@”\’ljÁiƒL[Ý’è‚ŁAƒXƒŒƒbƒhƒJƒeƒSƒŠ‚̈ê”ԍŌãj
98+ ƒŒƒXƒAƒ“ƒJ[‚ŃŒƒXƒ|ƒbƒvƒAƒbƒv‚·‚éŒ`Ž®‚ÌŠg‘åiƒ`ƒƒƒbƒg‚¿‚á‚ñ‚Ë‚é“™j
9799 ƒƒO‚ðíœ‚µ‚½Û‚É–¢“ǃXƒŒƒbƒh” (UnRead) ‚Ì•\Ž¦‚ªXV‚³‚ê‚È‚¢ƒoƒO‚ðC³
98100 ‚±‚±‚ɃŒƒX‚¾‚ƁAƒŒƒXƒGƒfƒBƒ^[‚̃Vƒ‡[ƒgƒJƒbƒgƒL[‚ªÝ’肳‚ê‚È‚¢•s‹ï‡‚̏C³
99101 ‚ ‚ځ[‚ñŽž‚ɃRƒR‚Ü‚Å“Ç‚ñ‚¾‚ƐV’…ƒŒƒX‚𒲐®‚·‚é‚Ì‚É•s‹ï‡‚ª‚ ‚Á‚½‚̂ŏC³
100- ƒXƒŒƒbƒhˆê——‚Ì•\Ž¦ƒJƒ‰ƒ€‚̐ݒ肪‚Å‚«‚é‚悤‚É‚È‚Á‚½BuƒIƒvƒVƒ‡ƒ“v->uÚ×Ý’èv->uÚ×Ý’è2v
101- ƒfƒtƒHƒ‹ƒg‚ł̃ŒƒXƒAƒ“ƒJ[ƒ|ƒbƒvƒAƒbƒv‚ªŽíŽí‚ÌŒ`Ž®‚ɑΉž
102- ‚R‚¿‚á‚ñ‚Ë‚éi8‚¿‚á‚ñ‚Ë‚éj‚ð“o˜^‚·‚é‚Æ‚Q‚¿‚á‚ñ‚Ë‚é‚̔‚ª•\Ž¦‚³‚ê‚é•s‹ï‡‚̉ðÁ
103- ‚¨‹C‚É“ü‚è‚ŕҏW’†‚ɃXƒy[ƒXƒL[“ü—Í‚Ì•s‹ï‡‚̏C³
104- ‚µ‚½‚ç‚ÎJBBS‚̉ߋŽƒƒO‚ÉŠÖ‚·‚é•s‹ï‡‚̏C³
105- ƒXƒŒƒbƒh‚̃Šƒ“ƒN‚ŃŒƒX”Ô‚ª‚ ‚é‚à‚̂𓥂ñ‚¾‚Æ‚«‚ɁA‚»‚̃ŒƒX”ԍ†‚܂ŃXƒNƒ[ƒ‹‚·‚é‚悤‚É‚µ‚½B
106102
107103 2004/09/05
108104 Version ÊÞÀ48
--- a/res/ExternalBoardPlugIn/ShitarabaJBBSPlugIn.dpr
+++ b/res/ExternalBoardPlugIn/ShitarabaJBBSPlugIn.dpr
@@ -3,7 +3,7 @@ library ShitarabaJBBSPlugIn;
33 {
44 ShitarabaJBBSPlugIn
55 ‚µ‚½‚ç‚Ώˆ—ƒ†ƒjƒbƒg
6- $Id: ShitarabaJBBSPlugIn.dpr,v 1.36 2004/09/30 11:49:44 h677 Exp $
6+ $Id: ShitarabaJBBSPlugIn.dpr,v 1.33 2004/09/28 12:10:20 h677 Exp $
77 }
88
99 uses
@@ -33,7 +33,7 @@ type
3333
3434 private
3535 function Download : TDownloadState;
36- function StorageDownload(AURL : string) : TDownloadState;
36+ function StorageDownload(Path, Document : string) : TDownloadState;
3737 function Write( inName : string; inMail : string; inMessage : string ) : TDownloadState;
3838 function GetRes( inNo : Integer ) : string;
3939 function GetDat( inNo : Integer ) : string;
@@ -505,14 +505,22 @@ begin
505505 uriList := TStringList.Create;
506506 try
507507 ExtractHttpFields( ['/', '?'], [], uri.Path, uriList );
508- if uriList[ 5 ] = 'l100' then begin
509- FileName := uriList[ 4 ] + '.dat';
510- FilePath := MyLogFolder + uriList[ 2 ] + '\' + uriList[ 3 ] + '\' + uriList[ 4 ] + '.dat';
511- IsLogFile := FileExists( FilePath );
512- end else begin
513- FileName := uriList[ 5 ] + '.dat';
514- FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat';
508+ if (AnsiPos('.html', uri.Document) = 0) then begin //’ʏí
509+ if uriList[ 5 ] = 'l100' then begin
510+ FileName := uriList[ 4 ] + '.dat';
511+ FilePath := MyLogFolder + uriList[ 2 ] + '\' + uriList[ 3 ] + '\' + uriList[ 4 ] + '.dat';
512+ IsLogFile := FileExists( FilePath );
513+ end else begin
514+ FileName := uriList[ 5 ] + '.dat';
515+ FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat';
516+ IsLogFile := FileExists( FilePath );
517+ end;
518+ end else begin //‰ß‹ŽƒƒO
519+ //http://jbbs.livedoor.com/game/1578/storage/1086710948.html
520+ FileName := Copy(uri.Document, 1, Length(uri.Document) - 5) + '.dat';
521+ FilePath := MyLogFolder + CustomStringReplace(CustomStringReplace(uri.Path, '/storage', ''), '/', '\') + FileName;
515522 IsLogFile := FileExists( FilePath );
523+
516524 end;
517525 finally
518526 uri.Free;
@@ -549,109 +557,115 @@ var
549557 logStream : TFileStream;
550558 uri : TIdURI;
551559 uriList : TStringList;
552- datURL, tmpURL : string;
553- tmpText: string;
560+ datURL : string;
561+ tmpText: string;
554562 begin
555563
556564 Result := dsError;
557565
558566 uri := TIdURI.Create( ReadURL );
559- uriList := TStringList.Create;
560- try
561- ExtractHttpFields( ['/', '?'], [], uri.Path, uriList );
562- FileName := uriList[ 5 ] + '.dat';
563- // http://jbbs.livedoor.com/bbs/rawmode.cgi/game/1578/1067968274/l100
564- // protocol://host/1/2/3/4/5/uriList.Count - 1
565- if MyLogFolder = '' then begin
566- // ‚Ç‚±‚É•Û‘¶‚µ‚Ä‚¢‚¢‚Ì‚©•ª‚©‚ç‚È‚¢‚̂ňꎞƒtƒ@ƒCƒ‹‚É•Û‘¶
567- FilePath := TemporaryFile;
568- FIsTemporary := True;
569- end else begin
570- FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat';
571- FIsTemporary := False;
572- end;
573- finally
567+ if(( AnsiPos('.html', uri.Document) >0 ) and ( AnsiPos('/storage/', uri.Path) > 0 )) then begin
568+ //‰ß‹ŽƒƒO
569+ Result := StorageDownload(uri.Path, uri.Document);
574570 uri.Free;
575- uriList.Free;
576- end;
571+ end else begin
572+ //Œ»Ý¶‚«‚Ä‚éƒXƒŒƒbƒh
573+ uriList := TStringList.Create;
574+ try
575+ ExtractHttpFields( ['/', '?'], [], uri.Path, uriList );
576+ FileName := uriList[ 5 ] + '.dat';
577+ // http://jbbs.livedoor.com/bbs/rawmode.cgi/game/1578/1067968274/l100
578+ // protocol://host/1/2/3/4/5/uriList.Count - 1
579+ if MyLogFolder = '' then begin
580+ // ‚Ç‚±‚É•Û‘¶‚µ‚Ä‚¢‚¢‚Ì‚©•ª‚©‚ç‚È‚¢‚̂ňꎞƒtƒ@ƒCƒ‹‚É•Û‘¶
581+ FilePath := TemporaryFile;
582+ FIsTemporary := True;
583+ end else begin
584+ FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat';
585+ FIsTemporary := False;
586+ end;
587+ finally
588+ uri.Free;
589+ uriList.Free;
590+ end;
577591
578- // •Û‘¶—p‚̃fƒBƒŒƒNƒgƒŠ‚ðŒ@‚é
579- ForceDirectoriesEx( Copy( FilePath, 1, LastDelimiter( '\', FilePath ) ) );
592+ // •Û‘¶—p‚̃fƒBƒŒƒNƒgƒŠ‚ðŒ@‚é
593+ ForceDirectoriesEx( Copy( FilePath, 1, LastDelimiter( '\', FilePath ) ) );
580594
581- // “ÆŽ©‚Ƀ_ƒEƒ“ƒ[ƒh‚âƒtƒBƒ‹ƒ^ƒŠƒ“ƒO‚ðs‚í‚È‚¢ê‡‚Í
582- // InternalDownload ‚É”C‚¹‚邱‚Æ‚ªo—ˆ‚é
583- modified := LastModified;
584- datURL := ReadURL + IntToStr( Count + 1 ) + '-'; // V’…‚Ì‚Ý
585- responseCode := InternalDownload( PChar( datURL ), modified, tmp, 0 );
595+ // “ÆŽ©‚Ƀ_ƒEƒ“ƒ[ƒh‚âƒtƒBƒ‹ƒ^ƒŠƒ“ƒO‚ðs‚í‚È‚¢ê‡‚Í
596+ // InternalDownload ‚É”C‚¹‚邱‚Æ‚ªo—ˆ‚é
597+ modified := LastModified;
598+ datURL := ReadURL + IntToStr( Count + 1 ) + '-'; // V’…‚Ì‚Ý
599+ responseCode := InternalDownload( PChar( datURL ), modified, tmp, 0 );
586600
587- try
588- if (responseCode = 200) or (responseCode = 206) then begin
589- downResult := TStringList.Create;
590- try
591- tmpText := CustomStringReplace( string( tmp ), '¡÷¡®', ',' );
592- downResult.Text := EUCtoSJIS( tmpText );
593- ArrangeDownloadData(Count, downResult);
594- if downResult.Count > 0 then begin
595- if FileExists( FilePath ) then
596- logStream := TFileStream.Create( FilePath, fmOpenReadWrite or fmShareDenyWrite )
597- else
598- logStream := TFileStream.Create( FilePath, fmCreate or fmShareDenyWrite );
599- try
600- logStream.Position := logStream.Size;
601- logStream.Write( PChar( downResult.Text )^, Length( downResult.Text ) );
602- finally
603- logStream.Free;
604- end;
601+ try
602+ if (responseCode = 200) or (responseCode = 206) then begin
603+ downResult := TStringList.Create;
604+ try
605+ tmpText := CustomStringReplace( string( tmp ), '¡÷¡®', ',' );
606+ downResult.Text := EUCtoSJIS( tmpText );
607+ ArrangeDownloadData(Count, downResult);
608+ if downResult.Count > 0 then begin
609+ if FileExists( FilePath ) then
610+ logStream := TFileStream.Create( FilePath, fmOpenReadWrite or fmShareDenyWrite )
611+ else
612+ logStream := TFileStream.Create( FilePath, fmCreate or fmShareDenyWrite );
613+ try
614+ logStream.Position := logStream.Size;
615+ logStream.Write( PChar( downResult.Text )^, Length( downResult.Text ) );
616+ finally
617+ logStream.Free;
618+ end;
605619
606- if Count = 0 then
607- // V‹K
608- Result := dsComplete
609- else
610- // ’Ç‹L
611- Result := dsDiffComplete;
620+ if Count = 0 then
621+ // V‹K
622+ Result := dsComplete
623+ else
624+ // ’Ç‹L
625+ Result := dsDiffComplete;
612626
613- Size := Size + Length( downResult.Text );
614- // CGI ‚©‚ç‚͐³‚µ‚¢“ú•t‚ª“¾‚ç‚ê‚È‚¢‚Ì‚ÅŒ»Ý‚ɐݒè
615- LastModified := Now;
627+ Size := Size + Length( downResult.Text );
628+ // CGI ‚©‚ç‚͐³‚µ‚¢“ú•t‚ª“¾‚ç‚ê‚È‚¢‚Ì‚ÅŒ»Ý‚ɐݒè
629+ LastModified := Now;
616630
617631
618632
619- NewReceive := Count + 1;
620- Count := Count + downResult.Count;
621- NewResCount := downResult.Count;
633+ NewReceive := Count + 1;
634+ Count := Count + downResult.Count;
635+ NewResCount := downResult.Count;
622636
623637
624638
625- end else begin
626- Result := dsNotModify;
639+ end else begin
640+ Result := dsNotModify;
641+ end;
642+ finally
643+ downResult.Free;
627644 end;
628- finally
629- downResult.Free;
630- end;
631- end else if responseCode = 302 then begin
632- //http://jbbs.shitaraba.com/bbs/read.cgi/game/3477/1077473358/
633- //http://jbbs.shitaraba.com/game/bbs/read.cgi?BBS=3477&KEY=1077473358
634- //http://jbbs.shitaraba.com/game/3477/storage/1077473358.html
635- //‰ß‹ŽƒƒO
636- //tmpURL := URL;
637- if Assigned( InternalPrint ) then
638- InternalPrint( '‰ß‹ŽƒƒO‘qŒÉ“ü‚è' );
639- uri := TIdURI.Create( ReadURL );
640- uriList := TStringList.Create;
641- try
642- ExtractHttpFields( ['/', '?'], [], uri.Path, uriList );
643- tmpURL := uri.Protocol + '://' + uri.Host +
644- '/' + uriList[3] + '/' + uriList[4] + '/storage/' + uriList[ 5 ] + '.html';
645- finally
646- uriList.Free;
645+ end else if responseCode = 302 then begin
646+ //http://jbbs.shitaraba.com/bbs/read.cgi/game/3477/1077473358/
647+ //http://jbbs.shitaraba.com/game/bbs/read.cgi?BBS=3477&KEY=1077473358
648+ //http://jbbs.shitaraba.com/game/3477/storage/1077473358.html
649+ //‰ß‹ŽƒƒO
650+ uri := TIdURI.Create( ReadURL );
651+ uriList := TStringList.Create;
652+ try
653+ ExtractHttpFields( ['/', '?'], [], uri.Path, uriList );
654+ URL := uri.Protocol + '://' + uri.Host +
655+ '/' + uriList[3] + '/' + uriList[4] + '/storage/' + uriList[ 5 ] + '.html';
656+ finally
657+ uriList.Free;
658+ uri.Free;
659+ end;
660+ uri := TIdURI.Create( ReadURL );
661+ Result := StorageDownload(uri.Path, uri.Document);
647662 uri.Free;
663+ end else if responseCode = 304 then begin
664+ Result := dsNotModify;
648665 end;
649- Result := StorageDownload(tmpURL);
650- end else if responseCode = 304 then begin
651- Result := dsNotModify;
666+ finally
667+ DisposeResultString( tmp );
652668 end;
653- finally
654- DisposeResultString( tmp );
655669 end;
656670
657671 end;
@@ -691,16 +705,17 @@ end;
691705 // ‰ß‹ŽƒƒO—pDownloadŠÖ”
692706 // *************************************************************************
693707 function TShitarabaThreadItem.StorageDownload(
694- AURL : string
708+ Path, Document : string
695709 ) : TDownloadState;
696710 var
697711 modified : Double;
698712 tmp : PChar;
699- uri : TIdURI;
700- uriList : TStringList;
701713 downResult : TStringList;
702714 responseCode : Longint;
703715 logStream : TFileStream;
716+ //uri : TIdURI;
717+ //uriList : TStringList;
718+ datURL : string;
704719 tmpText, tmpLine, tmpTitle: string;
705720 tmpHTML: TStringList;
706721
@@ -709,24 +724,23 @@ var
709724 begin
710725
711726 Result := dsError;
712- uri := TIdURI.Create( ReadURL );
713- uriList := TStringList.Create;
727+
728+ //uri := TIdURI.Create( ReadURL );
714729 try
715- ExtractHttpFields( ['/', '?'], [], uri.Path, uriList );
716- FileName := uriList[ 5 ] + '.dat';
717- // http://jbbs.livedoor.com/bbs/rawmode.cgi/game/1578/1067968274/l100
718- // protocol://host/1/2/3/4/5/uriList.Count - 1
730+ FileName := Copy(Document, 1, Length(Document) - 5) + '.dat';
719731 if MyLogFolder = '' then begin
720732 // ‚Ç‚±‚É•Û‘¶‚µ‚Ä‚¢‚¢‚Ì‚©•ª‚©‚ç‚È‚¢‚̂ňꎞƒtƒ@ƒCƒ‹‚É•Û‘¶
721733 FilePath := TemporaryFile;
722734 FIsTemporary := True;
723735 end else begin
724- FilePath := MyLogFolder + uriList[ 3 ] + '\' + uriList[ 4 ] + '\' + uriList[ 5 ] + '.dat';
736+ FilePath := MyLogFolder
737+ + CustomStringReplace(CustomStringReplace(Path, '/storage', ''), '/', '\')
738+ + FileName;
739+
725740 FIsTemporary := False;
726741 end;
727742 finally
728- uri.Free;
729- uriList.Free;
743+ //uri.Free;
730744 end;
731745
732746 // •Û‘¶—p‚̃fƒBƒŒƒNƒgƒŠ‚ðŒ@‚é
@@ -738,7 +752,8 @@ begin
738752 // InternalDownload ‚É”C‚¹‚邱‚Æ‚ªo—ˆ‚é
739753 modified := LastModified;
740754
741- responseCode := InternalDownload( PChar( AURL ), modified, tmp, 0 );
755+ datURL := ReadURL;
756+ responseCode := InternalDownload( PChar( datURL ), modified, tmp, 0 );
742757
743758 try
744759 if (responseCode = 200) or (responseCode = 206) then begin
@@ -1163,12 +1178,19 @@ begin
11631178 if (tmphost = BBS_HOST_OLD) or (tmphost = BBS_HOST_OLD2) then
11641179 tmphost := BBS_HOST;
11651180
1166- FileName := uriList[ 5 ] + '.dat';
1167- // http://jbbs.livedoor.com/bbs/read.cgi/computer/351/1090404452/l100
1168- // http://jbbs.livedoor.com/bbs/read.cgi/game/1578/1067968274/l100
1169- // http://jbbs.livedoor.com/game/1000/subject.txt
1170- Result := CreateResultString(
1171- uri.Protocol + '://' + tmphost + '/' + uriList[ 3 ] + '/' + uriList[ 4 ] + '/' );
1181+ if( AnsiPos('.html', uri.Document) = 0 ) then begin //’ʏí
1182+ FileName := uriList[ 5 ] + '.dat';
1183+ // http://jbbs.livedoor.com/bbs/read.cgi/computer/351/1090404452/l100
1184+ // http://jbbs.livedoor.com/bbs/read.cgi/game/1578/1067968274/l100
1185+ // http://jbbs.livedoor.com/game/1000/subject.txt
1186+ Result := CreateResultString(
1187+ uri.Protocol + '://' + tmphost + '/' + uriList[ 3 ] + '/' + uriList[ 4 ] + '/' );
1188+ end else begin
1189+ //http://jbbs.livedoor.com/game/1578/storage/1086710948.html
1190+ Result := CreateResultString(
1191+ uri.Protocol + '://' + tmphost + CustomStringReplace(uri.Path, '/storage', ''));
1192+ end;
1193+
11721194 finally
11731195 uri.Free;
11741196 uriList.Free;
@@ -1265,8 +1287,7 @@ begin
12651287 end else if AnsiPos(THREAD_MARK, URL) = 0 then begin
12661288 //ƒRƒR‚ʼnߋŽƒƒO‚©‚Ç‚¤‚©ƒ`ƒFƒbƒNH
12671289 if(AnsiPos('.html/', uri.Path) > 0) then begin
1268- Result := uri.Protocol + '://' + tmphost + THREAD_MARK +
1269- CustomStringReplace(CustomStringReplace(uri.Path, '/storage', ''), '.html/', '/') + 'l100';
1290+ Result := uri.Protocol + '://' + tmphost + Copy(uri.Path, 1, Length(uri.Path) - 1);
12701291 end else
12711292 Result := URL;
12721293 end;
@@ -1334,6 +1355,12 @@ begin
13341355 Result :=
13351356 uri.Protocol + '://' + tmphost + '/bbs/rawmode.cgi/' +
13361357 uriList[ 3 ] + '/' + uriList[ 4 ] + '/' + uriList[ 5 ] + '/';
1358+ end else if AnsiPos(THREAD_MARK, URL) = 0 then begin
1359+ //ƒRƒR‚ʼnߋŽƒƒO‚©‚Ç‚¤‚©ƒ`ƒFƒbƒNH
1360+ if(AnsiPos('.html/', uri.Path) > 0) then begin
1361+ Result := uri.Protocol + '://' + tmphost + Copy(uri.Path, 1, Length(uri.Path) - 1);
1362+ end else
1363+ Result := URL;
13371364 end;
13381365 finally
13391366 uri.Free;