CVS difference for ai12s/ai12-0384-2.txt
--- ai12s/ai12-0384-2.txt 2020/10/15 05:36:51 1.1
+++ ai12s/ai12-0384-2.txt 2020/10/22 23:58:59 1.2
@@ -1,5 +1,7 @@
-!standard 4.10(0) 20-10-14 AI12-0384-2/01
+!standard 4.10(0) 20-10-21 AI12-0384-2/02
!class Amendment 20-10-14
+!status Amendment 1-2012 20-10-21
+!status ARG Approved 9-0-5 20-10-21
!status work item 20-10-14
!status received 20-10-09
!priority Low
@@ -8,8 +10,8 @@
!summary
-Add operations to associate with a Text_Buffer an adjustable level of
-indentation. Eliminate the End_Of_Line function. Add operations for
+Add operations to associate an adjustable level of indentation with
+a Text_Buffer. Eliminate the End_Of_Line function. Add operations for
putting and getting the content of the Text_Buffer as a UTF_8 String or
as a UTF_16 Wide_String. Provide functions Get, Wide_Get, and
Wide_Wide_Get rather than procedures for retrieving the whole buffer to
@@ -39,7 +41,7 @@
(1) Defining the Put_Image for a composite type is likely to result in
multiple lines of output. It seems highly desirable that such output is
reasonably indented, to reflect the nesting of components and
-subcomponents. As currently defined the Put_Image attribute takes only
+subcomponents. As currently defined, the Put_Image attribute takes only
the Text_Buffer and the value whose image is to be produced. If we want
to provide some level of indenting, we need to incorporate into the
Text_Buffer some notion of a current level of indentation.
@@ -60,7 +62,7 @@
in a Text_Buffer. This can also make the process "loss-less" while
permitting efficient internal representation.
-(4) There seems no particular advantage in having the Put procedures
+(4) There seems to be no particular advantage in having the Put procedures
of the Bounded child package raise Constraint_Error on buffer overflow.
A more common use-case is to want the buffer to silently stop storing
characters, but keep a flag to indicate that an overflow occurred,
@@ -88,7 +90,7 @@
primitives, which determine how many spaces are inserted at the
beginning of the buffer, and at the beginning of each nonempty line.
-(2) We replace the the Get, Wide_Get, and Wide_Wide_Get procedures with
+(2) We replace the Get, Wide_Get, and Wide_Wide_Get procedures with
Get, Wide_Get, and Wide_Wide_Get functions, which (in the case of Get
and Wide_Get) provide backward-compatible implementation-defined
substitutions for unrepresentable characters, as appropriate for 'Image
@@ -96,7 +98,7 @@
(3) We add Get/Put_UTF_8 and Wide_Get/Put_UTF_16 operations.
-(4) We provide a Buffer_Overflowed function for checking the state of a
+(4) We provide a Text_Truncated function for checking the state of a
Bounded buffer.
(5) We remove the End_Of_Line function. We leave for future
@@ -294,9 +296,9 @@
type Buffer_Type (Max_Characters : Text_Buffer_Count)
is new Root_Buffer_Type with private
with Default_Initial_Condition =>
- not Buffer_Overflowed (Buffer_Type);
+ not Text_Truncated (Buffer_Type);
- function Buffer_Overflowed (Buffer : in Buffer_Type) return Boolean;
+ function Text_Truncated (Buffer : in Buffer_Type) return Boolean;
-- Get, Wide_Get, Wide_Wide_Get, Get_UTF_8, and Wide_Get_UTF_16
-- are declared here just as in the Unbounded child.
@@ -341,7 +343,7 @@
Add after A.4.12
In the case of a Buf of type Text_Buffers.Bounded.Buffer_Type,
- Buffer_Overflowed (Buf) returns True if the various Put procedures
+ Text_Truncated (Buf) returns True if the various Put procedures
together have attempted to store more than Buf.Max_Characters into
Buf. If this function returns True, then the various Get functions
return a representation of only the first Buf.Max_Characters
@@ -353,7 +355,7 @@
t]{T}his can be accomplished by using an object of the
Text_Buffers.Bounded.Buffer_Type with the maximum characters as
specified in the Max_Image_Length restriction{, with a raise of
- Program_Error afterward if Buffer_Overflowed (Buf) is True after the
+ Program_Error afterward if Text_Truncated (Buf) is True after the
call on Put_Image (Buf, Arg)}.
!discussion
@@ -381,13 +383,13 @@
Put_Image to avoid such output instability.
We decided to have operations on the Bounded Buffer_Type
-set the Buffer_Overflowed flag rather than raise Constraint_Error,
+set the Text_Truncated flag rather than raise Constraint_Error,
but the user of the buffer can just as easily use a pragma Assert (not
-Buffer_Overflowed (Buf)) afterward. To exactly specify the conditions
+Text_Truncated (Buf)) afterward. To exactly specify the conditions
when Constraint_Error would be raised would significantly complicate the
interface, and not really provide any more safety. It would also
interfere with a common situation where if an Image exceeds a maximum
-desired length, you are willing to use ellipses ("...") to indicate
+desired length, one is willing to use ellipses ("...") to indicate
overflow.
As mentioned in the !proposal, although the original goals might
Questions? Ask the ACAA Technical Agent