OSDN Git Service

・外部板の名前に拡張子がつかないように変更。
authoryoffy <yoffy>
Sun, 23 Nov 2003 05:45:31 +0000 (05:45 +0000)
committeryoffy <yoffy>
Sun, 23 Nov 2003 05:45:31 +0000 (05:45 +0000)
GikoSystem.pas

index 081b075..201ad1e 100644 (file)
@@ -2728,18 +2728,18 @@ var
        inistr: string;
        RoundItem: TRoundItem;
 
-  // BBS \94z\97ñ(1 \83{\81[\83h\83t\83@\83C\83\8b\82É\82Â\82« 1 \8d\80\96Ú)
-  bbsList                              : array of TStringList;
+       // BBS \94z\97ñ(1 \83{\81[\83h\83t\83@\83C\83\8b\82É\82Â\82« 1 \8d\80\96Ú)
+       bbsList                         : array of TStringList;
        boardFileList   : TStringList;
 
-  i, iBound                    : Integer;
-  j, jBound                    : Integer;
+       i, iBound                       : Integer;
+       j, jBound                       : Integer;
        k, kBound                       : Integer;
-  l, lBound                    : Integer;
+       l, lBound                       : Integer;
 begin
        ini := TMemIniFile.Create('');
        try
-       // BBS \82Ì\8aJ\95ú
+               // BBS \82Ì\8aJ\95ú
                try
                        for i := 0 to Length( BBSs ) - 1 do
                                BBSs[ i ].Free;
@@ -2749,115 +2749,115 @@ begin
 
                // \94Â\83\8a\83X\83g\82Ì\97ñ\8b\93
                if FileExists( GikoSys.GetBoardFileName ) then begin
-       l                                                               := Length( bbsList );
-      SetLength( bbsList, l + 1 );
-      bbsList[ l ]             := TStringList.Create;
-      bbsList[ l ].LoadFromFile( GikoSys.GetBoardFileName );
-
-      SetLength( BBSs, l + 1 );
-      BBSs[ l ]                                := TBBS.Create( GikoSys.Setting.LogFolder );
-      BBSs[ l ].Title  := '\82Q\82¿\82á\82ñ\82Ë\82é';
-    end;
+                       l                                                               := Length( bbsList );
+                       SetLength( bbsList, l + 1 );
+                       bbsList[ l ]            := TStringList.Create;
+                       bbsList[ l ].LoadFromFile( GikoSys.GetBoardFileName );
+
+                       SetLength( BBSs, l + 1 );
+                       BBSs[ l ]                               := TBBS.Create( GikoSys.Setting.LogFolder );
+                       BBSs[ l ].Title := '\82Q\82¿\82á\82ñ\82Ë\82é';
+               end;
 
                if FileExists( GikoSys.GetCustomBoardFileName ) then begin
-       l                                                               := Length( bbsList );
-      SetLength( bbsList, l + 1 );
-      bbsList[ l ]             := TStringList.Create;
-      bbsList[ l ].LoadFromFile( GikoSys.GetCustomBoardFileName );
-
-      SetLength( BBSs, l + 1 );
-      BBSs[ l ]                                := TBBS.Create( GikoSys.Setting.LogFolder );
-      BBSs[ l ].Title  := '\82»\82Ì\91¼';
-    end;
+                       l                                                               := Length( bbsList );
+                       SetLength( bbsList, l + 1 );
+                       bbsList[ l ]            := TStringList.Create;
+                       bbsList[ l ].LoadFromFile( GikoSys.GetCustomBoardFileName );
+
+                       SetLength( BBSs, l + 1 );
+                       BBSs[ l ]                               := TBBS.Create( GikoSys.Setting.LogFolder );
+                       BBSs[ l ].Title := '\82»\82Ì\91¼';
+               end;
 
                // Board \83t\83H\83\8b\83_
                if DirectoryExists( GikoSys.Setting.GetBoardDir ) then begin
                        BoardFileList := TStringList.Create;
-      try
-        GikoSys.GetFileList( GikoSys.Setting.GetBoardDir, '*', BoardFileList, True, True );
-        l := Length( bbsList );
-        for i := BoardFileList.Count - 1 downto 0 do begin
-          SetLength( bbsList, l + 1 );
-          bbsList[ l ]         := TStringList.Create;
-          bbsList[ l ].LoadFromFile( BoardFileList[ i ] );
-
-          SetLength( BBSs, l + 1 );
-          BBSs[ l ]                            := TBBS.Create( GikoSys.Setting.LogFolder );
-          BBSs[ l ].Title      := ExtractFileName( BoardFileList[ i ] );
-
-          Inc( l );
-        end;
-      finally
-       BoardFileList.Free;
-      end;
+                       try
+                               GikoSys.GetFileList( GikoSys.Setting.GetBoardDir, '*', BoardFileList, True, True );
+                               l := Length( bbsList );
+                               for i := BoardFileList.Count - 1 downto 0 do begin
+                                       SetLength( bbsList, l + 1 );
+                                       bbsList[ l ]            := TStringList.Create;
+                                       bbsList[ l ].LoadFromFile( BoardFileList[ i ] );
+
+                                       SetLength( BBSs, l + 1 );
+                                       BBSs[ l ]                               := TBBS.Create( GikoSys.Setting.LogFolder );
+                                       BBSs[ l ].Title := ChangeFileExt( ExtractFileName( BoardFileList[ i ] ), '' );
+
+                                       Inc( l );
+                               end;
+                       finally
+                               BoardFileList.Free;
+                       end;
                end;
 
-    lBound := Length( bbsList ) - 1;
-    for l := 0 to lBound do begin
+               lBound := Length( bbsList ) - 1;
+               for l := 0 to lBound do begin
                        ini.SetStrings( bbsList[ l ] );
-      CategoryList     := TStringList.Create;
-      BoardList                        := TStringList.Create;
-      try
-        ini.ReadSections( CategoryList );
-
-        iBound := CategoryList.Count - 1;
-        for i := 0 to iBound do begin
-          ini.ReadSection( CategoryList[i], BoardList );
-          Category                             := TCategory.Create;
-          Category.No                  := i + 1;
-          Category.Title       := CategoryList[i];
-
-          jBound := BoardList.Count - 1;
-          for j := 0 to jBound do begin
-            Board := nil;
-            inistr := ini.ReadString(CategoryList[i], BoardList[j], '');
-
-            //===== \83v\83\89\83O\83C\83\93
-            try
-              kBound := Length( BoardPlugIns ) - 1;
-              for k := 0 to kBound do begin
-                if Assigned( Pointer( BoardPlugIns[ k ].Module ) ) then begin
-                  if BoardPlugIns[ k ].AcceptURL( inistr ) = atBoard then begin
-                    Board := TBoard.Create( BoardPlugIns[ k ], inistr );
-
-                    Break;
-                  end;
-                end;
-              end;
-            except
-              // exception \82ª\94­\90\82µ\82½\8fê\8d\87\82Í\93à\95\94\8f\88\97\9d\82É\94C\82¹\82½\82¢\82Ì\82Å\82±\82±\82Å\82Í\89½\82à\82µ\82È\82¢
-            end;
-
-            if Board = nil then
-              Board := TBoard.Create( nil, inistr );
-            Board.BeginUpdate;
-            Board.No := j + 1;
-            Board.Title := BoardList[j];
-            Board.BBSID := GikoSys.UrlToID(inistr);
-            Board.RoundDate := ZERO_DATE;
-
-            idx := RoundList.Find(Board);
-            if idx <> -1 then begin
-              RoundItem                                := RoundList.Items[idx, grtBoard];
-              Board.Round                      := True;
-              Board.RoundName  := RoundItem.RoundName;
-            end;
-            Category.Add(Board);
-            Board.EndUpdate;
-          end;
-
-          BBSs[ l ].Add( Category );
-        end;
-      finally
-        BoardList.Free;
-        CategoryList.Free;
-      end;
-    end;
+                       CategoryList    := TStringList.Create;
+                       BoardList                       := TStringList.Create;
+                       try
+                               ini.ReadSections( CategoryList );
+
+                               iBound := CategoryList.Count - 1;
+                               for i := 0 to iBound do begin
+                                       ini.ReadSection( CategoryList[i], BoardList );
+                                       Category                                := TCategory.Create;
+                                       Category.No                     := i + 1;
+                                       Category.Title  := CategoryList[i];
+
+                                       jBound := BoardList.Count - 1;
+                                       for j := 0 to jBound do begin
+                                               Board := nil;
+                                               inistr := ini.ReadString(CategoryList[i], BoardList[j], '');
+
+                                               //===== \83v\83\89\83O\83C\83\93
+                                               try
+                                                       kBound := Length( BoardPlugIns ) - 1;
+                                                       for k := 0 to kBound do begin
+                                                               if Assigned( Pointer( BoardPlugIns[ k ].Module ) ) then begin
+                                                                       if BoardPlugIns[ k ].AcceptURL( inistr ) = atBoard then begin
+                                                                               Board := TBoard.Create( BoardPlugIns[ k ], inistr );
+
+                                                                               Break;
+                                                                       end;
+                                                               end;
+                                                       end;
+                                               except
+                                                       // exception \82ª\94­\90\82µ\82½\8fê\8d\87\82Í\93à\95\94\8f\88\97\9d\82É\94C\82¹\82½\82¢\82Ì\82Å\82±\82±\82Å\82Í\89½\82à\82µ\82È\82¢
+                                               end;
+
+                                               if Board = nil then
+                                                       Board := TBoard.Create( nil, inistr );
+                                               Board.BeginUpdate;
+                                               Board.No := j + 1;
+                                               Board.Title := BoardList[j];
+                                               Board.BBSID := GikoSys.UrlToID(inistr);
+                                               Board.RoundDate := ZERO_DATE;
+
+                                               idx := RoundList.Find(Board);
+                                               if idx <> -1 then begin
+                                                       RoundItem                               := RoundList.Items[idx, grtBoard];
+                                                       Board.Round                     := True;
+                                                       Board.RoundName := RoundItem.RoundName;
+                                               end;
+                                               Category.Add(Board);
+                                               Board.EndUpdate;
+                                       end;
+
+                                       BBSs[ l ].Add( Category );
+                               end;
+                       finally
+                               BoardList.Free;
+                               CategoryList.Free;
+                       end;
+               end;
        finally
                ini.Free;
-    lBound := Length( bbsList ) - 1;
-    for l := 0 to lBound do
-       bbsList[ l ].Free;
+               lBound := Length( bbsList ) - 1;
+               for l := 0 to lBound do
+                       bbsList[ l ].Free;
        end;
 end;