From f9675aa5eb4d28505bcab5d8c2acdfeb99d860dc Mon Sep 17 00:00:00 2001 From: yoffy Date: Thu, 20 Nov 2003 10:45:06 +0000 Subject: [PATCH] =?utf8?q?=E3=83=BB=E9=80=8F=E6=98=8E=E3=81=82=E3=81=BC?= =?utf8?q?=E3=83=BC=E3=82=93=E6=99=82=E3=81=AB=E3=83=AC=E3=82=B9=E7=95=AA?= =?utf8?q?=E3=81=8C=E3=81=9A=E3=82=8C=E3=82=8B=E4=BA=8B=E3=81=AF=E7=84=A1?= =?utf8?q?=E3=81=84=E3=82=88=E3=81=86=E3=81=AA=E3=81=AE=E3=81=A7=E3=81=82?= =?utf8?q?=E3=81=BC=E3=83=BC=E3=82=93=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF?= =?utf8?q?=E3=82=92=E5=BB=83=E6=AD=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- res/ExternalBoardPlugIn/MachiBBSPlugIn.dpr | 51 +++++++----------------------- 1 file changed, 11 insertions(+), 40 deletions(-) diff --git a/res/ExternalBoardPlugIn/MachiBBSPlugIn.dpr b/res/ExternalBoardPlugIn/MachiBBSPlugIn.dpr index 3d983c6..7ed4b42 100644 --- a/res/ExternalBoardPlugIn/MachiBBSPlugIn.dpr +++ b/res/ExternalBoardPlugIn/MachiBBSPlugIn.dpr @@ -79,7 +79,7 @@ const MAJOR_VERSION = 1; MINOR_VERSION = 0; RELEASE_VERSION = 'beta'; - REVISION_VERSION = 6; + REVISION_VERSION = 7; // ========================================================================= // ŽG—pŠÖ” @@ -433,17 +433,16 @@ begin 'BBS=' + uriList.Values[ 'BBS' ] + '&KEY=' + uriList.Values[ 'KEY' ] + '&START=' + IntToStr( 1 ) else - // V’… - 1 ‚©‚ç + // V’…‚Ì‚Ý datURL := uri.Protocol + '://' + uri.Host + '/bbs/read.pl?' + 'BBS=' + uriList.Values[ 'BBS' ] + '&KEY=' + uriList.Values[ 'KEY' ] + - '&START=' + IntToStr( Count ) + '&NOFIRST=TRUE'; + '&START=' + IntToStr( Count + 1 ) + '&NOFIRST=TRUE'; + // ƒ_ƒEƒ“ƒ[ƒh downAndParse; if content.Count > 0 then begin - LoadDat; - - if FDat = nil then begin + if Count <= 0 then begin Result := dsComplete; // V‹K‘‚«ž‚Ý content[ 0 ] := content[ 0 ] + Title; @@ -457,47 +456,20 @@ begin NewReceive := 1; Count := content.Count; end else begin - // ‚ ‚ځ[‚ñ‚ª–³‚¢‚©”äŠr‚·‚é - if FDat[ FDat.Count - 1 ] = content[ 0 ] then begin - // ‚ ‚ځ[‚ñ‚ª–³‚¢‚̂ŏd•¡‚ðíœ - content.Delete( 0 ); - - if content.Count > 0 then begin - Result := dsDiffComplete; - // ’Ç‹L - logStream := TFileStream.Create( FilePath, fmOpenReadWrite or fmShareDenyWrite ); - try - logStream.Position := logStream.Size; - logStream.Write( PChar( content.Text )^, Length( content.Text ) ); - finally - logStream.Free; - end; - NewReceive := Count + 1; - Count := Count + content.Count; - end else begin - Result := dsNotModify; - end; - end else begin + if content.Count > 0 then begin Result := dsDiffComplete; - // ‚ ‚ځ[‚ñ‚ðŒŸo‚µ‚½‚Ì‚Å•s‘«•ª‚ðƒ_ƒEƒ“ƒ[ƒh - modified := LastModified; - // 1 ‚©‚çV’… - 1 ‚Ü‚Å - datURL := - uri.Protocol + '://' + uri.Host + '/bbs/read.pl?' + - 'BBS=' + uriList.Values[ 'BBS' ] + '&KEY=' + uriList.Values[ 'KEY' ] + - '&START=' + IntToStr( 1 ) + '&END=' + IntToStr( Count - 1 ) + '&NOFIRST=TRUE'; - downAndParse; - - // ·•ªŠÜ‚ߐV‹K‘‚«ž‚Ý - logStream := TFileStream.Create( FilePath, fmCreate or fmShareDenyWrite ); + // ’Ç‹L + logStream := TFileStream.Create( FilePath, fmOpenReadWrite or fmShareDenyWrite ); try logStream.Position := logStream.Size; logStream.Write( PChar( content.Text )^, Length( content.Text ) ); finally logStream.Free; end; - Count := content.Count; NewReceive := Count + 1; + Count := Count + content.Count; + end else begin + Result := dsNotModify; end; end; @@ -511,7 +483,6 @@ begin uri.Free; uriList.Free; content.Free; - FreeDat; end; end; -- 2.11.0