-- --
-- B o d y --
-- --
--- Copyright (C) 1998-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 1998-2009, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
No_Xref_Information : exception;
-- Exception raised when there is no cross-referencing information in
- -- the .ali files
+ -- the .ali files.
procedure Parse_EOL
(Source : not null access String;
-- Case where we have an ALI file, accept it even though this is
-- not official usage, since the intention is obvious
- if Tail (File, 4) = ".ali" then
+ if Tail (File, 4) = "." & Osint.ALI_Suffix.all then
File_Ref := Add_To_Xref_File
(File, Visited => False, Emit_Warning => True);
return;
end if;
- elsif Last > 4 and then Dir_Ent (Last - 3 .. Last) = ".ali" then
+ elsif Last > 4
+ and then Dir_Ent (Last - 3 .. Last) = "." & Osint.ALI_Suffix.all
+ then
File_Ref :=
Add_To_Xref_File (Dir_Ent (1 .. Last), Visited => False);
end if;
function Get_Full_Type (Decl : Declaration_Reference) return String is
function Param_String return String;
- -- Return the string to display depending on whether Decl is a
- -- parameter or not
+ -- Return the string to display depending on whether Decl is a parameter
------------------
-- Param_String --
Ptr := Ptr + 1;
end loop;
+ -- Skip CR or LF if not at end of file
+
if Source (Ptr) /= EOF then
- Ptr := Ptr + 1; -- skip CR or LF
+ Ptr := Ptr + 1;
end if;
-- Skip past CR/LF or LF/CR combination
P_Line, P_Column : Natural;
pragma Warnings (Off, P_Line);
pragma Warnings (Off, P_Column);
-
begin
Ptr := Ptr + 1;
Parse_Number (Ali, Ptr, P_Line);
loop
-- Process references on current line
- while Ali (Ptr) = ' ' or Ali (Ptr) = ASCII.HT loop
+ while Ali (Ptr) = ' ' or else Ali (Ptr) = ASCII.HT loop
-- For every reference read the line, type and column,
-- optionally preceded by a file number and a pipe symbol.
Write_Str (Get_Symbol (Decl));
- while Column < Type_Position loop
+ -- Put the declaration type in column Type_Position, but if the
+ -- declaration name is too long, put at least one space between its
+ -- name and its type.
+
+ while Column < Type_Position - 1 loop
Write_Char (' ');
end loop;
+ Write_Char (' ');
+
Write_Line (Get_Full_Type (Decl));
Write_Parent_Info : declare