From 1cb3636849553dd53cac5b60e2a63867cca34721 Mon Sep 17 00:00:00 2001 From: h677 Date: Tue, 20 Apr 2004 12:16:06 +0000 Subject: [PATCH] =?utf8?q?=E5=8B=95=E4=BD=9C=E3=81=AE=E6=9C=80=E9=81=A9?= =?utf8?q?=E5=8C=96=EF=BC=88=E3=81=9F=E3=81=B6=E3=82=93=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- BoardGroup.pas | 80 ++++++++++++++++++++++++++++----------------------------- GikoSystem.pas | 50 ++++++++++++++++++++++++++++-------- gikoNavi.res | Bin 4288 -> 4288 bytes 3 files changed, 79 insertions(+), 51 deletions(-) diff --git a/BoardGroup.pas b/BoardGroup.pas index 1a00430..99c8f72 100644 --- a/BoardGroup.pas +++ b/BoardGroup.pas @@ -92,18 +92,18 @@ type procedure Delete(index: integer); procedure Clear; override; function Find(key: string): TCategory; - function FindBBSID(BBSID: string): TBoard; - function FindBoardFromTitle(Title: string): TBoard; - function FindBoardFromURL(inURL: string): TBoard; - function FindThreadFromURL( inURL : string ) : TThreadItem; - function FindThreadItem(BBSID: string; FileName: string): TThreadItem; - function FindCategoryFromTitle( inTitle : string ) : TCategory; + function FindBBSID(const BBSID: string): TBoard; + function FindBoardFromTitle(const Title: string): TBoard; + function FindBoardFromURL(const inURL: string): TBoard; + function FindThreadFromURL(const inURL : string ) : TThreadItem; + function FindThreadItem(const BBSID, FileName: string): TThreadItem; + function FindCategoryFromTitle(const inTitle : string ) : TCategory; property FilePath : string read FFilePath write FFilePath; property Items[index: integer]: TCategory read GetCategory write SetCategory; property Title: string read FTitle write FTitle; property NodeExpand: Boolean read FExpand write FExpand; - + property KubetsuChk: Boolean read FKubetsuChk write FKubetsuChk; property SelectText: string read FSelectText write SetSelectText; property ShortSelectText: string read FShortSelectText write FShortSelectText; @@ -133,11 +133,11 @@ type function Add(item: TBoard): integer; procedure Delete(index: integer); procedure Clear; override; - function FindName(key: string): TBoard; - function FindBBSID(BBSID: string): TBoard; - function FindBoardFromTitle(Title: string): TBoard; - function FindBoardFromURL(inURL: string): TBoard; - function FindThreadFromURL( inURL : string ) : TThreadItem; + function FindName(const key: string): TBoard; + function FindBBSID(const BBSID: string): TBoard; + function FindBoardFromTitle(const Title: string): TBoard; + function FindBoardFromURL(const inURL: string): TBoard; + function FindThreadFromURL(const inURL : string ) : TThreadItem; function IsMidoku: Boolean; property NodeExpand: Boolean read FExpand write FExpand; @@ -219,10 +219,10 @@ type procedure Delete(index: integer); procedure DeleteList(index: integer); procedure Clear; override; - function FindThreadFromFileName(ItemFileName: string): TThreadItem; - function FindThreadFromURL( inURL : string ) : TThreadItem; - function GetIndexFromFileName(ItemFileName: string): Integer; - function GetIndexFromURL(URL: string): Integer; + function FindThreadFromFileName(const ItemFileName: string): TThreadItem; + function FindThreadFromURL(const inURL : string ) : TThreadItem; + function GetIndexFromFileName(const ItemFileName: string): Integer; + function GetIndexFromURL(const URL: string): Integer; procedure LoadSettings; procedure SaveSettings; function GetReadCgiURL: string; @@ -284,12 +284,12 @@ type procedure SetLastModified(d: TDateTime); procedure SetRound(b: Boolean); - procedure SetRoundName(s: string); + procedure SetRoundName(const s: string); procedure SetKokomade(i: Integer); procedure SetUnRead(b: Boolean); procedure SetScrollTop(i: Integer); procedure Init; - function GetCreateDate: TDateTime; + function GetCreateDate: TDateTime; public constructor Create( inPlugIn : TBoardPlugIn; inURL : string ); destructor Destroy; override; @@ -297,7 +297,7 @@ type function GetDatURL: string; function GetDatgzURL: string; // function GetOldDatgzURL: string; - function GetOfflawCgiURL(SessionID: string): string; + function GetOfflawCgiURL(const SessionID: string): string; function GetSendURL: string; procedure DeleteLogFile; function GetThreadFileName: string; @@ -330,7 +330,7 @@ type property DownloadHost: string read FDownloadHost write FDownloadHost; property AgeSage: TGikoAgeSage read FAgeSage write FAgeSage; // property SPID: string read FSPID write FSPID; - property CreateDate: TDateTime read GetCreateDate; + property CreateDate: TDateTime read GetCreateDate; property URL : string read FURL write FURL; property BoardPlugIn : TBoardPlugIn read FBoardPlugIn; property FilePath : string read FFilePath write FFilePath; @@ -359,7 +359,7 @@ type function BBSsFindBoardFromBBSID( inBBSID : string ) : TBoard; function BBSsFindBoardFromURL( inURL : string ) : TBoard; function BBSsFindBoardFromTitle( inTitle : string ) : TBoard; - function BBSsFindThreadFromURL( inURL : string ) : TThreadItem; + function BBSsFindThreadFromURL(const inURL : string ) : TThreadItem; function ConvertDateTimeString( inDateTimeString : string) : TDateTime; var @@ -432,7 +432,7 @@ begin end; function BBSsFindThreadFromURL( - inURL : string + const inURL : string ) : TThreadItem; var board : TBoard; @@ -511,7 +511,7 @@ begin Result := nil; end; -function TBBS.FindBBSID(BBSID: string): TBoard; +function TBBS.FindBBSID(const BBSID: string): TBoard; var i : Integer; begin @@ -528,7 +528,7 @@ end; //************************************************************************* // ƒ^ƒCƒgƒ‹‚̈ê’v‚·‚锂ð’T‚· //*************************************************************************) -function TBBS.FindBoardFromTitle(Title: string): TBoard; +function TBBS.FindBoardFromTitle(const Title: string): TBoard; var i: Integer; begin @@ -545,7 +545,7 @@ end; //************************************************************************* // URL ‚ðŽó‚¯•t‚¯‚锂ð’T‚· //*************************************************************************) -function TBBS.FindBoardFromURL(inURL: string): TBoard; +function TBBS.FindBoardFromURL(const inURL: string): TBoard; var i : Integer; begin @@ -562,7 +562,7 @@ end; //************************************************************************* // URL ‚ðŽó‚¯•t‚¯‚éƒXƒŒƒbƒh‚ð’T‚· //*************************************************************************) -function TBBS.FindThreadFromURL(inURL: string): TThreadItem; +function TBBS.FindThreadFromURL(const inURL: string): TThreadItem; var board : TBoard; boardURL : string; @@ -577,7 +577,7 @@ begin end; -function TBBS.FindThreadItem(BBSID: string; FileName: string): TThreadItem; +function TBBS.FindThreadItem(const BBSID, FileName: string): TThreadItem; var Board: TBoard; begin @@ -588,7 +588,7 @@ begin Result := Board.FindThreadFromFileName(FileName); end; -function TBBS.FindCategoryFromTitle( inTitle : string ) : TCategory; +function TBBS.FindCategoryFromTitle(const inTitle : string ) : TCategory; var i : Integer; begin @@ -664,15 +664,15 @@ var begin for i := Count - 1 downto 0 do Delete(i); - Capacity := Count; + Capacity := Count; end; -function TCategory.FindName(key: string): TBoard; +function TCategory.FindName(const key: string): TBoard; begin Result := nil; end; -function TCategory.FindBBSID(BBSID: string): TBoard; +function TCategory.FindBBSID(const BBSID: string): TBoard; var i : integer; begin @@ -688,7 +688,7 @@ end; //************************************************************************* // ƒ^ƒCƒgƒ‹‚̈ê’v‚·‚锂ð’T‚· //*************************************************************************) -function TCategory.FindBoardFromTitle(Title: string): TBoard; +function TCategory.FindBoardFromTitle(const Title: string): TBoard; var i : integer; begin @@ -704,7 +704,7 @@ end; //************************************************************************* // URL ‚ðŽó‚¯•t‚¯‚锂ð’T‚· //*************************************************************************) -function TCategory.FindBoardFromURL(inURL: string): TBoard; +function TCategory.FindBoardFromURL(const inURL: string): TBoard; var i : Integer; begin @@ -718,7 +718,7 @@ end; //************************************************************************* // URL ‚ðŽó‚¯•t‚¯‚éƒXƒŒƒbƒh‚ð’T‚· //*************************************************************************) -function TCategory.FindThreadFromURL(inURL: string): TThreadItem; +function TCategory.FindThreadFromURL(const inURL: string): TThreadItem; var board : TBoard; boardURL : string; @@ -908,7 +908,7 @@ begin Capacity := Count; end; -function TBoard.FindThreadFromFileName(ItemFileName: string): TThreadItem; +function TBoard.FindThreadFromFileName(const ItemFileName: string): TThreadItem; var i: integer; begin @@ -921,7 +921,7 @@ begin end; end; -function TBoard.GetIndexFromFileName(ItemFileName: string): Integer; +function TBoard.GetIndexFromFileName(const ItemFileName: string): Integer; var i: integer; begin @@ -934,12 +934,12 @@ begin end; end; -function TBoard.GetIndexFromURL(URL: string): Integer; +function TBoard.GetIndexFromURL(const URL: string): Integer; begin Result := IndexOf( URL ); end; -function TBoard.FindThreadFromURL( inURL : string ) : TThreadItem; +function TBoard.FindThreadFromURL(const inURL : string ) : TThreadItem; var i : Integer; begin @@ -1591,7 +1591,7 @@ begin end; end;} -function TThreadItem.GetOfflawCgiURL(SessionID: string): string; +function TThreadItem.GetOfflawCgiURL(const SessionID: string): string; //var // Protocol, Host, Path, Document, Port, Bookmark: string; begin @@ -1686,7 +1686,7 @@ begin ParentBoard.FModified := True; end; -procedure TThreadItem.SetRoundName(s: string); +procedure TThreadItem.SetRoundName(const s: string); begin if FRoundName = s then Exit; FRoundName := s; diff --git a/GikoSystem.pas b/GikoSystem.pas index c7a598a..9c26b06 100644 --- a/GikoSystem.pas +++ b/GikoSystem.pas @@ -160,9 +160,8 @@ type procedure MenuFont(Font: TFont); - function RemoveToken(var s:string;delimiter:string):string; + function RemoveToken(var s:string; const delimiter:string):string; function GetTokenIndex(s: string; delimiter: string; index: Integer): string; - function DeleteLink(const s: string): string; function GetShortName(const LongName: string; ALength: integer): string; @@ -217,7 +216,7 @@ const ZERO_DATE: Integer = 25569; BETA_VERSION_NAME_E = 'beta'; BETA_VERSION_NAME_J = 'ÊÞÀ'; - BETA_VERSION = 47; + BETA_VERSION = 48; BETA_VERSION_BUILD = ''; //debug”Å‚È‚Ç APP_NAME = 'gikoNavi'; @@ -509,7 +508,7 @@ var begin if Board.IsThreadDatRead then Exit; - Board.Clear; + //Board.Clear; UnRead := 0; // TmpUpdate := False; @@ -538,8 +537,9 @@ begin GetFileList(ExtractFileDir(Board.GetFolderIndexFileName), '*.tmp', TmpFileList, False, False); // d•¡‚ð–h‚® + Board.BeginUpdate; Board.Sorted := True; - + sl := TStringList.Create; try if FileExists(FileName) then begin @@ -670,6 +670,7 @@ begin ThreadItem.EndUpdate; Board.Add(ThreadItem); end; + Board.EndUpdate; finally sl.Free; FileList.Free; @@ -827,11 +828,11 @@ begin end; function TGikoSys.ParseIndexLine(Line: string): TIndexRec; -var - s: string; - i: Integer; +//var +// s: string; +// i: Integer; begin - for i := 0 to 14 do begin + {for i := 0 to 14 do begin s := GetTokenIndex(Line, #1, i); case i of 0: Result.FNo := StrToIntDef('$' + s, 0); @@ -851,6 +852,23 @@ begin 14: Result.FAgeSage := TGikoAgeSage(StrToIntDef('$' + s, 0)); end; end; + } + Result.FNo := StrToIntDef('$' + RemoveToken(Line, #1), 0); + Result.FFileName := RemoveToken(Line, #1); + Result.FTitle := RemoveToken(Line, #1); + Result.FCount := StrToIntDef('$' + RemoveToken(Line, #1), 0); + Result.FSize := StrToIntDef('$' + RemoveToken(Line, #1), 0); + Result.FRoundDate := IntToDateTime(StrToIntDef('$' + RemoveToken(Line, #1), ZERO_DATE)); + Result.FLastModified := IntToDateTime(StrToIntDef('$' + RemoveToken(Line, #1), ZERO_DATE)); + Result.FKokomade := StrToIntDef('$' + RemoveToken(Line, #1), -1); + Result.FNewReceive := StrToIntDef('$' + RemoveToken(Line, #1), 0); + RemoveToken(Line, #1);//9: ; //–¢Žg—p + Result.FUnRead := IntToBool(StrToIntDef('$' + RemoveToken(Line, #1), 0)); + Result.FScrollTop := StrToIntDef('$' + RemoveToken(Line, #1), 0); + Result.FAllResCount := StrToIntDef('$' + RemoveToken(Line, #1), 0); + Result.FNewResCount := StrToIntDef('$' + RemoveToken(Line, #1), 0); + Result.FAgeSage := TGikoAgeSage(StrToIntDef('$' + RemoveToken(Line, #1), 0)); + end; //Žw’èƒtƒHƒ‹ƒ_“à‚ÌŽw’èƒtƒ@ƒCƒ‹ˆê——‚ðŽæ“¾‚·‚é @@ -1526,9 +1544,12 @@ begin Delim := ',' else Delim := '<>'; - + { Result.FFileName := GetTokenIndex(Line, Delim, 0); Result.FTitle := GetTokenIndex(Line, Delim, 1); + } + Result.FFileName := RemoveToken(Line, Delim); + Result.FTitle := RemoveToken(Line, Delim); ws := Trim(Result.FTitle); @@ -1569,10 +1590,17 @@ begin Delim := '<>'; Result.FType := glt2chNew; end; + { Result.FName := Trim(GetTokenIndex(Line, Delim, 0)); Result.FMailTo := Trim(GetTokenIndex(Line, Delim, 1)); Result.FDateTime := Trim(GetTokenIndex(Line, Delim, 2)); bufBody := Trim(GetTokenIndex(Line, Delim, 3)); + } + Result.FName := Trim(RemoveToken(Line, Delim)); + Result.FMailTo := Trim(RemoveToken(Line, Delim)); + Result.FDateTime := Trim(RemoveToken(Line, Delim)); + bufBody := Trim(RemoveToken(Line, Delim)); + if bufbody = '' then begin Insert(' ',bufbody, 1); end; @@ -1786,7 +1814,7 @@ end; * *‚Ç‚±‚©‚̃TƒCƒg‚©‚ç‚̃pƒNƒŠ *************************************************************************) -function TGikoSys.RemoveToken(var s: string; delimiter: string): string; +function TGikoSys.RemoveToken(var s: string;const delimiter: string): string; var p: Integer; begin diff --git a/gikoNavi.res b/gikoNavi.res index 0cf9c8b8ce04897f0c1703d0a5dfa115a8d21d53..6edadd599ea70e38ef57d048d969ac0fab90f016 100644 GIT binary patch delta 28 jcmX@0ctCN(8(z-Wj0`})$nbjdSKi-@hMPa~oo569mdOf{ delta 28 jcmX@0ctCN(8(z*=j0`})$na|NSKi-@2Ae