Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/GikoSystem.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.194 by h677, Sun Aug 21 09:56:53 2005 UTC revision 1.195 by h677, Mon Aug 22 14:23:37 2005 UTC
# Line 14  uses Line 14  uses
14  {$IFEND}  {$IFEND}
15          {HttpApp,} YofUtils, URLMon, IdGlobal, IdURI, {Masks,}          {HttpApp,} YofUtils, URLMon, IdGlobal, IdURI, {Masks,}
16          Setting, BoardGroup, gzip, Dolib, bmRegExp, AbonUnit,          Setting, BoardGroup, gzip, Dolib, bmRegExp, AbonUnit,
17          MojuUtils, ExternalBoardManager, ExternalBoardPlugInMain,          ExternalBoardManager, ExternalBoardPlugInMain,
18          Sort, GikoBayesian;          Sort, GikoBayesian;
19    
20  type  type
# Line 165  type Line 165  type
165                  function AddAnchorTag(s: string): string;                  function AddAnchorTag(s: string): string;
166    
167                  function DivideSubject(Line: string): TSubjectRec;                  function DivideSubject(Line: string): TSubjectRec;
                 function DivideStrLine(Line: string): TResRec;  
168    
169                  property Setting: TSetting read FSetting write FSetting;                  property Setting: TSetting read FSetting write FSetting;
170                  property Dolib: TDolib read FDolib write FDolib;                  property Dolib: TDolib read FDolib write FDolib;
# Line 186  type Line 185  type
185    
186                  procedure MenuFont(Font: TFont);                  procedure MenuFont(Font: TFont);
187    
                 function RemoveToken(var s:string; const delimiter:string):string;  
188                  function GetTokenIndex(s: string; delimiter: string; index: Integer): string;                  function GetTokenIndex(s: string; delimiter: string; index: Integer): string;
189                  function DeleteLink(const s: string): string;                  function DeleteLink(const s: string): string;
190    
# Line 269  const Line 267  const
267  implementation  implementation
268    
269  uses  uses
270          Giko, RoundData, Favorite, Registry, HTMLCreate;          Giko, RoundData, Favorite, Registry, HTMLCreate, MojuUtils;
271    
272  const  const
273          FOLDER_INDEX_VERSION                                    = '1.01';          FOLDER_INDEX_VERSION                                    = '1.01';
# Line 1160  begin Line 1158  begin
1158          end;          end;
1159  end;  end;
1160    
 (*************************************************************************  
  * datファイルの一ラインを分解  
  *************************************************************************)  
 function TGikoSys.DivideStrLine(Line: string): TResRec;  
 var  
         Delim: string;  
 begin  
         if AnsiPos('<>', Line) = 0 then begin  
                 //Delim := ',';  
                 //Result.FType := glt2chOld;  
         Line := CustomStringReplace(Line, '<>', '&lt;&gt;');  
                 Line := CustomStringReplace(Line, ',', '<>');  
                 Line := CustomStringReplace(Line, '@`', ',');  
         end;  
         Delim := '<>';  
         Result.FType := glt2chNew;  
         //Trimしてはいけない気がする byもじゅ  
         Result.FName := RemoveToken(Line, Delim);  
         Result.FMailTo := RemoveToken(Line, Delim);  
         Result.FDateTime := RemoveToken(Line, Delim);  
         Result.FBody := RemoveToken(Line, Delim);  
         //空だと問題が起きるから、空白を設定する  
         if Result.FBody = '' then begin  
                 Result.FBody := '&nbsp;';  
         end else if ( Result.FBody[1] = ' ' ) then begin  
                 //2ちゃんねるとかだと、本文の先頭に1つ半角空白が入っているので削除する  
                 //他の掲示板で、レス自体の空白かもしれないけどそれは諦める  
                 Delete(Result.FBody, 1, 1);  
         end;  
         //Result.FTitle := Trim(RemoveToken(Line, Delim));  
         Result.FTitle := RemoveToken(Line, Delim);  
   
 end;  
1161    
1162  (*************************************************************************  (*************************************************************************
1163   * URLからBBSIDを取得   * URLからBBSIDを取得
# Line 1398  begin Line 1363  begin
1363                  Font.Style := Font.Style + [fsItalic];                  Font.Style := Font.Style + [fsItalic];
1364  end;  end;
1365    
 (*************************************************************************  
  *  
  *どこかのサイトからのパクリ  
  *************************************************************************)  
 function TGikoSys.RemoveToken(var s: string;const delimiter: string): string;  
 var  
         p: Integer;  
 begin  
         p := AnsiPos(delimiter, s);  
         if p = 0 then  
                 Result := s  
         else  
                 Result := Copy(s, 1, p - 1);  
         Delete(s, 1, Length(Result) + Length(delimiter));  
 end;  
1366    
1367  (*************************************************************************  (*************************************************************************
1368   *   *

Legend:
Removed from v.1.194  
changed lines
  Added in v.1.195

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26