• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

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

ギコナビ


Commit MetaInfo

修訂1ef4698cd75c4317670ba7c19e2a99aef9c32b15 (tree)
時間2005-11-03 03:10:55
作者h677 <h677>
Commiterh677

Log Message

ConvRes内の最適化

Change Summary

差異

--- a/HTMLCreate.pas
+++ b/HTMLCreate.pas
@@ -43,7 +43,6 @@ type
4343 function LoadFromSkin(fileName: string; ThreadItem: TThreadItem; SizeByte: Integer): string;
4444 function SkinedRes(skin: string; Res: TResRec; No: string): string;
4545 function ConvRes(const Body, Bbs, Key, ParamBBS, ParamKey, ParamStart, ParamTo, ParamNoFirst, ParamTrue : string; DatToHTML: boolean = false): string; overload;
46- function ConvRes(const Body, Bbs, Key, ParamBBS, ParamKey, ParamStart, ParamTo, ParamNoFirst, ParamTrue, FullURL : string): string; overload;
4746 procedure CreateHTML2(doc: IDispatch; ThreadItem: TThreadItem; var sTitle: string);
4847 procedure CreateHTML3(var html: TStringList; ThreadItem: TThreadItem; var sTitle: string);
4948 end;
@@ -326,7 +325,6 @@ function THTMLCreate.ConvRes(const Body, Bbs, Key,
326325 const
327326 GT = '&gt;';
328327 SN = '0123456789';
329- ZN = '‚O‚P‚Q‚R‚S‚T‚U‚V‚W‚X';
330328 FORMAT_LINK = '<a href="../test/read.cgi?%s=%s&%s=%s&%s=%s&%s=%s&%s=%s" target="_blank">';
331329 var
332330 i : integer;
@@ -341,7 +339,7 @@ var
341339 token : array[0..5] of string;
342340 ch : string;
343341 db : boolean;
344-
342+ len : integer;
345343 begin
346344 //s ‚É–{•¶‚ð‘S•”“ü‚ê‚é
347345 s := Body;
@@ -356,10 +354,10 @@ begin
356354 token[5] := '<A ';
357355
358356 //
359- while Length(s) > 0 do begin
357+ while Length(s) > 2 do begin
360358 pmin := Length(s) + 1;
361- i := length(token);
362- for j := 0 to length(token) - 1 do begin
359+ i := Length(token);
360+ for j := 0 to Length(token) - 1 do begin
363361 pos := AnsiPos(token[j], s);
364362 if pos <> 0 then begin
365363 if pos < pmin then begin
@@ -375,7 +373,7 @@ begin
375373 Result := Result + Copy(s, 1, pmin - 1);
376374 Delete(s, 1, pmin - 1);
377375
378- if i = length(token) then begin
376+ if i = 6 then begin
379377 //ƒqƒbƒg‚È‚µ
380378 end else if (i = 4) or (i = 5) then begin
381379 //'<a ' or '<A' ‚Ńqƒbƒg '</a>' or '</A>' ‚܂ŃRƒs[
@@ -397,7 +395,8 @@ begin
397395 No := '';
398396 sw := false;
399397 db := false;
400- while j <= Length(s) do begin
398+ len := Length(s);
399+ while j <= len do begin
401400 if (ByteType(s, j) = mbSingleByte) then begin
402401 //1byte•¶Žš
403402 ch := s[j];
@@ -410,7 +409,7 @@ begin
410409 db := true;
411410 end;
412411
413- if AnsiPos(ch, SN) > 0 then begin
412+ if System.Pos(ch, SN) > 0 then begin
414413 No := No + ch;
415414 end else if (ch = '-') then begin
416415 if sw then break;
@@ -421,7 +420,7 @@ begin
421420 end;
422421 end;
423422 //I’[‚܂ōs‚Á‚Ă̏I—¹‚©ƒ`ƒFƒbƒN
424- if j <= Length(s) then begin
423+ if j <= len then begin
425424 if db then j := j - 2
426425 else j := j - 1;
427426 end;
@@ -433,387 +432,16 @@ begin
433432
434433 if not DatToHTML then begin
435434 Result := Result + Format(FORMAT_LINK,
436- [ParamBBS, Bbs, ParamKey, Key, ParamStart, st, ParamTo, et, ParamNoFirst, ParamTrue])
437- + Copy(s, 1, j - 1) + '</a>';
435+ [ParamBBS, Bbs, ParamKey, Key, ParamStart, st, ParamTo, et, ParamNoFirst, ParamTrue]);
438436 end else begin
439- Result := Result + Format('<a href="#%s">', [st])
440- + Copy(s, 1, j - 1) + '</a>';
437+ Result := Result + Format('<a href="#%s">', [st]);
441438 end;
439+ Result := Result + Copy(s, 1, j - 1) + '</a>';
442440 end;
443441 Delete(s, 1, j - 1);
444442 end;
445443 end;
446-end;
447-{
448-function THTMLCreate.ConvRes(const Body, Bbs, Key,
449- ParamBBS, ParamKey, ParamStart, ParamTo, ParamNoFirst, ParamTrue : string;
450- DatToHTML: boolean = false): string;
451-type
452- PIndex = ^TIndex;
453- TIndex = record
454- FIndexFrom : integer;
455- FIndexTo : integer;
456- FNo : string;
457- end;
458-const
459- GT = '&gt;';
460- SN = '0123456789-';
461- ZN = '‚O‚P‚Q‚R‚S‚T‚U‚V‚W‚X|';
462- FORMAT_LINK = '<a href="../test/read.cgi?%s=%s&%s=%s&%s=%s&%s=%s&%s=%s" target="_blank">';
463-var
464- i : integer;
465- s : string;
466- b : TMbcsByteType;
467- sw: boolean;
468- sp: integer;
469- No: string;
470- sx: string;
471- List: TList;
472- oc : string;
473- st, et: string;
474- chk : boolean;
475- al : boolean;
476- procedure Add(IndexFrom, IndexTo: integer; const No: string);
477- var
478- FIndex : PIndex;
479- begin
480- New(FIndex);
481- FIndex.FIndexFrom := IndexFrom;
482- FIndex.FIndexTo := IndexTo;
483- FIndex.FNo := No;
484- List.Add(FIndex);
485- end;
486- procedure separateNumber(var st: String; var et: String; const Text, Separator: String);
487- var
488- p : Integer;
489- begin
490- p := Pos(Separator, Text);
491- if (p > 0 ) then begin
492- st := Copy(Text, 1, p - 1);
493- et := Copy(Text, p + Length(Separator), Length(Text));
494- end else begin
495- st := Text;
496- et := Text;
497- end;
498- end;
499-begin
500- s := Body;
501- Result := Body;
502- i := 1;
503- sw := False;
504- No := '';
505- List:= TList.Create;
506- oc := '';
507- sp := 0;
508- chk := False;
509- al := False;
510- while true do begin
511- b := ByteType(s, i);
512- case b of
513- mbSingleByte : begin
514- if (not sw) and (Copy(s,i,8) = GT + GT) then begin
515- if (Pos('<A HREF', oc) = 0) then begin
516- sw := True;
517- sp := i;
518- i := i + 7;
519- oc:='';
520- chk := True;
521- end;
522- end else
523- if (not sw) and (Copy(s,i,8) = GT + GT) then begin
524- if (Pos('<A HREF', oc) = 1) then begin
525- i := i + 7;
526- oc:='';
527- chk := True;
528- end;
529- end else
530- if (not sw) and (Copy(s,i,4) = GT) then begin
531- if (Pos('<A HREF', oc) = 0) then begin
532- sw := True;
533- sp := i;
534- i := i + 3;
535- oc:='';
536- chk := True;
537- end;
538- end else
539- if ((not sw) and (Copy(s,i,1) = ',')) or
540- ((not sw) and (Copy(s,i,1) = '=')) then begin
541- if ((not Chk) and (oc = '</A>')) or
542- ((Chk) and (oc = '')) or
543- ((not Chk) and (al)) then
544- begin
545- sw := True;
546- sp := i;
547- oc:='';
548- end;
549- end else
550- if (sw) then begin
551- sx := Copy(s,i,1);
552- if (AnsiPos(sx, SN) > 0) then begin
553- No := No + sx;
554- end else begin
555- if (No <> '') and (No <> '-') then begin
556- Add(sp, i, No);
557- al := True;
558- end;
559- sw := False;
560- Dec(i);
561- No := '';
562- oc:='';
563- end;
564- end else begin
565- if Copy(s,i,1) = '<' then begin
566- oc := '<';
567- end else begin
568- oc := oc + AnsiUpperCase(Copy(s,i,1));
569- end;
570- chk := False;
571- al := False;
572- end;
573- end;
574- mbLeadByte : begin
575- if (not sw) and (Copy(s,i,4) = '„„') then begin
576- sw := True;
577- sp := i;
578- i := i + 3;
579- chk := True;
580- end else
581- if (not sw) and (Copy(s,i,2) = '„') then begin
582- sw := True;
583- sp := i;
584- Inc(i);
585- chk := True;
586- end else
587- if (sw) then begin
588- sx := Copy(s,i,2);
589- if (AnsiPos(sx, ZN) > 0) then begin
590- No := No + ZenToHan(sx);
591- end else begin
592- if (No <> '') and (No <> '-') and (No <> '|') then begin
593- Add(sp, i, No);
594- end;
595- sw := False;
596- Dec(i);
597- No := '';
598- end;
599- end else begin
600- oc := '';
601- chk := False;
602- end;
603- al := False;
604- end;
605- end;
606- inc(i);
607- if (i > Length(Body)) then begin
608- if (sw) then begin
609- if (No <> '') then Add(sp, i, No);
610- end;
611- Break;
612- end;
613- end;
614- for i := List.Count - 1 downto 0 do begin
615- separateNumber(st, et, PIndex(List[i]).FNo, '-');
616- if not DatToHTML then
617- Result := Copy(Result,1, PIndex(List[i]).FIndexFrom - 1) +
618- Format(FORMAT_LINK, [ParamBBS, Bbs, ParamKey, Key, ParamStart, st, ParamTo, et, ParamNoFirst, ParamTrue]) +
619- Copy(Result,PIndex(List[i]).FIndexFrom, PIndex(List[i]).FIndexTo - PIndex(List[i]).FIndexFrom) + '</A>' +
620- Copy(Result,PIndex(List[i]).FIndexTo,Length(Result))
621- else
622- Result := Copy(Result,1, PIndex(List[i]).FIndexFrom - 1) +
623- Format('<a href="#%s">', [st]) +
624- Copy(Result,PIndex(List[i]).FIndexFrom, PIndex(List[i]).FIndexTo - PIndex(List[i]).FIndexFrom) + '</A>' +
625- Copy(Result,PIndex(List[i]).FIndexTo,Length(Result));
626-
627- Dispose(PIndex(List[i]));
628- end;
629- List.Free;
630-end;
631-}
632-function THTMLCreate.ConvRes(
633- const Body, Bbs, Key, ParamBBS, ParamKey,
634- ParamStart, ParamTo, ParamNoFirst,
635- ParamTrue, FullURL : string
636-): string;
637-type
638- PIndex = ^TIndex;
639- TIndex = record
640- FIndexFrom : integer;
641- FIndexTo : integer;
642- FNo : string;
643- end;
644-const
645- GT = '&gt;';
646- SN = '0123456789-';
647- ZN = '‚O‚P‚Q‚R‚S‚T‚U‚V‚W‚X|';
648-var
649- i : integer;
650- s : string;
651- b : TMbcsByteType;
652- sw: boolean;
653- sp: integer;
654- No: string;
655- sx: string;
656- List: TList;
657- oc : string;
658- st, et: string;
659- chk : boolean;
660- al : boolean;
661- procedure Add(IndexFrom, IndexTo: integer; const No: string);
662- var
663- FIndex : PIndex;
664- begin
665- New(FIndex);
666- FIndex.FIndexFrom := IndexFrom;
667- FIndex.FIndexTo := IndexTo;
668- FIndex.FNo := No;
669- List.Add(FIndex);
670- end;
671- function ChooseString(const Text, Separator: string; Index: integer): string;
672- var
673- S : string;
674- i, p : integer;
675- begin
676- S := Text;
677- for i := 0 to Index - 1 do begin
678- if (AnsiPos(Separator, S) = 0) then S := ''
679- else S := Copy(S, AnsiPos(Separator, S) + Length(Separator), Length(S));
680- end;
681- p := AnsiPos(Separator, S);
682- if (p > 0) then Result := Copy(S, 1, p - 1) else Result := S;
683- end;
684-begin
685- { v1.0 b2 - 03 }
686- s := Body;
687- Result := Body;
688- i := 1;
689- sw := False;
690- No := '';
691- List:= TList.Create;
692- oc := '';
693- sp := 0;
694- chk := False;
695- al := False;
696- while true do begin
697- b := ByteType(s, i);
698- case b of
699- mbSingleByte : begin
700- if (not sw) and (Copy(s,i,8) = GT + GT) then begin
701- if (Pos('<A HREF', AnsiUpperCase(oc)) = 0) then begin
702- sw := True;
703- sp := i;
704- i := i + 7;
705- oc:='';
706- chk := True;
707- end;
708- end else
709- if (not sw) and (Copy(s,i,8) = GT + GT) then begin
710- if (Pos('<A HREF', AnsiUpperCase(oc)) = 1) then begin
711- i := i + 7;
712- oc:='';
713- chk := True;
714- end;
715- end else
716- if (not sw) and (Copy(s,i,4) = GT) then begin
717- if (Pos('<A HREF', AnsiUpperCase(oc)) = 0) then begin
718- sw := True;
719- sp := i;
720- i := i + 3;
721- oc:='';
722- chk := True;
723- end;
724- end else
725- if ((not sw) and (Copy(s,i,1) = ',')) or
726- ((not sw) and (Copy(s,i,1) = '=')) then begin
727- if ((not Chk) and (AnsiLowerCase(oc) = '</a>')) or
728- ((Chk) and (oc = '')) or
729- ((not Chk) and (al)) then
730- begin
731- sw := True;
732- sp := i;
733- //i := i + 1;
734- oc:='';
735- end;
736- end else
737- if (sw) then begin
738- sx := Copy(s,i,1);
739- if (Pos(sx, SN) > 0) then begin
740- No := No + sx;
741- end else begin
742- if (No <> '') and (No <> '-') then begin
743- Add(sp, i, No);
744- al := True;
745- end;
746- sw := False;
747- //
748- i := i - 1;
749- //
750- No := '';
751- oc:='';
752- //chk := False;
753- end;
754- end else begin
755- if Copy(s,i,1) = '<' then oc := '';
756- oc := oc + Copy(s,i,1);
757- chk := False;
758- al := False;
759- end;
760- end;
761- mbLeadByte : begin
762- if (not sw) and (Copy(s,i,4) = '„„') then begin
763- sw := True;
764- sp := i;
765- i := i + 3;
766- chk := True;
767- end else
768- if (not sw) and (Copy(s,i,2) = '„') then begin
769- sw := True;
770- sp := i;
771- i := i + 1;
772- chk := True;
773- end else
774- if (sw) then begin
775- sx := Copy(s,i,2);
776- if (AnsiPos(sx, ZN) > 0) then begin
777- No := No + ZenToHan(sx);
778- end else begin
779- if (No <> '') and (No <> '-') and (No <> '|') then begin
780- Add(sp, i, No);
781- end;
782- sw := False;
783- i := i - 1;
784- No := '';
785- end;
786- end else begin
787- oc := '';
788- chk := False;
789- end;
790- al := False;
791- end;
792- end;
793- inc(i);
794- if (i > Length(Body)) then begin
795- if (sw) then begin
796- if (No <> '') then Add(sp, i, No);
797- end;
798- Break;
799- end;
800- end;
801- for i := List.Count - 1 downto 0 do begin
802- if (AnsiPos('-', PIndex(List[i]).FNo) > 0) then begin
803- st := ChooseString(PIndex(List[i]).FNo, '-', 0);
804- et := ChooseString(PIndex(List[i]).FNo, '-', 1);
805- end else begin
806- st := PIndex(List[i]).FNo;
807- et := PIndex(List[i]).FNo;
808- end;
809- Result := Copy(Result,0, PIndex(List[i]).FIndexFrom - 1) +
810- Format('<a href="%s&%s=%s&%s=%s&%s=%s" target="_blank">',
811- [FullURL, ParamStart, st, ParamTo, et, ParamNoFirst, ParamTrue]) +
812- Copy(Result,PIndex(List[i]).FIndexFrom, PIndex(List[i]).FIndexTo - PIndex(List[i]).FIndexFrom) + '</A>' +
813- Copy(Result,PIndex(List[i]).FIndexTo,Length(Result));
814- Dispose(PIndex(List[i]));
815- end;
816- List.Free;
444+ Result := Result + s;
817445 end;
818446
819447 function THTMLCreate.ConvertResAnchor(res: string): string;
@@ -881,13 +509,9 @@ begin
881509 UserOptionalStyle := GikoSys.SetUserOptionalStyle;
882510 html.BeginUpdate;
883511 try
884- //doc.open;
885512 // ƒwƒbƒ_
886- //doc.Write( boardPlugIn.GetHeader( DWORD( threadItem ),
887513 html.Append( boardPlugIn.GetHeader( DWORD( threadItem ),
888514 '<style type="text/css">body {' + UserOptionalStyle + '}</style>' ));
889- // '<style type="text/css">body {' + UserOptionalStyle + '}</style>' ) + #13#10 );
890- //doc.Write('<p id="idSearch"></p>' + #13#10 );
891515 html.Add('<p id="idSearch"></p>');
892516 for i := 0 to threadItem.Count - 1 do begin
893517 // 1 ‚Í•K‚¸•\Ž¦
@@ -911,32 +535,24 @@ begin
911535 try
912536 if GikoSys.Setting.UseSkin then begin
913537 if FileExists( GikoSys.GetSkinNewmarkFileName ) then
914- //doc.Write( LoadFromSkin( GikoSys.GetSkinNewmarkFileName, ThreadItem, ThreadItem.Size ) + #13#10 )
915538 html.Append( LoadFromSkin( GikoSys.GetSkinNewmarkFileName, ThreadItem, ThreadItem.Size ))
916539 else
917540 //doc.Write( '<a name="new"></a>' + #13#10 );
918541 html.Append( '<a name="new"></a>' );
919542 end else if GikoSys.Setting.UseCSS then begin
920- //doc.Write('<a name="new"></a><div class="new">V’…ƒŒƒX <span class="newdate">' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</span></div>' + #13#10);
921543 html.Append('<a name="new"></a><div class="new">V’…ƒŒƒX <span class="newdate">' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</span></div>');
922544 end else begin
923- //doc.Write('</dl>');
924545 html.Append('</dl>');
925- //doc.Write('<a name="new"></a>');
926546 html.Append('<a name="new"></a>');
927- //doc.Write('<table width="100%" bgcolor="#3333CC" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#6666FF" valign="middle"><font size="-1" color="#ffffff"><b>V’…ƒŒƒX ' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</b></font></td></tr></table>');
928547 html.Append('<table width="100%" bgcolor="#3333CC" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#6666FF" valign="middle"><font size="-1" color="#ffffff"><b>V’…ƒŒƒX ' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</b></font></td></tr></table>');
929- //doc.Write('<dl> + #13#10');
930548 html.Append('<dl>');
931549 end;
932550 except
933- //doc.Write( '<a name="new"></a>' + #13#10);
934551 html.Append( '<a name="new"></a>');
935552 end;
936553 end;
937554
938555 // ƒŒƒX
939- //doc.Write( boardPlugIn.GetRes( DWORD( threadItem ), i + 1 ) + #13#10 );
940556 html.Append( boardPlugIn.GetRes( DWORD( threadItem ), i + 1 ) );
941557
942558 if ThreadItem.Kokomade = (i + 1) then begin
@@ -944,24 +560,17 @@ begin
944560 try
945561 if GikoSys.Setting.UseSkin then begin
946562 if FileExists( GikoSys.GetSkinBookmarkFileName ) then
947- //doc.Write( LoadFromSkin( GikoSys.GetSkinBookmarkFileName, ThreadItem, ThreadItem.Size ) + #13#10 )
948563 html.Append( LoadFromSkin( GikoSys.GetSkinBookmarkFileName, ThreadItem, ThreadItem.Size ) )
949564 else
950- //doc.Write( '<a name="koko"></a>' + #13#10 );
951565 html.Append( '<a name="koko"></a>' );
952566 end else if GikoSys.Setting.UseCSS then begin
953- //doc.Write('<a name="koko"></a><div class="koko">ƒRƒR‚Ü‚Å“Ç‚ñ‚¾</div>' + #13#10 );
954567 html.Append('<a name="koko"></a><div class="koko">ƒRƒR‚Ü‚Å“Ç‚ñ‚¾</div>' );
955568 end else begin
956- //doc.Write('</dl>');
957569 html.Append('</dl>');
958- //doc.Write('<a name="koko"></a><table width="100%" bgcolor="#55AA55" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#77CC77" valign="middle"><font size="-1" color="#ffffff"><b>ƒRƒR‚Ü‚Å“Ç‚ñ‚¾</b></font></td></tr></table>');
959570 html.Append('<a name="koko"></a><table width="100%" bgcolor="#55AA55" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#77CC77" valign="middle"><font size="-1" color="#ffffff"><b>ƒRƒR‚Ü‚Å“Ç‚ñ‚¾</b></font></td></tr></table>');
960- //doc.Write('<dl>' + #13#10 );
961571 html.Append('<dl>' );
962572 end;
963573 except
964- //doc.Write( '<a name="koko"></a>' + #13#10 );
965574 html.Append( '<a name="koko"></a>' );
966575 end;
967576 end;
@@ -969,10 +578,8 @@ begin
969578
970579
971580 // ƒXƒLƒ“(ƒtƒbƒ^)
972- //doc.Write( boardPlugIn.GetFooter( DWORD( threadItem ), '<a name="bottom"></a>' ) + #13#10 );
973581 html.Append( boardPlugIn.GetFooter( DWORD( threadItem ), '<a name="bottom"></a>' ) );
974582 finally
975- //doc.Close;
976583 html.EndUpdate;
977584 end;
978585
@@ -993,10 +600,7 @@ var
993600 SkinNewRes: string;
994601 SkinRes: string;
995602 strTmp : string;
996- function ReplaceRes( skin: string ): string;
997- begin
998- Result := SkinedRes( skin, Res, No );
999- end;
603+ threadKey : string;
1000604 begin
1001605 if ThreadItem <> nil then begin
1002606 // ƒXƒLƒ“Žg—p
@@ -1005,7 +609,8 @@ begin
1005609 // ƒtƒHƒ“ƒg‚âƒTƒCƒY‚̐ݒè
1006610 UserOptionalStyle := GikoSys.SetUserOptionalStyle;
1007611 CSSFileName := GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName;
1008- //doc.open;
612+
613+ threadKey := ChangeFileExt(ThreadItem.FileName, '');
1009614 html.BeginUpdate;
1010615 try
1011616 //doc.charset := 'Shift_JIS';
@@ -1016,7 +621,6 @@ begin
1016621 if Length( UserOptionalStyle ) > 0 then
1017622 SkinHeader := CustomStringReplace( SkinHeader, '</head>',
1018623 '<style type="text/css">body {' + UserOptionalStyle + '}</style></head>');
1019- //doc.Write( SkinHeader + #13#10);
1020624 html.Append( SkinHeader);
1021625 except
1022626 end;
@@ -1031,9 +635,7 @@ begin
1031635 except
1032636 end;
1033637
1034- //doc.Write('<p id="idSearch"></p>' + #13#10);
1035638 html.Append('<p id="idSearch"></p>');
1036- //doc.Write('<a name="top"></a>' + #13#10);
1037639 html.Append('<a name="top"></a>');
1038640
1039641 for i := 0 to ReadList.Count - 1 do begin
@@ -1052,18 +654,14 @@ begin
1052654 Continue;
1053655 end;
1054656 end;
1055-
1056657 // V’…ƒ}[ƒN
1057658 if (NewReceiveNo = i + 1) or ((NewReceiveNo = 0) and (i = 0)) then begin
1058659 try
1059660 if FileExists( GikoSys.GetSkinNewmarkFileName ) then
1060- //doc.Write( LoadFromSkin( GikoSys.GetSkinNewmarkFileName, ThreadItem, ThreadItem.Size ) + #13#10)
1061661 html.Append( LoadFromSkin( GikoSys.GetSkinNewmarkFileName, ThreadItem, ThreadItem.Size ) )
1062662 else
1063- //doc.Write( '<a name="new"></a>' + #13#10 );
1064663 html.Append( '<a name="new"></a>' );
1065664 except
1066- //doc.Write( '<a name="new"></a>' + #13#10 );
1067665 html.Append( '<a name="new"></a>' );
1068666 end;
1069667 end;
@@ -1072,18 +670,17 @@ begin
1072670 No := IntToStr(i + 1);
1073671
1074672 Res := DivideStrLine(ReadList[i]);
1075- Res.FBody := ConvRes(AddAnchorTag(Res.FBody), ThreadItem.ParentBoard.BBSID, ChangeFileExt(ThreadItem.FileName, ''), 'bbs', 'key', 'st', 'to', 'nofirst', 'true');
673+ Res.FBody := ConvRes(AddAnchorTag(Res.FBody), ThreadItem.ParentBoard.BBSID, threadKey, 'bbs', 'key', 'st', 'to', 'nofirst', 'true');
1076674 Res.FDateTime := AddBeProfileLink(Res.FDateTime, i + 1);
1077675
1078676 try
1079677 if NewReceiveNo <= (i + 1) then
1080678 // V’…ƒŒƒX
1081- strTmp := ReplaceRes( SkinNewRes )
679+ strTmp := SkinedRes( SkinNewRes, Res, No )
1082680 else
1083681 // ’ʏí‚̃ŒƒX
1084- strTmp := ReplaceRes( SkinRes );
682+ strTmp := SkinedRes( SkinRes, Res, No );
1085683
1086- //doc.Write( strTmp + #13#10 );
1087684 html.Append( strTmp );
1088685 except
1089686 end;
@@ -1093,28 +690,22 @@ begin
1093690 // ‚±‚±‚Ü‚Å“Ç‚ñ‚¾
1094691 try
1095692 if FileExists( GikoSys.GetSkinBookmarkFileName ) then
1096- //doc.Write( LoadFromSkin( GikoSys.GetSkinBookmarkFileName, ThreadItem, ThreadItem.Size ) + #13#10 )
1097693 html.Append( LoadFromSkin( GikoSys.GetSkinBookmarkFileName, ThreadItem, ThreadItem.Size ) )
1098694 else
1099- //doc.Write( '<a name="koko"></a>' + #13#10 );
1100695 html.Append( '<a name="koko"></a>' );
1101696 except
1102- //doc.Write( '<a name="koko"></a>' + #13#10 );
1103697 html.Append( '<a name="koko"></a>' );
1104698 end;
1105699 end;
1106700 end;
1107701
1108- //doc.Write('<a name="bottom"></a>' + #13#10);
1109702 html.Append('<a name="bottom"></a>' );
1110703 // ƒXƒLƒ“(ƒtƒbƒ^)
1111704 try
1112- //doc.Write( LoadFromSkin( GikoSys.GetSkinFooterFileName, ThreadItem, ThreadItem.Size ) + #13#10 );
1113705 html.Append( LoadFromSkin( GikoSys.GetSkinFooterFileName, ThreadItem, ThreadItem.Size ) );
1114706 except
1115707 end;
1116708 finally
1117- //doc.close;
1118709 html.EndUpdate;
1119710 end;
1120711 end;
@@ -1325,6 +916,7 @@ begin
1325916
1326917 ReadList := TStringList.Create;
1327918 try
919+ ReadList.BeginUpdate;
1328920 if ThreadItem.IsLogFile then begin
1329921 FileName := ThreadItem.GetThreadFileName;
1330922 ReadList.LoadFromFile(FileName);
@@ -1350,6 +942,7 @@ begin
1350942 CreateDefaultHTML(html, ThreadItem, ReadList, sTitle);
1351943 end;
1352944 finally
945+ ReadList.EndUpdate;
1353946 ReadList.Free;
1354947 end;
1355948 end;