CVS difference for arm/progs/arm_text.adb

Differences between 1.15 and version 1.16
Log of other versions for file arm/progs/arm_text.adb

--- arm/progs/arm_text.adb	2006/09/23 05:23:37	1.15
+++ arm/progs/arm_text.adb	2006/09/26 05:12:14	1.16
@@ -99,6 +99,8 @@
     --			table command.
     --		- RLB - Added picture command.
     --  9/22/06 - RLB - Added Subsubclause.
+    --  9/25/06 - RLB - Handled optional renaming of TOC.
+    --		- RLB - Added Last_Column_Width to Start_Table.
 
     LINE_LENGTH : constant := 78;
 	-- Maximum intended line length.
@@ -633,7 +635,9 @@
         Ada.Text_IO.New_Line (Output_Object.Output_File);
 
 	-- Special for table of contents:
-	if Clause_Number = "" and then Header_Text = "Table of Contents" then
+	if Clause_Number = "" and then
+		(Header_Text = "Table of Contents" or else -- Ada 95 format
+		 Header_Text = "Contents") then -- ISO 2004 format.
 	    Put_Line_Centered (Output_Object.Output_File,
 			       Header_Text);
 	    Ada.Text_IO.New_Line (Output_Object.Output_File, 2);
@@ -710,7 +714,9 @@
         Ada.Text_IO.New_Line (Output_Object.Output_File);
 
 	-- Special for table of contents:
-	if Clause_Number = "" and then Header_Text = "Table of Contents" then
+	if Clause_Number = "" and then
+		(Header_Text = "Table of Contents" or else -- Ada 95 format
+		 Header_Text = "Contents") then -- ISO 2004 format.
 	    Put_Line_Centered (Output_Object.Output_File,
 			       Header_Text);
 	    Ada.Text_IO.New_Line (Output_Object.Output_File, 2);
@@ -825,13 +831,15 @@
     procedure Start_Table (Output_Object : in out Text_Output_Type;
 			   Columns : in ARM_Output.Column_Count;
 			   First_Column_Width : in ARM_Output.Column_Count;
+			   Last_Column_Width : in ARM_Output.Column_Count;
 			   Alignment : in ARM_Output.Column_Text_Alignment;
 			   No_Page_Break : in Boolean;
 			   Has_Border : in Boolean;
 			   Small_Text_Size : in Boolean;
 			   Header_Kind : in ARM_Output.Header_Kind_Type) is
 	-- Starts a table. The number of columns is Columns; the first
-	-- column has First_Column_Width times the normal column width.
+	-- column has First_Column_Width times the normal column width, and
+	-- the last column has Last_Column_Width times the normal column width.
 	-- Alignment is the horizontal text alignment within the columns.
 	-- No_Page_Break should be True to keep the table intact on a single
 	-- page; False to allow it to be split across pages.
@@ -857,10 +865,12 @@
 
 	Output_Object.Tab_Stops.Number := Columns;
 	declare
+	     Column_Units : constant ARM_Output.Column_Count :=
+		Columns+First_Column_Width+Last_Column_Width-2;
 	     Width : Natural :=
-		(72/(Columns+First_Column_Width-1));
+		(72/(Column_Units));
 	begin
-	    if Columns+First_Column_Width-1 <= 3 then -- Keep it from getting too wide.
+	    if Column_Units <= 3 then -- Keep it from getting too wide.
 		Width := 22;
 	    end if;
 	    for I in 1 .. Columns loop

Questions? Ask the ACAA Technical Agent