CVS difference for arm/progs/arm_html.adb

Differences between 1.53 and version 1.54
Log of other versions for file arm/progs/arm_html.adb

--- arm/progs/arm_html.adb	2012/11/06 02:30:37	1.53
+++ arm/progs/arm_html.adb	2012/12/14 04:15:04	1.54
@@ -179,6 +179,8 @@
     --			on comp.lang.ada.
     --  8/31/12 - RLB - Added Output_Path.
     -- 10/18/12 - RLB - Added additional hanging styles.
+    -- 11/26/12 - RLB - Added subdivision names to Clause_Header and
+    --			Revised_Clause_Header.
 
     LINE_LENGTH : constant := 78;
 	-- Maximum intended line length.
@@ -2716,14 +2718,16 @@
     end Category_Header;
 
 
-    procedure Clause_Header (Output_Object : in out HTML_Output_Type;
-			     Header_Text : in String;
-			     Level : in ARM_Contents.Level_Type;
-			     Clause_Number : in String;
-			     No_Page_Break : in Boolean := False) is
+    procedure Clause_Header (Output_Object     : in out HTML_Output_Type;
+			     Header_Text       : in String;
+			     Level	       : in ARM_Contents.Level_Type;
+			     Clause_Number     : in String;
+			     Top_Level_Subdivision_Name : in ARM_Output.Top_Level_Subdivision_Name_Kind;
+			     No_Page_Break     : in Boolean := False) is
 	-- Output a Clause header. The level of the header is specified
-	-- in Level. The Clause Number is as specified.
-	-- These should appear in the table of contents.
+	-- in Level. The Clause Number is as specified; the top-level (and
+	-- other) subdivision names are as specified. These should appear in
+	-- the table of contents.
 	-- For hyperlinked formats, this should generate a link target.
 	-- If No_Page_Break is True, suppress any page breaks.
 	-- Raises Not_Valid_Error if in a paragraph.
@@ -2813,8 +2817,17 @@
 				          Header_Text & "</H1>");
 	        end if;
 	    when ARM_Contents.Section =>
-	        Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>Section " &
-				      Clause_Number & ": " & Header_Text & "</H1>");
+		case Top_Level_Subdivision_Name is
+		    when ARM_Output.Chapter =>
+		        Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>Chapter " &
+					      Clause_Number & ": " & Header_Text & "</H1>");
+		    when ARM_Output.Section =>
+		        Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>Section " &
+					      Clause_Number & ": " & Header_Text & "</H1>");
+		    when ARM_Output.Clause =>
+		        Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" &
+					      Clause_Number & " &nbsp; " & Header_Text & "</H1>");
+		end case;
 	    when ARM_Contents.Clause | ARM_Contents.Subclause |
 		 ARM_Contents.Subsubclause =>
 	        Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" &
@@ -2832,18 +2845,20 @@
     end Clause_Header;
 
 
-    procedure Revised_Clause_Header (Output_Object : in out HTML_Output_Type;
-			     New_Header_Text : in String;
-			     Old_Header_Text : in String;
-			     Level : in ARM_Contents.Level_Type;
-			     Clause_Number : in String;
-			     Version : in ARM_Contents.Change_Version_Type;
-			     Old_Version : in ARM_Contents.Change_Version_Type;
-        		     No_Page_Break : in Boolean := False) is
+    procedure Revised_Clause_Header
+			    (Output_Object     : in out HTML_Output_Type;
+			     New_Header_Text   : in String;
+			     Old_Header_Text   : in String;
+			     Level	       : in ARM_Contents.Level_Type;
+			     Clause_Number     : in String;
+			     Version	       : in ARM_Contents.Change_Version_Type;
+			     Old_Version       : in ARM_Contents.Change_Version_Type;
+			     Top_Level_Subdivision_Name : in ARM_Output.Top_Level_Subdivision_Name_Kind;
+        		     No_Page_Break     : in Boolean := False) is
 	-- Output a revised clause header. Both the original and new text will
 	-- be output. The level of the header is specified in Level. The Clause
-	-- Number is as specified.
-	-- These should appear in the table of contents.
+	-- Number is as specified; the top-level (and other) subdivision names
+	-- are as specified. These should appear in the table of contents.
 	-- For hyperlinked formats, this should generate a link target.
 	-- Version is the insertion version of the new text; Old_Version is
 	-- the insertion version of the old text.
@@ -2916,11 +2931,20 @@
 				          Header_Text & "</H1>");
 	        end if;
 	    when ARM_Contents.Section =>
-	        Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>Section " &
-				      Clause_Number & ": " & Header_Text & "</H1>");
+		case Top_Level_Subdivision_Name is
+		    when ARM_Output.Chapter =>
+		        Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>Chapter " &
+					      Clause_Number & ": " & Header_Text & "</H1>");
+		    when ARM_Output.Section =>
+		        Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>Section " &
+					      Clause_Number & ": " & Header_Text & "</H1>");
+		    when ARM_Output.Clause =>
+		        Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" &
+					      Clause_Number & " &nbsp; " & Header_Text & "</H1>");
+		end case;
 	    when ARM_Contents.Clause | ARM_Contents.Subclause |
 		 ARM_Contents.Subsubclause =>
-	        Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1> " &
+	        Ada.Text_IO.Put_Line (Output_Object.Output_File, "<H1>" &
 				      Clause_Number & ' ' & Header_Text & "</H1>");
 	    when ARM_Contents.Dead_Clause  =>
 		raise Program_Error; -- No headers for dead clauses.

Questions? Ask the ACAA Technical Agent