-- --
-- B o d y --
-- --
--- Copyright (C) 2004-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2008, 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- --
-- --
------------------------------------------------------------------------------
-with Ada.Command_Line; use Ada.Command_Line;
+with Debug;
with Osint; use Osint;
with Output; use Output;
with Prj.Ext;
with Snames; use Snames;
with Table;
+with Ada.Command_Line; use Ada.Command_Line;
+
+with GNAT.Directory_Operations; use GNAT.Directory_Operations;
+
with System.Case_Util; use System.Case_Util;
with System.HTable;
Index : Int;
end record;
-- Identify either a mono-unit source (when Index = 0) or a specific unit
- -- in a multi-unit source.
+ -- (index = 1's origin index of unit) in a multi-unit source.
-- There follow many global undocumented declarations, comments needed ???
if N /= No_Name then
Write_Str ("""");
- Write_Name (N);
+
+ declare
+ Name : constant String := Get_Name_String (N);
+ begin
+ if Debug.Debug_Flag_F and then Is_Absolute_Path (Name) then
+ Write_Str (File_Name (Name));
+ else
+ Write_Str (Name);
+ end if;
+ end;
+
Write_Str (""" ");
end if;
Marks.Set (K => (File => Source_File, Index => Index), E => True);
end Mark;
+ -----------------------
+ -- Path_Or_File_Name --
+ -----------------------
+
+ function Path_Or_File_Name (Path : Path_Name_Type) return String is
+ Path_Name : constant String := Get_Name_String (Path);
+ begin
+ if Debug.Debug_Flag_F then
+ return File_Name (Path_Name);
+ else
+ return Path_Name;
+ end if;
+ end Path_Or_File_Name;
+
---------------------------
-- Test_If_Relative_Path --
---------------------------