Browse Source

* Minor fixes to $ifdef writeln's I had lying around.

git-svn-id: trunk@13268 -
marco 16 years ago
parent
commit
1d5758b29d
2 changed files with 16 additions and 5 deletions
  1. 1 0
      packages/chm/src/chmreader.pas
  2. 15 5
      packages/fcl-xml/src/sax_html.pp

+ 1 - 0
packages/chm/src/chmreader.pas

@@ -241,6 +241,7 @@ begin
   {$IFDEF CHM_DEBUG}
   {$IFDEF CHM_DEBUG}
   WriteLn('PMGI depth = ', fDirectoryHeader.IndexTreeDepth);
   WriteLn('PMGI depth = ', fDirectoryHeader.IndexTreeDepth);
   WriteLn('PMGI Root =  ', fDirectoryHeader.IndexOfRootChunk);
   WriteLn('PMGI Root =  ', fDirectoryHeader.IndexOfRootChunk);
+  Writeln('DirCount  =  ', fDirectoryHeader.DirectoryChunkCount);
   {$ENDIF}
   {$ENDIF}
   fDirectoryEntriesStartPos := fStream.Position;
   fDirectoryEntriesStartPos := fStream.Position;
   fDirectoryHeaderLength := LEtoN(fHeaderEntries[1].Length);
   fDirectoryHeaderLength := LEtoN(fHeaderEntries[1].Length);

+ 15 - 5
packages/fcl-xml/src/sax_html.pp

@@ -505,14 +505,20 @@ var
   Element: TDOMElement;
   Element: TDOMElement;
   i: Integer;
   i: Integer;
 begin
 begin
-  // WriteLn('Start: ', LocalName, '. Node buffer before: ', FNodeBuffer.Count, ' elements');
+  {$ifdef SAX_HTML_DEBUG}
+  WriteLn('Start: ', LocalName, '. Node buffer before: ', FNodeBuffer.Count, ' elements');
+  {$endif}
   Element := FDocument.CreateElement(LocalName);
   Element := FDocument.CreateElement(LocalName);
   if Assigned(Attr) then
   if Assigned(Attr) then
   begin
   begin
-    // WriteLn('Attribute: ', Attr.GetLength);
+    {$ifdef SAX_HTML_DEBUG}
+     WriteLn('Attribute: ', Attr.GetLength);
+    {$endif}
     for i := 0 to Attr.GetLength - 1 do
     for i := 0 to Attr.GetLength - 1 do
     begin
     begin
-      // WriteLn('#', i, ': LocalName = ', Attr.GetLocalName(i), ', Value = ', Attr.GetValue(i));
+      {$ifdef SAX_HTML_DEBUG}
+       WriteLn('#', i, ': LocalName = ', Attr.GetLocalName(i), ', Value = ', Attr.GetValue(i));
+      {$endif}
       Element[Attr.GetLocalName(i)] := Attr.GetValue(i);
       Element[Attr.GetLocalName(i)] := Attr.GetValue(i);
     end;
     end;
   end;
   end;
@@ -531,7 +537,9 @@ begin
     if not Assigned(FDocument.DocumentElement) then
     if not Assigned(FDocument.DocumentElement) then
       FDocument.AppendChild(Element);
       FDocument.AppendChild(Element);
   FNodeBuffer.Add(NodeInfo);
   FNodeBuffer.Add(NodeInfo);
-  // WriteLn('Start: ', LocalName, '. Node buffer after: ', FNodeBuffer.Count, ' elements');
+  {$ifdef SAX_HTML_DEBUG}
+    WriteLn('Start: ', LocalName, '. Node buffer after: ', FNodeBuffer.Count, ' elements');
+  {$endif}
 end;
 end;
 
 
 procedure THTMLToDOMConverter.ReaderEndElement(Sender: TObject;
 procedure THTMLToDOMConverter.ReaderEndElement(Sender: TObject;
@@ -543,7 +551,9 @@ var
   TagInfo: PHTMLElementProps;
   TagInfo: PHTMLElementProps;
 
 
 begin
 begin
-  // WriteLn('End: ', LocalName, '. Node buffer: ', FNodeBuffer.Count, ' elements');
+  {$ifdef SAX_HTML_DEBUG}
+    WriteLn('End: ', LocalName, '. Node buffer: ', FNodeBuffer.Count, ' elements');
+  {$endif}
   // Find the matching start tag
   // Find the matching start tag
   i := FNodeBuffer.Count - 1;
   i := FNodeBuffer.Count - 1;
   while i >= 0 do
   while i >= 0 do