mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 10:39:40 +01:00 
			
		
		
		
	* Patch from Graeme Geldenhuys to implement skip attribute in linear output writers (bug ID 30741)
git-svn-id: trunk@34752 -
This commit is contained in:
		
							parent
							
								
									cfc8b0fd9e
								
							
						
					
					
						commit
						e198d9bf06
					
				@ -72,8 +72,8 @@ type
 | 
				
			|||||||
    Procedure StartAccess; override;
 | 
					    Procedure StartAccess; override;
 | 
				
			||||||
    Procedure StartErrors; override;
 | 
					    Procedure StartErrors; override;
 | 
				
			||||||
    Procedure StartVersion; override;
 | 
					    Procedure StartVersion; override;
 | 
				
			||||||
    Procedure StartSeealso; override;
 | 
					    Procedure StartSeeAlso; override;
 | 
				
			||||||
    Procedure EndSeealso; override;
 | 
					    Procedure EndSeeAlso; override;
 | 
				
			||||||
    procedure StartUnitOverview(AModuleName,AModuleLabel : String);override;
 | 
					    procedure StartUnitOverview(AModuleName,AModuleLabel : String);override;
 | 
				
			||||||
    procedure WriteUnitEntry(UnitRef : TPasType); override;
 | 
					    procedure WriteUnitEntry(UnitRef : TPasType); override;
 | 
				
			||||||
    Procedure EndUnitOverview; override;
 | 
					    Procedure EndUnitOverview; override;
 | 
				
			||||||
@ -1068,7 +1068,7 @@ begin
 | 
				
			|||||||
  WriteLn(Format(':pd. %s', [ADescr]));
 | 
					  WriteLn(Format(':pd. %s', [ADescr]));
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
procedure TIPFNewWriter.StartSeealso;
 | 
					procedure TIPFNewWriter.StartSeeAlso;
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  writeln('');
 | 
					  writeln('');
 | 
				
			||||||
  writeln(':p.');
 | 
					  writeln(':p.');
 | 
				
			||||||
@ -1078,7 +1078,7 @@ begin
 | 
				
			|||||||
  writeln('.br');
 | 
					  writeln('.br');
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
procedure TIPFNewWriter.EndSeealso;
 | 
					procedure TIPFNewWriter.EndSeeAlso;
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  writeln('');
 | 
					  writeln('');
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
				
			|||||||
@ -396,10 +396,12 @@ var
 | 
				
			|||||||
  Member: TPasElement;
 | 
					  Member: TPasElement;
 | 
				
			||||||
  i: Integer;
 | 
					  i: Integer;
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
 | 
					  DocNode := Engine.FindDocNode(ClassDecl);
 | 
				
			||||||
 | 
					  if Assigned(DocNode) and DocNode.IsSkipped then
 | 
				
			||||||
 | 
					    Exit;
 | 
				
			||||||
  StartSection(ClassDecl.Name);
 | 
					  StartSection(ClassDecl.Name);
 | 
				
			||||||
  WriteLabel(ClassDecl);
 | 
					  WriteLabel(ClassDecl);
 | 
				
			||||||
  WriteIndex(ClassDecl);
 | 
					  WriteIndex(ClassDecl);
 | 
				
			||||||
  DocNode := Engine.FindDocNode(ClassDecl);
 | 
					 | 
				
			||||||
  if Assigned(DocNode) and ((not IsDescrNodeEmpty(DocNode.Descr)) or
 | 
					  if Assigned(DocNode) and ((not IsDescrNodeEmpty(DocNode.Descr)) or
 | 
				
			||||||
    (not IsDescrNodeEmpty(DocNode.ShortDescr))) then
 | 
					    (not IsDescrNodeEmpty(DocNode.ShortDescr))) then
 | 
				
			||||||
  begin
 | 
					  begin
 | 
				
			||||||
@ -482,6 +484,8 @@ begin
 | 
				
			|||||||
        L:=StripText(GetLabel(Member));
 | 
					        L:=StripText(GetLabel(Member));
 | 
				
			||||||
        N:=EscapeText(Member.Name);
 | 
					        N:=EscapeText(Member.Name);
 | 
				
			||||||
        DocNode := Engine.FindDocNode(Member);
 | 
					        DocNode := Engine.FindDocNode(Member);
 | 
				
			||||||
 | 
					        if Assigned(DocNode) and DocNode.IsSkipped then
 | 
				
			||||||
 | 
					          Continue;
 | 
				
			||||||
        if Assigned(DocNode) then
 | 
					        if Assigned(DocNode) then
 | 
				
			||||||
        begin
 | 
					        begin
 | 
				
			||||||
          if FDupLinkedDoc and (DocNode.Link <> '') then
 | 
					          if FDupLinkedDoc and (DocNode.Link <> '') then
 | 
				
			||||||
@ -544,6 +548,8 @@ begin
 | 
				
			|||||||
        L := StripText(GetLabel(lInterface));
 | 
					        L := StripText(GetLabel(lInterface));
 | 
				
			||||||
        N := EscapeText(lInterface.Name);
 | 
					        N := EscapeText(lInterface.Name);
 | 
				
			||||||
        DocNode := Engine.FindDocNode(lInterface);
 | 
					        DocNode := Engine.FindDocNode(lInterface);
 | 
				
			||||||
 | 
					        if Assigned(DocNode) and DocNode.IsSkipped then
 | 
				
			||||||
 | 
					          Continue;
 | 
				
			||||||
        if Assigned(DocNode) then
 | 
					        if Assigned(DocNode) then
 | 
				
			||||||
        begin
 | 
					        begin
 | 
				
			||||||
          if FDupLinkedDoc and (DocNode.Link <> '') then
 | 
					          if FDupLinkedDoc and (DocNode.Link <> '') then
 | 
				
			||||||
@ -595,7 +601,7 @@ begin
 | 
				
			|||||||
  If (Engine.OutPut='') then
 | 
					  If (Engine.OutPut='') then
 | 
				
			||||||
    Engine.Output:=PackageName+FileNameExtension
 | 
					    Engine.Output:=PackageName+FileNameExtension
 | 
				
			||||||
  else if (ExtractFileExt(Engine.output)='') and (FileNameExtension<>'') then
 | 
					  else if (ExtractFileExt(Engine.output)='') and (FileNameExtension<>'') then
 | 
				
			||||||
    Engine.Output:=ChangeFileExt(Engine.output,FileNameExtension);  
 | 
					    Engine.Output:=ChangeFileExt(Engine.output,FileNameExtension);
 | 
				
			||||||
  FStream:=TFileStream.Create(Engine.Output,fmCreate);
 | 
					  FStream:=TFileStream.Create(Engine.Output,fmCreate);
 | 
				
			||||||
  try
 | 
					  try
 | 
				
			||||||
    WriteBeginDocument;
 | 
					    WriteBeginDocument;
 | 
				
			||||||
@ -875,12 +881,14 @@ begin
 | 
				
			|||||||
    for i := 0 to ASection.Types.Count - 1 do
 | 
					    for i := 0 to ASection.Types.Count - 1 do
 | 
				
			||||||
      begin
 | 
					      begin
 | 
				
			||||||
      TypeDecl := TPasType(ASection.Types[i]);
 | 
					      TypeDecl := TPasType(ASection.Types[i]);
 | 
				
			||||||
 | 
					      DocNode := Engine.FindDocNode(TypeDecl);
 | 
				
			||||||
 | 
					      if Assigned(DocNode) and DocNode.IsSkipped then
 | 
				
			||||||
 | 
					        Continue;
 | 
				
			||||||
      if not ((TypeDecl is TPasRecordType) and TPasRecordType(TypeDecl).IsAdvancedRecord) then
 | 
					      if not ((TypeDecl is TPasRecordType) and TPasRecordType(TypeDecl).IsAdvancedRecord) then
 | 
				
			||||||
        begin
 | 
					        begin
 | 
				
			||||||
        DescrBeginParagraph;
 | 
					        DescrBeginParagraph;
 | 
				
			||||||
        WriteTypeDecl(TypeDecl);
 | 
					        WriteTypeDecl(TypeDecl);
 | 
				
			||||||
        StartListing(False,'');
 | 
					        StartListing(False,'');
 | 
				
			||||||
        DocNode := Engine.FindDocNode(TypeDecl);
 | 
					 | 
				
			||||||
        If Assigned(DocNode) and
 | 
					        If Assigned(DocNode) and
 | 
				
			||||||
           Assigned(DocNode.Node) and
 | 
					           Assigned(DocNode.Node) and
 | 
				
			||||||
           (Docnode.Node['opaque']='1') then
 | 
					           (Docnode.Node['opaque']='1') then
 | 
				
			||||||
@ -953,6 +961,9 @@ var
 | 
				
			|||||||
begin
 | 
					begin
 | 
				
			||||||
  With ProcDecl do
 | 
					  With ProcDecl do
 | 
				
			||||||
    begin
 | 
					    begin
 | 
				
			||||||
 | 
					    DocNode := Engine.FindDocNode(ProcDecl);
 | 
				
			||||||
 | 
					    if Assigned(DocNode) and DocNode.IsSkipped then
 | 
				
			||||||
 | 
					      Exit;
 | 
				
			||||||
    if Not (Assigned(Parent) and ((Parent.InheritsFrom(TPasClassType)) or Parent.InheritsFrom(TPasRecordType))) then
 | 
					    if Not (Assigned(Parent) and ((Parent.InheritsFrom(TPasClassType)) or Parent.InheritsFrom(TPasRecordType))) then
 | 
				
			||||||
      begin
 | 
					      begin
 | 
				
			||||||
      StartSubSection(Name);
 | 
					      StartSubSection(Name);
 | 
				
			||||||
@ -966,7 +977,6 @@ begin
 | 
				
			|||||||
      WriteIndex(Parent.Name+'.'+Name);
 | 
					      WriteIndex(Parent.Name+'.'+Name);
 | 
				
			||||||
      end;
 | 
					      end;
 | 
				
			||||||
    StartProcedure;
 | 
					    StartProcedure;
 | 
				
			||||||
    DocNode := Engine.FindDocNode(ProcDecl);
 | 
					 | 
				
			||||||
    if Assigned(DocNode) and Assigned(DocNode.ShortDescr) then
 | 
					    if Assigned(DocNode) and Assigned(DocNode.ShortDescr) then
 | 
				
			||||||
      begin
 | 
					      begin
 | 
				
			||||||
      StartSynopsis;
 | 
					      StartSynopsis;
 | 
				
			||||||
@ -1065,11 +1075,13 @@ var
 | 
				
			|||||||
begin
 | 
					begin
 | 
				
			||||||
  With PropDecl do
 | 
					  With PropDecl do
 | 
				
			||||||
    begin
 | 
					    begin
 | 
				
			||||||
 | 
					    DocNode := Engine.FindDocNode(PropDecl);
 | 
				
			||||||
 | 
					    if Assigned(DocNode) and DocNode.IsSkipped then
 | 
				
			||||||
 | 
					      Exit;
 | 
				
			||||||
    StartSubSection(Parent.Name+'.'+Name);
 | 
					    StartSubSection(Parent.Name+'.'+Name);
 | 
				
			||||||
    WriteLabel(PropDecl);
 | 
					    WriteLabel(PropDecl);
 | 
				
			||||||
    WriteIndex(Parent.Name+'.'+Name);
 | 
					    WriteIndex(Parent.Name+'.'+Name);
 | 
				
			||||||
    StartProperty;
 | 
					    StartProperty;
 | 
				
			||||||
    DocNode := Engine.FindDocNode(PropDecl);
 | 
					 | 
				
			||||||
    if Assigned(DocNode) then
 | 
					    if Assigned(DocNode) then
 | 
				
			||||||
    begin
 | 
					    begin
 | 
				
			||||||
      if FDupLinkedDoc and (DocNode.Link <> '') then
 | 
					      if FDupLinkedDoc and (DocNode.Link <> '') then
 | 
				
			||||||
@ -1288,6 +1300,8 @@ begin
 | 
				
			|||||||
        L:=StripText(GetLabel(Member));
 | 
					        L:=StripText(GetLabel(Member));
 | 
				
			||||||
        N:=EscapeText(Member.Name);
 | 
					        N:=EscapeText(Member.Name);
 | 
				
			||||||
        DocNode := Engine.FindDocNode(Member);
 | 
					        DocNode := Engine.FindDocNode(Member);
 | 
				
			||||||
 | 
					        if Assigned(DocNode) and DocNode.IsSkipped then
 | 
				
			||||||
 | 
					          Continue;
 | 
				
			||||||
        If Assigned(DocNode) then
 | 
					        If Assigned(DocNode) then
 | 
				
			||||||
          S:=GetDescrString(Member, DocNode.ShortDescr)
 | 
					          S:=GetDescrString(Member, DocNode.ShortDescr)
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user